1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,209042,48034,431765,822215,e=>{"use strict";var t=e.i(843476),s=e.i(271645);e.i(247167);let a=new class{async request(e,t={}){let s=`/api${e}`,a={headers:{"Content-Type":"application/json",...t.headers},...t};try{let e=await fetch(s,a),t=await e.json();if(!e.ok||!t.success)throw Error(t.error||`HTTP error! status: ${e.status}`);return t.data}catch(e){throw e}}async searchWord(e,t){let s=new URLSearchParams({word:e});return t&&s.append("userId",t),this.request(`/dictionary/search?${s}`)}async getSearchHistory(e,t=1,s=10){let a=new URLSearchParams({userId:e,page:t.toString(),limit:s.toString()});return this.request(`/dictionary/history?${a}`)}async clearSearchHistory(e){return this.request(`/dictionary/history?userId=${e}`,{method:"DELETE"})}async getFavorites(e,t=1,s=10){let a=new URLSearchParams({userId:e,page:t.toString(),limit:s.toString()});return this.request(`/dictionary/favorites?${a}`)}async addFavorite(e,t){return this.request("/dictionary/favorites",{method:"POST",body:JSON.stringify({userId:e,wordId:t})})}async removeFavorite(e,t){return this.request("/dictionary/favorites",{method:"DELETE",body:JSON.stringify({userId:e,wordId:t})})}async getListeningExercises(e,t,s=1,a=10){let r=new URLSearchParams({page:s.toString(),limit:a.toString()});return e&&r.append("difficulty",e),t&&r.append("category",t),this.request(`/listening/exercises?${r}`)}async submitListeningPractice(e,t,s,a){return this.request("/listening/submit",{method:"POST",body:JSON.stringify({exerciseId:e,userId:t,answers:s,timeSpent:a})})}async getSentencePractices(e,t,s=1,a=10){let r=new URLSearchParams({page:s.toString(),limit:a.toString()});return e&&r.append("difficulty",e),t&&r.append("category",t),this.request(`/sentence/practices?${r}`)}async submitSentencePractice(e,t,s,a){return this.request("/sentence/submit",{method:"POST",body:JSON.stringify({practiceId:e,userId:t,userInput:s,timeSpent:a})})}async getVoiceExercises(e,t,s=1,a=10){let r=new URLSearchParams({page:s.toString(),limit:a.toString()});return e&&r.append("difficulty",e),t&&r.append("category",t),this.request(`/voice/exercises?${r}`)}async submitVoiceRecording(e,t,s,a){return this.request("/voice/submit",{method:"POST",body:JSON.stringify({exerciseId:e,userId:t,audioData:s,timeSpent:a})})}async getUserProgress(e,t){let s=new URLSearchParams({userId:e});return t&&s.append("category",t),this.request(`/progress?${s}`)}async generateEtymologyData(e){try{return await this.request("/enhance/etymology",{method:"POST",body:JSON.stringify({word:e})})}catch(e){if(e.message?.includes("No etymology data found"))return null;throw e}}async generateCulturalData(e){try{return await this.request("/enhance/cultural",{method:"POST",body:JSON.stringify({word:e})})}catch(e){if(e.message?.includes("No cultural data found"))return null;throw e}}async generateLearningData(e){try{return await this.request("/enhance/learning",{method:"POST",body:JSON.stringify({word:e})})}catch(e){if(e.message?.includes("No learning data found"))return null;throw e}}async batchGenerateEtymologyData(e,t){return this.request("/enhance/etymology",{method:"PUT",body:JSON.stringify({words:e,options:t})})}async batchGenerateCulturalData(e,t){return this.request("/enhance/cultural",{method:"PUT",body:JSON.stringify({words:e,options:t})})}async batchGenerateLearningData(e,t){return this.request("/enhance/learning",{method:"PUT",body:JSON.stringify({words:e,options:t})})}async healthCheck(){return this.request("/health")}async initializeSampleData(){try{return await this.request("/listening/exercises",{method:"POST"}),await this.request("/sentence/practices",{method:"POST"}),await this.request("/voice/exercises",{method:"POST"}),!0}catch(e){return!1}}},r=({message:e="Loading...",color:s="blue",size:a="md"})=>(0,t.jsx)("div",{className:"space-y-6",children:(0,t.jsxs)("div",{className:"flex items-center justify-center py-8",children:[(0,t.jsx)("div",{className:`animate-spin rounded-full ${{sm:"h-6 w-6",md:"h-8 w-8",lg:"h-12 w-12"}[a]} ${{blue:"border-b-2 border-blue-600",amber:"border-b-2 border-amber-600",green:"border-b-2 border-green-600",purple:"border-b-2 border-purple-600",red:"border-b-2 border-red-600",slate:"border-b-2 border-slate-600"}[s]}`}),(0,t.jsx)("span",{className:"ml-3 text-gray-600",children:e})]})}),l=({title:e="DATA UNAVAILABLE",message:s="We are continuously expanding our knowledge base. This section will be updated soon."})=>(0,t.jsxs)("div",{className:"border border-gray-100 bg-gray-50 flex flex-col items-center justify-center py-16 px-6 text-center space-y-4",children:[(0,t.jsx)("div",{className:"text-gray-300 mb-2",children:(0,t.jsx)("svg",{className:"w-12 h-12 inline-block opacity-50 grayscale",fill:"none",viewBox:"0 0 24 24",stroke:"currentColor",children:(0,t.jsx)("path",{strokeLinecap:"square",strokeLinejoin:"miter",strokeWidth:1,d:"M5 8h14M5 8a2 2 0 110-4h14a2 2 0 110 4M5 8v10a2 2 0 002 2h10a2 2 0 002-2V8m-9 4h4"})})}),(0,t.jsx)("h3",{className:"text-xs font-bold text-gray-400 uppercase tracking-widest",children:e}),(0,t.jsx)("p",{className:"text-lg text-gray-500 font-light max-w-lg leading-relaxed",children:s})]});function i(e){return{word:e,status:"missing",data:null}}function n(e){return{word:e,status:"missing",data:null}}e.s(["default",0,({entry:e,initialResult:n})=>{let o=e.word.lemma,c=n?.word.toLowerCase()===o.toLowerCase(),d=c&&n&&"error"!==n.status,[x,m]=(0,s.use
1State)(c&&n?n:i(o)),[h,p]=(0,s.useState)(!c),[g,u]=(0,s.useState)(c&&n&&"error"===n.status?n.errorMessage||"Failed to load cultural data":null);(0,s.useEffect)(()=>{if(d&&n){m(n),p(!1),u("error"===n.status?n.errorMessage||"Failed to load cultural data":null);return}let e=!1;return(async()=>{if(o){p(!0),u(null);try{let t=await a.generateCulturalData(o);if(!t){e||m(i(o));return}if(e)return;let s=t?.data?.culturalData||t?.culturalData||null;m(s?{word:o,status:"found",data:s}:i(o))}catch(t){if(!e){let e=t instanceof Error?t.message:"Failed to load cultural data";m({word:o,status:"error",data:null,errorMessage:e}),u(e)}}finally{e||p(!1)}}})(),()=>{e=!0}},[o,n,d]);let f=x.data,b=e=>"string"==typeof e?e:"object"==typeof e&&null!==e?e.text?e.text:e.words&&Array.isArray(e.words)?e.words.join(", "):e.partOfSpeech||e.definition||e.sentence||e.name||e.source||JSON.stringify(e):String(e);if(h)return(0,t.jsx)(r,{message:"Loading cultural context...",color:"amber"});if(g)return(0,t.jsx)(l,{title:"UNAVAILABLE",message:"Cultural context could not be loaded at this time."});if(!f)return(0,t.jsx)(l,{});let y=f;if(f?.parseError){let e=null;try{let t=(f.rawResponse||"").match(/\{[\s\S]*\}/);t&&(e=JSON.parse(t[0]))}catch{}if(!e)return(0,t.jsx)(l,{title:"UNAVAILABLE",message:"Data format error. We are working to fix this."});y=e}return(0,t.jsxs)("div",{className:"space-y-16",children:[y?.parseError&&y?.rawResponse&&!y.culturalContext&&(0,t.jsxs)("div",{className:"border-l-4 border-gray-200 pl-6 py-2",children:[(0,t.jsx)("h4",{className:"font-bold text-black mb-2",children:"AI Generated Cultural Content"}),(0,t.jsx)("div",{className:"text-gray-600 whitespace-pre-wrap text-sm leading-relaxed",children:y.rawResponse})]}),y?.culturalContext&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)] space-y-12",children:[y.culturalContext.origin&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"text-sm font-bold text-slate-400 mb-3 uppercase tracking-widest",children:"Origin"}),(0,t.jsx)("p",{className:"text-[15px] text-slate-700 leading-relaxed max-w-3xl font-medium",children:y.culturalContext.origin})]}),y.culturalContext.historicalSignificance&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"text-sm font-bold text-slate-400 mb-3 uppercase tracking-widest",children:"Historical Significance"}),(0,t.jsx)("p",{className:"text-[15px] text-slate-700 leading-relaxed max-w-3xl font-medium",children:y.culturalContext.historicalSignificance})]}),y.culturalContext.socialContext&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"text-sm font-bold text-slate-400 mb-3 uppercase tracking-widest",children:"Social Context"}),Array.isArray(y.culturalContext.socialContext)?(0,t.jsx)("ul",{className:"space-y-3",children:y.culturalContext.socialContext.map((e,s)=>(0,t.jsx)("li",{className:"text-[15px] text-slate-700 font-medium pl-4 relative before:content-[''] before:absolute before:left-0 before:top-2.5 before:w-1.5 before:h-1.5 before:bg-slate-300 before:rounded-full",children:e},s))}):(0,t.jsx)("p",{className:"text-[15px] text-slate-700 leading-relaxed max-w-3xl font-medium",children:"object"==typeof y.culturalContext.socialContext?JSON.stringify(y.culturalContext.socialContext):y.culturalContext.socialContext})]})]}),y?.formalityLevel&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)]",children:[(0,t.jsx)("h4",{className:"text-sm font-bold text-slate-400 mb-4 uppercase tracking-widest",children:"Formality Level"}),(0,t.jsx)("span",{className:"inline-flex px-4 py-1.5 bg-slate-100 text-slate-700 font-bold rounded-full text-sm",children:y.formalityLevel})]}),y?.connotations&&Array.isArray(y.connotations)&&y.connotations.length>0&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)]",children:[(0,t.jsx)("h4",{className:"text-sm font-bold text-slate-400 mb-6 uppercase tracking-widest",children:"Connotations"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2.5",children:y.connotations.map((e,s)=>(0,t.jsx)("span",{className:"px-5 py-2.5 bg-white border border-slate-100 rounded-full text-[15px] font-semibold text-slate-700 shadow-sm hover:border-slate-300 hover:text-slate-900 transition-colors cursor-default",children:e},s))})]}),y?.associatedConcepts&&Array.isArray(y.associatedConcepts)&&y.associatedConcepts.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Associated Concepts"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-2",children:y.associatedConcepts.map((e,s)=>(0,t.jsx)("span",{className:"text-black border-b border-gray-200 pb-1",children:e},s))})]}),y?.culturalReferences&&Array.isArray(y.culturalReferences)&&y.culturalReferences.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Cultural References"}),(0,t.jsx)("div",{className:"space-y-8",children:y.culturalReferences.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"mb-2 flex items-baseline gap-3",children:[(0,t.jsx)("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:e.type||e.category||"Reference"}),(0,t.jsx)("span",{className:"text-lg font-bold text-black",children:e.reference||e.title||e.name||b(e)})]}),(0,t.jsx)("p",{className:"text-gray-600 leading-relaxed max-w-3xl",children:e.context||e.description||b(e)})]},s))})]}),y?.regionalUsage&&Array.isArray(y.regionalUsage)&&y.regionalUsage.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Regional Usage"}),(0,t.jsx)("div",{className:"grid gap-12 md:grid-cols-2",children:y.regionalUsage.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-3 mb-3",children:[(0,t.jsx)("h5",{className:"text-lg font-bold text-black",children:e.region}),(0,t.jsx)("span",{className:"text-sm text-gray-400 font-medium",children:e.frequency})]}),(0,t.jsx)("p",{className:"text-gray-600 leading-relaxed",children:e.usage})]},s))})]}),y?.idioms&&Array.isArray(y.idioms)&&y.idioms.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Idioms & Expressions"}),(0,t.jsx)("div",{className:"space-y-8",children:y.idioms.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsxs)("div",{className:"clean-blockquote",children:[(0,t.jsxs)("p",{className:"text-xl font-serif italic text-black mb-3",children:['"',e.phrase||e.word||e.expression||b(e),'"']}),(0,t.jsx)("p",{className:"text-gray-600 text-base",children:e.meaning||e.definition||b(e)})]}),(e.example||e.usage)&&(0,t.jsxs)("p",{className:"mt-2 text-sm text-gray-400 italic pl-8",children:["Example: ",e.example||e.usage]})]},s))})]}),!y?.parseError&&!y?.culturalContext&&!y?.regionalUsage?.length&&!y?.connotations?.length&&!y?.idioms?.length&&(0,t.jsx)("div",{className:"text-center py-16",children:(0,t.jsxs)("p",{className:"text-gray-400 italic text-lg mb-2",children:['No cultural information available for "',o,'"']})})]})}],209042),e.s(["default",0,({entry:e,initialResult:i})=>{let o=e.word.lemma,c=i?.word.toLowerCase()===o.toLowerCase(),d=c&&i&&"error"!==i.status,[x,m]=(0,s.use
1State)(c&&i?i:n(o)),[h,p]=(0,s.useState)(!c),[g,u]=(0,s.useState)(c&&i&&"error"===i.status?i.errorMessage||"Failed to load etymology data":null);(0,s.useEffect)(()=>{if(d&&i){m(i),p(!1),u("error"===i.status?i.errorMessage||"Failed to load etymology data":null);return}let e=!1;return(async()=>{if(o){p(!0),u(null);try{let t=await a.generateEtymologyData(o);if(!t){e||m(n(o));return}if(e)return;let s=t?.data?.etymologyData||t?.etymologyData||null;m(s?{word:o,status:"found",data:s}:n(o))}catch(t){if(!e){let e=t instanceof Error?t.message:"Failed to load etymology data";m({word:o,status:"error",data:null,errorMessage:e}),u(e)}}finally{e||p(!1)}}})(),()=>{e=!0}},[o,i,d]);let f=x.data,b=e=>"string"==typeof e?e:"object"==typeof e&&null!==e?e.text?e.text:e.words&&Array.isArray(e.words)?e.words.join(", "):e.definition||e.meaning||e.content||e.value||JSON.stringify(e):String(e);if(g)return(0,t.jsx)(l,{title:"UNAVAILABLE",message:"Etymology information could not be loaded at this time."});if(h)return(0,t.jsx)(r,{message:"Loading etymology data...",color:"amber"});if(!f)return(0,t.jsx)(l,{});let y=f;if(f?.parseError){let e=null;try{let t=(f.rawResponse||"").match(/\{[\s\S]*\}/);t&&(e=JSON.parse(t[0]))}catch{}if(!e)return(0,t.jsx)(l,{title:"UNAVAILABLE",message:"Data format error. We are working to fix this."});y=e}return(0,t.jsxs)("div",{className:"space-y-16",children:[y?.etymology&&y.etymology.length>0&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)]",children:[(0,t.jsxs)("h4",{className:"text-xl font-extrabold text-slate-900 mb-6 tracking-tight flex items-center gap-3 relative",children:[(0,t.jsx)("span",{className:"w-2.5 h-2.5 rounded-full bg-slate-900 inline-block relative z-10"}),"Word Evolution Timeline"]}),(0,t.jsx)("div",{className:"relative border-l-2 border-slate-200/60 ml-[4px] -mt-2 pt-2 space-y-8 pb-4",children:y.etymology.map((e,s)=>(0,t.jsxs)("div",{className:"relative group pl-6 sm:pl-10",children:[(0,t.jsx)("div",{className:"absolute -left-[11px] top-4 sm:top-6 w-5 h-5 bg-white rounded-full border-[4px] border-slate-300 group-hover:border-slate-900 transition-colors duration-300 shadow-sm"}),(0,t.jsxs)("div",{className:"bg-white/80 rounded-2xl p-4 sm:p-6 border border-slate-100 shadow-sm group-hover:shadow-md transition-all duration-300",children:[(0,t.jsx)("h5",{className:"text-lg font-bold text-slate-900 mb-1 transition-colors",children:b(e.stage)}),(0,t.jsx)("p",{className:"text-[13px] font-bold tracking-widest uppercase text-slate-400 mb-4",children:b(e.period)}),(0,t.jsxs)("div",{className:"grid grid-cols-1 md:grid-cols-2 gap-y-4 gap-x-6 text-[15px] text-slate-700",children:[(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-0.5 sm:gap-2",children:[(0,t.jsx)("span",{className:"text-slate-400 font-medium whitespace-nowrap text-[13px] sm:text-[15px]",children:"Form:"}),(0,t.jsx)("span",{className:"font-semibold text-slate-900 mt-0.5 sm:mt-0",children:b(e.form)})]}),e.language&&(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-0.5 sm:gap-2",children:[(0,t.jsx)("span",{className:"text-slate-400 font-medium whitespace-nowrap text-[13px] sm:text-[15px]",children:"Language:"}),(0,t.jsx)("span",{className:"text-slate-700 mt-0.5 sm:mt-0",children:b(e.language)})]}),e.meaning&&(0,t.jsxs)("div",{className:"flex flex-col sm:flex-row sm:items-start gap-0.5 sm:gap-2 md:col-span-2",children:[(0,t.jsx)("span",{className:"text-slate-400 font-medium whitespace-nowrap text-[13px] sm:text-[15px]",children:"Meaning:"}),(0,t.jsxs)("span",{className:"italic text-slate-600 mt-0.5 sm:mt-0",children:['"',b(e.meaning),'"']})]})]})]})]},s))})]}),y?.historicalForms&&y.historicalForms.length>0&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_12px_40px_rgba(0,0,0,0.08)] transition-all duration-300",children:[(0,t.jsx)("h4",{className:"text-xl font-extrabold text-slate-900 mb-6 tracking-tight flex items-center gap-3",children:"Historical Forms"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-3",children:y.historicalForms.map((e,s)=>(0,t.jsx)("span",{className:"px-5 py-2.5 bg-white rounded-full text-[15px] font-medium text-slate-700 shadow-sm border border-slate-100 hover:border-slate-300 hover:text-slate-900 transition-colors",children:b(e)},s))})]}),y?.rootLanguages&&y.rootLanguages.length>0&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_12px_40px_rgba(0,0,0,0.08)] transition-all duration-300",children:[(0,t.jsx)("h4",{className:"text-xl font-extrabold text-slate-900 mb-6 tracking-tight flex items-center gap-3",children:"Language Family"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-3",children:y.rootLanguages.map((e,s)=>(0,t.jsx)("span",{className:"px-5 py-2.5 bg-slate-900 text-white rounded-full text-[15px] font-medium shadow-sm hover:bg-slate-800 transition-colors",children:b(e)},s))})]}),y?.cognates&&y.cognates.length>0&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_12px_40px_rgba(0,0,0,0.08)] transition-all duration-300",children:[(0,t.jsx)("h4",{className:"text-xl font-extrabold text-slate-900 mb-8 tracking-tight flex items-center gap-3",children:"Related Words (Cognates)"}),(0,t.jsx)("div",{className:"grid gap-6 md:grid-cols-2 lg:grid-cols-3",children:y.cognates.map((e,s)=>(0,t.jsxs)("div",{className:"bg-white rounded-2xl p-6 border border-slate-100 shadow-sm hover:shadow-md transition-all duration-300 group flex flex-col",children:[(0,t.jsx)("div",{className:"text-[11px] font-bold text-slate-400 mb-2 uppercase tracking-widest group-hover:text-slate-500 transition-colors",children:b(e.language)}),(0,t.jsx)("div",{className:"text-lg font-bold text-slate-900 mb-2",children:b(e.word)}),(0,t.jsx)("div",{className:"text-[15px] text-slate-600 leading-relaxed",children:b(e.meaning)})]},s))})]}),y?.derivation&&(0,t.jsxs)("div",{className:"bg-white/60 backdrop-blur-md rounded-[2rem] border border-white/60 p-8 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_12px_40px_rgba(0,0,0,0.08)] transition-all duration-300",children:[(0,t.jsx)("h4",{className:"text-xl font-extrabold text-slate-900 mb-6 tracking-tight flex items-center gap-3",children:"Linguistic Development"}),(0,t.jsx)("p",{className:"text-[17px] text-slate-700 leading-relaxed max-w-4xl",children:b(y.derivation)})]})]})}],48034),e.s(["default",0,({entry:e})=>{let s=(e=>{if(!e)return null;let t={p:{label:"Past Tense",category:"verb"},d:{label:"Past Participle",category:"verb"},i:{label:"Present Participle",category:"verb"},3:{label:"3rd Person Singular",category:"verb"},r:{label:"Comparative",category:"adj"},t:{label:"Superlative",category:"adj"},s:{label:"Plural",category:"noun"},0:{label:"Lemma",category:"other"},1:{label:"Lemma Variation",category:"other"}},s=e.split("/"),a=[];for(let e of s){let[s,r]=e.split(":");s&&r&&t[s]&&a.push({type:s,label:t[s].label,category:t[s].category,value:r.trim()})}return a.length>0?a:null})(e.ecdict?.exchange);if(!s||0===s.length)return(0,t.jsx)("div",{className:"text-center py-12 text-slate-400",children:"No inflection data available for this word."});let a=s.reduce((e,t)=>
1(e[t.category]||(e[t.category]=[]),e[t.category].push(t),e),{}),r=(e,s)=>(0,t.jsxs)("div",{className:"mb-10 last:mb-0",children:[(0,t.jsx)("h3",{className:"text-xs font-bold text-slate-400 tracking-widest uppercase mb-6 border-b border-slate-200/50 pb-2",children:e}),(0,t.jsx)("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-3 gap-x-8 gap-y-8",children:s.map((e,s)=>(0,t.jsxs)("div",{className:"flex flex-col gap-1 group",children:[(0,t.jsx)("span",{className:"text-xs text-slate-500 font-medium uppercase tracking-wide",children:e.label}),(0,t.jsx)("span",{className:"font-serif italic text-2xl text-slate-900 group-hover:text-black transition-colors",children:e.value})]},s))})]});return(0,t.jsxs)("div",{className:"mx-auto",children:[a.verb&&r("Verb Conjugations",a.verb),a.noun&&r("Noun Forms",a.noun),a.adj&&r("Adjective & Adverb Forms",a.adj),a.other&&r("Other Variations",a.other)]})}],431765);var o=e.i(522016);function c(e){return{word:e,status:"missing",data:null}}e.s(["default",0,({entry:e,initialResult:i})=>{let n=e.word.lemma,d=i?.word.toLowerCase()===n.toLowerCase(),x=d&&i&&"error"!==i.status,[m,h]=(0,s.useState)(d&&i?i:c(n)),[p,g]=(0,s.useState)(!d),[u,f]=(0,s.useState)(d&&i&&"error"===i.status?i.errorMessage||"Failed to load learning data":null);(0,s.useEffect)(()=>{if(x&&i){h(i),g(!1),f("error"===i.status?i.errorMessage||"Failed to load learning data":null);return}let e=!1;return(async()=>{if(n){g(!0),f(null);try{let t=await a.generateLearningData(n);if(!t){e||h(c(n));return}if(e)return;let s=t?.data?.learningData||t?.learningData||null;h(s?{word:n,status:"found",data:s}:c(n))}catch(t){if(!e){let e=t instanceof Error?t.message:"Failed to load learning data";h({word:n,status:"error",data:null,errorMessage:e}),f(e)}}finally{e||g(!1)}}})(),()=>{e=!0}},[n,i,x]);let b=m.data,y=e=>"string"==typeof e?e:"object"==typeof e&&null!==e?e.text?e.text:e.words&&Array.isArray(e.words)?e.words.join(", "):e.partOfSpeech||e.definition||e.sentence||e.name||e.source||JSON.stringify(e):String(e);if(p)return(0,t.jsx)(r,{message:"Loading learning resources...",color:"slate"});if(u)return(0,t.jsx)(l,{title:"UNAVAILABLE",message:"Learning Guide could not be loaded at this time."});if(!b)return(0,t.jsx)(l,{});let j=b;if(b?.parseError){let e=null;try{let t=(b.rawResponse||"").match(/\{[\s\S]*\}/);t&&(e=JSON.parse(t[0]))}catch{}if(!e)return(0,t.jsx)(l,{title:"UNAVAILABLE",message:"Data format error. We are working to fix this."});j=e}return(0,t.jsxs)("div",{className:"space-y-16",children:[(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Learning Level"}),(0,t.jsxs)("div",{className:"flex flex-wrap gap-8",children:[j?.cefrLevel&&(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"CEFR Level"}),(0,t.jsx)("span",{className:"text-xl font-bold text-black",children:j.cefrLevel})]}),j?.difficulty&&(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"Difficulty"}),(0,t.jsx)("span",{className:"text-xl font-bold text-black",children:j.difficulty})]}),j?.difficultyLevel&&(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"AI Assessment"}),(0,t.jsx)("span",{className:"text-xl font-bold text-black",children:j.difficultyLevel})]}),j?.learningPriority&&(0,t.jsxs)("div",{className:"flex flex-col gap-1",children:[(0,t.jsx)("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:"Priority"}),(0,t.jsx)("span",{className:"text-xl font-bold text-black",children:j.learningPriority})]})]})]}),j?.wordAnalysis&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Word Analysis"}),(0,t.jsxs)("div",{className:"space-y-8",children:[j.wordAnalysis.prefixes&&j.wordAnalysis.prefixes.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider block mb-2",children:"Prefixes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-4 text-lg font-bold text-black",children:j.wordAnalysis.prefixes.map((e,s)=>(0,t.jsxs)("span",{children:[e,s<j.wordAnalysis.prefixes.length-1&&(0,t.jsx)("span",{className:"text-gray-300 ml-4 font-light",children:"|"})]},s))})]}),j.wordAnalysis.root&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider block mb-2",children:"Root"}),(0,t.jsx)("span",{className:"text-lg font-bold text-black",children:j.wordAnalysis.root})]}),j.wordAnalysis.suffixes&&j.wordAnalysis.suffixes.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider block mb-2",children:"Suffixes"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-4 text-lg font-bold text-black",children:j.wordAnalysis.suffixes.map((e,s)=>(0,t.jsxs)("span",{children:[e,s<j.wordAnalysis.suffixes.length-1&&(0,t.jsx)("span",{className:"text-gray-300 ml-4 font-light",children:"|"})]},s))})]}),j.wordAnalysis.etymology&&(0,t.jsxs)("div",{children:[(0,t.jsx)("span",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider block mb-2",children:"Etymology"}),(0,t.jsx)("p",{className:"text-black leading-relaxed max-w-3xl",children:j.wordAnalysis.etymology})]})]})]}),j?.memoryTechniques&&Array.isArray(j.memoryTechniques)&&j.memoryTechniques.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Memory Techniques"}),(0,t.jsx)("div",{className:"space-y-12",children:j.memoryTechniques.map((e,s)=>(0,t.jsxs)("div",{children:[(0,t.jsx)("div",{className:"mb-3",children:(0,t.jsx)("span",{className:"text-lg font-bold text-black uppercase tracking-wide",children:e.type})}),(0,t.jsx)("p",{className:"text-black leading-relaxed max-w-3xl",children:e.technique||e.description||y(e)})]},s))})]}),j?.learningTips&&Array.isArray(j.learningTips)&&j.learningTips.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Learning Tips"}),(0,t.jsx)("div",{className:"space-y-4",children:j.learningTips.map((e,s)=>(0,t.jsx)("div",{className:"list-item-clean",children:(0,t.jsx)("p",{className:"text-black leading-relaxed",children:"string"==typeof e?e:e.tip||y(e)})}
1,s))})]}),j?.commonMistakes&&Array.isArray(j.commonMistakes)&&j.commonMistakes.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Common Mistakes"}),(0,t.jsx)("div",{className:"space-y-8",children:j.commonMistakes.map((e,s)=>(0,t.jsxs)("div",{className:"technique-container",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-3 mb-2",children:[(0,t.jsx)("span",{className:"text-black font-bold text-xl",children:"!"}),(0,t.jsx)("span",{className:"font-bold text-black text-lg",children:e.mistake||`Mistake ${s+1}`})]}),e.correction&&(0,t.jsxs)("div",{className:"mb-2 pl-6",children:[(0,t.jsx)("span",{className:"text-sm font-bold text-gray-400 uppercase tracking-wide mr-2",children:"Correct:"}),(0,t.jsx)("span",{className:"text-black font-medium",children:e.correction})]}),e.explanation&&(0,t.jsx)("div",{className:"pl-6",children:(0,t.jsx)("p",{className:"text-gray-600 text-sm leading-relaxed",children:e.explanation})}),!e.correction&&!e.explanation&&(0,t.jsx)("p",{className:"text-black pl-6",children:y(e)})]},s))})]}),j?.practiceExercises&&Array.isArray(j.practiceExercises)&&j.practiceExercises.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Practice Exercises"}),(0,t.jsx)("div",{className:"space-y-12",children:j.practiceExercises.map((e,s)=>(0,t.jsxs)("div",{className:"space-y-4",children:[(0,t.jsxs)("div",{className:"flex items-baseline gap-3",children:[(0,t.jsxs)("span",{className:"text-black font-bold text-xl font-serif",children:[s+1,"."]}),(0,t.jsx)("span",{className:"text-xs font-bold text-gray-400 uppercase tracking-wider",children:e.type})]}),(0,t.jsx)("p",{className:"text-xl text-black font-medium pl-8 leading-snug",children:e.exercise}),e.options&&Array.isArray(e.options)&&e.options.length>0&&(0,t.jsx)("div",{className:"pl-8 space-y-3 mt-4",children:e.options.map((e,s)=>(0,t.jsxs)("div",{className:"flex items-center gap-4 group cursor-pointer",children:[(0,t.jsx)("div",{className:"w-6 h-6 flex items-center justify-center text-sm font-bold text-gray-400 group-hover:text-black transition-colors",children:String.fromCharCode(65+s)}),(0,t.jsx)("span",{className:"text-gray-600 group-hover:text-black transition-colors text-lg",children:e})]},s))}),(0,t.jsxs)("details",{className:"pl-8 mt-4",children:[(0,t.jsx)("summary",{className:"text-sm text-gray-400 cursor-pointer hover:text-black transition-colors inline-flex items-center gap-1 font-medium",children:(0,t.jsx)("span",{children:"Show Answer"})}),(0,t.jsxs)("div",{className:"mt-3 pl-4 border-l-2 border-gray-100 text-sm",children:[(0,t.jsxs)("p",{className:"text-black mb-1",children:[(0,t.jsx)("strong",{children:"Answer:"})," ",e.answer]}),e.explanation&&(0,t.jsx)("p",{className:"text-gray-500 leading-relaxed",children:e.explanation})]})]})]},s))})]}),j?.relatedWords&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h4",{className:"section-header",children:"Related Words"}),(0,t.jsxs)("div",{className:"space-y-8",children:[j.relatedWords.synonyms&&j.relatedWords.synonyms.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider mb-3",children:"Synonyms"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-base text-black",children:j.relatedWords.synonyms.map((e,s)=>(0,t.jsxs)("span",{children:[(0,t.jsx)(o.default,{href:`/dictionary/${encodeURIComponent(e)}`,className:"font-medium hover:text-slate-900 hover:underline decoration-slate-400/30 underline-offset-4 transition-colors",children:e}),s<j.relatedWords.synonyms.length-1&&(0,t.jsx)("span",{className:"text-gray-300 ml-4 font-light",children:"|"})]},s))})]}),j.relatedWords.antonyms&&j.relatedWords.antonyms.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider mb-3",children:"Antonyms"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-base text-black",children:j.relatedWords.antonyms.map((e,s)=>(0,t.jsxs)("span",{children:[(0,t.jsx)(o.default,{href:`/dictionary/${encodeURIComponent(e)}`,className:"font-medium hover:text-slate-900 hover:underline decoration-slate-400/30 underline-offset-4 transition-colors",children:e}),s<j.relatedWords.antonyms.length-1&&(0,t.jsx)("span",{className:"text-gray-300 ml-4 font-light",children:"|"})]},s))})]}),j.relatedWords.collocations&&j.relatedWords.collocations.length>0&&(0,t.jsxs)("div",{children:[(0,t.jsx)("h5",{className:"text-sm font-bold text-gray-400 uppercase tracking-wider mb-3",children:"Common Collocations"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-x-4 gap-y-2 text-base text-black",children:j.relatedWords.collocations.map((e,s)=>(0,t.jsxs)("span",{className:"font-medium",children:[e,s<j.relatedWords.collocations.length-1&&(0,t.jsx)("span",{className:"text-gray-300 ml-4 font-light",children:"|"})]},s))})]})]})]}),!j?.parseError&&!j?.wordAnalysis&&!j?.memoryTechniques?.length&&!j?.learningTips?.length&&!j?.commonMistakes?.length&&(0,t.jsx)("div",{className:"text-center py-16",children:(0,t.jsxs)("p",{className:"text-gray-400 italic text-lg mb-4",children:['No learning resources available for "',n,'"']})})]})}],822215)},459062,e=>{"use strict";var t=e.i(843476),s=e.i(487486),a=e.i(522016),r=e.i(271645);let l=(0,r.memo)(function({text:e,className:s=""}){if(!e)return null;let l=e.split(/([a-zA-Z]+(?:[-'][a-zA-Z]+)*)/);return(0,t.jsx)("span",{className:s,children:l.map((e,s)=>{if(/^[a-zA-Z]+(?:[-'][a-zA-Z]+)*$/.test(e)&&e.length>3&&!e.includes("'")){let r=encodeURIComponent(e.toLowerCase());return(0,t.jsx)(a.default,{href:`/dictionary/${r}`,prefetch:!1,className:"text-slate-700 hover:text-indigo-600 border-b border-transparent hover:border-indigo-300 transition-colors inline-block",children:e},s)}return(0,t.jsx)(r.default.Fragment,{children:e},s)})})});e.s(["default",0,({entry:e})=>{var a,r;e.word.lemma;let i={word:e.word.lemma,lemma:e.word.lemma,irregular_forms:e.inflected_forms,phonetic:e.pronunciation?.ipa,phoneticCmu:e.pronunciation?.cmu,phoneticSimple:e.pronunciation?.simple,syllables:e.pronunciation?.syllables,definitions:e.synsets,examples:e.synsets?.flatMap(e=>e.examples||[])||[],collins:e.ecdict?.collins,oxford:e.ecdict?.oxford,bnc:e.ecdict?.bnc,frq:e.e
1cdict?.frq,translation:e.ecdict?.translation,exchange:e.ecdict?.exchange};return(0,t.jsxs)("div",{className:"space-y-6",children:[i.irregular_forms&&i.irregular_forms.length>0&&(0,t.jsxs)("div",{className:"mb-8",children:[(0,t.jsx)("h4",{className:"text-xs font-bold text-muted-foreground mb-3 uppercase tracking-wider flex items-center gap-2",children:"Inflected Forms"}),(0,t.jsx)("div",{className:"flex flex-wrap gap-2",children:i.irregular_forms.map((e,a)=>(0,t.jsx)(s.Badge,{variant:"outline",className:"text-sm font-medium px-3 py-1",children:e},a))})]}),i.definitions&&Array.isArray(i.definitions)&&i.definitions.length>0&&(0,t.jsx)("div",{className:"space-y-6",children:(a=i.definitions,r=(e,s)=>{var a;return(0,t.jsxs)("div",{className:"group relative flex gap-6 bg-white/60 backdrop-blur-md p-8 rounded-[2rem] border border-white/60 shadow-[0_8px_30px_rgb(0,0,0,0.04)] hover:shadow-[0_12px_40px_rgba(0,0,0,0.08)] hover:border-slate-200 hover:bg-white hover:-translate-y-1 transition-all duration-300 ease-[cubic-bezier(0.23,1,0.32,1)] overflow-hidden",children:[(0,t.jsx)("div",{className:"hidden sm:block absolute -right-8 -bottom-8 text-[12rem] font-bold text-slate-100/30 group-hover:text-slate-100/50 transition-colors pointer-events-none select-none z-0",children:s+1}),(0,t.jsx)("div",{className:"hidden sm:flex flex-shrink-0 w-12 h-12 rounded-full bg-slate-100 items-center justify-center text-lg font-bold text-slate-400 group-hover:bg-slate-900 group-hover:text-white transition-colors z-10",children:s+1}),(0,t.jsxs)("div",{className:"flex-1 relative z-10 space-y-4",children:[(0,t.jsx)("h3",{className:"text-xl font-semibold text-slate-800 tracking-tight leading-relaxed group-hover:text-slate-900 transition-colors",children:(0,t.jsx)(l,{text:"string"==typeof(a=e)?a:"object"==typeof a&&null!==a?"string"==typeof a.text?a.text:String(a.partOfSpeech||a.definition||a.sentence||a.name||a.source||JSON.stringify(a)):String(a)})}),"object"==typeof e&&null!==e&&"examples"in e&&Array.isArray(e.examples)&&e.examples.length>0&&(0,t.jsx)("div",{className:"space-y-3 mt-4",children:e.examples.map((e,s)=>(0,t.jsxs)("div",{className:"text-[15px] font-normal leading-relaxed text-slate-500 border-l-2 border-slate-200 group-hover:border-slate-400 transition-colors pl-4 py-1 italic",children:['"',(0,t.jsx)(l,{text:e,className:"italic"}),'"']},s))})]})]},s)},Array.isArray(a)?a.map(r):null)})]})}],459062)},207012,e=>{"use strict";e.s(["normalizeIPA",0,function(e){return e?e.replace(/É/g,"Ér").replace(/É(?=[/|)\s]|$)/g,"Ér").replace(/É/g,"Ér").replace(/ɹ/g,"r").replace(/i(?!Ë)/g,"iË").replace(/u(?!Ë)/g,"uË"):e}])}]);
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.