PageSourceSearch

https://www.haylingua.am/assets/ArmenianAlphabetPage-2e2d3779.js

js haylingua.am collected 2026-10-04 08:01:20 UTC 9,535 bytes, 2 lines download raw bytes

1import{c as S,d as P,r as h,j as e,A as N,L as g,m as T,e as M}from"./vendor-2be7022e.js";import{d as I,e as R,f as B,i as C,j as W,l as G,b as D,o as F}from"./index-c61a06a9.js";import{A as u}from"./armenianAlphabet-883f5fca.js";import{t as q}from"./translit-77f98f71.js";import{R as O}from"./RelatedBlogPosts-3ef1ae1a.js";import{P as $}from"./blogTopics-4465c6ea.js";const k=new Map(u.map((a,t)=>[a.upper,t])),A=new Map(u.map(a=>[a.upper,a])),H=(a,t)=>(k.get(a.letter)??Number.MAX_SAFE_INTEGER)-(k.get(t.letter)??Number.MAX_SAFE_INTEGER),y={}.VITE_API_BASE_URL||"https://haylinguav2.onrender.com",Q=Array.from({length:11},(a,t)=>`hl-alphabet-${t+1}`);function U({letter:a}){const[t,l]=h.useState(!1);async function o(){if(!t){l(!0);try{const p=await D(y,{text:a.exampleWord||a.letter,exerciseId:a.exerciseId,targetKey:"letter"}),i=F(p);i.onended=()=>l(!1),i.onerror=()=>l(!1),await i.play()}catch{l(!1)}}}return e.jsxs("button",{type:"button",onClick:o,className:"group flex flex-col items-center gap-1.5 rounded-2xl bg-white p-4 text-center shadow-sm ring-1 ring-slate-200 transition hover:-translate-y-0.5 hover:shadow-md dark:bg-[#18181b] dark:ring-white/[0.08]",children:[e.jsxs("div",{className:"flex items-baseline gap-1.5",children:[e.jsx("span",{className:"font-display text-3xl font-extrabold text-slate-800 dark:text-white",children:a.letter}),e.jsx("span",{className:"font-display text-xl font-bold text-slate-500 dark:text-stone-400",children:a.lower})]}),e.jsx("div",{className:"text-xs font-bold uppercase tracking-wide text-brand-600 dark:text-brand-400",children:a.transliteration}),a.exampleWord&&e.jsxs("div",{className:"mt-1 flex flex-col items-center gap-0.5 text-xs font-semibold text-slate-500 dark:text-stone-400",children:[e.jsxs("div",{className:"flex items-center gap-1",children:[a.exampleEmoji&&e.jsx("span",{children:a.exampleEmoji}),e.jsx("span",{children:a.exampleWord})]}),e.jsx("span",{className:"font-normal italic text-slate-400 dark:text-stone-500",children:q(a.exampleWord)}),a.exampleMeaning&&a.exampleMeaning.toLowerCase()!==a.exampleWord.toLowerCase()&&e.jsx("span",{className:"font-normal text-slate-400 dark:text-stone-500",children:a.exampleMeaning})]}),e.jsx("div",{className:"mt-1.5 grid h-7 w-7 place-items-center rounded-full bg-brand-50 text-brand-500 transition group-hover:bg-brand-100 dark:bg-brand-500/15 dark:text-brand-400 dark:group-hover:bg-brand-500/25",children:t?e.jsx(T,{className:"h-3.5 w-3.5 animate-spin"}):e.jsx(M,{className:"h-3.5 w-3.5"})})]})}function Z(){const a=S(),{t}=P("seoPages"),l=I(),o=s=>G(s,l),p=t("armenianAlphabet.faq",{returnObjects:!0}),i=t("armenianAlphabet.keepGoing.cards",{returnObjects:!0}),d=t("armenianAlphabet.letterOverrides",{returnObjects:!0}),v=h.useMemo(()=>u.map(s=>{const r=d==null?void 0:d[s.upper];return{exerciseId:void 0,letter:s.upper,lower:s.lower,transliteration:s.translit,hint:(r==null?void 0:r.hint)??"",exampleWord:s.word||"",exampleMeaning:(r==null?void 0:r.exampleMeaning)||s.meaning||"",exampleEmoji:""}}),[d]),[f,E]=h.useState(v);h.useEffect(()=>{let s=!1;return Promise.all(Q.map(r=>fetch(`${y}/lessons/${r}`).then(c=>c.ok?c.json():null).catch(()=>null))).then(r=>{var w,j;if(s)return;const c=[];for(const b of r){if(!(b!=null&&b.exercises))continue;const _=b.exercises.filter(x=>x.kind==="char_intro").sort((x,n)=>x.order-n.order);for(const x of _){const n=x.config||{};if(!n.letter)continue;const m=d==null?void 0:d[n.letter];c.push({exerciseId:x.id,letter:n.letter,lower:n.lower||"",transliteration:n.transliteration||"",hint:(m==null?void 0:m.hint)??n.hint??"",exampleWord:n.exampleWord||((w=A.get(n.letter))==null?void 0:w.word)||"",exampleMeaning:(m==null?void 0:m.exampleMeaning)||n.exampleMeaning||((j=A.get(n.letter))==null?void 0:j.meaning)||"",exampleEmoji:n.exampleEmoji||""})}}c.length>0&&E(c.sort(H))}),()=>{s=!0}},[l]);const L=h.useMemo(()=>[{"@context":"https://schema.org","@type":"BreadcrumbList",itemListElement:[{"@type":"ListItem",position:1,name:t("armenianAlphabet.breadcrumb.home"),item:"https://www.haylingua.am/"},{"@type":"ListItem",position:2,name:t("armenianAlphabet.breadcrumb.current"),item:"https://www.haylingua.am/armenian-alphabet"}]},{"@context":"https://schema.org","@type":"FAQPage",mainEntity:p.map(s=>
1({"@type":"Question",name:s.q,acceptedAnswer:{"@type":"Answer",text:s.a}}))},{"@context":"https://schema.org","@type":"LearningResource",name:t("armenianAlphabet.structuredData.learningResourceName"),description:t("armenianAlphabet.structuredData.learningResourceDescription"),educationalLevel:"Beginner",learningResourceType:"Reference",inLanguage:"hy",url:"https://www.haylingua.am/armenian-alphabet"}],[l]);return R(t("armenianAlphabet.meta.title"),t("armenianAlphabet.meta.description"),{structuredData:L,alternates:B.map(s=>({locale:s,path:"/armenian-alphabet"})).concat([{locale:"",path:"/armenian-alphabet"}])}),e.jsxs("div",{className:"min-h-screen bg-gradient-to-b from-brand-50/40 to-white dark:from-[#0d0d0f] dark:via-[#0d0d0f] dark:to-[#0d0d0f]",children:[e.jsx(C,{}),e.jsxs("main",{id:"main-content",children:[e.jsxs("header",{className:"mx-auto max-w-4xl px-5 pb-8 pt-14 text-center",children:[e.jsx("h1",{className:"font-display text-4xl font-extrabold tracking-tight text-slate-800 dark:text-white sm:text-5xl",children:t("armenianAlphabet.hero.title")}),e.jsx("p",{className:"mx-auto mt-4 max-w-2xl text-lg font-semibold text-slate-500 dark:text-stone-400",children:t("armenianAlphabet.hero.subtitle")}),e.jsxs("div",{className:"mt-6 flex flex-wrap items-center justify-center gap-3",children:[e.jsxs("button",{onClick:()=>a(o("/")),className:"btn3d btn3d-brand text-sm uppercase",children:[t("armenianAlphabet.hero.ctaStart")," ",e.jsx(N,{className:"h-4 w-4 rtl:rotate-180"})]}),e.jsx(g,{to:o("/eastern-armenian"),className:"text-sm font-bold text-brand-600 hover:underline dark:text-brand-400",children:t("armenianAlphabet.hero.ctaEasternLink")})]})]}),e.jsx("section",{className:"mx-auto max-w-5xl px-5 pb-16",children:f.length===0?e.jsx("div",{className:"rounded-2xl bg-cardinal-50 p-6 text-center text-sm font-bold text-cardinal-600 dark:bg-cardinal-500/15 dark:text-cardinal-400",children:t("armenianAlphabet.loadError")}):e.jsx("div",{className:"grid grid-cols-2 gap-3 sm:grid-cols-3 md:grid-cols-4 lg:grid-cols-5",children:f.map((s,r)=>e.jsx(U,{letter:s},`${s.letter}-${r}`))})}),e.jsx("section",{className:"border-t border-slate-100 bg-slate-50 px-5 py-14 dark:border-white/[0.06] dark:bg-white/[0.04]",children:e.jsxs("div",{className:"mx-auto max-w-4xl",children:[e.jsx("h2",{className:"text-center font-display text-2xl font-extrabold tracking-tight text-slate-800 dark:text-white",children:t("armenianAlphabet.keepGoing.heading")}),e.jsxs("div",{className:"mt-7 grid gap-4 sm:grid-cols-3",children:[e.jsxs(g,{to:o("/armenian-pronunciation"),className:"rounded-2xl bg-white p-5 shadow-sm ring-1 ring-slate-200 transition hover:-translate-y-0.5 hover:shadow-md dark:bg-[#18181b] dark:ring-white/[0.08]",children:[e.jsx("div",{className:"font-display text-base font-extrabold text-slate-800 dark:text-white",children:i[0].title}),e.jsx("p",{className:"mt-1 text-sm font-semibold text-slate-500 dark:text-stone-400",children:i[0].text})]}),e.jsxs(g,{to:o("/armenian-vocabulary"),className:"rounded-2xl bg-white p-5 shadow-sm ring-1 ring-slate-200 transition hover:-translate-y-0.5 hover:shadow-md dark:bg-[#18181b] dark:ring-white/[0.08]",children:[e.jsx("div",{className:"font-display text-base font-extrabold text-slate-800 dark:text-white",children:i[1].title}),e.jsx("p",{className:"mt-1 text-sm font-semibold text-slate-500 dark:text-stone-400",children:i[1].text})]}),e.jsxs(g,{to:o("/learn-armenian-online"),className:"rounded-2xl bg-white p-5 shadow-sm ring-1 ring-slate-200 transition hover:-translate-y-0.5 hover:shadow-md dark:bg-[#18181b] dark:ring-white/[0.08]",children:[e.jsx("div",{className:"font-display text-base font-extrabold text-slate-800 dark:text-white",children:i[2].title}),e.jsx("p",{className:"mt-1 text-sm font-semibold text-slate-500 dark:text-stone-400",children:i[2].text})]})]})]})}),e.jsx("section",{className:"px-5 py-16",children:e.jsxs("div",{className:"mx-auto max-w-3xl",children:[e.jsx("h2",{className:"text-center font-display text-2xl font-extrabold tracking-tight text-slate-800 dark:text-white",children:t("armenianAlphabet.faqHeading")}),e.jsx("div",{className:"mt-8 space-y-5",children:p.map(s=>e.jsxs("div",{children:[e.jsx("div",{className:"text-sm font-extrabold text-slate-800 dark:text-white",children:s.q}),e.jsx("p",{className:"mt-1 text-sm font-semibold text-slate-500 dark:text-stone-400",children:s.a})]},s.q))})]})}),e.jsx("section",{className:"px-5 py-16",children:e.jsxs("div",{className:"relative mx-auto flex max-w-5xl flex-col items-center overflow-hidden rounded-[2rem] bg-brand-500 px-6 py-14 text-center text-white shadow-btn-brand",children:[e.jsx("h2",{className:"font-display text-3xl font-extrabold tracking-tight sm:text-4xl",children:t("armenianAlphabet.cta.heading")}),e.jsx("p",{className:"mt-3 max-w-md text-lg font-semibold text-white/90",children:t("armenianAlphabet.cta.subtext")}),e.jsxs("button",{onClick:()=>a(o("/")),className:"btn3d mt-7 bg-white !text-brand-600 shadow-[0_4px_0_0_#B84B00] text-base uppercase hover:brightness-100",children:[t("armenianAlphabet.cta.button")," ",e.jsx(N,{className:"h-5 w-5 rtl:rotate-180"})]})]})}),e.jsx(O,{tags:$["/armenian-alphabet"]})]}),e.jsx(W,{})]})}
1export{Z as default};
2//# sourceMappingURL=ArmenianAlphabetPage-2e2d3779.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.