1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[1799],{10054:(e,t,n)=>{n.d(t,{g:()=>T});var a=n(98477),o=n(63521),i=n(4724),r=n(42969),c=n(14232),s=n(5720),u=n(2553),d=n(61542),p=n(5646),l=(0,p.i7)(["from{transform:translateY(0.75rem);opacity:0;}to{transform:translateY(0);opacity:1;}"]),h=p.Ay.div.withConfig({componentId:"sc-1hhjt27-0"})(function(e){var t=e.theme;return(0,p.AH)(["position:fixed;inset:0;z-index:",";display:flex;align-items:flex-start;justify-content:center;overflow-y:auto;background:linear-gradient( 180deg,"," 0%,"," 50%,"," 100% );padding:"," "," ",";"],t.zi.modal,t.co.primary98,t.co.primary99,t.co.neutral99,t.sz.s6,t.sz.s5,t.sz.s10)}),f=p.Ay.div.withConfig({componentId:"sc-1hhjt27-1"})(function(e){var t=e.theme;return(0,p.AH)(["width:100%;max-width:420px;display:flex;flex-direction:column;align-items:center;gap:",";margin:auto 0;text-align:center;"],t.sz.s5)}),g=p.Ay.span.withConfig({componentId:"sc-1hhjt27-2"})(function(e){var t=e.theme;return(0,p.AH)(["",";padding:"," ",";border-radius:",";background:",";color:",";font-weight:700;letter-spacing:0.08em;text-transform:uppercase;animation:"," 0.4s ease-out both;"],t.typography.paragraph.s,t.sz.s2,t.sz.s4,t.bo.round,t.co.secondary20,t.co.primary40,l)}),y=p.Ay.h2.withConfig({componentId:"sc-1hhjt27-3"})(function(e){var t=e.theme;return(0,p.AH)(["",";color:",";margin:0;animation:"," 0.4s ease-out 0.1s both;"],t.typography.heading.mobile.m,t.co.secondary20,l)}),m=p.Ay.p.withConfig({componentId:"sc-1hhjt27-4"})(function(e){var t=e.theme;return(0,p.AH)(["",";color:",";margin:0;animation:"," 0.4s ease-out 0.2s both;"],t.typography.paragraph.l,t.co.secondary50,l)}),b=p.Ay.div.withConfig({componentId:"sc-1hhjt27-5"})(function(e){var t=e.theme;return(0,p.AH)(["position:relative;display:flex;align-items:center;justify-content:center;width:55%;max-width:220px;aspect-ratio:1;border-radius:",";border:"," solid ",";background:",";overflow:hidden;box-shadow:0 "," "," rgba(41,55,73,0.18);animation:"," 0.4s ease-out 0.3s both;"],t.bo.elliptical,t.sz.s2,t.co.neutral99,t.co.primary30,t.sz.s2,t.sz.s5,l)}),k=p.Ay.video.withConfig({componentId:"sc-1hhjt27-6"})(["width:100%;height:100%;object-fit:cover;"]),v=p.Ay.div.withConfig({componentId:"sc-1hhjt27-7"})(["display:flex;align-items:center;justify-content:center;width:100%;height:100%;svg{width:100%;height:100%;display:block;}"]),x=p.Ay.button.withConfig({componentId:"sc-1hhjt27-8"})(function(e){var t=e.theme;return(0,p.AH)(["position:absolute;inset:0;display:flex;align-items:center;justify-content:center;margin:0;padding:0;border:none;background:rgba(0,0,0,0.4);color:",";font-size:",";cursor:pointer;"],t.co.neutral99,t.sz.s8)}),j=p.Ay.div.withConfig({componentId:"sc-1hhjt27-9"})(function(e){var t=e.theme;return(0,p.AH)(["display:flex;flex-direction:column;align-items:center;gap:",";animation:"," 0.4s ease-out 0.4s both;"],t.sz.s1,l)}),w=p.Ay.p.withConfig({componentId:"sc-1hhjt27-10"})(function(e){var t=e.theme;return(0,p.AH)(["",";color:",";margin:0;"],t.typography.heading.mobile.s,t.co.secondary20)}),C=p.Ay.p.withConfig({componentId:"sc-1hhjt27-11"})(function(e){var t=e.theme;return(0,p.AH)(["",";color:",";margin:0;"],t.typography.paragraph.m,t.co.secondary50)}),A=p.Ay.div.withConfig({componentId:"sc-1hhjt27-12"})(function(e){var t=e.theme;return(0,p.AH)(["width:100%;display:flex;flex-direction:column;gap:",";padding-top:",";animation:"," 0.4s ease-out 0.5s both;"],t.sz.s3,t.sz.s2,l)}),_=n(37876);function z(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(e);t&&(a=a.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,a)}return n}function I(e){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?z(Object(n),!0).forEach(function(t){(0,r.A)(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):z(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}var P=function(e){return(0,_.jsxs)("svg",I(I({},e),{},{children:[(0,_.jsx)("defs",{children:(0,_.jsxs)("linearGradient",{id:"placeholder_svg__bg",x1:"0",x2:"1",y1:"0",y2:"1",children:[(0,_.jsx)("stop",{offset:"0%",stopColor:"#fdebc4"}),(0,_.jsx)("stop",{offset:"100%",stopColor:"#f7c948"})]})}),(0,_.jsx)("path",{fill:"url(#placeholder_svg__bg)",d:"M0 0h200v200H0z"}),(0,_.jsxs)("g",{fill:"none",stroke:"#293749",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"8",children:[(0,_.jsx)("path",{d:"M70 150V55"}
1),(0,_.jsx)("path",{fill:"#293749",stroke:"none",d:"m70 55 58 13-28 16 28 16-58 12Z"})]})]}))};P.defaultProps={xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 200 200"};var M=(0,s.YK)({badge:{id:"path_pre_checkpoint_badge",defaultMessage:"Section complete"},title:{id:"path_pre_checkpoint_title",defaultMessage:"Look how far youâve come"},description:{id:"path_pre_checkpoint_description",defaultMessage:"Youâve finished this section. Next, a quick checkpoint to lock it in and move your path forward."},continueLabel:{id:"path_pre_checkpoint_continue",defaultMessage:"Continue to checkpoint"},backLabel:{id:"path_pre_checkpoint_back",defaultMessage:"Back to my path"},playVideo:{id:"path_pre_checkpoint_play_video",defaultMessage:"Play video"}}),O=function(e){var t=e.media,n=e.onContinue,a=e.isContinuing,o=void 0!==a&&a,i=e.onBack,r=(0,s.tz)(),p="video"===t.status?t.videoSrc:void 0,l="video"===t.status?t.phrase:void 0,z=(0,c.useRef)(null),I=(0,c.useState)(!1),O=I[0],H=I[1];return(0,c.useEffect)(function(){if(H(!1),p){var e=z.current;if(e){e.muted=!1;var t=e.play();t&&"function"==typeof t.catch&&t.catch(function(){return H(!0)})}}},[p]),(0,_.jsxs)(h,{"data-testid":"pre-checkpoint-screen",children:["audio"===t.status&&(0,_.jsx)("audio",{autoPlay:!0,preload:"auto",src:t.audioSrc,"data-testid":"pre-checkpoint-audio"}),(0,_.jsxs)(f,{children:[(0,_.jsx)(g,{children:r.formatMessage(M.badge)}),(0,_.jsx)(y,{children:r.formatMessage(M.title)}),(0,_.jsx)(m,{children:r.formatMessage(M.description)}),(0,_.jsx)(b,{children:p?(0,_.jsxs)(_.Fragment,{children:[(0,_.jsx)(k,{ref:z,src:p,playsInline:!0,preload:"auto","aria-label":l,onPlay:function(){return H(!1)},onEnded:function(){return H(!0)},onError:function(){return H(!0)},"data-testid":"pre-checkpoint-video",children:(0,_.jsx)("track",{kind:"captions"})}),O&&(0,_.jsx)(x,{type:"button",onClick:function(){var e=z.current;e&&(e.currentTime=0,e.play())},"aria-label":r.formatMessage(M.playVideo),"data-testid":"pre-checkpoint-play",children:(0,_.jsx)(u.A,{name:"playFilled"})})]}):(0,_.jsx)(v,{"data-testid":"pre-checkpoint-placeholder",children:(0,_.jsx)(P,{"aria-hidden":"true"})})}),("video"===t.status||"audio"===t.status)&&(0,_.jsxs)(j,{"data-testid":"pre-checkpoint-caption",children:[(0,_.jsx)(w,{dir:"auto",children:t.phrase}),(0,_.jsx)(C,{children:t.translation})]}),(0,_.jsxs)(A,{children:[(0,_.jsx)(d.$n,{buttonType:"primary",buttonSize:"large",wide:!0,onClick:n,loading:o,disabled:o,"data-testid":"pre-checkpoint-continue-button",children:r.formatMessage(M.continueLabel)}),(0,_.jsx)(d.$n,{buttonType:"secondary",buttonSize:"large",wide:!0,onClick:i,disabled:o,"data-testid":"pre-checkpoint-back-button",children:r.formatMessage(M.backLabel)})]})]})]})},H=n(72093),S=function(e){var t=e.children;return"u"<typeof document?(0,_.jsx)(_.Fragment,{children:t}):(0,a.createPortal)(t,document.body)},T=function(e){var t,n=e.targetLanguageLocale,a=e.onContinue,r=e.isContinuing,s=e.onBack,u=(t=null!=n?n:(0,i.Rc)(o.pR),(0,c.useMemo)(function(){var e=(0,H.dh)(t);return e?{status:"video",videoSrc:e.src,phrase:e.phrase,translation:e.translation}:{status:"unavailable"}},[t]));return(0,_.jsx)(S,{children:(0,_.jsx)(O,{media:u,onContinue:a,isContinuing:r,onBack:s})})}},71774:(e,t,n)=>{n.d(t,{H:()=>o});var a=n(78220),o=function(e){if(null===e)return"";if("string"==typeof e)return e.includes("?")?"".concat(e,"&key=").concat((0,a.A)()):"".concat(e,"?key=").concat((0,a.A)());var t=e.pathname,n=e.query,o=Object.keys(n).map(function(e){return"".concat(e,"=").concat(encodeURIComponent(n[e]))}).join("&");return"".concat(t,"?").concat(o,"&key=").concat((0,a.A)())}},81799:(e,t,n)=>{n.d(t,{A:()=>y,H:()=>g});var a=n(5720),o=n(61542),i=n(25493),r=n(53403),c=n(99276),s=n(68567),u=n(10054),d=n(5646),p=d.Ay.div.withConfig({componentId:"sc-1l8dmk6-0"})(function(e){var t=e.theme,n=e.$layout;return(0,d.AH)(["display:flex;flex-direction:column;align-items:stretch;gap:",";width:100%;",""],t.sz.s4,"inline"===n&&(0,d.AH)(["align-self:center;max-width:",";"],t.sz.s64))}),l=n(37876),h=(0,a.YK)({continueLearning:{id:"path_continue_learning_cta",defaultMessage:"Continue learning"},goBackToPath:{id:"path_go_back_cta",defaultMessage:"Go back to my path"}}),f=function(e){var t=e.onBeforeNavigate,n=(0,a.tz)(),i=(0,s.A)().safePush;return(0,l.jsx)(o.$n,{buttonType:"secondary",buttonSize:"large",wide:!0,onClick:function(){return t(function(){return i(r.b.path)},"back")},"data-testid":"path-go-back-button",children:n.formatMessage(h.goBackToPath)})},g=function(e){var t=e.onBeforeNavigate,n=(0,a.tz)();return t?(0,l.jsx)(f,{onBeforeNavigate:t}):(0,l.jsx)(i.z,{buttonType:"secondary",buttonSize:"large",wide:!0,href:r.b.path,"data-testid":"path-go-back-button",children:n.formatMessage(h.goBackToPath)})},y=function(e){var t=e.languagePairId,n=e.pathwayNodeId,i=e.pathwayCheckpointId,d=e.sessionType,f=e.layout,y=e.onBeforeNavigate,m=(0,a.tz)(),b=(0,s.A)().safePush,k=(0,c.A)({languagePairId:t,pathwayNodeId:void 0===n?null:n,pathwayCheckpointId:void 0===i?null:i,sessionType:void 0===d?null:d}),v=k.continueToNextStep,x=k.isResolving,j=k.pendingCheckpointUrl,w=k.confirmCheckpoint,C=k.isLaunchingCheckpoint;return j&&t?(0,l.jsx)(u.g,{onContinue:w,isContinuing:C,onBack:function(){return b(r.b.path)}}):(0,l.jsxs)(p,{$layout:void 0===f?"stacked":f,children:[(0,l.jsx)(o.$n,{buttonType:"primary",buttonSize:"large",wide:!0,loading:x,disabled:x,onClick:function(){y?y(v,"continue"):v()},"data-testid":"path-continue-learning-button",children:m.formatMessage(h.continueLearning)}),(0,l.jsx)(g,{onBeforeNavigate:y})]})}},99276:(e,t,n)=>{n.d(t,{A:()=>b});var a,o=n(63857),i=n(60180),r=n.n(i),c=n(14232),s=n(67768),u=n(26900),d=n(58161),p=n(91949),l=n(91561),h=(a=(0,o.A)(r().mark(function e(t,n){var a,o,i,c,s,h;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:a=n,i=0;
1case 2:if(!(i<10)){e.next=19;break}if(c=(0,l.d8)(a),s=(0,d.J)(c)){e.next=7;break}return e.abrupt("return",{kind:"goalComplete"});case 7:return e.next=9,(0,p.G)(t,s);case 9:if("url"!==(h=e.sent).kind){e.next=12;break}return e.abrupt("return",{kind:"launch",url:h.url,updatedPathway:o,isCheckpoint:"checkpoint"===s.kind});case 12:return e.next=14,u.Ym.passCheckpoint(h.checkpointId);case 14:o=a=e.sent;case 16:i+=1,e.next=2;break;case 19:return e.abrupt("return",{kind:"goalComplete"});case 20:case"end":return e.stop()}},e)})),function(e,t){return a.apply(this,arguments)}),f=n(53403),g=n(68567),y=n(71774),m=n(47019),b=function(e){var t=e.languagePairId,n=e.pathwayNodeId,a=e.pathwayCheckpointId,i=e.sessionType,u=(0,s.jE)(),d=(0,g.A)().safePush,p=(0,m.a)({languagePairId:t,pathwayNodeId:n,pathwayCheckpointId:a,sessionType:void 0===i?null:i}).completePathwayProgress,l=(0,c.useState)(!1),b=l[0],k=l[1],v=(0,c.useState)(null),x=v[0],j=v[1],w=(0,c.useState)(!1),C=w[0],A=w[1],_=(0,c.useRef)(!1),z=(0,c.useCallback)(function(e){return d((0,y.H)(e))},[d]),I=(0,c.useCallback)(function(){if(!_.current){_.current=!0,k(!0);var e,n=function(){return d(f.b.path,!0)};(e=(0,o.A)(r().mark(function e(){var a,o;return r().wrap(function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,p();case 2:if(a=e.sent,!(!t||!a)){e.next=7;break}return e.next=6,n();case 6:case 13:return e.abrupt("return");case 7:return e.next=9,h(t,a);case 9:if("goalComplete"!==(o=e.sent).kind){e.next=14;break}return e.next=13,n();case 14:if(o.updatedPathway&&u.setQueryData(["activePathway",t],o.updatedPathway),!o.isCheckpoint){e.next=19;break}return j(o.url),k(!1),e.abrupt("return");case 19:return e.next=21,z(o.url);case 21:case"end":return e.stop()}},e)})),function(){return e.apply(this,arguments)})().catch(function(){n()})}},[p,t,u,d,z]),P=(0,c.useCallback)(function(){x&&(A(!0),z(x))},[x,z]);return{continueToNextStep:I,isResolving:b,pendingCheckpointUrl:x,confirmCheckpoint:P,isLaunchingCheckpoint:C}}}}]); 2//# sourceMappingURL=1799-f642d3d659b6b0dc.js.map
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.