PageSourceSearch

https://shadowingenglish.com/_next/static/chunks/397298fbe8e0d013.js

js shadowingenglish.com collected 2026-10-02 00:55:50 UTC 23,091 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,468612,e=>{"use strict";function t(e){if(!e)return null;let t=Date.parse(e);if(!Number.isFinite(t))return null;try{return new Date(t).toLocaleTimeString(void 0,{hour:"2-digit",minute:"2-digit"})}catch{return null}}e.s(["quotaResetLabel",()=>t])},317966,e=>{"use strict";var t=e.i(976078),r=e.i(43411);let n=null,a=0;function s(){return n}function l(e){let t=(e||"").toLowerCase();return t.includes("mp4")||t.includes("m4a")||t.includes("aac")?"recording.mp4":t.includes("ogg")?"recording.ogg":t.includes("wav")?"recording.wav":"recording.webm"}function o(){if(!n?.exceeded||Date.now()-a>=3e5)return!1;let e=Date.parse(n.resetAt);return!Number.isFinite(e)||e>Date.now()}async function i(e,r){let n=e.trim();if(!n)return null;let a=await (0,t.fetchSentenceIpa)(n,r).catch(()=>null),s=n.split(/\s+/).map(e=>e.toLowerCase().replace(/^[^\p{L}']+|[^\p{L}']+$/gu,"")).map((e,n)=>{let s=a?.ipa?.[n]??null??(e?(0,t.getCachedIpa)(e,r)??null:null);return(0,t.cleanIpaForScoring)(s)??""});return s.some(e=>e.length>0)?s:null}async function c(e){let{blob:r,sentence:s,accent:c,transcript:u,expectedIpa:d}=e;if(!s.trim()||r.size<4096)return{status:"too-short"};if(o())return{status:"quota"};let p=new AbortController,m=setTimeout(()=>p.abort(),15e3);try{let e=c?.toLowerCase()==="en-gb"?"en-gb":"en-us",o=new FormData;o.append("file",r,l(r.type)),o.append("referenceText",s),o.append("accent",e);let m=d?.some(e=>e)?d.map(e=>(0,t.cleanIpaForScoring)(e)??""):await i(s,c||"en-US");m&&o.append("expectedIpa",JSON.stringify(m)),u&&o.append("transcribedText",u);let f=await fetch("/api/phoneme/analyze",{method:"POST",body:o,signal:p.signal}),h=await f.json().catch(()=>null);if(h?.quota&&(n=h.quota,a=Date.now()),!f.ok||!h||!0!==h.success){let e=h&&"code"in h?h.code:"UPSTREAM_FAIL";return"QUOTA_EXCEEDED"===e?{status:"quota"}:{status:"error",code:e}}return{status:"ok",result:h.data}}catch(e){return{status:"error",code:e instanceof DOMException&&"AbortError"===e.name?"TIMEOUT":"NETWORK"}}finally{clearTimeout(m)}}(0,r.registerQuotaCacheReset)(function(){n=null,a=0}),e.s(["getPhonemeQuotaSnapshot",()=>s,"isPhonemeQuotaSpent",()=>o,"recordingFilename",()=>l,"runPhonemeAnalysis",()=>c])},239600,e=>{"use strict";function t(e){return Number.isFinite(e)?e>=80?"good":e>=60?"warn":"bad":"warn"}function r(e){for(let t of[e?.pronunciationScore,e?.accuracyScore]){let e=Number(t);if(Number.isFinite(e))return Math.max(0,Math.min(100,Math.round(e)))}return null}function n(e){let r={total:0,clean:0,mispronounced:0,omitted:0};if(!Array.isArray(e))return r;for(let n of e)"Insertion"!==n.errorType&&(r.total+=1,"Omission"===n.errorType?r.omitted+=1:"good"===t(n.accuracyScore)?r.clean+=1:r.mispronounced+=1);return r}e.s(["overallPhonemeScore",()=>r,"phonemeBand",()=>t,"summarizeWords",()=>n])},270756,e=>{"use strict";let t=(0,e.i(475254).default)("lock",[["rect",{width:"18",height:"11",x:"3",y:"11",rx:"2",ry:"2",key:"1w4ew1"}],["path",{d:"M7 11V7a5 5 0 0 1 10 0v4",key:"fwvmzm"}]]);e.s(["Lock",()=>t],270756)},562847,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(522016),a=e.i(618566),s=e.i(243553),l=e.i(37727),o=e.i(375679);function i({open:e,onClose:i,dict:c,title:u,message:d,note:p,upgradeCta:m,laterCta:f,upgradeSource:h}){let x=(0,a.useParams)(),w=x?.lang||"en",b=w&&"en"!==w?`/${w}`:"",g=c?.premiumModal??{};if((0,r.useEffect)(()=>{e&&(0,o.trackPaywallView)(h)},[e,h]),(0,r.useEffect)(()=>{if(!e)return;let t=e=>{"Escape"===e.key&&i()};return window.addEventListener("keydown",t),()=>window.removeEventListener("keydown",t)},[e,i]),!e)return null;let y=u||g.title||"Premium required",v=d||g.message||"Upgrade to premium to keep using this feature.",S=m||g.upgradeCta||"Upgrade now",k=f||g.laterCta||"Maybe later",I=h?`${b}/upgrade?source=${encodeURIComponent(h)}`:`${b}/upgrade`;return(0,t.jsx)("div",{className:"fixed inset-0 z-[100] flex items-center justify-center bg-black/60 px-4 backdrop-blur-[2px] animate-in fade-in duration-200",onClick:i,children:(0,t.jsxs)("div",{role:"dialog","aria-modal":"true","aria-label":y,onClick:e=>e.stopPropagation(),className:"relative w-full max-w-sm rounded-2xl border border-amber-400/30 bg-card p-5 text-center shadow-2xl",children:[(0,t.jsx)("button",{type:"button",onClick:i,"aria-label":"Close",className:"absolute right-2 top-2 rounded p-1 text-txt-muted transition-colors hover:text-amber-500",children:(0,t.jsx)(l.X,{size:16})}),(0,t.jsx)("div",{className:"mx-auto mb-3 flex h-12 w-12 items-center justify-center rounded-full bg-amber-400/15",children:(0,t.jsx)(s.Crown,{size:24,className:"text-amber-500"})}),(0,t.jsx)("h3",{className:"text-[15px] font-bold text-txt-primary",children:y}),(0,t.jsx)("p",{className:"mt-1.5 text-[13px] leading-snug text-txt-muted",children:v}),p&&(0,t.jsx)("p",{className:"mt-1 text-[11.5px] text-txt-muted/80",children:p}),(0,t.jsxs)(n.default,{href:I,onClick:i,className:"mt-4 flex w-full items-center justify-center gap-1.5 rounded-xl bg-amber-500 px-4 py-2.5 text-[13px] font-bold text-white transition-colors hover:bg-amber-600",children:[(0,t.jsx)(s.Crown,{size:15}),S]}),(0,t.jsx)("button",{type:"button",onClick:i,className:"mt-2 w-full py-1.5 text-[12px] font-semibold text-txt-muted transition-colors hover:text-txt-primary",children:k})]})})}e.s(["default",()=>i])},367240,e=>{"use strict";let t=(0,e.i(475254).default)("rotate-ccw",[["path",{d:"M3 12a9 9 0 1 0 9-9 9.75 9.75 0 0 0-6.74 2.74L3 8",key:"1357e3"}],["path",{d:"M3 3v5h5",key:"1xhq8a"}]]);e.s(["RotateCcw",()=>t],367240)},976078,e=>{"use strict";let t=new Set(["the","a","an","this","that","these","those","my","your","his","her","its","our","their","some","any","every","each","all","both","another","me","him","them","us","it","you","yourself","yourselves","everything","something","anything","everyone","someone","anyone"]),r=new Set(["to","will","'ll","would","can","could","may","might","must","shall","should","do","does","did","don't","doesn't","didn't","cannot","can't","won't","wouldn't","couldn't","shouldn't","let","let's","please","help","make","gonna","wanna","used"]),n=new Set(["have","has","had","having","been","'ve","'s","'d"]),a=new Set(["never","just","already","recently","always","ever","not","n't","only","also","still","actually","finally","barely","hardly","almost","nearly","often","usually","rarely","seldom","sometimes","probably"]),s=new Set(["yesterday","ago","earlier","previously","formerly"]),l=new Set(["night","
1week","weekend","month","year","summer","winter","spring","fall","autumn","time","monday","tuesday","wednesday","thursday","friday","saturday","sunday"]),o=new Set(["am","is","are","was","were","be","been","being","'m","'s","'re","feel","feels","felt","feeling","seem","seems","seemed","look","looks","looked","appear","appears","appeared","stay","stays","stayed","remain","remains","remained","sound","sounds","sounded","get","gets","got","gotten","become","becomes","became"]),i=new Set(["very","so","quite","really","pretty","fairly","totally","completely","entirely","perfectly","rather","too","more","most","less","fully","not"]),c=new Set(["pipe","pipes","paint","poisoning","solder","weight","weights","bullet","bullets","shot","acid","oxide","ore","sinker","sinkers"]),u=new Set(["made","out","piece","block","sheet","lump","bar","full"]);function d(e,r){return!!e.clauseInitial&&!!e.next&&(t.has(e.next)||(r?.has(e.next)??!1))}function p(e,t){for(let r=e.index-1;r>=0;r--){let n=e.words[r];if(n&&!t.has(n))return n}return null}function m(e,t,r){let n=r?new Set(r):void 0;return{senses:{VERB:{carrier:e,index:t}},decide:e=>d(e,n)?"VERB":null}}let f={close:m("I will close it",2,["down","up","off"]),use:m("I will use it",2),record:m("I will record it",2),present:m("I will present it",2),object:m("I will object to it",2,["to"]),wind:m("I will wind it",2,["up","down","back"]),house:m("I will house it",2),abuse:m("I will abuse it",2),contract:m("I will contract it",2),permit:m("I will permit it",2),progress:m("I will progress slowly",2,["to","toward","towards"]),protest:m("I will protest it",2,["against","about"]),increase:m("I will increase it",2),export:m("I will export it",2),transport:m("I will transport it",2),transfer:m("I will transfer it",2,["to"]),conflict:m("I will conflict with it",2),contest:m("I will contest it",2),convict:m("I will convict him",2),escort:m("I will escort him",2),extract:m("I will extract it",2),insert:m("I will insert it",2),project:m("I will project it",2),rebel:m("I will rebel against it",2,["against"]),survey:m("I will survey it",2),suspect:m("I will suspect it",2),perfect:m("I will perfect it",2),separate:m("I 
1will separate it",2),estimate:m("I will estimate it",2),graduate:m("I will graduate soon",2,["from"]),alternate:m("I will alternate it",2),moderate:m("I will moderate it",2),console:m("I will console her",2),converse:m("I will converse with them",2,["with"]),desert:m("I will desert it",2),compound:m("I will compound it",2),implant:m("I will implant it",2),live:m("they live here",1),excuse:{senses:{VERB:{literal:{"en-us":"ɛkskjˈuːz","en-gb":"ɛkskjˈuːz"}}},decide:e=>d(e)?"VERB":null},content:{senses:{ADJ:{carrier:"she was content",index:2}},decide:e=>{let t=p(e,i);return t&&o.has(t)?"ADJ":null}},lead:{senses:{METAL:{literal:{"en-us":"lˈɛd","en-gb":"lˈɛd"}}},decide:e=>e.next&&c.has(e.next)||"of"===e.prev&&u.has(e.words[e.index-2]??"")?"METAL":null},read:{senses:{PRESENT:{carrier:"I will read it",index:2},PAST:{carrier:"I have read it",index:2}},decide:e=>{let t=p(e,a);return e.prev&&r.has(e.prev)||t&&r.has(t)||d(e)?"PRESENT":t&&n.has(t)||function(e){for(let t=0;t<e.length;t++)if(s.has(e[t])||"last"===e[t]&&l.has(e[t+1]??""))return!0;return!1}(e.words)?"PAST":null}}},h={};function x(e,t){return`${e.toLowerCase()}_${t}`}function w(e,t="en-US"){let r=h[x(e,t)];return r?r.ipa:void 0}let b={};async function g(e,t="en-US"){let r=e.trim();if(!r)return{words:[],ipa:[]};let n=`${t}::${r.trim().toLowerCase()}`,a=b[n];if(a)return a;try{let e=`/api/ipa?sentence=${encodeURIComponent(r)}&accent=${encodeURIComponent(t)}`,a=await fetch(e,{method:"GET"});if(a.ok){let e=await a.json();if(Array.isArray(e?.words)&&Array.isArray(e?.ipa))return b[n]=e,e.words.forEach((r,n)=>{let a=r.toLowerCase();!(!a||a.toLowerCase().replace(/’/g,"'").replace(/^[^\p{L}']+|[^\p{L}']+$/gu,"")in f)&&(x(a,t)in h||function(e,t,r,n=null){h[x(e,t)]={ipa:r,base:e.toLowerCase(),audioUrl:n}}(a,t,e.ipa[n]??null))}),e}}catch(e){console.warn("[ipa-client-cache] fetchSentenceIpa failed:",e)}return{words:r.split(/\s+/),ipa:r.split(/\s+/).map(()=>null)}}function y(e){return e&&e.replace(/^\/|\/$/g,"").trim()||null}e.s(["cleanIpaForScoring",()=>y,"fetchSentenceIpa",()=>g,"getCachedIpa",()=>w],976078)},491182,e=>{"use strict";var t=e.i(271645);let r="/sounds/vocab-correct.wav",n="/sounds/vocab-wrong.wav",a="vocab_sfx_muted_v1",s=null,l=null,o=!1,i=!1,c=new Set;function u(){if(!i){i=!0;try{"1"===window.localStorage.getItem(a)&&(o=!0,c.forEach(e=>e()))}catch{}}}function d(e,t,r){if("u"<typeof Audio)return null;let n="correct"===r?s:l;if(n)return n;try{let n=new Audio(e);
1return n.volume=t,n.preload="auto","correct"===r?s=n:l=n,n}catch{return null}}function p(e){if(e)try{e.currentTime=0,e.play()?.catch(()=>{})}catch{}}function m(e){e?(u(),o||p(d(r,.22,"correct"))):(u(),o||p(d(n,.18,"wrong")))}function f(){for(let[e,t,a]of(u(),[[r,.22,"correct"],[n,.18,"wrong"]])){let r=d(e,t,a);if(r)try{r.muted=!0;let e=r.play();e?e.then(()=>{r.pause(),r.currentTime=0,r.muted=!1}).catch(()=>{r.muted=!1}):r.muted=!1}catch{r.muted=!1}}}function h(e){u();let t=()=>e();return c.add(t),()=>{c.delete(t)}}function x(){return{muted:(0,t.useSyncExternalStore)(h,()=>o,()=>!1),toggleMuted:(0,t.useCallback)(()=>{var e=!o;o=e,c.forEach(e=>e());try{window.localStorage.setItem(a,e?"1":"0")}catch{}},[])}}e.s(["playVocabFeedback",()=>m,"primeVocabSfx",()=>f,"useVocabSfxMute",()=>x])},16400,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(55584);let a=["✨","🎉","⭐","✨","💫","⭐"],s=["💧","💢","💧"];function l({trigger:e,correct:l,xpAmount:o=0,xpLabel:i}){let c=(0,r.useMemo)(()=>{let e=l?a:s;return e.map((t,r)=>{let n=2*Math.PI*r/e.length+(l?0:Math.PI/6),a=l?64+r%2*14:38;return{glyph:t,dx:Math.cos(n)*a,dy:Math.sin(n)*a,size:l?22+r%3*2:18,delay:25*r}})},[e,l]);return e<=0?null:(0,t.jsxs)("div",{"data-testid":"answer-burst",className:"pointer-events-none absolute inset-0 z-20 flex items-center justify-center",children:[c.map((e,r)=>(0,t.jsx)("span",{"aria-hidden":"true",className:"absolute animate-answerBurst leading-none",style:{"--bx":`${e.dx}px`,"--by":`${e.dy}px`,fontSize:`${e.size}px`,animationDelay:`${e.delay}ms`},children:e.glyph},r)),l&&o>0&&(0,t.jsx)("span",{role:"status","data-testid":"answer-burst-xp",className:"absolute animate-burstXp whitespace-nowrap rounded-full bg-emerald-500 px-2.5 py-0.5 text-[13px] font-black tracking-wide text-white shadow-sm",children:(0,n.fmt)(i,{xp:o},"+{xp} XP")})]},e)}e.s(["default",()=>l])},958505,813017,e=>{"use strict";var t=e.i(271645),r=e.i(548071),n=e.i(502639),a=e.i(669749),s=e.i(317966),l=e.i(321141);function o(e){if("match"===e.status)return!0;if("close"!==e.status||!e.heardWord)return!1;let{refWord:t,heardWord:r}=e;return t.length>=3&&r.length>=3&&(t.includes(r)||r.includes(t))}var i=e.i(239600);function c(e){let t=(0,i.overallPhonemeScore)(e);return null==t?null:{passed:t>=60,score:t,heard:(e.recognized||"").trim(),words:Array.isArray(e.words)?e.words:[]}}function u(e){return{passed:e.passed,score:null,heard:e.heard,words:[]}}function d(e,t){return e?t?e.passed!==t.passed?e.passed?e:t:(t.score??0)>(e.score??0)?t:e:e:t}e.s(["bestAttempt",()=>d,"localAttempt",()=>u,"phonemeAttempt",()=>c],813017);let p=!1;function m(){return"u">typeof MediaRecorder&&!!navigator.mediaDevices?.getUserMedia}function f(){return!p&&!(0,s.isPhonemeQuotaSpent)()&&m()}function h(){if(f())return!0;let e=(0,r.pickSttEngine)();return"none"!==e&&("web-speech"===e||m())}function x(e){return"mic-denied"===e?"mic-denied":"no-speech"===e?"no-speech":"unsupported"===e?"unsupported":"failed"}let w=()=>()=>{};function b(e,i){let[d,m]=(0,t.useState)("idle"),[b,g]=(0,t.useState)(null),[y,v]=(0,t.useState)(null),[S,k]=(0,t.useState)(null),[I,j]=(0,t.useState)(!1),N=(0,t.useSyncExternalStore)(w,h,()=>!0),C=(0,t.useRef)(null),E=(0,t.useRef)(null),R=(0,t.useRef)([]),T=(0,t.useRef)(null),M=(0,t.useRef)(null),A=(0,t.useRef)(e);(0,t.useEffect)(()=>{A.current=e},[e]);let P=(0,t.useRef)(i);(0,t.useEffect)(()=>{P.current=i},[i]);let L=(0,t.useRef)(!0),z=(0,t.useRef)("whisper"),$=(0,t.useRef)(null),U=(0,t.useRef)(null);(0,t.useEffect)(()=>{let e=(0,r.pickSttEngine)();z.current=e,N&&"whisper"===e&&!f()&&(0,r.shouldEagerPreloadWhisper)()&&(0,r.preloadWhisper)()},[N]),(0,t.useEffect)(()=>(0,a.subscribeWhisperLoad)(e=>{k("downloading"===e.status?e.progress:null)}),[]);let W=(0,t.useCallback)(()=>{T.current&&(clearTimeout(T.current),T.current=null),M.current&&(clearTimeout(M.current),M.current=null)},[]),D=(0,t.useCallback)(()=>{let e=$.current;$.current=null,e?.abort()},[]),B=(0,t.useCallback)(()=>{W(),E.current?.getTracks().forEach(e=>e.stop()),E.current=null,C.current=null},[W]),q=(0,t.useCallback)(()=>{let e=C.current;if(e){W();try{e.stop()}catch{}M.current=setTimeout(()=>
1{M.current=null,console.warn("[useWordRecording] MediaRecorder.onstop never fired — closing the take by hand"),U.current?.()},1500)}},[W]);(0,t.useEffect)(()=>()=>{L.current=!1;try{C.current?.stop()}catch{}D(),B()},[B,D]);let F=(0,t.useCallback)(e=>{if(L.current){if(!e.trim()){v("no-speech"),m("idle");return}g(u(function(e,t){let r=t.trim(),n=(0,l.diffWords)(e,r);if(0===n.length)return{heard:r,accuracy:0,passed:!1};let a=n.filter(o).length/n.length;return{heard:r,accuracy:a,passed:a>=(n.length<=1?1:.7)}}(A.current,e))),m("result")}},[]),O=(0,t.useCallback)(e=>{L.current&&(console.error("[useWordRecording] browser STT failed:",e),v(e instanceof n.WebSpeechSttError?x(e.code):"failed"),m("idle"))},[]),Q=(0,t.useCallback)(async()=>{let e=$.current;if($.current=null,e){W(),m("scoring");try{F(await e.stop())}catch(e){O(e)}}},[W,F,O]),V=(0,t.useCallback)(async(e,t)=>{let n=!1,a=!1;if(t){let t=await (0,s.runPhonemeAnalysis)({blob:e,sentence:A.current,accent:"en-US",expectedIpa:P.current?[P.current]:void 0});if(!L.current)return;if("ok"===t.status){let e=c(t.result);if(e){p=!1,g(e),m("result");return}}else"quota"===t.status?(n=!0,j(!0)):"too-short"===t.status?a=!0:"error"===t.status&&(console.warn("[useWordRecording] phoneme analysis failed:",t.code),p=!0)}if("whisper"!==z.current){if(!L.current)return;a?v("no-speech"):n||v("failed"),m("idle");return}try{F(await (0,r.transcribeLocally)(e,{maxDurationSec:15}))}catch(e){O(e)}},[F,O]),_=(0,t.useCallback)(()=>{try{$.current=(0,n.startWebSpeechStt)({lang:"en-US"})}catch(e){$.current=null,console.warn("[useWordRecording] Web Speech start failed:",e),v(e instanceof n.WebSpeechSttError?x(e.code):"failed"),m("idle");return}m("recording"),T.current=setTimeout(()=>{T.current=null,Q()},7e3)},[Q]),X=(0,t.useCallback)(async e=>{let t,r;R.current=[];try{t=await navigator.mediaDevices.getUserMedia({audio:!0})}catch(t){let e;console.warn("[useWordRecording] getUserMedia failed:",t),L.current&&v("NotAllowedError"===(e=t instanceof Error?t.name:"")||"SecurityError"===e||"PermissionDeniedError"===e?"mic-denied":"failed");return}if(!L.current)return void t.getTracks().forEach(e=>e.stop());E.current=t;let n=MediaRecorder.isTypeSupported("audio/webm;codecs=opus")?"audio/webm;codecs=opus":MediaRecorder.isTypeSupported("audio/webm")?"audio/webm":MediaRecorder.isTypeSupported("audio/mp4")?"audio/mp4":void 0;try{r=new MediaRecorder(t,n?{mimeType:n}:void 0)}catch(e){console.error("[useWordRecording] MediaRecorder init failed:",e),B(),L.current&&v("failed");return}C.current=r;let a=!1,s=()=>{if(a||C.current!==r)return;a=!0;let t=R.current;if(R.current=[],B(),!L.current)return;let n=new Blob(t,{type:r.mimeType||"audio/webm"});if(n.size<1024){v("no-speech"),m("idle");return}m("scoring"),V(n,e)};r.ondataavailable=e=>{e.data.size>0&&R.current.push(e.data)},r.onstop=s,U.current=s,r.start(250),m("recording"),T.current=setTimeout(()=>{T.current=null,q()},7e3)},[B,V,q]),J=(0,t.useCallback)(async()=>{if(!N)return void v("unsupported");v(null),g(null);let e=f();e||"web-speech"!==z.current?await X(e):_()},[N,_,X]);return{phase:d,result:b,error:y,modelProgress:S,supported:N,quotaSpent:I,start:()=>void J(),stop:(0,t.useCallback)(()=>{$.current?Q():q()},[Q,q]),reset:(0,t.useCallback)(()=>{g(null),v(null),m("idle")},[])}}e.s(["useWordRecording",()=>b],958505)},826974,764270,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(503116),a=e.i(243553),s=e.i(270756),l=e.i(562847),o=e.i(277149),i=e.i(317966),c=e.i(468612);function u({dict:e}){let[u,d]=(0,r.useState)(!1),p=(0,o.useDictionary)(),m=(0,i.getPhonemeQuotaSnapshot)(),f=m?(e.pronounceQuotaNote||"You've used all {limit} free checks today.").replace("{limit}",String(m.limit)):null;if(m?.isPremium){let r=(0,c.quotaResetLabel)(m.resetAt);return(0,t.jsxs)("div",{className:"mt-4 space-y-1 rounded-2xl border border-slate-200 bg-slate-50 p-3 text-left",children:[(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-sm font-bold text-slate-900",children:[(0,t.jsx)(n.Clock,{size:14,className:"shrink-0 text-slate-500"}),e.pronounceLimitTitle||"Daily limit reached"]}),(0,t.jsx)("p",{className:"text-xs leading-snug text-slate-600",children:(e.pronounceLimitBody||"You've used all {limit} pronunciation scores for today.").replace("{limit}",String(m.limit))}),r&&(0,t.jsx)("p",{className:"text-[11px] text-slate-500",children:(e.pronounceLimitReset||"Comes back at {reset}.").replace("{reset}",r)})]})}return(0,t.jsxs)("div",{className:"mt-4 space-y-1.5 rounded-2xl border border-amber-300 bg-amber-50 p-3 text-left",children:[(0,t.jsxs)("p",{className:"flex items-center gap-1.5 text-sm font-bold text-slate-900",children:[(0,t.jsx)(s.Lock,{size:14,className:"shrink-0 text-amber-500"}),e.pronounceQuotaTitle||"Out of free pronunciation scores"]}),(0,t.jsx)("p",{className:"text-xs leading-snug text-slate-600",children:e.pronounceQuotaBody||"Upgrade to Premium to keep scoring every word sound by sound."}),f&&(0,t.jsx)("p",{className:"text-[11px] text-slate-500",children:f}),(0,t.jsxs)("button",{type:"button",onClick:()=>d(!0),className:"inline-flex items-center gap-1.5 rounded-full bg-amber-500 px-3 py-1.5 text-xs font-bold text-white transition-colors hover:bg-amber-600",children:[(0,t.jsx)(a.Crown,{size:12,className:"shrink-0"}),e.pronounceQuotaCta||"Upgrade"]}),(0,t.jsx)(l.default,{open:u,onClose:()=>d(!1),dict:p??void 0,upgradeSource:"vocab_pronounce",message:e.pronounceQuotaBody||"Upgrade to Premium to keep scoring every word sound by sound.",note:f})]})}e.s(["default",()=>u],826974);var d=e.i(643531),p=e.i(37727),m=e.i(239600);let f={good:"text-emerald-600",warn:"text-amber-600",bad:"text-rose-600"},h={good:"border-emerald-200 bg-emerald-50 text-emerald-700",warn:"border-amber-200 bg-amber-50 text-amber-700",bad:"border-rose-200 bg-rose-50 text-rose-700"};function x(e){return"Omission"!==e.errorType&&(e.phonemes?.length??0)>0}function w({attempt:e,bestScore:r,dict:n}){let a=e.score??0,s=(0,m.phonemeBand)(a),l=(e.words??[]).filter(x),o=l.length>1;return(0,t.jsxs)("div",{className:"mt-5",children:[(0,t.jsx)("p",{className:"text-[11px] font-bold uppercase tracking-wider text-slate-500",children:n.pronounceScoreLabel||"Your score"}),(0,t.jsx)("p",{className:`text-5xl font-extrabold leading-tight ${f[s]}`,children:Math.round(a)}),(0,t.jsxs)("div",{className:`inline-flex items-center gap-2 rounded-2xl border px-4 py-2 text-sm font-bold ${e.passed?"border-emerald-300 bg-emerald-50 text-emerald-700":"border-rose-300 bg-rose-50 text-rose-700"}
1`,children:[e.passed?(0,t.jsx)(d.Check,{size:16}):(0,t.jsx)(p.X,{size:16}),e.passed?n.pronouncePassed||"Sounds right!":n.pronounceMissed||"Not quite"]}),null!=r&&r>a&&(0,t.jsx)("p",{className:"mt-2 text-sm font-semibold text-emerald-700",children:(n.pronounceBestScore||"Best so far: {score}").replace("{score}",String(Math.round(r)))}),l.length>0&&(0,t.jsxs)("div",{className:"mt-4",children:[(0,t.jsx)("p",{className:"text-[11px] font-bold uppercase tracking-wider text-slate-500",children:n.pronouncePhonemes||"Sound by sound"}),(0,t.jsx)("div",{className:"mt-2 flex flex-col items-center gap-2",children:l.map((e,r)=>(0,t.jsxs)("div",{className:"flex flex-col items-center gap-1",children:[o&&(0,t.jsx)("span",{className:"text-xs font-bold text-slate-500",children:e.word}),(0,t.jsx)("div",{className:"flex flex-wrap justify-center gap-1.5",children:(e.phonemes??[]).map((e,r)=>(0,t.jsxs)("span",{className:`inline-flex items-baseline gap-1 rounded-lg border px-2 py-1 ${h[(0,m.phonemeBand)(e.accuracyScore)]}`,children:[(0,t.jsx)("span",{className:"font-mono text-sm font-bold",children:e.phoneme}),(0,t.jsx)("span",{className:"text-[10px] font-bold tabular-nums",children:Math.round(e.accuracyScore)})]},r))})]},`${e.word}-${r}`))})]})]})}e.s(["default",()=>w],764270)}]);

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.