PageSourceSearch

https://shadowingenglish.com/_next/static/chunks/9772585a925c8c05.js

js shadowingenglish.com collected 2026-10-02 00:55:46 UTC 29,082 bytes, 1 lines download raw bytes

1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,107233,e=>{"use strict";let t=(0,e.i(475254).default)("plus",[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"M12 5v14",key:"s699le"}]]);e.s(["Plus",()=>t],107233)},266534,e=>{"use strict";var t=e.i(843476),r=e.i(271645);let n={wiktionary:{label:"Wiktionary",licence:"CC BY-SA 3.0",href:"https://en.wiktionary.org/"},cedict:{label:"CC-CEDICT",licence:"CC BY-SA 4.0",href:"https://www.mdbg.net/chinese/dictionary?page=cedict"},tatoeba:{label:"Tatoeba",licence:"CC BY 2.0 FR",href:"https://tatoeba.org/"}};function a({sources:e=["wiktionary"],className:a=""}){let s=Array.from(new Set(e));return 0===s.length?null:(0,t.jsx)("div",{className:`pt-3 text-[10px] leading-relaxed text-txt-muted ${a}`,children:s.map((e,a)=>{let s=n[e];return(0,t.jsxs)(r.default.Fragment,{children:[a>0&&(0,t.jsx)("span",{className:"opacity-60",children:" · "}),(0,t.jsx)("a",{href:s.href,target:"_blank",rel:"noopener noreferrer",className:"hover:text-txt-secondary underline decoration-dotted underline-offset-2",children:s.label})," ",(0,t.jsx)("span",{className:"opacity-80",children:s.licence})]},e)})})}e.s(["default",()=>a])},470431,931381,512475,e=>{"use strict";var t=e.i(843476),r=e.i(271645),n=e.i(618566),a=e.i(277149),s=e.i(830058),l=e.i(375679);let i="word-highlight-active",o="word-highlight-indicator-visible",d=r.default.memo(function({containerRef:e,indicatorRef:t,rawWords:n,getCurrentTime:a,subDelay:s,playing:l,sentenceStart:d=null,sentenceDuration:c=null}){let u=(0,r.useRef)(-1),x=()=>{let e=t?.current;e&&e.classList.remove(o)},p=()=>{let t=e.current;if(!t)return;let r=t.querySelector(`.${i}`);r&&r.classList.remove(i),x(),u.current=-1};return(0,r.useEffect)(()=>{if(!l||!a)return void p();let r=e.current;if(!r)return;let m=r.querySelectorAll("[data-word-idx]").length;if(0===m)return void p();let h=!!n&&n.length>0,f=h&&n.length===m,b=!f&&h&&"number"==typeof d&&"number"==typeof c&&c>0;if(!f&&!b)return void p();let g=!1,y=-1,v=0,w=async()=>{if(!g)try{let r=await a();if(g||"number"!=typeof r||Number.isNaN(r))return;let l=r-s,p=-1;if(f){for(l<y-.05&&(v=0),y=l;v<n.length&&n[v].end<=l;)v++;if(v<n.length){let e=n[v];l>=e.start-.02&&(p=v)}}else{let e=(l-d)/c;e>=0&&e<=1.05&&(p=Math.min(m-1,Math.max(0,Math.floor(e*m))))}(r=>{let n=e.current;if(!n||r===u.current)return;let a=n.querySelector(`.${i}`);if(a&&a.classList.remove(i),r>=0){let a=n.querySelector(`[data-word-idx="${r}"]`);a?(a.classList.add(i),(r=>{let n=e.current,a=t?.current;if(!n||!a)return;let s=r.querySelector(".word-highlight-target")??r,l=n.getBoundingClientRect(),i=s.getBoundingClientRect(),d=i.left-l.left+n.scrollLeft-6,c=i.top-l.top+n.scrollTop-3;a.style.transform=`translate(${d}px, ${c}px)`,a.style.width=`${i.width+12}px`,a.style.height=`${i.height+6}px`,a.classList.add(o)})(a)):x()}else x();u.current=r})(p)}catch{}};w();let j=window.setInterval(w,80);return()=>{g=!0,window.clearInterval(j),p()}},[l,n,a,s,d,c]),null});var c=e.i(976078),u=e.i(200965),x=e.i(759426);function p(e){return e.replace(/^[^A-Za-z']+|[^A-Za-z']+$/g,"").toLowerCase()}let m="aeiou";function h(e,t){let r=Array(e.length).fill(null);if(0===e.length||0===t.length)return r;let n=e.map(p);for(let{raw:e,parts:a}of t.map(e=>({raw:e,parts:e.toLowerCase().trim().split(/\s+/).filter(Boolean)})).filter(e=>e.parts.length>0).sort((e,t)=>t.parts.length-e.parts.length)){let t=a.map(e=>new Set(function(e){let t=e.toLowerCase().trim();if(!t)return[];let r=new Set([t]),n=t[t.length-1],a=t[t.length-2]??"";if("y"===n&&a&&!m.includes(a)){let e=t.slice(0,-1);r.add(`${e}ies`),r.add(`${e}ied`),r.add(`${e}ier`),r.add(`${e}iest`),r.add(`${t}ing`)}else"e"===n?(r.add(`${t}s`),r.add(`${t}d`),r.add(`${t}r`),r.add(`${t}st`),r.add(`${t.slice(0,-1)}ing`)):(r.add(`${t}s`),r.add(`${t}es`),r.add(`${t}ed`),r.add(`${t}ing`),r.add(`${t}er`),r.add(`${t}est`),t.length>=3&&!m.includes(n)&&"w"!==n&&"x"!==n&&"y"!==n&&m.includes(a)&&!m.includes(t[t.length-3]??"")&&(r.add(`${t}${n}ed`),r.add(`${t}${n}ing`)));return Array.from(r)}(e)));for(let s=0;s+a.length<=n.length;s++){let l=!0;for(let e=0;e<a.length;e++){let r=n[s+e];if(!r||!t[e].has(r)){l=!1;break}}if(l&&!a.some((e,t)=>null!==r[s+t]))for(let t=0;t<a.length;t++)r[s+t]=e}}return r}function f(e){return e.split(/\n\s*\n+/).map(e=>
1e.trim()).filter(Boolean).map(e=>e.split(/\s+/).filter(Boolean))}e.s(["matchTargetWords",()=>h,"paragraphsOf",()=>f],931381);var b=e.i(499989);let g="dict_mode",y="dict-mode-change",v="en-en";function w(e){return"en-en"===e||"en-native"===e}function j(){try{let e=localStorage.getItem(g);if(w(e))return e}catch{}return v}function k(e){let t=t=>{(t.key===g||null===t.key)&&e()};return window.addEventListener(y,e),window.addEventListener("storage",t),()=>{window.removeEventListener(y,e),window.removeEventListener("storage",t)}}function N(){return v}function C({loading:e,entry:r,translation:n,word:a,scroll:s=!0}){return e?(0,t.jsx)("div",{className:"text-sm text-txt-muted animate-pulse py-2",children:"..."}):r&&r.entries.length>0?(0,t.jsxs)("div",{className:s?"max-h-[250px] sm:max-h-[350px] overflow-y-auto pr-2 space-y-4 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-track]:bg-transparent [&::-webkit-scrollbar-thumb]:bg-txt-muted/30 hover:[&::-webkit-scrollbar-thumb]:bg-txt-muted/50 [&::-webkit-scrollbar-thumb]:rounded-full":"space-y-4",children:[r.lemma!==a&&(0,t.jsxs)("div",{className:"text-xs text-txt-muted -mb-2",children:[a," ",(0,t.jsx)("span",{className:"opacity-70",children:"→"})," ",(0,t.jsx)("span",{className:"font-semibold text-txt-secondary",children:r.lemma})]}),r.entries.map((e,r)=>(0,t.jsxs)("div",{className:"space-y-2",children:[(0,t.jsx)("div",{className:"text-[10px] font-bold text-violet-600 bg-violet-500/15 border border-violet-500/30 px-1.5 py-0.5 rounded italic inline-block",children:e.posLabel}),e.senses.map((e,r)=>(0,t.jsxs)("div",{className:"text-base border-b border-border pb-2.5 last:border-0",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,t.jsxs)("span",{className:"text-accent-primary text-[13px] font-bold mt-0.5 shrink-0",children:[r+1,"."]}),(0,t.jsx)("span",{className:"text-txt-primary text-[15px] leading-relaxed font-medium",children:e.definition})]}),e.examples.length>0&&(0,t.jsx)("div",{className:"mt-2 space-y-1.5",children:e.examples.map((e,r)=>(0,t.jsxs)("div",{className:"text-[14px] pl-4 border-l-2 border-border flex flex-col py-0.5",children:[(0,t.jsx)("span",{className:"text-txt-secondary italic",children:e.text}),e.translation&&(0,t.jsx)("span",{className:"text-txt-muted text-[13px] mt-0.5",children:e.translation})]},r))})]},r))]},r))]}):n?.translation?(0,t.jsxs)("div",{className:"py-2",children:[(0,t.jsx)("div",{className:"text-xl font-bold text-txt-primary",children:n.translation}),n.alternatives.length>0&&(0,t.jsxs)("div",{className:"space-y-1 mt-3",children:[(0,t.jsx)("span",{className:"text-xs text-txt-muted uppercase tracking-wider font-semibold",children:"Also:"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-1 mt-1",children:n.alternatives.map((e,r)=>(0,t.jsx)("span",{className:"text-sm bg-glass border border-border px-2 py-0.5 rounded-full text-txt-secondary",children:e},r))})]})]}):(0,t.jsx)("div",{className:"text-sm text-txt-muted italic py-2",children:"Translation not available"})}var S=e.i(174080),$=e.i(37727),L=e.i(266534);function E({variant:e,panelRef:n,onClose:a,closeLabel:s,word:l,footer:i,creditSources:o,children:d}){(0,r.useEffect)(()=>{let e=e=>{"Escape"===e.key&&a()};return window.addEventListener("keydown",e),()=>window.removeEventListener("keydown",e)},[a]),(0,r.useEffect)(()=>{let e=document.body.style.overflow;return document.body.style.overflow="hidden",()=>{document.body.style.overflow=e}},[]);let c=e=>(0,t.jsx)("button",{type:"button",onClick:e=>{e.stopPropagation(),a()},"aria-label":s,title:s,className:e,children:(0,t.jsx)($.X,{size:16,strokeWidth:2.5})}),u=(0,t.jsxs)("div",{className:"min-h-0 flex-1 overflow-y-auto overscroll-contain px-4 pb-4 pt-1 text-left",style:{WebkitOverflowScrolling:"touch"},children:[d,(0,t.jsx)(L.default,{sources:o})]}),x=i?(0,t.jsx)("div",{className:"shrink-0 border-t border-border px-4 pt-3 pb-[calc(0.75rem+env(safe-area-inset-bottom))]",children:i}):null,p=(0,t.jsx)("div",{className:"fixed inset-0 z-[99998] bg-black/45 animate-fadeIn",onClick:a,"aria-hidden":"true"});return"sheet"===e?(0,S.createPortal)((0,t.jsxs)(t.Fragment,{children:[p,(0,t.jsxs)("div",{ref:n,role:"dialog","aria-modal":"true","aria-label":l,className:"fixed inset-x-0 bottom-0 z-[99999] flex max-h-[82vh] flex-col rounded-t-[22px] border-2 border-b-0 border-[color:var(--mo-line)] bg-card text-txt-primary shadow-[var(--mo-card-shadow)] animate-sheetUp",children:[(0,t.jsxs)("div",{className:"relative flex h-11 shrink-0 items-start justify-center pt-2.5",children:[(0,t.jsx)("div",{className:"h-1 w-10 rounded-full bg-txt-muted/40"}),c("absolute right-3 top-1 flex h-8 w-8 items-center justify-center rounded-full text-txt-muted transition-colors hover:bg-glass-hover hover:text-txt-primary")]}),u,x]})]}),document.body):(0,S.createPortal)((0,t.jsxs)(t.Fragment,{children:[p,(0,t.jsxs)("div",{ref:n,role:"dialog","aria-modal":"true","aria-label":l,className:"fixed left-1/2 top-1/2 z-[99999] flex max-h-[82vh] w-[min(440px,calc(100vw-2rem))] -translate-x-1/2 -translate-y-1/2 flex-col rounded-[22px] border-2 border-[color:var(--mo-line)] bg-card text-txt-primary shadow-2xl animate-popIn",children:[(0,t.jsx)("div",{className:"relative flex h-10 shrink-0 items-center justify-end pr-2",children:c("flex h-8 w-8 items-center justify-center rounded-full text-txt-muted transition-colors hover:bg-glass-hover hover:text-txt-primary")}),u,x]})]}),document.body)}var A=e.i(522016),P=e.i(475254);let T=(0,P.default)("bookmark-minus",[["path",{d:"M15 10H9",key:"o6yqo3"}],["path",{d:"M17 3a2 2 0 0 1 2 2v15a1 1 0 0 1-1.496.868l-4.512-2.578a2 2 0 0 0-1.984 0l-4.512 2.578A1 1 0 0 1 5 20V5a2 2 0 0 1 2-2z",key:"oz39mx"}]]),B=(0,P.default)("dumbbell",[["path",{d:"M17.596 12.768a2 2 0 1 0 2.829-2.829l-1.768-1.767a2 2 0 0 0 2.828-2.829l-2.828-2.828a2 2 0 0 0-2.829 2.828l-1.767-1.768a2 2 0 1 0-2.829 2.829z",key:"9m4mmf"}],["path",{d:"m2.5 21.5 1.4-1.4",key:"17g3f0"}],["path",{d:"m20.1 3.9 1.4-1.4",key:"1qn309"}],["path",{d:"M5.343 21.485a2 2 0 1 0 2.829-2.828l1.767 1.768a2 2 0 1 0 2.829-2.829l-6.364-6.364a2 2 0 1 0-2.829 2.829l1.768 1.767a2 2 0 0 0-2.828 2.829z",key:"1t2c92"}
1],["path",{d:"m9.6 14.4 4.8-4.8",key:"6umqxw"}]]);e.s(["Dumbbell",()=>B],512475);var R=e.i(107233);let M="mo-btn inline-flex items-center justify-center gap-2 h-11 px-5 text-[14px] focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed";function U({saved:e,busy:r,onToggleSave:n,practiceHref:a,onPractice:s,labels:l}){return e?(0,t.jsxs)("div",{className:"flex items-center gap-2",children:[(0,t.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),n()},disabled:r,className:"mo-tile inline-flex items-center justify-center gap-2 h-11 px-4 text-[13px] text-txt-secondary focus:outline-none disabled:opacity-50 disabled:cursor-not-allowed flex-1",children:[(0,t.jsx)(T,{size:16}),l.remove]}),(0,t.jsxs)(A.default,{href:a,onClick:()=>s?.(),className:`${M} flex-1`,children:[(0,t.jsx)(B,{size:16}),l.practice]})]}):(0,t.jsxs)("button",{type:"button",onClick:e=>{e.stopPropagation(),n()},disabled:r,className:`${M} w-full`,children:[(0,t.jsx)(R.Plus,{size:16}),l.add]})}let z={top1k:"TOP 1K",top2k:"TOP 2K",top5k:"TOP 5K",top10k:"TOP 10K",top20k:"TOP 20K",top50k:"TOP 50K"},I=u.TRANSLATE_LANG_LABELS,O=Object.keys(I),q={},W={},F={};function K({text:e,className:i,showIpa:o=!0,accent:u="en-US",rawWords:p=null,getCurrentTime:m=null,subDelay:f=0,audioPlaying:v=!1,sentenceStart:S=null,sentenceDuration:$=null,onWordClick:L,prosody:A=null,highlightTargets:P=null}){let[T,B]=(0,r.useState)(null),[R,M]=(0,r.useState)(!1),[K,D]=(0,r.useState)([]),[Z,_]=(0,r.useState)(new Set),H=(0,r.useRef)(new Set),[Y,G]=(0,r.useState)(null),[J,V]=(0,r.useState)(!1),{mode:X,setMode:Q}={mode:(0,r.useSyncExternalStore)(k,j,N),setMode:(0,r.useCallback)(e=>{if(w(e)){try{localStorage.setItem(g,e)}catch{}window.dispatchEvent(new CustomEvent(y,{detail:e}))}},[])},[ee,et]=(0,r.useState)(null),[er,en]=(0,r.useState)(null),[ea,es]=(0,r.useState)(!1),{lang:el,setLang:ei}=(0,b.useTranslateLang)(),[eo,ed]=(0,r.useState)(!1),ec=(0,r.useRef)(null),eu=(0,r.useRef)(null),ex=(0,r.useRef)(null),[ep,em]=(0,r.useState)(!1),[eh,ef]=(0,r.useState)(!1),eb=(0,r.useRef)(null),eg=(0,r.useRef)(null);(0,r.useEffect)(()=>{em(!0)},[]),(0,r.useEffect)(()=>{if("function"!=typeof window.matchMedia)return;let e=window.matchMedia("(max-width: 639px)"),t=()=>ef(e.matches);return t(),e.addEventListener("change",t),()=>e.removeEventListener("change",t)},[]);let ey=(0,a.useDictionary)(),{user:ev}=(0,s.useAuth)(),ew=(0,n.usePathname)(),ej=ew?.split("/")[1]||"en",ek=O.includes(ej)?ej:null,eN=el||ek||"vi",eC=I[eN]||eN.toUpperCase(),eS=!!T?.senses&&T.senses.length>0,e$=!!T&&!T.loading&&("en-native"===X||!eS),eL=ey?.wordLookup??{},eE=eL.close||"Close",eA={add:eL.add||"Add to vocabulary",remove:eL.remove||"Remove",practice:eL.practice||"Practice"},eP=(0,r.useCallback)(()=>B(null),[]),eT=(0,x.isLocale)(ej)?ej:"en",eB=`${"en"===eT?"":`/${eT}`}/training/vocabulary`;(0,r.useEffect)(()=>{if(!e$||!T){en(null),et(null),es(!1);return}let e=`${T.word}:${eN}`,t=F[e],r=W[e];if(t){en(t),et(null),es(!1);return}if(null===t&&r){en(null),et(r),es(!1);return}let n=!1;return es(!0),(async()=>{try{let r=t;if(void 0===r){let t=await fetch(`/api/dictionary/native?word=${encodeURIComponent(T.word)}&lang=${eN}`);r=t.ok?await t.json():null,F[e]=r}if(n)return;if(en(r),r)return void et(null);let a=W[e];if(a)return void et(a);let s=await fetch(`/api/translate?word=${encodeURIComponent(T.word)}&lang=${eN}`),l=await s.json(),i={translation:l.translation||null,alternatives:l.alternatives||[]};W[e]=i,n||et(i)}catch{n||et(null)}finally{n||es(!1)}})(),()=>{n=!0}},[T?.word,eN,e$]),(0,r.useEffect)(()=>{_(new Set),H.current=new Set},[ev]);let eR=(0,r.useCallback)(async e=>{if(ev&&!H.current.has(e)){H.current.add(e);try{let t=await fetch("/api/vocabulary/check",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({words:[e]})});if(!t.ok)return;let r=await t.json(),n=r?.statuses?.[e]?.saved===!0;_(t=>{let r=t.has(e);if(n&&!r)return new Set([...t,e]);if(!n&&r){let r=new Set(t);return r.delete(e),r}return t})}catch{}}},[ev]),eM=e=>{G(e),eg.current&&clearTimeout(eg.current),eg.current=setTimeout(()=>G(null),2500)},eU=async(e,t,r)=>{if(!ev)return void eM("⚠️ Please login to save words");if(J)return;V(!0);let n=r?.meanings||[];r?.senses&&r.senses.length>0&&(n=[{partOfSpeech:"word",definitions:r.senses.map(e=>e.definition).slice(0,3)}]);try{let a=await fetch("/api/vocabulary",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({word:e,ipa:r?.ipa||t,base:r?.base,audioUrl:r?.audioUrl,meanings:n,phonetics:r?.phonetics,senses:r?.senses})}),s=await a.json();H.current.add(e),s.saved?(_(t=>new Set([...t,e])),eM(`⭐ "${e}" added to your vocabulary`)):(_(t=>{let r=new Set(t);return r.delete(e),r}),eM(`"${e}" removed from your vocabulary`))}catch{eM("❌ Failed to save word")}finally{V(!1)}};(0,r.useEffect)(()=>
1{if(!o)return void D([]);let t=e.trim();if(!t)return void D([]);let r=!1;return(0,c.fetchSentenceIpa)(t,u).then(e=>{r||D(e.ipa)}).catch(e=>{r||(console.error("Failed to fetch sentence IPAs",e),D(t.split(/\s+/).map(e=>{let t=e.replace(/[^a-zA-Z'-]/g,"").toLowerCase();return t?(0,c.getCachedIpa)(t,u)??null:null})))}),()=>{r=!0}},[e,o,u]),(0,r.useEffect)(()=>{let e=e=>{let t=e.target,r=!!ec.current&&ec.current.contains(t),n=!!ex.current&&ex.current.contains(t);r||n||B(null)};return document.addEventListener("mousedown",e),()=>document.removeEventListener("mousedown",e)},[]),(0,r.useEffect)(()=>()=>{eb.current&&(eb.current.pause(),eb.current=null)},[]);let ez=async(e,t)=>{e.stopPropagation();let r=t.replace(/[^a-zA-Z'-]/g,"").toLowerCase();if(r){if(L?.(),B({word:r,ipa:null,loading:!0}),eR(r),r in q){let e=q[r];B({...e,loading:!1}),eI(r,e.audioUrl);return}try{let e=await fetch(`/api/dictionary/oxford?word=${encodeURIComponent(r)}`);if(!e.ok)throw Error("Word not found");let t=await e.json(),n=t.phonetics?.find(e=>"BrE"===e.type)?.audioUrl,a=t.phonetics?.find(e=>"NAmE"===e.type)?.audioUrl||n||null,s=t.phonetics?.find(e=>"BrE"===e.type)?.ipa,i=t.phonetics?.find(e=>"NAmE"===e.type)?.ipa||s||null,o={word:r,base:t.headword||r,ipa:i,audioUrl:a,phonetics:t.phonetics||[],senses:t.senses||[],frequencyBand:t.frequencyBand,usageExamples:t.usageExamples||[],loading:!1};q[r]=o,B(o),eI(r,a),i&&(0,l.trackIpaLookup)(r)}catch{B({word:r,ipa:null,loading:!1})}}},eI=(0,r.useCallback)((e,t)=>{if(!R){if(M(!0),t){eb.current&&(eb.current.pause(),eb.current=null),window.speechSynthesis.cancel();let r=new Audio(t);eb.current=r,r.onended=()=>{M(!1),eb.current=null},r.onerror=()=>{eb.current=null,eO(e)},r.play().catch(()=>{eb.current=null,eO(e)});return}eO(e)}},[R]),eO=(0,r.useCallback)(e=>{window.speechSynthesis.cancel();let t=new SpeechSynthesisUtterance(e);t.lang="en-US",t.rate=.9;let r=window.speechSynthesis.getVoices().find(e=>e.lang.startsWith("en")&&(e.name.includes("Samantha")||e.name.includes("Google")||e.name.includes("Premium")||e.name.includes("Natural")));r&&(t.voice=r),t.onend=()=>M(!1),t.onerror=()=>M(!1),window.speechSynthesis.speak(t)},[]),eq=e.split(/(\s+)/),eW=-1,eF=(0,r.useMemo)(()=>P&&0!==P.length?h(e.split(/(\s+)/).filter(e=>!/^\s+$/.test(e)),P):null,[e,P]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{dir:"ltr",className:i,ref:ec,style:{position:"relative"},children:[(0,t.jsx)("span",{ref:eu,"aria-hidden":"true",className:"word-highlight-indicator"}),eq.map((e,n)=>{if(/^\s+$/.test(e))return(0,t.jsx)("span",{children:e},n);e.replace(/[^a-zA-Z'-]/g,"").toLowerCase();let a=eW+=1,s=o?K[a]:null,l=A?.[a],i=!!eF?.[a],d=l?.stress===2?"underline decoration-red-500 decoration-[3px] underline-offset-[4px]":l?.stress===1?"underline decoration-amber-400 decoration-2 underline-offset-[4px]":l?.isReduced?"underline decoration-sky-400 decoration-dotted decoration-2 underline-offset-[4px]":"",c=l?`${l.pos} \xb7 ${Math.round((l.end-l.start)*1e3)}ms \xb7 ${l.syllables} syl${l.isReduced?" · reduced":""}`:void 0,u=l&&l.pauseAfter>0?(0,t.jsx)("span",{"aria-hidden":"true",className:3===l.pauseAfter?"inline-block mx-1 text-red-500 font-bold select-none":2===l.pauseAfter?"inline-block mx-0.5 text-[var(--text-primary)] font-semibold select-none":"inline-block mx-0.5 text-[var(--text-muted)] select-none",title:3===l.pauseAfter?"Sentence break":2===l.pauseAfter?"Clause break":"Chunk break",children:3===l.pauseAfter?"‖":2===l.pauseAfter?"|":"·"},`pause-${n}`):null;return(0,t.jsxs)(r.default.Fragment,{children:[(0,t.jsxs)("span",{"data-word-idx":a,className:"ipa-word inline-flex flex-col items-center justify-start align-top relative group pb-1",onClick:t=>ez(t,e),style:{verticalAlign:"top"},title:c,children:[(0,t.jsx)("span",{className:`block leading-none word-highlight-target ${d} ${i?"font-semibold text-accent-primary bg-accent-primary/10 rounded px-0.5":""}`,children:e}),!!s&&(0,t.jsx)("span",{className:"block text-[55%] text-txt-primary/50 font-normal leading-none pointer-events-none text-center whitespace-nowrap",style:{marginTop:"0.75em"},children:s})]}),u]},n)}),(0,t.jsx)(d,{containerRef:ec,indicatorRef:eu,rawWords:p,getCurrentTime:m,subDelay:f,playing:v,sentenceStart:S,sentenceDuration:$}),T&&ep&&(0,t.jsx)(E,{variant:eh?"sheet":"modal",panelRef:ex,onClose:eP,closeLabel:eE,word:T.word,creditSources:["wiktionary",...T.usageExamples&&T.usageExamples.length>0?["tatoeba"]:[],...er?.sources?.includes("cedict")?["cedict"]:[]],footer:!T.loading&&(eS||T.ipa)?(0,t.jsx)(U,{saved:Z.has(T.word),busy:J,onToggleSave:()=>eU(T.word,T.ipa||null,T),practiceHref:eB,onPractice:eP,labels:eA}):null,children:(0,t.jsx)(t.Fragment,{children:T.loading?(0,t.jsx)("span",{className:"ipa-loading",children:"..."}):T.senses&&T.senses.length>0?(0,t.jsxs)("div",{className:"flex flex-col gap-3 w-full",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-3 mb-1 border-b border-border pb-3 flex-wrap",children:[(0,t.jsx)("span",{className:"font-extrabold text-2xl text-txt-primary tracking-tight",children:T.word}),T.frequencyBand&&z[T.frequencyBand]&&(0,t.jsx)("span",{className:"text-[10px] font-bold tracking-wide text-accent-primary bg-accent-primary/10 border border-accent-primary/30 px-1.5 py-0.5 rounded",title:"How common this word 
1is in spoken English",children:z[T.frequencyBand]}),(0,t.jsx)("div",{className:"flex flex-col gap-1 ml-1",children:T.phonetics?.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-center gap-2 cursor-pointer hover:bg-glass-hover px-1.5 py-0.5 rounded transition-colors",onClick:t=>{t.stopPropagation(),eI(T.word,e.audioUrl)},children:[(0,t.jsx)("span",{className:"text-[11px] font-bold text-txt-muted tracking-wider uppercase",children:e.type}),(0,t.jsx)("span",{className:"text-txt-secondary text-base font-medium",children:e.ipa})]},r))}),(0,t.jsx)("div",{className:"ml-auto flex items-center gap-1 shrink-0",children:(0,t.jsx)("button",{className:`p-1 rounded-full hover:bg-glass-hover transition-colors ${R?"text-accent-primary":"text-txt-muted hover:text-accent-primary"}`,onClick:e=>{e.stopPropagation(),eI(T.word,T.audioUrl)},title:"Listen to pronunciation","aria-label":"Listen to pronunciation",children:R?(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"currentColor",children:[(0,t.jsx)("circle",{cx:"6",cy:"12",r:"2",children:(0,t.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"0.6s",repeatCount:"indefinite"})}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"2",children:(0,t.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"0.6s",begin:"0.2s",repeatCount:"indefinite"})}),(0,t.jsx)("circle",{cx:"18",cy:"12",r:"2",children:(0,t.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"0.6s",begin:"0.4s",repeatCount:"indefinite"})})]}):(0,t.jsxs)("svg",{width:"20",height:"20",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",fill:"currentColor"}),(0,t.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07"}),(0,t.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14"})]})})})]}),(0,t.jsxs)("div",{className:"flex rounded-md border border-border overflow-hidden",onClick:e=>e.stopPropagation(),children:[(0,t.jsx)("button",{className:`flex-1 text-xs font-semibold py-1.5 px-3 transition-colors ${"en-en"===X?"bg-glass-hover text-accent-primary":"bg-transparent text-txt-muted hover:text-txt-primary"}`,onClick:()=>{Q("en-en"),ed(!1)},children:"EN → EN"}),(0,t.jsxs)("button",{className:`flex-1 text-xs font-semibold py-1.5 px-3 border-l border-border transition-colors ${"en-native"===X?"bg-glass-hover text-accent-primary":"bg-transparent text-txt-muted hover:text-txt-primary"}`,onClick:()=>{Q("en-native"),ed(!1)},children:["EN → ",eC]}),(0,t.jsx)("button",{className:`px-1.5 border-l border-border transition-colors ${eo?"bg-glass-hover text-accent-primary":"bg-transparent text-txt-muted hover:text-txt-primary"}`,onClick:e=>{e.stopPropagation(),ed(!eo)},title:"Choose language","aria-label":"Choose language",children:(0,t.jsx)("svg",{width:"10",height:"10",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"3",strokeLinecap:"round",strokeLinejoin:"round",children:(0,t.jsx)("path",{d:eo?"M6 15l6-6 6 6":"M6 9l6 6 6-6"})})})]}),eo&&(0,t.jsx)("div",{className:"bg-card border border-border rounded-lg shadow-lg max-h-[200px] overflow-y-auto mb-2 [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-txt-muted/30 [&::-webkit-scrollbar-thumb]:rounded-full",onClick:e=>e.stopPropagation(),children:Object.entries(I).map(([e,r])=>(0,t.jsx)("button",{className:`w-full text-left px-4 py-2 text-[13px] transition-colors hover:bg-glass-hover block ${eN===e?"text-accent-primary font-bold bg-glass":"text-txt-secondary"}`,onClick:()=>{ei(e),Q("en-native"),ed(!1)},children:r},e))}),"en-native"===X?(0,t.jsx)(C,{loading:ea,entry:er,translation:ee,word:T.word,scroll:!1}):(0,t.jsxs)("div",{className:"space-y-4",children:[T.senses?.map((e,r)=>(0,t.jsxs)("div",{className:"text-base border-b border-border pb-3 last:border-0",children:[(0,t.jsxs)("div",{className:"flex items-start gap-1.5",children:[(0,t.jsxs)("span",{className:"text-accent-primary text-[13px] font-bold mt-0.5 shrink-0",children:[r+1,"."]}),e.pos&&(0,t.jsx)("span",{className:"mt-0.5 shrink-0 text-[10px] font-bold text-violet-600 bg-violet-500/15 border border-violet-500/30 px-1.5 py-0.5 rounded italic",children:e.pos}),(0,t.jsx)("span",{className:"text-txt-primary text-[15px] leading-relaxed font-medium",children:e.definition}),e.cefr&&(0,t.jsx)("span",{className:"ml-2 mt-0.5 inline-flex items-center justify-center bg-glass border border-border text-txt-secondary text-[10px] font-bold px-1.5 py-0.5 rounded shrink-0 uppercase tracking-wide",children:e.cefr})]}),e.examples&&e.examples.length>0&&(0,t.jsx)("div",{className:"mt-2 space-y-1.5",children:e.examples.slice(0,3).map((e,r)=>(0,t.jsxs)("div",{className:"text-[14px] text-txt-secondary italic pl-4 border-l-2 border-border flex flex-col py-0.5",children:[e.pattern&&(0,t.jsx)("span",{className:"font-semibold text-txt-muted text-[11px] not-italic tracking-wide",children:e.pattern}),(0,t.jsx)("span",{className:"mt-0.5",children:e.text})]},r))}),e.synonyms&&e.synonyms.length>0&&(0,t.jsxs)("div",{className:"mt-2.5 pl-4 text-xs text-txt-muted flex items-center gap-1.5 flex-wrap",children:[(0,t.jsx)("span",{className:"font-bold text-txt-muted uppercase tracking-widest text-[10px]",children:"Syn"}),(0,t.jsx)("span",{className:"text-[13px] text-txt-secondary",children:e.synonyms.join(", ")})]})]},r)),T.usageExamples&&T.usageExamples.length>0&&(0,t.jsxs)("div",{className:"pt-1",children:[(0,t.jsx)("div",{className:"text-[10px] font-bold uppercase tracking-widest text-txt-muted mb-1.5",children:ey?.wordLookup?.usageExamples||"In use"}),(0,t.jsx)("div",{className:"space-y-1.5",children:T.usageExamples.map((e,r)=>(0,t.jsxs)("div",{className:"flex items-start gap-2",children:[e.audioUrl&&(0,t.jsx)("button",{type:"button",onClick:t=>{t.stopPropagation(),eI(e.text,e.audioUrl)},className:"mt-0.5 shrink-0 text-txt-muted hover:text-accent-primary transition-colors","aria-label":"Play example sentence",title:e.audioAuthor?`Tatoeba \xb7 ${e.audioAuthor}`:"Tatoeba",children:(0,t.jsxs)("svg",{width:"13",height:"13",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",fill:"currentColor"}),(0,t.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07"})]})}),(0,t.jsx)("span",{className:"text-[14px] text-txt-secondary leading-relaxed",children:e.text})]},r))})]})]})]}):T.ipa?(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)("span",{className:"ipa-word-label",children:[T.word,T.base&&T.base!==T.word&&(0,t.jsxs)("span",{style:{opacity:.6},children:[" → ",T.base]})]}),(0,t.jsxs)("span",{className:"ipa-phonetic-row",children:[(0,t.jsx)("span",{className:"ipa-phonetic",children:T.ipa}),(0,t.jsx)("button",{className:`ipa-speak-btn${R?" playing":""}`,onClick:e=>{e.stopPropagation(),eI(T.word,T.audioUrl)},title:"Listen to pronunciation","aria-label":"Listen to pronunciation",children:R?(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"
1currentColor",children:[(0,t.jsx)("circle",{cx:"6",cy:"12",r:"2",children:(0,t.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"0.6s",repeatCount:"indefinite"})}),(0,t.jsx)("circle",{cx:"12",cy:"12",r:"2",children:(0,t.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"0.6s",begin:"0.2s",repeatCount:"indefinite"})}),(0,t.jsx)("circle",{cx:"18",cy:"12",r:"2",children:(0,t.jsx)("animate",{attributeName:"r",values:"2;3;2",dur:"0.6s",begin:"0.4s",repeatCount:"indefinite"})})]}):(0,t.jsxs)("svg",{width:"14",height:"14",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[(0,t.jsx)("polygon",{points:"11 5 6 9 2 9 2 15 6 15 11 19 11 5",fill:"currentColor"}),(0,t.jsx)("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07"}),(0,t.jsx)("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14"})]})})]}),(0,t.jsx)(C,{loading:ea,entry:er,translation:ee,word:T.word,scroll:!1})]}):(0,t.jsx)("span",{className:"ipa-not-found text-sm p-2 block",children:ey?.errors?.ipaNotFound||"Definition not found"})})})]}),Y&&(0,t.jsx)("div",{style:{position:"fixed",bottom:24,left:"50%",transform:"translateX(-50%)",zIndex:99999,background:"var(--bg-card)",border:"2px solid var(--mo-line)",borderRadius:12,padding:"12px 22px",color:"var(--text-primary)",fontSize:14,fontWeight:600,boxShadow:"var(--mo-card-shadow)",animation:"toastSlideIn 0.4s ease-out",pointerEvents:"none",whiteSpace:"nowrap"},children:Y})]})}e.s(["default",()=>K],470431)}]);

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.