@yuktishaalaa/yuktai 5.3.7 → 5.3.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +71 -0
- package/dist/{agent-JGLAYQMX.mjs → agent-G67IA7MY.mjs} +1 -1
- package/dist/chunk-P2PBML6K.mjs +11 -0
- package/dist/chunk-UO7IGXCC.mjs +13 -0
- package/dist/index.d.mts +45 -20
- package/dist/index.d.ts +45 -20
- package/dist/index.js +94 -81
- package/dist/index.mjs +44 -42
- package/dist/rag-Q3LUXSSD.mjs +1 -0
- package/dist/transformers-rag-MQZRMFTG.mjs +1 -0
- package/package.json +2 -2
- package/vanilla/README.md +1 -0
- package/vanilla/index.js +1348 -766
- package/vanilla/index.min.js +54 -53
- package/dist/chunk-3VGU4YGK.mjs +0 -6
- package/dist/chunk-XQMQZMAH.mjs +0 -7
- package/dist/rag-MKBAGH6J.mjs +0 -1
- package/dist/transformers-rag-HW4QKA5T.mjs +0 -1
package/dist/index.mjs
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{$ as
|
|
1
|
+
import{$ as tr,$a as ts,$b as ta,A as Di,Aa as Dr,Ab as Ds,B as Si,Ba as Sr,Bb as Ss,C as Gi,Ca as Gr,Cb as Gs,D as vi,Da as vr,Db as vs,E as Ri,Ea as Rr,Eb as Rs,F as Ni,Fa as Nr,Fb as Ns,G as Fi,Ga as Fr,Gb as Fs,H as Ti,Ha as Tr,Hb as Ts,I as Mi,Ia as Mr,Ib as Ms,J as Li,Ja as Lr,Jb as Ls,K as Yi,Ka as Yr,Kb as Ys,L as Ui,La as Ur,Lb as Us,M as Ji,Ma as Jr,Mb as Js,N as Pi,Na as Pr,Nb as Ps,O as Ki,Oa as Kr,Ob as Ks,P as qi,Pa as qr,Pb as qs,Q as Hi,Qa as Hr,Qb as Hs,R as $i,Ra as $r,Rb as $s,S as Wi,Sa as Wr,Sb as Ws,T as zi,Ta as zr,Tb as zs,U as Oi,Ua as Or,Ub as Os,V as Xi,Va as Xr,Vb as Xs,W as Vi,Wa as Vr,Wb as Vs,X as ji,Xa as jr,Xb as js,Y as Zi,Ya as Zr,Yb as Zs,Z as _i,Za as _r,Zb as _s,_ as er,_a as es,_b as ea,a as Xe,aa as Ar,ab as As,ac as Aa,b as pt,ba as nr,bb as ns,bc as na,c as Ne,ca as or,cb as os,cc as oa,d as $,da as ir,db as is,dc as ia,e as _e,ea as rr,eb as rs,ec as ra,f as me,fa as sr,fb as ss,fc as sa,g as He,ga as ar,gb as as,gc as aa,h as Le,ha as gr,hb as gs,hc as ga,i as UA,ia as lr,ib as ls,ic as la,j as mi,ja as cr,jb as cs,jc as ca,k as JA,ka as Ir,kb as Is,kc as Ia,l as Rn,la as ur,lb as us,lc as ua,m as Nn,ma as dr,mb as ds,mc as da,n as Jt,na as Cr,nb as Cs,nc as Ca,o as Fn,oa as pr,ob as ps,oc as pa,p as iA,pa as fr,pb as fs,pc as fa,q as hi,qa as mr,qb as ms,qc as ma,r as yi,ra as hr,rb as hs,rc as ha,s as Qi,sa as yr,sb as ys,sc as ya,t as Bi,ta as Qr,tb as Qs,tc as Qa,u as bi,ua as Br,ub as Bs,uc as Ba,va as br,vb as bs,vc as ba,w as Ei,wa as Er,wb as Es,wc as Ea,x as wi,xa as wr,xb as ws,xc as wa,y as xi,ya as xr,yb as xs,yc as xa,z as ki,za as kr,zb as ks,zc as ka}from"./chunk-7BGINZ5U.mjs";import{a as Gn}from"./chunk-P2PBML6K.mjs";import{a as vn,c as oA,d as Ut}from"./chunk-UO7IGXCC.mjs";function Tn(){let e=window;return e.Rewriter||e.ai?.rewriter||null}async function PA(){try{let e=Tn();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}async function Da(e){if(!e||e.trim().length<20)return{success:!1,original:e,rewritten:e,error:"Text too short"};try{let t=Tn();if(!t)throw new Error("Rewriter API not available");let A=await t.create({tone:"more-casual",format:"plain-text",length:"as-is",outputLanguage:"en"}),n=await A.rewrite(e,{context:"Rewrite this text in simple plain English. Use short sentences. Avoid jargon. Make it easy to understand for everyone."});return A.destroy(),{success:!0,original:e,rewritten:n.trim()}}catch(t){return{success:!1,original:e,rewritten:e,error:t instanceof Error?t.message:"Rewrite failed"}}}async function Mn(){if(!await PA())return{fixed:0,error:"Chrome Built-in AI Rewriter not available. Enable via chrome://flags."};let t=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, label, figcaption"),A=0;for(let n of t){let o=n.innerText?.trim();if(!o||o.length<20||n.closest("[data-yuktai-panel]"))continue;let r=await Da(o);r.success&&r.rewritten!==o&&(n.dataset.yuktaiOriginal=o,n.innerText=r.rewritten,A++)}return{fixed:A}}function Ln(){let e=document.querySelectorAll("[data-yuktai-original]");for(let t of e){let A=t.dataset.yuktaiOriginal;A&&(t.innerText=A,delete t.dataset.yuktaiOriginal)}}var Yn="yuktai-summary-box";function Un(){let e=window;return e.Summarizer||e.ai?.summarizer||null}async function KA(){try{let e=Un();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}function Sa(){let e=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, article, section"),t=[];for(let A of e){if(A.closest("[data-yuktai-panel]"))continue;let n=window.getComputedStyle(A);if(n.display==="none"||n.visibility==="hidden")continue;let o=A.innerText?.trim();o&&o.length>10&&t.push(o)}return t.join(" ").slice(0,5e3)}async function Jn(){if(!await KA())return{success:!1,summary:"",error:"Chrome Built-in AI Summarizer not available. Enable via chrome://flags."};let t=Sa();if(!t||t.length<100)return{success:!1,summary:"",error:"Not enough text on this page to summarise."};try{let A=Un();if(!A)throw new Error("Summarizer API not available");let n=await A.create({type:"tl;dr",format:"plain-text",length:"short",outputLanguage:"en"}),o=await n.summarize(t,{context:"Summarise this page in 2-3 simple sentences for a screen reader user who wants to know if this page is relevant to them."});return n.destroy(),Ga(o.trim()),{success:!0,summary:o.trim()}}catch(A){return{success:!1,summary:"",error:A instanceof Error?A.message:"Summary failed"}}}function Ga(e){rA();let t=document.createElement("div");t.id=Yn,t.setAttribute("data-yuktai-panel","true"),t.setAttribute("role","region"),t.setAttribute("aria-label","Page summary by yuktai"),t.style.cssText=`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|
|
@@ -15,11 +15,11 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
15
15
|
justify-content: space-between;
|
|
16
16
|
gap: 12px;
|
|
17
17
|
box-shadow: 0 2px 8px rgba(0,0,0,0.15);
|
|
18
|
-
`;let
|
|
18
|
+
`;let A=document.createElement("p");A.style.cssText="margin: 0; flex: 1;",A.textContent=`\u{1F4CB} Page summary: ${e}`;let n=document.createElement("button");n.textContent="\xD7",n.setAttribute("aria-label","Close page summary"),n.style.cssText=`
|
|
19
19
|
background: none; border: none; color: #ffffff;
|
|
20
20
|
font-size: 20px; cursor: pointer; padding: 0 4px;
|
|
21
21
|
line-height: 1; flex-shrink: 0;
|
|
22
|
-
`,
|
|
22
|
+
`,n.addEventListener("click",rA),t.appendChild(A),t.appendChild(n),document.body.prepend(t)}function rA(){let e=document.getElementById(Yn);e&&e.remove()}var aA=[{code:"en",label:"English"},{code:"hi",label:"Hindi"},{code:"es",label:"Spanish"},{code:"fr",label:"French"},{code:"de",label:"German"},{code:"it",label:"Italian"},{code:"pt",label:"Portuguese"},{code:"nl",label:"Dutch"},{code:"pl",label:"Polish"},{code:"ru",label:"Russian"},{code:"ja",label:"Japanese"},{code:"ko",label:"Korean"},{code:"zh",label:"Chinese"},{code:"ar",label:"Arabic"},{code:"tr",label:"Turkish"},{code:"vi",label:"Vietnamese"},{code:"bn",label:"Bengali"},{code:"id",label:"Indonesian"}],sA="en";function va(){let e=window;return e.Translator||e.translation||null}async function Ra(e){try{let t=window;if(!va())return!1;if(t.Translator&&typeof t.Translator.availability=="function")try{let n=await t.Translator.availability({sourceLanguage:"en",targetLanguage:e});return n==="readily"||n==="available"||n==="downloadable"||n==="after-download"}catch{}return t.Translator&&typeof t.Translator.canTranslate=="function"?await t.Translator.canTranslate({sourceLanguage:"en",targetLanguage:e})!=="no":t.translation&&typeof t.translation.canTranslate=="function"?await t.translation.canTranslate({sourceLanguage:"en",targetLanguage:e})!=="no":!1}catch{return!1}}async function Na(e){let t=window,A={sourceLanguage:"en",targetLanguage:e};if(t.Translator&&typeof t.Translator.create=="function")return await t.Translator.create(A);if(t.translation&&typeof t.translation.createTranslator=="function")return await t.translation.createTranslator(A);throw new Error("Translation API not available")}async function Pn(e){if(e===sA)return{success:!0,language:e,fixed:0};if(e==="en")return qA(),sA="en",{success:!0,language:"en",fixed:0};if(!await Ra(e))return{success:!1,language:e,fixed:0,error:`Translation to ${e} not available. Enable via chrome://flags.`};try{let A=await Na(e),n=document.querySelectorAll("p, h1, h2, h3, h4, h5, h6, li, blockquote, td, th, label, figcaption, span, a"),o=0;for(let r of n){if(r.closest("[data-yuktai-panel]")||r.children.length>0)continue;let i=r.innerText?.trim();if(!i||i.length<2)continue;r.dataset.yuktaiTranslationOriginal||(r.dataset.yuktaiTranslationOriginal=i);let s=await A.translate(i);s&&s!==i&&(r.innerText=s,o++)}return typeof A.destroy=="function"&&A.destroy(),sA=e,{success:!0,language:e,fixed:o}}catch(A){return{success:!1,language:e,fixed:0,error:A instanceof Error?A.message:"Translation failed"}}}function qA(){let e=document.querySelectorAll("[data-yuktai-translation-original]");for(let t of e){let A=t.dataset.yuktaiTranslationOriginal;A&&(t.innerText=A,delete t.dataset.yuktaiTranslationOriginal)}sA="en"}var Fa=[{phrases:["go to main","skip to main","main content"],action:"focus-main",label:"Jump to main content"},{phrases:["go to navigation","go to nav","open menu"],action:"focus-nav",label:"Jump to navigation"},{phrases:["go to search","search","find"],action:"focus-search",label:"Jump to search"},{phrases:["scroll down","page down","next"],action:"scroll-down",label:"Scroll down"},{phrases:["scroll up","page up","back up"],action:"scroll-up",label:"Scroll up"},{phrases:["go back","previous page"],action:"go-back",label:"Go back"},{phrases:["click","press","select"],action:"click-focused",label:"Click focused element"},{phrases:["next item","tab forward","tab"],action:"tab-forward",label:"Move to next element"},{phrases:["previous item","tab back","shift tab"],action:"tab-back",label:"Move to previous element"},{phrases:["stop listening","stop voice","quiet"],action:"stop-voice",label:"Stop voice control"}],Fe=null,gA=!1,xt=null;function HA(){return!!(window.SpeechRecognition||window.webkitSpeechRecognition)}function Ta(e){let t=e.toLowerCase().trim();for(let A of Fa)for(let n of A.phrases)if(t.includes(n))return{action:A.action,label:A.label};return null}function Ma(e){switch(e){case"focus-main":{let t=document.querySelector("main, [role='main'], #main");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"focus-nav":{let t=document.querySelector("nav, [role='navigation']");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"focus-search":{let t=document.querySelector("input[type='search'], input[role='searchbox'], [aria-label*='search' i]");t&&(t.focus(),t.scrollIntoView({behavior:"smooth"}));break}case"scroll-down":{window.scrollBy({top:400,behavior:"smooth"});break}case"scroll-up":{window.scrollBy({top:-400,behavior:"smooth"});break}case"go-back":{window.history.back();break}case"click-focused":{let t=document.activeElement;t&&t!==document.body&&t.click();break}case"tab-forward":{let t=Kn(),A=t.indexOf(document.activeElement),n=t[A+1]||t[0];n&&n.focus();break}case"tab-back":{let t=Kn(),A=t.indexOf(document.activeElement),n=t[A-1]||t[t.length-1];n&&n.focus();break}case"stop-voice":{$A();break}}}function Kn(){return Array.from(document.querySelectorAll('a[href], button:not([disabled]), input:not([disabled]), select:not([disabled]), textarea:not([disabled]), [tabindex]:not([tabindex="-1"])')).filter(e=>!e.closest("[data-yuktai-panel]"))}function qn(e){if(!HA())return!1;if(gA)return!0;e&&(xt=e);let t=window.SpeechRecognition||window.webkitSpeechRecognition;return Fe=new t,Fe.continuous=!0,Fe.interimResults=!1,Fe.lang="en-US",Fe.onresult=A=>{let n=A.results[A.results.length-1][0].transcript,o=Ta(n);if(o){Ma(o.action);let r={success:!0,command:n,action:o.label};if(xt&&xt(r),o.action==="stop-voice")return}},Fe.onend=()=>{gA&&Fe?.start()},Fe.onerror=A=>{A.error!=="no-speech"&&xt&&xt({success:!1,command:"",action:"",error:`Voice error: ${A.error}`})},Fe.start(),gA=!0,La(),!0}function $A(){gA=!1,Fe&&(Fe.stop(),Fe=null),xt=null,$n()}var Hn="yuktai-voice-indicator";function La(){$n();let e=document.createElement("div");e.id=Hn,e.setAttribute("data-yuktai-panel","true"),e.setAttribute("aria-live","polite"),e.setAttribute("aria-label","yuktai voice control is listening"),e.style.cssText=`
|
|
23
23
|
position: fixed;
|
|
24
24
|
bottom: 80px;
|
|
25
25
|
left: 50%;
|
|
@@ -44,12 +44,12 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
44
44
|
background: #ffffff;
|
|
45
45
|
animation: yuktai-pulse 1.2s infinite;
|
|
46
46
|
flex-shrink: 0;
|
|
47
|
-
`,!document.getElementById("yuktai-pulse-style")){let
|
|
47
|
+
`,!document.getElementById("yuktai-pulse-style")){let n=document.createElement("style");n.id="yuktai-pulse-style",n.textContent=`
|
|
48
48
|
@keyframes yuktai-pulse {
|
|
49
49
|
0%, 100% { opacity: 1; transform: scale(1); }
|
|
50
50
|
50% { opacity: 0.4; transform: scale(0.7); }
|
|
51
51
|
}
|
|
52
|
-
`,document.head.appendChild(
|
|
52
|
+
`,document.head.appendChild(n)}let A=document.createElement("span");A.textContent="Listening for commands...",e.appendChild(t),e.appendChild(A),document.body.appendChild(e)}function $n(){let e=document.getElementById(Hn);e&&e.remove()}var Ya=["button:not([aria-label]):not([aria-labelledby])","a:not([aria-label]):not([aria-labelledby])","input:not([aria-label]):not([aria-labelledby]):not([id])","select:not([aria-label]):not([aria-labelledby])","textarea:not([aria-label]):not([aria-labelledby])","[role='button']:not([aria-label])","[role='link']:not([aria-label])","[role='checkbox']:not([aria-label])","[role='tab']:not([aria-label])"].join(", ");function Wn(){let e=window;return e.Writer||e.ai?.writer||null}async function WA(){try{let e=Wn();if(!e)return!1;if(typeof e.availability=="function"){let t=await e.availability();return t==="readily"||t==="available"||t==="downloadable"}return typeof e.capabilities=="function"?(await e.capabilities())?.available!=="no":typeof e.create=="function"}catch{return!1}}function Ua(e){let t=[],A=e.innerText?.trim();A&&t.push(`element text: "${A}"`);let n=e.placeholder?.trim();n&&t.push(`placeholder: "${n}"`);let o=e.getAttribute("name")?.trim();o&&t.push(`name: "${o}"`);let r=e.getAttribute("type")?.trim();r&&t.push(`type: "${r}"`);let i=e.id;if(i){let a=document.querySelector(`label[for="${i}"]`);a&&t.push(`label: "${a.innerText?.trim()}"`)}let s=e.parentElement?.innerText?.trim().slice(0,60);s&&t.push(`parent context: "${s}"`),t.push(`tag: ${e.tagName.toLowerCase()}`);let g=e.getAttribute("role");return g&&t.push(`role: ${g}`),t.join(". ")}async function Ja(e,t){let A=`
|
|
53
53
|
Generate a short, clear aria-label for an HTML element.
|
|
54
54
|
The label must be 2-6 words maximum.
|
|
55
55
|
The label must describe what the element does or what it is.
|
|
@@ -60,7 +60,7 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
60
60
|
${t}
|
|
61
61
|
|
|
62
62
|
Output only the label. Nothing else.
|
|
63
|
-
`.trim();return(await e.write(
|
|
63
|
+
`.trim();return(await e.write(A)).trim().replace(/^["']|["']$/g,"").replace(/\.$/,"").trim()}async function zn(){if(!await WA())return{success:!1,fixed:0,elements:[],error:"Chrome Built-in AI Writer not available. Enable via chrome://flags."};let t=document.querySelectorAll(Ya);if(t.length===0)return{success:!0,fixed:0,elements:[]};try{let A=Wn();if(!A)throw new Error("Writer API not available");let n=await A.create({tone:"neutral",format:"plain-text",length:"short",outputLanguage:"en"}),o=0,r=[];for(let i of t){if(i.closest("[data-yuktai-panel]"))continue;let s=window.getComputedStyle(i);if(s.display==="none"||s.visibility==="hidden")continue;let g=Ua(i),a=await Ja(n,g);a&&a.length>0&&(i.dataset.yuktaiLabelOriginal=i.getAttribute("aria-label")||"",i.setAttribute("aria-label",a),o++,r.push({tag:i.tagName.toLowerCase(),label:a}))}return n.destroy(),{success:!0,fixed:o,elements:r}}catch(A){return{success:!1,fixed:0,elements:[],error:A instanceof Error?A.message:"Label generation failed"}}}function On(){let e=document.querySelectorAll("[data-yuktai-label-original]");for(let t of e){let A=t.dataset.yuktaiLabelOriginal;A?t.setAttribute("aria-label",A):t.removeAttribute("aria-label"),delete t.dataset.yuktaiLabelOriginal}}var IA=null,Xn=null;var Vn=null,zA=null,Ie=null,kt=null,lA=null,OA=null,Dt=null,cA={deuteranopia:"yuktai-cb-d",protanopia:"yuktai-cb-p",tritanopia:"yuktai-cb-t"};var jn=new Set(["input","select","textarea"]);var XA={nav:"navigation",header:"banner",footer:"contentinfo",main:"main",aside:"complementary"};function VA(e,t="polite"){if(typeof window>"u"||!Dt?.speechEnabled||!window.speechSynthesis)return;window.speechSynthesis.cancel();let A=new SpeechSynthesisUtterance(e);A.rate=1,A.pitch=1,A.volume=1;let n=window.speechSynthesis.getVoices();n.length>0&&(A.voice=n[0]),window.speechSynthesis.speak(A)}function io(e,t="info"){if(typeof document>"u")return;let n={success:{bg:"#0a7a44",border:"#075e34",icon:"\u2713"},error:{bg:"#b52a1c",border:"#8f2116",icon:"\u2715"},warning:{bg:"#a35f00",border:"#7a4700",icon:"\u26A0"},info:{bg:"#005A9C",border:"#003F6E",icon:"\u2139"}}[t];Ie||(Ie=document.createElement("div"),Ie.setAttribute("role","alert"),Ie.setAttribute("aria-live","assertive"),Ie.setAttribute("aria-atomic","true"),Ie.style.cssText=`
|
|
64
64
|
position: fixed;
|
|
65
65
|
top: 80px;
|
|
66
66
|
right: 16px;
|
|
@@ -79,14 +79,14 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
79
79
|
transition: transform 0.3s, opacity 0.3s;
|
|
80
80
|
transform: translateX(120%);
|
|
81
81
|
opacity: 0;
|
|
82
|
-
`,document.body.appendChild(
|
|
83
|
-
<span style="font-size:18px;font-weight:700">${
|
|
82
|
+
`,document.body.appendChild(Ie)),Ie.style.background=n.bg,Ie.style.border=`1px solid ${n.border}`,Ie.style.color="#fff",Ie.innerHTML=`
|
|
83
|
+
<span style="font-size:18px;font-weight:700">${n.icon}</span>
|
|
84
84
|
<span style="flex:1;line-height:1.4">${e}</span>
|
|
85
85
|
<button
|
|
86
86
|
onclick="this.parentElement.style.transform='translateX(120%)';this.parentElement.style.opacity='0'"
|
|
87
87
|
style="background:none;border:none;color:#fff;cursor:pointer;font-size:18px;padding:0;line-height:1"
|
|
88
88
|
aria-label="Close notification">\xD7</button>
|
|
89
|
-
`,window.innerWidth<=480&&(
|
|
89
|
+
`,window.innerWidth<=480&&(Ie.style.right="8px",Ie.style.left="8px",Ie.style.maxWidth="none",Ie.style.width="auto"),requestAnimationFrame(()=>{Ie&&(Ie.style.transform="translateX(0)",Ie.style.opacity="1")}),setTimeout(()=>{Ie&&(Ie.style.transform="translateX(120%)",Ie.style.opacity="0")},5e3)}function Ae(e,t="info",A=!0){IA&&(IA.textContent=e),io(e,t),A&&VA(e,t==="error"?"assertive":"polite")}function Pa(){if(typeof document>"u"||Vn)return;let e=[{label:"Skip to main content",selector:"main,[role='main'],#main,#main-content"},{label:"Skip to navigation",selector:"nav,[role='navigation'],#nav,#navigation"},{label:"Skip to search",selector:"[role='search'],#search,input[type='search']"}],t=document.createElement("div");t.setAttribute("data-yuktai-skip-bar","true"),t.setAttribute("role","navigation"),t.setAttribute("aria-label","Skip links"),t.style.cssText=`
|
|
90
90
|
position: fixed;
|
|
91
91
|
top: 0;
|
|
92
92
|
left: 0;
|
|
@@ -100,7 +100,7 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
100
100
|
transform: translateY(-100%);
|
|
101
101
|
transition: transform 0.2s ease;
|
|
102
102
|
font-family: system-ui, sans-serif;
|
|
103
|
-
`;let
|
|
103
|
+
`;let A=!1;if(e.forEach(({label:o,selector:r})=>{let i=document.querySelector(r);if(!i)return;A=!0,i.getAttribute("tabindex")||i.setAttribute("tabindex","-1");let s=document.createElement("a");s.href="#",s.textContent=o,s.style.cssText=`
|
|
104
104
|
color: #fff;
|
|
105
105
|
background: #005A9C;
|
|
106
106
|
padding: 8px 14px;
|
|
@@ -111,7 +111,7 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
111
111
|
white-space: nowrap;
|
|
112
112
|
border: 2px solid transparent;
|
|
113
113
|
transition: background 0.15s, border-color 0.15s;
|
|
114
|
-
`,
|
|
114
|
+
`,s.addEventListener("focus",()=>{t.style.transform="translateY(0)"}),s.addEventListener("blur",()=>{setTimeout(()=>{t.matches(":focus-within")||(t.style.transform="translateY(-100%)")},2e3)}),s.addEventListener("click",g=>{g.preventDefault(),i.focus(),i.scrollIntoView({behavior:"smooth",block:"start"}),Ae(`Jumped to ${o.replace("Skip to ","")}`,"info"),t.style.transform="translateY(-100%)"}),t.appendChild(s)}),!A)return;window.innerWidth<768&&(t.style.transform="translateY(0)",t.style.position="sticky"),window.addEventListener("resize",()=>{window.innerWidth<768&&(t.style.transform="translateY(0)")}),document.body.insertBefore(t,document.body.firstChild),Vn=t}function Ka(){if(typeof document>"u"||document.querySelector("[data-yuktai-focus-style]"))return;let e=document.createElement("style");e.setAttribute("data-yuktai-focus-style","true"),e.textContent=`
|
|
115
115
|
|
|
116
116
|
/* \u2500\u2500 Focus indicator \u2014 WCAG 2.4.11 minimum 2px solid \u2500\u2500 */
|
|
117
117
|
[data-yuktai-a11y] *:focus-visible {
|
|
@@ -257,7 +257,7 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
257
257
|
width: auto !important;
|
|
258
258
|
}
|
|
259
259
|
}
|
|
260
|
-
`,document.head.appendChild(e),document.documentElement.setAttribute("data-yuktai-a11y","true")}function
|
|
260
|
+
`,document.head.appendChild(e),document.documentElement.setAttribute("data-yuktai-a11y","true")}function qa(){typeof document>"u"||document.querySelector("[data-yuktai-kb-init]")||(document.documentElement.setAttribute("data-yuktai-kb-init","true"),document.addEventListener("keydown",e=>{let t=document.activeElement;if(!t)return;let A=t.getAttribute("role")||"";if(e.key==="Escape"){let n=t.closest("[role='dialog'],[role='alertdialog']");if(n){n.style.display="none",Ae("Dialog closed","info");return}let o=t.closest("[role='menu'],[role='menubar']");o&&(o.style.display="none",Ae("Menu closed","info"))}if(A==="menuitem"||t.closest("[role='menu'],[role='menubar']")){let n=t.closest("[role='menu'],[role='menubar']");if(!n)return;let o=Array.from(n.querySelectorAll("[role='menuitem']:not([disabled])")),r=o.indexOf(t);e.key==="ArrowDown"||e.key==="ArrowRight"?(e.preventDefault(),o[(r+1)%o.length]?.focus()):e.key==="ArrowUp"||e.key==="ArrowLeft"?(e.preventDefault(),o[(r-1+o.length)%o.length]?.focus()):e.key==="Home"?(e.preventDefault(),o[0]?.focus()):e.key==="End"&&(e.preventDefault(),o[o.length-1]?.focus())}if(A==="tab"||t.closest("[role='tablist']")){let n=t.closest("[role='tablist']");if(!n)return;let o=Array.from(n.querySelectorAll("[role='tab']:not([disabled])")),r=o.indexOf(t);if(e.key==="ArrowRight"||e.key==="ArrowDown"){e.preventDefault();let i=o[(r+1)%o.length];i?.focus(),i?.click()}else if(e.key==="ArrowLeft"||e.key==="ArrowUp"){e.preventDefault();let i=o[(r-1+o.length)%o.length];i?.focus(),i?.click()}}if(A==="option"||t.closest("[role='listbox']")){let n=t.closest("[role='listbox']");if(!n)return;let o=Array.from(n.querySelectorAll("[role='option']:not([aria-disabled='true'])")),r=o.indexOf(t);e.key==="ArrowDown"?(e.preventDefault(),o[(r+1)%o.length]?.focus()):e.key==="ArrowUp"?(e.preventDefault(),o[(r-1+o.length)%o.length]?.focus()):(e.key==="Enter"||e.key===" ")&&(e.preventDefault(),t.setAttribute("aria-selected","true"),o.forEach(i=>{i!==t&&i.setAttribute("aria-selected","false")}),Ae(`Selected: ${t.textContent?.trim()}`,"success"))}e.altKey&&e.key==="a"&&(e.preventDefault(),Ha()),e.key==="Tab"&&Dt?.speechEnabled&&setTimeout(()=>{let n=document.activeElement;if(!n)return;let o=n.getAttribute("aria-label")||n.getAttribute("title")||n.textContent?.trim()||n.tagName.toLowerCase(),r=n.getAttribute("role")||n.tagName.toLowerCase();VA(`${o}, ${r}`)},100)}))}function uA(e){let t=e.querySelectorAll('button:not([disabled]),a[href],input:not([disabled]),select:not([disabled]),textarea:not([disabled]),[tabindex]:not([tabindex="-1"]),[role="button"]');if(t.length===0)return;let A=t[0],n=t[t.length-1];A.focus(),e.addEventListener("keydown",o=>{o.key==="Tab"&&(o.shiftKey?document.activeElement===A&&(o.preventDefault(),n.focus()):document.activeElement===n&&(o.preventDefault(),A.focus()))})}function Ha(){if(typeof document>"u")return;if(kt){kt.remove(),kt=null;return}let e=document.createElement("div");e.setAttribute("role","dialog"),e.setAttribute("aria-label","Keyboard shortcuts"),e.setAttribute("aria-modal","true"),e.setAttribute("data-yuktai-cheatsheet","true"),e.style.cssText=`
|
|
261
261
|
position: fixed;
|
|
262
262
|
top: 50%;
|
|
263
263
|
left: 50%;
|
|
@@ -281,18 +281,18 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
281
281
|
style="background:none;border:none;color:#aaa;cursor:pointer;font-size:20px;padding:0;line-height:1"
|
|
282
282
|
aria-label="Close shortcuts">\xD7</button>
|
|
283
283
|
</div>
|
|
284
|
-
${t.map(([o
|
|
284
|
+
${t.map(([n,o])=>`
|
|
285
285
|
<div style="display:flex;justify-content:space-between;align-items:center;padding:6px 0;border-bottom:1px solid #2a2a4a">
|
|
286
|
-
<kbd style="background:#2a2a4a;color:#74c0fc;padding:3px 8px;border-radius:4px;font-size:12px;font-family:monospace;border:1px solid #3a3a6a">${
|
|
287
|
-
<span style="font-size:12px;color:#ccc;text-align:right;flex:1;margin-left:12px">${
|
|
286
|
+
<kbd style="background:#2a2a4a;color:#74c0fc;padding:3px 8px;border-radius:4px;font-size:12px;font-family:monospace;border:1px solid #3a3a6a">${n}</kbd>
|
|
287
|
+
<span style="font-size:12px;color:#ccc;text-align:right;flex:1;margin-left:12px">${o}</span>
|
|
288
288
|
</div>
|
|
289
289
|
`).join("")}
|
|
290
|
-
`,e.querySelector("[data-yuktai-close]")?.addEventListener("click",()=>{e.remove(),
|
|
290
|
+
`,e.querySelector("[data-yuktai-close]")?.addEventListener("click",()=>{e.remove(),kt=null}),e.addEventListener("keydown",n=>{n.key==="Escape"&&(e.remove(),kt=null)}),document.body.appendChild(e),kt=e,uA(e),Ae("Keyboard shortcuts opened. Press Escape to close.","info")}function $a(e){if(typeof document>"u"||!Dt?.showAuditBadge||typeof window<"u"&&!window.location.hostname.includes("localhost")&&!window.location.hostname.includes("127.0.0.1"))return;zA&&zA.remove();let t=e.score,A=t>=90?"#0f9d58":t>=70?"#f29900":"#d93025",n=t>=90?"\u267F":t>=70?"\u26A0":"\u2715",o=document.createElement("button");o.setAttribute("aria-label",`Accessibility score: ${t} out of 100`),o.setAttribute("data-yuktai-badge","true"),o.style.cssText=`
|
|
291
291
|
position: fixed;
|
|
292
292
|
bottom: 16px;
|
|
293
293
|
left: 16px;
|
|
294
294
|
z-index: 999998;
|
|
295
|
-
background: ${
|
|
295
|
+
background: ${A};
|
|
296
296
|
color: #fff;
|
|
297
297
|
border: none;
|
|
298
298
|
border-radius: 20px;
|
|
@@ -306,7 +306,7 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
306
306
|
align-items: center;
|
|
307
307
|
gap: 6px;
|
|
308
308
|
transition: transform 0.15s;
|
|
309
|
-
`,
|
|
309
|
+
`,o.innerHTML=`${n} ${t}/100 <span style="font-weight:400;opacity:0.85">${e.details.length} issues</span>`,o.addEventListener("click",()=>Wa(e)),document.body.appendChild(o),zA=o}function Wa(e){let t=document.querySelector("[data-yuktai-audit-details]");if(t){t.remove();return}let A=document.createElement("div");A.setAttribute("data-yuktai-audit-details","true"),A.setAttribute("role","dialog"),A.setAttribute("aria-label","Accessibility audit details"),A.style.cssText=`
|
|
310
310
|
position: fixed;
|
|
311
311
|
bottom: 56px;
|
|
312
312
|
left: 16px;
|
|
@@ -323,22 +323,22 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
323
323
|
box-shadow: 0 8px 32px rgba(0,0,0,0.5);
|
|
324
324
|
font-family: system-ui, sans-serif;
|
|
325
325
|
font-size: 12px;
|
|
326
|
-
`;let
|
|
326
|
+
`;let n={critical:"#d93025",serious:"#f29900",moderate:"#1a73e8",minor:"#0f9d58"};A.innerHTML=`
|
|
327
327
|
<div style="display:flex;justify-content:space-between;align-items:center;margin-bottom:12px">
|
|
328
328
|
<strong style="font-size:14px;color:#74c0fc">Audit report</strong>
|
|
329
329
|
<span style="color:#aaa">${e.fixed} fixed \xB7 ${e.renderTime}ms</span>
|
|
330
330
|
</div>
|
|
331
|
-
${e.details.slice(0,20).map(
|
|
331
|
+
${e.details.slice(0,20).map(o=>`
|
|
332
332
|
<div style="padding:6px 0;border-bottom:1px solid #2a2a4a">
|
|
333
333
|
<div style="display:flex;gap:6px;align-items:center">
|
|
334
|
-
<span style="background:${o
|
|
335
|
-
<code style="color:#74c0fc"><${
|
|
334
|
+
<span style="background:${n[o.severity]};color:#fff;padding:1px 6px;border-radius:4px;font-size:10px;font-weight:700;text-transform:uppercase">${o.severity}</span>
|
|
335
|
+
<code style="color:#74c0fc"><${o.tag}></code>
|
|
336
336
|
</div>
|
|
337
|
-
<div style="color:#ccc;margin-top:3px">${
|
|
337
|
+
<div style="color:#ccc;margin-top:3px">${o.fix}</div>
|
|
338
338
|
</div>
|
|
339
339
|
`).join("")}
|
|
340
340
|
${e.details.length>20?`<div style="color:#888;padding:8px 0;text-align:center">+${e.details.length-20} more issues</div>`:""}
|
|
341
|
-
`,
|
|
341
|
+
`,A.addEventListener("keydown",o=>{o.key==="Escape"&&A.remove()}),document.body.appendChild(A),uA(A)}function ro(e){typeof document>"u"||(OA&&clearTimeout(OA),OA=setTimeout(()=>{if(lA)return;let t=document.createElement("div");t.setAttribute("role","alertdialog"),t.setAttribute("aria-label","Session timeout warning"),t.setAttribute("aria-modal","true"),t.setAttribute("data-yuktai-timeout","true"),t.style.cssText=`
|
|
342
342
|
position: fixed;
|
|
343
343
|
top: 50%;
|
|
344
344
|
left: 50%;
|
|
@@ -367,22 +367,26 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
367
367
|
No, sign out
|
|
368
368
|
</button>
|
|
369
369
|
</div>
|
|
370
|
-
`;let
|
|
370
|
+
`;let A=t.querySelector("[data-yuktai-extend]"),n=t.querySelector("[data-yuktai-dismiss]");A?.addEventListener("click",()=>{t.remove(),lA=null,Ae("Session extended. You have more time.","success"),Dt?.timeoutWarning&&ro(Dt.timeoutWarning)}),n?.addEventListener("click",()=>{t.remove(),lA=null}),document.body.appendChild(t),lA=t,uA(t),Ae("Warning: Your session will expire soon. Do you need more time?","warning")},e*1e3))}function za(e){if(typeof document>"u")return;let t=document.documentElement;if(t.toggleAttribute("data-yuktai-high-contrast",!!e.highContrast),t.toggleAttribute("data-yuktai-dark",!!e.darkMode),t.toggleAttribute("data-yuktai-reduce-motion",!!e.reduceMotion),t.toggleAttribute("data-yuktai-large-targets",!!e.largeTargets),t.toggleAttribute("data-yuktai-keyboard",!!e.keyboardHints),t.toggleAttribute("data-yuktai-dyslexia",!!e.dyslexiaFont),e.localFont?document.body.style.fontFamily=`"${e.localFont}", system-ui, sans-serif`:e.dyslexiaFont||(document.body.style.fontFamily=""),e.fontSizeMultiplier&&e.fontSizeMultiplier!==1?document.documentElement.style.fontSize=`${e.fontSizeMultiplier*100}%`:document.documentElement.style.fontSize="",e.colorBlindMode&&e.colorBlindMode!=="none"){let A=e.colorBlindMode==="achromatopsia"?"grayscale(100%)":`url(#${cA[e.colorBlindMode]})`;document.body.style.filter=A}else document.body.style.filter=""}function Oa(e){try{let t=localStorage.getItem("yuktai-a11y-prefs");t&&Object.assign(e,JSON.parse(t))}catch{}}async function Zn(e){if(e){if(!await PA()){Ae("Plain English requires Chrome 127+","warning");return}Ae("Rewriting page in plain English...","info",!1);let A=await Mn();Ae(A.error?`Plain English failed: ${A.error}`:`${A.fixed} sections rewritten in plain English`,A.error?"error":"success",!1)}else Ln(),Ae("Original text restored","info",!1)}async function _n(e){if(e){if(!await KA()){Ae("Page summariser requires Chrome 127+","warning");return}Ae("Generating page summary...","info",!1);let A=await Jn();Ae(A.error?`Summary failed: ${A.error}`:"Page summary added at top",A.error?"error":"success",!1)}else rA(),Ae("Page summary removed","info",!1)}async function eo(e){if(e==="en"){qA(),Ae("Page restored to English","info",!1);return}Ae(`Translating page to ${e}...`,"info",!1);let t=await Pn(e);Ae(t.error?`Translation failed: ${t.error}`:`Page translated to ${e}`,t.error?"error":"success",!1)}async function to(e){if(e){if(!HA()){Ae("Voice control not supported in this browser","warning");return}qn(t=>{t.success&&Ae(`Voice: ${t.action}`,"info",!1)}),Ae("Voice control started. Say a command.","success",!1)}else $A(),Ae("Voice control stopped","info",!1)}async function Ao(e){if(e){if(!await WA()){Ae("Smart labels requires Chrome 127+","warning");return}Ae("Generating smart labels...","info",!1);let A=await zn();Ae(A.error?`Smart labels failed: ${A.error}`:`${A.fixed} elements labelled`,A.error?"error":"success",!1)}else On(),Ae("Smart labels removed","info",!1)}function Xa(){if(typeof document>"u"||IA)return;let e=document.createElement("div");e.setAttribute("aria-live","polite"),e.setAttribute("aria-atomic","true"),e.setAttribute("aria-relevant","text"),e.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);",document.body.appendChild(e),IA=e}function Va(){if(typeof document>"u"||Xn)return;let e=document.createElementNS("http://www.w3.org/2000/svg","svg");e.setAttribute("aria-hidden","true"),e.style.cssText="position:absolute;width:0;height:0;overflow:hidden;",e.innerHTML=`
|
|
371
371
|
<defs>
|
|
372
|
-
<filter id="${
|
|
372
|
+
<filter id="${cA.deuteranopia}">
|
|
373
373
|
<feColorMatrix type="matrix"
|
|
374
374
|
values="0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0"/>
|
|
375
375
|
</filter>
|
|
376
|
-
<filter id="${
|
|
376
|
+
<filter id="${cA.protanopia}">
|
|
377
377
|
<feColorMatrix type="matrix"
|
|
378
378
|
values="0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0"/>
|
|
379
379
|
</filter>
|
|
380
|
-
<filter id="${
|
|
380
|
+
<filter id="${cA.tritanopia}">
|
|
381
381
|
<feColorMatrix type="matrix"
|
|
382
382
|
values="0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0"/>
|
|
383
383
|
</filter>
|
|
384
384
|
</defs>
|
|
385
|
-
`,document.body.appendChild(e),Mo=e}function Yo(e){return e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")||e.getAttribute("title")?.trim()||e.textContent?.trim()?!0:!!e.querySelector("img[alt]:not([alt='']), svg[aria-label], svg title, [aria-label]")}function Ho(e){let t={critical:20,serious:10,moderate:5,minor:2},n=e.details.reduce((o,r)=>o+(t[r.severity]||0),0);return Math.max(0,Math.min(100,100-n))}var ke={name:"yuktai-a11y",version:"4.0.0",observer:null,async execute(e){if(!e.enabled)return this.stopObserver(),"yuktai: disabled.";ft=e,Nl(e),Ml(),Ll(),Tl(),Ql(),e.showSkipLinks!==!1&&Bl(),e.showPreferencePanel,Fl(e);let t=this.applyFixes(e);t.score=Ho(t),e.showAuditBadge&&Gl(t),e.timeoutWarning&&qo(e.timeoutWarning),e.autoFix&&this.startObserver(e),e.plainEnglish&&await Po(!0),e.summarisePage&&await zo(!0),e.translateLanguage&&e.translateLanguage!=="en"&&await Wo(e.translateLanguage),e.voiceControl&&await Uo(!0),e.smartLabels&&await Oo(!0);let n=`${t.fixed} fixes applied. Score: ${t.score}/100.`;return ee(n,t.score>=90?"success":"info",!1),`yuktai v4.0.0: ${n} Scanned ${t.scanned} elements in ${t.renderTime}ms.`},applyFixes(e){let t={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return t;let n=performance.now(),o=document.querySelectorAll("*");t.scanned=o.length;let r=(s,i,a,l)=>{t.details.push({tag:s,fix:i,severity:a,element:l.outerHTML.slice(0,100)}),t.fixed++};return o.forEach(s=>{let i=s,a=i.tagName.toLowerCase();if(a==="html"&&!i.getAttribute("lang")&&(i.setAttribute("lang","en"),r(a,'lang="en" added',"critical",i)),a==="meta"){let u=i.getAttribute("name"),p=i.getAttribute("content")||"";u==="viewport"&&p.includes("user-scalable=no")&&(i.setAttribute("content",p.replace("user-scalable=no","user-scalable=yes")),r(a,"user-scalable=yes restored","serious",i)),u==="viewport"&&/maximum-scale=1(?:[^0-9]|$)/.test(p)&&(i.setAttribute("content",p.replace(/maximum-scale=1(?=[^0-9]|$)/,"maximum-scale=5")),r(a,"maximum-scale=5 restored","serious",i))}if(a==="main"&&!i.getAttribute("tabindex")&&(i.setAttribute("tabindex","-1"),i.getAttribute("id")||i.setAttribute("id","main-content")),a==="img"&&(i.hasAttribute("alt")||(i.setAttribute("alt",""),i.setAttribute("aria-hidden","true"),r(a,'alt="" aria-hidden="true"',"serious",i))),a==="svg"&&(!i.getAttribute("aria-hidden")&&!i.getAttribute("aria-label")&&!s.querySelector("title")&&(i.setAttribute("aria-hidden","true"),r(a,'aria-hidden="true" (decorative svg)',"minor",i)),i.getAttribute("focusable")||i.setAttribute("focusable","false")),a==="iframe"&&!i.getAttribute("title")&&!i.getAttribute("aria-label")&&(i.setAttribute("title","embedded content"),i.setAttribute("aria-label","embedded content"),r(a,"title + aria-label added","serious",i)),a==="button"){if(!Yo(i)){let u=i.getAttribute("title")||"button";i.setAttribute("aria-label",u),r(a,`aria-label="${u}" (empty button)`,"critical",i)}i.hasAttribute("disabled")&&!i.getAttribute("aria-disabled")&&(i.setAttribute("aria-disabled","true"),t.fixed++)}if(a==="a"){let u=i;Yo(i)||(i.setAttribute("aria-label",i.getAttribute("title")||"link"),r(a,"aria-label added (empty link)","critical",i)),u.target==="_blank"&&!u.rel?.includes("noopener")&&(u.rel="noopener noreferrer",t.fixed++)}if($o.has(a)){let u=i;if(!(!!(u.labels&&u.labels.length)||!!i.getAttribute("title")||u.type==="hidden"||u.type==="submit"||u.type==="button"||u.type==="reset")&&!i.getAttribute("aria-label")&&!i.getAttribute("aria-labelledby")){let g=i.getAttribute("placeholder")||i.getAttribute("name")||a;i.setAttribute("aria-label",g),r(a,`aria-label="${g}"`,"serious",i)}if(i.hasAttribute("required")&&!i.getAttribute("aria-required")&&(i.setAttribute("aria-required","true"),t.fixed++),a==="input"&&!u.autocomplete){let g=u.name||"",A=u.type==="email"||g.includes("email")?"email":u.type==="tel"||g.includes("tel")?"tel":u.type==="password"?"current-password":"";A&&(u.autocomplete=A,t.fixed++)}}a==="th"&&!i.getAttribute("scope")&&(i.setAttribute("scope",i.closest("thead")?"col":"row"),r(a,"scope added to <th>","moderate",i));let l=(a==="header"||a==="footer")&&!!i.parentElement?.closest("article,aside,main,nav,section,[role='dialog'],[role='region']");Bn[a]&&!i.getAttribute("role")&&!l&&(i.setAttribute("role",Bn[a]),r(a,`role="${Bn[a]}"`,"minor",i));let c=i.getAttribute("role")||"";c==="tab"&&!i.getAttribute("aria-selected")&&(i.setAttribute("aria-selected","false"),t.fixed++),["alert","status","log"].includes(c)&&!i.getAttribute("aria-live")&&(i.setAttribute("aria-live",c==="alert"?"assertive":"polite"),r(a,`aria-live added on role=${c}`,"moderate",i)),c==="combobox"&&!i.getAttribute("aria-expanded")&&(i.setAttribute("aria-expanded","false"),r(a,'aria-expanded="false" on combobox',"serious",i)),(c==="checkbox"||c==="radio")&&!i.getAttribute("aria-checked")&&(i.setAttribute("aria-checked","false"),r(a,`aria-checked="false" on role=${c}`,"serious",i))}),t.renderTime=parseFloat((performance.now()-n).toFixed(2)),t},scan(){let e={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return e;let t=performance.now(),n=document.querySelectorAll("*");e.scanned=n.length;let o=(r,s,i,a)=>e.details.push({tag:r,fix:s,severity:i,element:a.outerHTML.slice(0,100)});return n.forEach(r=>{let s=r,i=s.tagName.toLowerCase();(i==="a"||i==="button")&&!s.innerText?.trim()&&!s.getAttribute("aria-label")&&o(i,"needs aria-label (empty)","critical",s),i==="img"&&!s.hasAttribute("alt")&&o(i,"needs alt text","serious",s),$o.has(i)&&!s.getAttribute("aria-label")&&!s.getAttribute("aria-labelledby")&&o(i,"needs aria-label","serious",s),i==="iframe"&&!s.getAttribute("title")&&!s.getAttribute("aria-label")&&o(i,"iframe needs title","serious",s)}),e.fixed=e.details.length,e.score=Ho(e),e.renderTime=parseFloat((performance.now()-t).toFixed(2)),e},startObserver(e){this.observer||typeof document>"u"||(this.observer=new MutationObserver(()=>this.applyFixes(e)),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!1}))},stopObserver(){this.observer?.disconnect(),this.observer=null},announce:ee,speak:Tn,showVisualAlert:Jo,trapFocus:Kt,handlePlainEnglish:Po,handleSummarisePage:zo,handleTranslate:Wo,handleVoiceControl:Uo,handleSmartLabels:Oo,SUPPORTED_LANGUAGES:Ot};import rc,{useEffect as bt,useState as Ae,useCallback as yt}from"react";import{forwardRef as $l,useEffect as _t,useState as it}from"react";import{jsx as E,jsxs as _}from"react/jsx-runtime";var Qn={highContrast:!1,reduceMotion:!1,autoFix:!0,dyslexiaFont:!1,fontScale:100,localFont:"",darkMode:!1,largeTargets:!1,speechEnabled:!1,colorBlindMode:"none",showAuditBadge:!1,timeoutWarning:void 0,plainEnglish:!1,summarisePage:!1,translateLanguage:"en",voiceControl:!1,smartLabels:!1},mt=[80,90,100,110,120,130],Pl=[{value:"none",label:"None"},{value:"deuteranopia",label:"Deuteranopia"},{value:"protanopia",label:"Protanopia"},{value:"tritanopia",label:"Tritanopia"},{value:"achromatopsia",label:"Greyscale"}],zl=["Prompt API for Gemini Nano","Summarization API for Gemini Nano","Writer API for Gemini Nano","Rewriter API for Gemini Nano","Translation API"];function Wl(){let[e,t]=it(typeof window<"u"?window.innerWidth:1024);return _t(()=>{let n=()=>t(window.innerWidth);return window.addEventListener("resize",n),()=>window.removeEventListener("resize",n)},[]),{isMobile:e<=480,isTablet:e>480&&e<=768}}function Ul({checked:e,onChange:t,label:n,disabled:o=!1}){return _("label",{"aria-label":n,style:{position:"relative",display:"inline-flex",width:"40px",height:"24px",cursor:o?"not-allowed":"pointer",flexShrink:0,opacity:o?.4:1},children:[E("input",{type:"checkbox",checked:e,disabled:o,onChange:r=>t(r.target.checked),style:{opacity:0,width:0,height:0,position:"absolute"}}),E("span",{style:{position:"absolute",inset:0,borderRadius:"99px",background:e?"#0d9488":"#cbd5e1",transition:"background 0.2s"}}),E("span",{style:{position:"absolute",top:"3px",left:e?"19px":"3px",width:"18px",height:"18px",background:"#fff",borderRadius:"50%",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",pointerEvents:"none"}})]})}function ht({label:e,color:t="#64748b",badge:n,concept:o}){return _("div",{style:{margin:"10px 18px 4px"},children:[_("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[E("p",{style:{margin:0,fontSize:"10px",fontWeight:600,color:t,letterSpacing:"0.06em",textTransform:"uppercase"},children:e}),n&&E("span",{style:{fontSize:"9px",fontWeight:500,padding:"1px 7px",borderRadius:"99px",background:"#f5f3ff",color:"#7c3aed",border:"0.5px solid #c4b5fd",whiteSpace:"nowrap"},children:n})]}),o&&E("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8",fontStyle:"italic"},children:o})]})}function Fe({icon:e,label:t,desc:n,checked:o,onChange:r,disabled:s=!1,disabledReason:i,tip:a}){return _("div",{title:s?i:a,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 18px",gap:"12px"},children:[_("div",{style:{display:"flex",alignItems:"center",gap:"10px",flex:1,minWidth:0},children:[E("span",{"aria-hidden":"true",style:{width:"32px",height:"32px",borderRadius:"8px",background:s?"#f1f5f9":"#f0fdfa",color:s?"#94a3b8":"#0d9488",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"15px",flexShrink:0,fontWeight:700},children:e}),_("div",{style:{minWidth:0},children:[E("p",{style:{margin:0,fontSize:"13px",fontWeight:500,color:s?"#94a3b8":"#0f172a",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),E("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:s?i:n})]})]}),E(Ul,{checked:o,onChange:r,label:`Toggle ${t}`,disabled:s})]})}function xe(){return E("div",{style:{height:"1px",background:"#f1f5f9"}})}function Et({steps:e}){return _("div",{style:{margin:"0 18px 8px",padding:"8px 10px",background:"#f8fafc",borderRadius:"8px",border:"0.5px solid #e2e8f0"},children:[E("p",{style:{margin:"0 0 4px",fontSize:"9px",fontWeight:600,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"How to use"}),e.map((t,n)=>_("p",{style:{margin:"0 0 2px",fontSize:"10px",color:"#475569"},children:[n+1,". ",t]},n))]})}var Rn=$l(({position:e,settings:t,report:n,isActive:o,aiSupported:r,voiceSupported:s,set:i,onApply:a,onReset:l,onClose:c},u)=>{let{isMobile:p,isTablet:g}=Wl(),[A,f]=it([]),[h,d]=it(""),[b,I]=it(""),[m,x]=it(!1),[y,k]=it(null),[v,R]=it("idle");_t(()=>{let C=window;!!(C.LanguageModel||C.ai?.languageModel)&&r?k("gemini"):$t()&&k("transformers")},[r]),_t(()=>{if(y!=="transformers")return;let C=setInterval(()=>{R(Pt())},500);return()=>clearInterval(C)},[y]);let z=async()=>{if(!(!h.trim()||m)){if(!y){I("\u26A0\uFE0F No AI engine available on this device.");return}x(!0),I("");try{let C;y==="gemini"?C=await ho(h):(R("loading"),C=await bo(h),R("ready")),I(C.success&&C.answer?C.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(C.error||"No answer found on this page"))}catch{I("\u26A0\uFE0F Failed to get answer. Please try again.")}x(!1)}};_t(()=>{(async()=>{try{let Y=window;if(!Y.queryLocalFonts)return;let K=await Y.queryLocalFonts(),M=[...new Set(K.map(re=>re.family))].sort();f(M.slice(0,50))}catch{}})()},[]);let N=y==="gemini"?"Gemini Nano":y==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",T=y==="transformers"&&v==="loading"?"Loading AI model... (first time only)":"...",S=p?{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px 16px 0 0",boxShadow:"0 -8px 32px rgba(0,0,0,0.12)",maxHeight:"90vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif",width:"100%"}:{position:"fixed",bottom:"84px",[e]:"24px",zIndex:9999,width:g?"300px":"320px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",maxHeight:"80vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif"};return _("div",{ref:u,role:"dialog","aria-modal":"true","aria-label":"yuktai accessibility preferences","data-yuktai-panel":"true",style:S,children:[_("div",{style:{padding:"14px 18px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[_("div",{children:[_("div",{style:{display:"flex",alignItems:"center",gap:"7px",marginBottom:"4px",flexWrap:"wrap"},children:[E("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0d9488",letterSpacing:"0.05em",fontFamily:"monospace"},children:"@yuktishaalaa/yuktai"}),o&&E("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0f766e",border:"1px solid #99f6e4"},children:"\u25CF ACTIVE"})]}),E("p",{style:{margin:"0 0 1px",fontSize:"15px",fontWeight:600,color:"#0f172a"},children:"Accessibility"}),E("p",{style:{margin:0,fontSize:"11px",color:"#64748b"},children:"WCAG 2.2 \xB7 Open source \xB7 Zero cost \xB7 All devices"})]}),E("button",{onClick:c,"aria-label":"Close accessibility panel",style:{background:"none",border:"none",cursor:"pointer",padding:"4px",color:"#94a3b8",fontSize:"20px",lineHeight:1,borderRadius:"6px",flexShrink:0,minWidth:p?"44px":"auto",minHeight:p?"44px":"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),E(ht,{label:"\u267F Core Accessibility",concept:"Rule-based engine \u2014 works on all browsers and devices"}),E(Et,{steps:["Toggle any feature on","Click Apply settings","Preferences saved automatically"]}),E(Fe,{icon:"\u{1F527}",label:"Auto-fix ARIA",desc:"Injects missing labels and roles automatically",checked:t.autoFix,onChange:C=>i("autoFix",C),tip:"Fixes aria-label, alt text, roles on every element"}),E(xe,{}),E(Fe,{icon:"\u{1F50A}",label:"Speak on focus",desc:"Browser reads elements aloud as you tab",checked:t.speechEnabled,onChange:C=>i("speechEnabled",C),tip:"Uses browser SpeechSynthesis \u2014 no install needed"}),E(xe,{}),E(Fe,{icon:"\u{1F399}\uFE0F",label:"Voice control",desc:"Say commands to navigate the page",checked:t.voiceControl,onChange:C=>i("voiceControl",C),disabled:!s,disabledReason:"Not supported in this browser",tip:'Say "scroll down", "go to main", "click"'}),E(xe,{}),E(ht,{label:"\u{1F916} AI Features",color:"#7c3aed",badge:"Gemini Nano",concept:"Large Language Model running privately on your device \u2014 Chrome 127+ only"}),E("div",{style:{margin:"4px 18px 6px",padding:"8px 10px",background:r?"#f0fdfa":"#f5f3ff",borderRadius:"8px",border:`0.5px solid ${r?"#99f6e4":"#c4b5fd"}`,fontSize:"10px",color:r?"#0f766e":"#7c3aed",lineHeight:1.5},children:r?"\u2705 Gemini Nano detected \u2014 AI features ready. Runs privately on your device.":"\u2699\uFE0F AI features need one-time setup \u2014 see guide below."}),!r&&_("div",{style:{margin:"0 18px 8px",padding:"10px 12px",background:"#fafafa",borderRadius:"8px",border:"0.5px solid #e2e8f0",fontSize:"11px",color:"#475569",lineHeight:1.7},children:[E("p",{style:{margin:"0 0 6px",fontWeight:600,color:"#0f172a",fontSize:"11px"},children:"\u{1F6E0} One-time setup \u2014 5 steps:"}),_("p",{style:{margin:"0 0 3px"},children:["1. Open Chrome \u2192 ",E("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://flags"})]}),E("p",{style:{margin:"0 0 3px"},children:"2. Enable each flag:"}),E("div",{style:{display:"flex",flexDirection:"column",gap:"2px",margin:"4px 0 6px 10px"},children:zl.map(C=>_("span",{style:{fontSize:"10px",color:"#7c3aed",fontFamily:"monospace"},children:["\u2192 ",C]},C))}),_("p",{style:{margin:"0 0 3px"},children:["3. Click ",E("strong",{style:{color:"#0f172a"},children:"Relaunch"})]}),_("p",{style:{margin:"0 0 3px"},children:["4. ",E("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://components"})," \u2192 Optimization Guide On Device Model \u2192 Check for update"]}),E("p",{style:{margin:"0"},children:"5. Refresh \u2014 AI features unlock automatically \u2705"})]}),E(Fe,{icon:"\u{1F4DD}",label:"Plain English mode",desc:"Rewrites complex text in simple language",checked:t.plainEnglish,onChange:C=>i("plainEnglish",C),disabled:!r,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: LLM text rewriting"}),E(xe,{}),E(Fe,{icon:"\u{1F4CB}",label:"Summarise page",desc:"3-sentence summary appears at top",checked:t.summarisePage,onChange:C=>i("summarisePage",C),disabled:!r,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Abstractive summarisation"}),E(xe,{}),E(Fe,{icon:"\u{1F3F7}\uFE0F",label:"Smart aria-labels",desc:"AI generates meaningful labels for elements",checked:t.smartLabels,onChange:C=>i("smartLabels",C),disabled:!r,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Context-aware label generation"}),E(xe,{}),E(ht,{label:"\u{1F441}\uFE0F Visual",concept:"CSS filter-based \u2014 works on all browsers and devices"}),E(Et,{steps:["Toggle any visual mode","Changes apply instantly","Works on mobile and desktop"]}),E(Fe,{icon:"\u25D1",label:"High contrast",desc:"Boosts contrast for low vision users",checked:t.highContrast,onChange:C=>i("highContrast",C),tip:"CSS filter: contrast()"}),E(xe,{}),E(Fe,{icon:"\u{1F319}",label:"Dark mode",desc:"Inverts colours \u2014 easy on eyes at night",checked:t.darkMode,onChange:C=>i("darkMode",C),tip:"CSS filter: invert + hue-rotate"}),E(xe,{}),E(Fe,{icon:"\u23F8\uFE0F",label:"Reduce motion",desc:"Disables all animations",checked:t.reduceMotion,onChange:C=>i("reduceMotion",C),tip:"WCAG 2.3.3 \u2014 vestibular disorders"}),E(xe,{}),E(Fe,{icon:"\u{1F446}",label:"Large targets",desc:"44\xD744px minimum touch targets",checked:t.largeTargets,onChange:C=>i("largeTargets",C),tip:"WCAG 2.5.8 \u2014 motor impaired users"}),E(xe,{}),_("div",{style:{padding:"10px 18px"},children:[E("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F3A8} Colour blindness"}),E("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"SVG colour matrix filters \u2014 all devices"}),E("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:Pl.map(C=>E("button",{onClick:()=>i("colorBlindMode",C.value),"aria-pressed":t.colorBlindMode===C.value,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.colorBlindMode===C.value?"#0d9488":"#e2e8f0"}`,background:t.colorBlindMode===C.value?"#f0fdfa":"#fff",color:t.colorBlindMode===C.value?"#0d9488":"#64748b",cursor:"pointer",minHeight:p?"36px":"auto"},children:C.label},C.value))})]}),E(xe,{}),E(ht,{label:"\u{1F524} Font",concept:"Browser Font API + CSS \u2014 Chrome 103+"}),E(Et,{steps:["Toggle dyslexia font or pick from device","Adjust size with + / \u2212","Saved across visits"]}),E(Fe,{icon:"Aa",label:"Dyslexia-friendly font",desc:"Atkinson Hyperlegible \u2014 research-backed",checked:t.dyslexiaFont,onChange:C=>i("dyslexiaFont",C),tip:"By Braille Institute \u2014 free and open source"}),E(xe,{}),_("div",{style:{padding:"10px 18px"},children:[E("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F5A5}\uFE0F Local font"}),E("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"window.queryLocalFonts() \u2014 Chrome 103+"}),A.length>0?_("select",{value:t.localFont,onChange:C=>i("localFont",C.target.value),"aria-label":"Choose a font from your device",style:{width:"100%",padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"13px",color:"#0f172a",background:"#fff",cursor:"pointer",height:p?"44px":"36px"},children:[E("option",{value:"",children:"System default"}),A.map(C=>E("option",{value:C,style:{fontFamily:C},children:C},C))]}):E("p",{style:{margin:0,fontSize:"11px",color:"#94a3b8"},children:"Allow font access when Chrome prompts you."})]}),E(xe,{}),_("div",{style:{padding:"10px 18px 14px"},children:[_("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[_("div",{children:[E("p",{style:{margin:0,fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F4CF} Text size"}),E("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:"Scales all text on the page"})]}),_("span",{style:{fontSize:"12px",fontWeight:600,color:"#0d9488",background:"#f0fdfa",padding:"2px 8px",borderRadius:"99px"},children:[t.fontScale,"%"]})]}),_("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[E("button",{onClick:()=>{let C=mt.indexOf(t.fontScale);C>0&&i("fontScale",mt[C-1])},disabled:t.fontScale<=80,"aria-label":"Decrease text size",style:{width:p?"44px":"30px",height:p?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale<=80?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale<=80?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"\u2212"}),E("div",{style:{flex:1,display:"flex",gap:"3px"},children:mt.map(C=>E("button",{onClick:()=>i("fontScale",C),"aria-label":`Set text size to ${C}%`,style:{flex:1,height:"6px",borderRadius:"99px",border:"none",cursor:"pointer",padding:0,background:C<=t.fontScale?"#0d9488":"#e2e8f0",transition:"background 0.15s"}},C))}),E("button",{onClick:()=>{let C=mt.indexOf(t.fontScale);C<mt.length-1&&i("fontScale",mt[C+1])},disabled:t.fontScale>=130,"aria-label":"Increase text size",style:{width:p?"44px":"30px",height:p?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale>=130?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale>=130?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"+"})]})]}),E(xe,{}),E(ht,{label:"\u{1F310} Translate",color:"#7c3aed",badge:"Gemini Nano",concept:"Chrome Translation API \u2014 on device, no internet after setup"}),E(Et,{steps:["Enable Gemini Nano first","Pick your language","Full page translates instantly"]}),_("div",{style:{padding:"6px 18px 12px"},children:[E("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:Ot.slice(0,p?8:18).map(C=>E("button",{onClick:()=>i("translateLanguage",C.code),"aria-pressed":t.translateLanguage===C.code,disabled:!r,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.translateLanguage===C.code?"#7c3aed":"#e2e8f0"}`,background:t.translateLanguage===C.code?"#f5f3ff":"#fff",color:t.translateLanguage===C.code?"#7c3aed":"#64748b",cursor:r?"pointer":"not-allowed",opacity:r?1:.5,minHeight:p?"36px":"auto"},children:C.label},C.code))}),!r&&E("p",{style:{margin:"6px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano using the setup guide above."})]}),E(xe,{}),E(ht,{label:"\u{1F4AC} Ask This Page",color:"#0d9488",badge:N,concept:"RAG \u2014 Retrieval Augmented Generation. Works on all devices including mobile."}),E(Et,{steps:["Type any question about this page","Press Ask or hit Enter",y==="transformers"?"Transformers.js answers \u2014 works on mobile, offline":"Gemini Nano reads page and answers privately","Zero cost. No data leaves your device."]}),_("div",{style:{margin:"0 18px 8px",padding:"6px 10px",background:y==="gemini"?"#f0fdfa":y==="transformers"?"#f5f3ff":"#f8fafc",borderRadius:"8px",border:`0.5px solid ${y==="gemini"?"#99f6e4":y==="transformers"?"#c4b5fd":"#e2e8f0"}`,fontSize:"10px",color:y==="gemini"?"#0f766e":y==="transformers"?"#7c3aed":"#94a3b8"},children:[y==="gemini"&&"\u2705 Using Gemini Nano \u2014 on device, private, instant",y==="transformers"&&"\u2705 Using Transformers.js \u2014 works on mobile and all browsers",!y&&"\u23F3 Detecting AI engine...",y==="transformers"&&v==="loading"&&" \xB7 Loading model...",y==="transformers"&&v==="ready"&&" \xB7 Model ready \u2705"]}),_("div",{style:{padding:"0 18px 14px"},children:[_("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[E("input",{type:"text",value:h,onChange:C=>d(C.target.value),onKeyDown:C=>{C.key==="Enter"&&z()},placeholder:"e.g. What does this page do?",disabled:m||!y,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:y?"#fff":"#f8fafc",outline:"none",height:p?"44px":"36px"}}),E("button",{onClick:z,disabled:m||!h.trim()||!y,"aria-label":"Ask question",style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:y&&h.trim()&&!m?"#0d9488":"#e2e8f0",color:y&&h.trim()&&!m?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:y&&h.trim()&&!m?"pointer":"not-allowed",flexShrink:0,height:p?"44px":"36px",minWidth:"52px",transition:"background 0.2s"},children:m?T:"Ask"})]}),b&&_("div",{role:"status","aria-live":"polite",style:{padding:"10px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",lineHeight:1.6,maxHeight:"180px",overflowY:"auto"},children:[E("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#0d9488"},children:"\u{1F4AC} Answer"}),b,E("button",{onClick:()=>{I(""),d("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]})]}),n&&E("div",{role:"status",style:{margin:"0 14px 10px",padding:"8px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",fontWeight:500,fontFamily:"monospace"},children:n.fixed>0?`\u2713 ${n.fixed} fixes \xB7 ${n.scanned} nodes \xB7 ${n.renderTime}ms \xB7 Score: ${n.score}/100`:`\u2713 0 auto-fixes needed \xB7 ${n.scanned} nodes \xB7 ${n.renderTime}ms`}),_("div",{style:{display:"flex",gap:"8px",padding:"12px 14px 14px",position:p?"sticky":"relative",bottom:p?0:"auto",background:"#fff",borderTop:"1px solid #f1f5f9"},children:[E("button",{onClick:l,style:{flex:1,padding:p?"12px 0":"8px 0",fontSize:"13px",fontWeight:500,borderRadius:"9px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",cursor:"pointer"},children:"Reset"}),E("button",{onClick:a,style:{flex:2,padding:p?"12px 0":"8px 0",fontSize:"13px",fontWeight:600,borderRadius:"9px",border:"none",background:"#0d9488",color:"#fff",cursor:"pointer"},children:"Apply settings"})]})]})});Rn.displayName="WidgetPanel";import{useState as St,useCallback as _o}from"react";var Ol={hotel:["hotel","resort","motel","inn","accommodation","lodge","stay","room","booking","hospitality"],ecommerce:["shop","store","ecommerce","e-commerce","sell","product","cart","buy","marketplace","retail"],restaurant:["restaurant","food","cafe","cafeteria","menu","dining","eat","cuisine","bistro","takeaway","delivery"],portfolio:["portfolio","freelance","personal","designer","developer","creative","showcase","work","hire me"],blog:["blog","article","post","write","news","magazine","journal","content"],saas:["saas","dashboard","app","software","platform","tool","analytics","admin","manage","crm"],government:["government","govt","portal","citizen","scheme","welfare","municipal","public","official"],healthcare:["hospital","clinic","doctor","health","medical","patient","appointment","pharmacy"],education:["school","college","university","course","learn","education","student","lms","training"],realestate:["real estate","property","house","flat","apartment","rent","buy property","listing"],landing:["landing","startup","launch","product launch","coming soon","waitlist"],generic:[]},Yl={hotel:["home","rooms","booking","about","contact"],ecommerce:["home","products","cart","checkout","about","contact"],restaurant:["home","menu","reservations","about","contact"],portfolio:["home","portfolio","about","contact"],blog:["home","blog","about","contact"],saas:["home","pricing","dashboard","auth","about","contact"],government:["home","services","about","contact","faq"],healthcare:["home","services","booking","team","about","contact"],education:["home","services","pricing","about","contact"],realestate:["home","products","about","contact"],landing:["home","pricing","about","contact"],generic:["home","about","services","contact"]},Hl={home:["home","homepage","main","landing"],about:["about","who we are","our story","company"],contact:["contact","reach us","get in touch","location"],services:["service","what we offer","solution","offering"],pricing:["pricing","price","plan","subscription","cost","fee"],blog:["blog","article","news","post"],auth:["login","register","signup","sign up","sign in","auth","account"],dashboard:["dashboard","admin","panel","manage","analytics"],gallery:["gallery","photo","image","portfolio"],products:["product","shop","store","item","catalogue"],cart:["cart","basket","shopping cart"],checkout:["checkout","payment","pay","order"],rooms:["room","suite","accommodation","stay"],booking:["booking","reserve","reservation","schedule","appointment"],menu:["menu","food","dish","cuisine"],reservations:["reservation","table booking","book table"],portfolio:["portfolio","work","project","case study"],team:["team","staff","member","people","who we are"],faq:["faq","question","answer","help","support"],terms:["terms","condition","legal"],privacy:["privacy","policy","gdpr","data"]},Jl={Authentication:["login","register","auth","signup","sign in","account"],Payment:["payment","stripe","pay","checkout","billing"],Search:["search","filter","find"],"Dark mode":["dark mode","dark theme","night mode"],"Multi-language":["multilingual","multi language","translation","i18n"],SEO:["seo","search engine","meta","google"],Analytics:["analytics","tracking","stats","dashboard"],Email:["email","newsletter","contact form","notification"],Map:["map","location","address","google maps"],"Social media":["social","instagram","facebook","twitter","share"],"Image gallery":["gallery","photo","image","carousel"],"Booking system":["booking","reservation","appointment","schedule"],"Shopping cart":["cart","basket","shop","ecommerce"],"Blog/CMS":["blog","cms","content","article","post"]},ql={blue:["blue","navy","sky","ocean","corporate"],green:["green","nature","eco","environment","health","fresh"],purple:["purple","violet","luxury","creative","royal"],red:["red","bold","energy","passion","food"],orange:["orange","warm","friendly","fun"],teal:["teal","turquoise","modern","tech"],indigo:["indigo","professional","trust","finance","bank"],gray:["gray","minimal","clean","simple","neutral"]},Kl={hotel:"indigo",ecommerce:"blue",restaurant:"red",portfolio:"purple",blog:"gray",saas:"teal",government:"blue",healthcare:"green",education:"indigo",realestate:"orange",landing:"purple",generic:"blue"};function _l(e){let t=[/(?:for|called|named|company|business|brand)\s+["']?([A-Z][a-zA-Z\s]{1,30})["']?/i,/["']([A-Z][a-zA-Z\s]{1,30})["']/,/^([A-Z][a-zA-Z]+(?:\s[A-Z][a-zA-Z]+)?)/m];for(let n of t){let o=e.match(n);if(o?.[1]){let r=o[1].trim();if(r.length>2&&r.length<40)return r}}return"My Business"}function jl(e){let t=e.toLowerCase(),n="generic",o=0;for(let[r,s]of Object.entries(Ol)){let i=0;for(let a of s)t.includes(a)&&i++;i>o&&(o=i,n=r)}return n}function Vl(e,t){let n=e.toLowerCase(),o=new Set(Yl[t]);for(let[r,s]of Object.entries(Hl))for(let i of s)if(n.includes(i)){o.add(r);break}return o.add("home"),o.add("contact"),Array.from(o)}function Xl(e){let t=e.toLowerCase(),n=[];for(let[o,r]of Object.entries(Jl))for(let s of r)if(t.includes(s)){n.push(o);break}return n}function Zl(e,t){let n=e.toLowerCase();for(let[o,r]of Object.entries(ql))for(let s of r)if(n.includes(s))return o;return Kl[t]}function Ko(e){let t=jl(e),n=Vl(e,t),o=Xl(e),r=Zl(e,t);return{siteName:_l(e),websiteType:t,pages:n,features:o,theme:r,description:e.slice(0,200)}}import{Fragment as oc,jsx as q,jsxs as se}from"react/jsx-runtime";var ec=["Hotel booking website for Grand Palace Hotels with rooms, booking and payment","E-commerce store for organic food products with cart and checkout","Restaurant website for Spice Garden with menu and table reservations","Portfolio website for a freelance designer with gallery and contact","SaaS dashboard for project management with pricing and auth","Government portal for citizen services with FAQ and contact"],tc={home:"\u{1F3E0}",about:"\u2139\uFE0F",contact:"\u{1F4EC}",services:"\u2699\uFE0F",pricing:"\u{1F4B0}",blog:"\u{1F4DD}",auth:"\u{1F510}",dashboard:"\u{1F4CA}",gallery:"\u{1F5BC}\uFE0F",products:"\u{1F6D2}",cart:"\u{1F6CD}\uFE0F",checkout:"\u{1F4B3}",rooms:"\u{1F6CF}\uFE0F",booking:"\u{1F4C5}",menu:"\u{1F37D}\uFE0F",reservations:"\u{1FA91}",portfolio:"\u{1F4BC}",team:"\u{1F465}",faq:"\u2753",terms:"\u{1F4C4}",privacy:"\u{1F512}"},nc={hotel:"\u{1F3E8}",ecommerce:"\u{1F6D2}",restaurant:"\u{1F37D}\uFE0F",portfolio:"\u{1F4BC}",blog:"\u{1F4DD}",saas:"\u26A1",government:"\u{1F3DB}\uFE0F",healthcare:"\u{1F3E5}",education:"\u{1F393}",realestate:"\u{1F3E0}",landing:"\u{1F680}",generic:"\u{1F310}"};function Gn({position:e,onClose:t}){let[n,o]=St("input"),[r,s]=St(""),[i,a]=St(null),[l,c]=St(0),[u,p]=St(""),g=_o(()=>{if(!r.trim())return;let d=Ko(r);a(d),o("preview")},[r]),A=_o(async()=>{if(i){o("generating"),c(0),p("");try{let d=[{msg:"Parsing requirement...",pct:15},{msg:"Loading templates...",pct:30},{msg:"Generating pages...",pct:55},{msg:"Building components...",pct:70},{msg:"Creating styles...",pct:85},{msg:"Packaging ZIP...",pct:95}];for(let I of d)c(I.pct),await new Promise(m=>setTimeout(m,200));let{generateZip:b}=await import("./zip-generator-D5EXBBNS.mjs");await b(i),c(100),o("done")}catch(d){p(d instanceof Error?d.message:"Generation failed. Please try again."),o("preview")}}},[i]),f=()=>{o("input"),s(""),a(null),c(0),p("")},h={position:"fixed",bottom:"204px",[e]:"24px",zIndex:9999,width:"340px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.14)",fontFamily:"system-ui,-apple-system,sans-serif",maxHeight:"75vh",overflowY:"auto"};return se("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai Vibe Coder","data-yuktai-panel":"true",style:h,children:[se("div",{style:{padding:"14px 16px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[se("div",{children:[q("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:700,color:"#0f172a"},children:"\u26A1 Vibe Coder"}),q("p",{style:{margin:0,fontSize:"10px",color:"#64748b"},children:"Describe your website \u2192 Download Next.js ZIP"})]}),q("button",{onClick:t,"aria-label":"Close vibe coder",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",padding:"2px"},children:"\xD7"})]}),n==="input"&&se("div",{style:{padding:"14px 16px"},children:[q("p",{style:{margin:"0 0 10px",fontSize:"11px",color:"#64748b"},children:"Describe your business website in plain English. The plugin will generate a complete Next.js project for you."}),q("p",{style:{margin:"0 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Examples"}),q("div",{style:{display:"flex",flexDirection:"column",gap:"4px",marginBottom:"12px"},children:ec.slice(0,3).map(d=>q("button",{onClick:()=>s(d),style:{padding:"6px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#475569",fontSize:"10px",cursor:"pointer",textAlign:"left",lineHeight:1.4},children:d},d))}),q("textarea",{value:r,onChange:d=>s(d.target.value),placeholder:"e.g. I need a hotel booking website with rooms, search, and payment for Grand Palace Hotels",rows:4,"aria-label":"Describe your website",style:{width:"100%",padding:"10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",resize:"vertical",outline:"none",fontFamily:"inherit",lineHeight:1.5}}),q("button",{onClick:g,disabled:!r.trim(),style:{width:"100%",marginTop:"10px",padding:"10px",borderRadius:"8px",border:"none",background:r.trim()?"#f59e0b":"#e2e8f0",color:r.trim()?"#fff":"#94a3b8",fontSize:"13px",fontWeight:700,cursor:r.trim()?"pointer":"not-allowed",transition:"background 0.2s"},children:"Analyse Requirement \u2192"})]}),n==="preview"&&i&&se("div",{style:{padding:"14px 16px"},children:[u&&se("div",{style:{padding:"10px",background:"#fef2f2",border:"1px solid #fca5a5",borderRadius:"8px",marginBottom:"12px",fontSize:"11px",color:"#dc2626"},children:["\u26A0\uFE0F ",u]}),se("div",{style:{background:"#f8fafc",borderRadius:"10px",padding:"12px",marginBottom:"12px"},children:[se("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[q("span",{style:{fontSize:"1.5rem"},children:nc[i.websiteType]||"\u{1F310}"}),se("div",{children:[q("p",{style:{margin:0,fontSize:"13px",fontWeight:700,color:"#0f172a"},children:i.siteName}),se("p",{style:{margin:0,fontSize:"10px",color:"#64748b",textTransform:"capitalize"},children:[i.websiteType," website \xB7 ",i.theme," theme"]})]})]}),se("p",{style:{margin:"8px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:["Pages to generate (",i.pages.length,")"]}),q("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:i.pages.map(d=>se("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f0fdf4",border:"1px solid #86efac",fontSize:"10px",color:"#166534",fontWeight:500},children:[tc[d]||"\u{1F4C4}"," ",d]},d))}),i.features.length>0&&se(oc,{children:[q("p",{style:{margin:"10px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Detected features"}),q("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:i.features.map(d=>q("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f5f3ff",border:"1px solid #c4b5fd",fontSize:"10px",color:"#7c3aed",fontWeight:500},children:d},d))})]})]}),se("div",{style:{margin:"0 0 12px",padding:"10px 12px",background:"#f0fdf4",borderRadius:"8px",border:"1px solid #86efac"},children:[q("p",{style:{margin:"0 0 4px",fontSize:"10px",fontWeight:700,color:"#166534"},children:"\u{1F4E6} What you get:"}),se("p",{style:{margin:0,fontSize:"10px",color:"#166534",lineHeight:1.6},children:["\u2705 Complete Next.js 16 project",q("br",{}),"\u2705 Tailwind CSS + CSS Modules",q("br",{}),"\u2705 TypeScript configured",q("br",{}),"\u2705 Navbar + Footer components",q("br",{}),"\u2705 All ",i.pages.length," pages ready",q("br",{}),"\u2705 Mobile responsive",q("br",{}),"\u2705 npm run dev \u2192 works immediately"]})]}),se("div",{style:{display:"flex",gap:"8px"},children:[q("button",{onClick:f,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"\u2190 Edit"}),q("button",{onClick:A,style:{flex:2,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"13px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Generate & Download ZIP"})]})]}),n==="generating"&&se("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[q("p",{style:{fontSize:"2rem",marginBottom:"1rem"},children:"\u26A1"}),q("p",{style:{fontSize:"13px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:"Generating your project..."}),q("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem"},children:l<30?"Parsing requirement...":l<55?"Loading templates...":l<70?"Generating pages...":l<85?"Building components...":l<95?"Creating styles...":"Packaging ZIP..."}),q("div",{style:{height:"8px",background:"#e2e8f0",borderRadius:"99px",overflow:"hidden"},children:q("div",{style:{height:"100%",width:`${l}%`,background:"#f59e0b",borderRadius:"99px",transition:"width 0.3s ease"}})}),se("p",{style:{marginTop:"0.5rem",fontSize:"10px",color:"#94a3b8"},children:[l,"%"]})]}),n==="done"&&i&&se("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[q("p",{style:{fontSize:"3rem",marginBottom:"0.75rem"},children:"\u2705"}),se("p",{style:{fontSize:"14px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:[i.siteName," downloaded!"]}),q("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem",lineHeight:1.6},children:"Your ZIP is downloading. Unzip it and run:"}),["npm install","npm run dev"].map(d=>q("div",{style:{background:"#0f172a",borderRadius:"8px",padding:"8px 12px",marginBottom:"6px",textAlign:"left"},children:se("code",{style:{fontSize:"12px",color:"#a7f3d0",fontFamily:"monospace"},children:["$ ",d]})},d)),q("p",{style:{fontSize:"11px",color:"#10b981",margin:"1rem 0",fontWeight:600},children:"Then open http://localhost:3000 \u{1F680}"}),se("div",{style:{display:"flex",gap:"8px"},children:[q("button",{onClick:f,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"New Project"}),q("button",{onClick:A,style:{flex:1,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"12px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Download Again"})]})]})]})}import{Fragment as sc,jsx as ne,jsxs as Ne}from"react/jsx-runtime";async function ic(){try{if(typeof window>"u")return!1;let e=window;if(e.LanguageModel)try{if(typeof e.LanguageModel.availability=="function"){let n=await e.LanguageModel.availability();if(n==="readily"||n==="available"||n==="downloadable")return!0}else return!0}catch{}if(e.Summarizer)try{let n=await e.Summarizer.availability?.();if(!n||n==="readily"||n==="available")return!0}catch{}if(e.Rewriter)try{let n=await e.Rewriter.availability?.();if(!n||n==="readily"||n==="available")return!0}catch{}if(e.Writer)try{let n=await e.Writer.availability?.();if(!n||n==="readily"||n==="available")return!0}catch{}let t=e.ai||globalThis.ai;if(t){if(t.languageModel?.availability)try{let n=await t.languageModel.availability();if(n==="readily"||n==="available")return!0}catch{}if(t.languageModel&&typeof t.languageModel.create=="function"||t.summarizer||t.rewriter||t.writer||t.languageModel)return!0}return!!(e.Translator||e.translation?.canTranslate)}catch{return!1}}function Dn({position:e="left",children:t,config:n={},showRag:o=!1,showAgent:r=!1}){let[s,i]=Ae(!1),[a,l]=Ae(Qn),[c,u]=Ae(null),[p,g]=Ae(!1),[A,f]=Ae(!1),[h,d]=Ae(!1),b=rc.useRef(null),[I,m]=Ae(!1),[x,y]=Ae(""),[k,v]=Ae(""),[R,z]=Ae(!1),[N,T]=Ae(null),[S,C]=Ae("idle"),[Y,K]=Ae(!1),[M,re]=Ae(""),[ce,F]=Ae(""),[J,D]=Ae(!1),[W,V]=Ae([]),[L,ie]=Ae(null),ve=24,Qe=84,P=o?144:84,ue=204,[he,Ee]=Ae(!1);bt(()=>{if(typeof window>"u")return;let B=window;!!(B.LanguageModel||B.ai?.languageModel)&&A?(T("gemini"),ie("gemini")):$t()&&(T("transformers"),ie("transformers"))},[A]),bt(()=>{if(N!=="transformers")return;let B=setInterval(()=>C(Pt()),500);return()=>clearInterval(B)},[N]);let Se=yt(async()=>{if(!(!x.trim()||R)){if(!N){v("\u26A0\uFE0F No AI engine available.");return}z(!0),v("");try{let B;if(N==="gemini"){let{askPage:te}=await import("./rag-MKBAGH6J.mjs");B=await te(x)}else{C("loading");let{askPageWithTransformers:te}=await import("./transformers-rag-HW4QKA5T.mjs");B=await te(x),C("ready")}v(B.success&&B.answer?B.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(B.error||"No answer found."))}catch{v("\u26A0\uFE0F Something went wrong.")}z(!1)}},[x,R,N]),ge=yt(async()=>{if(!M.trim()||J)return;if(!L){F("\u26A0\uFE0F No AI engine available.");return}D(!0),V([]),F("");let{runAgent:B}=await import("./agent-JGLAYQMX.mjs");await B(M,L,te=>{V(Ue=>[...Ue,te.text])}),D(!1),F("done")},[M,J,L]);bt(()=>{if(typeof window>"u")return;let te=setTimeout(async()=>{let Ue=window,kt=await ic();f(kt),d(!!(Ue.SpeechRecognition||Ue.webkitSpeechRecognition))},800);return()=>clearTimeout(te)},[]),bt(()=>{if(!(typeof window>"u"))try{let B=localStorage.getItem("yuktai-a11y-prefs");B&&l(te=>({...te,...JSON.parse(B)}))}catch{}},[]);let qe=yt(async B=>{let te={enabled:!0,highContrast:B.highContrast,darkMode:B.darkMode,reduceMotion:B.reduceMotion,largeTargets:B.largeTargets,speechEnabled:B.speechEnabled,autoFix:B.autoFix,dyslexiaFont:B.dyslexiaFont,localFont:B.localFont,fontSizeMultiplier:B.fontScale/100,colorBlindMode:B.colorBlindMode,showAuditBadge:B.showAuditBadge,showSkipLinks:!0,showPreferencePanel:!1,plainEnglish:B.plainEnglish,summarisePage:B.summarisePage,translateLanguage:B.translateLanguage,voiceControl:B.voiceControl,smartLabels:B.smartLabels,...n};await ke.execute(te),u(ke.applyFixes(te)),g(!0)},[n]),nt=yt(async()=>{try{localStorage.setItem("yuktai-a11y-prefs",JSON.stringify(a))}catch{}await qe(a),i(!1)},[a,qe]),dt=yt(()=>{l(Qn);try{localStorage.removeItem("yuktai-a11y-prefs")}catch{}let B=document.documentElement;["data-yuktai-high-contrast","data-yuktai-dark","data-yuktai-reduce-motion","data-yuktai-large-targets","data-yuktai-keyboard","data-yuktai-dyslexia"].forEach(te=>B.removeAttribute(te)),document.body.style.filter="",document.body.style.fontFamily="",document.documentElement.style.fontSize="",u(null),g(!1)},[]),ze=yt((B,te)=>{l(Ue=>({...Ue,[B]:te}))},[]);bt(()=>{let B=te=>{te.key==="Escape"&&(s&&i(!1),I&&m(!1),Y&&K(!1),he&&Ee(!1))};return window.addEventListener("keydown",B),()=>window.removeEventListener("keydown",B)},[s,I,Y]),bt(()=>{s&&b.current&&ke.trapFocus(b.current)},[s]);let We=(B,te,Ue)=>({position:"fixed",bottom:`${B}px`,[e]:"24px",zIndex:9998,width:"52px",height:"52px",borderRadius:"50%",background:te,color:"#fff",border:"none",cursor:"pointer",fontSize:"22px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s, background 0.2s"}),ot=B=>{B.currentTarget.style.transform="scale(1.08)"},ye=B=>{B.currentTarget.style.transform="scale(1)"},Ie=N==="gemini"?"Gemini Nano \xB7 On device":N==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",He=N==="transformers"&&S==="loading"?"Loading model...":"...";return Ne(sc,{children:[t,r&&ne("button",{style:We(204,he?"#d97706":"#f59e0b",he),"aria-label":"Open Vibe Coder",title:"\u26A1 Vibe Coder \u2014 Generate Next.js project",onClick:()=>{Ee(B=>!B),K(!1),m(!1),i(!1)},onMouseEnter:ot,onMouseLeave:ye,children:"\u26A1"}),r&&he&&ne(Gn,{position:e,onClose:()=>Ee(!1)}),r&&ne("button",{style:We(P,Y?"#059669":"#10b981",Y),"aria-label":"Open AI agent","aria-haspopup":"dialog","aria-expanded":Y,title:"\u{1F916} AI Agent \u2014 guide me through this page",onClick:()=>{K(B=>!B),m(!1),i(!1)},onMouseEnter:ot,onMouseLeave:ye,children:"\u{1F916}"}),r&&Y&&Ne("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai AI Agent","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${P+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px",maxHeight:"70vh",overflowY:"auto"},children:[Ne("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[Ne("div",{children:[ne("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F916} AI Agent"}),ne("p",{style:{margin:0,fontSize:"10px",color:"#10b981"},children:L==="gemini"?"Gemini Nano \xB7 On device":L==="transformers"?"Transformers.js \xB7 All devices":"Detecting..."})]}),ne("button",{onClick:()=>K(!1),"aria-label":"Close agent panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),ne("p",{style:{margin:"0 0 8px",fontSize:"11px",color:"#64748b"},children:"Tell me what you want to do on this page. I will guide you step by step."}),ne("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"8px"},children:["Fill this form","Find contact info","What is this page?","Guide me to apply"].map(B=>ne("button",{onClick:()=>re(B),style:{padding:"3px 8px",borderRadius:"20px",fontSize:"10px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#64748b",cursor:"pointer"},children:B},B))}),Ne("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[ne("input",{type:"text",value:M,onChange:B=>re(B.target.value),onKeyDown:B=>{B.key==="Enter"&&ge()},placeholder:"e.g. Help me fill this form",disabled:J||!L,"aria-label":"Tell the agent what to do",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:L?"#fff":"#f8fafc",outline:"none",height:"36px"}}),ne("button",{onClick:ge,disabled:J||!M.trim()||!L,"aria-label":"Run agent",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:L&&M.trim()&&!J?"#10b981":"#e2e8f0",color:L&&M.trim()&&!J?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:L&&M.trim()&&!J?"pointer":"not-allowed",height:"36px",minWidth:"52px",transition:"background 0.2s"},children:J?"...":"Go"})]}),W.length>0&&Ne("div",{style:{padding:"10px 12px",background:"#f0fdf4",border:"1px solid #86efac",borderRadius:"8px",fontSize:"11px",color:"#166534",lineHeight:1.7},children:[W.map((B,te)=>ne("p",{style:{margin:"0 0 2px"},children:B},te)),ce==="done"&&ne("button",{onClick:()=>{V([]),re(""),F("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!L&&ne("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano via chrome://flags for best results."})]}),o&&ne("button",{style:We(Qe,I?"#7c3aed":"#6d28d9",I),"aria-label":"Ask a question about this page","aria-haspopup":"dialog","aria-expanded":I,title:`\u{1F4AC} Ask this page \xB7 ${Ie}`,onClick:()=>{m(B=>!B),i(!1),K(!1)},onMouseEnter:ot,onMouseLeave:ye,children:"\u{1F4AC}"}),o&&I&&Ne("div",{role:"dialog","aria-modal":"true","aria-label":"Ask this page","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${Qe+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px"},children:[Ne("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[Ne("div",{children:[ne("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F4AC} Ask this page"}),ne("p",{style:{margin:0,fontSize:"10px",color:"#7c3aed"},children:Ie}),N==="transformers"&&S==="loading"&&ne("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8"},children:"Downloading model \u2014 first time only"}),N==="transformers"&&S==="ready"&&ne("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#10b981"},children:"Model ready \u2705 \u2014 works offline"})]}),ne("button",{onClick:()=>m(!1),"aria-label":"Close ask panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),Ne("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[ne("input",{type:"text",value:x,onChange:B=>y(B.target.value),onKeyDown:B=>{B.key==="Enter"&&Se()},placeholder:"e.g. What does this page do?",disabled:R||!N,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:N?"#fff":"#f8fafc",outline:"none",height:"36px"}}),ne("button",{onClick:Se,disabled:R||!x.trim()||!N,"aria-label":"Submit question",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:N&&x.trim()&&!R?"#7c3aed":"#e2e8f0",color:N&&x.trim()&&!R?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:N&&x.trim()&&!R?"pointer":"not-allowed",height:"36px",minWidth:"48px",transition:"background 0.2s"},children:R?He:"Ask"})]}),k&&Ne("div",{style:{padding:"10px",background:"#f5f3ff",borderRadius:"8px",fontSize:"12px",color:"#4c1d95",lineHeight:1.6,maxHeight:"180px",overflowY:"auto"},children:[ne("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#7c3aed"},children:"\u{1F4AC} Answer"}),k,ne("button",{onClick:()=>{v(""),y("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!N&&ne("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Detecting AI engine..."})]}),ne("button",{style:We(ve,p?"#0d9488":"#1a73e8",s),"aria-label":"Open accessibility preferences","aria-haspopup":"dialog","aria-expanded":s,"data-yuktai-pref-toggle":"true",title:"\u267F Accessibility settings",onClick:()=>{i(B=>!B),m(!1),K(!1)},onMouseEnter:ot,onMouseLeave:ye,children:"\u267F"}),s&&ne(Rn,{ref:b,position:e,settings:a,report:c,isActive:p,aiSupported:A,voiceSupported:h,set:ze,onApply:nt,onReset:dt,onClose:()=>i(!1)})]})}var jt={name:"ai.text",async execute(e){return`\u{1F916} YuktAI says: ${e}`}};var Vt={name:"voice.text",async execute(e){return!e||e.trim()===""?"\u{1F3A4} No speech detected":`\u{1F3A4} You said: ${e}`}};var st=class{plugins=new Map;register(t,n){if(!n||typeof n.execute!="function")throw new Error(`Invalid plugin: ${t}`);this.plugins.set(t,n)}use(t){return this.plugins.get(t)}async run(t,n){try{let o=this.use(t);if(!o)throw new Error(`Plugin not found: ${t}`);return await o.execute(n)}catch(o){throw console.error(`[YuktAI Runtime Error in ${t}]:`,o),o}}getPlugins(){return Array.from(this.plugins.keys())}};import{useCallback as Un,useEffect as Nt,useMemo as ct,useState as Xe}from"react";import{useCallback as Fn,useEffect as Bt,useMemo as jo,useRef as Vo,useState as _e}from"react";import{Fragment as mc,jsx as G,jsxs as Ce}from"react/jsx-runtime";var Xo={"en-US":{title:"Grid AI Assistant",subtitle:"Ask about your data",ask:"Ask",placeholder:"Ask or type a command...",listening:"Listening...",send:"Send",close:"Close",open:"Open AI assistant",inputLanguage:"Input language",speakNow:"Speak your question",working:"Working on it\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`Searching for "${e}".`,sortedAscending:e=>`Sorted by ${e} in ascending order.`,sortedDescending:e=>`Sorted by ${e} in descending order.`,count:e=>`There are ${e} rows in the grid.`,highest:(e,t,n)=>`The highest ${e} is ${t}, held by ${n}.`,lowest:(e,t,n)=>`The lowest ${e} is ${t}, held by ${n}.`,average:(e,t)=>`The average ${e} is ${t}.`,total:(e,t)=>`The total ${e} is ${t}.`,noData:"There is no data to analyze.",noColumn:"I could not find a column to analyze.",noNumericData:e=>`There is no numeric data in ${e}.`,notFound:e=>`I could not find anything matching "${e}".`,needName:"Please provide a value to look up.",fallback:"I can search, sort, count, and analyze the grid data.",unsupportedVoice:"Voice input is not supported in this browser."},"te-IN":{title:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C41",subtitle:"\u0C2E\u0C40 \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",ask:"\u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",placeholder:"\u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C32\u0C47\u0C26\u0C3E \u0C06\u0C26\u0C47\u0C36\u0C02 \u0C1F\u0C48\u0C2A\u0C4D \u0C1A\u0C47\u0C2F\u0C02\u0C21\u0C3F...",listening:"\u0C35\u0C3F\u0C02\u0C1F\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41...",send:"\u0C2A\u0C02\u0C2A\u0C02\u0C21\u0C3F",close:"\u0C2E\u0C42\u0C38\u0C3F\u0C35\u0C47\u0C2F\u0C02\u0C21\u0C3F",open:"AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C3F\u0C28\u0C3F \u0C24\u0C46\u0C30\u0C35\u0C02\u0C21\u0C3F",inputLanguage:"\u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D \u0C2D\u0C3E\u0C37",speakNow:"\u0C2E\u0C40 \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C1A\u0C46\u0C2A\u0C4D\u0C2A\u0C02\u0C21\u0C3F",working:"\u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`\u201C${e}\u201D \u0C15\u0C4B\u0C38\u0C02 \u0C36\u0C4B\u0C27\u0C3F\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,sortedAscending:e=>`${e}\u0C28\u0C41 \u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,sortedDescending:e=>`${e}\u0C28\u0C41 \u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,count:e=>`\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C09\u0C28\u0C4D\u0C28\u0C3E\u0C2F\u0C3F.`,highest:(e,t,n)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C27\u0C3F\u0C15 ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${n}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,lowest:(e,t,n)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C32\u0C4D\u0C2A ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${n}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,average:(e,t)=>`${e} \u0C38\u0C17\u0C1F\u0C41 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,total:(e,t)=>`${e} \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,noData:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C21\u0C47\u0C1F\u0C3E \u0C32\u0C47\u0C26\u0C41.",noColumn:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C24\u0C17\u0C3F\u0C28 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",noNumericData:e=>`${e}\u0C32\u0C4B \u0C38\u0C02\u0C16\u0C4D\u0C2F\u0C3E \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C32\u0C47\u0C26\u0C41.`,notFound:e=>`\u201C${e}\u201D\u0C15\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47 \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.`,needName:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C12\u0C15 \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C07\u0C35\u0C4D\u0C35\u0C02\u0C21\u0C3F.",fallback:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C28, \u0C15\u0C4D\u0C30\u0C2E\u0C2C\u0C26\u0C4D\u0C27\u0C40\u0C15\u0C30\u0C23, \u0C32\u0C46\u0C15\u0C4D\u0C15\u0C3F\u0C02\u0C2A\u0C41 \u0C2E\u0C30\u0C3F\u0C2F\u0C41 \u0C21\u0C47\u0C1F\u0C3E \u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C23 \u0C1A\u0C47\u0C2F\u0C17\u0C32\u0C28\u0C41.",unsupportedVoice:"\u0C08 \u0C2C\u0C4D\u0C30\u0C4C\u0C1C\u0C30\u0C4D\u200C\u0C32\u0C4B \u0C35\u0C3E\u0C2F\u0C3F\u0C38\u0C4D \u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D\u200C\u0C15\u0C41 \u0C2E\u0C26\u0C4D\u0C26\u0C24\u0C41 \u0C32\u0C47\u0C26\u0C41."}};function Me(e){return e.toLowerCase().trim().replace(/\s+/g," ")}function ac(e,t){let n=Me(e);if(t==="te-IN")return/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)/.test(n)?{type:"search",payload:n.replace(/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)\s*/u,"").trim()||e}:/క్రమబద్ధీకర|అమర్చ|సార్ట్/.test(n)?{type:"sort",payload:{key:void 0,dir:/అవరోహణ|పెద్ద|అధిక|చివర/.test(n)?"desc":"asc"}}:/ఎన్ని|ఎంతమంది|లెక్క|మొత్తం వరుస|వరుసలు/.test(n)?{type:"question",payload:e}:/అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(n)?{type:"question",payload:e}:/అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(n)?{type:"question",payload:e}:/సగటు|సగటు విలువ/.test(n)?{type:"question",payload:e}:/మొత్తం|కలిపి/.test(n)?{type:"question",payload:e}:{type:"search",payload:e};if(/^(search|find|show|filter)/.test(n))return{type:"search",payload:n.replace(/^(search|find|show|filter)\s+(for\s+|by\s+)?/,"").trim()||e};if(/sort/.test(n)){let o=/desc|descending|high|higher|large|largest|top/.test(n);return{type:"sort",payload:{key:n.match(/(?:by|on)\s+([a-z0-9_-]+)/)?.[1],dir:o?"desc":"asc"}}}return/how many|count|highest|maximum|max|top|largest|lowest|minimum|min|smallest|bottom|average|avg|mean|sum|total|who|which|where|whose/.test(n)?{type:"question",payload:e}:{type:"search",payload:e}}function Zo(e,t){let n=Me(e);return t.find(o=>{let r=Me(o.key),s=Me(o.label);return n.includes(r)||n.includes(s)})}function Xt(e,t){return e.toLocaleString(t==="te-IN"?"te-IN":"en-IN")}function lc(e,t,n,o){let r=Xo[o];if(t.length===0)return r.noData;let s=Me(e),i=n.filter(I=>I.type==="number"),a=Zo(e,n),l=a?.type==="number"?a:i[0],c=/how many|count|rows|ఎన్ని|ఎంతమంది|లెక్క|వరుసలు/.test(s);if(c)return r.count(t.length);if(/highest|maximum|max|top|largest|అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(s)){let I=a??l;if(!I)return r.noColumn;let m=t.map(v=>({row:v,value:Number(v[I.key])})).filter(v=>!Number.isNaN(v.value)).sort((v,R)=>R.value-v.value);if(m.length===0)return r.noNumericData(I.label);let x=m[0],y=n.find(v=>v.key==="name"||Me(v.label)==="name"),k=y?String(x.row[y.key]??""):o==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return r.highest(I.label,Xt(x.value,o),k)}if(/lowest|minimum|min|smallest|bottom|అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(s)){let I=a??l;if(!I)return r.noColumn;let m=t.map(v=>({row:v,value:Number(v[I.key])})).filter(v=>!Number.isNaN(v.value)).sort((v,R)=>v.value-R.value);if(m.length===0)return r.noNumericData(I.label);let x=m[0],y=n.find(v=>v.key==="name"||Me(v.label)==="name"),k=y?String(x.row[y.key]??""):o==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return r.lowest(I.label,Xt(x.value,o),k)}if(/average|avg|mean|సగటు/.test(s)){let I=a??l;if(!I)return r.noColumn;let m=t.map(y=>Number(y[I.key])).filter(y=>!Number.isNaN(y));if(m.length===0)return r.noNumericData(I.label);let x=m.reduce((y,k)=>y+k,0)/m.length;return r.average(I.label,Xt(Math.round(x*100)/100,o))}if(/sum|total|మొత్తం|కలిపి/.test(s)&&!c){let I=a??l;if(!I)return r.noColumn;let m=t.map(y=>Number(y[I.key])).filter(y=>!Number.isNaN(y));if(m.length===0)return r.noNumericData(I.label);let x=m.reduce((y,k)=>y+k,0);return r.total(I.label,Xt(x,o))}let f=s.match(/[\p{L}\p{N}_-]+/gu)??[],h=new Set(["who","what","which","where","whose","is","the","has","have","show","find","search","for","by","about"]),b=f.filter(I=>!h.has(I)).join(" ").trim();if(b){let I=t.find(m=>Object.values(m).some(x=>String(x??"").toLowerCase().includes(b.toLowerCase())));return I?n.map(m=>`${m.label}: ${String(I[m.key]??"")}`).join(o==="te-IN"?" \xB7 ":", "):r.notFound(b)}return r.fallback}function cc(e,t){if(typeof window>"u"||!window.speechSynthesis)return;window.speechSynthesis.cancel();let n=new SpeechSynthesisUtterance(e);n.lang=t,n.rate=1,n.pitch=1,window.speechSynthesis.speak(n)}function uc(e){let[t,n]=_e(!1),[o,r]=_e(""),[s,i]=_e(!0),a=Vo(null);Bt(()=>{if(typeof window>"u")return;let u=window.SpeechRecognition||window.webkitSpeechRecognition;if(!u){i(!1),a.current=null;return}let p=new u;return p.continuous=!1,p.interimResults=!1,p.lang=e,p.onresult=g=>{let A=g?.results?.[0]?.[0]?.transcript??"";r(A),n(!1)},p.onerror=()=>{n(!1)},p.onend=()=>{n(!1)},a.current=p,()=>{try{p.stop()}catch{}a.current=null}},[e]);let l=Fn(()=>{if(a.current){r(""),n(!0);try{a.current.start()}catch{n(!1)}}},[]),c=Fn(()=>{try{a.current?.stop()}catch{}n(!1)},[]);return{listening:t,transcript:o,supported:s,start:l,stop:c}}function dc(){return Ce("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[G("circle",{cx:"11",cy:"11",r:"6.5"}),G("path",{d:"m16 16 5 5"})]})}function gc(){return Ce("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[G("rect",{x:"8",y:"3",width:"8",height:"12",rx:"4"}),G("path",{d:"M5 11a7 7 0 0 0 14 0"}),G("path",{d:"M12 18v3"}),G("path",{d:"M8 21h8"})]})}function Ac(){return Ce("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[G("path",{d:"m4 4 16 8-16 8 4-8-4-8Z"}),G("path",{d:"M8 12h12"})]})}function pc(){return Ce("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[G("path",{d:"m6 6 12 12"}),G("path",{d:"m18 6-12 12"})]})}function fc({data:e,columns:t,onSearch:n,onSort:o,theme:r="light",language:s="en-US",inputLanguage:i="en-US",embedded:a=!1,agent:l,onInputLanguageChange:c}){let u=Xo[s],[p,g]=_e(i);Bt(()=>{g(i)},[i]);let[A,f]=_e(!1),h=r==="dark",[d,b]=_e(a),[I,m]=_e(""),[x,y]=_e([]),k=Vo(null),{listening:v,transcript:R,supported:z,start:N,stop:T}=uc(p),S=jo(()=>({bg:h?"#0F172A":"#FFFFFF",surface:h?"#1E293B":"#F8FAFC",border:h?"#334155":"#E2E8F0",text:h?"#F1F5F9":"#0F172A",muted:h?"#94A3B8":"#64748B",accent:"#10B981",userMsg:h?"#334155":"#DBEAFE",aiMsg:h?"#1E293B":"#F0FDF4"}),[h]),C=jo(()=>({role:"ai",text:s==="te-IN"?"\u0C2E\u0C40 \u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F.":"Ask me about your grid data.",time:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),[s]);Bt(()=>{y(F=>F.length>0?F:[C])},[C]),Bt(()=>{k.current?.scrollIntoView({behavior:"smooth"})},[x]);let Y=()=>new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),K=Fn(async F=>{let J=F.trim();if(!J)return;y(W=>[...W,{role:"user",text:J,time:Y()}]),m("");let D="";if(l){f(!0);try{D=(await l.ask(J)).message}catch{D=u.fallback}finally{f(!1)}}else{let W=ac(J,s);if(W.type==="question")D=lc(W.payload??J,e,t,s);else if(W.type==="search"){let V=String(W.payload??J);n?.(V),D=u.searchStarted(V)}else if(W.type==="sort"){let V=W.payload?.key,L=V?t.find(ie=>Me(ie.key)===Me(V)||Me(ie.label)===Me(V)):void 0;if(L||(L=Zo(J,t)),L&&o){let ie=W.payload?.dir==="desc"?"desc":"asc";o(String(L.key),ie),D=ie==="asc"?u.sortedAscending(L.label):u.sortedDescending(L.label)}else D=u.noColumn}}D||(D=u.fallback),y(W=>[...W,{role:"ai",text:D,time:Y()}]),cc(D,s)},[l,t,e,s,n,o,u]);Bt(()=>{R&&K(R)},[R,K]);let M=()=>{K(I)},re=s==="te-IN"?["\u0C0E\u0C28\u0C4D\u0C28\u0C3F \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41","\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F","\u0C15\u0C4D\u0C30\u0C2E\u0C02"]:["how many rows","search","sort"],ce=Ce("div",{style:{width:a?"100%":360,maxWidth:a?"100%":"calc(100vw - 48px)",height:a?390:480,maxHeight:"70vh",background:S.bg,border:`1px solid ${S.border}`,borderRadius:a?12:16,boxShadow:a?"none":"0 20px 40px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[Ce("div",{style:{padding:"12px 14px",background:S.accent,color:"#FFFFFF",display:"flex",alignItems:"center",gap:10},children:[G("div",{style:{width:34,height:34,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.18)",fontSize:17},children:"AI"}),Ce("div",{style:{flex:1,minWidth:0},children:[G("div",{style:{fontWeight:700,fontSize:14},children:u.title}),G("div",{style:{fontSize:11,opacity:.9},children:u.subtitle})]}),!a&&G("button",{type:"button",onClick:()=>b(!1),"aria-label":u.close,title:u.close,style:{width:32,height:32,border:"none",borderRadius:8,background:"rgba(255,255,255,0.12)",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:G(pc,{})})]}),Ce("div",{style:{padding:"8px 10px",borderBottom:`1px solid ${S.border}`,display:"flex",alignItems:"center",gap:8,background:S.surface},children:[G("span",{style:{fontSize:11,color:S.muted},children:u.inputLanguage}),Ce("select",{value:p,onChange:F=>{let J=F.target.value;g(J),c?.(J)},disabled:v,"aria-label":u.inputLanguage,style:{padding:"5px 8px",borderRadius:7,border:`1px solid ${S.border}`,background:S.bg,color:S.text,fontSize:11},children:[G("option",{value:"en-US",children:"English (US)"}),G("option",{value:"en-IN",children:"English (India)"}),G("option",{value:"as-IN",children:"Assamese"}),G("option",{value:"bn-IN",children:"Bengali"}),G("option",{value:"brx-IN",children:"Bodo"}),G("option",{value:"doi-IN",children:"Dogri"}),G("option",{value:"gu-IN",children:"Gujarati"}),G("option",{value:"hi-IN",children:"Hindi"}),G("option",{value:"kn-IN",children:"Kannada"}),G("option",{value:"ks-IN",children:"Kashmiri"}),G("option",{value:"kok-IN",children:"Konkani"}),G("option",{value:"mai-IN",children:"Maithili"}),G("option",{value:"ml-IN",children:"Malayalam"}),G("option",{value:"mni-IN",children:"Manipuri"}),G("option",{value:"mr-IN",children:"Marathi"}),G("option",{value:"ne-IN",children:"Nepali"}),G("option",{value:"or-IN",children:"Odia"}),G("option",{value:"pa-IN",children:"Punjabi"}),G("option",{value:"sa-IN",children:"Sanskrit"}),G("option",{value:"sat-IN",children:"Santali"}),G("option",{value:"sd-IN",children:"Sindhi"}),G("option",{value:"ta-IN",children:"Tamil"}),G("option",{value:"te-IN",children:"Telugu"}),G("option",{value:"ur-IN",children:"Urdu"})]})]}),Ce("div",{style:{flex:1,overflowY:"auto",padding:10,display:"flex",flexDirection:"column",gap:8},children:[x.map((F,J)=>Ce("div",{style:{alignSelf:F.role==="user"?"flex-end":"flex-start",maxWidth:"88%",padding:"8px 11px",borderRadius:11,background:F.role==="user"?S.userMsg:S.aiMsg,color:S.text,fontSize:13,lineHeight:1.5},children:[G("div",{children:F.text}),G("div",{style:{marginTop:3,fontSize:10,opacity:.55,textAlign:"right"},children:F.time})]},`${F.time}-${J}`)),v&&G("div",{style:{alignSelf:"flex-end",padding:"8px 11px",borderRadius:11,background:h?"#3F1D2E":"#FEE2E2",color:h?"#FCA5A5":"#991B1B",fontSize:13},children:u.listening}),(A||l?.loading)&&G("div",{role:"status","aria-live":"polite",style:{alignSelf:"flex-start",padding:"8px 11px",borderRadius:11,background:S.aiMsg,color:S.muted,fontSize:13},children:u.working}),G("div",{ref:k})]}),G("div",{style:{padding:"7px 10px",borderTop:`1px solid ${S.border}`,display:"flex",gap:6,overflowX:"auto",flexShrink:0},children:re.map(F=>G("button",{type:"button",onClick:()=>K(F),style:{padding:"5px 9px",borderRadius:12,border:`1px solid ${S.border}`,background:S.surface,color:S.text,fontSize:10.5,cursor:"pointer",whiteSpace:"nowrap"},children:F},F))}),Ce("div",{style:{padding:9,display:"flex",gap:6,borderTop:`1px solid ${S.border}`,background:S.surface},children:[Ce("div",{style:{position:"relative",flex:1},children:[G(dc,{}),G("input",{type:"text",value:I,onChange:F=>m(F.target.value),onKeyDown:F=>{F.key==="Enter"&&M()},placeholder:u.placeholder,"aria-label":u.ask,style:{width:"100%",boxSizing:"border-box",padding:"9px 10px 9px 34px",borderRadius:8,border:`1px solid ${S.border}`,background:S.bg,color:S.text,fontSize:12,outline:"none"}})]}),z?G("button",{type:"button",onClick:v?T:N,"aria-label":v?u.listening:u.speakNow,title:v?u.listening:u.speakNow,style:{width:38,height:38,border:"none",borderRadius:8,background:v?"#EF4444":S.accent,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",flexShrink:0},children:G(gc,{})}):null,G("button",{type:"button",onClick:M,disabled:!I.trim(),"aria-label":u.send,title:u.send,style:{width:38,height:38,border:"none",borderRadius:8,background:I.trim()?S.accent:S.muted,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:I.trim()?"pointer":"not-allowed",opacity:I.trim()?1:.6,flexShrink:0},children:G(Ac,{})})]})]});return a?G("div",{style:{width:"100%",minWidth:0},children:d?ce:Ce("button",{type:"button",onClick:()=>b(!0),"aria-label":u.open,style:{minHeight:40,padding:"8px 13px",borderRadius:9,border:"1px solid #10B981",background:h?"#064E3B":"#ECFDF5",color:h?"#A7F3D0":"#047857",display:"inline-flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:12,fontWeight:600},children:[G("span",{"aria-hidden":"true",children:"AI"}),u.ask]})}):Ce(mc,{children:[!d&&G("button",{type:"button",onClick:()=>b(!0),"aria-label":u.open,title:u.title,style:{position:"fixed",bottom:24,right:24,zIndex:9998,width:56,height:56,borderRadius:28,background:S.accent,color:"#FFFFFF",border:"none",cursor:"pointer",boxShadow:"0 8px 20px rgba(16,185,129,0.3)",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:14},children:"AI"}),d&&G("div",{style:{position:"fixed",bottom:90,right:24,zIndex:9997},children:ce}),G("style",{children:`
|
|
385
|
+
`,document.body.appendChild(e),Xn=e}function no(e){return e.getAttribute("aria-label")?.trim()||e.getAttribute("aria-labelledby")||e.getAttribute("title")?.trim()||e.textContent?.trim()?!0:!!e.querySelector("img[alt]:not([alt='']), svg[aria-label], svg title, [aria-label]")}function oo(e){let t={critical:20,serious:10,moderate:5,minor:2},A=e.details.reduce((n,o)=>n+(t[o.severity]||0),0);return Math.max(0,Math.min(100,100-A))}var Se={name:"yuktai-a11y",version:"4.0.0",observer:null,async execute(e){if(!e.enabled)return this.stopObserver(),"yuktai: disabled.";Dt=e,Oa(e),Xa(),Va(),Ka(),qa(),e.showSkipLinks!==!1&&Pa(),e.showPreferencePanel,za(e);let t=this.applyFixes(e);t.score=oo(t),e.showAuditBadge&&$a(t),e.timeoutWarning&&ro(e.timeoutWarning),e.autoFix&&this.startObserver(e),e.plainEnglish&&await Zn(!0),e.summarisePage&&await _n(!0),e.translateLanguage&&e.translateLanguage!=="en"&&await eo(e.translateLanguage),e.voiceControl&&await to(!0),e.smartLabels&&await Ao(!0);let A=`${t.fixed} fixes applied. Score: ${t.score}/100.`;return Ae(A,t.score>=90?"success":"info",!1),`yuktai v4.0.0: ${A} Scanned ${t.scanned} elements in ${t.renderTime}ms.`},applyFixes(e){let t={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return t;let A=performance.now(),n=document.querySelectorAll("*");t.scanned=n.length;let o=(r,i,s,g)=>{t.details.push({tag:r,fix:i,severity:s,element:g.outerHTML.slice(0,100)}),t.fixed++};return n.forEach(r=>{let i=r,s=i.tagName.toLowerCase();if(s==="html"&&!i.getAttribute("lang")&&(i.setAttribute("lang","en"),o(s,'lang="en" added',"critical",i)),s==="meta"){let l=i.getAttribute("name"),u=i.getAttribute("content")||"";l==="viewport"&&u.includes("user-scalable=no")&&(i.setAttribute("content",u.replace("user-scalable=no","user-scalable=yes")),o(s,"user-scalable=yes restored","serious",i)),l==="viewport"&&/maximum-scale=1(?:[^0-9]|$)/.test(u)&&(i.setAttribute("content",u.replace(/maximum-scale=1(?=[^0-9]|$)/,"maximum-scale=5")),o(s,"maximum-scale=5 restored","serious",i))}if(s==="main"&&!i.getAttribute("tabindex")&&(i.setAttribute("tabindex","-1"),i.getAttribute("id")||i.setAttribute("id","main-content")),s==="img"&&(i.hasAttribute("alt")||(i.setAttribute("alt",""),i.setAttribute("aria-hidden","true"),o(s,'alt="" aria-hidden="true"',"serious",i))),s==="svg"&&(!i.getAttribute("aria-hidden")&&!i.getAttribute("aria-label")&&!r.querySelector("title")&&(i.setAttribute("aria-hidden","true"),o(s,'aria-hidden="true" (decorative svg)',"minor",i)),i.getAttribute("focusable")||i.setAttribute("focusable","false")),s==="iframe"&&!i.getAttribute("title")&&!i.getAttribute("aria-label")&&(i.setAttribute("title","embedded content"),i.setAttribute("aria-label","embedded content"),o(s,"title + aria-label added","serious",i)),s==="button"){if(!no(i)){let l=i.getAttribute("title")||"button";i.setAttribute("aria-label",l),o(s,`aria-label="${l}" (empty button)`,"critical",i)}i.hasAttribute("disabled")&&!i.getAttribute("aria-disabled")&&(i.setAttribute("aria-disabled","true"),t.fixed++)}if(s==="a"){let l=i;no(i)||(i.setAttribute("aria-label",i.getAttribute("title")||"link"),o(s,"aria-label added (empty link)","critical",i)),l.target==="_blank"&&!l.rel?.includes("noopener")&&(l.rel="noopener noreferrer",t.fixed++)}if(jn.has(s)){let l=i;if(!(!!(l.labels&&l.labels.length)||!!i.getAttribute("title")||l.type==="hidden"||l.type==="submit"||l.type==="button"||l.type==="reset")&&!i.getAttribute("aria-label")&&!i.getAttribute("aria-labelledby")){let I=i.getAttribute("placeholder")||i.getAttribute("name")||s;i.setAttribute("aria-label",I),o(s,`aria-label="${I}"`,"serious",i)}if(i.hasAttribute("required")&&!i.getAttribute("aria-required")&&(i.setAttribute("aria-required","true"),t.fixed++),s==="input"&&!l.autocomplete){let I=l.name||"",d=l.type==="email"||I.includes("email")?"email":l.type==="tel"||I.includes("tel")?"tel":l.type==="password"?"current-password":"";d&&(l.autocomplete=d,t.fixed++)}}s==="th"&&!i.getAttribute("scope")&&(i.setAttribute("scope",i.closest("thead")?"col":"row"),o(s,"scope added to <th>","moderate",i));let g=(s==="header"||s==="footer")&&!!i.parentElement?.closest("article,aside,main,nav,section,[role='dialog'],[role='region']");XA[s]&&!i.getAttribute("role")&&!g&&(i.setAttribute("role",XA[s]),o(s,`role="${XA[s]}"`,"minor",i));let a=i.getAttribute("role")||"";a==="tab"&&!i.getAttribute("aria-selected")&&(i.setAttribute("aria-selected","false"),t.fixed++),["alert","status","log"].includes(a)&&!i.getAttribute("aria-live")&&(i.setAttribute("aria-live",a==="alert"?"assertive":"polite"),o(s,`aria-live added on role=${a}`,"moderate",i)),a==="combobox"&&!i.getAttribute("aria-expanded")&&(i.setAttribute("aria-expanded","false"),o(s,'aria-expanded="false" on combobox',"serious",i)),(a==="checkbox"||a==="radio")&&!i.getAttribute("aria-checked")&&(i.setAttribute("aria-checked","false"),o(s,`aria-checked="false" on role=${a}`,"serious",i))}),t.renderTime=parseFloat((performance.now()-A).toFixed(2)),t},scan(){let e={fixed:0,scanned:0,renderTime:0,score:100,details:[]};if(typeof document>"u")return e;let t=performance.now(),A=document.querySelectorAll("*");e.scanned=A.length;let n=(o,r,i,s)=>e.details.push({tag:o,fix:r,severity:i,element:s.outerHTML.slice(0,100)});return A.forEach(o=>{let r=o,i=r.tagName.toLowerCase();(i==="a"||i==="button")&&!r.innerText?.trim()&&!r.getAttribute("aria-label")&&n(i,"needs aria-label (empty)","critical",r),i==="img"&&!r.hasAttribute("alt")&&n(i,"needs alt text","serious",r),jn.has(i)&&!r.getAttribute("aria-label")&&!r.getAttribute("aria-labelledby")&&n(i,"needs aria-label","serious",r),i==="iframe"&&!r.getAttribute("title")&&!r.getAttribute("aria-label")&&n(i,"iframe needs title","serious",r)}),e.fixed=e.details.length,e.score=oo(e),e.renderTime=parseFloat((performance.now()-t).toFixed(2)),e},startObserver(e){this.observer||typeof document>"u"||(this.observer=new MutationObserver(()=>this.applyFixes(e)),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!1}))},stopObserver(){this.observer?.disconnect(),this.observer=null},announce:Ae,speak:VA,showVisualAlert:io,trapFocus:uA,handlePlainEnglish:Zn,handleSummarisePage:_n,handleTranslate:eo,handleVoiceControl:to,handleSmartLabels:Ao,SUPPORTED_LANGUAGES:aA};import mo,{useEffect as et,useState as ge,useCallback as tt}from"react";import{forwardRef as ja,useEffect as dA,useState as ft}from"react";import{jsx as x,jsxs as ee}from"react/jsx-runtime";var jA={highContrast:!1,reduceMotion:!1,autoFix:!0,dyslexiaFont:!1,fontScale:100,localFont:"",darkMode:!1,largeTargets:!1,speechEnabled:!1,colorBlindMode:"none",showAuditBadge:!1,timeoutWarning:void 0,plainEnglish:!1,summarisePage:!1,translateLanguage:"en",voiceControl:!1,smartLabels:!1},St=[80,90,100,110,120,130],Za=[{value:"none",label:"None"},{value:"deuteranopia",label:"Deuteranopia"},{value:"protanopia",label:"Protanopia"},{value:"tritanopia",label:"Tritanopia"},{value:"achromatopsia",label:"Greyscale"}],_a=["Prompt API for Gemini Nano","Summarization API for Gemini Nano","Writer API for Gemini Nano","Rewriter API for Gemini Nano","Translation API"];function eg(){let[e,t]=ft(typeof window<"u"?window.innerWidth:1024);return dA(()=>{let A=()=>t(window.innerWidth);return window.addEventListener("resize",A),()=>window.removeEventListener("resize",A)},[]),{isMobile:e<=480,isTablet:e>480&&e<=768}}function tg({checked:e,onChange:t,label:A,disabled:n=!1}){return ee("label",{"aria-label":A,style:{position:"relative",display:"inline-flex",width:"40px",height:"24px",cursor:n?"not-allowed":"pointer",flexShrink:0,opacity:n?.4:1},children:[x("input",{type:"checkbox",checked:e,disabled:n,onChange:o=>t(o.target.checked),style:{opacity:0,width:0,height:0,position:"absolute"}}),x("span",{style:{position:"absolute",inset:0,borderRadius:"99px",background:e?"#0d9488":"#cbd5e1",transition:"background 0.2s"}}),x("span",{style:{position:"absolute",top:"3px",left:e?"19px":"3px",width:"18px",height:"18px",background:"#fff",borderRadius:"50%",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",pointerEvents:"none"}})]})}function Gt({label:e,color:t="#64748b",badge:A,concept:n}){return ee("div",{style:{margin:"10px 18px 4px"},children:[ee("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x("p",{style:{margin:0,fontSize:"10px",fontWeight:600,color:t,letterSpacing:"0.06em",textTransform:"uppercase"},children:e}),A&&x("span",{style:{fontSize:"9px",fontWeight:500,padding:"1px 7px",borderRadius:"99px",background:"#f5f3ff",color:"#7c3aed",border:"0.5px solid #c4b5fd",whiteSpace:"nowrap"},children:A})]}),n&&x("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8",fontStyle:"italic"},children:n})]})}function Ye({icon:e,label:t,desc:A,checked:n,onChange:o,disabled:r=!1,disabledReason:i,tip:s}){return ee("div",{title:r?i:s,style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 18px",gap:"12px"},children:[ee("div",{style:{display:"flex",alignItems:"center",gap:"10px",flex:1,minWidth:0},children:[x("span",{"aria-hidden":"true",style:{width:"32px",height:"32px",borderRadius:"8px",background:r?"#f1f5f9":"#f0fdfa",color:r?"#94a3b8":"#0d9488",display:"flex",alignItems:"center",justifyContent:"center",fontSize:"15px",flexShrink:0,fontWeight:700},children:e}),ee("div",{style:{minWidth:0},children:[x("p",{style:{margin:0,fontSize:"13px",fontWeight:500,color:r?"#94a3b8":"#0f172a",whiteSpace:"nowrap",overflow:"hidden",textOverflow:"ellipsis"},children:t}),x("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:r?i:A})]})]}),x(tg,{checked:n,onChange:o,label:`Toggle ${t}`,disabled:r})]})}function Ee(){return x("div",{style:{height:"1px",background:"#f1f5f9"}})}function Pt({steps:e}){return ee("div",{style:{margin:"0 18px 8px",padding:"8px 10px",background:"#f8fafc",borderRadius:"8px",border:"0.5px solid #e2e8f0"},children:[x("p",{style:{margin:"0 0 4px",fontSize:"9px",fontWeight:600,color:"#64748b",textTransform:"uppercase",letterSpacing:"0.05em"},children:"How to use"}),e.map((t,A)=>ee("p",{style:{margin:"0 0 2px",fontSize:"10px",color:"#475569"},children:[A+1,". ",t]},A))]})}var ZA=ja(({position:e,settings:t,report:A,isActive:n,aiSupported:o,voiceSupported:r,set:i,onApply:s,onReset:g,onClose:a},l)=>{let{isMobile:u,isTablet:I}=eg(),[d,m]=ft([]),[f,c]=ft(""),[C,y]=ft(""),[p,B]=ft(!1),[h,E]=ft(null),[w,G]=ft("idle");dA(()=>{let b=window;!!(b.LanguageModel||b.ai?.languageModel)&&o?E("gemini"):oA()&&E("transformers")},[o]),dA(()=>{if(h!=="transformers")return;let b=setInterval(()=>{G(Ut())},500);return()=>clearInterval(b)},[h]);let U=async()=>{if(!(!f.trim()||p)){if(!h){y("\u26A0\uFE0F No AI engine available on this device.");return}B(!0),y("");try{let b;h==="gemini"?b=await Gn(f):(G("loading"),b=await vn(f),G("ready")),y(b.success&&b.answer?b.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(b.error||"No answer found on this page"))}catch{y("\u26A0\uFE0F Failed to get answer. Please try again.")}B(!1)}};dA(()=>{(async()=>{try{let z=window;if(!z.queryLocalFonts)return;let O=await z.queryLocalFonts(),Y=[...new Set(O.map(ie=>ie.family))].sort();m(Y.slice(0,50))}catch{}})()},[]);let W=h==="gemini"?"Gemini Nano":h==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",S=h==="transformers"&&w==="loading"?"Loading AI model... (first time only)":"...",D=u?{position:"fixed",bottom:0,left:0,right:0,zIndex:9999,background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px 16px 0 0",boxShadow:"0 -8px 32px rgba(0,0,0,0.12)",maxHeight:"90vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif",width:"100%"}:{position:"fixed",bottom:"84px",[e]:"24px",zIndex:9999,width:I?"300px":"320px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",maxHeight:"80vh",overflowY:"auto",fontFamily:"system-ui,-apple-system,sans-serif"};return ee("div",{ref:l,role:"dialog","aria-modal":"true","aria-label":"yuktai accessibility preferences","data-yuktai-panel":"true",style:D,children:[ee("div",{style:{padding:"14px 18px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[ee("div",{children:[ee("div",{style:{display:"flex",alignItems:"center",gap:"7px",marginBottom:"4px",flexWrap:"wrap"},children:[x("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0d9488",letterSpacing:"0.05em",fontFamily:"monospace"},children:"@yuktishaalaa/yuktai"}),n&&x("span",{style:{fontSize:"10px",fontWeight:700,padding:"2px 7px",borderRadius:"99px",background:"#f0fdfa",color:"#0f766e",border:"1px solid #99f6e4"},children:"\u25CF ACTIVE"})]}),x("p",{style:{margin:"0 0 1px",fontSize:"15px",fontWeight:600,color:"#0f172a"},children:"Accessibility"}),x("p",{style:{margin:0,fontSize:"11px",color:"#64748b"},children:"WCAG 2.2 \xB7 Open source \xB7 Zero cost \xB7 All devices"})]}),x("button",{onClick:a,"aria-label":"Close accessibility panel",style:{background:"none",border:"none",cursor:"pointer",padding:"4px",color:"#94a3b8",fontSize:"20px",lineHeight:1,borderRadius:"6px",flexShrink:0,minWidth:u?"44px":"auto",minHeight:u?"44px":"auto",display:"flex",alignItems:"center",justifyContent:"center"},children:"\xD7"})]}),x(Gt,{label:"\u267F Core Accessibility",concept:"Rule-based engine \u2014 works on all browsers and devices"}),x(Pt,{steps:["Toggle any feature on","Click Apply settings","Preferences saved automatically"]}),x(Ye,{icon:"\u{1F527}",label:"Auto-fix ARIA",desc:"Injects missing labels and roles automatically",checked:t.autoFix,onChange:b=>i("autoFix",b),tip:"Fixes aria-label, alt text, roles on every element"}),x(Ee,{}),x(Ye,{icon:"\u{1F50A}",label:"Speak on focus",desc:"Browser reads elements aloud as you tab",checked:t.speechEnabled,onChange:b=>i("speechEnabled",b),tip:"Uses browser SpeechSynthesis \u2014 no install needed"}),x(Ee,{}),x(Ye,{icon:"\u{1F399}\uFE0F",label:"Voice control",desc:"Say commands to navigate the page",checked:t.voiceControl,onChange:b=>i("voiceControl",b),disabled:!r,disabledReason:"Not supported in this browser",tip:'Say "scroll down", "go to main", "click"'}),x(Ee,{}),x(Gt,{label:"\u{1F916} AI Features",color:"#7c3aed",badge:"Gemini Nano",concept:"Large Language Model running privately on your device \u2014 Chrome 127+ only"}),x("div",{style:{margin:"4px 18px 6px",padding:"8px 10px",background:o?"#f0fdfa":"#f5f3ff",borderRadius:"8px",border:`0.5px solid ${o?"#99f6e4":"#c4b5fd"}`,fontSize:"10px",color:o?"#0f766e":"#7c3aed",lineHeight:1.5},children:o?"\u2705 Gemini Nano detected \u2014 AI features ready. Runs privately on your device.":"\u2699\uFE0F AI features need one-time setup \u2014 see guide below."}),!o&&ee("div",{style:{margin:"0 18px 8px",padding:"10px 12px",background:"#fafafa",borderRadius:"8px",border:"0.5px solid #e2e8f0",fontSize:"11px",color:"#475569",lineHeight:1.7},children:[x("p",{style:{margin:"0 0 6px",fontWeight:600,color:"#0f172a",fontSize:"11px"},children:"\u{1F6E0} One-time setup \u2014 5 steps:"}),ee("p",{style:{margin:"0 0 3px"},children:["1. Open Chrome \u2192 ",x("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://flags"})]}),x("p",{style:{margin:"0 0 3px"},children:"2. Enable each flag:"}),x("div",{style:{display:"flex",flexDirection:"column",gap:"2px",margin:"4px 0 6px 10px"},children:_a.map(b=>ee("span",{style:{fontSize:"10px",color:"#7c3aed",fontFamily:"monospace"},children:["\u2192 ",b]},b))}),ee("p",{style:{margin:"0 0 3px"},children:["3. Click ",x("strong",{style:{color:"#0f172a"},children:"Relaunch"})]}),ee("p",{style:{margin:"0 0 3px"},children:["4. ",x("code",{style:{background:"#f1f5f9",padding:"1px 5px",borderRadius:"4px",fontSize:"10px",color:"#0d9488",fontFamily:"monospace"},children:"chrome://components"})," \u2192 Optimization Guide On Device Model \u2192 Check for update"]}),x("p",{style:{margin:"0"},children:"5. Refresh \u2014 AI features unlock automatically \u2705"})]}),x(Ye,{icon:"\u{1F4DD}",label:"Plain English mode",desc:"Rewrites complex text in simple language",checked:t.plainEnglish,onChange:b=>i("plainEnglish",b),disabled:!o,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: LLM text rewriting"}),x(Ee,{}),x(Ye,{icon:"\u{1F4CB}",label:"Summarise page",desc:"3-sentence summary appears at top",checked:t.summarisePage,onChange:b=>i("summarisePage",b),disabled:!o,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Abstractive summarisation"}),x(Ee,{}),x(Ye,{icon:"\u{1F3F7}\uFE0F",label:"Smart aria-labels",desc:"AI generates meaningful labels for elements",checked:t.smartLabels,onChange:b=>i("smartLabels",b),disabled:!o,disabledReason:"Enable Gemini Nano \u2014 see setup above",tip:"AI concept: Context-aware label generation"}),x(Ee,{}),x(Gt,{label:"\u{1F441}\uFE0F Visual",concept:"CSS filter-based \u2014 works on all browsers and devices"}),x(Pt,{steps:["Toggle any visual mode","Changes apply instantly","Works on mobile and desktop"]}),x(Ye,{icon:"\u25D1",label:"High contrast",desc:"Boosts contrast for low vision users",checked:t.highContrast,onChange:b=>i("highContrast",b),tip:"CSS filter: contrast()"}),x(Ee,{}),x(Ye,{icon:"\u{1F319}",label:"Dark mode",desc:"Inverts colours \u2014 easy on eyes at night",checked:t.darkMode,onChange:b=>i("darkMode",b),tip:"CSS filter: invert + hue-rotate"}),x(Ee,{}),x(Ye,{icon:"\u23F8\uFE0F",label:"Reduce motion",desc:"Disables all animations",checked:t.reduceMotion,onChange:b=>i("reduceMotion",b),tip:"WCAG 2.3.3 \u2014 vestibular disorders"}),x(Ee,{}),x(Ye,{icon:"\u{1F446}",label:"Large targets",desc:"44\xD744px minimum touch targets",checked:t.largeTargets,onChange:b=>i("largeTargets",b),tip:"WCAG 2.5.8 \u2014 motor impaired users"}),x(Ee,{}),ee("div",{style:{padding:"10px 18px"},children:[x("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F3A8} Colour blindness"}),x("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"SVG colour matrix filters \u2014 all devices"}),x("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:Za.map(b=>x("button",{onClick:()=>i("colorBlindMode",b.value),"aria-pressed":t.colorBlindMode===b.value,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.colorBlindMode===b.value?"#0d9488":"#e2e8f0"}`,background:t.colorBlindMode===b.value?"#f0fdfa":"#fff",color:t.colorBlindMode===b.value?"#0d9488":"#64748b",cursor:"pointer",minHeight:u?"36px":"auto"},children:b.label},b.value))})]}),x(Ee,{}),x(Gt,{label:"\u{1F524} Font",concept:"Browser Font API + CSS \u2014 Chrome 103+"}),x(Pt,{steps:["Toggle dyslexia font or pick from device","Adjust size with + / \u2212","Saved across visits"]}),x(Ye,{icon:"Aa",label:"Dyslexia-friendly font",desc:"Atkinson Hyperlegible \u2014 research-backed",checked:t.dyslexiaFont,onChange:b=>i("dyslexiaFont",b),tip:"By Braille Institute \u2014 free and open source"}),x(Ee,{}),ee("div",{style:{padding:"10px 18px"},children:[x("p",{style:{margin:"0 0 2px",fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F5A5}\uFE0F Local font"}),x("p",{style:{margin:"0 0 8px",fontSize:"10px",color:"#94a3b8"},children:"window.queryLocalFonts() \u2014 Chrome 103+"}),d.length>0?ee("select",{value:t.localFont,onChange:b=>i("localFont",b.target.value),"aria-label":"Choose a font from your device",style:{width:"100%",padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"13px",color:"#0f172a",background:"#fff",cursor:"pointer",height:u?"44px":"36px"},children:[x("option",{value:"",children:"System default"}),d.map(b=>x("option",{value:b,style:{fontFamily:b},children:b},b))]}):x("p",{style:{margin:0,fontSize:"11px",color:"#94a3b8"},children:"Allow font access when Chrome prompts you."})]}),x(Ee,{}),ee("div",{style:{padding:"10px 18px 14px"},children:[ee("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:"10px"},children:[ee("div",{children:[x("p",{style:{margin:0,fontSize:"12px",fontWeight:500,color:"#0f172a"},children:"\u{1F4CF} Text size"}),x("p",{style:{margin:0,fontSize:"10px",color:"#94a3b8"},children:"Scales all text on the page"})]}),ee("span",{style:{fontSize:"12px",fontWeight:600,color:"#0d9488",background:"#f0fdfa",padding:"2px 8px",borderRadius:"99px"},children:[t.fontScale,"%"]})]}),ee("div",{style:{display:"flex",alignItems:"center",gap:"8px"},children:[x("button",{onClick:()=>{let b=St.indexOf(t.fontScale);b>0&&i("fontScale",St[b-1])},disabled:t.fontScale<=80,"aria-label":"Decrease text size",style:{width:u?"44px":"30px",height:u?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale<=80?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale<=80?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"\u2212"}),x("div",{style:{flex:1,display:"flex",gap:"3px"},children:St.map(b=>x("button",{onClick:()=>i("fontScale",b),"aria-label":`Set text size to ${b}%`,style:{flex:1,height:"6px",borderRadius:"99px",border:"none",cursor:"pointer",padding:0,background:b<=t.fontScale?"#0d9488":"#e2e8f0",transition:"background 0.15s"}},b))}),x("button",{onClick:()=>{let b=St.indexOf(t.fontScale);b<St.length-1&&i("fontScale",St[b+1])},disabled:t.fontScale>=130,"aria-label":"Increase text size",style:{width:u?"44px":"30px",height:u?"44px":"30px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",cursor:t.fontScale>=130?"not-allowed":"pointer",fontSize:"16px",color:t.fontScale>=130?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"+"})]})]}),x(Ee,{}),x(Gt,{label:"\u{1F310} Translate",color:"#7c3aed",badge:"Gemini Nano",concept:"Chrome Translation API \u2014 on device, no internet after setup"}),x(Pt,{steps:["Enable Gemini Nano first","Pick your language","Full page translates instantly"]}),ee("div",{style:{padding:"6px 18px 12px"},children:[x("div",{style:{display:"flex",flexWrap:"wrap",gap:"6px"},children:aA.slice(0,u?8:18).map(b=>x("button",{onClick:()=>i("translateLanguage",b.code),"aria-pressed":t.translateLanguage===b.code,disabled:!o,style:{padding:"4px 10px",borderRadius:"20px",fontSize:"11px",fontWeight:500,border:`1px solid ${t.translateLanguage===b.code?"#7c3aed":"#e2e8f0"}`,background:t.translateLanguage===b.code?"#f5f3ff":"#fff",color:t.translateLanguage===b.code?"#7c3aed":"#64748b",cursor:o?"pointer":"not-allowed",opacity:o?1:.5,minHeight:u?"36px":"auto"},children:b.label},b.code))}),!o&&x("p",{style:{margin:"6px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano using the setup guide above."})]}),x(Ee,{}),x(Gt,{label:"\u{1F4AC} Ask This Page",color:"#0d9488",badge:W,concept:"RAG \u2014 Retrieval Augmented Generation. Works on all devices including mobile."}),x(Pt,{steps:["Type any question about this page","Press Ask or hit Enter",h==="transformers"?"Transformers.js answers \u2014 works on mobile, offline":"Gemini Nano reads page and answers privately","Zero cost. No data leaves your device."]}),ee("div",{style:{margin:"0 18px 8px",padding:"6px 10px",background:h==="gemini"?"#f0fdfa":h==="transformers"?"#f5f3ff":"#f8fafc",borderRadius:"8px",border:`0.5px solid ${h==="gemini"?"#99f6e4":h==="transformers"?"#c4b5fd":"#e2e8f0"}`,fontSize:"10px",color:h==="gemini"?"#0f766e":h==="transformers"?"#7c3aed":"#94a3b8"},children:[h==="gemini"&&"\u2705 Using Gemini Nano \u2014 on device, private, instant",h==="transformers"&&"\u2705 Using Transformers.js \u2014 works on mobile and all browsers",!h&&"\u23F3 Detecting AI engine...",h==="transformers"&&w==="loading"&&" \xB7 Loading model...",h==="transformers"&&w==="ready"&&" \xB7 Model ready \u2705"]}),ee("div",{style:{padding:"0 18px 14px"},children:[ee("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[x("input",{type:"text",value:f,onChange:b=>c(b.target.value),onKeyDown:b=>{b.key==="Enter"&&U()},placeholder:"e.g. What does this page do?",disabled:p||!h,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:h?"#fff":"#f8fafc",outline:"none",height:u?"44px":"36px"}}),x("button",{onClick:U,disabled:p||!f.trim()||!h,"aria-label":"Ask question",style:{padding:"8px 14px",borderRadius:"8px",border:"none",background:h&&f.trim()&&!p?"#0d9488":"#e2e8f0",color:h&&f.trim()&&!p?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:h&&f.trim()&&!p?"pointer":"not-allowed",flexShrink:0,height:u?"44px":"36px",minWidth:"52px",transition:"background 0.2s"},children:p?S:"Ask"})]}),C&&ee("div",{role:"status","aria-live":"polite",style:{padding:"10px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",lineHeight:1.6,maxHeight:"180px",overflowY:"auto"},children:[x("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#0d9488"},children:"\u{1F4AC} Answer"}),C,x("button",{onClick:()=>{y(""),c("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]})]}),A&&x("div",{role:"status",style:{margin:"0 14px 10px",padding:"8px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:"8px",fontSize:"12px",color:"#0f766e",fontWeight:500,fontFamily:"monospace"},children:A.fixed>0?`\u2713 ${A.fixed} fixes \xB7 ${A.scanned} nodes \xB7 ${A.renderTime}ms \xB7 Score: ${A.score}/100`:`\u2713 0 auto-fixes needed \xB7 ${A.scanned} nodes \xB7 ${A.renderTime}ms`}),ee("div",{style:{display:"flex",gap:"8px",padding:"12px 14px 14px",position:u?"sticky":"relative",bottom:u?0:"auto",background:"#fff",borderTop:"1px solid #f1f5f9"},children:[x("button",{onClick:g,style:{flex:1,padding:u?"12px 0":"8px 0",fontSize:"13px",fontWeight:500,borderRadius:"9px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",cursor:"pointer"},children:"Reset"}),x("button",{onClick:s,style:{flex:2,padding:u?"12px 0":"8px 0",fontSize:"13px",fontWeight:600,borderRadius:"9px",border:"none",background:"#0d9488",color:"#fff",cursor:"pointer"},children:"Apply settings"})]})]})});ZA.displayName="WidgetPanel";import{useState as Kt,useCallback as ao}from"react";var Ag={hotel:["hotel","resort","motel","inn","accommodation","lodge","stay","room","booking","hospitality"],ecommerce:["shop","store","ecommerce","e-commerce","sell","product","cart","buy","marketplace","retail"],restaurant:["restaurant","food","cafe","cafeteria","menu","dining","eat","cuisine","bistro","takeaway","delivery"],portfolio:["portfolio","freelance","personal","designer","developer","creative","showcase","work","hire me"],blog:["blog","article","post","write","news","magazine","journal","content"],saas:["saas","dashboard","app","software","platform","tool","analytics","admin","manage","crm"],government:["government","govt","portal","citizen","scheme","welfare","municipal","public","official"],healthcare:["hospital","clinic","doctor","health","medical","patient","appointment","pharmacy"],education:["school","college","university","course","learn","education","student","lms","training"],realestate:["real estate","property","house","flat","apartment","rent","buy property","listing"],landing:["landing","startup","launch","product launch","coming soon","waitlist"],generic:[]},ng={hotel:["home","rooms","booking","about","contact"],ecommerce:["home","products","cart","checkout","about","contact"],restaurant:["home","menu","reservations","about","contact"],portfolio:["home","portfolio","about","contact"],blog:["home","blog","about","contact"],saas:["home","pricing","dashboard","auth","about","contact"],government:["home","services","about","contact","faq"],healthcare:["home","services","booking","team","about","contact"],education:["home","services","pricing","about","contact"],realestate:["home","products","about","contact"],landing:["home","pricing","about","contact"],generic:["home","about","services","contact"]},og={home:["home","homepage","main","landing"],about:["about","who we are","our story","company"],contact:["contact","reach us","get in touch","location"],services:["service","what we offer","solution","offering"],pricing:["pricing","price","plan","subscription","cost","fee"],blog:["blog","article","news","post"],auth:["login","register","signup","sign up","sign in","auth","account"],dashboard:["dashboard","admin","panel","manage","analytics"],gallery:["gallery","photo","image","portfolio"],products:["product","shop","store","item","catalogue"],cart:["cart","basket","shopping cart"],checkout:["checkout","payment","pay","order"],rooms:["room","suite","accommodation","stay"],booking:["booking","reserve","reservation","schedule","appointment"],menu:["menu","food","dish","cuisine"],reservations:["reservation","table booking","book table"],portfolio:["portfolio","work","project","case study"],team:["team","staff","member","people","who we are"],faq:["faq","question","answer","help","support"],terms:["terms","condition","legal"],privacy:["privacy","policy","gdpr","data"]},ig={Authentication:["login","register","auth","signup","sign in","account"],Payment:["payment","stripe","pay","checkout","billing"],Search:["search","filter","find"],"Dark mode":["dark mode","dark theme","night mode"],"Multi-language":["multilingual","multi language","translation","i18n"],SEO:["seo","search engine","meta","google"],Analytics:["analytics","tracking","stats","dashboard"],Email:["email","newsletter","contact form","notification"],Map:["map","location","address","google maps"],"Social media":["social","instagram","facebook","twitter","share"],"Image gallery":["gallery","photo","image","carousel"],"Booking system":["booking","reservation","appointment","schedule"],"Shopping cart":["cart","basket","shop","ecommerce"],"Blog/CMS":["blog","cms","content","article","post"]},rg={blue:["blue","navy","sky","ocean","corporate"],green:["green","nature","eco","environment","health","fresh"],purple:["purple","violet","luxury","creative","royal"],red:["red","bold","energy","passion","food"],orange:["orange","warm","friendly","fun"],teal:["teal","turquoise","modern","tech"],indigo:["indigo","professional","trust","finance","bank"],gray:["gray","minimal","clean","simple","neutral"]},sg={hotel:"indigo",ecommerce:"blue",restaurant:"red",portfolio:"purple",blog:"gray",saas:"teal",government:"blue",healthcare:"green",education:"indigo",realestate:"orange",landing:"purple",generic:"blue"};function ag(e){let t=[/(?:for|called|named|company|business|brand)\s+["']?([A-Z][a-zA-Z\s]{1,30})["']?/i,/["']([A-Z][a-zA-Z\s]{1,30})["']/,/^([A-Z][a-zA-Z]+(?:\s[A-Z][a-zA-Z]+)?)/m];for(let A of t){let n=e.match(A);if(n?.[1]){let o=n[1].trim();if(o.length>2&&o.length<40)return o}}return"My Business"}function gg(e){let t=e.toLowerCase(),A="generic",n=0;for(let[o,r]of Object.entries(Ag)){let i=0;for(let s of r)t.includes(s)&&i++;i>n&&(n=i,A=o)}return A}function lg(e,t){let A=e.toLowerCase(),n=new Set(ng[t]);for(let[o,r]of Object.entries(og))for(let i of r)if(A.includes(i)){n.add(o);break}return n.add("home"),n.add("contact"),Array.from(n)}function cg(e){let t=e.toLowerCase(),A=[];for(let[n,o]of Object.entries(ig))for(let r of o)if(t.includes(r)){A.push(n);break}return A}function Ig(e,t){let A=e.toLowerCase();for(let[n,o]of Object.entries(rg))for(let r of o)if(A.includes(r))return n;return sg[t]}function so(e){let t=gg(e),A=lg(e,t),n=cg(e),o=Ig(e,t);return{siteName:ag(e),websiteType:t,pages:A,features:n,theme:o,description:e.slice(0,200)}}import{Fragment as pg,jsx as j,jsxs as ae}from"react/jsx-runtime";var ug=["Hotel booking website for Grand Palace Hotels with rooms, booking and payment","E-commerce store for organic food products with cart and checkout","Restaurant website for Spice Garden with menu and table reservations","Portfolio website for a freelance designer with gallery and contact","SaaS dashboard for project management with pricing and auth","Government portal for citizen services with FAQ and contact"],dg={home:"\u{1F3E0}",about:"\u2139\uFE0F",contact:"\u{1F4EC}",services:"\u2699\uFE0F",pricing:"\u{1F4B0}",blog:"\u{1F4DD}",auth:"\u{1F510}",dashboard:"\u{1F4CA}",gallery:"\u{1F5BC}\uFE0F",products:"\u{1F6D2}",cart:"\u{1F6CD}\uFE0F",checkout:"\u{1F4B3}",rooms:"\u{1F6CF}\uFE0F",booking:"\u{1F4C5}",menu:"\u{1F37D}\uFE0F",reservations:"\u{1FA91}",portfolio:"\u{1F4BC}",team:"\u{1F465}",faq:"\u2753",terms:"\u{1F4C4}",privacy:"\u{1F512}"},Cg={hotel:"\u{1F3E8}",ecommerce:"\u{1F6D2}",restaurant:"\u{1F37D}\uFE0F",portfolio:"\u{1F4BC}",blog:"\u{1F4DD}",saas:"\u26A1",government:"\u{1F3DB}\uFE0F",healthcare:"\u{1F3E5}",education:"\u{1F393}",realestate:"\u{1F3E0}",landing:"\u{1F680}",generic:"\u{1F310}"};function _A({position:e,onClose:t}){let[A,n]=Kt("input"),[o,r]=Kt(""),[i,s]=Kt(null),[g,a]=Kt(0),[l,u]=Kt(""),I=ao(()=>{if(!o.trim())return;let c=so(o);s(c),n("preview")},[o]),d=ao(async()=>{if(i){n("generating"),a(0),u("");try{let c=[{msg:"Parsing requirement...",pct:15},{msg:"Loading templates...",pct:30},{msg:"Generating pages...",pct:55},{msg:"Building components...",pct:70},{msg:"Creating styles...",pct:85},{msg:"Packaging ZIP...",pct:95}];for(let y of c)a(y.pct),await new Promise(p=>setTimeout(p,200));let{generateZip:C}=await import("./zip-generator-D5EXBBNS.mjs");await C(i),a(100),n("done")}catch(c){u(c instanceof Error?c.message:"Generation failed. Please try again."),n("preview")}}},[i]),m=()=>{n("input"),r(""),s(null),a(0),u("")},f={position:"fixed",bottom:"204px",[e]:"24px",zIndex:9999,width:"340px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.14)",fontFamily:"system-ui,-apple-system,sans-serif",maxHeight:"75vh",overflowY:"auto"};return ae("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai Vibe Coder","data-yuktai-panel":"true",style:f,children:[ae("div",{style:{padding:"14px 16px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between",position:"sticky",top:0,background:"#fff",zIndex:1},children:[ae("div",{children:[j("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:700,color:"#0f172a"},children:"\u26A1 Vibe Coder"}),j("p",{style:{margin:0,fontSize:"10px",color:"#64748b"},children:"Describe your website \u2192 Download Next.js ZIP"})]}),j("button",{onClick:t,"aria-label":"Close vibe coder",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",padding:"2px"},children:"\xD7"})]}),A==="input"&&ae("div",{style:{padding:"14px 16px"},children:[j("p",{style:{margin:"0 0 10px",fontSize:"11px",color:"#64748b"},children:"Describe your business website in plain English. The plugin will generate a complete Next.js project for you."}),j("p",{style:{margin:"0 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Examples"}),j("div",{style:{display:"flex",flexDirection:"column",gap:"4px",marginBottom:"12px"},children:ug.slice(0,3).map(c=>j("button",{onClick:()=>r(c),style:{padding:"6px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#475569",fontSize:"10px",cursor:"pointer",textAlign:"left",lineHeight:1.4},children:c},c))}),j("textarea",{value:o,onChange:c=>r(c.target.value),placeholder:"e.g. I need a hotel booking website with rooms, search, and payment for Grand Palace Hotels",rows:4,"aria-label":"Describe your website",style:{width:"100%",padding:"10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",resize:"vertical",outline:"none",fontFamily:"inherit",lineHeight:1.5}}),j("button",{onClick:I,disabled:!o.trim(),style:{width:"100%",marginTop:"10px",padding:"10px",borderRadius:"8px",border:"none",background:o.trim()?"#f59e0b":"#e2e8f0",color:o.trim()?"#fff":"#94a3b8",fontSize:"13px",fontWeight:700,cursor:o.trim()?"pointer":"not-allowed",transition:"background 0.2s"},children:"Analyse Requirement \u2192"})]}),A==="preview"&&i&&ae("div",{style:{padding:"14px 16px"},children:[l&&ae("div",{style:{padding:"10px",background:"#fef2f2",border:"1px solid #fca5a5",borderRadius:"8px",marginBottom:"12px",fontSize:"11px",color:"#dc2626"},children:["\u26A0\uFE0F ",l]}),ae("div",{style:{background:"#f8fafc",borderRadius:"10px",padding:"12px",marginBottom:"12px"},children:[ae("div",{style:{display:"flex",alignItems:"center",gap:"8px",marginBottom:"8px"},children:[j("span",{style:{fontSize:"1.5rem"},children:Cg[i.websiteType]||"\u{1F310}"}),ae("div",{children:[j("p",{style:{margin:0,fontSize:"13px",fontWeight:700,color:"#0f172a"},children:i.siteName}),ae("p",{style:{margin:0,fontSize:"10px",color:"#64748b",textTransform:"capitalize"},children:[i.websiteType," website \xB7 ",i.theme," theme"]})]})]}),ae("p",{style:{margin:"8px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:["Pages to generate (",i.pages.length,")"]}),j("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:i.pages.map(c=>ae("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f0fdf4",border:"1px solid #86efac",fontSize:"10px",color:"#166534",fontWeight:500},children:[dg[c]||"\u{1F4C4}"," ",c]},c))}),i.features.length>0&&ae(pg,{children:[j("p",{style:{margin:"10px 0 6px",fontSize:"10px",fontWeight:600,color:"#94a3b8",textTransform:"uppercase"},children:"Detected features"}),j("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px"},children:i.features.map(c=>j("span",{style:{padding:"2px 8px",borderRadius:"99px",background:"#f5f3ff",border:"1px solid #c4b5fd",fontSize:"10px",color:"#7c3aed",fontWeight:500},children:c},c))})]})]}),ae("div",{style:{margin:"0 0 12px",padding:"10px 12px",background:"#f0fdf4",borderRadius:"8px",border:"1px solid #86efac"},children:[j("p",{style:{margin:"0 0 4px",fontSize:"10px",fontWeight:700,color:"#166534"},children:"\u{1F4E6} What you get:"}),ae("p",{style:{margin:0,fontSize:"10px",color:"#166534",lineHeight:1.6},children:["\u2705 Complete Next.js 16 project",j("br",{}),"\u2705 Tailwind CSS + CSS Modules",j("br",{}),"\u2705 TypeScript configured",j("br",{}),"\u2705 Navbar + Footer components",j("br",{}),"\u2705 All ",i.pages.length," pages ready",j("br",{}),"\u2705 Mobile responsive",j("br",{}),"\u2705 npm run dev \u2192 works immediately"]})]}),ae("div",{style:{display:"flex",gap:"8px"},children:[j("button",{onClick:m,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"\u2190 Edit"}),j("button",{onClick:d,style:{flex:2,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"13px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Generate & Download ZIP"})]})]}),A==="generating"&&ae("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[j("p",{style:{fontSize:"2rem",marginBottom:"1rem"},children:"\u26A1"}),j("p",{style:{fontSize:"13px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:"Generating your project..."}),j("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem"},children:g<30?"Parsing requirement...":g<55?"Loading templates...":g<70?"Generating pages...":g<85?"Building components...":g<95?"Creating styles...":"Packaging ZIP..."}),j("div",{style:{height:"8px",background:"#e2e8f0",borderRadius:"99px",overflow:"hidden"},children:j("div",{style:{height:"100%",width:`${g}%`,background:"#f59e0b",borderRadius:"99px",transition:"width 0.3s ease"}})}),ae("p",{style:{marginTop:"0.5rem",fontSize:"10px",color:"#94a3b8"},children:[g,"%"]})]}),A==="done"&&i&&ae("div",{style:{padding:"2rem 16px",textAlign:"center"},children:[j("p",{style:{fontSize:"3rem",marginBottom:"0.75rem"},children:"\u2705"}),ae("p",{style:{fontSize:"14px",fontWeight:700,color:"#0f172a",marginBottom:"0.5rem"},children:[i.siteName," downloaded!"]}),j("p",{style:{fontSize:"11px",color:"#64748b",marginBottom:"1.5rem",lineHeight:1.6},children:"Your ZIP is downloading. Unzip it and run:"}),["npm install","npm run dev"].map(c=>j("div",{style:{background:"#0f172a",borderRadius:"8px",padding:"8px 12px",marginBottom:"6px",textAlign:"left"},children:ae("code",{style:{fontSize:"12px",color:"#a7f3d0",fontFamily:"monospace"},children:["$ ",c]})},c)),j("p",{style:{fontSize:"11px",color:"#10b981",margin:"1rem 0",fontWeight:600},children:"Then open http://localhost:3000 \u{1F680}"}),ae("div",{style:{display:"flex",gap:"8px"},children:[j("button",{onClick:m,style:{flex:1,padding:"9px",borderRadius:"8px",border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",fontSize:"12px",fontWeight:600,cursor:"pointer"},children:"New Project"}),j("button",{onClick:d,style:{flex:1,padding:"9px",borderRadius:"8px",border:"none",background:"#f59e0b",color:"#fff",fontSize:"12px",fontWeight:700,cursor:"pointer"},children:"\u2B07\uFE0F Download Again"})]})]})]})}var go=["AGFzbQEAAAABggESYAN/f38Bf2ACf38Bf2ACf38AYAN/f38AYAN/fH8AYAN/f3wAYAV/f39/fwBgBX9/f39/AX9gBH9/f38AYAR/","f39/AX9gAX8AYAp/f39/f3x/f39/AX9gAABgAX8Bf2AIf39/f3x/f38Bf2AAAX9gBn9/f39/fwBgBn9/f39/fwF/A2xrAgMEBQMD","AwMGAwAGAwYHBwcDAwgICAgDAwMDAwMDAwMIAwMDCQkJCQkJCQkJCQkJAQEAAwkHCgELCAIDCggKAwMADA0ODwIMAgMGEAIDAgYK","AwYCAgwKCgMBCAEDEQgJAAEICAMDAwwJAwAEBQFwAQICBQMBABEGCQF/AUGAgMAACwdaBgZtZW1vcnkCAAx5a19yYWdfYnVpbGQA","QQx5a19yYWdfcmVzZXQAQg55a19yYWdfc2NyYXRjaABDDXlrX3JhZ19zZWFyY2gARA55a19yYWdfdmVyc2lvbgBFCQcBAEEBCwFh","CqTuAWuOAgEGfwJAAkACQCAAKAIIIgJFDQAgASgCACIDKAIIIQRBACEFIAAoAgQiBiEBA0AgASgCACIHIARPDQICQCADKAIEIAdB","A3RqKwMARAAAAAAAAAAAZA0AAkAgBUEBaiACTw0AIAFBBGohASAFQX9zIAJqIQIDQCABKAIAIgcgAygCCCIETw0GAkAgAygCBCAH","QQN0aisDAEQAAAAAAAAAAGRFDQAgBiAFQQJ0aiAHNgIAIAVBAWohBQsgAUEEaiEBIAJBf2oiAg0ACwsgACAFNgIIDwsgAUEEaiEB","IAIgBUEBaiIFRw0ACwsPCyAHIARB8IbAgAAQ3ICAgAAACyAHIARB8IbAgAAQ3ICAgAAAC4gBAQJ/AkBBACACIAFrIgMgAyACSxsi","BCAAKAIAIAAoAggiA2tNDQAgACADIARBBEEEEMqAgIAAIAAoAgghAwsCQCABIAJPDQAgAyACaiABayEEIAAoAgQgA0ECdGohAwNA","IAMgATYCACADQQRqIQMgAiABQQFqIgFHDQALIAQhAwsgACADNgIIC/ABAQN/I4CAgIAAQSBrIgMkgICAgAACQAJAAkACQCABvVAN","ACADQRRqIAJBAEEIQQgQz4CAgAAgAygCGCEEIAMoAhRBAUYNAiADQQA2AhAgAyADKAIcNgIMIAMgBDYCCCADQQhqIAIgARCDgICA","ACAAIAMoAhA2AgggACADKQIINwIADAELIANBFGogAkEBQQhBCBDPgICAACADKAIYIQQgAygCFEEBRg0CIAMoAhwhBSAAIAI2Aggg","ACAFNgIEIAAgBDYCAAsgA0EgaiSAgICAAA8LIAQgAygCHBDMgICAAAALIAQgAygCHBDMgICAAAALlAEBA38CQCABIAAoAgAgACgC","CCIDa00NACAAIAMgAUEIQQgQyoCAgAAgACgCCCEDCyAAKAIEIANBA3RqIQQCQAJAAkAgAUECSQ0AIAFBf2ohBQNAIAQgAjkDACAE","QQhqIQQgBUF/aiIFDQALIAMgAWpBf2ohAwwBCyABRQ0BCyAEIAI5AwAgA0EBaiEDCyAAIAM2AggLzAEBA38jgICAgABBEGsiAySA","gICAAAJAAkACQAJAIAFB/wFxDQAgA0EEaiACQQFBAUEBEM+AgIAAIAMoAgghBCADKAIEQQFGDQIgAygCDCEFDAELIANBBGogAkEA","QQFBARDPgICAACADKAIIIQQgAygCBEEBRg0CIAMoAgwhBSACRQ0AIAUg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QQFBfiALGyAOIA1lGyAOIA5iIA0gDWJyGyILQX9GIAcgCEkgCxsNBiAFIAQ2AgwgACABIAYgBUEM","ahCqgICAACIGQQFqIQIgBiABTw0FIAEgAmshASAAIAJBAnRqIQBBACECDAcLIAkgBkHQhsCAABDcgICAAAALIAsgBkHghsCAABDc","gICAAAALIAwgBkHQhsCAABDcgICAAAALIAggC0HQhsCAABDcgICAAAALIAcgC0HghsCAABDcgICAAAALIAIgASABQcCGwIAAENqA","gIAAAAsgACAAIAEgBiAEEKyAgIAAIgYgAiADIAQQiICAgAAgASAGQX9zaiEBIAAgBkECdGoiAkEEaiEACyADQX9qIQMgAUEhTw0A","CwsgACABIAQQnYCAgAALIAVBEGokgICAgAALlQIBBH8CQCABQQJJDQACQAJAAkAgAiAAQQRqIAAQioCAgAAiAw0AQQIhBCABQQJG","DQEgAEEEaiEFQQIhBANAIAIgBUEEaiIGIAUQioCAgAANAiAGIQUgASAEQQFqIgRHDQAMAwsLQQIhBCABQQJGDQAgAEEEaiEFQQIh","BANAIAIgBUEEaiIGIAUQioCAgABFDQEgBiEFIAEgBEEBaiIERg0CDAALCyAEIAFGDQAgACABQQAgAUEBcmdBAXRBPnMgAhCLgICA","AAwBCyADRQ0AIAFBAXYhBSABQQJ0IABqQXxqIQQDQCAAKAIAIQEgACAEKAIANgIAIAQgATYCACAEQXxqIQQgAEEEaiEAIAVBf2oi","BQ0ACwsLwAIBBX8CQAJAAkACQAJAAkAgASgCACIDIAAoAgAiACgCBCIEKAIIIgFPDQAgA0EBaiIFIAFPDQEgACgCACIGKAIIIQcg","BCgCBCIAIAVBAnRqKAIAIgQgACADQQJ0aigCACIDSQ0CIAQgB0sNAiACKAIAIgUgAU8NAyAFQQFqIgIgAU8NBCAAIAJBAnRqKAIA","IgEgACAFQQJ0aigCACIASQ0FIAEgB0sNBSAGKAIEIgcgA2ogBCADayAHIABqIAEgAGsQ6ICAgABB/wFxQf8BRg8LIAMgAUGAh8CA","ABDcgICAAAALIAUgAU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ADwsgACABQQN2IgVBOGxqIQYgACAFQQV0aiEHAkACQCABQcAASQ0AIAAgByAGIAUgBBCQgICAACEFDAELIAAgBiAHIAApAwAi","CCAHKQMAIglUIgUgCSAGKQMAIgpUcxsgBSAIIApUcxshBQsgBSAAayIGQQN2IQUCQAJAIAJFDQAgAikDACAAIAZqKQMAVA0AIAAg","ASAFIAAQroCAgAAiBUEBaiECAkAgBSABTw0AIAEgAmshASAAIAJBA3RqIQBBACECDAILIAIgASABQcCGwIAAENqAgIAAAAsgACAA","IAEgBSAAEK+AgIAAIgUgAiADIAQQjYCAgAAgASAFQX9zaiEBIAAgBUEDdGoiAkEIaiEACyADQX9qIQMgAUEhTw0ACwsgACABIAQQ","n4CAgAALswMFA38CfAJ/AXwBfwJAIANB+P///wFxRQ0AIAAgACADQQN2IgNBBHQiBWogACADQRxsIgZqIAMgBBCOgICAACEAIAEg","ASAFaiABIAZqIAMgBBCOgICAACEBIAIgAiAFaiACIAZqIAMgBBCOgICAACECCwJAAkACQCABKAIAIgMgBCgCACgCACIHKAIIIgZP","DQAgACgCACIEIAZPDQEgAigCACIFIAZPDQICQEEAQQBBfyAHKAIEIgYgA0EDdGorAwAiCCAGIARBA3RqKwMAIglmIgcbQQFBfiAH","GyAIIAllGyAIIAhiIgogCSAJYiIHchsiC0F/RiAEIANJIAsbIgtBAEEAQX8gBiAFQQN0aisDACIMIAlmIgYbQQFBfiAGGyAMIAll","GyAMIAxiIg0gB3IbIgZBf0YgBCAFSSAGG0cNACACIAEgC0EAQQBBfyAMIAhmIgAbQQFBfiAAGyAMIAhlGyANIApyGyIAQX9GIAMg","BUkgABtzGyEACyAADwsgAyAGQdCGwIAAENyAgIAAAAsgBCAGQeCGwIAAENyAgIAAAAsgBSAGQdCGwIAAENyAgIAAAAuiAQECfwJA","IANB+P///wFxRQ0AIAAgACADQQN2IgNBBHQiBWogACADQRxsIgZqIAMgBBCPgICAACEAIAEgASAFaiABIAZqIAMgBBCPgICAACEB","IAIgAiAFaiACIAZqIAMgBBCPgICAACECCwJAIAQgACABEIqAgIAAIgMgBCAAIAIQioCAgABHDQAgAiABIAMgBCABIAIQioCAgABz","GyEACyAAC5gBAgJ/A34CQCADQfj///8BcUUNACAAIAAgA0EDdiIDQQV0IgVqIAAgA0E4bCIGaiADIAQQkICAgAAhACABIAEgBWog","ASAGaiADIAQQkICAgAAhASACIAIgBWogAiAGaiADIAQQkICAgAAhAgsgACACIAEgACkDACIHIAEpAwAiCFQiAyAIIAIpAwAiCVRz","GyADIAcgCVRzGwvwAgQFfwF8AX8BfAJAAkACQAJAIAFBfGoiAygCACIEIAIoAgAiBSgCACIGKAIIIgdPDQAgASgCACICIAdPDQEC","QEEAQQBBfyAGKAIEIgEgBEEDdGorAwAiCCABIAJBA3QiCWorAwAiCmYiARtBAUF+IAEbIAggCmUbIAggCGIgCiAKYnIbIgFBf0Yg","AiAESSABG0EBRw0AAkADQCADIgFBBGogBDYCACABIABGDQEgAUF8aiIDKAIAIgQgBSgCACIGKAIIIgdPDQUgAiAHTw0GQQBBAEF/","IAYoAgQiByAEQQN0aisDACIIIAcgCWorAwAiCmYiBxtBAUF+IAcbIAggCmUbIAggCGIgCiAKYnIbIgdBf0YgAiAESSAHGw0ACwsg","ASACNgIACw8LIAQgB0HQhsCAABDcgICAAAALIAIgB0HghsCAABDcgICAAAALIAQgB0HQhsCAABDcgICAAAALIAIgB0HghsCAABDc","gICAAAALfAEDfyOAgICAAEEQayIDJICAgIAAAkAgAiABIAFBfGoiBBCKgICAAEUNACADIAEoAgAiBTYCDAJAA0AgBCIBQQRqIAEo","AgA2AgAgASAARg0BIAIgA0EMaiABQXxqIgQQioCAgAANAAsLIAEgBTYCAAsgA0EQaiSAgICAAAupBAMJfwJ8AX8gAiABQQJ0QXxq","IgRqIQUgACAEaiEGIAAgAUEBdiIHQQJ0aiIIQXxqIQkgAygCACEKAkACQAJAAkACQANAIAAoAgAiAyAKKAIAIgsoAggiDE8NASAI","KAIAIgQgDE8NAiACIAQgA0E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IN","IAwgDVYbNwMAIAVBeGohBSACQQhqIQIgCEF4QQAgDCANVBtqIQggBkF4QQAgDCANWhtqIQYgACAJIApaQQN0aiEAIAQgC0EDdGoh","BCAHQX9qIgcNAAsgBkEIaiEFIAhBCGohBgJAIAFBAXFFDQAgAiAAIAQgACAGSSIIGykDADcDACAEIAAgBk9BA3RqIQQgACAIQQN0","aiEACwJAIAQgBUcNACAAIAZHDQAPCxDngICAAAALywECAn8CfAJAAkAgACABQQJ0aiIEKAIAIgEgAygCACgCACIFKAIIIgNPDQAg","ACACQQJ0aiICKAIAIgAgA08NASAEIAAgAUEAQQBBfyAFKAIEIgMgAUEDdGorAwAiBiADIABBA3RqKwMAIgdmIgMbQQFBfiADGyAG","IAdlGyAGIAZiIAcgB2JyGyIDQX9GIAAgAUkgAxsiAxs2AgAgAiABIAAgAxs2AgAPCyABIANB0IbAgAAQ3ICAgAAACyAAIANB4IbA","gAAQ3ICAgAAAC+wCAAJAIAFBCUkNACAAQQBBAyACEJaAgIAAIABBAUEHIAIQloCAgAAgAEECQQUgAhCWgICAACAAQQRBCCACEJaA","gIAAIABBAEEHIAIQloCAgAAgAEECQQQgAhCWgICAACAAQQNBCCACEJaAgIAAIABBBUEGIAIQloCAgAAgAEEAQQIgAhCWgICAACAA","QQFBAyACEJaAgIAAIABBBEEFIAIQloCAgAAgAEEHQQggAhCWgICAACAAQQFBBCACEJaAgIAAIABBA0EGIAIQloCAgAAgAEEFQQcg","AhCWgICAACAAQQBBASACEJaAgIAAIABBAkEEIAIQloCAgAAgAEEDQQUgAhCWgICAACAAQQZBCCACEJaAgIAAIABBAkEDIAIQloCA","gAAgAEEEQQUgAhCWgICAACAAQQZBByACEJaAgIAAIABBAUECIAIQloCAgAAgAEEDQQQgAhCWgICAACAAQQVBBiACEJaAgIAADwsA","C8wKAQl/AkAgAUEJSQ0AIABBDEEAIAIgAEEMaiIBIAAQioCAgAAiAxtqKAIAIQQgACAAQQBBDCADG2ooAgA2AgwgACAENgIAIABB","HEEEIAIgAEEcaiIFIABBBGoiBhCKgICAACIDG2ooAgAhBCAAIABBBEEcIAMbaigCADYCHCAAIAQ2AgQgAEEUQQggAiAAQRRqIgMg","AEEIaiIHEIqAgIAAIgQbaigCACEIIAAgAEEIQRQgBBtqKAIANgIUIAAgCDYCCCAAQSBBECACIABBIGoiCSAAQRBqIgQQioCAgAAi","CBtqKAIAIQogACAAQRBBICAIG2ooAgA2AiAgACAKNgIQIABBHEEAIAIgBSAAEIqAgIAAIggbaigCACEKIAAgAEEAQRwgCBtqKAIA","NgIcIAAgCjYCACAAQRBBCCACIAQgBxCKgICAACIIG2ooAgAhCiAAIABBCEEQIAgbaigCADYCECAAIAo2AgggAEEgQQwgAiAJIAEQ","ioCAgAAiCBtqKAIAIQogACAAQQxBICAIG2ooAgA2AiAgACAKNgIMIABBGEEUIAIgAEEYaiIIIAMQioCAgAAiChtqKAIAIQsgACAA","QRRBGCAKG2ooAgA2AhggACALNgIUIABBCEEAIAIgByAAEIqAgIAAIgobaigCACELIAAgAEEAQQggChtqKAIANgIIIAAgCzYCACAA","QQxBBCACIAEgBhCKgICAACIKG2ooAgAhCyAAIABBBEEMIAobaigCADYCDCAAIAs2AgQgAEEUQRAgAiADIAQQioCAgAAiChtqKAIA","IQsgACAAQRBBFCAKG2ooAgA2AhQgACALNgIQIABBIEEcIAIgCSAFEIqAgIAAIgobaigCACELIAAgAEEcQSAgChtqKAIANgIgIAAg","CzYCHCAAQRBBBCACIAQgBhCKgICAACIKG2ooAgAhCyAAIABBBEEQIAobaigCADYCECAAIAs2AgQgAEEYQQwgAiAIIAEQioCAgAAi","ChtqKAIAIQsgACAAQQxBGCAKG2ooAgA2AhggACALNgIMIABBHEEUIAIgBSADEIqAgIAAIgobaigCACELIAAgAEEUQRwgChtqKAIA","NgIcIAAgCzYCFCAAQQRBACACIAYgABCKgICAACIKG2ooAgAhCyAAIABBAEEEIAobaigCADYCBCAAIAs2AgAgAEEQQQggAiAEIAcQ","ioCAgAAiChtq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DCALVhs3AzggACAMIAsgDCALVBsiCyAHIAkgByAJVBsiByASIAogEiAKVBsiCSAHIAlWGyIKIBAgBSAQIAVWGyIFIAMgBCADIARW","GyIDIAUgA1YbIgQgCiAEVhsiDCALIAxWGzcDMCAAIAsgDCALIAxUGzcDKCAAIAogBCAKIARUGyIEIAcgCSAHIAlUGyIHIAUgAyAF","IANUGyIDIAcgA1YbIgUgBCAFVhs3AyAgACAEIAUgBCAFVBs3AxggACAHIAMgByADVBsiAyAIIAYgCCAGVhsiBCADIARWGzcDECAA","IAMgBCADIARUGzcDCA8LAAuEBQACQCABQQ1JDQAgAEEAQQwgAhCWgICAACAAQQFBCiACEJaAgIAAIABBAkEJIAIQloCAgAAgAEED","QQcgAhCWgICAACAAQQVBCyACEJaAgIAAIABBBkEIIAIQloCAgAAgAEEBQQYgAhCWgICAACAAQQJBAyACEJaAgIAAIABBBEELIAIQ","loCAgAAgAEEHQQkgAhCWgICAACAAQQhBCiACEJaAgIAAIABBAEEEIAIQloCAgAAgAEEBQQIgAhCWgICAACAAQQNBBiACEJaAgIAA","IABBB0EIIAIQloCAgAAgAEEJQQogAhCWgICAACAAQQtBDCACEJaAgIAAIABBBEEGIAIQloCAgAAgAEEFQQkgAhCWgICAACAAQQhB","CyACEJaAgIAAIABBCkEMIAIQloCAgAAgAEEAQQUgAhCWgICAACAAQQNBCCACEJaAgIAAIABBBEEHIAIQloCAgAAgAEEGQQsgAhCW","gICAACAAQQlBCiACEJaAgIAAIABBAEEBIAIQloCAgAAgAEECQQUgAhCWgICAACAAQQZBCSACEJaAgIAAIABBB0EIIAIQloCAgAAg","AEEKQQsgAhCWgICAACAAQQFBAyACEJaAgIAAIABBAkEEIAIQloCAgAAgAEEFQQYgAhCWgICAACAAQQlBCiACEJaAgIAAIABBAUEC","IAIQloCAgAAgAEEDQQQgAhCWgICAACAAQQVBByACEJaAgIAAIABBBkEIIAIQloCAgAAgAEECQQMgAhCWgICAACAAQQRBBSACEJaA","gIAAIABBBkEHIAIQloCAgAAgAEEIQQkgAhCWgICAACAAQQNBBCACEJaAgIAAIABBBUEGIAIQloCAgAAPCwAL8BIBDX8CQCABQQ1J","DQAgAEEwQQAgAiAAQTBqIgMgABCKgICAACIBG2ooAgAhBCAAIABBAEEwIAEbaigCADYCMCAAIAQ2AgAgAEEoQQQgAiAAQShqIgUg","AEEEaiIGEIqAgIAAIgEbaigCACEEIAAgAEEEQSggARtqKAIANgIoIAAgBDYCBCAAQSRBCCACIABBJGoiBCAAQQhqIgcQioCAgAAi","ARtqKAIAIQggACAAQQhBJCABG2ooAgA2AiQgACAINgIIIABBHEEMIAIgAEEcaiIJIABBDGoiCBCKgICAACIBG2ooAgAhCiAAIABB","DEEcIAEbaigCADYCHCAAIAo2AgwgAEEsQRQgAiAAQSxqIgsgAEEUaiIKEIqAgIAAIgEbaigCACEMIAAgAEEUQSwgARtqKAIANgIs","IAAgDDYCFCAAQSBBGCACIABBIGoiDCAAQRhqIgEQioCAgAAiDRtqKAIAIQ4gACAAQRhBICANG2ooAgA2AiAgACAONgIYIABBGEEE","IAIgASAGEIqAgIAAIg0baigCACEOIAAgAEEEQRggDRtqKAIANgIYIAAgDjYCBCAAQQxBCCACIAggBxCKgICAACING2ooAgAhDiAA","IABBCEEMIA0baigCADYCDCAAIA42AgggAEEsQRAgAiALIABBEGoiDRCKgICAACIOG2ooAgAhDyAAIABBEEEsIA4baigCADYCLCAA","IA82AhAgAEEkQRwgAiAEIAkQioCAgAAiDhtqKAIAIQ8gACAAQRxBJCAOG2ooAgA2AiQgACAPNgIcIABBKEEgIAIgBSAMEIqAgIAA","Ig4baigCACEPIAAgAEEgQSggDhtqKAIANgIoIAAgDzYCICAAQRBBACACIA0gABCKgICAACIOG2ooAgAhDyAAIABBAEEQIA4baigC","ADYCECAAIA82AgAgAEEIQQQgAiAHIAYQioCAgAAiDhtqKAIAIQ8gACAAQQRBCCAOG2ooAgA2AgggACAPNgIEIABBGEEMIAIgASAI","EIqAgIAAIg4baigCACEPIAAgAEEMQRggDhtqKAIANgIYIAAgDzYCDCAAQSBBHCACIAwgCRCKgICAACIOG2ooAgAhDyAAIABBHEEg","IA4baigCADYCICAAIA82AhwgAEEoQSQgAiAFIAQQioCAgAAiDhtqKAIAIQ8gACAAQSRBKCAOG2ooAgA2AiggACAPNgIkIABBMEEs","IAIgAyALEIqAgIAAIg4baigCACEPIAAgAEEsQTAgDhtqKAIANgIwIAAgDzYCLCAAQRhBECACIAEgDRCKgICAACIOG2ooAgAhDyAA","IABBEEEYIA4baigCADYCGCAAIA82AhAgAEEkQRQgAiAEIAoQioCAgAAiDhtqKAIAIQ8gACAAQRRBJCAOG2ooAgA2AiQgACAPNgIU","IABBLEEgIAIgCyAMEIqAgIAAIg4baigCACEPIAAgAEEgQSwgDhtqKAIANgIsIAAgDzYCICAAQTBBKCACIAMgBRCKgICAACIDG2oo","AgAhDiAAIABBKEEwIAMbaigCADYCMCAAIA42AiggAEEUQQAgAiAKIAAQioCAgAAiAxtqKAIAIQ4gACAAQQBBFCADG2ooAgA2AhQg","ACAONgIAIABBIEEMIAIgDCAIEIqAgIAAIgMbaigCACEOIAAgAEEMQSAgAxtqKAIANgIgIAAgDjYCDCAAQRxBECACIAkgDRCKgICA","ACIDG2ooAgAhDiAAIABBEEEcIAMbaigCADYCHCAAIA42AhAgAEEsQRggAiALIAEQioCAgAAiAxtqKAIAIQ4gACAAQRhBLCADG2oo","AgA2AiwgACAONgIYIABBKEEkIAIgBSAEEIqAgIAAIgMbaigCACEOIAAgAEEkQSggAxtqKAIANgIoIAAgDjYCJCAAQQRBACACIAYg","ABCKgICAACIDG2ooAgAhDiAAIABBAEEEIAMbaigCADYCBCAAIA42AgAgAEEUQQggAiAKIAcQioCAgAAiAxtqKAIAIQ4gACAAQQhB","FCADG2ooAgA2AhQgACAONgIIIABBJEEYIAIgBCABEIqAgIAAIgMbaigCACEOIAAgAEEYQSQgAxtqKAIANgIkIAAgDjYCGCAAQSBB","HCACIAwgCRCKgICAACIDG2ooAgAhDiAAIABBHEEgIAMbaigCADYCICAAIA42AhwgAEEsQSggAiALIAUQioCAgAAiCxtqKAIAIQMg","ACAAQShBLCALG2ooAgA2AiwgACADNgIoIABBDEEEIAIgCCAGEIqAgIAAIgsbaigCACEDIAAgAEEEQQwgCxtqKAIANgIMIAAgAzYC","BCAAQRBBCCACIA0gBxCKgICAACILG2ooAgAhAyAAIABBCEEQIAsbaigCADYCECAAIAM2AgggAEEYQRQgAiABIAoQioCAgAAiCxtq","KAIAIQMgACAAQRRBGCALG2ooAgA2AhggACADNgIUIABBKEEkIAIgBSAEEIqAgIAAIgUbaigCACELIAAgAEEkQSggBRtqKAIANgIo","IAAgCzYCJCAAQQhBBCACIAcgBhCKgICAACIFG2ooAgAhBiAAIABBBEEIIAUbaigCADYCCCAAIAY2AgQgAEEQQQwgAiANIAgQioCA","gAAiBRtqKAIAIQYgACAAQQxBECAFG2ooAgA2AhAgACAGNgIMIABBHEEUIAIgCSAKEIqAgIAAIgUbaigCACEGIAAgAEEUQRwgBRtq","KAIANgIcIAAgBjYCFCAAQSBBGCACIAwgARCKgICAACIFG2ooAgAhBiAAIABBGEEgIAUbaigCADYCICAAIAY2AhggAEEMQQggAiAI","IAcQioCAgAAiBRtqKAIAIQcgACAAQQhBDCAFG2ooAgA2AgwgACAHNgIIIABBFEEQIAIgCiANEIqAgIAAIgUbaigCACEHIAAgAEEQ","QRQgBRtqKAIANgIUIAAgBzYCECAAQRxBGCACIAkgARCKgICAACIFG2ooAgAhByAAIABBGEEcIAUbaigCADYCHCAAIAc2AhggAEEk","QSAgAiAEIAwQioCAgAAiBBtqKAIAIQwgACAAQSBBJCAEG2ooAgA2AiQgACAMNgIgIABBEEEMIAIgDSAIEIqAgIAAIgQbaigCACEI","IAAgAEEMQRAgBBtqKAIANgIQIAAgCDYCDCAAQRhBFCACIAEgChCKgICAACICG2ooAgAhASAAIABBFEEYIAIbaigCADYCGCAAIAE2","AhQPCwALlggBGH4CQCABQQ1JDQAgACAAKQNgIgM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BkEI","aiEHCwJAIAcgCEYNAANAIAYgACACQQN0aiIBKQMANwMAIAEgByIGKQMAIgo3AwAgAiAEIApaaiECIAZBCGoiByAIRw0ACyAHQXhq","IQYLIAYgACACQQN0aiIHKQMANwMAIAcgBTcDACACIAQgBVpqC6cCBAJ+BH8BfgF/AkAgAQ0AQQAPCyACKQMAIQQgACkDACEFQQAh","AiAAIQYCQCAAQQhqIgcgACABQQN0aiIIQXhqIglPDQBBACECIAAhBgNAIAYiByAAIAJBA3RqIgYpAwA3AwAgBiAHQQhqIgEpAwAi","CjcDACABIAAgAiAKIARUaiICQQN0aiILKQMANwMAIAsgB0EQaiIGKQMAIgo3AwAgAiAKIARUaiECIAdBGGogCUkNAAsgBkEIaiEH","CwJAIAcgCEYNAANAIAYgACACQQN0aiIBKQMANwMAIAEgByIGKQMAIgo3AwAgAiAKIARUaiECIAZBCGoiByAIRw0ACyAHQXhqIQYL","IAYgACACQQN0aiIHKQMANwMAIAcgBTcDACACIAUgBFRqC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAoAgAhBCAAIAAgAkECdGoi","AigCADYCACACIAQ2AgAgAEEEaiABQX9qIAAgAxCkgICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiIDKAIANgIAIAMgATYCACAC","DwsAC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAoAgAhBCAAIAAgAkECdGoiAigCADYCACACIAQ2AgAgAEEEaiABQX9qIAAgAxCl","gICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiIDKAIANgIAIAMgATYCACACDwsAC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAo","AgAhBCAAIAAgAkECdGoiAigCADYCACACIAQ2AgAgAEEEaiABQX9qIAAgAxCmgICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiID","KAIANgIAIAMgATYCACACDwsAC3cBAX8CQCABDQBBAA8LAkAgAiABTw0AIAAoAgAhBCAAIAAgAkECdGoiAigCADYCACACIAQ2AgAg","AEEEaiABQX9qIAAgAxCngICAACICIAFPDQAgACgCACEBIAAgACACQQJ0aiIDKAIANgIAIAMgATYCACACDwsAC3cBAX4CQCABDQBB","AA8LAkAgAiABTw0AIAApAwAhBCAAIAAgAkEDdGoiAikDADcDACACIAQ3AwAgAEEIaiABQX9qIAAgABCogICAACICIAFPDQAgACkD","ACEEIAAgACACQQN0aiIBKQMANwMAIAEgBDcDACACDwsAC3cBAX4CQCABDQBBAA8LAkAgAiABTw0AIAApAwAhBCAAIAAgAkEDdGoi","AikDADcDACACIAQ3AwAgAEEIaiABQX9qIAAgABCpgICAACICIAFPDQAgACkDACEEIAAgACACQQN0aiIBKQMANwMAIAEgBDcDACAC","DwsAC38BA38jgICAgABBEGsiAiSAgICAACACQQhqIAAgARDpgICAAAJAAkAgAigCCCIBIAIoAgwiA0cNAEEAIQAMAQtBACEAA0BB","AEECQQEgAS0AACIEQe8BSxsgBMBBQEgbIABqIQAgAUEBaiIBIANHDQALCyACQRBqJICAgIAAIAALDgAgACABIAAQsoCAgAALiQEB","An9BACEDAkBBACgC6I/AgAAiBA0AQfCPwIAAIQRBAEHwj8CAADYC6I/AgAALAkACQCABIARqQX9qQQAgAWtxIgEgAmoiBCABSQ0A","IAQ/AEEQdCICTQ0BQQAhAyAEIAJrQRB2IARB//8DcUEAR2pAAEF/Rw0BCyADDwtBACAENgLoj8CAACABCyEAAkAgASAAakEAKALo","j8CAAEcNAEEAIAA2AuiPwIAACwsSACADIAAgAiABIAMQtYCAgAALlAEBAX9BACEFAkACQCADIAFqQQAoAuiPwIAARg0AIAEgAiAE","ELKAgIAAIgJFDQECQCAEIAMgBCADSRsiA0UNACACIAEgA/wKAAALIAIhBQwBCwJAIAQgAWoiAz8AQRB0IgRNDQBBACEFIAMgBGtB","EHYgA0H//wNxQQBHakAAQX9GDQELQQAgAzYC6I/AgAAgAQ8LIAULAwAACyYAAkAgACABIAAQsoCAgAAiAUUNACAARQ0AIAFBACAA","/AsACyABC8AQAg5/AnwjgICAgABBMGsiCiSAgICAACAAQZwBaiELIABBkAFqIQxBACENAkADQCANIQ4gASEPIAJFDQFBACEQAkAC","QANAIA8gEGoiES0AACISQSBGDQEgAiAQQQFqIhBHDQALIAIhECAPIQEMAQsgEUEBaiEBIBBBf3MgAmohAgsgDiAETw0BIBBFDQEg","ACAAKALAAUEBaiIRNgLAAQJAIBENAAJAIAAoArABIhFFDQAgEUECdCIRRQ0AIAAoAqwBQQAgEfwLAAsgAEEBNgLAAQsgAEEANgK8","AQJAAkAgDyAQELCAgIAAQQNLDQAgCkEgaiAAIA8gEBC5gICAACAKKAIgQQFxRQ0BIAAgCigCJBC6gICAAAwBCyAAKAIsIhNFDQBB","ACEUAkADQCATIBRqQQF2IhEgACgCLCIVTw0BIApBGGogACAAKAIoIBFBAnRqKAIAELuAgIAAIBFBAWogFCAKKAIYIA8gCigCHCIV","IBAgFSAQSRsQ6oCAgAAiFiAVIBBrIBYbQQBIIhUbIhQgEyARIBUbIhNJDQALIBQgACgCLE8NASAUQQJ0IREDQCAKQRBqIAAgACgC","KCARaigCACITELuAgIAAIAooAhQgEEkNAiAPIAooAhAgEBDqgICAAA0CIAAgExC6gICAACARQQRqIREgFEEBaiIUIAAoAixPDQIM","AAsLIBEgFUGAiMCAABDcgICAAAALIA5BAWohDUEBIRECQAJAA0ACQAJAIBEgEEkiFEUNACAPIBFqLAAAQUBIDQELIA8gERCwgICA","AEEESQ0AIApBCGogACAPIBEQuYCAgAAgCigCCEEBRw0AIAooAgwiEyAAKAIgIhVPDQIgACgCHCATQQJ0aigCAEEDTQ0AIAAgExC6","gICAAAsCQCARIBBPDQAgESAUaiIRIBBNDQELCyAAQQA2ApgBIAAoArwBIhdFDQFBACEWA0ACQAJAAkACQAJAAkACQAJAIBYgACgC","vAEiEE8NACAAKAK4ASAWQQJ0aigCACIQIAAoAkQiEU8NASAQQQFqIg8gEU8NAiAAKAJAIhEgEEECdGooAgAiECARIA9BAnRqKAIA","IhVPDQcgEEECdCERA0AgECAAKAJQIg9PD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AgIAAAkAgASgCCCIAQX9GDQAgACABKAIMEMyAgIAAAAsgAUEQaiSAgICAAAud","AQECfyOAgICAAEEgayIDJICAgIAAIANBFGpBACACIAFrIgQgBCACSxtBAEEEQQQQz4CAgAAgAygCGCEEAkAgAygCFEEBRw0AIAQg","AygCHBDMgICAAAALIANBADYCECADIAMoAhw2AgwgAyAENgIIIANBCGogASACEIGAgIAAIAAgAygCEDYCCCAAIAMpAgg3AgAgA0Eg","aiSAgICAAAttAQN/IAAgARDTgICAACAAKAIEIgMgACgCCCIEaiEFAkACQAJAIAFBAkkNAAJAIAFBf2oiAUUNACAFIAIgAfwLAAsg","AyABIARqIgRqIQUMAQsgAUUNAQsgBSACOgAAIARBAWohBAsgACAENgIIC/ICAQF/I4CAgIAAQdABayIDJICAgIAAIANBDGogACAB","IAIQvYCAgAAgAygCICECAkBBACgCpI7AgABBf0YNAEGkjsCAABDXgICAAEGkjsCAABDWgICAAEGwjsCAAEEEQQQQyYCAgABBvI7A","gABBBEEEEMmAgIAAQciOwIAAQQRBBBDJgICAAEHUjsCAAEEEQQQQyYCAgABB4I7AgABBBEEEEMmAgIAAQeyOwIAAQQRBBBDJgICA","AEH4jsCAAEEEQQQQyYCAgABBhI/AgABBBEEEEMmAgIAAQZCPwIAAQQRBBBDJgICAAEGcj8CAAEEIQQgQyYCAgABBqI/AgAAQ14CA","gABBqI/AgAAQ1oCAgABBtI/AgABBBEEEEMmAgIAAQcCPwIAAQQRBBBDJgICAAEHMj8CAAEEEQQQQyYCAgABB2I/AgABBBEEEEMmA","gIAAC0GkjsCAACADQQxqQcQB/AoAACADQdABaiSAgICAACACQX9qC14BAX8jgICAgABBEGsiACSAgICAAEEAQX82AqSOwIAAIABB","CGoQ0ICAgABBAEHwj8CAADYC6I/AgABBACAAKQMINwKYjsCAAEEAQQA2AqCOwIAAIABBEGokgICAgAALPgEBfwJAIABBCGoiAEEA","KAKgjsCAACIBTQ0AQZiOwIAAIAAgAWtBABDAgICAAAtBACgCnI7AgABBB2pBeHELOwEBf0EAIQgCQEEAKAKkjsCAAEF/Rg0AQaSO","wIAAIAAgASACIAMgBCAGIAUgByAFELiAgIAAIQgLIAgLBABBAQsNACAAIAEQzoCAgAAPCwMADwsNACAAIAEQ1ICAgAAAC4gBAQR/","I4CAgIAAQRBrIgMkgICAgABBACEEIANBDGohBQJAAkAgAkUNACAAKAIAIgZFDQAgAyABNgIMIAYgAmwhBCAAKAIEIQIgA0EIaiEF","DAELCyAFIAQ2AgACQCADKAIMIgRFDQAgAygCCCIFRQ0AIAIgBSAEELOAgIAACyADQRBqJICAgIAAC1IBAX8jgICAgABBEGsiBSSA","gICAACAFQQhqIAAgASACIAMgBBDLgICAAAJAIAUoAggiBEF/Rg0AIAQgBSgCDBDMgICAAAALIAVBEGokgICAgAALuQEBAn8jgICA","gABBEGsiBiSAgICAAEEAIQcCQAJAIAUNAAwBCyADIAJqIgIgA0kNACAGQQRqIAEgAiABKAIAQQF0IgMgAiADSxsiA0EIQQRBASAF","QYEISRsgBUEBRhsiAiADIAJLGyIDIAQgBRDSgICAACAGKAIIIQcCQCAGKAIERQ0AIAYoAgwhAgwBCyABIAM2AgAgASAHNgIEQX8h","BwsgACACNgIEIAAgBzYCACAGQRBqJICAgIAACxwAAkAgAEUNACAAIAEQyICAgAAACxDVgICAAAALYwECfwJAAkACQCACIAFrIgMg","ACgCACAAKAIIIgRrTQ0AIAAgBCADQQFBARDKgICAACAAKAIIIQQMAQsgAiABRg0BCyADRQ0AIAAoAgQgBGogASAD/AoAAAsgACAE","IANqNgIIC0sBAX8jgICAgABBEGsiAiSAgICAACACIAA2AgQgAkGBgICAADYCDCACIAJBBGo2AghBmobAgAAgAkEIakEAQbCLwIAA","EOKAgIAAAAuxAQEBfgJAAkACQCAErSABrX4iBUIgiKcNACAFpyIEIAMQ24CAgAANAQsgAEEANgIEQQEhAQwBCwJAIAQNACAAIAM2","AghBACEBIABBADYCBAwBCxDHgICAAAJAAkAgAg0AIAQgAxCxgICAACECDAELIAQgAxC3gICAACECCwJAIAINACAAIAQ2AgggACAD","NgIEQQEhAQwBCyAAIAI2AgggACABNgIEQQAhAQsgACABNgIACw0AIABCgICAgBA3AwALEQAgACABIAEgAmoQzYCAgAALoAIDAX8B","fgN/I4CAgIAAQRBrIgUkgICAgAAgBK0gAq1+IganIQICQAJAAkACQAJAIAZCIIinDQAgAiADENuAgIAADQELIABBADYCBAwBC0EA","IQcgBUEMaiEIAkACQCAERQ0AIAEoAgAiCUUNACAFIAM2AgwgCSAEbCEHIAEoAgQhBCAFQQhqIQgMAQsLIAggBzYCAAJAAkACQCAF","KAIMRQ0AAkAgBSgCCCIBDQAgAg0CIAMhBAwDCyAEIAEgAyACELSAgIAAIQQMAgsgAg0AIAMhBAwDCxDHgICAACACIAMQsYCAgAAh","BAsgBA0BIAAgAzYCBAtBASEEDAELIAAgBDYCBEEAIQQLIAAgBDYCACAAIAI2AgggBUEQaiSAgICAAAspAQF/AkAgASAAKAIAIAAo","AggiAmtNDQAgACACIAFBAUEBEMqAgIAACwsNACABIAAQxoCAgAAACxcAQcCLwIAAQSNB1IvAgAAQ2ICAgAAACw4AIABBAUEBEMmA","gIAACwIAC0cBAX8jgICAgABBIGsiAySAgICAACADIAE2AhAgAyAANgIMIANBATsBHCADIAI2AhggAyADQQxqNgIUIANBFGoQtoCA","gAAAC5gEAQl/AkACQCABIABBA2pBfHEiAiAAayIDSQ0AIAEgA2siBEECdiIFRQ0AIARBA3EhBkEAIQdBACEIAkAgAiAARg0AIAAg","AmshAkEAIQggACEBA0AgCCABLAAAQb9/SmohCCABQQFqIQEgAkEBaiICDQALCyAAIANqIQkCQCAGRQ0AIAkgBEH8////B3FqIQBB","ACEHA0AgByAALAAAQb9/SmohByAAQQFqIQAgBkF/aiIGDQALCyAHIAhqIQIDQCAJIQMgBUUNAiAFQcABIAVBwAFJGyIEQQNxIQoC","QAJAIARBAnQiCUHwB3EiAA0AQQAhAQwBCyADIABqIQhBACEBIAMhBgNAQQAhAANAIAYgAG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fGogAkHki8CAABDcgICAAAALIAlBfWogAkHki8CAABDcgICA","AAALIAlBfmogAkHki8CAABDcgICAAAALIAlBf2ogAkHki8CAABDcgICAAAALIAIgBWohAgsCQAJAIANBCk8NACADIQYMAQsgASAC","QX5qIgJqIAMgA0H//wNxQeQAbiIGQeQAbGtB//8DcUEBdC8A9IvAgAA7AAALAkACQCAARQ0AIAZFDQELIAEgAkF/aiICaiAGQQF0","QR5xLQD1i8CAADoAAAsgAgtRAQF/I4CAgIAAQRBrIgIkgICAgAAgAUEBQQFBACACQQZqIAAoAgAgAkEGakEKEOCAgIAAIgBqQQog","AGsQ3YCAgAAhACACQRBqJICAgIAAIAALEQAgACABIAIgAxDjgICAAAALTgEBfyOAgICAAEEgayIEJICAgIAAIAQgATYCECAEIAA2","AgwgBCACOgAdIARBADoAHCAEIAM2AhggBCAEQQxqNgIUIARBFGoQtoCAgAAAC2EBAX8jgICAgABBIGsiAySAgICAACADIAE2Agwg","AyAANgIIIANBgYCAgAA2AhwgA0GBgICAADYCFCADIANBDGo2AhggAyADQQhqNgIQQYCAwIAAIANBEGogAhDYgICAAAALYQEBfyOA","gICAAEEgayIDJICAgIAAIAMgATYCDCADIAA2AgggA0GBgICAADYCHCADQYGAgIAANgIUIAMgA0EMajYCGCADIANBCGo2AhBB34DA","gAAgA0EQaiACENiAgIAAAAthAQF/I4CAgIAAQSBrIgMkgICAgAAgAyABNgIMIAMgADYCCCADQYGAgIAANgIcIANBgYCAgAA2AhQg","AyADQQxqNgIYIAMgA0EIajYCEEGYgcCAACADQRBqIAIQ2ICAgAAACxgAQbyNwIAAQZkBQYiOwIAAENiAgIAAAAsrACAAIAIgASAD","IAEgA0kbEOqAgIAAIgIgASADayACGyIDQQBKIANBAEhrCxMAIAAgASACajYCBCAAIAE2AgALSgEDf0EAIQMCQCACRQ0AAkADQCAA","LQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEgAkF/aiICRQ0CDAALCyAEIAVrIQMLIAMLC/sPAgBBgI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FBA3YiBkEcbGohByAAIAZBBHRqIQgCQAJAIAFBwABJDQAgACAIIAcgBiAEEIKAgIAAIQYM","AQsCQAJAAkACQAJAAkAgACgCACIGIAQoAgAiCSgCBCIKTw0AIAgoAgAiCyAKTw0BIAkoAgAiDCALQQN0aisDACENAkACQAJAAkAg","DCAGQQN0aisDACIOIA5iIg8NACANIA1hDQFBASEQDAMLIA0gDWINAUEAIRAMAgtBAEEAQX8gDiANZiIRG0EBQX4gERsgDiANZRsi","EWsgESAJKAIILQAAG0H/AXEiEUH/AUYgBiALSSARGyEQDAELIAYgC0khEAsgBygCACIRIApPDQIgDCARQQN0aisDACESAkACQAJA","AkACQAJAAkAgDw0AIBIgEmENASAAIQYgEEUNDSANIA1iDQYMCwsgEiASYg0BIAAhBiAQDQwgDSANYQ0DDAkLQQBBAEF/IA4gEmYi","ChtBAUF+IAobIA4gEmUbIgprIAogCSgCCC0AABtB/wFxIgpB/wFGIAYgEUkgChshCgwBCyAGIBFJIQoLIAAhBiAQIApHDQkgDSAN","Yg0BIBIgEmINBwtBAEEAQX8gDSASZiIGG0EBQX4gBhsgDSASZRsiBmsgBiAJKAIILQAAG0H/AXEiBkH/AUYgCyARSSAGGyEGDAcL","IBIgEmENBAsgCyARSSEGDAULIAYgCkHUhMCAABCYgICAAAALIAsgCkHkhMCAABCYgICAAAALIBEgCkHkhMCAABCYgICAAAALQQAh","BgwBC0EBIQYLIAcgCCAQIAZzGyEGCyAGIABrIgdBAnYhBgJAAkAgAkUNAAJAAkACQCACKAIAIgggBCgCACIJKAIEIgtPDQAgACAH","aigCACIHIAtPDQEgCSgCACILIAdBA3RqKwMAIQ0CQAJAIAsgCEEDdGorAwAiEiASYg0AIA0gDWINBUEAQQBBfyASIA1mIgsbQQFB","fiALGyASIA1lGyILayALIAkoAggtAAAbQf8BcSIJQf8BRiAIIAdJIAkbDQUMAQsgCCAHTw0AIA0gDWINBAsgBSAENgIMIAAgASAG","IAVBDGoQjICAgAAiBkEBaiECIAYgAU8NAiABIAJrIQEgACACQQJ0aiEAQQAhAgwECyAIIAtB1ITAgAAQmICAgAAACyAHIAtB5ITA","gAAQmICAgAAACyACIAEgAUHEhMCAABCXgICAAAALIAAgACABIAYgBBCNgICAACIGIAIgAyAEEIGAgIAAIAEgBkF/c2ohASAAIAZB","AnRqIgJBBGohAAsgA0F/aiEDIAFBIU8NAAsLIAAgASAEEIiAgIAACyAFQRBqJICAgIAAC4kFBAR/AnwCfwF8AkAgA0H4////AXFF","DQAgACAAIANBA3YiA0EEdCIFaiAAIANBHGwiBmogAyAEEIKAgIAAIQAgASABIAVqIAEgBmogAyAEEIKAgIAAIQEgAiACIAVqIAIg","BmogAyAEEIKAgIAAIQILAkACQAJAAkACQAJAAkAgACgCACIDIAQoAgAiBCgCBCIHTw0AIAEoAgAiBSAHTw0BIAQoAgAiCCAFQQN0","aisDACEJAkACQAJAAkAgCCADQQN0aisDACIKIApiIgsNACAJIAlhDQFBASEMDAMLIAkgCWINAUEAIQwMAgtBAEEAQX8gCiAJZiIG","G0EBQX4gBhsgCiAJZRsiBmsgBiAEKAIILQAAG0H/AXEiBkH/AUYgAyAFSSAGGyEMDAELIAMgBUkhDAsgAigCACIGIAdPDQIgCCAG","QQN0aisDACENAkACQAJAAkACQAJAAkAgCw0AIA0gDWENASAMRQ0NIAkgCWINBgwLCyANIA1iDQEgDA0MIAkgCWENAwwJC0EAQQBB","fyAKIA1mIgcbQQFBfiAHGyAKIA1lGyIHayAHIAQoAggtAAAbQf8BcSIHQf8BRiADIAZJIAcbIQMMAQsgAyAGSSEDCyAMIANHDQkg","CSAJYg0BIA0gDWINBwtBAEEAQX8gCSANZiIAG0EBQX4gABsgCSANZRsiAGsgACAEKAIILQAAG0H/AXEiAEH/AUYgBSAGSSAAGyEA","DAcLIA0gDWENBAsgBSAGSSEADAULIAMgB0HUhMCAABCYgICAAAALIAUgB0HkhMCAABCYgICAAAALIAYgB0HkhMCAABCYgICAAAAL","QQAhAAwBC0EBIQALIAIgASAMIABzGyEACyAAC9wDAwR/AnwBfwJAAkAgASgCACIDIAIoAgAiAigCBCIETw0AAkAgAUF8aiIFKAIA","IgYgBE8NACACKAIAIgQgBkEDdGorAwAhBwJAAkAgBCADQQN0aisDACIIIAhiDQAgByAHYg0BQQBBAEF/IAggB2YiBBtBAUF+IAQb","IAggB2UbIgRrIAQgAigCCC0AABtB/wFxIgRB/wFGIAMgBkkgBBtBAUYNAQwECyADIAZPDQMgByAHYQ0DCyABIAY2AgACQCAFIABG","DQAgA0EDdCEJA0AgBSEGAkACQAJAIAMgAigCBCIETw0AIAZBfGoiBSgCACIBIARPDQEgAigCACIEIAFBA3RqKwMAIQcCQAJAIAQg","CWorAwAiCCAIYg0AIAcgB2INBEEAQQBBfyAIIAdmIgQbQQFBfiAEGyAIIAdlGyIEayAEIAIoAggtAAAbQf8BcSIEQf8BRiADIAFJ","IAQbQQFHDQEMBAsgAyABTw0AIAcgB2INAwsgBiEFDAQLIAMgBEHUhMCAABCYgICAAAALIAEgBEHkhMCAABCYgICAAAALIAYgATYC","ACAFIABHDQALCyAFIAM2AgAPCyAGIARB5ITAgAAQmICAgAAACyADIARB1ITAgAAQmICAgAAACwunBQMIfwJ8A38gAiABQQJ0QXxq","IgRqIQUgACAEaiEGIAAgAUEBdiIHQQJ0aiIIQXxqIQkgAygCACEDAkACQAJAAkACQANAIAgoAgAiCiADKAIEIgtPDQEgACgCACIE","IAtPDQIgAygCACILIARBA3RqKwMAIQwCQAJAAkAgCyAKQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIg4bQQFB","fiAOGyANIAxlGyIOayAOIAMoAggtAAAbQf8BcSIOQf8BRiAKIARJIA4bQQFGDQEMAgtBACELIAogBE8NASAMIAxhDQELQQEhCyAK","IQQLIAIgBDYCACAGKAIAIgQgAygCBCIOTw0DIAkoAgAiCiAOTw0EIAtBAnQhDiALQQFzQQJ0IQ8gAygCACILIApBA3RqKwMAIQwC","QAJAAkAgCyAEQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIhAbQQFBfiAQGyANIAxlGyIQayAQIAMoAggtAAAb","Qf8BcSIQQf8BRiAEIApJIBAbQQFGDQEMAgtBACELIAQgCk8NASAMIAxhDQELQQEhCyAKIQQLIAJBBGohAiAIIA5qIQggACAPaiEA","IAUgBDYCACAFQXxqIQUgCSALQQJ0IgRrIQkgBCAGakF8aiEGIAdBf2oiBw0ACyAGQQRqIQQgCUEEaiEDAkAgAUEBcUUNACACIAAg","CCAAIANJIgobKAIANgIAIAggACADT0ECdGohCCAAIApBAnRqIQALAkAgCCAERw0AIAAgA0YNBQsQoYCAgAAACyAKIAtB1ITAgAAQ","mICAgAAACyAEIAtB5ITAgAAQmICAgAAACyAEIA5B1ITAgAAQmICAgAAACyAKIA5B5ITAgAAQmICAgAAACwuDAgICfwJ8AkACQAJA","AkAgACACQQJ0aiIEKAIAIgIgAygCACIDKAIEIgVPDQAgACABQQJ0aiIBKAIAIgAgBU8NASADKAIAIgUgAEEDdGorAwAhBgJAAkAg","BSACQQN0aisDACIHIAdiDQAgBiAGYg0EQQBBAEF/IAcgBmYiBRtBAUF+IAUbIAcgBmUbIgVrIAUgAygCCC0AABtB/wFxIgNB/wFG","IAIgAEkgAxtBAUcNAQwECyACIABPDQAgBiAGYg0DCyAAIQMgAiEADAMLIAIgBUHUhMCAABCYgICAAAALIAAgBUHkhMCAABCYgICA","AAALIAIhAwsgASADNgIAIAQgADYCAAvsAgACQCABQQlJDQAgAEEAQQMgAhCFgICAACAAQQFBByACEIWAgIAAIABBAkEFIAIQhYCA","gAAgAEEEQQggAhCFgICAACAAQQBBByACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEDQQggAhCFgICAACAAQQVBBiACEIWAgIAAIABB","AEECIAIQhYCAgAAgAEEBQQMgAhCFgICAACAAQQRBBSACEIWAgIAAIABBB0EIIAIQhYCAgAAgAEEBQQQgAhCFgICAACAAQQNBBiAC","EIWAgIAAIABBBUEHIAIQhYCAgAAgAEEAQQEgAhCFgICAACAAQQJBBCACEIWAgIAAIABBA0EFIAIQhYCAgAAgAEEGQQggAhCFgICA","ACAAQQJBAyACEIWAgIAAIABBBEEFIAIQhYCAgAAgAEEGQQcgAhCFgICAACAAQQFBAiACEIWAgIAAIABBA0EEIAIQhYCAgAAgAEEF","QQYgAhCFgICAAA8LAAuEBQACQCABQQ1JDQAgAEEAQQwgAhCFgICAACAAQQFBCiACEIWAgIAAIABBAkEJIAIQhYCAgAAgAEEDQQcg","AhCFgICAACAAQQVBCyACEIWAgIAAIABBBkEIIAIQhYCAgAAgAEEBQQYgAhCFgICAACAAQQJBAyACEIWAgIAAIABBBEELIAIQhYCA","gAAgAEEHQQkgAhCFgICAACAAQQhBCiACEIWAgIAAIABBAEEEIAIQhYCAgAAgAEEBQQIgAhCFgICAACAAQQNBBiACEIWAgIAAIABB","B0EIIAIQhYCAgAAgAEEJQQogAhCFgICAACAAQQtBDCACEIWAgIAAIABBBEEGIAIQhYCAgAAgAEEFQQkgAhCFgICAACAAQQhBCyAC","EIWAgIAAIABBCkEMIAIQhYCAgAAgAEEAQQUgAhCFgICAACAAQQNBCCACEIWAgIAAIABBBEEHIAIQhYCAgAAgAEEGQQsgAhCFgICA","ACAAQQlBCiACEIWAgIAAIABBAEEBIAIQhYCAgAAgAEECQQUgAhCFgICAACAAQQZBCSACEIWAgIAAIABBB0EIIAIQhYCAgAAgAEEK","QQsgAhCFgICAACAAQQFBAyACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEFQQYgAhCFgICAACAAQQlBCiACEIWAgIAAIABBAUECIAIQ","hYCAgAAgAEEDQQQgAhCFgICAACAAQQVBByACEIWAgIAAIABBBkEIIAIQhYCAgAAgAEECQQMgAhCFgICAACAAQQRBBSACEIWAgIAA","IABBBkEHIAIQhYCAgAAgAEEIQQkgAhCFgICAACAAQQNBBCACEIWAgIAAIABBBUEGIAIQhYCAgAAPCwALlgIBB38jgICAgABBgAFr","IgMkgICAgAACQAJAIA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BEkhDAsgCyAAIAZBAnRqIhAoAgA2AgAgECAH","NgIAIAYgDGohBiACQQRqIAlPDQQMAAsLIAcgAUHUhMCAABCYgICAAAALIAQgAUHkhMCAABCYgICAAAALIAcgAUHUhMCAABCYgICA","AAALIAJBBGohBwsCQAJAAkACQAJAIAcgCEYNACADKAIAIQEDQCACIQwgByICKAIAIgcgASgCBCIKTw0CIAQgCk8NAyABKAIAIgog","BEEDdGorAwAhDQJAAkACQAJAIAogB0EDdGorAwAiDiAOYg0AIA0gDWENAUEBIQoMAwsgDSANYg0BQQAhCgwCC0EAQQBBfyAOIA1m","IgobQQFBfiAKGyAOIA1lGyIKayAKIAEoAggtAAAbQf8BcSIKQf8BRiAHIARJIAobIQoMAQsgByAESSEKCyAMIAAgBkECdGoiCygC","ADYCACALIAc2AgAgBiAKaiEGIAJBBGoiByAIRw0ACyAHQXxqIQILIAUgAygCACIHKAIEIgFPDQIgBCABTw0DIAcoAgAiASAEQQN0","aisDACENAkACQAJAAkAgASAFQQN0aisDACIOIA5iDQAgDSANYQ0BQQEhBAwDCyANIA1iDQFBACEEDAILQQBBAEF/IA4gDWYiARtB","AUF+IAEbIA4gDWUbIgFrIAEgBygCCC0AABtB/wFxIgdB/wFGIAUgBEkgBxshBAwBCyAFIARJIQQLIAIgACAGQQJ0aiIHKAIANgIA","IAcgBTYCACAGIARqDwsgByAKQdSEwIAAEJiAgIAAAAsgBCAKQeSEwIAAEJiAgIAAAAsgBSABQdSEwIAAEJiAgIAAAAsgBCABQeSE","wIAAEJiAgIAAAAt3AQF/AkAgAQ0AQQAPCwJAIAIgAU8NACAAKAIAIQQgACAAIAJBAnRqIgIoAgA2AgAgAiAENgIAIABBBGogAUF/","aiAAIAMQioCAgAAiAiABTw0AIAAoAgAhASAAIAAgAkECdGoiAygCADYCACADIAE2AgAgAg8LAAt3AQF/AkAgAQ0AQQAPCwJAIAIg","AU8NACAAKAIAIQQgACAAIAJBAnRqIgIoAgA2AgAgAiAENgIAIABBBGogAUF/aiAAIAMQi4CAgAAiAiABTw0AIAAoAgAhASAAIAAg","AkECdGoiAygCADYCACADIAE2AgAgAg8LAAvRAQEDfyOAgICAAEEgayIFJICAgIAAIAUgAjoADwJAIAQgASAEIAFJGyIGRQ0AIAZB","AnQhB0EAIQRBACECA0AgAyAEaiACNgIAIAJBAWohAiAHIARBBGoiBEcNAAsgBSABNgIUIAUgADYCECAFIAVBD2o2AhggBSAFQRBq","NgIcIAZBAUYNAAJAIAZBFUkNACADIAYgBUEcahCAgICAAAwBC0EEIQQDQCADIAMgBGogBUEcahCDgICAACAHIARBBGoiBEcNAAsL","IAVBIGokgICAgAALxgIBC39BACEIAkACQAJAIANBAkkNACAFRQ0AQQEgBWshCSADQX9qIQpBACEIQQAhCwNAIAggB08hDANAIAsg","CiALIApLGyENIAIgC0ECdGohAwNAIA0gC0YNAyAMDQMgC0EBaiELIAMoAgAhDiADQQRqIg8hAyAPKAIAIhAgDkkNACAPIQMgECAB","Sw0ACyAAIA5qIQ0gBSAQIA5rIg9LDQAgCSAQaiAOayERQQAhAyAELQAAQf8BcSEQA0AgDyADRg0EAkACQCANIANqIg4tAAAgEEcN","ACAFIANqIhIgD0sNByAOIAQgBRCigICAAEUNAQsgESADQQFqIgNGDQIMAQsLCyAGIAhBAnRqIAtBf2o2AgAgCEEBaiEIDAALCyAI","DwsgDyAPQfSEwIAAEJiAgIAAAAsgAyASIA9BhIXAgAAQl4CAgAAACwMAAAsIAEHQh8CAAAsbACAAIAEgAiADQQFqIAQgBSAGIAMQ","j4CAgAALFQAgACABIAJBAEcgAyABEI6AgIAACwQAQQELRwEBfyOAgICAAEEgayIDJICAgIAAIAMgATYCECADIAA2AgwgA0EBOwEc","IAMgAjYCGCADIANBDGo2AhQgA0EUahCQgICAAAALmAQBCX8CQAJAIAEgAEEDakF8cSICIABrIgNJDQAgASADayIEQQJ2IgVFDQAg","BEEDcSEGQQAhB0EAIQgCQCACIABGDQAgACACayECQQAhCCAAIQEDQCAIIAEsAABBv39KaiEIIAFBAWohASACQQFqIgINAAsLIAAg","A2ohCQJAIAZFDQAgCSAEQfz///8HcWohAEEAIQcDQCAHIAAsAABBv39KaiEHIABBAWohACAGQX9qIgYNAAsLIAcgCGohAgNAIAkh","AyAFRQ0CIAVBwAEgBUHAAUkbIgRBA3EhCgJAAkAgBEECdCIJQfAHcSIADQBBACEBDAELIAMgAGohCEEAIQEgAyEGA0BBACEAA0Ag","BiAAaigCACIHQX9zQQd2IAdBBnZyQYGChAhxIAFqIQEgAEEEaiIAQRBHDQALIAZBEGoiBiAIRw0ACwsgBSAEayEFIAMgCWohCSAB","QQh2Qf+B/AdxIAFB/4H8B3FqQYGABGxBEHYgAmohAiAKRQ0ACyAKQQJ0IQcgAyAEQfwBcUECdGohAEEAIQEDQCAAKAIAIgZBf3NB","B3YgBkEGdnJBgYKECHEgAWohASAAQQRqIQAgB0F8aiIHDQALIAFBCHZB/4H8B3EgAUH/gfwHcWpBgYAEbEEQdiACaiECDAELQQAh","AiABRQ0AA0AgAiAALAAAQb9/SmohAiAAQQFqIQAgAUF/aiIBDQALCyACC0QAAkACQCAAIAJLDQAgASACSw0BIAAgAU0NASAAIAEg","AxCegICAAAALIAAgAiADEJ+AgIAAAAsgASACIAMQoICAgAAAC2EBAX8jgICAgABBIGsiAySAgICAACADIAE2AgwgAyAANgIIIANB","gYCAgAA2AhwgA0GBgICAADYCFCADIANBCGo2AhggAyADQQxqNgIQQaiAwIAAIANBEGogAhCVgICAAAALjwUCBn8BfiOAgICAAEEQ","ayIGJICAgIAAAkACQCABDQAgBUEBaiEHIAAoAgghCEEtIQkMAQtBK0F/IAAoAggiCEGAgIABcSIBGyEJIAFBFXYgBWohBwsCQAJA","IAhBgICABHENAEEAIQIMAQsCQAJAIANBEEkNACACIAMQloCAgAAhCgwBC0EAIQogA0UNACACIQEgAyELA0AgCiABLAAAQb9/Smoh","CiABQQFqIQEgC0F/aiILDQALCyAKIAdqIQcLAkACQAJAAkACQCAHIAAvAQwiCk8NACAIQYCAgAhxDQFBASEBIAYgACAKIAdrQQEQ","moCAgAAgBigCACIHQX9GDQQgBi8BBCELIAAgCSACIAMQm4CAgAANBCAAKAIAIgMgBCAFIAAoAgQiAigCDBGAgICAAICAgIAADQRB","ACEKIAtB//8DcSELA0AgCyAKQf//A3EiAEshASALIABNDQUgCkEBaiEKIAMgByACKAIQEYGAgIAAgICAgABFDQAMBQsLIAAgCSAC","IAMQm4CAgABFDQEMAgsgACAAKQIIIgynQYCAgP95cUGwgICAAnI2AgggACAJIAIgAxCbgICAAA0BQQEhASAGQQhqIAAgCiAHa0EB","EJqAgIAAIAYoAggiC0F/Rg0CIAYvAQwhAiAAKAIAIgcgBCAFIAAoAgQiAygCDBGAgICAAICAgIAADQJBACEKIAJB//8DcSECAkAD","QCACIApB//8DcU0NAUEBIQEgCkEBaiEKIAcgCyADKAIQEYGAgIAAgICAgABFDQAMBAsLIAAgDDcCCEEAIQEMAgsgACgCACAEIAUg","ACgCBCgCDBGAgICAAICAgIAAIQEMAQtBASEBCyAGQRBqJICAgIAAIAELuAEBA38gAiEEAkACQAJAAkAgASgCCCIFQR12QQNxDgQB","AwACAQsgAkH+/wNxQQF2IQQMAgtBACEEDAELIAJBACADQf8BcRshBAsgBUH///8AcSEFIAEoAgQhAyABKAIAIQZBACEBAkACQANA","IAFB//8DcSAEQf//A3FPDQEgAUEBaiEBIAYgBSADKAIQEYGAgIAAgICAgABFDQALQX8hBQwBCyACIARrIQELIAAgATsBBCAAIAU2","AgALUgACQCABQX9GDQAgACgCACABIAAoAgQoAhARgYCAgACAgICAAEUNAEEBDwsCQCACDQBBAA8LIAAoAgAgAiADIAAoAgQoAgwR","gICAgACAgICAAAvRAwEJfwJAAkAgAEHoB08NACAAIQMMAQsgAUF8aiEEQQAhBSAAIQYCQAJAAkACQAJAA0AgBiAGQZDOAG4iA0GQ","zgBsayIHQf//A3FB5ABuIQggAiAFaiIJQXxqIAJPDQEgBCACaiIKIAhBAXQiCy0ApIXAgAA6AAAgCUF9aiACTw0CIApBAWogC0Gl","hcCAAGotAAA6AAAgCUF+aiACTw0DIApBAmogByAIQeQAbGtBAXRB/v8HcSIILQCkhcCAADoAACAJQX9qIAJPDQQgCkEDaiAIQaWF","wIAAai0AADoAACAEQXxqIQQgBUF8aiEFIAZB/6ziBEshCSADIQYgCUUNBQwACwsgCUF8aiACQZSFwIAAEJiAgIAAAAsgCUF9aiAC","QZSFwIAAEJiAgIAAAAsgCUF+aiACQZSFwIAAEJiAgIAAAAsgCUF/aiACQZSFwIAAEJiAgIAAAAsgAiAFaiECCwJAAkAgA0EKTw0A","IAMhBgwBCyABIAJBfmoiAmogAyADQf//A3FB5ABuIgZB5ABsa0H//wNxQQF0LwCkhcCAADsAAAsCQAJAIABFDQAgBkUNAQsgASAC","QX9qIgJqIAZBAXRBHnEtAKWFwIAAOgAACyACC1EBAX8jgICAgABBEGsiAiSAgICAACABQQFBAUEAIAJBBmogACgCACACQQZqQQoQ","nICAgAAiAGpBCiAAaxCZgICAACEAIAJBEGokgICAgAAgAAthAQF/I4CAgIAAQSBrIgMkgICAgAAgAyABNgIMIAMgADYCCCADQYGA","gIAANgIcIANBgYCAgAA2AhQgAyADQQxqNgIYIAMgA0EIajYCEEGAgMCAACADQRBqIAIQlYCAgAAAC2EBAX8jgICAgABBIGsiAySA","gICAACADIAE2AgwgAyAANgIIIANBgYCAgAA2AhwgA0GBgICAADYCFCADIANBDGo2AhggAyADQQhqNgIQQd+AwIAAIANBEGogAhCV","gICAAAALYQEBfyOAgICAAEEgayIDJICAgIAAIAMgATYCDCADIAA2AgggA0GBgICAADYCHCADQYGAgIAANgIUIAMgA0EMajYCGCAD","IANBCGo2AhBBmIHAgAAgA0EQaiACEJWAgIAAAAsYAEHshsCAAEGZAUG4h8CAABCVgICAAAALSgEDf0EAIQMCQCACRQ0AAkADQCAA","LQAAIgQgAS0AACIFRw0BIABBAWohACABQQFqIQEgAkF/aiICRQ0CDAALCyAEIAVrIQMLIAMLC9IHAQBBgIDAAAvI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k2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3","ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OXVzZXItcHJvdmlkZWQgY29tcGFyaXNvbiBmdW5jdGlv","biBkb2VzIG5vdCBjb3JyZWN0bHkgaW1wbGVtZW50IGEgdG90YWwgb3JkZXLPABAAfQAAAFYDAAAFAAAA"].join("");var Io=1e4,$t="\0";function tn(e,t){return e==="rust"||e==="auto"&&t>=Io}var fg=1,mg=65536,vt=null,en=null;function An(e){if(typeof atob=="function"){let A=atob(e),n=new Uint8Array(A.length);for(let o=0;o<A.length;o++)n[o]=A.charCodeAt(o);return n}let t=globalThis.Buffer;if(t)return new Uint8Array(t.from(e,"base64"));throw new Error("No base64 decoder")}function nn(){return vt?Promise.resolve(vt):(en||(en=(async()=>{try{return typeof WebAssembly>"u"?null:(vt=await WebAssembly.compile(An(lo)),vt)}catch{return null}})()),en)}function uo(){return vt}function co(e){let t=e.isWellFormed;if(typeof t=="function")return t.call(e);for(let A=0;A<e.length;A++){let n=e.charCodeAt(A);if(n>=55296&&n<=56319){let o=e.charCodeAt(A+1);if(o>=56320&&o<=57343){A++;continue}return!1}if(n>=56320&&n<=57343)return!1}return!0}var qt=e=>e+7&-8,Ht=class e{x;base;encoder=new TextEncoder;offsetsPtr=0;textPtr=0;textLen=0;rows=0;hasIndex=!1;freePtr;constructor(t){this.x=t,this.base=qt(t.yk_heap_base()),this.freePtr=this.base}static create(t=vt){if(!t)return null;try{let n=new WebAssembly.Instance(t,{}).exports;return n.yk_version()!==fg?null:new e(n)}catch{return null}}ensure(t){let A=t-this.x.memory.buffer.byteLength;A>0&&this.x.memory.grow(Math.ceil(A/mg))}setSearchTexts(t){this.hasIndex=!1,this.freePtr=this.base;try{let A=0;for(let l of t){if(!co(l))return!1;A+=l.length*3}let n=t.length,o=this.base,r=qt(o+(n+1)*4);this.ensure(r+A);let i=this.x.memory.buffer,s=new Uint32Array(i,o,n+1),g=new Uint8Array(i,r,A),a=0;for(let l=0;l<n;l++)s[l]=a,a+=this.encoder.encodeInto(t[l],g.subarray(a)).written??0;return s[n]=a,this.offsetsPtr=o,this.textPtr=r,this.textLen=a,this.rows=n,this.freePtr=qt(r+a),this.hasIndex=!0,!0}catch{return!1}}search(t){if(!this.hasIndex||!t||t.includes($t)||!co(t))return null;try{let A=this.encoder.encode(t),n=this.freePtr,o=qt(n+A.length);this.ensure(o+this.rows*4),new Uint8Array(this.x.memory.buffer,n,A.length).set(A);let r=this.x.yk_search(this.textPtr,this.textLen,this.offsetsPtr,this.rows,n,A.length,o);return new Uint32Array(this.x.memory.buffer,o,r).slice()}catch{return null}}sortByKeys(t,A){try{let n=t.length,o=this.freePtr,r=qt(o+n*8);return this.ensure(r+n*4),new Float64Array(this.x.memory.buffer,o,n).set(t),this.x.yk_sort(o,n,A?1:0,r),new Uint32Array(this.x.memory.buffer,r,n).slice()}catch{return null}}};function CA(e){return e>=.1?`${e<10?e.toFixed(1):Math.round(e)} ms`:"<0.1 ms"}function Rt(e,t){let A=new Array(t.length);for(let n=0;n<t.length;n++)A[n]=e[t[n]];return A}var hg=1e3;function Wt(e,t){return e==="rust"||e==="auto"&&t>=hg}var yg=1,Nt=null,on=null;function po(){return Nt?Promise.resolve(Nt):(on||(on=(async()=>{try{return typeof WebAssembly>"u"?null:(Nt=await WebAssembly.compile(An(go)),Nt)}catch{return null}})()),on)}function fo(){return Nt}var Co=e=>e+7&-8,pA=class e{x;encoder=new TextEncoder;docs=0;ready=!1;constructor(t){this.x=t}static create(t=Nt){if(!t)return null;try{let A=new WebAssembly.Instance(t,{}).exports;return A.yk_rag_version()!==yg?null:new e(A)}catch{return null}}build(t){this.ready=!1;try{let A=this.encoder.encode(t.map(o=>o.join(" ")).join(`
|
|
386
|
+
`));this.x.yk_rag_reset();let n=this.x.yk_rag_scratch(A.length);return new Uint8Array(this.x.memory.buffer,n,A.length).set(A),this.x.yk_rag_build(n,A.length,t.length),this.docs=t.length,this.ready=!0,!0}catch{return!1}}search(t,A,n,o){if(!this.ready||t.length!==A.length||t.some(r=>!r||/[ \n]/.test(r)))return null;try{let r=Math.max(0,Math.min(o,this.docs)),i=this.encoder.encode(t.join(" ")),s=Co(i.length),g=s+A.length*8,a=Co(g+r*4),l=a+r*8,u=this.x.yk_rag_scratch(l),I=this.x.memory.buffer;new Uint8Array(I,u,i.length).set(i),new Float64Array(I,u+s,A.length).set(A);let d=this.x.yk_rag_search(u,i.length,u+s,A.length,n,r,u+g,u+a),m=this.x.memory.buffer,f=new Uint32Array(m,u+g,d),c=new Float64Array(m,u+a,d),C=[];for(let y=0;y<d;y++)C.push({doc:f[y],score:c[y]});return C}catch{return null}}};var Qg=new Set("a an the is are was were be to of and or in on at for with what which who whom how why when where does do did this that these those it its from by as about any all please tell me show give".split(" "));function fA(e){return(e.normalize("NFC").toLowerCase().match(/[\p{L}\p{M}\p{N}]+/gu)??[]).filter(t=>t.length>1&&!Qg.has(t))}function Bg(e,t=600){let A=Ne(e);if(!A)return[];let n=[],o="",r="",i=()=>{r.trim()&&n.push({id:`page-${n.length+1}`,source:"page",text:r.trim(),ref:o||void 0}),r=""};for(let s of $(A,"h1,h2,h3,h4,p,li,td,th,dt,dd,blockquote,figcaption,label,summary")){if(s.querySelector("p,li,h1,h2,h3,h4"))continue;let g=_e(s.textContent);if(g){if(/^H[1-4]$/.test(s.tagName)){i(),o=g,r=`${g}. `;continue}r.length+g.length>t&&i(),r+=`${g} `}}return i(),n}function bg(e,t,A="id"){return e.map((n,o)=>{let r=n,i=String(r[A]??o+1);return{id:`grid-${i}`,source:"grid",ref:i,text:t.map(s=>`${s.label}: ${String(r[s.key]??"")}`).join(". ")}})}function mA(e={}){let t=[],A=[],n=new Map,o=0,r=null,i=null,s=null,g=!1,a=null;function l(){return Wt(e.engine,t.length)?i?Promise.resolve(!0):(a||(a=po().then(f=>(i=f?pA.create(f):null,!!i))),a):Promise.resolve(!1)}function u(){let f=[...e.includePage===!1?[]:Bg(e.root),...e.rows&&e.columns?bg(e.rows,e.columns,e.rowKey):[],...(e.documents??[]).map(C=>({id:C.id,source:"custom",text:C.text}))],c=f.map(C=>`${C.source}${C.id}${C.ref??""}${C.text}`).join("");if(c!==r){r=c,t=f,A=t.map(C=>fA(C.text)),n=new Map;for(let C of A)for(let y of new Set(C))n.set(y,(n.get(y)??0)+1);o=A.reduce((C,y)=>C+y.length,0)/Math.max(1,A.length)}}u(),Wt(e.engine,t.length)&&fo()&&l();function I(f,c){if(!i||!Wt(e.engine,t.length)||!Number.isInteger(c)||c<=0||(s!==A&&(g=i.build(A),s=A),!g))return null;let C=A.length,y=f.map(B=>Math.log(1+(C-(n.get(B)??1)+.5)/((n.get(B)??1)+.5))),p=i.search(f,y,o||1,c);return p?p.map(B=>({...t[B.doc],score:B.score})):null}function d(f,c=5){let C=fA(f);if(!C.length)return[];let y=I(C,c);if(y)return y;i||l();let p=A.length;return A.map((h,E)=>{let w=0;for(let G of C){let U=0;for(let S of h)(S===G||G.length>=4&&S.startsWith(G)||S.length>=4&&G.startsWith(S))&&U++;if(!U)continue;let W=Math.log(1+(p-(n.get(G)??1)+.5)/((n.get(G)??1)+.5));w+=W*(U*2.2/(U+1.2*(.25+.75*(h.length/(o||1)))))}return{...t[E],score:w}}).filter(h=>h.score>0).sort((h,E)=>E.score-h.score).slice(0,c)}async function m(f,c={}){await l();let C=d(f,c.k??4);if(!C.length)return{answer:"I couldn't find anything about that on this page or in the data.",hits:C,generated:!1};if(c.generate)try{let h=C.map((w,G)=>`[${G+1}] ${w.text}`).join(`
|
|
387
|
+
`),E=await c.generate(f,h);if(E?.trim())return{answer:E.trim(),hits:C,generated:!0}}catch{}let y=new Set(fA(f)),p=C.flatMap(h=>h.text.split(/(?<=[.!?।])\s+|\.\s+(?=\p{Lu})/u).map(E=>({s:E.trim(),h}))).map(({s:h,h:E})=>({s:h,h:E,overlap:fA(h).filter(w=>y.has(w)).length})).filter(h=>h.s&&h.overlap>0).sort((h,E)=>E.overlap-h.overlap).slice(0,3);return{answer:p.length?p.map(h=>h.h.source==="grid"?`Row ${h.h.ref}: ${h.s}`:h.s).join(`
|
|
388
|
+
`):C[0].text.slice(0,300),hits:C,generated:!1}}return{search:d,ask:m,rebuild:u,update(f){Object.assign(e,f),u()},size:()=>t.length,get engine(){return i&&Wt(e.engine,t.length)?"rust":"ts"},whenEngineReady:()=>l().then(f=>f?"rust":"ts")}}import{Fragment as wg,jsx as Z,jsxs as Ge}from"react/jsx-runtime";var ho="yuktai-tools-open";async function Eg(){try{if(typeof window>"u")return!1;let e=window;if(e.LanguageModel)try{if(typeof e.LanguageModel.availability=="function"){let A=await e.LanguageModel.availability();if(A==="readily"||A==="available"||A==="downloadable")return!0}else return!0}catch{}if(e.Summarizer)try{let A=await e.Summarizer.availability?.();if(!A||A==="readily"||A==="available")return!0}catch{}if(e.Rewriter)try{let A=await e.Rewriter.availability?.();if(!A||A==="readily"||A==="available")return!0}catch{}if(e.Writer)try{let A=await e.Writer.availability?.();if(!A||A==="readily"||A==="available")return!0}catch{}let t=e.ai||globalThis.ai;if(t){if(t.languageModel?.availability)try{let A=await t.languageModel.availability();if(A==="readily"||A==="available")return!0}catch{}if(t.languageModel&&typeof t.languageModel.create=="function"||t.summarizer||t.rewriter||t.writer||t.languageModel)return!0}return!!(e.Translator||e.translation?.canTranslate)}catch{return!1}}function rn({position:e="left",children:t,config:A={},showRag:n=!1,showAgent:o=!1,showAccessibility:r,showVibeCoder:i,launcher:s,engine:g}){let a=r!==void 0||i!==void 0||s!==void 0,l=a?!!r:!0,u=a?!!i:o,I=n,d=o,[m,f]=ge(!1),c=!s||m,[C,y]=ge(!1),[p,B]=ge(jA),[h,E]=ge(null),[w,G]=ge(!1),[U,W]=ge(!1),[S,D]=ge(!1),b=mo.useRef(null),[z,O]=ge(!1),[Y,ie]=ge(""),[se,N]=ge(""),[q,T]=ge(!1),[F,te]=ge(null),[P,oe]=ge("idle"),[fe,he]=ge(!1),[L,re]=ge(""),[ke,De]=ge(""),[ue,de]=ge(!1),[Ve,We]=ge([]),[ye,Me]=ge(null),gt=k=>{let X=[],Q=s?84:24;for(let M of k)X.push(Q),M&&(Q+=60);return X},[eA,ve,be,ze]=a?gt([l,I,d,u]):[24,84,n?144:84,204],[Oe,lt]=ge(!1),ct=g!==void 0,[bt,It]=ge([]),[ut,dt]=ge(null),je=mo.useRef(null);et(()=>{if(typeof window>"u")return;let k=window;!!(k.LanguageModel||k.ai?.languageModel)&&U?(te("gemini"),Me("gemini")):oA()&&(te("transformers"),Me("transformers"))},[U]),et(()=>{if(F!=="transformers")return;let k=setInterval(()=>oe(Ut()),500);return()=>clearInterval(k)},[F]);let MA=k=>k.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim(),tA=tt(async()=>{let k=Y.trim();if(!(!k||q)){T(!0),N(""),It([]),dt(null);try{je.current?je.current.rebuild():je.current=mA({engine:g}),await je.current.whenEngineReady();let X=performance.now(),Q=await je.current.ask(k,{k:4}),M=performance.now()-X;if(N(Q.answer),It(Q.hits.slice(0,3).map(H=>H.text.length>160?`${H.text.slice(0,157)}\u2026`:H.text)),dt({ms:M,engine:je.current.engine,ai:!1}),Q.hits.length&&F){let H=Q.hits.map(Be=>Be.text).join(`
|
|
389
|
+
`),V;if(F==="gemini"){let{askWithContext:Be}=await import("./rag-Q3LUXSSD.mjs");V=await Be(k,H)}else{oe("loading");let{answerFromContext:Be}=await import("./transformers-rag-MQZRMFTG.mjs");V=await Be(k,H),oe(Ut())}V.success&&V.answer&&(N(MA(V.answer)),dt(Be=>Be&&{...Be,ai:!0}))}}catch{N(X=>X||"\u26A0\uFE0F Something went wrong.")}T(!1)}},[Y,q,F,g]),Et=tt(async()=>{if(ct)return tA();if(!(!Y.trim()||q)){if(!F){N("\u26A0\uFE0F No AI engine available.");return}T(!0),N("");try{let k;if(F==="gemini"){let{askPage:X}=await import("./rag-Q3LUXSSD.mjs");k=await X(Y)}else{oe("loading");let{askPageWithTransformers:X}=await import("./transformers-rag-MQZRMFTG.mjs");k=await X(Y),oe("ready")}N(k.success&&k.answer?k.answer.replace(/\*\*(.*?)\*\*/g,"$1").replace(/\*(.*?)\*/g,"$1").replace(/#+\s/g,"").trim():"\u26A0\uFE0F "+(k.error||"No answer found."))}catch{N("\u26A0\uFE0F Something went wrong.")}T(!1)}},[Y,q,F,ct,tA]),Mt=tt(async()=>{if(!L.trim()||ue)return;if(!ye){De("\u26A0\uFE0F No AI engine available.");return}de(!0),We([]),De("");let{runAgent:k}=await import("./agent-G67IA7MY.mjs");await k(L,ye,X=>{We(Q=>[...Q,X.text])}),de(!1),De("done")},[L,ue,ye]);et(()=>{if(typeof window>"u")return;let X=setTimeout(async()=>{let Q=window,M=await Eg();W(M),D(!!(Q.SpeechRecognition||Q.webkitSpeechRecognition))},800);return()=>clearTimeout(X)},[]),et(()=>{if(!(typeof window>"u"))try{let k=localStorage.getItem("yuktai-a11y-prefs");k&&B(X=>({...X,...JSON.parse(k)}))}catch{}},[]);let Lt=tt(async k=>{let X={enabled:!0,highContrast:k.highContrast,darkMode:k.darkMode,reduceMotion:k.reduceMotion,largeTargets:k.largeTargets,speechEnabled:k.speechEnabled,autoFix:k.autoFix,dyslexiaFont:k.dyslexiaFont,localFont:k.localFont,fontSizeMultiplier:k.fontScale/100,colorBlindMode:k.colorBlindMode,showAuditBadge:k.showAuditBadge,showSkipLinks:!0,showPreferencePanel:!1,plainEnglish:k.plainEnglish,summarisePage:k.summarisePage,translateLanguage:k.translateLanguage,voiceControl:k.voiceControl,smartLabels:k.smartLabels,...A};await Se.execute(X),E(Se.applyFixes(X)),G(!0)},[A]),AA=tt(async()=>{try{localStorage.setItem("yuktai-a11y-prefs",JSON.stringify(p))}catch{}await Lt(p),y(!1)},[p,Lt]),Yt=tt(()=>{B(jA);try{localStorage.removeItem("yuktai-a11y-prefs")}catch{}let k=document.documentElement;["data-yuktai-high-contrast","data-yuktai-dark","data-yuktai-reduce-motion","data-yuktai-large-targets","data-yuktai-keyboard","data-yuktai-dyslexia"].forEach(X=>k.removeAttribute(X)),document.body.style.filter="",document.body.style.fontFamily="",document.documentElement.style.fontSize="",E(null),G(!1)},[]),wt=tt((k,X)=>{B(Q=>({...Q,[k]:X}))},[]);et(()=>{let k=X=>{X.key==="Escape"&&(C||z||fe||Oe?(y(!1),O(!1),he(!1),lt(!1)):s&&m&&f(!1))};return window.addEventListener("keydown",k),()=>window.removeEventListener("keydown",k)},[C,z,fe,Oe,s,m]),et(()=>{if(s)try{localStorage.getItem(ho)==="1"&&f(!0)}catch{}},[s]),et(()=>{if(!(!s||typeof document>"u")){document.documentElement.setAttribute("data-yuktai-tools",m?"open":"closed");try{localStorage.setItem(ho,m?"1":"0")}catch{}}},[s,m]);let nA=tt(()=>{f(k=>(k&&(y(!1),O(!1),he(!1),lt(!1)),!k))},[]);et(()=>{C&&b.current&&Se.trapFocus(b.current)},[C]);let Ct=(k,X,Q)=>({position:"fixed",bottom:`${k}px`,[e]:"24px",zIndex:9998,width:"52px",height:"52px",borderRadius:"50%",background:X,color:"#fff",border:"none",cursor:"pointer",fontSize:"22px",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 16px rgba(0,0,0,0.25)",transition:"transform 0.15s, background 0.2s"}),Ze=k=>{k.currentTarget.style.transform="scale(1.08)"},_=k=>{k.currentTarget.style.transform="scale(1)"},LA=ct?`${g==="ts"?"Page search":"Rust page search"}${F==="gemini"?" + Gemini Nano":F==="transformers"?" + Transformers.js":" \xB7 On device"}`:F==="gemini"?"Gemini Nano \xB7 On device":F==="transformers"?"Transformers.js \xB7 All devices":"Detecting...",qe=ct||!!F,YA=F==="transformers"&&P==="loading"?"Loading model...":"...";return Ge(wg,{children:[t,s&&Z("button",{type:"button",style:Ct(24,m?"#134e4a":"#0f766e",m),"aria-expanded":m,"aria-label":m?"Hide yuktai tools":"Show yuktai tools",title:m?"Hide yuktai tools":"yuktai tools","data-yuktai-launcher":"true",onClick:nA,onMouseEnter:Ze,onMouseLeave:_,children:m?Z("svg",{"aria-hidden":"true",width:"22",height:"22",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.5",strokeLinecap:"round",children:Z("path",{d:"M6 6l12 12M18 6L6 18"})}):Ge("svg",{"aria-hidden":"true",width:"24",height:"24",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2",strokeLinecap:"round",strokeLinejoin:"round",children:[Z("path",{d:"M12 3l1.8 4.7L18.5 9.5l-4.7 1.8L12 16l-1.8-4.7L5.5 9.5l4.7-1.8z"}),Z("path",{d:"M19 15l.8 2.2L22 18l-2.2.8L19 21l-.8-2.2L16 18l2.2-.8z"})]})}),u&&c&&Z("button",{style:Ct(ze,Oe?"#d97706":"#f59e0b",Oe),"aria-label":"Open Vibe Coder",title:"\u26A1 Vibe Coder \u2014 Generate Next.js project",onClick:()=>{lt(k=>!k),he(!1),O(!1),y(!1)},onMouseEnter:Ze,onMouseLeave:_,children:"\u26A1"}),u&&c&&Oe&&Z(_A,{position:e,onClose:()=>lt(!1)}),d&&c&&Z("button",{style:Ct(be,fe?"#059669":"#10b981",fe),"aria-label":"Open AI agent","aria-haspopup":"dialog","aria-expanded":fe,title:"\u{1F916} AI Agent \u2014 guide me through this page",onClick:()=>{he(k=>!k),O(!1),y(!1)},onMouseEnter:Ze,onMouseLeave:_,children:"\u{1F916}"}),d&&c&&fe&&Ge("div",{role:"dialog","aria-modal":"true","aria-label":"yuktai AI Agent","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${be+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px",maxHeight:"70vh",overflowY:"auto"},children:[Ge("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[Ge("div",{children:[Z("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F916} AI Agent"}),Z("p",{style:{margin:0,fontSize:"10px",color:"#10b981"},children:ye==="gemini"?"Gemini Nano \xB7 On device":ye==="transformers"?"Transformers.js \xB7 All devices":"Detecting..."})]}),Z("button",{onClick:()=>he(!1),"aria-label":"Close agent panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),Z("p",{style:{margin:"0 0 8px",fontSize:"11px",color:"#64748b"},children:"Tell me what you want to do on this page. I will guide you step by step."}),Z("div",{style:{display:"flex",flexWrap:"wrap",gap:"4px",marginBottom:"8px"},children:["Fill this form","Find contact info","What is this page?","Guide me to apply"].map(k=>Z("button",{onClick:()=>re(k),style:{padding:"3px 8px",borderRadius:"20px",fontSize:"10px",border:"1px solid #e2e8f0",background:"#f8fafc",color:"#64748b",cursor:"pointer"},children:k},k))}),Ge("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[Z("input",{type:"text",value:L,onChange:k=>re(k.target.value),onKeyDown:k=>{k.key==="Enter"&&Mt()},placeholder:"e.g. Help me fill this form",disabled:ue||!ye,"aria-label":"Tell the agent what to do",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:ye?"#fff":"#f8fafc",outline:"none",height:"36px"}}),Z("button",{onClick:Mt,disabled:ue||!L.trim()||!ye,"aria-label":"Run agent",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:ye&&L.trim()&&!ue?"#10b981":"#e2e8f0",color:ye&&L.trim()&&!ue?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:ye&&L.trim()&&!ue?"pointer":"not-allowed",height:"36px",minWidth:"52px",transition:"background 0.2s"},children:ue?"...":"Go"})]}),Ve.length>0&&Ge("div",{style:{padding:"10px 12px",background:"#f0fdf4",border:"1px solid #86efac",borderRadius:"8px",fontSize:"11px",color:"#166534",lineHeight:1.7},children:[Ve.map((k,X)=>Z("p",{style:{margin:"0 0 2px"},children:k},X)),ke==="done"&&Z("button",{onClick:()=>{We([]),re(""),De("")},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!ye&&Z("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Enable Gemini Nano via chrome://flags for best results."})]}),I&&c&&Z("button",{style:Ct(ve,z?"#7c3aed":"#6d28d9",z),"aria-label":"Ask a question about this page","aria-haspopup":"dialog","aria-expanded":z,title:`\u{1F4AC} Ask this page \xB7 ${LA}`,onClick:()=>{O(k=>!k),y(!1),he(!1)},onMouseEnter:Ze,onMouseLeave:_,children:"\u{1F4AC}"}),I&&c&&z&&Ge("div",{role:"dialog","aria-modal":"true","aria-label":"Ask this page","data-yuktai-panel":"true",style:{position:"fixed",bottom:`${ve+64}px`,[e]:"24px",zIndex:9999,width:"300px",maxWidth:"calc(100vw - 48px)",background:"#fff",border:"1px solid #e2e8f0",borderRadius:"16px",boxShadow:"0 8px 32px rgba(0,0,0,0.12)",fontFamily:"system-ui,-apple-system,sans-serif",padding:"14px"},children:[Ge("div",{style:{display:"flex",justifyContent:"space-between",alignItems:"flex-start",marginBottom:"10px"},children:[Ge("div",{children:[Z("p",{style:{margin:"0 0 2px",fontSize:"13px",fontWeight:600,color:"#0f172a"},children:"\u{1F4AC} Ask this page"}),Z("p",{style:{margin:0,fontSize:"10px",color:"#7c3aed"},children:LA}),F==="transformers"&&P==="loading"&&Z("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#94a3b8"},children:"Downloading model \u2014 first time only"}),F==="transformers"&&P==="ready"&&Z("p",{style:{margin:"2px 0 0",fontSize:"9px",color:"#10b981"},children:"Model ready \u2705 \u2014 works offline"})]}),Z("button",{onClick:()=>O(!1),"aria-label":"Close ask panel",style:{background:"none",border:"none",cursor:"pointer",color:"#94a3b8",fontSize:"18px",lineHeight:1,padding:"2px"},children:"\xD7"})]}),Ge("div",{style:{display:"flex",gap:"6px",marginBottom:"8px"},children:[Z("input",{type:"text",value:Y,onChange:k=>ie(k.target.value),onKeyDown:k=>{k.key==="Enter"&&Et()},placeholder:"e.g. What does this page do?",disabled:q||!qe,"aria-label":"Ask a question about this page",style:{flex:1,padding:"8px 10px",borderRadius:"8px",border:"1px solid #e2e8f0",fontSize:"12px",color:"#0f172a",background:qe?"#fff":"#f8fafc",outline:"none",height:"36px"}}),Z("button",{onClick:Et,disabled:q||!Y.trim()||!qe,"aria-label":"Submit question",style:{padding:"8px 12px",borderRadius:"8px",border:"none",background:qe&&Y.trim()&&!q?"#7c3aed":"#e2e8f0",color:qe&&Y.trim()&&!q?"#fff":"#94a3b8",fontSize:"12px",fontWeight:600,cursor:qe&&Y.trim()&&!q?"pointer":"not-allowed",height:"36px",minWidth:"48px",transition:"background 0.2s"},children:q?YA:"Ask"})]}),se&&Ge("div",{"aria-live":"polite",style:{padding:"10px",background:"#f5f3ff",borderRadius:"8px",fontSize:"12px",color:"#4c1d95",lineHeight:1.6,maxHeight:ct?"260px":"180px",overflowY:"auto",whiteSpace:"pre-line"},children:[Z("strong",{style:{display:"block",marginBottom:"4px",fontSize:"11px",color:"#7c3aed"},children:"\u{1F4AC} Answer"}),se,bt.length>0&&Ge("div",{style:{marginTop:"8px"},children:[Z("strong",{style:{display:"block",fontSize:"10px",color:"#6d28d9"},children:"From this page"}),Z("ul",{style:{margin:"4px 0 0",paddingLeft:"16px",fontSize:"11px",color:"#5b21b6"},children:bt.map((k,X)=>Z("li",{style:{marginBottom:"2px"},children:k},X))})]}),ut&&Ge("p",{style:{margin:"6px 0 0",fontSize:"10px",color:"#6d28d9"},children:["\u26A1 Found in ",CA(ut.ms)," \xB7 ",ut.engine==="rust"?"Rust":"TS"," \xB7 on device",ut.ai?" \xB7 answer written by AI":""]}),Z("button",{onClick:()=>{N(""),ie(""),It([]),dt(null)},style:{display:"block",marginTop:"6px",background:"none",border:"none",color:"#94a3b8",fontSize:"10px",cursor:"pointer",padding:0},children:"Clear"})]}),!qe&&Z("p",{style:{margin:"4px 0 0",fontSize:"10px",color:"#94a3b8"},children:"Detecting AI engine..."})]}),l&&c&&Z("button",{style:Ct(eA,w?"#0d9488":"#1a73e8",C),"aria-label":"Open accessibility preferences","aria-haspopup":"dialog","aria-expanded":C,"data-yuktai-pref-toggle":"true",title:"\u267F Accessibility settings",onClick:()=>{y(k=>!k),O(!1),he(!1)},onMouseEnter:Ze,onMouseLeave:_,children:"\u267F"}),l&&c&&C&&Z(ZA,{ref:b,position:e,settings:p,report:h,isActive:w,aiSupported:U,voiceSupported:S,set:wt,onApply:AA,onReset:Yt,onClose:()=>y(!1)})]})}var hA={name:"ai.text",async execute(e){return`\u{1F916} YuktAI says: ${e}`}};var yA={name:"voice.text",async execute(e){return!e||e.trim()===""?"\u{1F3A4} No speech detected":`\u{1F3A4} You said: ${e}`}};var mt=class{plugins=new Map;register(t,A){if(!A||typeof A.execute!="function")throw new Error(`Invalid plugin: ${t}`);this.plugins.set(t,A)}use(t){return this.plugins.get(t)}async run(t,A){try{let n=this.use(t);if(!n)throw new Error(`Plugin not found: ${t}`);return await n.execute(A)}catch(n){throw console.error(`[YuktAI Runtime Error in ${t}]:`,n),n}}getPlugins(){return Array.from(this.plugins.keys())}};import{useCallback as In,useEffect as jt,useMemo as Qt,useState as it}from"react";import{useCallback as sn,useEffect as zt,useMemo as yo,useRef as Qo,useState as At}from"react";import{Fragment as Tg,jsx as R,jsxs as we}from"react/jsx-runtime";var Bo={"en-US":{title:"Grid AI Assistant",subtitle:"Ask about your data",ask:"Ask",placeholder:"Ask or type a command...",listening:"Listening...",send:"Send",close:"Close",open:"Open AI assistant",inputLanguage:"Input language",speakNow:"Speak your question",working:"Working on it\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`Searching for "${e}".`,sortedAscending:e=>`Sorted by ${e} in ascending order.`,sortedDescending:e=>`Sorted by ${e} in descending order.`,count:e=>`There are ${e} rows in the grid.`,highest:(e,t,A)=>`The highest ${e} is ${t}, held by ${A}.`,lowest:(e,t,A)=>`The lowest ${e} is ${t}, held by ${A}.`,average:(e,t)=>`The average ${e} is ${t}.`,total:(e,t)=>`The total ${e} is ${t}.`,noData:"There is no data to analyze.",noColumn:"I could not find a column to analyze.",noNumericData:e=>`There is no numeric data in ${e}.`,notFound:e=>`I could not find anything matching "${e}".`,needName:"Please provide a value to look up.",fallback:"I can search, sort, count, and analyze the grid data.",unsupportedVoice:"Voice input is not supported in this browser."},"te-IN":{title:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C41",subtitle:"\u0C2E\u0C40 \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",ask:"\u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F",placeholder:"\u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C32\u0C47\u0C26\u0C3E \u0C06\u0C26\u0C47\u0C36\u0C02 \u0C1F\u0C48\u0C2A\u0C4D \u0C1A\u0C47\u0C2F\u0C02\u0C21\u0C3F...",listening:"\u0C35\u0C3F\u0C02\u0C1F\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41...",send:"\u0C2A\u0C02\u0C2A\u0C02\u0C21\u0C3F",close:"\u0C2E\u0C42\u0C38\u0C3F\u0C35\u0C47\u0C2F\u0C02\u0C21\u0C3F",open:"AI \u0C38\u0C39\u0C3E\u0C2F\u0C15\u0C41\u0C21\u0C3F\u0C28\u0C3F \u0C24\u0C46\u0C30\u0C35\u0C02\u0C21\u0C3F",inputLanguage:"\u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D \u0C2D\u0C3E\u0C37",speakNow:"\u0C2E\u0C40 \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C1A\u0C46\u0C2A\u0C4D\u0C2A\u0C02\u0C21\u0C3F",working:"\u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41\u2026",english:"English",telugu:"\u0C24\u0C46\u0C32\u0C41\u0C17\u0C41",searchStarted:e=>`\u201C${e}\u201D \u0C15\u0C4B\u0C38\u0C02 \u0C36\u0C4B\u0C27\u0C3F\u0C38\u0C4D\u0C24\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,sortedAscending:e=>`${e}\u0C28\u0C41 \u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,sortedDescending:e=>`${e}\u0C28\u0C41 \u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C3E\u0C28\u0C41.`,count:e=>`\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C09\u0C28\u0C4D\u0C28\u0C3E\u0C2F\u0C3F.`,highest:(e,t,A)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C27\u0C3F\u0C15 ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${A}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,lowest:(e,t,A)=>`\u0C05\u0C24\u0C4D\u0C2F\u0C32\u0C4D\u0C2A ${e} \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}. \u0C07\u0C26\u0C3F ${A}\u0C15\u0C41 \u0C38\u0C02\u0C2C\u0C02\u0C27\u0C3F\u0C02\u0C1A\u0C3F\u0C28\u0C26\u0C3F.`,average:(e,t)=>`${e} \u0C38\u0C17\u0C1F\u0C41 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,total:(e,t)=>`${e} \u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 \u0C35\u0C3F\u0C32\u0C41\u0C35 ${t}.`,noData:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C21\u0C47\u0C1F\u0C3E \u0C32\u0C47\u0C26\u0C41.",noColumn:"\u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C24\u0C17\u0C3F\u0C28 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",noNumericData:e=>`${e}\u0C32\u0C4B \u0C38\u0C02\u0C16\u0C4D\u0C2F\u0C3E \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C32\u0C47\u0C26\u0C41.`,notFound:e=>`\u201C${e}\u201D\u0C15\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47 \u0C38\u0C2E\u0C3E\u0C1A\u0C3E\u0C30\u0C02 \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.`,needName:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C12\u0C15 \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C07\u0C35\u0C4D\u0C35\u0C02\u0C21\u0C3F.",fallback:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C28, \u0C15\u0C4D\u0C30\u0C2E\u0C2C\u0C26\u0C4D\u0C27\u0C40\u0C15\u0C30\u0C23, \u0C32\u0C46\u0C15\u0C4D\u0C15\u0C3F\u0C02\u0C2A\u0C41 \u0C2E\u0C30\u0C3F\u0C2F\u0C41 \u0C21\u0C47\u0C1F\u0C3E \u0C35\u0C3F\u0C36\u0C4D\u0C32\u0C47\u0C37\u0C23 \u0C1A\u0C47\u0C2F\u0C17\u0C32\u0C28\u0C41.",unsupportedVoice:"\u0C08 \u0C2C\u0C4D\u0C30\u0C4C\u0C1C\u0C30\u0C4D\u200C\u0C32\u0C4B \u0C35\u0C3E\u0C2F\u0C3F\u0C38\u0C4D \u0C07\u0C28\u0C4D\u200C\u0C2A\u0C41\u0C1F\u0C4D\u200C\u0C15\u0C41 \u0C2E\u0C26\u0C4D\u0C26\u0C24\u0C41 \u0C32\u0C47\u0C26\u0C41."}};function Ue(e){return e.toLowerCase().trim().replace(/\s+/g," ")}function xg(e,t){let A=Ue(e);if(t==="te-IN")return/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)/.test(A)?{type:"search",payload:A.replace(/^(శోధించు|శోధించండి|వెతుకు|వెతకండి|చూపించు|చూపించండి|ఫిల్టర్)\s*/u,"").trim()||e}:/క్రమబద్ధీకర|అమర్చ|సార్ట్/.test(A)?{type:"sort",payload:{key:void 0,dir:/అవరోహణ|పెద్ద|అధిక|చివర/.test(A)?"desc":"asc"}}:/ఎన్ని|ఎంతమంది|లెక్క|మొత్తం వరుస|వరుసలు/.test(A)?{type:"question",payload:e}:/అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(A)?{type:"question",payload:e}:/అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(A)?{type:"question",payload:e}:/సగటు|సగటు విలువ/.test(A)?{type:"question",payload:e}:/మొత్తం|కలిపి/.test(A)?{type:"question",payload:e}:{type:"search",payload:e};if(/^(search|find|show|filter)/.test(A))return{type:"search",payload:A.replace(/^(search|find|show|filter)\s+(for\s+|by\s+)?/,"").trim()||e};if(/sort/.test(A)){let n=/desc|descending|high|higher|large|largest|top/.test(A);return{type:"sort",payload:{key:A.match(/(?:by|on)\s+([a-z0-9_-]+)/)?.[1],dir:n?"desc":"asc"}}}return/how many|count|highest|maximum|max|top|largest|lowest|minimum|min|smallest|bottom|average|avg|mean|sum|total|who|which|where|whose/.test(A)?{type:"question",payload:e}:{type:"search",payload:e}}function bo(e,t){let A=Ue(e);return t.find(n=>{let o=Ue(n.key),r=Ue(n.label);return A.includes(o)||A.includes(r)})}function QA(e,t){return e.toLocaleString(t==="te-IN"?"te-IN":"en-IN")}function kg(e,t,A,n){let o=Bo[n];if(t.length===0)return o.noData;let r=Ue(e),i=A.filter(y=>y.type==="number"),s=bo(e,A),g=s?.type==="number"?s:i[0],a=/how many|count|rows|ఎన్ని|ఎంతమంది|లెక్క|వరుసలు/.test(r);if(a)return o.count(t.length);if(/highest|maximum|max|top|largest|అత్యధిక|గరిష్ఠ|పెద్ద|ఎక్కువ/.test(r)){let y=s??g;if(!y)return o.noColumn;let p=t.map(w=>({row:w,value:Number(w[y.key])})).filter(w=>!Number.isNaN(w.value)).sort((w,G)=>G.value-w.value);if(p.length===0)return o.noNumericData(y.label);let B=p[0],h=A.find(w=>w.key==="name"||Ue(w.label)==="name"),E=h?String(B.row[h.key]??""):n==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return o.highest(y.label,QA(B.value,n),E)}if(/lowest|minimum|min|smallest|bottom|అత్యల్ప|కనిష్ఠ|చిన్న|తక్కువ/.test(r)){let y=s??g;if(!y)return o.noColumn;let p=t.map(w=>({row:w,value:Number(w[y.key])})).filter(w=>!Number.isNaN(w.value)).sort((w,G)=>w.value-G.value);if(p.length===0)return o.noNumericData(y.label);let B=p[0],h=A.find(w=>w.key==="name"||Ue(w.label)==="name"),E=h?String(B.row[h.key]??""):n==="te-IN"?"\u0C08 \u0C35\u0C30\u0C41\u0C38":"this row";return o.lowest(y.label,QA(B.value,n),E)}if(/average|avg|mean|సగటు/.test(r)){let y=s??g;if(!y)return o.noColumn;let p=t.map(h=>Number(h[y.key])).filter(h=>!Number.isNaN(h));if(p.length===0)return o.noNumericData(y.label);let B=p.reduce((h,E)=>h+E,0)/p.length;return o.average(y.label,QA(Math.round(B*100)/100,n))}if(/sum|total|మొత్తం|కలిపి/.test(r)&&!a){let y=s??g;if(!y)return o.noColumn;let p=t.map(h=>Number(h[y.key])).filter(h=>!Number.isNaN(h));if(p.length===0)return o.noNumericData(y.label);let B=p.reduce((h,E)=>h+E,0);return o.total(y.label,QA(B,n))}let m=r.match(/[\p{L}\p{N}_-]+/gu)??[],f=new Set(["who","what","which","where","whose","is","the","has","have","show","find","search","for","by","about"]),C=m.filter(y=>!f.has(y)).join(" ").trim();if(C){let y=t.find(p=>Object.values(p).some(B=>String(B??"").toLowerCase().includes(C.toLowerCase())));return y?A.map(p=>`${p.label}: ${String(y[p.key]??"")}`).join(n==="te-IN"?" \xB7 ":", "):o.notFound(C)}return o.fallback}function Dg(e,t){if(typeof window>"u"||!window.speechSynthesis)return;window.speechSynthesis.cancel();let A=new SpeechSynthesisUtterance(e);A.lang=t,A.rate=1,A.pitch=1,window.speechSynthesis.speak(A)}function Sg(e){let[t,A]=At(!1),[n,o]=At(""),[r,i]=At(!0),s=Qo(null);zt(()=>{if(typeof window>"u")return;let l=window.SpeechRecognition||window.webkitSpeechRecognition;if(!l){i(!1),s.current=null;return}let u=new l;return u.continuous=!1,u.interimResults=!1,u.lang=e,u.onresult=I=>{let d=I?.results?.[0]?.[0]?.transcript??"";o(d),A(!1)},u.onerror=()=>{A(!1)},u.onend=()=>{A(!1)},s.current=u,()=>{try{u.stop()}catch{}s.current=null}},[e]);let g=sn(()=>{if(s.current){o(""),A(!0);try{s.current.start()}catch{A(!1)}}},[]),a=sn(()=>{try{s.current?.stop()}catch{}A(!1)},[]);return{listening:t,transcript:n,supported:r,start:g,stop:a}}function Gg(){return we("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R("circle",{cx:"11",cy:"11",r:"6.5"}),R("path",{d:"m16 16 5 5"})]})}function vg(){return we("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R("rect",{x:"8",y:"3",width:"8",height:"12",rx:"4"}),R("path",{d:"M5 11a7 7 0 0 0 14 0"}),R("path",{d:"M12 18v3"}),R("path",{d:"M8 21h8"})]})}function Rg(){return we("svg",{width:"17",height:"17",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.3",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R("path",{d:"m4 4 16 8-16 8 4-8-4-8Z"}),R("path",{d:"M8 12h12"})]})}function Ng(){return we("svg",{width:"18",height:"18",viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:"2.4",strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[R("path",{d:"m6 6 12 12"}),R("path",{d:"m18 6-12 12"})]})}function Fg({data:e,columns:t,onSearch:A,onSort:n,theme:o="light",language:r="en-US",inputLanguage:i="en-US",embedded:s=!1,agent:g,onInputLanguageChange:a}){let l=Bo[r],[u,I]=At(i);zt(()=>{I(i)},[i]);let[d,m]=At(!1),f=o==="dark",[c,C]=At(s),[y,p]=At(""),[B,h]=At([]),E=Qo(null),{listening:w,transcript:G,supported:U,start:W,stop:S}=Sg(u),D=yo(()=>({bg:f?"#0F172A":"#FFFFFF",surface:f?"#1E293B":"#F8FAFC",border:f?"#334155":"#E2E8F0",text:f?"#F1F5F9":"#0F172A",muted:f?"#94A3B8":"#64748B",accent:"#10B981",userMsg:f?"#334155":"#DBEAFE",aiMsg:f?"#1E293B":"#F0FDF4"}),[f]),b=yo(()=>({role:"ai",text:r==="te-IN"?"\u0C2E\u0C40 \u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D \u0C21\u0C47\u0C1F\u0C3E \u0C17\u0C41\u0C30\u0C3F\u0C02\u0C1A\u0C3F \u0C2A\u0C4D\u0C30\u0C36\u0C4D\u0C28 \u0C05\u0C21\u0C17\u0C02\u0C21\u0C3F.":"Ask me about your grid data.",time:new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"})}),[r]);zt(()=>{h(N=>N.length>0?N:[b])},[b]),zt(()=>{E.current?.scrollIntoView({behavior:"smooth"})},[B]);let z=()=>new Date().toLocaleTimeString([],{hour:"2-digit",minute:"2-digit"}),O=sn(async N=>{let q=N.trim();if(!q)return;h(F=>[...F,{role:"user",text:q,time:z()}]),p("");let T="";if(g){m(!0);try{T=(await g.ask(q)).message}catch{T=l.fallback}finally{m(!1)}}else{let F=xg(q,r);if(F.type==="question")T=kg(F.payload??q,e,t,r);else if(F.type==="search"){let te=String(F.payload??q);A?.(te),T=l.searchStarted(te)}else if(F.type==="sort"){let te=F.payload?.key,P=te?t.find(oe=>Ue(oe.key)===Ue(te)||Ue(oe.label)===Ue(te)):void 0;if(P||(P=bo(q,t)),P&&n){let oe=F.payload?.dir==="desc"?"desc":"asc";n(String(P.key),oe),T=oe==="asc"?l.sortedAscending(P.label):l.sortedDescending(P.label)}else T=l.noColumn}}T||(T=l.fallback),h(F=>[...F,{role:"ai",text:T,time:z()}]),Dg(T,r)},[g,t,e,r,A,n,l]);zt(()=>{G&&O(G)},[G,O]);let Y=()=>{O(y)},ie=r==="te-IN"?["\u0C0E\u0C28\u0C4D\u0C28\u0C3F \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41","\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F","\u0C15\u0C4D\u0C30\u0C2E\u0C02"]:["how many rows","search","sort"],se=we("div",{style:{width:s?"100%":360,maxWidth:s?"100%":"calc(100vw - 48px)",height:s?390:480,maxHeight:"70vh",background:D.bg,border:`1px solid ${D.border}`,borderRadius:s?12:16,boxShadow:s?"none":"0 20px 40px rgba(0,0,0,0.15)",display:"flex",flexDirection:"column",overflow:"hidden"},children:[we("div",{style:{padding:"12px 14px",background:D.accent,color:"#FFFFFF",display:"flex",alignItems:"center",gap:10},children:[R("div",{style:{width:34,height:34,borderRadius:10,display:"flex",alignItems:"center",justifyContent:"center",background:"rgba(255,255,255,0.18)",fontSize:17},children:"AI"}),we("div",{style:{flex:1,minWidth:0},children:[R("div",{style:{fontWeight:700,fontSize:14},children:l.title}),R("div",{style:{fontSize:11,opacity:.9},children:l.subtitle})]}),!s&&R("button",{type:"button",onClick:()=>C(!1),"aria-label":l.close,title:l.close,style:{width:32,height:32,border:"none",borderRadius:8,background:"rgba(255,255,255,0.12)",color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer"},children:R(Ng,{})})]}),we("div",{style:{padding:"8px 10px",borderBottom:`1px solid ${D.border}`,display:"flex",alignItems:"center",gap:8,background:D.surface},children:[R("span",{style:{fontSize:11,color:D.muted},children:l.inputLanguage}),we("select",{value:u,onChange:N=>{let q=N.target.value;I(q),a?.(q)},disabled:w,"aria-label":l.inputLanguage,style:{padding:"5px 8px",borderRadius:7,border:`1px solid ${D.border}`,background:D.bg,color:D.text,fontSize:11},children:[R("option",{value:"en-US",children:"English (US)"}),R("option",{value:"en-IN",children:"English (India)"}),R("option",{value:"as-IN",children:"Assamese"}),R("option",{value:"bn-IN",children:"Bengali"}),R("option",{value:"brx-IN",children:"Bodo"}),R("option",{value:"doi-IN",children:"Dogri"}),R("option",{value:"gu-IN",children:"Gujarati"}),R("option",{value:"hi-IN",children:"Hindi"}),R("option",{value:"kn-IN",children:"Kannada"}),R("option",{value:"ks-IN",children:"Kashmiri"}),R("option",{value:"kok-IN",children:"Konkani"}),R("option",{value:"mai-IN",children:"Maithili"}),R("option",{value:"ml-IN",children:"Malayalam"}),R("option",{value:"mni-IN",children:"Manipuri"}),R("option",{value:"mr-IN",children:"Marathi"}),R("option",{value:"ne-IN",children:"Nepali"}),R("option",{value:"or-IN",children:"Odia"}),R("option",{value:"pa-IN",children:"Punjabi"}),R("option",{value:"sa-IN",children:"Sanskrit"}),R("option",{value:"sat-IN",children:"Santali"}),R("option",{value:"sd-IN",children:"Sindhi"}),R("option",{value:"ta-IN",children:"Tamil"}),R("option",{value:"te-IN",children:"Telugu"}),R("option",{value:"ur-IN",children:"Urdu"})]})]}),we("div",{style:{flex:1,overflowY:"auto",padding:10,display:"flex",flexDirection:"column",gap:8},children:[B.map((N,q)=>we("div",{style:{alignSelf:N.role==="user"?"flex-end":"flex-start",maxWidth:"88%",padding:"8px 11px",borderRadius:11,background:N.role==="user"?D.userMsg:D.aiMsg,color:D.text,fontSize:13,lineHeight:1.5},children:[R("div",{children:N.text}),R("div",{style:{marginTop:3,fontSize:10,opacity:.55,textAlign:"right"},children:N.time})]},`${N.time}-${q}`)),w&&R("div",{style:{alignSelf:"flex-end",padding:"8px 11px",borderRadius:11,background:f?"#3F1D2E":"#FEE2E2",color:f?"#FCA5A5":"#991B1B",fontSize:13},children:l.listening}),(d||g?.loading)&&R("div",{role:"status","aria-live":"polite",style:{alignSelf:"flex-start",padding:"8px 11px",borderRadius:11,background:D.aiMsg,color:D.muted,fontSize:13},children:l.working}),R("div",{ref:E})]}),R("div",{style:{padding:"7px 10px",borderTop:`1px solid ${D.border}`,display:"flex",gap:6,overflowX:"auto",flexShrink:0},children:ie.map(N=>R("button",{type:"button",onClick:()=>O(N),style:{padding:"5px 9px",borderRadius:12,border:`1px solid ${D.border}`,background:D.surface,color:D.text,fontSize:10.5,cursor:"pointer",whiteSpace:"nowrap"},children:N},N))}),we("div",{style:{padding:9,display:"flex",gap:6,borderTop:`1px solid ${D.border}`,background:D.surface},children:[we("div",{style:{position:"relative",flex:1},children:[R(Gg,{}),R("input",{type:"text",value:y,onChange:N=>p(N.target.value),onKeyDown:N=>{N.key==="Enter"&&Y()},placeholder:l.placeholder,"aria-label":l.ask,style:{width:"100%",boxSizing:"border-box",padding:"9px 10px 9px 34px",borderRadius:8,border:`1px solid ${D.border}`,background:D.bg,color:D.text,fontSize:12,outline:"none"}})]}),U?R("button",{type:"button",onClick:w?S:W,"aria-label":w?l.listening:l.speakNow,title:w?l.listening:l.speakNow,style:{width:38,height:38,border:"none",borderRadius:8,background:w?"#EF4444":D.accent,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:"pointer",flexShrink:0},children:R(vg,{})}):null,R("button",{type:"button",onClick:Y,disabled:!y.trim(),"aria-label":l.send,title:l.send,style:{width:38,height:38,border:"none",borderRadius:8,background:y.trim()?D.accent:D.muted,color:"#FFFFFF",display:"flex",alignItems:"center",justifyContent:"center",cursor:y.trim()?"pointer":"not-allowed",opacity:y.trim()?1:.6,flexShrink:0},children:R(Rg,{})})]})]});return s?R("div",{style:{width:"100%",minWidth:0},children:c?se:we("button",{type:"button",onClick:()=>C(!0),"aria-label":l.open,style:{minHeight:40,padding:"8px 13px",borderRadius:9,border:"1px solid #10B981",background:f?"#064E3B":"#ECFDF5",color:f?"#A7F3D0":"#047857",display:"inline-flex",alignItems:"center",gap:8,cursor:"pointer",fontSize:12,fontWeight:600},children:[R("span",{"aria-hidden":"true",children:"AI"}),l.ask]})}):we(Tg,{children:[!c&&R("button",{type:"button",onClick:()=>C(!0),"aria-label":l.open,title:l.title,style:{position:"fixed",bottom:24,right:24,zIndex:9998,width:56,height:56,borderRadius:28,background:D.accent,color:"#FFFFFF",border:"none",cursor:"pointer",boxShadow:"0 8px 20px rgba(16,185,129,0.3)",display:"flex",alignItems:"center",justifyContent:"center",fontWeight:700,fontSize:14},children:"AI"}),c&&R("div",{style:{position:"fixed",bottom:90,right:24,zIndex:9997},children:se}),R("style",{children:`
|
|
386
390
|
@keyframes yuktai-ai-pulse {
|
|
387
391
|
0%, 100% {
|
|
388
392
|
transform: scale(1);
|
|
@@ -392,16 +396,14 @@ import{$ as Ui,$a as Us,$b as Ua,A as fi,Aa as fs,Ab as fa,B as mi,Ba as ms,Bb a
|
|
|
392
396
|
transform: scale(1.05);
|
|
393
397
|
}
|
|
394
398
|
}
|
|
395
|
-
`})]})}var Nn=fc;import{useCallback as Rt,useEffect as wc,useRef as Ln,useState as nn}from"react";var hc={en:{found:e=>`${e} row(s) found.`,count:e=>`${e} row(s).`,columns:"Grid columns retrieved.",rowFound:"Row found.",notFound:e=>`Row "${e}" not found.`,noneFound:"None of the given rows were found.",highlighted:e=>`${e} row(s) highlighted.`,selected:e=>`Row "${e}" selected.`,opened:e=>`Row "${e}" opened.`,notSupported:e=>`This grid does not support "${e}".`,emptyQuery:"Please enter something to search.",noIds:"No row IDs were given.",unknownColumn:e=>`Unknown column "${e}".`,badOperator:e=>`Unknown filter operator "${e}".`,badValue:"The filter value is not valid for this column.",filtered:e=>`Filter applied: ${e} row(s) match.`,filtersCleared:"All filters cleared.",sorted:(e,t)=>`Sorted by ${e} (${t==="asc"?"ascending":"descending"}).`,sortCleared:"Sorting cleared.",internal:"Something went wrong while running this action."},te:{found:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3E\u0C2F\u0C3F.`,count:e=>`\u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41.`,columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32 \u0C35\u0C3F\u0C35\u0C30\u0C3E\u0C32\u0C41.",rowFound:"\u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3F\u0C02\u0C26\u0C3F.",notFound:e=>`"${e}" \u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.`,noneFound:"\u0C07\u0C1A\u0C4D\u0C1A\u0C3F\u0C28 \u0C35\u0C30\u0C41\u0C38\u0C32\u0C47\u0C35\u0C40 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.",highlighted:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D \u0C1A\u0C47\u0C36\u0C3E\u0C28\u0C41.`,selected:e=>`"${e}" \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,opened:e=>`"${e}" \u0C24\u0C46\u0C30\u0C3F\u0C1A\u0C3E\u0C28\u0C41.`,notSupported:e=>`\u0C08 \u0C2A\u0C1F\u0C4D\u0C1F\u0C3F\u0C15\u0C32\u0C4B "${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C32\u0C47\u0C26\u0C41.`,emptyQuery:"\u0C35\u0C46\u0C24\u0C15\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C0F\u0C26\u0C48\u0C28\u0C3E \u0C30\u0C3E\u0C2F\u0C02\u0C21\u0C3F.",noIds:"\u0C35\u0C30\u0C41\u0C38 ID\u0C32\u0C41 \u0C07\u0C35\u0C4D\u0C35\u0C32\u0C47\u0C26\u0C41.",unknownColumn:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C32\u0C47\u0C26\u0C41.`,badOperator:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C27\u0C3E\u0C28\u0C02 \u0C32\u0C47\u0C26\u0C41.`,badValue:"\u0C08 \u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C15\u0C3F \u0C08 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C26\u0C41.",filtered:e=>`\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C47\u0C36\u0C3E\u0C28\u0C41: ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C2F\u0C3E\u0C2F\u0C3F.`,filtersCleared:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C28\u0C4D\u0C28\u0C40 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",sorted:(e,t)=>`${e} \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02 (${t==="asc"?"\u0C06\u0C30\u0C4B\u0C39\u0C23":"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23"}).`,sortCleared:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",internal:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}};function Ge(e){return hc[e.locale??"en"]}function Le(e,t){return{success:!0,message:e,data:t}}function ae(e,t){return{success:!1,message:t,error:{code:e}}}var tr=["contains","equals","startsWith","endsWith","greaterThan","lessThan","between"];function be(e,t="id"){let n=e?.[t];return n==null?"":String(n)}function at(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function nr(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let n=Number(t);return Number.isFinite(n)?n:null}function or(e){if(e instanceof Date)return e.getTime();let t=new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null}function rr(e){return(Array.isArray(e)?e:typeof e=="string"?e.split(","):[]).map(n=>String(n).trim()).filter(Boolean)}function Mn(e,t){let n=at(t);return e.columns.find(o=>at(o.key)===n||at(o.label)===n)}function Zt(e,t){return e.data.find(n=>be(n,e.rowKey)===t)}function bc(e,t){return e[t]}function yc(e,t,n){let o=bc(e,n.key),r=n.type??"text";if(r==="number"||r==="date"){let a=r==="number"?nr:or,l=a(o);if(l===null)return!1;if(t.operator==="between"){let[u,p]=t.value,g=a(u),A=a(p);return g!==null&&A!==null&&l>=Math.min(g,A)&&l<=Math.max(g,A)}let c=a(t.value);if(c===null)return!1;switch(t.operator){case"equals":return l===c;case"greaterThan":return l>c;case"lessThan":return l<c;default:break}}let s=at(o),i=at(t.value);switch(t.operator){case"equals":return s===i;case"startsWith":return s.startsWith(i);case"endsWith":return s.endsWith(i);case"contains":return s.includes(i);default:return!1}}function Ic(e,t){let n=t.type??"text",o=n==="date"?or:nr;return e.operator==="between"?n==="text"||!Array.isArray(e.value)||e.value.length!==2?!1:o(e.value[0])!==null&&o(e.value[1])!==null:e.operator==="greaterThan"||e.operator==="lessThan"?n!=="text"&&o(e.value)!==null:!Array.isArray(e.value)&&String(e.value).trim()!==""}function je(e,t,n){return n.length?ir({data:e,columns:t},n):e}function lt(e){return e.map(t=>({key:String(t.key),label:t.label,type:t.type==="number"?"number":t.type==="date"?"date":"text"}))}function ir(e,t){return e.data.filter(n=>t.every(o=>{let r=Mn(e,o.key);return r?yc(n,o,r):!0}))}function sr(e,t){let n=Ge(e),o=at(t);if(!o)return ae("INVALID_INPUT",n.emptyQuery);let r=e.data.filter(i=>e.columns.some(a=>at(i[a.key]).includes(o))),s=r.map(i=>be(i,e.rowKey)).filter(Boolean);return e.onHighlightRows?.(s),Le(n.found(r.length),r)}function ar(e){return Le(Ge(e).count(e.data.length),e.data.length)}function lr(e){return Le(Ge(e).columns,e.columns)}function cr(e,t){let n=Ge(e),o=String(t??"").trim();if(!o)return ae("INVALID_INPUT",n.noIds);let r=Zt(e,o);return r?Le(n.rowFound,r):ae("NOT_FOUND",n.notFound(o))}function Tt(e,t){let n=Ge(e),o=rr(t);if(o.length===0)return ae("INVALID_INPUT",n.noIds);if(!e.onHighlightRows)return ae("NOT_SUPPORTED",n.notSupported("highlight"));let r=o.filter(s=>Zt(e,s)!==void 0);return r.length===0?ae("NOT_FOUND",n.noneFound):(e.onHighlightRows(r),Le(n.highlighted(r.length),r))}function en(e,t){let n=Ge(e),o=String(t??"").trim();return o?e.onSelectRow?Zt(e,o)?(e.onSelectRow(o),Le(n.selected(o),o)):ae("NOT_FOUND",n.notFound(o)):ae("NOT_SUPPORTED",n.notSupported("select")):ae("INVALID_INPUT",n.noIds)}function tn(e,t){let n=Ge(e),o=String(t??"").trim();return o?e.onOpenRow?Zt(e,o)?(e.onOpenRow(o),Le(n.opened(o),o)):ae("NOT_FOUND",n.notFound(o)):ae("NOT_SUPPORTED",n.notSupported("open")):ae("INVALID_INPUT",n.noIds)}function ur(e,t){let n=Ge(e),o=Mn(e,t?.key??"");if(!o)return ae("INVALID_INPUT",n.unknownColumn(String(t?.key??"")));if(!tr.includes(t.operator))return ae("INVALID_INPUT",n.badOperator(String(t.operator)));let r={...t,key:o.key};if(!Ic(r,o))return ae("INVALID_INPUT",n.badValue);if(!e.onFiltersChange)return ae("NOT_SUPPORTED",n.notSupported("filter"));let s=[...(e.filters??[]).filter(a=>a.key!==o.key),r],i=ir(e,s).length;return e.onFiltersChange(s),Le(n.filtered(i),{filters:s,count:i})}function dr(e){let t=Ge(e);return e.onFiltersChange?(e.onFiltersChange([]),Le(t.filtersCleared,[])):ae("NOT_SUPPORTED",t.notSupported("clear filters"))}function gr(e,t,n="asc"){let o=Ge(e),r=Mn(e,t);if(!r)return ae("INVALID_INPUT",o.unknownColumn(String(t)));if(n!=="asc"&&n!=="desc")return ae("INVALID_INPUT",o.badValue);if(!e.onSortChange)return ae("NOT_SUPPORTED",o.notSupported("sort"));let s={key:r.key,direction:n};return e.onSortChange(s),Le(o.sorted(r.label,n),s)}function Ar(e){let t=Ge(e);return e.onSortChange?(e.onSortChange(null),Le(t.sortCleared,null)):ae("NOT_SUPPORTED",t.notSupported("clear sort"))}var xc={search:"Search all columns for text. Matching rows are highlighted.",count:"Count the rows currently in the grid.",columns:"List the grid's columns with their keys, labels and types.",get_row:"Get one row by its ID.",highlight:"Highlight one or more rows by ID without filtering the grid.",select:"Select one row by ID.",open:"Open one row by ID to show its full details.",filter:"Filter the grid by one column. Replaces any existing filter on that column.",clear_filters:"Remove all filters.",sort:"Sort the grid by one column, ascending or descending.",clear_sort:"Remove sorting."},er={en:{search:"Search",count:"Count",columns:"Columns",get_row:"Get row",highlight:"Highlight",select:"Select",open:"Open",filter:"Filter",clear_filters:"Clear filters",sort:"Sort",clear_sort:"Clear sort"},te:{search:"\u0C35\u0C46\u0C24\u0C41\u0C15\u0C41",count:"\u0C32\u0C46\u0C15\u0C4D\u0C15",columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32\u0C41",get_row:"\u0C35\u0C30\u0C41\u0C38 \u0C1A\u0C42\u0C2A\u0C41",highlight:"\u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D",select:"\u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B",open:"\u0C24\u0C46\u0C30\u0C41\u0C35\u0C41",filter:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D",clear_filters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F",sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02",clear_sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F"}};async function Cc(e,t){try{return t()}catch{return ae("INTERNAL",Ge(e).internal)}}function Qt(e,t={}){let n=t.name??"yuktai_grid",o=er[e.locale??"en"],r=l=>t.descriptions?.[l]??xc[l],s={id:{type:"string",description:"Row ID"}},i=e.columns.map(l=>l.key);return[{id:"search",available:!0,schema:{type:"object",properties:{query:{type:"string"}},required:["query"]},run:l=>sr(e,String(l.query??""))},{id:"count",available:!0,schema:{type:"object",properties:{}},run:()=>ar(e)},{id:"columns",available:!0,schema:{type:"object",properties:{}},run:()=>lr(e)},{id:"get_row",available:!0,schema:{type:"object",properties:s,required:["id"]},run:l=>cr(e,String(l.id??""))},{id:"highlight",available:!!e.onHighlightRows,schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Row IDs"}},required:["ids"]},run:l=>Tt(e,rr(l.ids))},{id:"select",available:!!e.onSelectRow,schema:{type:"object",properties:s,required:["id"]},run:l=>en(e,String(l.id??""))},{id:"open",available:!!e.onOpenRow,schema:{type:"object",properties:s,required:["id"]},run:l=>tn(e,String(l.id??""))},{id:"filter",available:!!e.onFiltersChange,schema:{type:"object",properties:{key:{type:"string",enum:i},operator:{type:"string",enum:tr},value:{description:"Text or number; for 'between' an array of two numbers or dates"}},required:["key","operator","value"]},run:l=>ur(e,{key:String(l.key??""),operator:String(l.operator??""),value:l.value})},{id:"clear_filters",available:!!e.onFiltersChange,schema:{type:"object",properties:{}},run:()=>dr(e)},{id:"sort",available:!!e.onSortChange,schema:{type:"object",properties:{key:{type:"string",enum:i},direction:{type:"string",enum:["asc","desc"]}},required:["key"]},run:l=>gr(e,String(l.key??""),l.direction==="desc"?"desc":"asc")},{id:"clear_sort",available:!!e.onSortChange,schema:{type:"object",properties:{}},run:()=>Ar(e)}].filter(l=>l.available).map(l=>({name:`${n}_${l.id}`,title:er.en[l.id],description:r(l.id),label:o[l.id],inputSchema:l.schema,execute:c=>Cc(e,()=>l.run(c??{}))}))}var kc={en:{done:"Done.",toolMissing:e=>`The action "${e}" is not available here.`,missingInput:e=>`Missing: ${e}.`,notUnderstood:"Sorry, I didn't understand. Try: a word to search, \u201Csort by <column>\u201D, or \u201Cclear filters\u201D.",noMatch:e=>`Nothing matched "${e}".`,failed:"Something went wrong while running this action."},te:{done:"\u0C2A\u0C42\u0C30\u0C4D\u0C24\u0C2F\u0C3F\u0C02\u0C26\u0C3F.",toolMissing:e=>`"${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C07\u0C15\u0C4D\u0C15\u0C21 \u0C05\u0C02\u0C26\u0C41\u0C2C\u0C3E\u0C1F\u0C41\u0C32\u0C4B \u0C32\u0C47\u0C26\u0C41.`,missingInput:e=>`\u0C07\u0C35\u0C3F \u0C15\u0C3E\u0C35\u0C3E\u0C32\u0C3F: ${e}.`,notUnderstood:"\u0C15\u0C4D\u0C37\u0C2E\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F, \u0C05\u0C30\u0C4D\u0C25\u0C02 \u0C15\u0C3E\u0C32\u0C47\u0C26\u0C41. \u0C07\u0C32\u0C3E \u0C2A\u0C4D\u0C30\u0C2F\u0C24\u0C4D\u0C28\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F: \u0C35\u0C46\u0C24\u0C15\u0C3E\u0C32\u0C4D\u0C38\u0C3F\u0C28 \u0C2A\u0C26\u0C02, \u201C<\u0C15\u0C3E\u0C32\u0C2E\u0C4D> \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u201D, \u0C32\u0C47\u0C26\u0C3E \u201C\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F\u201D.",noMatch:e=>`"${e}" \u0C15\u0C3F \u0C0F\u0C2E\u0C40 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47\u0C26\u0C41.`,failed:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}},pr=e=>e.normalize("NFC").toLowerCase().trim(),Ve={clearFilters:/\b(clear|remove|reset)\b.*\bfilters?\b|ఫిల్టర్.*(తీసే|తొలగ)/i,clearSort:/\b(clear|remove|reset)\b.*\bsort(ing)?\b|క్రమం.*(తీసే|తొలగ)/i,count:/^\s*(how many|count)\b|ఎన్ని|లెక్క/i,sort:/\bsort\b|\border by\b|క్రమ|అమర్చ|సార్ట్/i,desc:/\b(desc|descending|z\s*-\s*a|highest|largest|most)\b|అవరోహణ|తగ్గే|పెద్ద|అధిక|చివర|ఎక్కువ నుండి/i,openEn:/^\s*open\s+(.+?)\s*$/i,openTe:/^\s*(.+?)\s*(తెరువు|తెరవండి|తెరవు)\s*$/,searchFiller:/^\s*(search(\s+for)?|find|show(\s+me)?|filter(\s+by)?|look\s+for|వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s+|\s+(వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s*$/gi};function vc(e,t){let n=pr(e),o=null;for(let r of t)for(let s of[r.label,r.key]){let i=pr(s);i&&n.includes(i)&&(!o||i.length>o.len)&&(o={key:r.key,len:i.length})}return o?.key??null}function mr(e,t){let n=(e??"").trim();if(!n)return null;if(Ve.clearFilters.test(n))return{kind:"tool",tool:"clear_filters",input:{}};if(Ve.clearSort.test(n))return{kind:"tool",tool:"clear_sort",input:{}};if(Ve.count.test(n))return{kind:"tool",tool:"count",input:{}};if(Ve.sort.test(n)){let s=vc(n,t.columns);return s?{kind:"tool",tool:"sort",input:{key:s,direction:Ve.desc.test(n)?"desc":"asc"}}:null}let o=n.match(Ve.openEn)??n.match(Ve.openTe);if(o?.[1])return{kind:"open",text:o[1].trim()};let r=n.replace(Ve.searchFiller,"").trim();return r?{kind:"tool",tool:"search",input:{query:r}}:null}function Ec(e){return!!e&&typeof e=="object"&&typeof e.success=="boolean"&&typeof e.message=="string"}function Sc(e,t){let n=e.inputSchema?.required;return Array.isArray(n)?n.map(String).filter(o=>t[o]===void 0||t[o]===null||String(t[o]).trim()===""):[]}function Bc(e,t){let n=e.find(r=>r.name===t);if(n)return n;let o=e.filter(r=>r.name.endsWith(`_${t}`)).sort((r,s)=>r.name.length-s.name.length);if(o.length!==0&&!(o.length>1&&o[0].name.length===o[1].name.length))return o[0]}function fr(e){return e.normalize("NFC").trim().toLocaleLowerCase()}function Tc(e,t){let n=fr(e);return t.find(o=>o.phrases.some(r=>{let s=fr(r);return s.length>0&&n.includes(s)}))}function on({tools:e,data:t=[],onResult:n,onError:o,locale:r="en",columns:s=[],rowKey:i="id",parseIntent:a,customRules:l=[],historyLimit:c=20}){let u=kc[r],[p,g]=nn(0),[A,f]=nn(null),[h,d]=nn(null),[b,I]=nn([]),m=Ln({tools:e,data:t,onResult:n,onError:o,columns:s,rowKey:i,parseIntent:a,customRules:l,historyLimit:c,m:u,locale:r});m.current={tools:e,data:t,onResult:n,onError:o,columns:s,rowKey:i,parseIntent:a,customRules:l,historyLimit:c,m:u,locale:r};let x=Ln(!0),y=Ln(0);wc(()=>(x.current=!0,()=>{x.current=!1}),[]);let k=Rt((T,S,C,Y,K)=>{x.current&&(K===y.current&&f(C),I(M=>[...M,{id:K,tool:T,input:S,result:C,source:Y,at:Date.now()}].slice(-m.current.historyLimit)))},[]),v=Rt(async(T,S,C)=>{let{tools:Y,onResult:K,onError:M,m:re}=m.current,ce=++y.current,F=Bc(Y,T);if(!F){let D={success:!1,message:re.toolMissing(T),error:{code:"NOT_SUPPORTED"}},W=new Error(D.message);return x.current&&d(W),M?.(W),k(T,S,D,C,ce),D}let J=Sc(F,S);if(J.length){let D={success:!1,message:re.missingInput(J.join(", ")),error:{code:"INVALID_INPUT"},tool:F.name};return k(F.name,S,D,C,ce),K?.(D),D}x.current&&g(D=>D+1);try{let D=await F.execute(S),W=Ec(D)?{...D,tool:F.name}:{success:!0,message:re.done,data:D,tool:F.name};return x.current&&W.success&&d(null),k(F.name,S,W,C,ce),K?.(W),W}catch(D){let W=D instanceof Error?D:new Error(String(D)),V={success:!1,message:re.failed,error:{code:"INTERNAL"},tool:F.name};return x.current&&d(W),M?.(W),k(F.name,S,V,C,ce),V}finally{x.current&&g(D=>Math.max(0,D-1))}},[k]),R=Rt((T,S={})=>v(T,S??{},"tool"),[v]),z=Rt(async T=>{let{columns:S,locale:C,parseIntent:Y,customRules:K,data:M,m:re,rowKey:ce}=m.current,F=Tc(T,K??[]);if(F){let L={input:T,data:M,columns:S,executeTool:R};try{let ve={success:!0,message:await F.execute(L),tool:`rule:${F.name}`};return k(`rule:${F.name}`,{text:T},ve,"ask",++y.current),m.current.onResult?.(ve),ve}catch(ie){let ve=ie instanceof Error?ie:new Error(String(ie)),Qe={success:!1,message:re.failed,error:{code:"INTERNAL"},tool:`rule:${F.name}`};return x.current&&d(ve),m.current.onError?.(ve),k(`rule:${F.name}`,{text:T},Qe,"ask",++y.current),Qe}}let D=(Y??mr)(T,{columns:S,locale:C});if(!D){let L={success:!1,message:re.notUnderstood,error:{code:"NOT_UNDERSTOOD"}};return k("ask",{text:T},L,"ask",++y.current),L}if(D.kind==="tool")return v(D.tool,D.input,"ask");let W=await v("search",{query:D.text},"ask"),V=Array.isArray(W.data)?W.data:[];if(!W.success)return W;if(V.length===0){let L={success:!1,message:re.noMatch(D.text),error:{code:"NOT_FOUND"},tool:W.tool};return k("open",{text:D.text},L,"ask",++y.current),L}return v("open",{id:be(V[0],ce)},"ask")},[R,k,v]),N=Rt(()=>{I([]),f(null),d(null)},[]);return{loading:p>0,tools:e,executeTool:R,ask:z,lastResult:A,lastError:h,history:b,clearHistory:N}}var Qc=on;import{useEffect as Rc,useMemo as Gc,useRef as $n}from"react";function Dc(e){return JSON.stringify(e.map(t=>[t.name,t.title,t.description,t.inputSchema]))}function Fc({tools:e,data:t=[],columns:n=[],rowKey:o,locale:r,onSelectRow:s,onHighlightRows:i,onOpenRow:a,name:l="yuktai_grid",descriptions:c,onStatusChange:u}){let p=Gc(()=>e||Qt({data:t,columns:n,rowKey:o,locale:r,onSelectRow:s,onHighlightRows:i,onOpenRow:a},{name:l,descriptions:c}),[e,t,n,o,r,s,i,a,l,c]),g=$n(p);g.current=p;let A=$n(u);A.current=u;let f=$n(Promise.resolve()),h=Dc(p);return Rc(()=>{let d=y=>A.current?.(y),b=typeof document<"u"?document.modelContext:void 0;if(!b?.registerTool){d({state:"unsupported",registered:[],errors:[]});return}let I=new AbortController,m=g.current,x=f.current.then(async()=>{if(I.signal.aborted)return;d({state:"registering",registered:[],errors:[]});let y=[],k=[];for(let v of m){if(I.signal.aborted)return;try{await b.registerTool({name:v.name,title:v.title,description:v.description,inputSchema:v.inputSchema,execute:R=>{let z=g.current.find(N=>N.name===v.name);return z?z.execute(R??{}):{success:!1,message:`Tool "${v.name}" is no longer available.`,error:{code:"NOT_SUPPORTED"}}}},{signal:I.signal}),y.push(v.name)}catch(R){k.push({tool:v.name,message:R instanceof Error?R.message:String(R)})}}I.signal.aborted||d({state:k.length===0?"ready":y.length>0?"partial":"error",registered:y,errors:k})});return f.current=x.catch(()=>{}),()=>I.abort()},[h]),null}var rn=Fc;import{useEffect as $c,useMemo as Pc,useState as zc}from"react";var hr=["AGFzbQEAAAABYA1gA39/fwF/YAJ/fwF/YAN/f38AYAV/f39/fwBgBX9/f39/AX9gBH9/f38AYAR/f39/AX9gCH9/f39/f39/AX9g","AX8AYAABf2AHf39/f39/fwF/YAZ/f39/f38Bf2AAAAMkIwIDBAIFBQICAgIGBgYGAwcICQoFCQIBBQILBQYAAQICAgwABAUBcAEC","AgUDAQARBgkBfwFBgIDAAAsHPAUGbWVtb3J5AgAMeWtfaGVhcF9iYXNlABEJeWtfc2VhcmNoABIHeWtfc29ydAATCnlrX3ZlcnNp","b24AFAkHAQBBAQsBHQrEWiO8BgMFfwJ8BH8CQCABQQJJDQACQAJAAkACQAJAAkACQAJAAkAgACgCBCIDIAIoAgAiBCgCBC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kgICAgAACQAJAIAFBIUkNACADQX9qIQMDQAJAIANB","f0cNACAAIAEgBBCJgICAAAwDCyAAIAFBA3YiBkEcbGohByAAIAZBBHRqIQgCQAJAIAFBwABJDQAgACAIIAcgBiAEEIKAgIAAIQYM","AQsCQAJAAkACQAJAAkAgACgCACIGIAQoAgAiCSgCBCIKTw0AIAgoAgAiCyAKTw0BIAkoAgAiDCALQQN0aisDACENAkACQAJAAkAg","DCAGQQN0aisDACIOIA5iIg8NACANIA1hDQFBASEQDAMLIA0gDWINAUEAIRAMAgtBAEEAQX8gDiANZiIRG0EBQX4gERsgDiANZRsi","EWsgESAJKAIILQAAG0H/AXEiEUH/AUYgBiALSSARGyEQDAELIAYgC0khEAsgBygCACIRIApPDQIgDCARQQN0aisDACESAkACQAJA","AkACQAJAAkAgDw0AIBIgEmENASAAIQYgEEUNDSANIA1iDQYMCwsgEiASYg0BIAAhBiAQDQwgDSANYQ0DDAkLQQBBAEF/IA4gEmYi","ChtBAUF+IAobIA4gEmUbIgprIAogCSgCCC0AABtB/wFxIgpB/wFGIAYgEUkgChshCgwBCyAGIBFJIQoLIAAhBiAQIApHDQkgDSAN","Yg0BIBIgEmINBwtBAEEAQX8gDSASZiIGG0EBQX4gBhsgDSASZRsiBmsgBiAJKAIILQAAG0H/AXEiBkH/AUYgCyARSSAGGyEGDAcL","IBIgEmENBAsgCyARSSEGDAULIAYgCkHUhMCAABCYgICAAAALIAsgCkHkhMCAABCYgICAAAALIBEgCkHkhMCAABCYgICAAAALQQAh","BgwBC0EBIQYLIAcgCCAQIAZzGyEGCyAGIABrIgdBAnYhBgJAAkAgAkUNAAJAAkACQCACKAIAIgggBCgCACIJKAIEIgtPDQAgACAH","aigCACIHIAtPDQEgCSgCACILIAdBA3RqKwMAIQ0CQAJAIAsgCEEDdGorAwAiEiASYg0AIA0gDWINBUEAQQBBfyASIA1mIgsbQQFB","fiALGyASIA1lGyILayALIAkoAggtAAAbQf8BcSIJQf8BRiAIIAdJIAkbDQUMAQsgCCAHTw0AIA0gDWINBAsgBSAENgIMIAAgASAG","IAVBDGoQjICAgAAiBkEBaiECIAYgAU8NAiABIAJrIQEgACACQQJ0aiEAQQAhAgwECyAIIAtB1ITAgAAQmICAgAAACyAHIAtB5ITA","gAAQmICAgAAACyACIAEgAUHEhMCAABCXgICAAAALIAAgACABIAYgBBCNgICAACIGIAIgAyAEEIGAgIAAIAEgBkF/c2ohASAAIAZB","AnRqIgJBBGohAAsgA0F/aiEDIAFBIU8NAAsLIAAgASAEEIiAgIAACyAFQRBqJICAgIAAC4kFBAR/AnwCfwF8AkAgA0H4////AXFF","DQAgACAAIANBA3YiA0EEdCIFaiAAIANBHGwiBmogAyAEEIKAgIAAIQAgASABIAVqIAEgBmogAyAEEIKAgIAAIQEgAiACIAVqIAIg","BmogAyAEEIKAgIAAIQILAkACQAJAAkACQAJAAkAgACgCACIDIAQoAgAiBCgCBCIHTw0AIAEoAgAiBSAHTw0BIAQoAgAiCCAFQQN0","aisDACEJAkACQAJAAkAgCCADQQN0aisDACIKIApiIgsNACAJIAlhDQFBASEMDAMLIAkgCWINAUEAIQwMAgtBAEEAQX8gCiAJZiIG","G0EBQX4gBhsgCiAJZRsiBmsgBiAEKAIILQAAG0H/AXEiBkH/AUYgAyAFSSAGGyEMDAELIAMgBUkhDAsgAigCACIGIAdPDQIgCCAG","QQN0aisDACENAkACQAJAAkACQAJAAkAgCw0AIA0gDWENASAMRQ0NIAkgCWINBgwLCyANIA1iDQEgDA0MIAkgCWENAwwJC0EAQQBB","fyAKIA1mIgcbQQFBfiAHGyAKIA1lGyIHayAHIAQoAggtAAAbQf8BcSIHQf8BRiADIAZJIAcbIQMMAQsgAyAGSSEDCyAMIANHDQkg","CSAJYg0BIA0gDWINBwtBAEEAQX8gCSANZiIAG0EBQX4gABsgCSANZRsiAGsgACAEKAIILQAAG0H/AXEiAEH/AUYgBSAGSSAAGyEA","DAcLIA0gDWENBAsgBSAGSSEADAULIAMgB0HUhMCAABCYgICAAAALIAUgB0HkhMCAABCYgICAAAALIAYgB0HkhMCAABCYgICAAAAL","QQAhAAwBC0EBIQALIAIgASAMIABzGyEACyAAC9wDAwR/AnwBfwJAAkAgASgCACIDIAIoAgAiAigCBCIETw0AAkAgAUF8aiIFKAIA","IgYgBE8NACACKAIAIgQgBkEDdGorAwAhBwJAAkAgBCADQQN0aisDACIIIAhiDQAgByAHYg0BQQBBAEF/IAggB2YiBBtBAUF+IAQb","IAggB2UbIgRrIAQgAigCCC0AABtB/wFxIgRB/wFGIAMgBkkgBBtBAUYNAQwECyADIAZPDQMgByAHYQ0DCyABIAY2AgACQCAFIABG","DQAgA0EDdCEJA0AgBSEGAkACQAJAIAMgAigCBCIETw0AIAZBfGoiBSgCACIBIARPDQEgAigCACIEIAFBA3RqKwMAIQcCQAJAIAQg","CWorAwAiCCAIYg0AIAcgB2INBEEAQQBBfyAIIAdmIgQbQQFBfiAEGyAIIAdlGyIEayAEIAIoAggtAAAbQf8BcSIEQf8BRiADIAFJ","IAQbQQFHDQEMBAsgAyABTw0AIAcgB2INAwsgBiEFDAQLIAMgBEHUhMCAABCYgICAAAALIAEgBEHkhMCAABCYgICAAAALIAYgATYC","ACAFIABHDQALCyAFIAM2AgAPCyAGIARB5ITAgAAQmICAgAAACyADIARB1ITAgAAQmICAgAAACwunBQMIfwJ8A38gAiABQQJ0QXxq","IgRqIQUgACAEaiEGIAAgAUEBdiIHQQJ0aiIIQXxqIQkgAygCACEDAkACQAJAAkACQANAIAgoAgAiCiADKAIEIgtPDQEgACgCACIE","IAtPDQIgAygCACILIARBA3RqKwMAIQwCQAJAAkAgCyAKQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIg4bQQFB","fiAOGyANIAxlGyIOayAOIAMoAggtAAAbQf8BcSIOQf8BRiAKIARJIA4bQQFGDQEMAgtBACELIAogBE8NASAMIAxhDQELQQEhCyAK","IQQLIAIgBDYCACAGKAIAIgQgAygCBCIOTw0DIAkoAgAiCiAOTw0EIAtBAnQhDiALQQFzQQJ0IQ8gAygCACILIApBA3RqKwMAIQwC","QAJAAkAgCyAEQQN0aisDACINIA1iDQAgDCAMYg0BQQAhC0EAQQBBfyANIAxmIhAbQQFBfiAQGyANIAxlGyIQayAQIAMoAggtAAAb","Qf8BcSIQQf8BRiAEIApJIBAbQQFGDQEMAgtBACELIAQgCk8NASAMIAxhDQELQQEhCyAKIQQLIAJBBGohAiAIIA5qIQggACAPaiEA","IAUgBDYCACAFQXxqIQUgCSALQQJ0IgRrIQkgBCAGakF8aiEGIAdBf2oiBw0ACyAGQQRqIQQgCUEEaiEDAkAgAUEBcUUNACACIAAg","CCAAIANJIgobKAIANgIAIAggACADT0ECdGohCCAAIApBAnRqIQALAkAgCCAERw0AIAAgA0YNBQsQoYCAgAAACyAKIAtB1ITAgAAQ","mICAgAAACyAEIAtB5ITAgAAQmICAgAAACyAEIA5B1ITAgAAQmICAgAAACyAKIA5B5ITAgAAQmICAgAAACwuDAgICfwJ8AkACQAJA","AkAgACACQQJ0aiIEKAIAIgIgAygCACIDKAIEIgVPDQAgACABQQJ0aiIBKAIAIgAgBU8NASADKAIAIgUgAEEDdGorAwAhBgJAAkAg","BSACQQN0aisDACIHIAdiDQAgBiAGYg0EQQBBAEF/IAcgBmYiBRtBAUF+IAUbIAcgBmUbIgVrIAUgAygCCC0AABtB/wFxIgNB/wFG","IAIgAEkgAxtBAUcNAQwECyACIABPDQAgBiAGYg0DCyAAIQMgAiEADAMLIAIgBUHUhMCAABCYgICAAAALIAAgBUHkhMCAABCYgICA","AAALIAIhAwsgASADNgIAIAQgADYCAAvsAgACQCABQQlJDQAgAEEAQQMgAhCFgICAACAAQQFBByACEIWAgIAAIABBAkEFIAIQhYCA","gAAgAEEEQQggAhCFgICAACAAQQBBByACEIWAgIAAIABBAkEEIAIQhYCAgAAgAEEDQQggAhCFgICAACAAQQVBBiACEIWAgIAAIABB","AEECIAIQhYCAgAAgAEEBQQMgAhCFgICAACAAQQRBBSACEIWAgIAAIAB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BQX4g","DBsgDiANZRsiDGsgDCAKKAIILQAAG0H/AXEiDEH/AUYgByAESSAMGyEMDAELIAcgBEkhDAsgCyAAIAZBAnRqIhAoAgA2AgAgECAH","NgIAIAYgDGohBiACQQRqIAlPDQQMAAsLIAcgAUHUhMCAABCYgICAAAALIAQgAUHkhMCAABCYgICAAAALIAcgAUHUhMCAABCYgICA","AAALIAJBBGohBwsCQAJAAkACQAJAIAcgCEYNACADKAIAIQEDQCACIQwgByICKAIAIgcgASgCBCIKTw0CIAQgCk8NAyABKAIAIgog","BEEDdGorAwAhDQJAAkACQAJAIAogB0EDdGorAwAiDiAOYg0AIA0gDWENAUEBIQoMAwsgDSANYg0BQQAhCgwCC0EAQQBBfyAOIA1m","IgobQQFBfiAKGyAOIA1lGyIKayAKIAEoAggtAAAbQf8BcSIKQf8BRiAHIARJIAobIQoMAQsgByAESSEKCyAMIAAgBkECdGoiCygC","ADYCACALIAc2AgAgBiAKaiEGIAJBBGoiByAIRw0ACyAHQXxqIQILIAUgAygCACIHKAIEIgFPDQIgBCABTw0DIAcoAgAiASAEQQN0","aisDACENAkACQAJAAkAgASAFQQN0aisDACIOIA5iDQAgDSANYQ0BQQEhBAwDCyANIA1iDQFBACEEDAILQQBBAEF/IA4gDWYiARtB","AUF+IAEbIA4gDWUbIgFrIAEgBygCCC0AABtB/wFxIgdB/wFGIAUgBEkgBxshBAwBCyAFIARJIQQLIAIgACAGQQJ0aiIHKAIANgIA","IAcgBTYCACAGIARqDwsgByAKQdSEwIAAEJiAgIAAAAsgBCAKQeSEwIAAEJiAgIAAAAsgBSABQdSEwIAAEJiAgIAAAAsgBCABQeSE","wIAAEJiAgIAAAAt3AQF/AkAgAQ0AQQAPCwJAIAIgAU8NACAAKAIAIQQgACAAIAJBAnRqIgIoAgA2AgAgAiAENgIAIABBBGogAUF/","aiAAIAMQioCAgAAiAiABTw0AIAAoAgAhASAAIAAgAkECdGoiAygCADYCACADIAE2AgAgAg8LAAt3AQF/AkAgAQ0AQQAPCwJAIAIg","AU8NACAAKAIAIQQgACAAIAJBAnRqIgIoAgA2AgAgAiAENgIAIABBBGogAUF/aiAAIAMQi4CAgAAiAiABTw0AIAAoAgAhASAAIAAg","AkECdGoiAygCADYCACADIAE2AgAgAg8LAAvRAQEDfyOAgICAAEEgayIFJICAgIAAIAUgAjoADwJAIAQgASAEIAFJGyIGRQ0AIAZB","AnQhB0EAIQRBACECA0AgAyAEaiACNgIAIAJBAWohAiAHIARBBGoiBEcNAAsgBSABNgIUIAUgADYCECAFIAVBD2o2AhggBSAFQRBq","NgIcIAZBAUYNAAJAIAZBFUkNACADIAYgBUEcahCAgICAAAwBC0EEIQQDQCADIAMgBGogBUEcahCDgICAACAHIARBBGoiBEcNAAsL","IAVBIGokgICAgAALxgIBC39BACEIAkACQAJAIANBAkkNACAFRQ0AQQEgBWshCSADQX9qIQpBACEIQQAhCwNAIAggB08hDANAIAsg","CiALIApLGyENIAIgC0ECdGohAwNAIA0gC0YNAyAMDQMgC0EBaiELIAMoAgAhDiADQQRqIg8hAyAPKAIAIhAgDkkNACAPIQMgECAB","Sw0ACyAAIA5qIQ0gBSAQIA5rIg9LDQAgCSAQaiAOayERQQAhAyAELQAAQf8BcSEQA0AgDyADRg0EAkACQCANIANqIg4tAAAgEEcN","ACAFIANqIhIgD0sNByAOIAQgBRCigICAAEUNAQsgESADQQFqIgNGDQIMAQsLCyAGIAhBAnRqIAtBf2o2AgAgCEEBaiEIDAALCyAI","DwsgDyAPQfSEwIAAEJiAgIAAAAsgAyASIA9BhIXAgAAQl4CAgAAACwMAAAsIAEHQh8CAAAsbACAAIAEgAiADQQFqIAQgBSAGIAMQ","j4CAgAALFQAgACABIAJBAEcgAyABEI6AgIAACwQAQQELRwEBfyOAgICAAEEgayIDJICAgIAAIAMgATYCECADIAA2AgwgA0EBOwEc","IAMgAjYCGCADIANBDGo2AhQgA0EUahCQgICAAAALmAQBCX8CQAJAIAEgAEEDakF8cSICIABrIgNJDQAgASADayIEQQJ2IgVFDQAg","BEEDcSEGQQAhB0EAIQgCQCACIABGDQAgACACayECQQAhCCAAIQEDQCAIIAEsAABBv39KaiEIIAFBAWohASACQQFqIgINAAsLIAAg","A2ohCQJAIAZFDQAgCSAEQfz///8HcWohAEEAIQcDQCAHIAAsAABBv39KaiEHIABBAWohACAGQX9qIgYNAAsLIAcgCGohAgNAIAkh","AyAFRQ0CIAVBwAEgBUHAAUkbIgRBA3EhCgJAAkAgBEECdCIJQfAHcSIADQBBACEBDAELIAMgAGohCEEAIQEgAyEGA0BBACEAA0Ag","BiAAaigCACIHQX9zQQd2IAdBBnZyQYGChAhxIAFqIQEgAEEEaiIAQRBHDQALIAZBEGoiBiAIRw0ACwsgBSAEayEFIAMgCWohCSAB","QQh2Qf+B/AdxIAFB/4H8B3FqQYGABGxBEHYgAmohAiAKRQ0ACyAKQQJ0IQcgAyAEQfwBcUECdGohAEEAIQEDQCAAKAIAIgZBf3NB","B3YgBkEGdnJBgYKECHEgAWohASAAQQRqIQAgB0F8aiIHDQALIAFBCHZB/4H8B3EgAUH/gfwHcWpBgYAEbEEQdiACaiECDAELQQAh","AiABRQ0AA0AgAiAALAAAQb9/SmohAiAAQQFqIQAgAUF/aiIBDQALCyACC0QAAkACQCAAIAJLDQAgASACSw0BIAAgAU0NASAAIAEg","AxCegICAAAALIAAgAiADEJ+AgIAAAAsgASACIAMQoICAgAAAC2EBAX8jgICAgABBIGsiAySAgICAACADIAE2AgwgAyAANgIIIANB","gYCAgAA2AhwgA0GBgICAADYCFCADIANBCGo2AhggAyADQQxqNgIQQaiAwIAAIANBEGogAhCVgICAAAALjwUCBn8BfiOAgICAAEEQ","ayIGJICAgIAAAkACQCABDQAgBUEBaiEHIAAoAgghCEEtIQkMAQtBK0F/IAAoAggiCEGAgIABcSIBGyEJIAFBFXYgBWohBwsCQAJA","IAhBgICABHENAEEAIQIMAQsCQAJAIANBEEkNACACIAMQloCAgAAhCgwBC0EAIQogA0UNACACIQEgAyELA0AgCiABLAAAQb9/Smoh","CiABQQFqIQEgC0F/aiILDQALCyAKIAdqIQcLAkACQAJAAkACQCAHIAAvAQwiCk8NACAIQYCAgAhxDQFBASEBIAYgACAKIAdrQQEQ","moCAgAAgBigCACIHQX9GDQQgBi8BBCELIAAgCSACIAMQm4CAgAANBCAAKAIAIgMgBCAFIAAoAgQiAigCDBGAgICAAICAgIAADQRB","ACEKIAtB//8DcSELA0AgCyAKQf//A3EiAEshASALIABNDQUgCkEBaiEKIAMgByACKAIQEYGAgIAAgICAgABFDQAMBQsLIAAgCSAC","IAMQm4CAgABFDQEMAgsgACAAKQIIIgynQYCAgP95cUGwgICAAnI2AgggACAJIAIgAxCbgICAAA0BQQEhASAGQQhqIAAgCiAHa0EB","EJqAgIAAIAYoAggiC0F/Rg0CIAYvAQwhAiAAKAIAIgcgBCAFIAAoAgQiAygCDBGAgICAAICAgIAADQJBACEKIAJB//8DcSECAkAD","QCACIApB//8DcU0NAUEBIQEgCkEBaiEKIAcgCyADKAIQEYGAgIAAgICAgABFDQAMBAsLIAAgDDcCCEEAIQEMAgsgACgCACAEIAUg","ACgCBCgCDBGAgICAAICAgIAAIQEMAQtBASEBCyAGQRBqJICAgIAAIAELuAEBA38gAiEEAkACQAJAAkAgASgCCCIFQR12QQNxDgQB","AwACAQsgAkH+/wNxQQF2IQQMAgtBACEEDAELIAJBACADQf8BcRshBAsgBUH///8AcSEFIAEoAgQhAyABKAIAIQZBACEBAkACQANA","IAFB//8DcSAEQf//A3FPDQEgAUEBaiEBIAYgBSADKAIQEYGAgIAAgICAgABFDQALQX8hBQwBCyACIARrIQELIAAgATsBBCAAIAU2","AgALUgACQCABQX9GDQAgACgCACABIAAoAgQoAhARgYCAgACAgICAAEUNAEEBDwsCQCACDQBBAA8LIAAoAgAgAiADIAAoAgQoAgwR","gICAgACAgICAAAvRAwEJfwJAAkAgAEHoB08NACAAIQMMAQsgAUF8aiEEQQAhBSAAIQYCQAJAAkACQAJAA0AgBiAGQZDOAG4iA0GQ","zgBsayIHQf//A3FB5ABuIQggAiAFaiIJQXxqIAJPDQEgBCACaiIKIAhBAXQiCy0ApIXAgAA6AAAgCUF9aiACTw0CIApBAWogC0Gl","hcCAAGotAAA6AAAgCUF+aiACTw0DIApBAmogByAIQeQAbGtBAXRB/v8HcSIILQCkhcCAADoAACAJQX9qIAJPDQQgCkEDaiAIQaWF","wIAAai0AADoAACAEQXxqIQQgBUF8aiEFIAZB/6ziBEshCSADIQYgCUUNBQwACwsgCUF8aiACQZSFwIAAEJiAgIAAAAsgCUF9aiAC","QZSFwIAAEJiAgIAAAAsgCUF+aiACQZSFwIAAEJiAgIAAAAsgCUF/aiACQZSFwIAAEJiAgIAAAAsgAiAFaiECCwJAAkAgA0EKTw0A","IAMhBgwBCyABIAJBfmoiAmogAyADQf//A3FB5ABuIgZB5ABsa0H//wNxQQF0LwCkhcCAADsAAAsCQAJAIABFDQAgBkUNAQsgASAC","QX9qIgJqIAZBAXRBHnEtAKWFwIAAOgAACyACC1EBAX8jgICAgABBEGsiAiSAgICAACABQQFBAUEAIAJBBmogACgCACACQQZqQQoQ","nICAgAAiAGpBCiAAaxCZgICAACEAIAJBEGokgICAgAAgAAthAQF/I4CAgIAAQSBrIgMkgICAgAAgAyABNgIMIAMgADYCCCADQYGA","gIAANgIcIANBgYCAgAA2AhQgAyADQQxqNgIYIAMgA0EIajYCEEGAgMCAACADQRBqIAIQlYCAgAAAC2EBAX8jgICAgABBIGsiAySA","gICAACADIAE2AgwgAyAANgIIIANBgYCAgAA2AhwgA0GBgICAADYCFCADIANBDGo2AhggAyADQQhqNgIQQd+AwIAAIANBEGogAhCV","gICAAAALYQEBfyOAgICAAEEgayIDJICAgIAAIAMgATYCDCADIAA2AgggA0GBgICAADYCHCADQYGAgIAANgIUIAMgA0EMajYCGCAD","IANBCGo2AhBBmIHAgAAgA0EQaiACEJWAgIAAAAsYAEHshsCAAEGZAUG4h8CAABCVgICAAAALSgEDf0EAIQMCQCACRQ0AAkADQCAA","LQAAIgQgAS0AACIFRw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jM3MzgzOTQw","NDE0MjQzNDQ0NTQ2NDc0ODQ5NTA1MTUyNTM1NDU1NTY1NzU4NTk2MDYxNjI2MzY0NjU2NjY3Njg2OTcwNzE3MjczNzQ3NTc2Nzc3","ODc5ODA4MTgyODM4NDg1ODY4Nzg4ODk5MDkxOTI5Mzk0OTU5Njk3OTg5OXVzZXItcHJvdmlkZWQgY29tcGFyaXNvbiBmdW5jdGlv","biBkb2VzIG5vdCBjb3JyZWN0bHkgaW1wbGVtZW50IGEgdG90YWwgb3JkZXLPABAAfQAAAFYDAAAFAAAA"].join("");var yr=1e4,Ft="\0";function zn(e,t){return e==="rust"||e==="auto"&&t>=yr}var Nc=1,Mc=65536,It=null,Pn=null;function Lc(e){if(typeof atob=="function"){let n=atob(e),o=new Uint8Array(n.length);for(let r=0;r<n.length;r++)o[r]=n.charCodeAt(r);return o}let t=globalThis.Buffer;if(t)return new Uint8Array(t.from(e,"base64"));throw new Error("No base64 decoder")}function Wn(){return It?Promise.resolve(It):(Pn||(Pn=(async()=>{try{return typeof WebAssembly>"u"?null:(It=await WebAssembly.compile(Lc(hr)),It)}catch{return null}})()),Pn)}function Ir(){return It}function br(e){let t=e.isWellFormed;if(typeof t=="function")return t.call(e);for(let n=0;n<e.length;n++){let o=e.charCodeAt(n);if(o>=55296&&o<=56319){let r=e.charCodeAt(n+1);if(r>=56320&&r<=57343){n++;continue}return!1}if(o>=56320&&o<=57343)return!1}return!0}var Gt=e=>e+7&-8,Dt=class e{x;base;encoder=new TextEncoder;offsetsPtr=0;textPtr=0;textLen=0;rows=0;hasIndex=!1;freePtr;constructor(t){this.x=t,this.base=Gt(t.yk_heap_base()),this.freePtr=this.base}static create(t=It){if(!t)return null;try{let o=new WebAssembly.Instance(t,{}).exports;return o.yk_version()!==Nc?null:new e(o)}catch{return null}}ensure(t){let n=t-this.x.memory.buffer.byteLength;n>0&&this.x.memory.grow(Math.ceil(n/Mc))}setSearchTexts(t){this.hasIndex=!1,this.freePtr=this.base;try{let n=0;for(let u of t){if(!br(u))return!1;n+=u.length*3}let o=t.length,r=this.base,s=Gt(r+(o+1)*4);this.ensure(s+n);let i=this.x.memory.buffer,a=new Uint32Array(i,r,o+1),l=new Uint8Array(i,s,n),c=0;for(let u=0;u<o;u++)a[u]=c,c+=this.encoder.encodeInto(t[u],l.subarray(c)).written??0;return a[o]=c,this.offsetsPtr=r,this.textPtr=s,this.textLen=c,this.rows=o,this.freePtr=Gt(s+c),this.hasIndex=!0,!0}catch{return!1}}search(t){if(!this.hasIndex||!t||t.includes(Ft)||!br(t))return null;try{let n=this.encoder.encode(t),o=this.freePtr,r=Gt(o+n.length);this.ensure(r+this.rows*4),new Uint8Array(this.x.memory.buffer,o,n.length).set(n);let s=this.x.yk_search(this.textPtr,this.textLen,this.offsetsPtr,this.rows,o,n.length,r);return new Uint32Array(this.x.memory.buffer,r,s).slice()}catch{return null}}sortByKeys(t,n){try{let o=t.length,r=this.freePtr,s=Gt(r+o*8);return this.ensure(s+o*4),new Float64Array(this.x.memory.buffer,r,o).set(t),this.x.yk_sort(r,o,n?1:0,s),new Uint32Array(this.x.memory.buffer,s,o).slice()}catch{return null}}};function xr(e){return e>=.1?`${e<10?e.toFixed(1):Math.round(e)} ms`:"<0.1 ms"}function xt(e,t){let n=new Array(t.length);for(let o=0;o<t.length;o++)n[o]=e[t[o]];return n}function sn(e,t){let n=zn(e,t),[o,r]=zc(()=>n?Ir():null);return $c(()=>{if(!n||o)return;let s=!0;return Wn().then(i=>{s&&i&&r(i)}),()=>{s=!1}},[n,o]),Pc(()=>n&&o?Dt.create(o):null,[n,o])}function Cr(e,t){return e.map(n=>t.map(o=>String(n[o.key]??"").toLowerCase()).join(Ft))}function Wc(e,t){let n=new Float64Array(e.length),o=0;for(let r=0;r<e.length;r++){let s=e[r][t];if(s==null){n[r]=NaN;continue}if(typeof s!="number"||Number.isNaN(s))return null;n[r]=s,o++}return o?n:null}function wr(e){return e.search==="rust"||e.sort==="rust"?"rust":e.search||e.sort?"ts":null}function kr({data:e,columns:t,searchText:n,filters:o,toolColumns:r,sortKey:s,sortDirection:i,locale:a,core:l=null,searchReady:c=!1,stats:u}){let p=[...e];if(u&&(u.search=null,u.sort=null),n.trim()){let g=n.trim().toLowerCase(),A=l&&c?l.search(g):null;u&&(u.search=A?"rust":"ts"),A?p=xt(e,A):p=p.filter(f=>t.some(h=>String(f[h.key]??"").toLowerCase().includes(g)))}if(o.length&&(p=je(p,r,o)),s){if(l){let g=Wc(p,s),A=g&&l.sortByKeys(g,i!=="asc");if(A)return u&&(u.sort="rust"),xt(p,A)}u&&(u.sort="ts"),p.sort((g,A)=>{let f=g[s],h=A[s];if(f==null&&h==null)return 0;if(f==null)return 1;if(h==null)return-1;if(typeof f=="number"&&typeof h=="number")return i==="asc"?f-h:h-f;let d=String(f).localeCompare(String(h),a,{numeric:!0,sensitivity:"base"});return i==="asc"?d:-d})}return p}import{jsx as U,jsxs as pe}from"react/jsx-runtime";var Uc={"en-US":{search:"Search...",searchAria:"Search grid",rows:"rows",row:"row",loading:"Loading...",noData:"No data found.",selectRow:"Select row",pageSize:"Page size",page:"Page",of:"of",previous:"Previous",next:"Next",yes:"Yes",no:"No",sortAscending:"Sort ascending",sortDescending:"Sort descending",filtersActive:e=>`${e} filter(s) applied`,clearFilters:"Clear filters"},"te-IN":{search:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F...",searchAria:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F",rows:"\u0C35\u0C30\u0C41\u0C38\u0C32\u0C41",row:"\u0C35\u0C30\u0C41\u0C38",loading:"\u0C32\u0C4B\u0C21\u0C4D \u0C05\u0C35\u0C41\u0C24\u0C4B\u0C02\u0C26\u0C3F...",noData:"\u0C21\u0C47\u0C1F\u0C3E \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",selectRow:"\u0C35\u0C30\u0C41\u0C38\u0C28\u0C41 \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B\u0C02\u0C21\u0C3F",pageSize:"\u0C2A\u0C47\u0C1C\u0C40 \u0C2A\u0C30\u0C3F\u0C2E\u0C3E\u0C23\u0C02",page:"\u0C2A\u0C47\u0C1C\u0C40",of:"\u0C32\u0C4B",previous:"\u0C35\u0C46\u0C28\u0C41\u0C15\u0C15\u0C41",next:"\u0C2E\u0C41\u0C02\u0C26\u0C41\u0C15\u0C41",yes:"\u0C05\u0C35\u0C41\u0C28\u0C41",no:"\u0C15\u0C3E\u0C26\u0C41",sortAscending:"\u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",sortDescending:"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",filtersActive:e=>`${e} \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D(\u0C32\u0C41) \u0C35\u0C47\u0C36\u0C3E\u0C30\u0C41`,clearFilters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C02\u0C21\u0C3F"}};function Oc({size:e=20,color:t="currentColor",strokeWidth:n=2.4}){return pe("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[U("circle",{cx:"11",cy:"11",r:"6.5"}),U("path",{d:"m16 16 5 5"})]})}function Yc({size:e=18,color:t="currentColor",strokeWidth:n=2.4,label:o}){return pe("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":o?void 0:!0,"aria-label":o,role:o?"img":void 0,children:[o?U("title",{children:o}):null,U("path",{d:"m6 15 6-6 6 6"})]})}function Hc({size:e=18,color:t="currentColor",strokeWidth:n=2.4,label:o}){return pe("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":o?void 0:!0,"aria-label":o,role:o?"img":void 0,children:[o?U("title",{children:o}):null,U("path",{d:"m6 9 6 6 6-6"})]})}function Jc({size:e=20,color:t="currentColor",strokeWidth:n=2.4}){return U("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:U("path",{d:"m15 18-6-6 6-6"})})}function qc({size:e=20,color:t="currentColor",strokeWidth:n=2.4}){return U("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:U("path",{d:"m9 18 6-6-6-6"})})}function vr({size:e=18,color:t="currentColor",strokeWidth:n=2.4}){return U("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:n,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:U("path",{d:"m5 12 4 4L19 6"})})}function Kc({data:e,columns:t,rowKey:n="id",view:o="auto",mobileBreakpoint:r=768,theme:s="default",locale:i="en-US",ai:a=!1,search:l=!0,selectable:c=!1,selectedKeys:u=[],onSelectionChange:p,pagination:g,loading:A=!1,highlightIds:f=[],highlightColor:h="#fff3a3",autoScrollToHighlight:d=!1,onRowClick:b,onSortChange:I,empty:m,className:x="",inputLanguage:y,toolName:k="yuktai_grid",toolDescriptions:v,webmcp:R=!1,onWebMCPStatusChange:z,onAgentResult:N,customRules:T=[],engine:S="ts",showSearchTime:C=!1,onSearchTime:Y}){let K=i==="te-IN"?"te-IN":"en-US",M=Uc[K],re=a===!0||typeof a=="object"&&a!==null,ce=g!==!1&&g!==void 0,F=typeof g=="object"?g.pageSize??20:20,J=typeof g=="object"&&g.sizeOptions&&g.sizeOptions.length>0?g.sizeOptions:[10,20,50,100],[D,W]=Xe(""),[V,L]=Xe(1),[ie,ve]=Xe(F),[Qe,P]=Xe(),[ue,he]=Xe("asc"),[Ee,Se]=Xe(!1),[ge,qe]=Xe([]),[nt,dt]=Xe([]),ze=ct(()=>lt(t.map(w=>({key:String(w.key),label:w.label,type:w.type}))),[t]);Nt(()=>{ve(F),L(1)},[F]),Nt(()=>{let w=()=>{Se(window.innerWidth<=r)};return w(),window.addEventListener("resize",w),()=>{window.removeEventListener("resize",w)}},[r]);let We=sn(S,e.length),ot=ct(()=>We?We.setSearchTexts(Cr(e,t)):!1,[We,e,t]),ye=ct(()=>{let w={search:null,sort:null},$=typeof performance<"u"?performance.now():Date.now(),j=kr({data:e,columns:t,searchText:D,filters:ge,toolColumns:ze,sortKey:Qe,sortDirection:ue,locale:i,core:We,searchReady:ot,stats:w}),X=(typeof performance<"u"?performance.now():Date.now())-$;return{rows:j,ms:X,engine:wr(w)}},[e,t,D,ge,ze,Qe,ue,i,We,ot]),Ie=ye.rows;Nt(()=>{!Y||!ye.engine||Y({query:D.trim(),ms:ye.ms,rows:ye.rows.length,engine:ye.engine})},[ye]);let He=ce?Math.max(1,Math.ceil(Ie.length/ie)):1;Nt(()=>{V>He&&L(He)},[V,He]);let B=ct(()=>{let w=[...f.map(String),...nt];return Array.from(new Set(w))},[f,nt]);Nt(()=>{if(!d)return;let w=B[0];if(w==null)return;let $=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(String(w)):String(w).replace(/["\\]/g,"\\$&");document.querySelector(`[data-yuktai-row-id="${$}"]`)?.scrollIntoView({behavior:"smooth",block:"center"})},[B,d,V]);let te=ct(()=>{if(!ce)return Ie;let w=(V-1)*ie;return Ie.slice(w,w+ie)},[Ie,ce,V,ie]),Ue=o==="card"||o==="auto"&&Ee,kt=w=>String(w[n]??""),fn=w=>u.some($=>String($)===w),ao=w=>B.some($=>String($)===w),lo=w=>{if(!c)return;let $=kt(w),j=fn($)?u.filter(X=>String(X)!==$):[...u,$];p?.(j)},Zr=w=>{if(w.sortable===!1)return;let $=String(w.key),j=Qe===$&&ue==="asc"?"desc":"asc";P($),he(j),L(1),I?.({key:$,direction:j})},ei=w=>{W(w),L(1)},ti=(w,$)=>{let j=t.find(X=>String(X.key)===w||X.label.toLowerCase()===w.toLowerCase());j&&(P(String(j.key)),he($),L(1),I?.({key:String(j.key),direction:$}))},mn=K==="te-IN"?"te":"en",co=Un(w=>{w?(P(w.key),he(w.direction)):(P(void 0),he("asc")),L(1),I?.(w)},[I]),uo=Un(w=>{qe(w),L(1)},[]),go=Un(w=>{if(dt(w),ce&&w.length){let $=Ie.findIndex(j=>String(j[n]??"")===w[0]);$>=0&&L(Math.floor($/ie)+1)}},[ce,Ie,n,ie]),hn=ct(()=>Qt({data:e,columns:ze,rowKey:String(n),locale:mn,filters:ge,onHighlightRows:go,onFiltersChange:uo,onSortChange:co,onOpenRow:b?w=>{let $=Ie.findIndex(X=>String(X[n]??"")===w),j=$>=0?Ie[$]:e.find(X=>String(X[n]??"")===w);j&&b(j,Math.max($,0))}:void 0,onSelectRow:c&&p?w=>{u.some($=>String($)===w)||p([...u.map(String),w])}:void 0},{name:k,descriptions:v}),[e,ze,n,mn,ge,go,uo,co,b,Ie,c,p,u,k,v]),Lt=on({tools:hn,data:e,locale:mn,columns:ze,rowKey:String(n),customRules:T,onResult:N}),Ao=ct(()=>hn.map(w=>({...w,execute:$=>Lt.executeTool(w.name,$)})),[hn,Lt.executeTool]),ni=()=>{qe([]),L(1)},po=(w,$,j)=>{if($.render)return $.render(w[$.key],w,j);let X=w[$.key];if(X==null)return"";if($.type==="date"){let gt=new Date(String(X));if(!Number.isNaN(gt.getTime()))return gt.toLocaleDateString(i)}return $.type==="boolean"?X?M.yes:M.no:String(X)},Z=s==="dark",fo={width:"100%",overflow:"hidden",border:s==="high-contrast"?"2px solid #000000":Z?"1px solid #334155":"1px solid #e2e8f0",borderRadius:12,background:Z?"#0f172a":"#ffffff",color:Z?"#f8fafc":"#0f172a",fontFamily:s==="dyslexia"?"Arial, sans-serif":void 0},oi={padding:12,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap",borderBottom:Z?"1px solid #334155":"1px solid #e2e8f0"},mo=w=>({width:40,height:40,minWidth:40,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:8,border:Z?"1px solid #475569":"1px solid #cbd5e1",background:w?Z?"#1e293b":"#f8fafc":Z?"#1e293b":"#ffffff",color:w?"#94a3b8":Z?"#f8fafc":"#0f172a",cursor:w?"not-allowed":"pointer",opacity:w?.55:1});if(A)return pe("div",{className:x,style:fo,children:[R&&U(rn,{tools:Ao,onStatusChange:z}),U("div",{style:{padding:32,textAlign:"center"},children:M.loading})]});let ri=t.map(w=>({key:String(w.key),label:w.label,type:w.type==="number"?"number":w.type==="date"?"date":"text"}));return pe("div",{className:x,style:fo,children:[R&&U(rn,{tools:Ao,onStatusChange:z}),(l||re||ge.length>0)&&pe("div",{style:oi,children:[l&&pe("div",{style:{position:"relative",width:"100%",maxWidth:420},children:[U("div",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:Z?"#cbd5e1":"#64748b",pointerEvents:"none"},children:U(Oc,{size:19})}),U("input",{value:D,onChange:w=>{W(w.target.value),L(1)},placeholder:M.search,"aria-label":M.searchAria,style:{width:"100%",padding:"10px 12px 10px 40px",borderRadius:8,border:Z?"1px solid #475569":"1px solid #cbd5e1",background:Z?"#1e293b":"#ffffff",color:Z?"#ffffff":"#0f172a",outline:"none",boxSizing:"border-box"}})]}),ge.length>0&&pe("button",{type:"button",onClick:ni,title:M.clearFilters,style:{padding:"6px 10px",borderRadius:999,border:Z?"1px solid #475569":"1px solid #cbd5e1",background:Z?"#1e293b":"#f1f5f9",color:"inherit",fontSize:12,cursor:"pointer"},children:[M.filtersActive(ge.length)," \u2715"]}),pe("div",{style:{marginLeft:"auto",fontSize:13,opacity:.7,whiteSpace:"nowrap"},children:[Ie.length," ",Ie.length===1?M.row:M.rows,C&&ye.engine&&pe("span",{title:ye.engine==="rust"?"Rust (WebAssembly)":"TypeScript",children:[" \xB7 ",xr(ye.ms)," \xB7 ",ye.engine==="rust"?"Rust":"TS"]})]}),re&&U(Nn,{data:e,columns:ri,onSearch:ei,onSort:ti,theme:Z?"dark":"light",language:K,inputLanguage:y??K,agent:{ask:Lt.ask,loading:Lt.loading},embedded:!0})]}),Ie.length===0?U("div",{style:{padding:40,textAlign:"center",opacity:.7},children:m??M.noData}):Ue?U("div",{style:{display:"grid",gap:12,padding:12},children:te.map((w,$)=>{let j=kt(w),X=fn(j),gt=ao(j);return pe("div",{"data-yuktai-row-id":j,onClick:()=>b?.(w,$),style:{padding:14,borderRadius:10,border:Z?"1px solid #334155":"1px solid #e2e8f0",background:gt?h:X?Z?"#1e3a5f":"#eff6ff":Z?"#1e293b":"#ffffff",cursor:b?"pointer":"default"},children:[c&&U("button",{type:"button",onClick:Be=>{Be.stopPropagation(),lo(w)},"aria-label":`${M.selectRow} ${j}`,"aria-pressed":X,style:{width:32,height:32,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,marginBottom:10,borderRadius:7,border:X?"1px solid #2563eb":"1px solid #cbd5e1",background:X?"#2563eb":"transparent",color:X?"#ffffff":"currentColor",cursor:"pointer"},children:X&&U(vr,{size:17})}),t.map(Be=>pe("div",{style:{display:"flex",gap:8,padding:"5px 0",alignItems:"flex-start"},children:[U("strong",{style:{minWidth:100,opacity:.7},children:Be.label}),U("span",{children:po(w,Be,$)})]},String(Be.key)))]},j)})}):U("div",{style:{width:"100%",overflowX:"auto"},children:pe("table",{style:{width:"100%",borderCollapse:"collapse"},children:[U("thead",{children:pe("tr",{children:[c&&U("th",{style:{padding:10,borderBottom:Z?"1px solid #334155":"1px solid #e2e8f0",width:52}}),t.filter(w=>!(Ee&&w.hiddenOnMobile)).map(w=>{let $=Qe===String(w.key);return U("th",{onClick:()=>Zr(w),style:{padding:10,textAlign:w.align??"left",borderBottom:Z?"1px solid #334155":"1px solid #e2e8f0",whiteSpace:"nowrap",cursor:w.sortable===!1?"default":"pointer",width:w.width,userSelect:"none"},children:pe("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[w.label,$&&(ue==="asc"?U(Yc,{size:17,label:M.sortAscending}):U(Hc,{size:17,label:M.sortDescending}))]})},String(w.key))})]})}),U("tbody",{children:te.map((w,$)=>{let j=kt(w),X=fn(j),gt=ao(j);return pe("tr",{"data-yuktai-row-id":j,onClick:()=>b?.(w,$),style:{background:gt?h:X?Z?"#1e3a5f":"#eff6ff":"transparent",cursor:b?"pointer":"default"},children:[c&&U("td",{style:{padding:10,borderBottom:Z?"1px solid #334155":"1px solid #e2e8f0"},children:U("button",{type:"button",onClick:Be=>{Be.stopPropagation(),lo(w)},"aria-label":`${M.selectRow} ${j}`,"aria-pressed":X,style:{width:28,height:28,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:6,border:X?"1px solid #2563eb":Z?"1px solid #64748b":"1px solid #cbd5e1",background:X?"#2563eb":"transparent",color:X?"#ffffff":"currentColor",cursor:"pointer"},children:X&&U(vr,{size:16})})}),t.filter(Be=>!(Ee&&Be.hiddenOnMobile)).map(Be=>U("td",{style:{padding:10,textAlign:Be.align??"left",borderBottom:Z?"1px solid #334155":"1px solid #e2e8f0"},children:po(w,Be,$)},String(Be.key)))]},j)})})]})}),ce&&pe("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",padding:12,borderTop:Z?"1px solid #334155":"1px solid #e2e8f0"},children:[pe("span",{style:{fontSize:13,opacity:.7},children:[M.page," ",V," ",M.of," ",He]}),pe("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[typeof g=="object"&&g.showSizeChanger&&U("select",{value:ie,onChange:w=>{let $=Number(w.target.value);!Number.isFinite($)||$<=0||(ve($),L(1))},"aria-label":M.pageSize,style:{minHeight:40,padding:"7px 10px",borderRadius:8,border:Z?"1px solid #475569":"1px solid #cbd5e1",background:Z?"#1e293b":"#ffffff",color:Z?"#ffffff":"#0f172a"},children:J.map(w=>U("option",{value:w,children:w},w))}),U("button",{type:"button",disabled:V<=1,onClick:()=>L(w=>Math.max(1,w-1)),"aria-label":M.previous,title:M.previous,style:mo(V<=1),children:U(Jc,{size:20})}),U("button",{type:"button",disabled:V>=He,onClick:()=>L(w=>Math.min(He,w+1)),"aria-label":M.next,title:M.next,style:mo(V>=He),children:U(qc,{size:20})})]})]})]})}import{useState as Ct,useMemo as ut,useCallback as $e,useEffect as On}from"react";function Er(e){return e===!1?Number.MAX_SAFE_INTEGER:e===!0||e===void 0?10:e.pageSize??10}function Yn(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function an(e){return e==null||typeof e=="string"&&e.trim()===""}function Hn(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let n=Number(t);return Number.isFinite(n)?n:null}function Jn(e){let t=e instanceof Date?e.getTime():new Date(String(e)).getTime();return Number.isFinite(t)?t:null}function _c(e,t,n,o){if(n==="number"||typeof e=="number"&&typeof t=="number"){let r=Hn(e),s=Hn(t);if(r!==null&&s!==null)return r-s}if(n==="date"||e instanceof Date&&t instanceof Date){let r=Jn(e),s=Jn(t);if(r!==null&&s!==null)return r-s}return typeof e=="boolean"&&typeof t=="boolean"?e===t?0:e?1:-1:String(e).localeCompare(String(t),o,{sensitivity:"base",numeric:!0})}var Ze=()=>typeof performance<"u"?performance.now():Date.now();function jc(e,t){return e.map(n=>t.map(o=>{let r=n[o.key];return r==null?"":Yn(r)}).join(Ft))}function Vc(e,t,n){let o=!1,r=!0,s=!0,i=0;for(let c of e){let u=c[t];an(u)||(i++,typeof u=="number"?o=!0:r=!1,u instanceof Date||(s=!1))}if(i===0)return null;let a=null;if(n==="number"||r?a=Hn:(n==="date"&&!o||s)&&(a=Jn),!a)return null;let l=new Float64Array(e.length);for(let c=0;c<e.length;c++){let u=e[c][t];if(an(u)){l[c]=NaN;continue}let p=a(u);if(p===null)return null;l[c]=p}return l}function Xc(e){let{data:t,columns:n,pagination:o=!0,mobileBreakpoint:r=768,locale:s,initialFilters:i=[],engine:a="ts"}=e,l=sn(a,t.length),[c,u]=Ct(null),[p,g]=Ct(""),[A,f]=Ct(i),[h,d]=Ct(1),[b,I]=Ct(Er(o)),[m,x]=Ct(!1),y=Er(o);On(()=>{I(y),d(1)},[y]),On(()=>{if(typeof window>"u")return;let P=()=>{x(window.innerWidth<=r)};return P(),window.addEventListener("resize",P),()=>window.removeEventListener("resize",P)},[r]);let k=ut(()=>lt(n.map(P=>({key:String(P.key),label:P.label,type:P.type}))),[n]),v=$e(P=>{u(ue=>!ue||ue.key!==P?{key:P,direction:"asc"}:ue.direction==="asc"?{key:P,direction:"desc"}:null),d(1)},[]),R=$e(P=>{u(P&&P.direction?P:null),d(1)},[]),z=$e(()=>{u(null),d(1)},[]),N=$e(P=>{g(P),d(1)},[]),T=$e(P=>{f(P),d(1)},[]),S=$e(P=>{f(ue=>[...ue.filter(he=>he.key!==P.key),P]),d(1)},[]),C=$e(P=>{f(ue=>ue.filter(he=>he.key!==P)),d(1)},[]),Y=$e(()=>{f([]),d(1)},[]),K=$e(P=>{I(Math.max(1,Math.floor(P)||1)),d(1)},[]),M=ut(()=>l?l.setSearchTexts(jc(t,n)):!1,[l,t,n]),re=ut(()=>{let P=Ze(),ue=Yn(p);if(!ue)return{rows:t,ms:0,engine:null};if(l&&M){let Ee=l.search(ue);if(Ee)return{rows:xt(t,Ee),ms:Ze()-P,engine:"rust"}}return{rows:t.filter(Ee=>n.some(Se=>{let ge=Ee[Se.key];return ge==null?!1:Yn(ge).includes(ue)})),ms:Ze()-P,engine:"ts"}},[t,p,n,l,M]),ce=re.rows,F=ut(()=>{let P=Ze();return{rows:je(ce,k,A),ms:Ze()-P}},[ce,k,A]),J=F.rows,D=ut(()=>{if(!c||!c.direction)return{rows:J,ms:0,engine:null};let P=Ze(),ue=n.find(Se=>String(Se.key)===c.key),he=c.direction==="desc"?-1:1;if(l){let Se=Vc(J,c.key,ue?.type),ge=Se&&l.sortByKeys(Se,he===-1);if(ge)return{rows:xt(J,ge),ms:Ze()-P,engine:"rust"}}return{rows:[...J].sort((Se,ge)=>{let qe=Se[c.key],nt=ge[c.key],dt=an(qe),ze=an(nt);return dt&&ze?0:dt?1:ze?-1:he*_c(qe,nt,ue?.type,s)}),ms:Ze()-P,engine:"ts"}},[J,c,n,s,l]),W=D.rows,V=ut(()=>!re.engine&&!D.engine?null:{query:p.trim(),ms:re.ms+F.ms+D.ms,rows:J.length,engine:re.engine==="rust"||D.engine==="rust"?"rust":"ts"},[re,F,D,p,J.length]),L=Math.max(1,Math.ceil(W.length/b)),ie=ut(()=>{if(o===!1)return W;let P=(h-1)*b;return W.slice(P,P+b)},[W,h,b,o]);On(()=>{h>L&&d(L)},[h,L]);let ve=$e(P=>d(Math.min(Math.max(1,Math.floor(P)||1),L)),[L]),Qe=$e(()=>{u(null),g(""),f([]),d(1)},[]);return{displayedData:ie,rows:W,searchTime:V,totalCount:t.length,filteredCount:W.length,sort:c,toggleSort:v,setSort:R,clearSort:z,searchQuery:p,setSearchQuery:N,filters:A,setFilters:T,setFilter:S,removeFilter:C,clearFilters:Y,page:h,pageSize:b,totalPages:L,setPage:ve,setPageSize:K,isMobile:m,reset:Qe}}var ln={"html-lang":{title:"Page language is set",wcag:"3.1.1",severity:"serious",why:"Screen readers pick their voice and pronunciation from the page language. Without it, Telugu or Hindi text may be read with English rules."},"page-title":{title:"Page has a title",wcag:"2.4.2",severity:"serious",why:"The title is the first thing announced and the name shown on browser tabs and bookmarks."},"image-alt":{title:"Images have alternative text",wcag:"1.1.1",severity:"critical",why:'People who cannot see the image get no information from it unless alt text describes it (or alt="" marks it as decorative).'},"heading-order":{title:"Headings follow a logical order",wcag:"1.3.1",severity:"moderate",why:"Many screen-reader users jump between headings. Skipped levels make the page outline confusing."},"single-h1":{title:"Page has one main heading",wcag:"best practice",severity:"minor",why:"A single h1 tells everyone what the page is about."},"landmark-main":{title:"Main content landmark exists",wcag:"1.3.1 / 2.4.1",severity:"moderate",why:"A <main> region lets keyboard and screen-reader users skip straight past menus to the content."},"form-label":{title:"Form fields have labels",wcag:"1.3.1 / 4.1.2",severity:"critical",why:'Without a label, a screen reader just says "edit text" and the user has to guess what to type.'},"button-name":{title:"Buttons have names",wcag:"4.1.2",severity:"critical",why:'An icon-only button with no name is announced as just "button", so its purpose is unknown.'},"link-name":{title:"Links have names",wcag:"2.4.4",severity:"serious",why:"Links are often read out of context in a list. An empty link gives no clue where it goes."},"color-contrast":{title:"Text has enough contrast",wcag:"1.4.3",severity:"serious",why:"Low-contrast text is hard to read for older users, people with low vision, and anyone outdoors on a phone."},"positive-tabindex":{title:"No positive tabindex",wcag:"2.4.3",severity:"moderate",why:"tabindex greater than 0 forces a custom keyboard order that usually doesn't match the visual order."},"keyboard-access":{title:"Clickable things work with a keyboard",wcag:"2.1.1",severity:"critical",why:"A div or span with a click handler can't be reached or activated with Tab and Enter, locking out keyboard users."},"duplicate-id":{title:"IDs are unique",wcag:"best practice",severity:"minor",why:"Labels and ARIA references point at ids. Duplicates make them point at the wrong element."},"form-error":{title:"Errors are linked to their fields",wcag:"3.3.1",severity:"serious",why:"When a field is marked invalid, the error message must be connected to it so it's announced together with the field."},"target-size":{title:"Touch targets are large enough",wcag:"2.5.8",severity:"moderate",why:"Small targets are hard to tap for people with tremors, seniors and everyone on mobile."}},Zc={critical:10,serious:5,moderate:2,minor:1};function et(e={}){let t=Te(e.root),n=new Set(e.skip??[]),o=[],r={},s=t?rt(t)?t:t.ownerDocument:null,i=(a,l,c,u,p=!1)=>{if(n.has(a))return;let g=ln[a],A=r[a]=(r[a]??0)+1;o.push({id:`${a}-${A}`,rule:a,severity:g.severity,wcag:g.wcag,message:c,why:g.why,fix:u,selector:l?Oe(l):"document",snippet:l?me(l.outerHTML,120):"",autoFixable:p,element:l??void 0})};if(t&&s){s.documentElement.getAttribute("lang")||i("html-lang",s.documentElement,"The <html> element has no lang attribute.",'Add lang to <html>, e.g. <html lang="te"> or "en".',!0),s.title.trim()||i("page-title",null,"The page has no <title>.","Add a short, descriptive <title> that names this page.");for(let d of O(t,"img"))if(!(d.getAttribute("role")==="presentation"||d.getAttribute("role")==="none")&&!d.hasAttribute("alt")&&!d.getAttribute("aria-label")&&!d.getAttribute("aria-labelledby")){let b=d.getAttribute("title");i("image-alt",d,`Image has no alt text${d.getAttribute("src")?` (${me(d.getAttribute("src")??"",40)})`:""}.`,b?`Use the title as alt: alt="${me(b,40)}".`:'Describe the image in alt, or use alt="" if it is purely decorative.',!!b)}let a=O(t,"h1,h2,h3,h4,h5,h6"),l=0;for(let d of a){let b=Number(d.tagName[1]);l>0&&b>l+1&&i("heading-order",d,`Heading jumps from h${l} to h${b}: "${me(d.textContent??"",40)}".`,`Change it to h${l+1}, or add the missing level above it.`),l=b}let c=a.filter(d=>d.tagName==="H1");c.length===0?i("single-h1",null,"The page has no h1.","Add one h1 that names the page."):c.length>1&&i("single-h1",c[1],`The page has ${c.length} h1 headings.`,"Keep one h1; turn the others into h2."),t.querySelectorAll("main,[role='main']").length===0&&i("landmark-main",null,"No <main> landmark found.","Wrap the primary content in <main>.");let u=O(t,"input,select,textarea").filter(d=>{let b=(d.getAttribute("type")??"text").toLowerCase();return!["hidden","submit","button","reset","image"].includes(b)});for(let d of u){if(!De(d)){let b=d.getAttribute("placeholder")||d.getAttribute("name");i("form-label",d,`Form field has no label${b?` (placeholder/name: "${me(b,30)}")`:""}.`,b?`Add a visible <label>. Quick fix: aria-label="${me(b,30)}".`:"Add a visible <label for=\u2026> describing what to enter.",!!b)}d.getAttribute("aria-invalid")==="true"&&(d.getAttribute("aria-describedby")||d.getAttribute("aria-errormessage")||i("form-error",d,"Field is marked invalid but no error message is linked to it.","Put the error text in an element with an id and point aria-describedby at it."))}for(let d of O(t,"button,[role='button'],input[type='submit'],input[type='button']"))if(!De(d)){let b=d.getAttribute("title");i("button-name",d,"Button has no accessible name.",b?`Use the title as the name: aria-label="${b}".`:"Add visible text or an aria-label that says what the button does.",!!b)}for(let d of O(t,"a[href]"))if(!De(d)){let b=d.getAttribute("title");i("link-name",d,`Link has no text (${me(d.getAttribute("href")??"",40)}).`,b?`Use the title as the name: aria-label="${b}".`:"Add link text that says where it goes.",!!b)}for(let d of O(t,"[tabindex]"))Number(d.getAttribute("tabindex"))>0&&i("positive-tabindex",d,`tabindex="${d.getAttribute("tabindex")}" overrides the natural tab order.`,'Use tabindex="0" and fix the order in the HTML instead.',!0);let p="a[href],button,input,select,textarea,summary";for(let d of O(t,"[onclick],[role='button'],[role='link']"))d.matches(p)||d.hasAttribute("tabindex")||i("keyboard-access",d,`<${d.tagName.toLowerCase()}> is clickable but can't be reached with the keyboard.`,'Use a real <button>, or add tabindex="0", a role and Enter/Space key handling.',!0);let g=new Map;for(let d of Array.from(t.querySelectorAll("[id]")))d.closest("[data-yuktai-panel]")||g.set(d.id,(g.get(d.id)??0)+1);for(let[d,b]of g)b>1&&i("duplicate-id",t.querySelector(`[id="${d.replace(/"/g,'\\"')}"]`),`id="${d}" is used ${b} times.`,"Give each element a unique id.");let A=e.maxContrastChecks??600,f=0;for(let d of O(t,"body *")){if(f>=A)break;if(!vt(d)||["SCRIPT","STYLE","NOSCRIPT","OPTION"].includes(d.tagName))continue;f++;let b=bn(window.getComputedStyle(d).color),I=yo(d);if(!b||!I)continue;let m=yn(b,I),x=Io(d)?3:4.5;m<x&&i("color-contrast",d,`Contrast ${m}:1 is below ${x}:1 for "${me(d.textContent??"",30)}".`,`Darken the text or lighten the background until the ratio is at least ${x}:1.`)}let h=e.minTargetSize??24;for(let d of O(t,zt)){let b=d.getBoundingClientRect();b.width===0&&b.height===0||d.tagName==="A"&&d.closest("p,li,td")||(b.width<h||b.height<h)&&i("target-size",d,`Target is ${Math.round(b.width)}\xD7${Math.round(b.height)}px (minimum ${h}\xD7${h}).`,`Increase padding so it's at least ${h}\xD7${h}px (44\xD744 is better for seniors).`)}}return eu(o,s,n)}function eu(e,t,n){let o=Object.keys(ln).filter(l=>!n.has(l)).map(l=>{let c=e.filter(u=>u.rule===l).length;return{rule:l,title:ln[l].title,passed:c===0,issueCount:c}}),r=0;for(let l of o){let c=Zc[ln[l.rule].severity];r+=Math.min(25,l.issueCount*c)}let s=Math.max(0,100-r),i=o.filter(l=>!l.passed),a=e.filter(l=>l.severity==="critical").length;return{url:t?.location?.href??"",title:t?.title??"",generatedAt:new Date().toISOString(),score:s,passed:a===0&&s>=80,checks:o,issues:e,summary:e.length===0?`All ${o.length} checks passed.`:`${o.length-i.length} of ${o.length} checks passed. ${e.length} issue(s) found, ${a} critical. Score ${s}/100.`}}function Sr(e){let t=["# Accessibility QA report","",`- Page: ${e.title||"(untitled)"} ${e.url}`,`- Generated: ${e.generatedAt}`,`- Score: **${e.score}/100** \u2014 ${e.passed?"PASS":"FAIL"}`,"",e.summary,"","## Checks","","| Check | Result | Issues |","|---|---|---|",...e.checks.map(n=>`| ${n.title} | ${n.passed?"\u2705 Pass":"\u274C Fail"} | ${n.issueCount} |`)];if(e.issues.length){t.push("","## Issues","");for(let n of e.issues)t.push(`### ${n.id} \xB7 ${n.severity} \xB7 WCAG ${n.wcag}`,"",`- **Problem:** ${n.message}`,`- **Why it matters:** ${n.why}`,`- **Fix:** ${n.fix}`,`- **Where:** \`${n.selector}\``,"")}return t.join(`
|
|
396
|
-
`)}function
|
|
397
|
-
`):`No issue "${
|
|
398
|
-
`),
|
|
399
|
-
${
|
|
400
|
-
Missing landmarks: ${
|
|
401
|
-
`):"There are no forms on this page.",targets:r.flatMap(s=>s.findings.map(i=>i.selector).filter(i=>!!i)),suggestions:r.flatMap(s=>s.findings.slice(0,3).map(i=>i.suggestion))}}case"links":case"counts":{let r=n.counts;return{intent:o,answer:`${r.links} links, ${r.buttons} buttons, ${r.fields} form fields in ${r.forms} form(s), ${r.images} images, ${r.tables} tables.`,targets:[],suggestions:[]}}case"purpose":case"unknown":{let r=n.purpose;if(t.summarize)try{let i=Te(t.root),a=Ke((i&&rt(i)?i.body:i)?.textContent).slice(0,4e3);r=await t.summarize(a)||r}catch{}let s=[];return n.unlabeledFields.length&&s.push(`${n.unlabeledFields.length} form field(s) need labels.`),n.imagesWithoutAlt.length&&s.push(`${n.imagesWithoutAlt.length} image(s) need alt text.`),{intent:o,answer:r,targets:[],suggestions:s}}}}var Ye=e=>String(e??"").normalize("NFC").toLowerCase().replace(/\s+/g," ").trim(),du=new Set("show me find list get give which who what all the a an rows row records record entries with where that are is have has having and or of for in on to please display only those whose any".split(" "));function qn(e){let t=Ye(e).replace(/(₹|rs\.?|inr|\$|usd|€|£)/g," ").match(/(-?\d[\d,]*(?:\.\d+)?|-?\.\d+)\s*(k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion)?(?![\p{L}])/u);if(!t)return null;let n=Number(t[1].replace(/,/g,""));if(!Number.isFinite(n))return null;let o=t[2]??"",r=/^k|thousand/.test(o)?1e3:/^la/.test(o)?1e5:/^(crore|cr)/.test(o)?1e7:/^(m|mn|million)$/.test(o)?1e6:/^(bn|billion)$/.test(o)?1e9:1;return n*r}function Dr(e){let t=new Set([Ye(e.label),Ye(e.key),Ye(e.key.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2"))]);for(let n of Array.from(t))n.endsWith("s")?t.add(n.slice(0,-1)):t.add(`${n}s`);return Array.from(t).filter(n=>n.length>1)}function Pe(e,t,n){let o=` ${Ye(e)} `,r;for(let s of t)if(!(n&&(s.type??"text")!==n))for(let i of Dr(s)){let a=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${a}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(o)&&(!r||i.length>r.length)&&(r={column:s,length:i.length})}return r?.column}var gu=/amount|balance|total|price|salary|value|due|revenue|cost|fee|sales|outstanding|paid/i;function Kn(e){let t=e.filter(n=>n.type==="number");return t.find(n=>gu.test(`${n.key} ${n.label}`))??t[0]}var un=/(>=|=>|>|\bover\b|\babove\b|\bmore than\b|\bgreater than\b|\bexceeds?\b|\bexceeding\b|\bhigher than\b|\bat least\b|\bminimum\b|\bmin\b|కంటే ఎక్కువ)/,_n=/(<=|=<|<|\bunder\b|\bbelow\b|\bless than\b|\blower than\b|\bat most\b|\bmaximum\b|\bmax\b|\bup to\b|కంటే తక్కువ)/,Rr=/\b(after|since|from)\b/,Au=/\b(before|until|till)\b/,pu="(?:\\s*(?:k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion))?",jn=`(?:\u20B9|rs\\.?\\s*|\\$)?\\s*-?\\d[\\d,]*(?:\\.\\d+)?${pu}`;function wt(e,t,n={}){let o={filters:[],search:[],sort:null,limit:null,notes:[],explanation:""},r=Ye(e).replace(/[?!]+/g," ").replace(/\.(?!\d)/g," ").trim(),s=[],i=r.match(/\b(top|first|bottom|last|lowest|highest)\s+(\d+)\b/);i&&(o.limit=Number(i[2]),r=r.replace(i[0],` ${i[1]} `));let a=r.match(/\b(?:sort(?:ed)?|order(?:ed)?)\s+by\s+([\p{L}\p{M}\p{N} _]+?)(?:\s+(asc|ascending|desc|descending))?(?=$|,|\band\b|\bthen\b)/u),l=r.match(/\b(top|highest|largest|biggest|most|bottom|lowest|smallest|least)\b(?:\s+\d+)?\s+(?:by\s+)?([\p{L}\p{M}\p{N} _]+)/u);if(a){let f=Pe(a[1],t);f&&(o.sort={key:f.key,direction:/^desc/.test(a[2]??"")?"desc":"asc"},r=r.replace(a[0]," "))}else if(l){let f=Pe(l[2],t,"number")??Pe(l[2],t)??Kn(t);if(f){let h=/top|highest|largest|biggest|most/.test(l[1]);o.sort={key:f.key,direction:h?"desc":"asc"},r=r.replace(new RegExp(`\\b${l[1]}\\b`)," "),!i&&/top|bottom/.test(l[1])&&(o.limit=10)}}let c=new RegExp(`\\bbetween\\s+(${jn}|\\d{4}-\\d{2}-\\d{2})\\s+(?:and|to|-)\\s+(${jn}|\\d{4}-\\d{2}-\\d{2})`,"u"),u;for(;u=r.match(c);){let f=r.slice(Math.max(0,(u.index??0)-40),u.index??0),h=/\d{4}-\d{2}-\d{2}/.test(u[1]),d=h?Pe(f,t,"date")??t.find(m=>m.type==="date"):Pe(f,t,"number")??Kn(t),b=h?u[1]:qn(u[1]),I=h?u[2]:qn(u[2]);d&&b!==null&&I!==null&&(o.filters.push({key:d.key,operator:"between",value:[b,I]}),s.push(`${d.label} between ${u[1]} and ${u[2]}`)),r=r.replace(u[0]," ")}let p=r.split(/\s*(?:(?<!\d),|,(?!\d)|;|\band\b|(?<!(?:starts?|starting|ends?|ending|begins?|beginning)\s)\bwith\b|\bwhere\b|\bwho\b|\bthat\b|&|మరియు)\s*/u).map(f=>f.trim()).filter(Boolean),g=t.filter(f=>(f.type??"text")==="text"),A=new Map;for(let f of g){let h=new Set;for(let d of(n.data??[]).slice(0,5e3)){let b=Ye(d[f.key]);if(b&&b.length<=40&&h.add(b),h.size>300)break}h.size&&h.size<=300&&A.set(f.key,h)}for(let f of p){let h=o.filters.length,d=Pe(f,t),b=f.match(new RegExp(jn,"u")),I=f.match(/\d{4}-\d{2}-\d{2}/);if(I&&(Rr.test(f)||Au.test(f)||un.test(f)||_n.test(f))){let m=(d?.type==="date"?d:void 0)??t.find(x=>x.type==="date");if(m){let x=Rr.test(f)||un.test(f);o.filters.push({key:m.key,operator:x?"greaterThan":"lessThan",value:I[0]}),s.push(`${m.label} ${x?"after":"before"} ${I[0]}`)}}else if(b&&(un.test(f)||_n.test(f)||d?.type==="number"&&/\b(is|equals?)\b|=/.test(f))){let m=d?.type==="number"?d:void 0;m||(m=Kn(t),m&&o.notes.push(`Assumed "${f}" refers to ${m.label}.`));let x=qn(b[0]);if(m&&x!==null){let y=/at least|minimum|\bmin\b|>=|=>|at most|maximum|\bmax\b|up to|<=|=</.test(f);un.test(f)?(o.filters.push({key:m.key,operator:"greaterThan",value:y?x-1e-9:x}),s.push(`${m.label} ${y?"\u2265":">"} ${x.toLocaleString("en-IN")}`)):_n.test(f)?(o.filters.push({key:m.key,operator:"lessThan",value:y?x+1e-9:x}),s.push(`${m.label} ${y?"\u2264":"<"} ${x.toLocaleString("en-IN")}`)):(o.filters.push({key:m.key,operator:"equals",value:x}),s.push(`${m.label} = ${x.toLocaleString("en-IN")}`))}}else{let m=f.match(/\b(?:starts?|starting|begins?|beginning)\s+with\s+(.+)$/),x=f.match(/\b(?:ends?|ending)\s+with\s+(.+)$/),y=f.match(/\b(?:contains?|containing|including|includes?|mentions?)\s+(.+)$/),k=f.match(/\b(?:is|equals?|=|:)\s+(.+)$/),v=m??x??y??k;if(v){let R=d??g[0],z=v[1].replace(/^["'“‘]|["'”’]$/g,"").trim();if(R&&z){let N=m?"startsWith":x?"endsWith":y?"contains":"equals";o.filters.push({key:R.key,operator:N,value:z}),s.push(`${R.label} ${N==="equals"?"is":N==="contains"?"contains":N==="startsWith"?"starts with":"ends with"} "${z}"`),d||o.notes.push(`Assumed "${f}" refers to ${R.label}.`)}}}if(o.filters.length===h)for(let[m,x]of A){let y="";for(let k of x){if(k.length<2||k.length<=y.length)continue;let v=k.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${v}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(f)&&(y=k)}if(y){let k=t.find(v=>v.key===m);o.filters.push({key:m,operator:"equals",value:y}),s.push(`${k.label} is "${y}"`)}}if(o.filters.length===h){let m=f.split(/\s+/).filter(y=>!du.has(y)&&!/^(top|first|bottom|last|lowest|highest|by|desc|asc|sort(ed)?)$/.test(y)),x=m.length>0&&m.every(y=>t.some(k=>Dr(k).includes(y)));if(m.length&&!x&&!(d&&m.length===1)){let y=m.join(" ");/^(customers?|users?|people|items?|entries|poems?|orders?|products?|employees?|students?|members?)$/.test(y)||(o.search.push(y),s.push(`any column contains "${y}"`))}}}if(o.sort){let f=t.find(h=>h.key===o.sort.key)?.label??o.sort.key;s.push(`sorted by ${f} ${o.sort.direction==="desc"?"high \u2192 low":"low \u2192 high"}`)}return o.limit&&s.push(`first ${o.limit}`),o.explanation=s.length?`Showing rows where ${s.join(", ")}.`:"No conditions understood \u2014 showing all rows.",o}function fu(e,t,n){return n==="number"?(Number(e)||0)-(Number(t)||0):n==="date"?(new Date(String(e)).getTime()||0)-(new Date(String(t)).getTime()||0):String(e??"").localeCompare(String(t??""),void 0,{numeric:!0})}function tt(e,t,n){let o=je(e,t,n.filters);for(let r of n.search)o=o.filter(s=>t.some(i=>Ye(s[i.key]).includes(r)));if(n.sort){let r=t.find(i=>i.key===n.sort.key),s=n.sort.direction==="desc"?-1:1;o=[...o].sort((i,a)=>s*fu(i[n.sort.key],a[n.sort.key],r?.type))}return n.limit&&(o=o.slice(0,n.limit)),o}function mu(e,t,n={}){let o=wt(e,t.columns,{data:t.data}),r=tt(t.data,t.columns,o),s=r.map(a=>be(a,t.rowKey)).filter(Boolean);n.apply!==!1&&(o.filters.length&&t.onFiltersChange?.(o.filters),o.sort&&t.onSortChange?.(o.sort),s.length&&t.onHighlightRows?.(s));let i=r.length?`${r.length} row(s) found. ${o.explanation}${o.notes.length?` (${o.notes.join(" ")})`:""}`:`No rows match. ${o.explanation}`;return{rows:r,ids:s,parsed:o,message:i}}function Gr(e,t){let n=(e.length-1)*t,o=Math.floor(n),r=n-o;return e[o+1]!==void 0?e[o]+r*(e[o+1]-e[o]):e[o]}function Vn(e,t,n={}){let o=n.factor??1.5,r=[],s=t.filter(c=>c.type==="number"&&(!n.columns||n.columns.includes(c.key))),i=c=>c.toLocaleString("en-IN",{maximumFractionDigits:2});for(let c of s){let u=e.map(b=>Number(b[c.key])).filter(b=>Number.isFinite(b));if(u.length<5)continue;let p=[...u].sort((b,I)=>b-I),g=Gr(p,.25),A=Gr(p,.75),f=A-g;if(f===0)continue;let h=g-o*f,d=A+o*f;for(let b of e){let I=Number(b[c.key]);!Number.isFinite(I)||I>=h&&I<=d||r.push({rowId:be(b,n.rowKey),column:c.key,label:c.label,value:I,kind:I>d?"high":"low",reason:`${c.label} ${i(I)} is far ${I>d?"above":"below"} the typical range (${i(g)}\u2013${i(A)}).`})}}let a=n.rowKey??"id",l=new Map;for(let c of e){let u=JSON.stringify(t.filter(A=>A.key!==a).map(A=>Ye(c[A.key]))),p=be(c,n.rowKey),g=l.get(u);g!==void 0?r.push({rowId:p,column:a,label:"Row",value:p,kind:"duplicate",reason:`Row ${p} has the same values as row ${g}.`}):l.set(u,p)}return r}function Xn(e,t){if(!e.length)return"No rows to summarise.";let n=[`${e.length} row(s).`],o=r=>r.toLocaleString("en-IN",{maximumFractionDigits:2});for(let r of t){let s=e.map(i=>i[r.key]);if(r.type==="number"){let i=s.map(Number).filter(Number.isFinite);if(!i.length)continue;let a=i.reduce((l,c)=>l+c,0);n.push(`${r.label}: total ${o(a)}, average ${o(a/i.length)}, range ${o(Math.min(...i))}\u2013${o(Math.max(...i))}.`)}else if(r.type==="date"){let i=s.map(l=>new Date(String(l)).getTime()).filter(Number.isFinite);if(!i.length)continue;let a=l=>new Date(l).toISOString().slice(0,10);n.push(`${r.label}: from ${a(Math.min(...i))} to ${a(Math.max(...i))}.`)}else{let i=new Map;for(let l of s){let c=String(l??"").trim();c&&i.set(c,(i.get(c)??0)+1)}if(i.size===0||i.size>Math.max(8,e.length/3))continue;let a=Array.from(i.entries()).sort((l,c)=>c[1]-l[1]).slice(0,4);n.push(`${r.label}: ${a.map(([l,c])=>`${l} (${c})`).join(", ")}.`)}}return n.join(`
|
|
402
|
-
`)}function
|
|
403
|
-
${
|
|
404
|
-
`)}`:"Nothing unusual found.",ids:
|
|
405
|
-
`),h=await c.generate(l,f);if(h?.trim())return{answer:h.trim(),hits:u,generated:!0}}catch{}let p=new Set(dn(l)),g=u.flatMap(f=>f.text.split(/(?<=[.!?।])\s+|\.\s+(?=\p{Lu})/u).map(h=>({s:h.trim(),h:f}))).map(({s:f,h})=>({s:f,h,overlap:dn(f).filter(d=>p.has(d)).length})).filter(f=>f.s&&f.overlap>0).sort((f,h)=>h.overlap-f.overlap).slice(0,3);return{answer:g.length?g.map(f=>f.h.source==="grid"?`Row ${f.h.ref}: ${f.s}`:f.s).join(`
|
|
406
|
-
`):u[0].text.slice(0,300),hits:u,generated:!1}}return{search:i,ask:a,rebuild:s,update(l){Object.assign(e,l),s()},size:()=>t.length}}var Wr="highlight|mark|flag|sort|order|rank|arrange|summari[sz]e|summary|recap|count|how many|open|select|pick|show|filter|find|list|clear|reset|remove|detect|spot|tell";function Zn(e){return e.replace(/[?!]/g," ").split(/\s*(?:;|\.(?!\d)\s*|,?\s*\band then\b|,?\s*\bthen\b|,?\s*\bafter that\b|,?\s*\bfinally\b|,?\s*\bnext\b|ఆ తర్వాత)\s*/i).flatMap(o=>o.split(new RegExp(`\\s*(?:,|\\band\\b)\\s+(?=(?:${Wr})\\b)`,"i"))).map(o=>o.trim()).filter(o=>o.length>1).map(o=>({action:Su(o),text:o}))}function Su(e){let t=e.toLowerCase();return/^(clear|reset|remove)\b/.test(t)?"clear":/unusual|anomal|outlier|suspicious|odd ones|duplicate/.test(t)?"anomalies":/summari[sz]e|summary|what changed|recap|overview/.test(t)?"summarize":/^(highlight|mark|flag)\b/.test(t)?"highlight":/^(sort|order|rank|arrange)\b/.test(t)?"sort":/^(count|how many)\b/.test(t)?"count":/^(open|go to)\b/.test(t)&&!/filtered|results?/.test(t)?"open":/^(select|pick)\b/.test(t)?"select":"filter"}function Bu(e){return e.replace(new RegExp(`^\\s*(?:${Wr}|open|go to)\\b`,"i")," ").replace(/\b(the|filtered|results?|rows?|records?|entries|items?|ones|them|those|only|me|all)\b/gi," ").replace(/\s+/g," ").trim()}function Pr(e,t){let n=t.find(s=>s.key===e.key)?.label??e.key,o=Array.isArray(e.value)?`${e.value[0]}\u2013${e.value[1]}`:typeof e.value=="number"?e.value.toLocaleString("en-IN",{maximumFractionDigits:2}):`"${e.value}"`,r={contains:"contains",equals:"is",startsWith:"starts with",endsWith:"ends with",greaterThan:">",lessThan:"<",between:"between"}[e.operator];return`${n} ${r} ${o}`}async function Ur(e,t,n={}){let o=Zn(e),{columns:r,data:s}=t,i=[...t.filters??[]],a=[],l=null,c=[],u=()=>tt(s,r,{filters:i,search:a,sort:l,limit:null,notes:[],explanation:""}),p={rows:u().length,filters:[...i]},g=[],A=()=>({...t,filters:i});for(let h=0;h<o.length;h++){let d=o[h],b=Bu(d.text),I;try{switch(d.action){case"clear":{i=[],a=[],l=null,c=[],t.onFiltersChange?.([]),t.onSortChange?.(null),t.onHighlightRows?.([]),I={...d,success:!0,message:`Cleared filters, sorting and highlights. ${s.length} row(s) shown.`};break}case"filter":{let m=wt(b,r,{data:s});if(!m.filters.length&&!m.search.length&&!m.sort){I={...d,success:!0,message:`Showing ${u().length} row(s) with the current filters.`};break}for(let k of m.filters)i=[...i.filter(v=>v.key!==k.key),k];a=[...a,...m.search],m.sort&&(l=m.sort,t.onSortChange?.(l)),t.onFiltersChange?.(i);let x=u(),y=x.map(k=>be(k,t.rowKey)).filter(Boolean);m.search.length&&y.length&&(c=y,t.onHighlightRows?.(y)),I={...d,success:!0,message:`${x.length} row(s) now shown. ${m.explanation}`,ids:y};break}case"highlight":{let m=u(),x=wt(b,r,{data:m}),k=(x.filters.length||x.search.length?tt(m,r,{...x,sort:null,limit:x.limit}):m).map(R=>be(R,t.rowKey)).filter(Boolean);if(!k.length){I={...d,success:!1,message:`Nothing to highlight for "${b||"all rows"}".`};break}let v=Tt(A(),k);v.success&&(c=v.data??k),I={...d,success:v.success,message:v.success?`Highlighted ${c.length} row(s)${b?` matching "${b}"`:""}.`:v.message,ids:c};break}case"sort":{let x=wt(d.text,r,{data:s}).sort;if(!x){let k=Pe(b,r);k&&(x={key:k.key,direction:/desc|high|large|big|most|newest|latest|z.?to.?a/i.test(d.text)?"desc":"asc"})}if(!x){I={...d,success:!1,message:`Which column should I sort by? Columns: ${r.map(k=>k.label).join(", ")}.`};break}l=x,t.onSortChange?.(l);let y=r.find(k=>k.key===l.key)?.label??l.key;I={...d,success:!0,message:`Sorted by ${y} (${l.direction==="desc"?"high \u2192 low":"low \u2192 high"}).`};break}case"count":{I={...d,success:!0,message:`${u().length} row(s) shown${c.length?`, ${c.length} highlighted`:""}.`};break}case"anomalies":{let m=u(),x=Vn(m,r,{rowKey:t.rowKey}),y=Array.from(new Set(x.map(k=>k.rowId)));if(y.length){let k=Tt(A(),y);k.success&&(c=k.data??y)}I={...d,success:!0,message:x.length?`${y.length} unusual row(s): ${x.slice(0,5).map(k=>k.reason).join(" ")}`:"Nothing unusual in the shown rows.",ids:y};break}case"open":case"select":{let m=u(),y=m.find(R=>b&&be(R,t.rowKey).toLowerCase()===b.toLowerCase())??tt(m,r,wt(b,r,{data:m}))[0]??(b?void 0:m[0]);if(!y){I={...d,success:!1,message:`No row matches "${b}".`};break}let k=be(y,t.rowKey),v=d.action==="open"?tn(A(),k):en(A(),k);I={...d,success:v.success,message:v.message,ids:[k]};break}case"summarize":{let m=u();I={...d,success:!0,message:`${zr(p,m.length,i,l,c,r)}
|
|
407
|
-
${Xn(m,r)}`};break}}}catch(m){I={...d,success:!1,message:`This step failed: ${m instanceof Error?m.message:String(m)}`}}g.push(I),n.onStep?.(I,h,o.length)}let f=u().length;return{steps:g,before:p,after:{rows:f,filters:i,sort:l,highlighted:c},summary:zr(p,f,i,l,c,r)}}function zr(e,t,n,o,r,s){let i=[`Rows: ${e.rows} \u2192 ${t}.`],a=n.filter(c=>!e.filters.some(u=>JSON.stringify(u)===JSON.stringify(c))),l=e.filters.filter(c=>!n.some(u=>JSON.stringify(c)===JSON.stringify(u)));return a.length&&i.push(`Filters added: ${a.map(c=>Pr(c,s)).join("; ")}.`),l.length&&i.push(`Filters removed: ${l.map(c=>Pr(c,s)).join("; ")}.`),o&&i.push(`Sorted by ${s.find(c=>c.key===o.key)?.label??o.key} ${o.direction==="desc"?"high \u2192 low":"low \u2192 high"}.`),r.length&&i.push(`${r.length} row(s) highlighted.`),i.join(" ")}var gn=e=>{let t=typeof e=="number"?e:Number(String(e??"").replace(/[,₹$%\s]/g,""));return Number.isFinite(t)?t:null},Or=e=>{let t=e instanceof Date?e.getTime():new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null};function Mt(e,t){if(t==="count")return e.length;if(!e.length)return 0;switch(t){case"sum":return e.reduce((n,o)=>n+o,0);case"avg":return e.reduce((n,o)=>n+o,0)/e.length;case"min":return Math.min(...e);case"max":return Math.max(...e)}}function Tu(e,t,n,o="sum"){let r=new Map;for(let s of e){let i=String(s[t]??"\u2014").trim()||"\u2014",a=r.get(i)??[];if(n===null||o==="count")a.push(1);else{let l=gn(s[n]);l!==null&&a.push(l)}r.set(i,a)}return Array.from(r.entries()).map(([s,i])=>({group:s,value:Mt(i,o),count:i.length})).sort((s,i)=>i.value-s.value)}function Yr(e,t,n=1){let o=new Date(e);return o.setHours(0,0,0,0),t==="week"&&o.setDate(o.getDate()-(o.getDay()-n+7)%7),t==="month"&&o.setDate(1),t==="quarter"&&o.setMonth(Math.floor(o.getMonth()/3)*3,1),t==="year"&&o.setMonth(0,1),o}function to(e,t,n){let o=new Date(e);return t==="day"&&o.setDate(o.getDate()+n),t==="week"&&o.setDate(o.getDate()+7*n),t==="month"&&o.setMonth(o.getMonth()+n),t==="quarter"&&o.setMonth(o.getMonth()+3*n),t==="year"&&o.setFullYear(o.getFullYear()+n),o}function Qu(e,t){let n=t.referenceDate?new Date(t.referenceDate):new Date,o=Yr(n,t.period,t.weekStartsOn),r=t.toDate===!1?to(o,t.period,1):new Date(Math.max(n.getTime()+1,o.getTime()+1)),s=to(o,t.period,-1),i=t.toDate===!1?o:new Date(s.getTime()+(r.getTime()-o.getTime())),a=t.agg??"sum",l=new Map,c=new Map;for(let g of e){let A=Or(g[t.dateKey]);if(A===null)continue;let f=A>=o.getTime()&&A<r.getTime()?l:A>=s.getTime()&&A<i.getTime()?c:null;if(!f)continue;let h=t.groupKey?String(g[t.groupKey]??"\u2014"):"All",d=a==="count"?1:gn(g[t.metricKey]);d!==null&&f.set(h,[...f.get(h)??[],d])}let u=new Set([...l.keys(),...c.keys()]),p=Array.from(u).map(g=>{let A=Mt(l.get(g)??[],a),f=Mt(c.get(g)??[],a);return{group:g,current:A,previous:f,change:A-f,changePct:f===0?null:(A-f)/Math.abs(f)*100}});return{period:t.period,current:{from:o,to:r},previous:{from:s,to:i},rows:p}}function Ru(e,t,n,o,r="sum"){let s=new Map;for(let i of e){let a=Or(i[t]),l=r==="count"?1:gn(i[n]);if(a===null||l===null)continue;let c=Yr(new Date(a),o).getTime();s.set(c,[...s.get(c)??[],l])}return Array.from(s.entries()).sort((i,a)=>i[0]-a[0]).map(([i,a])=>({start:new Date(i),value:Mt(a,r)}))}var Gu=/rate|conversion|ratio|percent|%|score|rating|margin|ctr|avg|average/i;function Du(e){let t=e.match(/\b(today|yesterday|this|last|previous|past)\s*(day|week|month|quarter|year)?\b/);return t?t[1]==="today"?{period:"day",shift:0}:t[1]==="yesterday"?{period:"day",shift:-1}:t[2]?{period:t[2],shift:t[1]==="this"?0:-1}:null:null}var we=e=>e.toLocaleString("en-IN",{maximumFractionDigits:2}),eo=e=>e===null?"new":`${e>0?"+":""}${e.toFixed(1)}%`;function Hr(e,t,n,o={}){let r=e.toLowerCase(),s=n.filter(m=>m.type==="number"),i=Pe(r,n,"number")??s.find(m=>/amount|revenue|sales|total|value/i.test(`${m.key} ${m.label}`))??s[0],a=n.find(m=>m.type==="date")??n.find(m=>/date|time|day|created|month/i.test(`${m.key} ${m.label}`)),l=r.match(/\b(?:which|by|per|each|across|every|top|for each)\s+([\p{L}\p{M}\p{N} _]+)/u)?.[1]??"",c=Pe(l,n,"text"),u=/how many|number of|count/.test(r),p=u?"count":/average|avg|mean/.test(r)?"avg":/\btotal\b|\bsum\b/.test(r)?"sum":i&&Gu.test(`${i.key} ${i.label}`)?"avg":"sum",g=/drop|decline|decrease|fell|fall|down|worst|lost|shrink|reduc/.test(r),A=/increase|growth|grew|rise|rose|up\b|best|improv|gain/.test(r),f=/lowest|least|smallest|bottom|worst|minimum/.test(r),h=Du(r);if(!i&&!u)return{kind:"unknown",answer:"I couldn't find a numeric column to analyse.",table:[]};let d=u?"rows":i.label;if(h&&a&&(A||g||/change|compare|vs|versus/.test(r))){let m=o.referenceDate?new Date(o.referenceDate):new Date,x=h.shift?to(m,h.period,h.shift):m,k=[...Qu(t,{dateKey:a.key,metricKey:i?.key??a.key,groupKey:c?.key,agg:p,period:h.period,referenceDate:x,toDate:h.shift===0}).rows].sort((Y,K)=>g?Y.change-K.change:K.change-Y.change),v=k.map(Y=>({[c?.label??"Group"]:Y.group,Current:we(Y.current),Previous:we(Y.previous),Change:we(Y.change),"Change %":eo(Y.changePct)}));if(!k.length)return{kind:"period-change",answer:`No ${d} data in this ${h.period} or the one before.`,table:v};let R=k[0],z=`${h.shift?"last":"this"} ${h.period} vs the ${h.period} before`,N=R.change===0?"did not change":R.change<0?`dropped ${we(Math.abs(R.change))}`:`rose ${we(R.change)}`,T=`${d} ${N} (${we(R.previous)} \u2192 ${we(R.current)}, ${eo(R.changePct)}) \u2014 ${z}.`,S=g&&R.change>=0||A&&R.change<=0;return{kind:"period-change",answer:c?S?`No ${c.label.toLowerCase()} ${g?"dropped":"grew"}. Closest is ${R.group}: ${T}`:`${R.group}: ${T}`:T,table:v}}if(/trend|over time|month by month|week by week/.test(r)&&a&&i){let m=/week/.test(r)?"week":/day|daily/.test(r)?"day":/year/.test(r)?"year":"month",x=Ru(t,a.key,i.key,m,p),y=x.map(z=>({Period:z.start.toISOString().slice(0,10),[i.label]:we(z.value)}));if(x.length<2)return{kind:"trend",answer:`Not enough ${m}s of data for a trend.`,table:y};let k=x[0].value,v=x[x.length-1].value,R=x.reduce((z,N)=>N.value>z.value?N:z);return{kind:"trend",answer:`${i.label} went from ${we(k)} to ${we(v)} over ${x.length} ${m}s (${eo(k?(v-k)/Math.abs(k)*100:null)}). Peak: ${we(R.value)} in the ${m} of ${R.start.toISOString().slice(0,10)}.`,table:y}}if(c){let m=Tu(t,c.key,i?.key??null,p),x=f?[...m].reverse():m,y=x.map(v=>({[c.label]:v.group,[`${p} of ${d}`]:we(v.value),Rows:v.count}));if(!x.length)return{kind:"group",answer:"No data.",table:y};let k=x[0];return{kind:"group",answer:`${k.group} has the ${f?"lowest":"highest"} ${p==="sum"?"total":p==="avg"?"average":p} ${d}: ${we(k.value)} (across ${x.length} ${c.label.toLowerCase()} groups).`,table:y}}let b=u?t.map(()=>1):t.map(m=>gn(m[i.key])).filter(m=>m!==null),I=Mt(b,p);return{kind:"total",answer:`${p==="avg"?"Average":p==="count"?"Count of":p==="sum"?"Total":p} ${d}: ${we(I)} across ${t.length} row(s).`,table:[{Metric:d,Aggregation:p,Value:we(I)}]}}var Jr={high:12,medium:6,low:2};function qr(e={}){let t=Te(e.root),n=[],o=(a,l,c,u,p)=>n.push({category:a,severity:l,message:c,suggestion:u,selector:p?Oe(p):void 0});if(t&&Je()){let a=e.minFontSize??14,l=e.maxLineLength??90,c=T=>window.getComputedStyle(T),u=O(t,"h1");u.length===0&&o("hierarchy","medium","There is no h1, so the page has no clear main title.","Add one prominent h1 near the top."),u.length>1&&o("hierarchy","low",`${u.length} h1 headings compete for attention.`,"Keep one h1 and demote the rest.",u[1]);let p=T=>{let S=O(t,T)[0];return S&&parseFloat(c(S).fontSize)||0},[g,A,f]=[p("h1"),p("h2"),p("h3")];g&&A&&A>=g&&o("hierarchy","medium",`h2 (${A}px) is as large as or larger than h1 (${g}px).`,"Make each heading level visibly smaller than the one above it."),A&&f&&f>A&&o("hierarchy","low",`h3 (${f}px) is larger than h2 (${A}px).`,"Keep heading sizes in descending order.");let h=et({root:e.root,skip:["color-contrast","target-size","duplicate-id","page-title","html-lang","form-error","positive-tabindex"]});for(let T of h.issues.filter(S=>S.rule==="heading-order").slice(0,3))o("hierarchy","low",T.message,T.fix,T.element);let d=0,b;for(let T of O(t,"p,li,td,span,a,label,small,div").slice(0,1500)){if(!vt(T))continue;(parseFloat(c(T).fontSize)||16)<a&&(d++,b??=T)}d&&o("readability",d>10?"high":"medium",`${d} text element(s) are smaller than ${a}px, e.g. "${me(b?.textContent??"",30)}".`,`Use at least ${a}px for body text (16px for senior-friendly pages).`,b);for(let T of O(t,"p").slice(0,200)){let S=c(T),C=parseFloat(S.fontSize)||16,Y=T.getBoundingClientRect().width,K=Y/(C*.5);if(Y>0&&K>l&&(T.textContent??"").length>l){o("readability","low",`A paragraph is about ${Math.round(K)} characters wide.`,`Limit text width to ~${l} characters (e.g. max-width: 70ch).`,T);break}let M=parseFloat(S.lineHeight);if(Number.isFinite(M)&&M/C<1.3){o("readability","low",`Line height is ${(M/C).toFixed(2)}\xD7 the font size.`,"Use line-height of at least 1.5 for body text (WCAG 1.4.12).",T);break}}let I=et({root:e.root,skip:["html-lang","page-title","image-alt","heading-order","single-h1","landmark-main","form-label","button-name","link-name","positive-tabindex","keyboard-access","duplicate-id","form-error","target-size"]});I.issues.length&&o("readability",I.issues.length>5?"high":"medium",`${I.issues.length} text element(s) have weak contrast. ${I.issues[0].message}`,"Raise contrast to at least 4.5:1 for body text.",I.issues[0].element);let m=Fu();m.length&&o("interaction","high",`Focus outlines are removed by CSS (${m.slice(0,2).join(", ")}) with no replacement.`,"Never remove outlines without a visible :focus-visible style (WCAG 2.4.7).");let x=O(t,zt).filter(T=>{let S=T.getBoundingClientRect();return S.width>0&&S.height>0&&(S.width<24||S.height<24)&&!(T.tagName==="A"&&T.closest("p,li"))});x.length&&o("interaction",x.length>5?"high":"medium",`${x.length} control(s) are smaller than 24\xD724px.`,"Give controls at least 24\xD724px, ideally 44\xD744px for touch and seniors.",x[0]);let y=window.innerHeight||800,k=O(t,xo).filter(T=>{let S=T.getBoundingClientRect();return S.height>0&&S.top<y});k.length>40&&o("clutter","medium",`${k.length} interactive elements in the first screen.`,"Group secondary actions into menus and keep the first screen focused on one task.");let v=O(t,"button,a[href],[role='button']").filter(T=>{let S=T.getBoundingClientRect();if(S.height===0||S.top>y)return!1;let C=c(T).backgroundColor;return!!C&&!/rgba\(0, 0, 0, 0\)|transparent/.test(C)&&!/rgb\(255, 255, 255\)/.test(C)});v.length>4&&o("clutter","medium",`${v.length} filled buttons compete in the first screen.`,"Keep one primary action per view; make the rest secondary (outline or text).",v[0]);let R=new Set,z=new Set;for(let T of O(t,"body *").slice(0,2e3)){if(!vt(T))continue;let S=c(T);R.add(S.fontFamily.split(",")[0].replace(/["']/g,"").trim().toLowerCase()),z.add(Math.round(parseFloat(S.fontSize)||0))}R.size>4&&o("consistency","low",`${R.size} different font families are used.`,"Stick to 1\u20132 font families (e.g. one Telugu + one Latin)."),z.size>10&&o("consistency","low",`${z.size} different font sizes are used.`,"Use a small type scale (5\u20137 sizes) for a calmer page.");let N=O(t,"img:not([width]):not([height])").filter(T=>!c(T).aspectRatio||c(T).aspectRatio==="auto");N.length>3&&o("consistency","low",`${N.length} images have no width/height, so the layout jumps while loading.`,"Set width and height (or aspect-ratio) on images.",N[0])}let r=["hierarchy","readability","interaction","clutter","consistency"].reduce((a,l)=>{let c=n.filter(u=>u.category===l);return a[l]={score:Math.max(0,100-c.reduce((u,p)=>u+Jr[p.severity]*2,0)),findings:c.length},a},{}),s=Math.max(0,100-n.reduce((a,l)=>a+Jr[l.severity],0)),i=Object.entries(r).sort((a,l)=>a[1].score-l[1].score)[0];return{score:s,categories:r,findings:n,summary:n.length?`Design score ${s}/100 with ${n.length} finding(s). Weakest area: ${i[0]}.`:"No design issues found by the automatic review."}}function Fu(){let e=[],t=!1,n=o=>{for(let r of Array.from(o)){let s=r.cssRules;s&&n(s);let i=r;if(!i.selectorText||!/:focus/.test(i.selectorText))continue;let a=`${i.style.outline} ${i.style.outlineStyle} ${i.style.outlineWidth}`,l=/\bnone\b|\b0(px)?\b/.test(a),c=!!(i.style.boxShadow&&i.style.boxShadow!=="none")||!!i.style.borderColor||!!i.style.backgroundColor||!!i.style.textDecoration;/:focus-visible/.test(i.selectorText)&&(!l||c)&&(t=!0),l&&!c&&e.push(i.selectorText)}};for(let o of Array.from(document.styleSheets))try{n(o.cssRules)}catch{}return t?[]:e}import{useCallback as no,useEffect as jr,useMemo as oo,useRef as ro,useState as le}from"react";import{Fragment as _r,jsx as Q,jsxs as oe}from"react/jsx-runtime";var Nu=/\b(trend|over time|this (week|month|quarter|year)|last (week|month|quarter|year)|compare|versus|vs)\b|\b(by|per|each|which)\b.*\b(total|average|avg|sum|drop|increase|growth|highest|lowest|most|least)\b|\b(total|average|avg|sum)\b.*\b(by|per|each)\b/i;function EA(e){let{data:t,rowKey:n="id"}=e,o=oo(()=>lt(e.columns),[e.columns]),[r,s]=le([]),[i,a]=le(null),[l,c]=le([]),[u,p]=le(""),[g,A]=le(null),[f,h]=le([]),[d,b]=le([]),[I,m]=le(!1),x=ro(r);x.current=r;let y=no(()=>({data:t,columns:o,rowKey:n,filters:x.current,onFiltersChange:z=>{x.current=z,s(z)},onSortChange:a,onHighlightRows:c,onOpenRow:e.onOpenRow,onSelectRow:z=>c([z])}),[t,o,n,e.onOpenRow]),k=no(async z=>{let N=z.trim();if(N){m(!0),b([]),h([]);try{if(Zn(N).length>1){let T=[],S=await Ur(N,y(),{onStep:C=>b((T.push(C),[...T]))});A("tasks"),p(S.summary)}else if(Nu.test(N)){let T=tt(t,o,{filters:x.current,search:[],sort:null,limit:null,notes:[],explanation:""}),S=Hr(N,T,o,{referenceDate:e.referenceDate});A("insight"),p(S.answer),h(S.table)}else{let T=Fr(N,y());A(T.kind),p(T.message)}}finally{m(!1)}}},[y,t,o,e.referenceDate]),v=no(()=>{x.current=[],s([]),a(null),c([]),p(""),A(null),h([]),b([])},[]),R=oo(()=>tt(t,o,{filters:r,search:[],sort:i,limit:null,notes:[],explanation:""}),[t,o,r,i]);return{gridData:R,highlightIds:l,filters:r,sort:i,ask:k,reset:v,answer:u,kind:g,table:f,steps:d,busy:I,visibleIds:R.map(z=>be(z,n))}}var Vr={border:"1px solid color-mix(in srgb, CanvasText 20%, transparent)",borderRadius:12,padding:16,background:"Canvas",color:"CanvasText",font:"inherit"},fe={minHeight:44,padding:"8px 14px",borderRadius:8,border:"1px solid color-mix(in srgb, CanvasText 35%, transparent)",background:"ButtonFace",color:"ButtonText",font:"inherit",cursor:"pointer"},io={...fe,flex:1,minWidth:0,background:"Field",color:"FieldText",cursor:"text"},pn={opacity:.75,fontSize:"0.9em"};function so({rows:e}){if(!e.length)return null;let t=Object.keys(e[0]);return Q("div",{style:{overflowX:"auto",marginTop:12},children:oe("table",{style:{borderCollapse:"collapse",width:"100%"},children:[Q("thead",{children:Q("tr",{children:t.map(n=>Q("th",{scope:"col",style:{textAlign:"left",padding:"6px 8px",borderBottom:"1px solid currentColor"},children:n},n))})}),Q("tbody",{children:e.slice(0,50).map((n,o)=>Q("tr",{children:t.map(r=>Q("td",{style:{padding:"6px 8px",borderBottom:"1px solid color-mix(in srgb, CanvasText 12%, transparent)"},children:n[r]},r))},o))})]})})}function Kr(e,t,n){let o=URL.createObjectURL(new Blob([t],{type:n})),r=document.createElement("a");r.href=o,r.download=e,r.click(),setTimeout(()=>URL.revokeObjectURL(o),1e3)}function SA({grid:e,placeholder:t="Ask about this data, e.g. \u201Coverdue and over \u20B910,000\u201D",examples:n=[],style:o}){let[r,s]=le(""),i=a=>{a.preventDefault(),e.ask(r)};return oe("section",{"data-yuktai-panel":"","aria-label":"Data assistant",style:{...Vr,...o},children:[oe("form",{onSubmit:i,style:{display:"flex",gap:8,flexWrap:"wrap"},children:[Q("label",{htmlFor:"yuktai-grid-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about the data"}),Q("input",{id:"yuktai-grid-ask",value:r,onChange:a=>s(a.target.value),placeholder:t,style:io}),Q("button",{type:"submit",style:fe,disabled:e.busy,children:e.busy?"Working\u2026":"Ask"}),Q("button",{type:"button",style:fe,onClick:()=>{s(""),e.reset()},children:"Reset"})]}),n.length>0&&Q("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:8},children:n.map(a=>Q("button",{type:"button",style:{...fe,minHeight:36,fontSize:"0.85em"},onClick:()=>{s(a),e.ask(a)},children:a},a))}),Q("div",{"aria-live":"polite",style:{marginTop:12,whiteSpace:"pre-line"},children:e.answer}),e.steps.length>0&&Q("ol",{style:{marginTop:8,paddingLeft:20},children:e.steps.map((a,l)=>oe("li",{style:{marginBottom:4},children:[Q("span",{"aria-hidden":"true",children:a.success?"\u2705 ":"\u26A0\uFE0F "}),Q("strong",{children:a.text})," \u2014 ",Q("span",{style:{whiteSpace:"pre-line"},children:a.message})]},l))}),Q(so,{rows:e.table})]})}var An=[["copilot","Copilot"],["qa","QA report"],["forms","Forms"],["design","Design"],["ask","Ask page"],["voice","Voice"]];function BA({defaultTab:e="copilot",voiceLang:t="en-IN",generate:n,style:o}){let[r,s]=le(e),i=ro([]),a=(l,c)=>{let u=l.key==="ArrowRight"?1:l.key==="ArrowLeft"?-1:0;if(!u)return;l.preventDefault();let p=(c+u+An.length)%An.length;s(An[p][0]),i.current[p]?.focus()};return oe("section",{"data-yuktai-panel":"","aria-label":"yuktai agentic tools",style:{...Vr,...o},children:[Q("div",{role:"tablist","aria-label":"Tools",style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:An.map(([l,c],u)=>Q("button",{ref:p=>{i.current[u]=p},role:"tab",id:`yuktai-tab-${l}`,"aria-selected":r===l,"aria-controls":`yuktai-tabpanel-${l}`,tabIndex:r===l?0:-1,onClick:()=>s(l),onKeyDown:p=>a(p,u),style:{...fe,fontWeight:r===l?700:400,outlineOffset:2,borderWidth:r===l?2:1},children:c},l))}),oe("div",{role:"tabpanel",id:`yuktai-tabpanel-${r}`,"aria-labelledby":`yuktai-tab-${r}`,children:[r==="copilot"&&Q(Mu,{}),r==="qa"&&Q(Lu,{}),r==="forms"&&Q($u,{}),r==="design"&&Q(Pu,{}),r==="ask"&&Q(zu,{generate:n}),r==="voice"&&Q(Wu,{lang:t})]})]})}function Mu(){let e=ro(null),[t,n]=le(null),[o,r]=le(null),[s,i]=le("");jr(()=>(e.current=Tr({onUpdate:n}),e.current.scan(),()=>e.current?.stop()),[]);let a=e.current,l=t?.report?.issues??[];return oe("div",{children:[oe("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[Q("button",{type:"button",style:fe,onClick:()=>t?.watching?a?.stop():a?.start(),children:t?.watching?"Stop watching":"Watch page live"}),Q("button",{type:"button",style:fe,onClick:()=>a?.scan(),children:"Scan now"}),Q("button",{type:"button",style:fe,onClick:()=>i(`${a?.applyAllFixes().filter(c=>c.applied).length??0} fix(es) applied.`),children:"Apply safe fixes"}),Q("button",{type:"button",style:fe,onClick:()=>i(`${a?.undoAll()??0} change(s) undone.`),children:"Undo all"})]}),oe("p",{"aria-live":"polite",style:{marginTop:12},children:[t?.report?.summary," ",s]}),Q("ul",{style:{listStyle:"none",padding:0,margin:0},children:l.slice(0,40).map(c=>oe("li",{style:{borderTop:"1px solid color-mix(in srgb, CanvasText 12%, transparent)",padding:"8px 0"},children:[oe("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[Q("span",{style:{...pn,minWidth:70},children:c.severity}),Q("span",{style:{flex:1},children:c.message}),Q("button",{type:"button",style:fe,"aria-expanded":o===c.id,onClick:()=>r(o===c.id?null:c.id),children:"Why?"}),c.autoFixable&&Q("button",{type:"button",style:fe,onClick:()=>i(a?.applyFix(c.id).message??""),children:"Fix"})]}),o===c.id&&Q("p",{style:{whiteSpace:"pre-line",margin:"8px 0 0"},children:a?.explain(c.id)})]},c.id))})]})}function Lu(){let[e,t]=le(null);return oe("div",{children:[oe("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[Q("button",{type:"button",style:fe,onClick:()=>t(et()),children:"Run QA check"}),e&&oe(_r,{children:[Q("button",{type:"button",style:fe,onClick:()=>Kr("accessibility-report.md",Sr(e),"text/markdown"),children:"Download .md"}),Q("button",{type:"button",style:fe,onClick:()=>Kr("accessibility-report.json",Br(e),"application/json"),children:"Download .json"})]})]}),e&&oe(_r,{children:[oe("p",{"aria-live":"polite",style:{marginTop:12},children:[Q("strong",{children:e.passed?"PASS":"FAIL"})," \u2014 ",e.summary]}),Q(so,{rows:e.checks.map(n=>({Check:n.title,Result:n.passed?"\u2705 Pass":"\u274C Fail",Issues:n.issueCount}))})]})]})}function $u(){let[e,t]=le(null);return oe("div",{children:[Q("button",{type:"button",style:fe,onClick:()=>t(cn()),children:"Review forms"}),oe("div",{"aria-live":"polite",children:[e&&e.length===0&&Q("p",{children:"No forms on this page."}),e?.map(n=>oe("div",{style:{marginTop:12},children:[Q("p",{children:Q("strong",{children:n.summary})}),Q("ul",{children:n.findings.map((o,r)=>oe("li",{children:[o.level==="problem"?"Problem: ":"Suggestion: ",o.message," ",Q("span",{style:pn,children:o.suggestion})]},r))})]},n.selector))]})]})}function Pu(){let[e,t]=le(null);return oe("div",{children:[Q("button",{type:"button",style:fe,onClick:()=>t(qr()),children:"Review design"}),e&&oe("div",{"aria-live":"polite",children:[Q("p",{style:{marginTop:12},children:Q("strong",{children:e.summary})}),Q(so,{rows:Object.entries(e.categories).map(([n,o])=>({Area:n,Score:o.score,Findings:o.findings}))}),Q("ul",{children:e.findings.map((n,o)=>oe("li",{children:["[",n.severity,"] ",n.message," ",Q("span",{style:pn,children:n.suggestion})]},o))})]})]})}function zu({generate:e}){let[t,n]=le(""),[o,r]=le(""),[s,i]=le([]);return oe("div",{children:[oe("form",{onSubmit:async l=>{if(l.preventDefault(),!t.trim())return;let c=await Qr(t);if(c.intent!=="unknown"&&c.intent!=="purpose"){r(c.answer),i(c.suggestions);return}let u=await $r().ask(t,{generate:e});r(c.intent==="purpose"&&!u.hits.length?c.answer:u.hits.length?u.answer:c.answer),i(c.suggestions)},style:{display:"flex",gap:8,flexWrap:"wrap"},children:[Q("label",{htmlFor:"yuktai-page-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about this page"}),Q("input",{id:"yuktai-page-ask",value:t,onChange:l=>n(l.target.value),placeholder:"What does this page do? Which fields are missing labels?",style:io}),Q("button",{type:"submit",style:fe,children:"Ask"})]}),Q("p",{"aria-live":"polite",style:{whiteSpace:"pre-line",marginTop:12},children:o}),s.length>0&&Q("ul",{children:s.map((l,c)=>Q("li",{children:l},c))})]})}function Wu({lang:e}){let t=oo(()=>Lr({lang:e,onTranscript:(l,c)=>s(`\u201C${l}\u201D \u2192 ${c?c.say:"not a command"}`)}),[e]),[n,o]=le(!1),[r,s]=le(""),[i,a]=le("");return jr(()=>()=>t.stop(),[t]),oe("div",{children:[Q("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:Q("button",{type:"button",style:fe,"aria-pressed":n,onClick:()=>{n?(t.stop(),o(!1)):o(t.start())},children:n?"Stop listening":"Start voice commands"})}),oe("form",{onSubmit:l=>{l.preventDefault(),t.handle(i),a("")},style:{display:"flex",gap:8,marginTop:8,flexWrap:"wrap"},children:[Q("label",{htmlFor:"yuktai-voice-typed",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Type a command"}),Q("input",{id:"yuktai-voice-typed",value:i,onChange:l=>a(l.target.value),placeholder:"Or type: turn on high contrast",style:io}),Q("button",{type:"submit",style:fe,children:"Run"})]}),Q("p",{"aria-live":"polite",style:{marginTop:12},children:r}),Q("p",{style:pn,children:"Try: \u201Cturn on high contrast\u201D, \u201Cbigger text\u201D, \u201Cdark mode off\u201D, \u201Cnext row\u201D, \u201C\u0C2A\u0C46\u0C26\u0C4D\u0C26 \u0C05\u0C15\u0C4D\u0C37\u0C30\u0C3E\u0C32\u0C41\u201D, \u201Creset settings\u201D."})]})}function Uu(){if(typeof globalThis>"u")return new st;if(!globalThis.__yuktai_runtime__){let e=new st;e.register(ke.name,ke),e.register(jt.name,jt),e.register(Vt.name,Vt),globalThis.__yuktai_runtime__=e}return globalThis.__yuktai_runtime__}var Xr=typeof window<"u"?Uu():new st,jA={wcagPlugin:ke,list(){return Xr.getPlugins()},use(e){return Xr.use(e)},fix(e){return ke.applyFixes({enabled:!0,autoFix:!0,...e})},scan(){return ke.scan()}};export{ln as AUDIT_RULES,Xs as AbcIcon,xi as AccessibilityIcon,tl as AdminIcon,SA as AgenticGridBar,BA as AgenticPanel,Ji as AlertIcon,Hs as AlignCenterIcon,qs as AlignJustifyIcon,Ys as AlignLeftIcon,Js as AlignRightIcon,ya as ApiIcon,Ra as ArchitectureIcon,La as ArrowDownIcon,ys as ArrowLeftIcon,Is as ArrowRightIcon,bs as ArrowUpIcon,el as BarChartIcon,Ws as BoldIcon,os as BookIcon,Ba as BookmarkIcon,Ga as BrainIcon,nl as BugReportIcon,Gs as BulbIcon,Za as CakeIcon,rs as CalendarIcon,Mi as CardsIcon,Li as ChatIcon,bi as CheckIcon,mi as ChevronLeftIcon,hi as ChevronRightIcon,Fi as ChevronsIcon,Ua as CleaningIcon,is as ClockIcon,yi as CloseIcon,wa as CloudIcon,Ps as CodeIcon,xa as ComputerIcon,Ci as ContrastIcon,Wi as CopyIcon,Mr as DEFAULT_A11Y_SETTINGS,Wa as DashboardIcon,Ia as DataObjectIcon,Fs as DeleteIcon,za as DocumentScannerIcon,zi as DownloadIcon,Oa as DragHandleIcon,qa as ExploreIcon,hs as ExternalIcon,_i as EyeIcon,Sa as EyeOffIcon,xu as FONT_MAX,Iu as FONT_MIN,Nr as FONT_STEP,$a as FactCheckIcon,ms as FileIcon,Ui as FilterIcon,Oi as FirstIcon,js as FontIcon,Ki as FormIcon,ca as FullscreenExitIcon,la as FullscreenIcon,Qa as GavelIcon,ps as GiftIcon,ls as GlobeIcon,Dt as GridCore,Ni as GridIcon,xs as HeadphonesIcon,Ls as HeartFilledIcon,Ms as HeartIcon,Bs as HelpIcon,ts as HomeIcon,$s as HubIcon,li as ICON_MIN_CONTRAST,ai as ICON_NAMES,si as ICON_PATHS,gi as IconBase,fs as ImageIcon,Pa as ImageSearchIcon,qi as InfoIcon,Ja as InsightsIcon,Ss as InstallIcon,rl as IntegrationIcon,Us as ItalicIcon,da as JoinIcon,ra as KeyIcon,ja as KeyboardIcon,_a as LabelIcon,cs as LampIcon,Yi as LastIcon,ji as LayoutIcon,ea as LinkIcon,gl as LoaderIcon,na as LockIcon,ll as LoginIcon,cl as LogoutIcon,ks as MapIcon,Qs as MeditateIcon,ns as MenuIcon,ua as MergeIcon,$i as MicIcon,Ri as MinusIcon,wi as MoonIcon,ki as MotionIcon,ma as MovieIcon,Cs as MusicIcon,pa as MusicOffIcon,fa as MusicVideoIcon,il as NamaskarIcon,Zs as PageBreakIcon,Bi as PaletteIcon,ds as PauseIcon,vs as PenIcon,ss as PersonIcon,Ca as PhoneIcon,ws as PinIcon,us as PlayIcon,es as PlugIcon,Qi as PlusIcon,Ks as QuoteIcon,yr as RUST_AUTO_MIN_ROWS,Na as RadioCheckedIcon,Fa as RadioIcon,vi as ReadingIcon,ia as RedoIcon,dl as RepeatIcon,Gi as ResetIcon,Ns as RobotIcon,st as Runtime,Ka as SaveIcon,Ta as SchoolIcon,Ai as SearchIcon,Ea as SearchOffIcon,gs as SendIcon,ol as SentimentSadIcon,As as ShareIcon,pl as ShieldCheckIcon,aa as ShuffleIcon,Ti as SkipIcon,ha as SlideshowIcon,fi as SortDownIcon,Di as SortIcon,pi as SortUpIcon,Hi as SparkIcon,Si as SpeakerIcon,ul as SpeedIcon,Vs as SpellcheckIcon,Al as StarIcon,Pi as StopIcon,ba as StorageIcon,ta as StyleIcon,Ds as SunIcon,sl as SunriseIcon,al as SunsetIcon,sa as SwapIcon,Ei as TargetIcon,Ts as TempleIcon,zs as TextIcon,_s as TitleIcon,Zi as ToolsIcon,ga as TouchIcon,Xa as TrendingDownIcon,Va as TrendingUpIcon,Rs as TrophyIcon,Os as UnderlineIcon,Xi as UndoIcon,oa as UnlockIcon,Ma as UploadIcon,as as UsersIcon,Aa as VolumeOffIcon,Da as VolunteerIcon,Es as WalletIcon,Vi as WandIcon,ka as WifiIcon,va as WifiOffIcon,jA as YuktAI,Dn as YuktAIWrapper,Kc as YuktaiGrid,Nn as YuktaiGridAI,Qc as YuktaiGridAgent,rn as YuktaiGridWebMCP,Ii as YuktaiIcon,Ya as ZoomInIcon,Ha as ZoomOutIcon,De as accessibleName,to as addPeriods,Mt as aggregate,jt as aiPlugin,au as analyzePage,Fr as answerGridQuestion,je as applyGridFilters,Qr as askAboutPage,Hr as askInsight,Br as auditToJSON,Sr as auditToMarkdown,dr as clearFilters,Ar as clearSort,Qu as comparePeriods,yn as contrastRatio,ar as countGrid,Tr as createA11yCopilot,$r as createContextIndex,Qt as createGridTools,Lr as createVoiceA11yController,Dn as default,Vn as detectAnomalies,uu as detectPageIntent,tt as executeGridQuery,ur as filterGrid,Pe as findMentionedColumn,lr as getColumns,cr as getRow,be as getRowId,Eu as gridPassages,Tu as groupBy,Tt as highlightRows,ci as iconContrast,di as iconSvg,Wn as loadGridCore,wu as moveGridRowFocus,tn as openRow,vu as pagePassages,qn as parseAmount,bn as parseColor,mr as parseGridIntent,wt as parseGridQuery,Cu as parseVoiceA11yCommand,ui as pickGlyphColor,Zn as planTasks,iu as readFormFields,ii as relativeLuminance,qr as reviewDesign,su as reviewForm,cn as reviewForms,mu as runGridQuery,et as runQaAudit,Ur as runTasks,sr as searchGrid,en as selectRow,gr as sortGrid,Yr as startOfPeriod,Xn as summarizeRows,lt as toGridToolColumns,dn as tokenize,Ru as trend,EA as useAgenticGrid,Xc as useGrid,on as useYuktaiGridAgent,Vt as voicePlugin,zn as wantsRustEngine,ke as wcag,ke as wcagPlugin};
|
|
399
|
+
`})]})}var an=Fg;import{useCallback as Vt,useEffect as Kg,useRef as ln,useState as wA}from"react";var Mg={en:{found:e=>`${e} row(s) found.`,count:e=>`${e} row(s).`,columns:"Grid columns retrieved.",rowFound:"Row found.",notFound:e=>`Row "${e}" not found.`,noneFound:"None of the given rows were found.",highlighted:e=>`${e} row(s) highlighted.`,selected:e=>`Row "${e}" selected.`,opened:e=>`Row "${e}" opened.`,notSupported:e=>`This grid does not support "${e}".`,emptyQuery:"Please enter something to search.",noIds:"No row IDs were given.",unknownColumn:e=>`Unknown column "${e}".`,badOperator:e=>`Unknown filter operator "${e}".`,badValue:"The filter value is not valid for this column.",filtered:e=>`Filter applied: ${e} row(s) match.`,filtersCleared:"All filters cleared.",sorted:(e,t)=>`Sorted by ${e} (${t==="asc"?"ascending":"descending"}).`,sortCleared:"Sorting cleared.",internal:"Something went wrong while running this action."},te:{found:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3E\u0C2F\u0C3F.`,count:e=>`\u0C2E\u0C4A\u0C24\u0C4D\u0C24\u0C02 ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41.`,columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32 \u0C35\u0C3F\u0C35\u0C30\u0C3E\u0C32\u0C41.",rowFound:"\u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C3F\u0C15\u0C3F\u0C02\u0C26\u0C3F.",notFound:e=>`"${e}" \u0C35\u0C30\u0C41\u0C38 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.`,noneFound:"\u0C07\u0C1A\u0C4D\u0C1A\u0C3F\u0C28 \u0C35\u0C30\u0C41\u0C38\u0C32\u0C47\u0C35\u0C40 \u0C26\u0C4A\u0C30\u0C15\u0C32\u0C47\u0C26\u0C41.",highlighted:e=>`${e} \u0C35\u0C30\u0C41\u0C38(\u0C32\u0C41) \u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D \u0C1A\u0C47\u0C36\u0C3E\u0C28\u0C41.`,selected:e=>`"${e}" \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C41\u0C28\u0C4D\u0C28\u0C3E\u0C28\u0C41.`,opened:e=>`"${e}" \u0C24\u0C46\u0C30\u0C3F\u0C1A\u0C3E\u0C28\u0C41.`,notSupported:e=>`\u0C08 \u0C2A\u0C1F\u0C4D\u0C1F\u0C3F\u0C15\u0C32\u0C4B "${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C32\u0C47\u0C26\u0C41.`,emptyQuery:"\u0C35\u0C46\u0C24\u0C15\u0C21\u0C3E\u0C28\u0C3F\u0C15\u0C3F \u0C0F\u0C26\u0C48\u0C28\u0C3E \u0C30\u0C3E\u0C2F\u0C02\u0C21\u0C3F.",noIds:"\u0C35\u0C30\u0C41\u0C38 ID\u0C32\u0C41 \u0C07\u0C35\u0C4D\u0C35\u0C32\u0C47\u0C26\u0C41.",unknownColumn:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C15\u0C3E\u0C32\u0C2E\u0C4D \u0C32\u0C47\u0C26\u0C41.`,badOperator:e=>`"${e}" \u0C05\u0C28\u0C47 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C27\u0C3E\u0C28\u0C02 \u0C32\u0C47\u0C26\u0C41.`,badValue:"\u0C08 \u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C15\u0C3F \u0C08 \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C3F\u0C32\u0C41\u0C35 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C26\u0C41.",filtered:e=>`\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D \u0C35\u0C47\u0C36\u0C3E\u0C28\u0C41: ${e} \u0C35\u0C30\u0C41\u0C38\u0C32\u0C41 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C2F\u0C3E\u0C2F\u0C3F.`,filtersCleared:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C28\u0C4D\u0C28\u0C40 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",sorted:(e,t)=>`${e} \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02 (${t==="asc"?"\u0C06\u0C30\u0C4B\u0C39\u0C23":"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23"}).`,sortCleared:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C36\u0C3E\u0C28\u0C41.",internal:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}};function Te(e){return Mg[e.locale??"en"]}function Je(e,t){return{success:!0,message:e,data:t}}function le(e,t){return{success:!1,message:t,error:{code:e}}}var wo=["contains","equals","startsWith","endsWith","greaterThan","lessThan","between"];function Qe(e,t="id"){let A=e?.[t];return A==null?"":String(A)}function ht(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function xo(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let A=Number(t);return Number.isFinite(A)?A:null}function ko(e){if(e instanceof Date)return e.getTime();let t=new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null}function Do(e){return(Array.isArray(e)?e:typeof e=="string"?e.split(","):[]).map(A=>String(A).trim()).filter(Boolean)}function gn(e,t){let A=ht(t);return e.columns.find(n=>ht(n.key)===A||ht(n.label)===A)}function BA(e,t){return e.data.find(A=>Qe(A,e.rowKey)===t)}function Lg(e,t){return e[t]}function Yg(e,t,A){let n=Lg(e,A.key),o=A.type??"text";if(o==="number"||o==="date"){let s=o==="number"?xo:ko,g=s(n);if(g===null)return!1;if(t.operator==="between"){let[l,u]=t.value,I=s(l),d=s(u);return I!==null&&d!==null&&g>=Math.min(I,d)&&g<=Math.max(I,d)}let a=s(t.value);if(a===null)return!1;switch(t.operator){case"equals":return g===a;case"greaterThan":return g>a;case"lessThan":return g<a;default:break}}let r=ht(n),i=ht(t.value);switch(t.operator){case"equals":return r===i;case"startsWith":return r.startsWith(i);case"endsWith":return r.endsWith(i);case"contains":return r.includes(i);default:return!1}}function Ug(e,t){let A=t.type??"text",n=A==="date"?ko:xo;return e.operator==="between"?A==="text"||!Array.isArray(e.value)||e.value.length!==2?!1:n(e.value[0])!==null&&n(e.value[1])!==null:e.operator==="greaterThan"||e.operator==="lessThan"?A!=="text"&&n(e.value)!==null:!Array.isArray(e.value)&&String(e.value).trim()!==""}function nt(e,t,A){return A.length?So({data:e,columns:t},A):e}function yt(e){return e.map(t=>({key:String(t.key),label:t.label,type:t.type==="number"?"number":t.type==="date"?"date":"text"}))}function So(e,t){return e.data.filter(A=>t.every(n=>{let o=gn(e,n.key);return o?Yg(A,n,o):!0}))}function Go(e,t){let A=Te(e),n=ht(t);if(!n)return le("INVALID_INPUT",A.emptyQuery);let o=e.data.filter(i=>e.columns.some(s=>ht(i[s.key]).includes(n))),r=o.map(i=>Qe(i,e.rowKey)).filter(Boolean);return e.onHighlightRows?.(r),Je(A.found(o.length),o)}function vo(e){return Je(Te(e).count(e.data.length),e.data.length)}function Ro(e){return Je(Te(e).columns,e.columns)}function No(e,t){let A=Te(e),n=String(t??"").trim();if(!n)return le("INVALID_INPUT",A.noIds);let o=BA(e,n);return o?Je(A.rowFound,o):le("NOT_FOUND",A.notFound(n))}function Ot(e,t){let A=Te(e),n=Do(t);if(n.length===0)return le("INVALID_INPUT",A.noIds);if(!e.onHighlightRows)return le("NOT_SUPPORTED",A.notSupported("highlight"));let o=n.filter(r=>BA(e,r)!==void 0);return o.length===0?le("NOT_FOUND",A.noneFound):(e.onHighlightRows(o),Je(A.highlighted(o.length),o))}function bA(e,t){let A=Te(e),n=String(t??"").trim();return n?e.onSelectRow?BA(e,n)?(e.onSelectRow(n),Je(A.selected(n),n)):le("NOT_FOUND",A.notFound(n)):le("NOT_SUPPORTED",A.notSupported("select")):le("INVALID_INPUT",A.noIds)}function EA(e,t){let A=Te(e),n=String(t??"").trim();return n?e.onOpenRow?BA(e,n)?(e.onOpenRow(n),Je(A.opened(n),n)):le("NOT_FOUND",A.notFound(n)):le("NOT_SUPPORTED",A.notSupported("open")):le("INVALID_INPUT",A.noIds)}function Fo(e,t){let A=Te(e),n=gn(e,t?.key??"");if(!n)return le("INVALID_INPUT",A.unknownColumn(String(t?.key??"")));if(!wo.includes(t.operator))return le("INVALID_INPUT",A.badOperator(String(t.operator)));let o={...t,key:n.key};if(!Ug(o,n))return le("INVALID_INPUT",A.badValue);if(!e.onFiltersChange)return le("NOT_SUPPORTED",A.notSupported("filter"));let r=[...(e.filters??[]).filter(s=>s.key!==n.key),o],i=So(e,r).length;return e.onFiltersChange(r),Je(A.filtered(i),{filters:r,count:i})}function To(e){let t=Te(e);return e.onFiltersChange?(e.onFiltersChange([]),Je(t.filtersCleared,[])):le("NOT_SUPPORTED",t.notSupported("clear filters"))}function Mo(e,t,A="asc"){let n=Te(e),o=gn(e,t);if(!o)return le("INVALID_INPUT",n.unknownColumn(String(t)));if(A!=="asc"&&A!=="desc")return le("INVALID_INPUT",n.badValue);if(!e.onSortChange)return le("NOT_SUPPORTED",n.notSupported("sort"));let r={key:o.key,direction:A};return e.onSortChange(r),Je(n.sorted(o.label,A),r)}function Lo(e){let t=Te(e);return e.onSortChange?(e.onSortChange(null),Je(t.sortCleared,null)):le("NOT_SUPPORTED",t.notSupported("clear sort"))}var Jg={search:"Search all columns for text. Matching rows are highlighted.",count:"Count the rows currently in the grid.",columns:"List the grid's columns with their keys, labels and types.",get_row:"Get one row by its ID.",highlight:"Highlight one or more rows by ID without filtering the grid.",select:"Select one row by ID.",open:"Open one row by ID to show its full details.",filter:"Filter the grid by one column. Replaces any existing filter on that column.",clear_filters:"Remove all filters.",sort:"Sort the grid by one column, ascending or descending.",clear_sort:"Remove sorting."},Eo={en:{search:"Search",count:"Count",columns:"Columns",get_row:"Get row",highlight:"Highlight",select:"Select",open:"Open",filter:"Filter",clear_filters:"Clear filters",sort:"Sort",clear_sort:"Clear sort"},te:{search:"\u0C35\u0C46\u0C24\u0C41\u0C15\u0C41",count:"\u0C32\u0C46\u0C15\u0C4D\u0C15",columns:"\u0C15\u0C3E\u0C32\u0C2E\u0C4D\u200C\u0C32\u0C41",get_row:"\u0C35\u0C30\u0C41\u0C38 \u0C1A\u0C42\u0C2A\u0C41",highlight:"\u0C39\u0C48\u0C32\u0C48\u0C1F\u0C4D",select:"\u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B",open:"\u0C24\u0C46\u0C30\u0C41\u0C35\u0C41",filter:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D",clear_filters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F",sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02",clear_sort:"\u0C15\u0C4D\u0C30\u0C2E\u0C02 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F"}};async function Pg(e,t){try{return t()}catch{return le("INTERNAL",Te(e).internal)}}function Xt(e,t={}){let A=t.name??"yuktai_grid",n=Eo[e.locale??"en"],o=g=>t.descriptions?.[g]??Jg[g],r={id:{type:"string",description:"Row ID"}},i=e.columns.map(g=>g.key);return[{id:"search",available:!0,schema:{type:"object",properties:{query:{type:"string"}},required:["query"]},run:g=>Go(e,String(g.query??""))},{id:"count",available:!0,schema:{type:"object",properties:{}},run:()=>vo(e)},{id:"columns",available:!0,schema:{type:"object",properties:{}},run:()=>Ro(e)},{id:"get_row",available:!0,schema:{type:"object",properties:r,required:["id"]},run:g=>No(e,String(g.id??""))},{id:"highlight",available:!!e.onHighlightRows,schema:{type:"object",properties:{ids:{type:"array",items:{type:"string"},description:"Row IDs"}},required:["ids"]},run:g=>Ot(e,Do(g.ids))},{id:"select",available:!!e.onSelectRow,schema:{type:"object",properties:r,required:["id"]},run:g=>bA(e,String(g.id??""))},{id:"open",available:!!e.onOpenRow,schema:{type:"object",properties:r,required:["id"]},run:g=>EA(e,String(g.id??""))},{id:"filter",available:!!e.onFiltersChange,schema:{type:"object",properties:{key:{type:"string",enum:i},operator:{type:"string",enum:wo},value:{description:"Text or number; for 'between' an array of two numbers or dates"}},required:["key","operator","value"]},run:g=>Fo(e,{key:String(g.key??""),operator:String(g.operator??""),value:g.value})},{id:"clear_filters",available:!!e.onFiltersChange,schema:{type:"object",properties:{}},run:()=>To(e)},{id:"sort",available:!!e.onSortChange,schema:{type:"object",properties:{key:{type:"string",enum:i},direction:{type:"string",enum:["asc","desc"]}},required:["key"]},run:g=>Mo(e,String(g.key??""),g.direction==="desc"?"desc":"asc")},{id:"clear_sort",available:!!e.onSortChange,schema:{type:"object",properties:{}},run:()=>Lo(e)}].filter(g=>g.available).map(g=>({name:`${A}_${g.id}`,title:Eo.en[g.id],description:o(g.id),label:n[g.id],inputSchema:g.schema,execute:a=>Pg(e,()=>g.run(a??{}))}))}var qg={en:{done:"Done.",toolMissing:e=>`The action "${e}" is not available here.`,missingInput:e=>`Missing: ${e}.`,notUnderstood:"Sorry, I didn't understand. Try: a word to search, \u201Csort by <column>\u201D, or \u201Cclear filters\u201D.",noMatch:e=>`Nothing matched "${e}".`,failed:"Something went wrong while running this action."},te:{done:"\u0C2A\u0C42\u0C30\u0C4D\u0C24\u0C2F\u0C3F\u0C02\u0C26\u0C3F.",toolMissing:e=>`"${e}" \u0C38\u0C4C\u0C15\u0C30\u0C4D\u0C2F\u0C02 \u0C07\u0C15\u0C4D\u0C15\u0C21 \u0C05\u0C02\u0C26\u0C41\u0C2C\u0C3E\u0C1F\u0C41\u0C32\u0C4B \u0C32\u0C47\u0C26\u0C41.`,missingInput:e=>`\u0C07\u0C35\u0C3F \u0C15\u0C3E\u0C35\u0C3E\u0C32\u0C3F: ${e}.`,notUnderstood:"\u0C15\u0C4D\u0C37\u0C2E\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F, \u0C05\u0C30\u0C4D\u0C25\u0C02 \u0C15\u0C3E\u0C32\u0C47\u0C26\u0C41. \u0C07\u0C32\u0C3E \u0C2A\u0C4D\u0C30\u0C2F\u0C24\u0C4D\u0C28\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F: \u0C35\u0C46\u0C24\u0C15\u0C3E\u0C32\u0C4D\u0C38\u0C3F\u0C28 \u0C2A\u0C26\u0C02, \u201C<\u0C15\u0C3E\u0C32\u0C2E\u0C4D> \u0C2A\u0C4D\u0C30\u0C15\u0C3E\u0C30\u0C02 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u201D, \u0C32\u0C47\u0C26\u0C3E \u201C\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C3F\u201D.",noMatch:e=>`"${e}" \u0C15\u0C3F \u0C0F\u0C2E\u0C40 \u0C38\u0C30\u0C3F\u0C2A\u0C4B\u0C32\u0C47\u0C26\u0C41.`,failed:"\u0C08 \u0C2A\u0C28\u0C3F \u0C1A\u0C47\u0C38\u0C4D\u0C24\u0C41\u0C02\u0C21\u0C17\u0C3E \u0C38\u0C2E\u0C38\u0C4D\u0C2F \u0C35\u0C1A\u0C4D\u0C1A\u0C3F\u0C02\u0C26\u0C3F."}},Yo=e=>e.normalize("NFC").toLowerCase().trim(),ot={clearFilters:/\b(clear|remove|reset)\b.*\bfilters?\b|ఫిల్టర్.*(తీసే|తొలగ)/i,clearSort:/\b(clear|remove|reset)\b.*\bsort(ing)?\b|క్రమం.*(తీసే|తొలగ)/i,count:/^\s*(how many|count)\b|ఎన్ని|లెక్క/i,sort:/\bsort\b|\border by\b|క్రమ|అమర్చ|సార్ట్/i,desc:/\b(desc|descending|z\s*-\s*a|highest|largest|most)\b|అవరోహణ|తగ్గే|పెద్ద|అధిక|చివర|ఎక్కువ నుండి/i,openEn:/^\s*open\s+(.+?)\s*$/i,openTe:/^\s*(.+?)\s*(తెరువు|తెరవండి|తెరవు)\s*$/,searchFiller:/^\s*(search(\s+for)?|find|show(\s+me)?|filter(\s+by)?|look\s+for|వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s+|\s+(వెతుకు|వెతకండి|శోధించు|శోధించండి|చూపించు|చూపించండి)\s*$/gi};function Hg(e,t){let A=Yo(e),n=null;for(let o of t)for(let r of[o.label,o.key]){let i=Yo(r);i&&A.includes(i)&&(!n||i.length>n.len)&&(n={key:o.key,len:i.length})}return n?.key??null}function Jo(e,t){let A=(e??"").trim();if(!A)return null;if(ot.clearFilters.test(A))return{kind:"tool",tool:"clear_filters",input:{}};if(ot.clearSort.test(A))return{kind:"tool",tool:"clear_sort",input:{}};if(ot.count.test(A))return{kind:"tool",tool:"count",input:{}};if(ot.sort.test(A)){let r=Hg(A,t.columns);return r?{kind:"tool",tool:"sort",input:{key:r,direction:ot.desc.test(A)?"desc":"asc"}}:null}let n=A.match(ot.openEn)??A.match(ot.openTe);if(n?.[1])return{kind:"open",text:n[1].trim()};let o=A.replace(ot.searchFiller,"").trim();return o?{kind:"tool",tool:"search",input:{query:o}}:null}function $g(e){return!!e&&typeof e=="object"&&typeof e.success=="boolean"&&typeof e.message=="string"}function Wg(e,t){let A=e.inputSchema?.required;return Array.isArray(A)?A.map(String).filter(n=>t[n]===void 0||t[n]===null||String(t[n]).trim()===""):[]}function zg(e,t){let A=e.find(o=>o.name===t);if(A)return A;let n=e.filter(o=>o.name.endsWith(`_${t}`)).sort((o,r)=>o.name.length-r.name.length);if(n.length!==0&&!(n.length>1&&n[0].name.length===n[1].name.length))return n[0]}function Uo(e){return e.normalize("NFC").trim().toLocaleLowerCase()}function Og(e,t){let A=Uo(e);return t.find(n=>n.phrases.some(o=>{let r=Uo(o);return r.length>0&&A.includes(r)}))}function xA({tools:e,data:t=[],onResult:A,onError:n,locale:o="en",columns:r=[],rowKey:i="id",parseIntent:s,customRules:g=[],historyLimit:a=20}){let l=qg[o],[u,I]=wA(0),[d,m]=wA(null),[f,c]=wA(null),[C,y]=wA([]),p=ln({tools:e,data:t,onResult:A,onError:n,columns:r,rowKey:i,parseIntent:s,customRules:g,historyLimit:a,m:l,locale:o});p.current={tools:e,data:t,onResult:A,onError:n,columns:r,rowKey:i,parseIntent:s,customRules:g,historyLimit:a,m:l,locale:o};let B=ln(!0),h=ln(0);Kg(()=>(B.current=!0,()=>{B.current=!1}),[]);let E=Vt((S,D,b,z,O)=>{B.current&&(O===h.current&&m(b),y(Y=>[...Y,{id:O,tool:S,input:D,result:b,source:z,at:Date.now()}].slice(-p.current.historyLimit)))},[]),w=Vt(async(S,D,b)=>{let{tools:z,onResult:O,onError:Y,m:ie}=p.current,se=++h.current,N=zg(z,S);if(!N){let T={success:!1,message:ie.toolMissing(S),error:{code:"NOT_SUPPORTED"}},F=new Error(T.message);return B.current&&c(F),Y?.(F),E(S,D,T,b,se),T}let q=Wg(N,D);if(q.length){let T={success:!1,message:ie.missingInput(q.join(", ")),error:{code:"INVALID_INPUT"},tool:N.name};return E(N.name,D,T,b,se),O?.(T),T}B.current&&I(T=>T+1);try{let T=await N.execute(D),F=$g(T)?{...T,tool:N.name}:{success:!0,message:ie.done,data:T,tool:N.name};return B.current&&F.success&&c(null),E(N.name,D,F,b,se),O?.(F),F}catch(T){let F=T instanceof Error?T:new Error(String(T)),te={success:!1,message:ie.failed,error:{code:"INTERNAL"},tool:N.name};return B.current&&c(F),Y?.(F),E(N.name,D,te,b,se),te}finally{B.current&&I(T=>Math.max(0,T-1))}},[E]),G=Vt((S,D={})=>w(S,D??{},"tool"),[w]),U=Vt(async S=>{let{columns:D,locale:b,parseIntent:z,customRules:O,data:Y,m:ie,rowKey:se}=p.current,N=Og(S,O??[]);if(N){let P={input:S,data:Y,columns:D,executeTool:G};try{let fe={success:!0,message:await N.execute(P),tool:`rule:${N.name}`};return E(`rule:${N.name}`,{text:S},fe,"ask",++h.current),p.current.onResult?.(fe),fe}catch(oe){let fe=oe instanceof Error?oe:new Error(String(oe)),he={success:!1,message:ie.failed,error:{code:"INTERNAL"},tool:`rule:${N.name}`};return B.current&&c(fe),p.current.onError?.(fe),E(`rule:${N.name}`,{text:S},he,"ask",++h.current),he}}let T=(z??Jo)(S,{columns:D,locale:b});if(!T){let P={success:!1,message:ie.notUnderstood,error:{code:"NOT_UNDERSTOOD"}};return E("ask",{text:S},P,"ask",++h.current),P}if(T.kind==="tool")return w(T.tool,T.input,"ask");let F=await w("search",{query:T.text},"ask"),te=Array.isArray(F.data)?F.data:[];if(!F.success)return F;if(te.length===0){let P={success:!1,message:ie.noMatch(T.text),error:{code:"NOT_FOUND"},tool:F.tool};return E("open",{text:T.text},P,"ask",++h.current),P}return w("open",{id:Qe(te[0],se)},"ask")},[G,E,w]),W=Vt(()=>{y([]),m(null),c(null)},[]);return{loading:u>0,tools:e,executeTool:G,ask:U,lastResult:d,lastError:f,history:C,clearHistory:W}}var Xg=xA;import{useEffect as Vg,useMemo as jg,useRef as cn}from"react";function Zg(e){return JSON.stringify(e.map(t=>[t.name,t.title,t.description,t.inputSchema]))}function _g({tools:e,data:t=[],columns:A=[],rowKey:n,locale:o,onSelectRow:r,onHighlightRows:i,onOpenRow:s,name:g="yuktai_grid",descriptions:a,onStatusChange:l}){let u=jg(()=>e||Xt({data:t,columns:A,rowKey:n,locale:o,onSelectRow:r,onHighlightRows:i,onOpenRow:s},{name:g,descriptions:a}),[e,t,A,n,o,r,i,s,g,a]),I=cn(u);I.current=u;let d=cn(l);d.current=l;let m=cn(Promise.resolve()),f=Zg(u);return Vg(()=>{let c=h=>d.current?.(h),C=typeof document<"u"?document.modelContext:void 0;if(!C?.registerTool){c({state:"unsupported",registered:[],errors:[]});return}let y=new AbortController,p=I.current,B=m.current.then(async()=>{if(y.signal.aborted)return;c({state:"registering",registered:[],errors:[]});let h=[],E=[];for(let w of p){if(y.signal.aborted)return;try{await C.registerTool({name:w.name,title:w.title,description:w.description,inputSchema:w.inputSchema,execute:G=>{let U=I.current.find(W=>W.name===w.name);return U?U.execute(G??{}):{success:!1,message:`Tool "${w.name}" is no longer available.`,error:{code:"NOT_SUPPORTED"}}}},{signal:y.signal}),h.push(w.name)}catch(G){E.push({tool:w.name,message:G instanceof Error?G.message:String(G)})}}y.signal.aborted||c({state:E.length===0?"ready":h.length>0?"partial":"error",registered:h,errors:E})});return m.current=B.catch(()=>{}),()=>y.abort()},[f]),null}var kA=_g;import{useEffect as el,useMemo as tl,useState as Al}from"react";function DA(e,t){let A=tn(e,t),[n,o]=Al(()=>A?uo():null);return el(()=>{if(!A||n)return;let r=!0;return nn().then(i=>{r&&i&&o(i)}),()=>{r=!1}},[A,n]),tl(()=>A&&n?Ht.create(n):null,[A,n])}function Po(e,t){return e.map(A=>t.map(n=>String(A[n.key]??"").toLowerCase()).join($t))}function nl(e,t){let A=new Float64Array(e.length),n=0;for(let o=0;o<e.length;o++){let r=e[o][t];if(r==null){A[o]=NaN;continue}if(typeof r!="number"||Number.isNaN(r))return null;A[o]=r,n++}return n?A:null}function Ko(e){return e.search==="rust"||e.sort==="rust"?"rust":e.search||e.sort?"ts":null}function qo({data:e,columns:t,searchText:A,filters:n,toolColumns:o,sortKey:r,sortDirection:i,locale:s,core:g=null,searchReady:a=!1,stats:l}){let u=[...e];if(l&&(l.search=null,l.sort=null),A.trim()){let I=A.trim().toLowerCase(),d=g&&a?g.search(I):null;l&&(l.search=d?"rust":"ts"),d?u=Rt(e,d):u=u.filter(m=>t.some(f=>String(m[f.key]??"").toLowerCase().includes(I)))}if(n.length&&(u=nt(u,o,n)),r){if(g){let I=nl(u,r),d=I&&g.sortByKeys(I,i!=="asc");if(d)return l&&(l.sort="rust"),Rt(u,d)}l&&(l.sort="ts"),u.sort((I,d)=>{let m=I[r],f=d[r];if(m==null&&f==null)return 0;if(m==null)return 1;if(f==null)return-1;if(typeof m=="number"&&typeof f=="number")return i==="asc"?m-f:f-m;let c=String(m).localeCompare(String(f),s,{numeric:!0,sensitivity:"base"});return i==="asc"?c:-c})}return u}import{jsx as J,jsxs as Ce}from"react/jsx-runtime";var ol={"en-US":{search:"Search...",searchAria:"Search grid",rows:"rows",row:"row",loading:"Loading...",noData:"No data found.",selectRow:"Select row",pageSize:"Page size",page:"Page",of:"of",previous:"Previous",next:"Next",yes:"Yes",no:"No",sortAscending:"Sort ascending",sortDescending:"Sort descending",filtersActive:e=>`${e} filter(s) applied`,clearFilters:"Clear filters"},"te-IN":{search:"\u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F...",searchAria:"\u0C17\u0C4D\u0C30\u0C3F\u0C21\u0C4D\u200C\u0C32\u0C4B \u0C36\u0C4B\u0C27\u0C3F\u0C02\u0C1A\u0C02\u0C21\u0C3F",rows:"\u0C35\u0C30\u0C41\u0C38\u0C32\u0C41",row:"\u0C35\u0C30\u0C41\u0C38",loading:"\u0C32\u0C4B\u0C21\u0C4D \u0C05\u0C35\u0C41\u0C24\u0C4B\u0C02\u0C26\u0C3F...",noData:"\u0C21\u0C47\u0C1F\u0C3E \u0C15\u0C28\u0C2C\u0C21\u0C32\u0C47\u0C26\u0C41.",selectRow:"\u0C35\u0C30\u0C41\u0C38\u0C28\u0C41 \u0C0E\u0C02\u0C1A\u0C41\u0C15\u0C4B\u0C02\u0C21\u0C3F",pageSize:"\u0C2A\u0C47\u0C1C\u0C40 \u0C2A\u0C30\u0C3F\u0C2E\u0C3E\u0C23\u0C02",page:"\u0C2A\u0C47\u0C1C\u0C40",of:"\u0C32\u0C4B",previous:"\u0C35\u0C46\u0C28\u0C41\u0C15\u0C15\u0C41",next:"\u0C2E\u0C41\u0C02\u0C26\u0C41\u0C15\u0C41",yes:"\u0C05\u0C35\u0C41\u0C28\u0C41",no:"\u0C15\u0C3E\u0C26\u0C41",sortAscending:"\u0C06\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",sortDescending:"\u0C05\u0C35\u0C30\u0C4B\u0C39\u0C23 \u0C15\u0C4D\u0C30\u0C2E\u0C02\u0C32\u0C4B \u0C05\u0C2E\u0C30\u0C4D\u0C1A\u0C02\u0C21\u0C3F",filtersActive:e=>`${e} \u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D(\u0C32\u0C41) \u0C35\u0C47\u0C36\u0C3E\u0C30\u0C41`,clearFilters:"\u0C2B\u0C3F\u0C32\u0C4D\u0C1F\u0C30\u0C4D\u0C32\u0C41 \u0C24\u0C40\u0C38\u0C47\u0C2F\u0C02\u0C21\u0C3F"}};function il({size:e=20,color:t="currentColor",strokeWidth:A=2.4}){return Ce("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:[J("circle",{cx:"11",cy:"11",r:"6.5"}),J("path",{d:"m16 16 5 5"})]})}function rl({size:e=18,color:t="currentColor",strokeWidth:A=2.4,label:n}){return Ce("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":n?void 0:!0,"aria-label":n,role:n?"img":void 0,children:[n?J("title",{children:n}):null,J("path",{d:"m6 15 6-6 6 6"})]})}function sl({size:e=18,color:t="currentColor",strokeWidth:A=2.4,label:n}){return Ce("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":n?void 0:!0,"aria-label":n,role:n?"img":void 0,children:[n?J("title",{children:n}):null,J("path",{d:"m6 9 6 6 6-6"})]})}function al({size:e=20,color:t="currentColor",strokeWidth:A=2.4}){return J("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:J("path",{d:"m15 18-6-6 6-6"})})}function gl({size:e=20,color:t="currentColor",strokeWidth:A=2.4}){return J("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:J("path",{d:"m9 18 6-6-6-6"})})}function Ho({size:e=18,color:t="currentColor",strokeWidth:A=2.4}){return J("svg",{width:e,height:e,viewBox:"0 0 24 24",fill:"none",stroke:t,strokeWidth:A,strokeLinecap:"round",strokeLinejoin:"round","aria-hidden":"true",children:J("path",{d:"m5 12 4 4L19 6"})})}function ll({data:e,columns:t,rowKey:A="id",view:n="auto",mobileBreakpoint:o=768,theme:r="default",locale:i="en-US",ai:s=!1,search:g=!0,selectable:a=!1,selectedKeys:l=[],onSelectionChange:u,pagination:I,loading:d=!1,highlightIds:m=[],highlightColor:f="#fff3a3",autoScrollToHighlight:c=!1,onRowClick:C,onSortChange:y,empty:p,className:B="",inputLanguage:h,toolName:E="yuktai_grid",toolDescriptions:w,webmcp:G=!1,onWebMCPStatusChange:U,onAgentResult:W,customRules:S=[],engine:D="ts",showSearchTime:b=!1,onSearchTime:z}){let O=i==="te-IN"?"te-IN":"en-US",Y=ol[O],ie=s===!0||typeof s=="object"&&s!==null,se=I!==!1&&I!==void 0,N=typeof I=="object"?I.pageSize??20:20,q=typeof I=="object"&&I.sizeOptions&&I.sizeOptions.length>0?I.sizeOptions:[10,20,50,100],[T,F]=it(""),[te,P]=it(1),[oe,fe]=it(N),[he,L]=it(),[re,ke]=it("asc"),[De,ue]=it(!1),[de,Ve]=it([]),[We,ye]=it([]),Me=Qt(()=>yt(t.map(Q=>({key:String(Q.key),label:Q.label,type:Q.type}))),[t]);jt(()=>{fe(N),P(1)},[N]),jt(()=>{let Q=()=>{ue(window.innerWidth<=o)};return Q(),window.addEventListener("resize",Q),()=>{window.removeEventListener("resize",Q)}},[o]);let gt=DA(D,e.length),eA=Qt(()=>gt?gt.setSearchTexts(Po(e,t)):!1,[gt,e,t]),ve=Qt(()=>{let Q={search:null,sort:null},M=typeof performance<"u"?performance.now():Date.now(),H=qo({data:e,columns:t,searchText:T,filters:de,toolColumns:Me,sortKey:he,sortDirection:re,locale:i,core:gt,searchReady:eA,stats:Q}),V=(typeof performance<"u"?performance.now():Date.now())-M;return{rows:H,ms:V,engine:Ko(Q)}},[e,t,T,de,Me,he,re,i,gt,eA]),be=ve.rows;jt(()=>{!z||!ve.engine||z({query:T.trim(),ms:ve.ms,rows:ve.rows.length,engine:ve.engine})},[ve]);let ze=se?Math.max(1,Math.ceil(be.length/oe)):1;jt(()=>{te>ze&&P(ze)},[te,ze]);let Oe=Qt(()=>{let Q=[...m.map(String),...We];return Array.from(new Set(Q))},[m,We]);jt(()=>{if(!c)return;let Q=Oe[0];if(Q==null)return;let M=typeof CSS<"u"&&typeof CSS.escape=="function"?CSS.escape(String(Q)):String(Q).replace(/["\\]/g,"\\$&");document.querySelector(`[data-yuktai-row-id="${M}"]`)?.scrollIntoView({behavior:"smooth",block:"center"})},[Oe,c,te]);let lt=Qt(()=>{if(!se)return be;let Q=(te-1)*oe;return be.slice(Q,Q+oe)},[be,se,te,oe]),ct=n==="card"||n==="auto"&&De,bt=Q=>String(Q[A]??""),It=Q=>l.some(M=>String(M)===Q),ut=Q=>Oe.some(M=>String(M)===Q),dt=Q=>{if(!a)return;let M=bt(Q),H=It(M)?l.filter(V=>String(V)!==M):[...l,M];u?.(H)},je=Q=>{if(Q.sortable===!1)return;let M=String(Q.key),H=he===M&&re==="asc"?"desc":"asc";L(M),ke(H),P(1),y?.({key:M,direction:H})},MA=Q=>{F(Q),P(1)},tA=(Q,M)=>{let H=t.find(V=>String(V.key)===Q||V.label.toLowerCase()===Q.toLowerCase());H&&(L(String(H.key)),ke(M),P(1),y?.({key:String(H.key),direction:M}))},Et=O==="te-IN"?"te":"en",Mt=In(Q=>{Q?(L(Q.key),ke(Q.direction)):(L(void 0),ke("asc")),P(1),y?.(Q)},[y]),Lt=In(Q=>{Ve(Q),P(1)},[]),AA=In(Q=>{if(ye(Q),se&&Q.length){let M=be.findIndex(H=>String(H[A]??"")===Q[0]);M>=0&&P(Math.floor(M/oe)+1)}},[se,be,A,oe]),Yt=Qt(()=>Xt({data:e,columns:Me,rowKey:String(A),locale:Et,filters:de,onHighlightRows:AA,onFiltersChange:Lt,onSortChange:Mt,onOpenRow:C?Q=>{let M=be.findIndex(V=>String(V[A]??"")===Q),H=M>=0?be[M]:e.find(V=>String(V[A]??"")===Q);H&&C(H,Math.max(M,0))}:void 0,onSelectRow:a&&u?Q=>{l.some(M=>String(M)===Q)||u([...l.map(String),Q])}:void 0},{name:E,descriptions:w}),[e,Me,A,Et,de,AA,Lt,Mt,C,be,a,u,l,E,w]),wt=xA({tools:Yt,data:e,locale:Et,columns:Me,rowKey:String(A),customRules:S,onResult:W}),nA=Qt(()=>Yt.map(Q=>({...Q,execute:M=>wt.executeTool(Q.name,M)})),[Yt,wt.executeTool]),Ct=()=>{Ve([]),P(1)},Ze=(Q,M,H)=>{if(M.render)return M.render(Q[M.key],Q,H);let V=Q[M.key];if(V==null)return"";if(M.type==="date"){let Be=new Date(String(V));if(!Number.isNaN(Be.getTime()))return Be.toLocaleDateString(i)}return M.type==="boolean"?V?Y.yes:Y.no:String(V)},_=r==="dark",qe={width:"100%",overflow:"hidden",border:r==="high-contrast"?"2px solid #000000":_?"1px solid #334155":"1px solid #e2e8f0",borderRadius:12,background:_?"#0f172a":"#ffffff",color:_?"#f8fafc":"#0f172a",fontFamily:r==="dyslexia"?"Arial, sans-serif":void 0},YA={padding:12,display:"flex",alignItems:"center",gap:12,flexWrap:"wrap",borderBottom:_?"1px solid #334155":"1px solid #e2e8f0"},k=Q=>({width:40,height:40,minWidth:40,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:8,border:_?"1px solid #475569":"1px solid #cbd5e1",background:Q?_?"#1e293b":"#f8fafc":_?"#1e293b":"#ffffff",color:Q?"#94a3b8":_?"#f8fafc":"#0f172a",cursor:Q?"not-allowed":"pointer",opacity:Q?.55:1});if(d)return Ce("div",{className:B,style:qe,children:[G&&J(kA,{tools:nA,onStatusChange:U}),J("div",{style:{padding:32,textAlign:"center"},children:Y.loading})]});let X=t.map(Q=>({key:String(Q.key),label:Q.label,type:Q.type==="number"?"number":Q.type==="date"?"date":"text"}));return Ce("div",{className:B,style:qe,children:[G&&J(kA,{tools:nA,onStatusChange:U}),(g||ie||de.length>0)&&Ce("div",{style:YA,children:[g&&Ce("div",{style:{position:"relative",width:"100%",maxWidth:420},children:[J("div",{style:{position:"absolute",left:12,top:"50%",transform:"translateY(-50%)",display:"flex",alignItems:"center",color:_?"#cbd5e1":"#64748b",pointerEvents:"none"},children:J(il,{size:19})}),J("input",{value:T,onChange:Q=>{F(Q.target.value),P(1)},placeholder:Y.search,"aria-label":Y.searchAria,style:{width:"100%",padding:"10px 12px 10px 40px",borderRadius:8,border:_?"1px solid #475569":"1px solid #cbd5e1",background:_?"#1e293b":"#ffffff",color:_?"#ffffff":"#0f172a",outline:"none",boxSizing:"border-box"}})]}),de.length>0&&Ce("button",{type:"button",onClick:Ct,title:Y.clearFilters,style:{padding:"6px 10px",borderRadius:999,border:_?"1px solid #475569":"1px solid #cbd5e1",background:_?"#1e293b":"#f1f5f9",color:"inherit",fontSize:12,cursor:"pointer"},children:[Y.filtersActive(de.length)," \u2715"]}),Ce("div",{style:{marginLeft:"auto",fontSize:13,opacity:.7,whiteSpace:"nowrap"},children:[be.length," ",be.length===1?Y.row:Y.rows,b&&ve.engine&&Ce("span",{title:ve.engine==="rust"?"Rust (WebAssembly)":"TypeScript",children:[" \xB7 ",CA(ve.ms)," \xB7 ",ve.engine==="rust"?"Rust":"TS"]})]}),ie&&J(an,{data:e,columns:X,onSearch:MA,onSort:tA,theme:_?"dark":"light",language:O,inputLanguage:h??O,agent:{ask:wt.ask,loading:wt.loading},embedded:!0})]}),be.length===0?J("div",{style:{padding:40,textAlign:"center",opacity:.7},children:p??Y.noData}):ct?J("div",{style:{display:"grid",gap:12,padding:12},children:lt.map((Q,M)=>{let H=bt(Q),V=It(H),Be=ut(H);return Ce("div",{"data-yuktai-row-id":H,onClick:()=>C?.(Q,M),style:{padding:14,borderRadius:10,border:_?"1px solid #334155":"1px solid #e2e8f0",background:Be?f:V?_?"#1e3a5f":"#eff6ff":_?"#1e293b":"#ffffff",cursor:C?"pointer":"default"},children:[a&&J("button",{type:"button",onClick:Re=>{Re.stopPropagation(),dt(Q)},"aria-label":`${Y.selectRow} ${H}`,"aria-pressed":V,style:{width:32,height:32,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,marginBottom:10,borderRadius:7,border:V?"1px solid #2563eb":"1px solid #cbd5e1",background:V?"#2563eb":"transparent",color:V?"#ffffff":"currentColor",cursor:"pointer"},children:V&&J(Ho,{size:17})}),t.map(Re=>Ce("div",{style:{display:"flex",gap:8,padding:"5px 0",alignItems:"flex-start"},children:[J("strong",{style:{minWidth:100,opacity:.7},children:Re.label}),J("span",{children:Ze(Q,Re,M)})]},String(Re.key)))]},H)})}):J("div",{style:{width:"100%",overflowX:"auto"},children:Ce("table",{style:{width:"100%",borderCollapse:"collapse"},children:[J("thead",{children:Ce("tr",{children:[a&&J("th",{style:{padding:10,borderBottom:_?"1px solid #334155":"1px solid #e2e8f0",width:52}}),t.filter(Q=>!(De&&Q.hiddenOnMobile)).map(Q=>{let M=he===String(Q.key);return J("th",{onClick:()=>je(Q),style:{padding:10,textAlign:Q.align??"left",borderBottom:_?"1px solid #334155":"1px solid #e2e8f0",whiteSpace:"nowrap",cursor:Q.sortable===!1?"default":"pointer",width:Q.width,userSelect:"none"},children:Ce("span",{style:{display:"inline-flex",alignItems:"center",gap:5},children:[Q.label,M&&(re==="asc"?J(rl,{size:17,label:Y.sortAscending}):J(sl,{size:17,label:Y.sortDescending}))]})},String(Q.key))})]})}),J("tbody",{children:lt.map((Q,M)=>{let H=bt(Q),V=It(H),Be=ut(H);return Ce("tr",{"data-yuktai-row-id":H,onClick:()=>C?.(Q,M),style:{background:Be?f:V?_?"#1e3a5f":"#eff6ff":"transparent",cursor:C?"pointer":"default"},children:[a&&J("td",{style:{padding:10,borderBottom:_?"1px solid #334155":"1px solid #e2e8f0"},children:J("button",{type:"button",onClick:Re=>{Re.stopPropagation(),dt(Q)},"aria-label":`${Y.selectRow} ${H}`,"aria-pressed":V,style:{width:28,height:28,display:"inline-flex",alignItems:"center",justifyContent:"center",padding:0,borderRadius:6,border:V?"1px solid #2563eb":_?"1px solid #64748b":"1px solid #cbd5e1",background:V?"#2563eb":"transparent",color:V?"#ffffff":"currentColor",cursor:"pointer"},children:V&&J(Ho,{size:16})})}),t.filter(Re=>!(De&&Re.hiddenOnMobile)).map(Re=>J("td",{style:{padding:10,textAlign:Re.align??"left",borderBottom:_?"1px solid #334155":"1px solid #e2e8f0"},children:Ze(Q,Re,M)},String(Re.key)))]},H)})})]})}),se&&Ce("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",gap:12,flexWrap:"wrap",padding:12,borderTop:_?"1px solid #334155":"1px solid #e2e8f0"},children:[Ce("span",{style:{fontSize:13,opacity:.7},children:[Y.page," ",te," ",Y.of," ",ze]}),Ce("div",{style:{display:"flex",alignItems:"center",gap:8,flexWrap:"wrap"},children:[typeof I=="object"&&I.showSizeChanger&&J("select",{value:oe,onChange:Q=>{let M=Number(Q.target.value);!Number.isFinite(M)||M<=0||(fe(M),P(1))},"aria-label":Y.pageSize,style:{minHeight:40,padding:"7px 10px",borderRadius:8,border:_?"1px solid #475569":"1px solid #cbd5e1",background:_?"#1e293b":"#ffffff",color:_?"#ffffff":"#0f172a"},children:q.map(Q=>J("option",{value:Q,children:Q},Q))}),J("button",{type:"button",disabled:te<=1,onClick:()=>P(Q=>Math.max(1,Q-1)),"aria-label":Y.previous,title:Y.previous,style:k(te<=1),children:J(al,{size:20})}),J("button",{type:"button",disabled:te>=ze,onClick:()=>P(Q=>Math.min(ze,Q+1)),"aria-label":Y.next,title:Y.next,style:k(te>=ze),children:J(gl,{size:20})})]})]})]})}import{useState as Ft,useMemo as Bt,useCallback as Pe,useEffect as un}from"react";function $o(e){return e===!1?Number.MAX_SAFE_INTEGER:e===!0||e===void 0?10:e.pageSize??10}function dn(e){return String(e??"").normalize("NFC").toLowerCase().trim()}function SA(e){return e==null||typeof e=="string"&&e.trim()===""}function Cn(e){if(typeof e=="number")return Number.isFinite(e)?e:null;let t=String(e??"").trim();if(t==="")return null;let A=Number(t);return Number.isFinite(A)?A:null}function pn(e){let t=e instanceof Date?e.getTime():new Date(String(e)).getTime();return Number.isFinite(t)?t:null}function cl(e,t,A,n){if(A==="number"||typeof e=="number"&&typeof t=="number"){let o=Cn(e),r=Cn(t);if(o!==null&&r!==null)return o-r}if(A==="date"||e instanceof Date&&t instanceof Date){let o=pn(e),r=pn(t);if(o!==null&&r!==null)return o-r}return typeof e=="boolean"&&typeof t=="boolean"?e===t?0:e?1:-1:String(e).localeCompare(String(t),n,{sensitivity:"base",numeric:!0})}var rt=()=>typeof performance<"u"?performance.now():Date.now();function Il(e,t){return e.map(A=>t.map(n=>{let o=A[n.key];return o==null?"":dn(o)}).join($t))}function ul(e,t,A){let n=!1,o=!0,r=!0,i=0;for(let a of e){let l=a[t];SA(l)||(i++,typeof l=="number"?n=!0:o=!1,l instanceof Date||(r=!1))}if(i===0)return null;let s=null;if(A==="number"||o?s=Cn:(A==="date"&&!n||r)&&(s=pn),!s)return null;let g=new Float64Array(e.length);for(let a=0;a<e.length;a++){let l=e[a][t];if(SA(l)){g[a]=NaN;continue}let u=s(l);if(u===null)return null;g[a]=u}return g}function dl(e){let{data:t,columns:A,pagination:n=!0,mobileBreakpoint:o=768,locale:r,initialFilters:i=[],engine:s="ts"}=e,g=DA(s,t.length),[a,l]=Ft(null),[u,I]=Ft(""),[d,m]=Ft(i),[f,c]=Ft(1),[C,y]=Ft($o(n)),[p,B]=Ft(!1),h=$o(n);un(()=>{y(h),c(1)},[h]),un(()=>{if(typeof window>"u")return;let L=()=>{B(window.innerWidth<=o)};return L(),window.addEventListener("resize",L),()=>window.removeEventListener("resize",L)},[o]);let E=Bt(()=>yt(A.map(L=>({key:String(L.key),label:L.label,type:L.type}))),[A]),w=Pe(L=>{l(re=>!re||re.key!==L?{key:L,direction:"asc"}:re.direction==="asc"?{key:L,direction:"desc"}:null),c(1)},[]),G=Pe(L=>{l(L&&L.direction?L:null),c(1)},[]),U=Pe(()=>{l(null),c(1)},[]),W=Pe(L=>{I(L),c(1)},[]),S=Pe(L=>{m(L),c(1)},[]),D=Pe(L=>{m(re=>[...re.filter(ke=>ke.key!==L.key),L]),c(1)},[]),b=Pe(L=>{m(re=>re.filter(ke=>ke.key!==L)),c(1)},[]),z=Pe(()=>{m([]),c(1)},[]),O=Pe(L=>{y(Math.max(1,Math.floor(L)||1)),c(1)},[]),Y=Bt(()=>g?g.setSearchTexts(Il(t,A)):!1,[g,t,A]),ie=Bt(()=>{let L=rt(),re=dn(u);if(!re)return{rows:t,ms:0,engine:null};if(g&&Y){let De=g.search(re);if(De)return{rows:Rt(t,De),ms:rt()-L,engine:"rust"}}return{rows:t.filter(De=>A.some(ue=>{let de=De[ue.key];return de==null?!1:dn(de).includes(re)})),ms:rt()-L,engine:"ts"}},[t,u,A,g,Y]),se=ie.rows,N=Bt(()=>{let L=rt();return{rows:nt(se,E,d),ms:rt()-L}},[se,E,d]),q=N.rows,T=Bt(()=>{if(!a||!a.direction)return{rows:q,ms:0,engine:null};let L=rt(),re=A.find(ue=>String(ue.key)===a.key),ke=a.direction==="desc"?-1:1;if(g){let ue=ul(q,a.key,re?.type),de=ue&&g.sortByKeys(ue,ke===-1);if(de)return{rows:Rt(q,de),ms:rt()-L,engine:"rust"}}return{rows:[...q].sort((ue,de)=>{let Ve=ue[a.key],We=de[a.key],ye=SA(Ve),Me=SA(We);return ye&&Me?0:ye?1:Me?-1:ke*cl(Ve,We,re?.type,r)}),ms:rt()-L,engine:"ts"}},[q,a,A,r,g]),F=T.rows,te=Bt(()=>!ie.engine&&!T.engine?null:{query:u.trim(),ms:ie.ms+N.ms+T.ms,rows:q.length,engine:ie.engine==="rust"||T.engine==="rust"?"rust":"ts"},[ie,N,T,u,q.length]),P=Math.max(1,Math.ceil(F.length/C)),oe=Bt(()=>{if(n===!1)return F;let L=(f-1)*C;return F.slice(L,L+C)},[F,f,C,n]);un(()=>{f>P&&c(P)},[f,P]);let fe=Pe(L=>c(Math.min(Math.max(1,Math.floor(L)||1),P)),[P]),he=Pe(()=>{l(null),I(""),m([]),c(1)},[]);return{displayedData:oe,rows:F,searchTime:te,totalCount:t.length,filteredCount:F.length,sort:a,toggleSort:w,setSort:G,clearSort:U,searchQuery:u,setSearchQuery:W,filters:d,setFilters:S,setFilter:D,removeFilter:b,clearFilters:z,page:f,pageSize:C,totalPages:P,setPage:fe,setPageSize:O,isMobile:p,reset:he}}var GA={"html-lang":{title:"Page language is set",wcag:"3.1.1",severity:"serious",why:"Screen readers pick their voice and pronunciation from the page language. Without it, Telugu or Hindi text may be read with English rules."},"page-title":{title:"Page has a title",wcag:"2.4.2",severity:"serious",why:"The title is the first thing announced and the name shown on browser tabs and bookmarks."},"image-alt":{title:"Images have alternative text",wcag:"1.1.1",severity:"critical",why:'People who cannot see the image get no information from it unless alt text describes it (or alt="" marks it as decorative).'},"heading-order":{title:"Headings follow a logical order",wcag:"1.3.1",severity:"moderate",why:"Many screen-reader users jump between headings. Skipped levels make the page outline confusing."},"single-h1":{title:"Page has one main heading",wcag:"best practice",severity:"minor",why:"A single h1 tells everyone what the page is about."},"landmark-main":{title:"Main content landmark exists",wcag:"1.3.1 / 2.4.1",severity:"moderate",why:"A <main> region lets keyboard and screen-reader users skip straight past menus to the content."},"form-label":{title:"Form fields have labels",wcag:"1.3.1 / 4.1.2",severity:"critical",why:'Without a label, a screen reader just says "edit text" and the user has to guess what to type.'},"button-name":{title:"Buttons have names",wcag:"4.1.2",severity:"critical",why:'An icon-only button with no name is announced as just "button", so its purpose is unknown.'},"link-name":{title:"Links have names",wcag:"2.4.4",severity:"serious",why:"Links are often read out of context in a list. An empty link gives no clue where it goes."},"color-contrast":{title:"Text has enough contrast",wcag:"1.4.3",severity:"serious",why:"Low-contrast text is hard to read for older users, people with low vision, and anyone outdoors on a phone."},"positive-tabindex":{title:"No positive tabindex",wcag:"2.4.3",severity:"moderate",why:"tabindex greater than 0 forces a custom keyboard order that usually doesn't match the visual order."},"keyboard-access":{title:"Clickable things work with a keyboard",wcag:"2.1.1",severity:"critical",why:"A div or span with a click handler can't be reached or activated with Tab and Enter, locking out keyboard users."},"duplicate-id":{title:"IDs are unique",wcag:"best practice",severity:"minor",why:"Labels and ARIA references point at ids. Duplicates make them point at the wrong element."},"form-error":{title:"Errors are linked to their fields",wcag:"3.3.1",severity:"serious",why:"When a field is marked invalid, the error message must be connected to it so it's announced together with the field."},"target-size":{title:"Touch targets are large enough",wcag:"2.5.8",severity:"moderate",why:"Small targets are hard to tap for people with tremors, seniors and everyone on mobile."}},Cl={critical:10,serious:5,moderate:2,minor:1};function st(e={}){let t=Ne(e.root),A=new Set(e.skip??[]),n=[],o={},r=t?pt(t)?t:t.ownerDocument:null,i=(s,g,a,l,u=!1)=>{if(A.has(s))return;let I=GA[s],d=o[s]=(o[s]??0)+1;n.push({id:`${s}-${d}`,rule:s,severity:I.severity,wcag:I.wcag,message:a,why:I.why,fix:l,selector:g?He(g):"document",snippet:g?me(g.outerHTML,120):"",autoFixable:u,element:g??void 0})};if(t&&r){r.documentElement.getAttribute("lang")||i("html-lang",r.documentElement,"The <html> element has no lang attribute.",'Add lang to <html>, e.g. <html lang="te"> or "en".',!0),r.title.trim()||i("page-title",null,"The page has no <title>.","Add a short, descriptive <title> that names this page.");for(let c of $(t,"img"))if(!(c.getAttribute("role")==="presentation"||c.getAttribute("role")==="none")&&!c.hasAttribute("alt")&&!c.getAttribute("aria-label")&&!c.getAttribute("aria-labelledby")){let C=c.getAttribute("title");i("image-alt",c,`Image has no alt text${c.getAttribute("src")?` (${me(c.getAttribute("src")??"",40)})`:""}.`,C?`Use the title as alt: alt="${me(C,40)}".`:'Describe the image in alt, or use alt="" if it is purely decorative.',!!C)}let s=$(t,"h1,h2,h3,h4,h5,h6"),g=0;for(let c of s){let C=Number(c.tagName[1]);g>0&&C>g+1&&i("heading-order",c,`Heading jumps from h${g} to h${C}: "${me(c.textContent??"",40)}".`,`Change it to h${g+1}, or add the missing level above it.`),g=C}let a=s.filter(c=>c.tagName==="H1");a.length===0?i("single-h1",null,"The page has no h1.","Add one h1 that names the page."):a.length>1&&i("single-h1",a[1],`The page has ${a.length} h1 headings.`,"Keep one h1; turn the others into h2."),t.querySelectorAll("main,[role='main']").length===0&&i("landmark-main",null,"No <main> landmark found.","Wrap the primary content in <main>.");let l=$(t,"input,select,textarea").filter(c=>{let C=(c.getAttribute("type")??"text").toLowerCase();return!["hidden","submit","button","reset","image"].includes(C)});for(let c of l){if(!Le(c)){let C=c.getAttribute("placeholder")||c.getAttribute("name");i("form-label",c,`Form field has no label${C?` (placeholder/name: "${me(C,30)}")`:""}.`,C?`Add a visible <label>. Quick fix: aria-label="${me(C,30)}".`:"Add a visible <label for=\u2026> describing what to enter.",!!C)}c.getAttribute("aria-invalid")==="true"&&(c.getAttribute("aria-describedby")||c.getAttribute("aria-errormessage")||i("form-error",c,"Field is marked invalid but no error message is linked to it.","Put the error text in an element with an id and point aria-describedby at it."))}for(let c of $(t,"button,[role='button'],input[type='submit'],input[type='button']"))if(!Le(c)){let C=c.getAttribute("title");i("button-name",c,"Button has no accessible name.",C?`Use the title as the name: aria-label="${C}".`:"Add visible text or an aria-label that says what the button does.",!!C)}for(let c of $(t,"a[href]"))if(!Le(c)){let C=c.getAttribute("title");i("link-name",c,`Link has no text (${me(c.getAttribute("href")??"",40)}).`,C?`Use the title as the name: aria-label="${C}".`:"Add link text that says where it goes.",!!C)}for(let c of $(t,"[tabindex]"))Number(c.getAttribute("tabindex"))>0&&i("positive-tabindex",c,`tabindex="${c.getAttribute("tabindex")}" overrides the natural tab order.`,'Use tabindex="0" and fix the order in the HTML instead.',!0);let u="a[href],button,input,select,textarea,summary";for(let c of $(t,"[onclick],[role='button'],[role='link']"))c.matches(u)||c.hasAttribute("tabindex")||i("keyboard-access",c,`<${c.tagName.toLowerCase()}> is clickable but can't be reached with the keyboard.`,'Use a real <button>, or add tabindex="0", a role and Enter/Space key handling.',!0);let I=new Map;for(let c of Array.from(t.querySelectorAll("[id]")))c.closest("[data-yuktai-panel]")||I.set(c.id,(I.get(c.id)??0)+1);for(let[c,C]of I)C>1&&i("duplicate-id",t.querySelector(`[id="${c.replace(/"/g,'\\"')}"]`),`id="${c}" is used ${C} times.`,"Give each element a unique id.");let d=e.maxContrastChecks??600,m=0;for(let c of $(t,"body *")){if(m>=d)break;if(!Jt(c)||["SCRIPT","STYLE","NOSCRIPT","OPTION"].includes(c.tagName))continue;m++;let C=UA(window.getComputedStyle(c).color),y=Rn(c);if(!C||!y)continue;let p=JA(C,y),B=Nn(c)?3:4.5;p<B&&i("color-contrast",c,`Contrast ${p}:1 is below ${B}:1 for "${me(c.textContent??"",30)}".`,`Darken the text or lighten the background until the ratio is at least ${B}:1.`)}let f=e.minTargetSize??24;for(let c of $(t,iA)){let C=c.getBoundingClientRect();C.width===0&&C.height===0||c.tagName==="A"&&c.closest("p,li,td")||(C.width<f||C.height<f)&&i("target-size",c,`Target is ${Math.round(C.width)}\xD7${Math.round(C.height)}px (minimum ${f}\xD7${f}).`,`Increase padding so it's at least ${f}\xD7${f}px (44\xD744 is better for seniors).`)}}return pl(n,r,A)}function pl(e,t,A){let n=Object.keys(GA).filter(g=>!A.has(g)).map(g=>{let a=e.filter(l=>l.rule===g).length;return{rule:g,title:GA[g].title,passed:a===0,issueCount:a}}),o=0;for(let g of n){let a=Cl[GA[g.rule].severity];o+=Math.min(25,g.issueCount*a)}let r=Math.max(0,100-o),i=n.filter(g=>!g.passed),s=e.filter(g=>g.severity==="critical").length;return{url:t?.location?.href??"",title:t?.title??"",generatedAt:new Date().toISOString(),score:r,passed:s===0&&r>=80,checks:n,issues:e,summary:e.length===0?`All ${n.length} checks passed.`:`${n.length-i.length} of ${n.length} checks passed. ${e.length} issue(s) found, ${s} critical. Score ${r}/100.`}}function Wo(e){let t=["# Accessibility QA report","",`- Page: ${e.title||"(untitled)"} ${e.url}`,`- Generated: ${e.generatedAt}`,`- Score: **${e.score}/100** \u2014 ${e.passed?"PASS":"FAIL"}`,"",e.summary,"","## Checks","","| Check | Result | Issues |","|---|---|---|",...e.checks.map(A=>`| ${A.title} | ${A.passed?"\u2705 Pass":"\u274C Fail"} | ${A.issueCount} |`)];if(e.issues.length){t.push("","## Issues","");for(let A of e.issues)t.push(`### ${A.id} \xB7 ${A.severity} \xB7 WCAG ${A.wcag}`,"",`- **Problem:** ${A.message}`,`- **Why it matters:** ${A.why}`,`- **Fix:** ${A.fix}`,`- **Where:** \`${A.selector}\``,"")}return t.join(`
|
|
400
|
+
`)}function zo(e){return JSON.stringify({...e,issues:e.issues.map(({element:t,...A})=>A)},null,2)}function Oo(e={}){let t=null,A=null,n=null,o=!1,r=[],i=()=>({report:t,watching:A!==null,appliedFixes:r.length}),s=()=>e.onUpdate?.(i()),g=I=>t?.issues.find(d=>d.id===I),a=(I,d,m)=>{r.push({element:I,attribute:d,previous:I.getAttribute(d)}),I.setAttribute(d,m)};function l(I){let d=I.element,m=(f,c)=>({issueId:I.id,applied:f,message:c});if(!I.autoFixable||!d)return m(!1,"This needs a human decision \u2014 see the suggested fix.");switch(I.rule){case"html-lang":{let f=e.defaultLang||(Xe()?navigator.language:"")||"en";return a(d,"lang",f),m(!0,`Set lang="${f}" on <html>.`)}case"image-alt":{let f=d.getAttribute("title");if(!f)break;return a(d,"alt",f),m(!0,`Used the image title as alt text: "${f}".`)}case"form-label":{let f=d.getAttribute("placeholder")||d.getAttribute("name");if(!f)break;let c=f.replace(/[_-]+/g," ").trim();return a(d,"aria-label",c),m(!0,`Added aria-label="${c}". A visible <label> is still better.`)}case"button-name":case"link-name":{let f=d.getAttribute("title");if(!f)break;return a(d,"aria-label",f),m(!0,`Added aria-label="${f}".`)}case"positive-tabindex":return a(d,"tabindex","0"),m(!0,"Changed tabindex to 0 so the natural order applies.");case"keyboard-access":{a(d,"tabindex","0"),d.getAttribute("role")||a(d,"role","button");let f=c=>{let C=c.key;(C==="Enter"||C===" ")&&(c.preventDefault(),d.click())};return d.addEventListener("keydown",f),r.push({element:d,attribute:"",previous:null,listener:f}),m(!0,"Made it focusable and added Enter/Space support.")}default:break}return m(!1,"No safe automatic fix for this one \u2014 see the suggested fix.")}function u(){if(t=st(e),e.autoApply){o=!0;let I=t.issues.filter(d=>d.autoFixable).map(l);o=!1,I.some(d=>d.applied)&&(t=st(e))}return s(),t}return{start(){if(!Xe()||A)return;let I=Ne(e.root),d=pt(I)?I.body:I;d&&(A=new MutationObserver(m=>{o||!m.some(c=>!c.target.closest?.("[data-yuktai-panel]"))||(n&&clearTimeout(n),n=setTimeout(u,e.debounceMs??600))}),A.observe(d,{childList:!0,subtree:!0,attributes:!0,attributeFilter:["alt","aria-label","aria-invalid","tabindex","lang","title"]}),u())},stop(){A?.disconnect(),A=null,n&&clearTimeout(n),n=null,s()},scan:u,explain(I){let d=g(I);return d?[`${d.message}`,`Why it matters: ${d.why}`,`How to fix: ${d.fix}`,`Standard: WCAG ${d.wcag} (${d.severity}).`,d.autoFixable?"I can apply a safe fix for this in the browser.":"This one needs a change in your code."].join(`
|
|
401
|
+
`):`No issue "${I}" in the current report. Run a scan first.`},applyFix(I){let d=g(I);if(!d)return{issueId:I,applied:!1,message:"Issue not found. Run a scan first."};o=!0;let m=l(d);return o=!1,m.applied&&u(),m},applyAllFixes(){t||u(),o=!0;let I=(t?.issues??[]).filter(d=>d.autoFixable).map(l);return o=!1,u(),I},undoAll(){let I=r.length;for(o=!0;r.length;){let d=r.pop();d.listener?d.element.removeEventListener("keydown",d.listener):d.previous===null?d.element.removeAttribute(d.attribute):d.element.setAttribute(d.attribute,d.previous)}return o=!1,u(),I},getState:i}}var fl=/^(field|input|value|text|enter|details?|info|data|\*|:)$/i,ml=/^(go|ok|submit|send|click here|>|→|next)$/i,hl=[[/e-?mail/i,"email","email"],[/phone|mobile|tel/i,"tel","tel"],[/^(full)?name$|full.?name/i,"name"],[/first.?name|given/i,"given-name"],[/last.?name|surname|family/i,"family-name"],[/address|street/i,"street-address"],[/zip|postal|pin.?code|pincode/i,"postal-code"],[/city|town/i,"address-level2"],[/country/i,"country-name"],[/password/i,"current-password","password"],[/dob|birth/i,"bday"]];function yl(e){let t=e.getAttribute("id");return t&&e.ownerDocument.querySelector(`label[for="${t.replace(/"/g,'\\"')}"]`)?!0:!!e.closest("label")}function Ql(e){return $(e,"input,select,textarea").filter(t=>!["hidden","submit","button","reset","image"].includes((t.getAttribute("type")??"text").toLowerCase())).map(t=>({label:Le(t),type:t.tagName==="INPUT"?(t.getAttribute("type")??"text").toLowerCase():t.tagName.toLowerCase(),name:t.getAttribute("name")??t.getAttribute("id")??"",required:t.hasAttribute("required")||t.getAttribute("aria-required")==="true",hasVisibleLabel:yl(t),selector:He(t),element:t}))}function Bl(e,t={}){let A=t.seniorFriendly!==!1,n=t.maxFieldsPerStep??8,o=Ql(e),r=[],i=(I,d,m,f)=>r.push({level:I,message:d,suggestion:m,field:f?.label||f?.name,selector:f?.selector});for(let I of o){let d=I.element,m=I.label||I.name||I.type,f=d.getAttribute("placeholder");!I.label&&f?i("problem",`"${f}" uses only a placeholder as its label.`,"Placeholders disappear when typing starts and aren't read by every screen reader. Add a visible label above the field.",I):I.label?!I.hasVisibleLabel&&f&&!d.getAttribute("aria-label")?i("problem",`"${m}" uses only a placeholder as its label.`,"Placeholders disappear when typing starts. Add a visible label above the field.",I):fl.test(I.label)&&i("improvement",`The label "${I.label}" is unclear.`,'Say exactly what is needed, e.g. "Mobile number (10 digits)".',I):i("problem",`A ${I.type} field${I.name?` ("${I.name}")`:""} has no label.`,"Add a visible <label> that says exactly what to enter.",I),I.required&&I.label&&!/\*|required|mandatory|తప్పనిసరి|आवश्यक/i.test(I.label)&&i("improvement",`"${m}" is required but the label doesn't say so.`,'Add "(required)" to the label so everyone knows before submitting.',I);let c=`${I.name} ${I.label}`;for(let[C,y,p]of hl)if(C.test(c)){d.getAttribute("autocomplete")||i("improvement",`"${m}" has no autocomplete hint.`,`Add autocomplete="${y}" so browsers can fill it in (WCAG 1.3.5).`,I),p&&I.type==="text"&&i("improvement",`"${m}" uses type="text".`,`Use type="${p}" for the right mobile keyboard and validation.`,I);break}if(d.getAttribute("aria-invalid")==="true"&&!d.getAttribute("aria-describedby")&&!d.getAttribute("aria-errormessage")&&i("problem",`"${m}" shows an error that isn't connected to the field.`,"Link the error text with aria-describedby and explain how to fix it.",I),A){let C=parseFloat(window.getComputedStyle(d).fontSize)||16;C<16&&i("improvement",`"${m}" text is ${C}px.`,"Use at least 16px in inputs; it is easier to read and stops mobile browsers from zooming.",I)}}o.length>n&&i("improvement",`This form has ${o.length} fields on one screen.`,`Split it into steps of about ${n} fields with a progress indicator.`);let s=$(e,"button,input[type='submit'],input[type='button']");if(s.length===0)i("problem","No submit button found.",'Add a clear <button type="submit"> so the form can be completed with the keyboard.');else if(A){let I=_e(Le(s[s.length-1]));ml.test(I)&&i("improvement",`The button says "${I}".`,'Name the result, e.g. "Send message" or "Book appointment".')}!$(e,"[role='alert'],[aria-live]",{includeHidden:!0}).length&&o.some(I=>I.required)&&i("improvement","No live region for error messages.",'Add an element with role="alert" so errors are announced when the form is submitted.');let g=r.filter(I=>I.level==="problem").length,a=r.length-g,l=Math.max(0,100-g*15-a*4),u=e.getAttribute("aria-label")||_e(e.querySelector("legend,h1,h2,h3")?.textContent)||e.getAttribute("name")||e.getAttribute("id")||"Form";return{name:me(u,50),selector:He(e),fields:o,findings:r,score:l,summary:r.length===0?`"${me(u,40)}" looks clear: ${o.length} labelled field(s), nothing to fix.`:`"${me(u,40)}" has ${o.length} field(s): ${g} problem(s) and ${a} suggestion(s). Score ${l}/100.`}}function vA(e={}){let t=Ne(e.root);return t?$(t,"form,[role='form']").map(A=>Bl(A,e)):[]}function bl(e){let t=Ne(e),A={title:"",description:"",language:"",headings:[],landmarks:{},counts:{links:0,buttons:0,images:0,forms:0,tables:0,fields:0},unlabeledFields:[],imagesWithoutAlt:[],purpose:""};if(!t)return A;let n=pt(t)?t:t.ownerDocument,o=$(t,"h1,h2,h3,h4,h5,h6").map(l=>({level:Number(l.tagName[1]),text:me(l.textContent??"",80)})),r={};for(let[l,u]of Object.entries({header:"header,[role='banner']",navigation:"nav,[role='navigation']",main:"main,[role='main']",search:"search,[role='search']",footer:"footer,[role='contentinfo']"}))r[l]=$(t,u).length;let i=$(t,"input,select,textarea").filter(l=>!["hidden","submit","button","reset","image"].includes((l.getAttribute("type")??"text").toLowerCase())),s=i.filter(l=>!Le(l)).map(l=>({type:l.tagName==="INPUT"?l.getAttribute("type")??"text":l.tagName.toLowerCase(),hint:l.getAttribute("placeholder")||l.getAttribute("name")||"",selector:He(l)})),g=$(t,"img:not([alt])").map(l=>({src:l.getAttribute("src")??"",selector:He(l)})),a={title:n.title,description:_e(n.querySelector('meta[name="description"]')?.getAttribute("content")),language:n.documentElement.getAttribute("lang")??"",headings:o,landmarks:r,counts:{links:$(t,"a[href]").length,buttons:$(t,"button,[role='button'],input[type='submit']").length,images:$(t,"img").length,forms:$(t,"form,[role='form']").length,tables:$(t,"table,[role='grid'],[role='table']").length,fields:i.length},unlabeledFields:s,imagesWithoutAlt:g,purpose:""};return a.purpose=El(a,i),a}function El(e,t){let A=e.headings.find(i=>i.level===1)?.text||e.title||"This page",n=t.map(i=>`${i.getAttribute("type")} ${i.getAttribute("name")} ${Le(i)}`).join(" ").toLowerCase(),o=[];/password/.test(n)?o.push("sign in or create an account"):(/search|query|వెతుకు/.test(n)||e.landmarks.search)&&o.push("search"),/message|comment|feedback|contact|enquiry/.test(n)&&o.push("send a message"),/card|payment|upi|amount/.test(n)&&o.push("make a payment"),e.counts.tables&&o.push(`browse ${e.counts.tables} table(s) of data`),!o.length&&e.counts.forms&&o.push(`fill in ${e.counts.forms} form(s)`),o.length||o.push("read content");let r=e.headings.filter(i=>i.level===2).slice(0,5).map(i=>i.text);return[`"${A}" lets you ${o.join(", ")}.`,e.description?`It describes itself as: ${me(e.description,140)}`:"",r.length?`Main sections: ${r.join(" \xB7 ")}.`:""].filter(Boolean).join(" ")}var wl=[["missing-labels",/label|unlabel|లేబుల్/i],["images",/image|alt text|picture|photo|చిత్ర/i],["structure",/heading|structure|outline|section|landmark|శీర్షిక/i],["forms",/form|field|input|ఫారం/i],["links",/link|లింక్/i],["counts",/how many|count|ఎన్ని/i],["purpose",/what (does|is)|purpose|about|summar|explain|ఏమి|గురించి/i]];function xl(e){for(let[t,A]of wl)if(A.test(e))return t;return"unknown"}async function Xo(e,t={}){let A=bl(t.root),n=xl(e);switch(n){case"missing-labels":return A.unlabeledFields.length?{intent:n,answer:`${A.unlabeledFields.length} of ${A.counts.fields} field(s) have no label: ${A.unlabeledFields.map(o=>`${o.type}${o.hint?` ("${o.hint}")`:""}`).join(", ")}.`,targets:A.unlabeledFields.map(o=>o.selector),suggestions:["Add a visible <label for=\u2026> to each field.","Run the Accessibility Copilot to add aria-labels from placeholders as a quick fix."]}:{intent:n,answer:`All ${A.counts.fields} form field(s) have labels.`,targets:[],suggestions:[]};case"images":return{intent:n,answer:A.imagesWithoutAlt.length?`${A.imagesWithoutAlt.length} of ${A.counts.images} image(s) have no alt text.`:`All ${A.counts.images} image(s) have alt text.`,targets:A.imagesWithoutAlt.map(o=>o.selector),suggestions:A.imagesWithoutAlt.length?['Describe meaningful images in alt; use alt="" for decorative ones.']:[]};case"structure":{let o=A.headings.slice(0,15).map(i=>`${" ".repeat(i.level-1)}h${i.level} ${i.text}`).join(`
|
|
402
|
+
`),r=Object.entries(A.landmarks).filter(([,i])=>i===0).map(([i])=>i);return{intent:n,answer:`${A.headings.length} heading(s).
|
|
403
|
+
${o}${r.length?`
|
|
404
|
+
Missing landmarks: ${r.join(", ")}.`:""}`,targets:[],suggestions:r.includes("main")?["Wrap the primary content in <main>."]:[]}}case"forms":{let o=vA({root:t.root});return{intent:n,answer:o.length?o.map(r=>r.summary).join(`
|
|
405
|
+
`):"There are no forms on this page.",targets:o.flatMap(r=>r.findings.map(i=>i.selector).filter(i=>!!i)),suggestions:o.flatMap(r=>r.findings.slice(0,3).map(i=>i.suggestion))}}case"links":case"counts":{let o=A.counts;return{intent:n,answer:`${o.links} links, ${o.buttons} buttons, ${o.fields} form fields in ${o.forms} form(s), ${o.images} images, ${o.tables} tables.`,targets:[],suggestions:[]}}case"purpose":case"unknown":{let o=A.purpose;if(t.summarize)try{let i=Ne(t.root),s=_e((i&&pt(i)?i.body:i)?.textContent).slice(0,4e3);o=await t.summarize(s)||o}catch{}let r=[];return A.unlabeledFields.length&&r.push(`${A.unlabeledFields.length} form field(s) need labels.`),A.imagesWithoutAlt.length&&r.push(`${A.imagesWithoutAlt.length} image(s) need alt text.`),{intent:n,answer:o,targets:[],suggestions:r}}}}var $e=e=>String(e??"").normalize("NFC").toLowerCase().replace(/\s+/g," ").trim(),kl=new Set("show me find list get give which who what all the a an rows row records record entries with where that are is have has having and or of for in on to please display only those whose any".split(" "));function fn(e){let t=$e(e).replace(/(₹|rs\.?|inr|\$|usd|€|£)/g," ").match(/(-?\d[\d,]*(?:\.\d+)?|-?\.\d+)\s*(k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion)?(?![\p{L}])/u);if(!t)return null;let A=Number(t[1].replace(/,/g,""));if(!Number.isFinite(A))return null;let n=t[2]??"",o=/^k|thousand/.test(n)?1e3:/^la/.test(n)?1e5:/^(crore|cr)/.test(n)?1e7:/^(m|mn|million)$/.test(n)?1e6:/^(bn|billion)$/.test(n)?1e9:1;return A*o}function Zo(e){let t=new Set([$e(e.label),$e(e.key),$e(e.key.replace(/[_-]+/g," ").replace(/([a-z])([A-Z])/g,"$1 $2"))]);for(let A of Array.from(t))A.endsWith("s")?t.add(A.slice(0,-1)):t.add(`${A}s`);return Array.from(t).filter(A=>A.length>1)}function Ke(e,t,A){let n=` ${$e(e)} `,o;for(let r of t)if(!(A&&(r.type??"text")!==A))for(let i of Zo(r)){let s=i.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${s}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(n)&&(!o||i.length>o.length)&&(o={column:r,length:i.length})}return o?.column}var Dl=/amount|balance|total|price|salary|value|due|revenue|cost|fee|sales|outstanding|paid/i;function mn(e){let t=e.filter(A=>A.type==="number");return t.find(A=>Dl.test(`${A.key} ${A.label}`))??t[0]}var RA=/(>=|=>|>|\bover\b|\babove\b|\bmore than\b|\bgreater than\b|\bexceeds?\b|\bexceeding\b|\bhigher than\b|\bat least\b|\bminimum\b|\bmin\b|కంటే ఎక్కువ)/,hn=/(<=|=<|<|\bunder\b|\bbelow\b|\bless than\b|\blower than\b|\bat most\b|\bmaximum\b|\bmax\b|\bup to\b|కంటే తక్కువ)/,Vo=/\b(after|since|from)\b/,Sl=/\b(before|until|till)\b/,Gl="(?:\\s*(?:k|thousand|lakhs?|lacs?|crores?|cr|mn|million|m|bn|billion))?",yn=`(?:\u20B9|rs\\.?\\s*|\\$)?\\s*-?\\d[\\d,]*(?:\\.\\d+)?${Gl}`;function Tt(e,t,A={}){let n={filters:[],search:[],sort:null,limit:null,notes:[],explanation:""},o=$e(e).replace(/[?!]+/g," ").replace(/\.(?!\d)/g," ").trim(),r=[],i=o.match(/\b(top|first|bottom|last|lowest|highest)\s+(\d+)\b/);i&&(n.limit=Number(i[2]),o=o.replace(i[0],` ${i[1]} `));let s=o.match(/\b(?:sort(?:ed)?|order(?:ed)?)\s+by\s+([\p{L}\p{M}\p{N} _]+?)(?:\s+(asc|ascending|desc|descending))?(?=$|,|\band\b|\bthen\b)/u),g=o.match(/\b(top|highest|largest|biggest|most|bottom|lowest|smallest|least)\b(?:\s+\d+)?\s+(?:by\s+)?([\p{L}\p{M}\p{N} _]+)/u);if(s){let m=Ke(s[1],t);m&&(n.sort={key:m.key,direction:/^desc/.test(s[2]??"")?"desc":"asc"},o=o.replace(s[0]," "))}else if(g){let m=Ke(g[2],t,"number")??Ke(g[2],t)??mn(t);if(m){let f=/top|highest|largest|biggest|most/.test(g[1]);n.sort={key:m.key,direction:f?"desc":"asc"},o=o.replace(new RegExp(`\\b${g[1]}\\b`)," "),!i&&/top|bottom/.test(g[1])&&(n.limit=10)}}let a=new RegExp(`\\bbetween\\s+(${yn}|\\d{4}-\\d{2}-\\d{2})\\s+(?:and|to|-)\\s+(${yn}|\\d{4}-\\d{2}-\\d{2})`,"u"),l;for(;l=o.match(a);){let m=o.slice(Math.max(0,(l.index??0)-40),l.index??0),f=/\d{4}-\d{2}-\d{2}/.test(l[1]),c=f?Ke(m,t,"date")??t.find(p=>p.type==="date"):Ke(m,t,"number")??mn(t),C=f?l[1]:fn(l[1]),y=f?l[2]:fn(l[2]);c&&C!==null&&y!==null&&(n.filters.push({key:c.key,operator:"between",value:[C,y]}),r.push(`${c.label} between ${l[1]} and ${l[2]}`)),o=o.replace(l[0]," ")}let u=o.split(/\s*(?:(?<!\d),|,(?!\d)|;|\band\b|(?<!(?:starts?|starting|ends?|ending|begins?|beginning)\s)\bwith\b|\bwhere\b|\bwho\b|\bthat\b|&|మరియు)\s*/u).map(m=>m.trim()).filter(Boolean),I=t.filter(m=>(m.type??"text")==="text"),d=new Map;for(let m of I){let f=new Set;for(let c of(A.data??[]).slice(0,5e3)){let C=$e(c[m.key]);if(C&&C.length<=40&&f.add(C),f.size>300)break}f.size&&f.size<=300&&d.set(m.key,f)}for(let m of u){let f=n.filters.length,c=Ke(m,t),C=m.match(new RegExp(yn,"u")),y=m.match(/\d{4}-\d{2}-\d{2}/);if(y&&(Vo.test(m)||Sl.test(m)||RA.test(m)||hn.test(m))){let p=(c?.type==="date"?c:void 0)??t.find(B=>B.type==="date");if(p){let B=Vo.test(m)||RA.test(m);n.filters.push({key:p.key,operator:B?"greaterThan":"lessThan",value:y[0]}),r.push(`${p.label} ${B?"after":"before"} ${y[0]}`)}}else if(C&&(RA.test(m)||hn.test(m)||c?.type==="number"&&/\b(is|equals?)\b|=/.test(m))){let p=c?.type==="number"?c:void 0;p||(p=mn(t),p&&n.notes.push(`Assumed "${m}" refers to ${p.label}.`));let B=fn(C[0]);if(p&&B!==null){let h=/at least|minimum|\bmin\b|>=|=>|at most|maximum|\bmax\b|up to|<=|=</.test(m);RA.test(m)?(n.filters.push({key:p.key,operator:"greaterThan",value:h?B-1e-9:B}),r.push(`${p.label} ${h?"\u2265":">"} ${B.toLocaleString("en-IN")}`)):hn.test(m)?(n.filters.push({key:p.key,operator:"lessThan",value:h?B+1e-9:B}),r.push(`${p.label} ${h?"\u2264":"<"} ${B.toLocaleString("en-IN")}`)):(n.filters.push({key:p.key,operator:"equals",value:B}),r.push(`${p.label} = ${B.toLocaleString("en-IN")}`))}}else{let p=m.match(/\b(?:starts?|starting|begins?|beginning)\s+with\s+(.+)$/),B=m.match(/\b(?:ends?|ending)\s+with\s+(.+)$/),h=m.match(/\b(?:contains?|containing|including|includes?|mentions?)\s+(.+)$/),E=m.match(/\b(?:is|equals?|=|:)\s+(.+)$/),w=p??B??h??E;if(w){let G=c??I[0],U=w[1].replace(/^["'“‘]|["'”’]$/g,"").trim();if(G&&U){let W=p?"startsWith":B?"endsWith":h?"contains":"equals";n.filters.push({key:G.key,operator:W,value:U}),r.push(`${G.label} ${W==="equals"?"is":W==="contains"?"contains":W==="startsWith"?"starts with":"ends with"} "${U}"`),c||n.notes.push(`Assumed "${m}" refers to ${G.label}.`)}}}if(n.filters.length===f)for(let[p,B]of d){let h="";for(let E of B){if(E.length<2||E.length<=h.length)continue;let w=E.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");new RegExp(`(^|[^\\p{L}\\p{M}\\p{N}])${w}($|[^\\p{L}\\p{M}\\p{N}])`,"u").test(m)&&(h=E)}if(h){let E=t.find(w=>w.key===p);n.filters.push({key:p,operator:"equals",value:h}),r.push(`${E.label} is "${h}"`)}}if(n.filters.length===f){let p=m.split(/\s+/).filter(h=>!kl.has(h)&&!/^(top|first|bottom|last|lowest|highest|by|desc|asc|sort(ed)?)$/.test(h)),B=p.length>0&&p.every(h=>t.some(E=>Zo(E).includes(h)));if(p.length&&!B&&!(c&&p.length===1)){let h=p.join(" ");/^(customers?|users?|people|items?|entries|poems?|orders?|products?|employees?|students?|members?)$/.test(h)||(n.search.push(h),r.push(`any column contains "${h}"`))}}}if(n.sort){let m=t.find(f=>f.key===n.sort.key)?.label??n.sort.key;r.push(`sorted by ${m} ${n.sort.direction==="desc"?"high \u2192 low":"low \u2192 high"}`)}return n.limit&&r.push(`first ${n.limit}`),n.explanation=r.length?`Showing rows where ${r.join(", ")}.`:"No conditions understood \u2014 showing all rows.",n}function vl(e,t,A){return A==="number"?(Number(e)||0)-(Number(t)||0):A==="date"?(new Date(String(e)).getTime()||0)-(new Date(String(t)).getTime()||0):String(e??"").localeCompare(String(t??""),void 0,{numeric:!0})}function at(e,t,A){let n=nt(e,t,A.filters);for(let o of A.search)n=n.filter(r=>t.some(i=>$e(r[i.key]).includes(o)));if(A.sort){let o=t.find(i=>i.key===A.sort.key),r=A.sort.direction==="desc"?-1:1;n=[...n].sort((i,s)=>r*vl(i[A.sort.key],s[A.sort.key],o?.type))}return A.limit&&(n=n.slice(0,A.limit)),n}function Rl(e,t,A={}){let n=Tt(e,t.columns,{data:t.data}),o=at(t.data,t.columns,n),r=o.map(s=>Qe(s,t.rowKey)).filter(Boolean);A.apply!==!1&&(n.filters.length&&t.onFiltersChange?.(n.filters),n.sort&&t.onSortChange?.(n.sort),r.length&&t.onHighlightRows?.(r));let i=o.length?`${o.length} row(s) found. ${n.explanation}${n.notes.length?` (${n.notes.join(" ")})`:""}`:`No rows match. ${n.explanation}`;return{rows:o,ids:r,parsed:n,message:i}}function jo(e,t){let A=(e.length-1)*t,n=Math.floor(A),o=A-n;return e[n+1]!==void 0?e[n]+o*(e[n+1]-e[n]):e[n]}function Qn(e,t,A={}){let n=A.factor??1.5,o=[],r=t.filter(a=>a.type==="number"&&(!A.columns||A.columns.includes(a.key))),i=a=>a.toLocaleString("en-IN",{maximumFractionDigits:2});for(let a of r){let l=e.map(C=>Number(C[a.key])).filter(C=>Number.isFinite(C));if(l.length<5)continue;let u=[...l].sort((C,y)=>C-y),I=jo(u,.25),d=jo(u,.75),m=d-I;if(m===0)continue;let f=I-n*m,c=d+n*m;for(let C of e){let y=Number(C[a.key]);!Number.isFinite(y)||y>=f&&y<=c||o.push({rowId:Qe(C,A.rowKey),column:a.key,label:a.label,value:y,kind:y>c?"high":"low",reason:`${a.label} ${i(y)} is far ${y>c?"above":"below"} the typical range (${i(I)}\u2013${i(d)}).`})}}let s=A.rowKey??"id",g=new Map;for(let a of e){let l=JSON.stringify(t.filter(d=>d.key!==s).map(d=>$e(a[d.key]))),u=Qe(a,A.rowKey),I=g.get(l);I!==void 0?o.push({rowId:u,column:s,label:"Row",value:u,kind:"duplicate",reason:`Row ${u} has the same values as row ${I}.`}):g.set(l,u)}return o}function Bn(e,t){if(!e.length)return"No rows to summarise.";let A=[`${e.length} row(s).`],n=o=>o.toLocaleString("en-IN",{maximumFractionDigits:2});for(let o of t){let r=e.map(i=>i[o.key]);if(o.type==="number"){let i=r.map(Number).filter(Number.isFinite);if(!i.length)continue;let s=i.reduce((g,a)=>g+a,0);A.push(`${o.label}: total ${n(s)}, average ${n(s/i.length)}, range ${n(Math.min(...i))}\u2013${n(Math.max(...i))}.`)}else if(o.type==="date"){let i=r.map(g=>new Date(String(g)).getTime()).filter(Number.isFinite);if(!i.length)continue;let s=g=>new Date(g).toISOString().slice(0,10);A.push(`${o.label}: from ${s(Math.min(...i))} to ${s(Math.max(...i))}.`)}else{let i=new Map;for(let g of r){let a=String(g??"").trim();a&&i.set(a,(i.get(a)??0)+1)}if(i.size===0||i.size>Math.max(8,e.length/3))continue;let s=Array.from(i.entries()).sort((g,a)=>a[1]-g[1]).slice(0,4);A.push(`${o.label}: ${s.map(([g,a])=>`${g} (${a})`).join(", ")}.`)}}return A.join(`
|
|
406
|
+
`)}function _o(e,t){let A=$e(e);if(/unusual|anomal|outlier|odd|strange|suspicious|duplicate|అసాధారణ/.test(A)){let o=Qn(t.data,t.columns,{rowKey:t.rowKey}),r=Array.from(new Set(o.map(s=>s.rowId)));r.length&&t.onHighlightRows?.(r);let i=new Set(r);return{kind:"anomalies",message:o.length?`${r.length} unusual row(s):
|
|
407
|
+
${o.slice(0,10).map(s=>`\u2022 ${s.reason}`).join(`
|
|
408
|
+
`)}`:"Nothing unusual found.",ids:r,rows:t.data.filter(s=>i.has(Qe(s,t.rowKey))),anomalies:o}}if(/summar|overview|describe|సారాంశం/.test(A)){let o=nt(t.data,t.columns,t.filters??[]);return{kind:"summary",message:Bn(o,t.columns),ids:[],rows:o}}let n=Rl(e,t);return{kind:"query",message:n.message,ids:n.ids,rows:n.rows}}var Nl=/\b(off|disable|stop|remove|no more|turn off|switch off|deactivate)\b|ఆఫ్|ఆపు|తీసివేయి|बंद/i,Fl=[{pattern:/high contrast|contrast|హై కాంట్రాస్ట్|కాంట్రాస్ట్/i,key:"highContrast",name:"High contrast"},{pattern:/dark mode|dark theme|night mode|డార్క్ మోడ్|చీకటి/i,key:"darkMode",name:"Dark mode"},{pattern:/reduce motion|less motion|stop animation|animations?|కదలికలు/i,key:"reduceMotion",name:"Reduced motion"},{pattern:/large targets?|bigger buttons?|big buttons?|larger buttons?|పెద్ద బటన్/i,key:"largeTargets",name:"Large targets"},{pattern:/dyslexia|readable font|easy font/i,key:"dyslexiaFont",name:"Dyslexia-friendly font"},{pattern:/speak on focus|read aloud|read out|screen reader|speech|చదివి వినిపించు/i,key:"speechEnabled",name:"Speak on focus"},{pattern:/skip links?/i,key:"showSkipLinks",name:"Skip links"}],Tl=[[/deuteranop|green.?blind/i,"deuteranopia"],[/protanop|red.?blind/i,"protanopia"],[/tritanop|blue.?blind/i,"tritanopia"],[/grey ?scale|gray ?scale|achromat|black and white/i,"achromatopsia"]],ei=.1,Ml=.8,Ll=1.3;function Yl(e,t={}){let A=e.trim().toLowerCase();if(!A)return null;if(/\b(next|down)\s+(row|line|record|item)\b|తర్వాతి (వరుస|అంశం)/.test(A))return{type:"grid",action:"next-row",say:"Next row."};if(/\b(previous|prev|back|up)\s+(row|line|record|item)\b|ముందరి (వరుస|అంశం)|వెనుక (వరుస|అంశం)/.test(A))return{type:"grid",action:"previous-row",say:"Previous row."};if(/\bfirst\s+(row|record|item)\b|మొదటి (వరుస|అంశం)/.test(A))return{type:"grid",action:"first-row",say:"First row."};if(/\blast\s+(row|record|item)\b|చివరి (వరుస|అంశం)/.test(A))return{type:"grid",action:"last-row",say:"Last row."};if(/\b(open|expand|read)\s+(this\s+)?(row|record|item)\b|ఈ (వరుస|అంశం) తెరువు/.test(A))return{type:"grid",action:"open-row",say:"Opening row."};if(/\b(reset|default|restore)\b.*\b(settings?|accessibility|everything|all)\b|^reset$|రీసెట్/.test(A))return{type:"reset",say:"Accessibility settings reset."};let n=t.fontSizeMultiplier??1,o=i=>Math.round(Math.min(Ll,Math.max(Ml,i))*100)/100;if(/\b(bigger|larger|increase|zoom in)\b.*\b(text|font|letters?)\b|\b(text|font)\b.*\b(bigger|larger|up)\b|పెద్ద అక్షరాలు|అక్షరాలు పెద్ద/.test(A)){let i=o(n+ei);return{type:"setting",patch:{fontSizeMultiplier:i},say:`Text size ${Math.round(i*100)}%.`}}if(/\b(smaller|decrease|reduce|zoom out)\b.*\b(text|font|letters?)\b|\b(text|font)\b.*\b(smaller|down)\b|చిన్న అక్షరాలు|అక్షరాలు చిన్న/.test(A)){let i=o(n-ei);return{type:"setting",patch:{fontSizeMultiplier:i},say:`Text size ${Math.round(i*100)}%.`}}if(/\b(normal|default|reset)\b.*\b(text|font)\s*(size)?\b/.test(A))return{type:"setting",patch:{fontSizeMultiplier:1},say:"Text size 100%."};let r=Nl.test(A);for(let[i,s]of Tl)if(i.test(A))return r?{type:"setting",patch:{colorBlindMode:"none"},say:"Colour filter off."}:{type:"setting",patch:{colorBlindMode:s},say:`${s} filter on.`};if(/colou?r.?blind/.test(A)&&r)return{type:"setting",patch:{colorBlindMode:"none"},say:"Colour filter off."};for(let i of Fl){if(!i.pattern.test(A))continue;let s=/\btoggle\b/.test(A)?!t[i.key]:!r;return i.key==="reduceMotion"&&!/reduce motion|less motion|కదలికలు తగ్గించు/.test(A)&&/animations?/.test(A)&&(s=r||/\bno\b/.test(A)),{type:"setting",patch:{[i.key]:s},say:`${i.name} ${s?"on":"off"}.`}}return null}var ti={highContrast:!1,darkMode:!1,reduceMotion:!1,largeTargets:!1,dyslexiaFont:!1,speechEnabled:!1,colorBlindMode:"none",fontSizeMultiplier:1};function Ul(e,t={}){if(!Xe())return null;let A=t.root??document,n=t.rowSelector??"[data-yuktai-row-id], [role='row']",o=Array.from(A.querySelectorAll(n)).filter(a=>!a.querySelector("th,[role='columnheader']"));if(!o.length)return null;let r=document.activeElement?.closest(n),i=r?o.indexOf(r):-1;if(e==="open-row"){let a=i>=0?o[i]:o[0];return a.click(),a}let s=e==="first-row"?0:e==="last-row"?o.length-1:e==="next-row"?Math.min(o.length-1,i+1):Math.max(0,i-1),g=o[s];return g.hasAttribute("tabindex")||g.setAttribute("tabindex","-1"),g.focus(),g.scrollIntoView?.({block:"nearest"}),g}function Ai(e={}){let t={enabled:!0,...ti,...e.initial},A=null,n=!1,o=async a=>e.apply?e.apply(a):Se.execute(a),r=a=>{if(e.speak===!1||!Xe()||!("speechSynthesis"in window))return;let l=new SpeechSynthesisUtterance(a);l.lang=e.lang??"en-IN",window.speechSynthesis.cancel(),window.speechSynthesis.speak(l)};async function i(a){let l=Yl(a,t);if(e.onTranscript?.(a,l),!l)return null;if(l.type==="grid"){let u=Ul(l.action,{root:e.gridRoot});return r(u?l.say:"No table rows found."),l}return t=l.type==="reset"?{...t,...ti}:{...t,...l.patch},await o(t),r(l.say),l}function s(){if(!Xe()||n)return n;let a=window,l=a.SpeechRecognition??a.webkitSpeechRecognition;return l?(A=new l,A.lang=e.lang??"en-IN",A.continuous=!0,A.interimResults=!1,A.onresult=u=>{let I=u.results,d=I[I.length-1];d?.[0]?.transcript&&i(d[0].transcript)},A.onend=()=>{n&&A?.start()},A.onerror=u=>{(u.error==="not-allowed"||u.error==="service-not-allowed")&&(n=!1)},n=!0,A.start(),!0):!1}function g(){n=!1,A?.stop(),A=null}return{start:s,stop:g,handle:i,isListening:()=>n,getConfig:()=>({...t})}}var ii="highlight|mark|flag|sort|order|rank|arrange|summari[sz]e|summary|recap|count|how many|open|select|pick|show|filter|find|list|clear|reset|remove|detect|spot|tell";function bn(e){return e.replace(/[?!]/g," ").split(/\s*(?:;|\.(?!\d)\s*|,?\s*\band then\b|,?\s*\bthen\b|,?\s*\bafter that\b|,?\s*\bfinally\b|,?\s*\bnext\b|ఆ తర్వాత)\s*/i).flatMap(n=>n.split(new RegExp(`\\s*(?:,|\\band\\b)\\s+(?=(?:${ii})\\b)`,"i"))).map(n=>n.trim()).filter(n=>n.length>1).map(n=>({action:Jl(n),text:n}))}function Jl(e){let t=e.toLowerCase();return/^(clear|reset|remove)\b/.test(t)?"clear":/unusual|anomal|outlier|suspicious|odd ones|duplicate/.test(t)?"anomalies":/summari[sz]e|summary|what changed|recap|overview/.test(t)?"summarize":/^(highlight|mark|flag)\b/.test(t)?"highlight":/^(sort|order|rank|arrange)\b/.test(t)?"sort":/^(count|how many)\b/.test(t)?"count":/^(open|go to)\b/.test(t)&&!/filtered|results?/.test(t)?"open":/^(select|pick)\b/.test(t)?"select":"filter"}function Pl(e){return e.replace(new RegExp(`^\\s*(?:${ii}|open|go to)\\b`,"i")," ").replace(/\b(the|filtered|results?|rows?|records?|entries|items?|ones|them|those|only|me|all)\b/gi," ").replace(/\s+/g," ").trim()}function ni(e,t){let A=t.find(r=>r.key===e.key)?.label??e.key,n=Array.isArray(e.value)?`${e.value[0]}\u2013${e.value[1]}`:typeof e.value=="number"?e.value.toLocaleString("en-IN",{maximumFractionDigits:2}):`"${e.value}"`,o={contains:"contains",equals:"is",startsWith:"starts with",endsWith:"ends with",greaterThan:">",lessThan:"<",between:"between"}[e.operator];return`${A} ${o} ${n}`}async function ri(e,t,A={}){let n=bn(e),{columns:o,data:r}=t,i=[...t.filters??[]],s=[],g=null,a=[],l=()=>at(r,o,{filters:i,search:s,sort:g,limit:null,notes:[],explanation:""}),u={rows:l().length,filters:[...i]},I=[],d=()=>({...t,filters:i});for(let f=0;f<n.length;f++){let c=n[f],C=Pl(c.text),y;try{switch(c.action){case"clear":{i=[],s=[],g=null,a=[],t.onFiltersChange?.([]),t.onSortChange?.(null),t.onHighlightRows?.([]),y={...c,success:!0,message:`Cleared filters, sorting and highlights. ${r.length} row(s) shown.`};break}case"filter":{let p=Tt(C,o,{data:r});if(!p.filters.length&&!p.search.length&&!p.sort){y={...c,success:!0,message:`Showing ${l().length} row(s) with the current filters.`};break}for(let E of p.filters)i=[...i.filter(w=>w.key!==E.key),E];s=[...s,...p.search],p.sort&&(g=p.sort,t.onSortChange?.(g)),t.onFiltersChange?.(i);let B=l(),h=B.map(E=>Qe(E,t.rowKey)).filter(Boolean);p.search.length&&h.length&&(a=h,t.onHighlightRows?.(h)),y={...c,success:!0,message:`${B.length} row(s) now shown. ${p.explanation}`,ids:h};break}case"highlight":{let p=l(),B=Tt(C,o,{data:p}),E=(B.filters.length||B.search.length?at(p,o,{...B,sort:null,limit:B.limit}):p).map(G=>Qe(G,t.rowKey)).filter(Boolean);if(!E.length){y={...c,success:!1,message:`Nothing to highlight for "${C||"all rows"}".`};break}let w=Ot(d(),E);w.success&&(a=w.data??E),y={...c,success:w.success,message:w.success?`Highlighted ${a.length} row(s)${C?` matching "${C}"`:""}.`:w.message,ids:a};break}case"sort":{let B=Tt(c.text,o,{data:r}).sort;if(!B){let E=Ke(C,o);E&&(B={key:E.key,direction:/desc|high|large|big|most|newest|latest|z.?to.?a/i.test(c.text)?"desc":"asc"})}if(!B){y={...c,success:!1,message:`Which column should I sort by? Columns: ${o.map(E=>E.label).join(", ")}.`};break}g=B,t.onSortChange?.(g);let h=o.find(E=>E.key===g.key)?.label??g.key;y={...c,success:!0,message:`Sorted by ${h} (${g.direction==="desc"?"high \u2192 low":"low \u2192 high"}).`};break}case"count":{y={...c,success:!0,message:`${l().length} row(s) shown${a.length?`, ${a.length} highlighted`:""}.`};break}case"anomalies":{let p=l(),B=Qn(p,o,{rowKey:t.rowKey}),h=Array.from(new Set(B.map(E=>E.rowId)));if(h.length){let E=Ot(d(),h);E.success&&(a=E.data??h)}y={...c,success:!0,message:B.length?`${h.length} unusual row(s): ${B.slice(0,5).map(E=>E.reason).join(" ")}`:"Nothing unusual in the shown rows.",ids:h};break}case"open":case"select":{let p=l(),h=p.find(G=>C&&Qe(G,t.rowKey).toLowerCase()===C.toLowerCase())??at(p,o,Tt(C,o,{data:p}))[0]??(C?void 0:p[0]);if(!h){y={...c,success:!1,message:`No row matches "${C}".`};break}let E=Qe(h,t.rowKey),w=c.action==="open"?EA(d(),E):bA(d(),E);y={...c,success:w.success,message:w.message,ids:[E]};break}case"summarize":{let p=l();y={...c,success:!0,message:`${oi(u,p.length,i,g,a,o)}
|
|
409
|
+
${Bn(p,o)}`};break}}}catch(p){y={...c,success:!1,message:`This step failed: ${p instanceof Error?p.message:String(p)}`}}I.push(y),A.onStep?.(y,f,n.length)}let m=l().length;return{steps:I,before:u,after:{rows:m,filters:i,sort:g,highlighted:a},summary:oi(u,m,i,g,a,o)}}function oi(e,t,A,n,o,r){let i=[`Rows: ${e.rows} \u2192 ${t}.`],s=A.filter(a=>!e.filters.some(l=>JSON.stringify(l)===JSON.stringify(a))),g=e.filters.filter(a=>!A.some(l=>JSON.stringify(a)===JSON.stringify(l)));return s.length&&i.push(`Filters added: ${s.map(a=>ni(a,r)).join("; ")}.`),g.length&&i.push(`Filters removed: ${g.map(a=>ni(a,r)).join("; ")}.`),n&&i.push(`Sorted by ${r.find(a=>a.key===n.key)?.label??n.key} ${n.direction==="desc"?"high \u2192 low":"low \u2192 high"}.`),o.length&&i.push(`${o.length} row(s) highlighted.`),i.join(" ")}var NA=e=>{let t=typeof e=="number"?e:Number(String(e??"").replace(/[,₹$%\s]/g,""));return Number.isFinite(t)?t:null},si=e=>{let t=e instanceof Date?e.getTime():new Date(String(e??"")).getTime();return Number.isFinite(t)?t:null};function Zt(e,t){if(t==="count")return e.length;if(!e.length)return 0;switch(t){case"sum":return e.reduce((A,n)=>A+n,0);case"avg":return e.reduce((A,n)=>A+n,0)/e.length;case"min":return Math.min(...e);case"max":return Math.max(...e)}}function Kl(e,t,A,n="sum"){let o=new Map;for(let r of e){let i=String(r[t]??"\u2014").trim()||"\u2014",s=o.get(i)??[];if(A===null||n==="count")s.push(1);else{let g=NA(r[A]);g!==null&&s.push(g)}o.set(i,s)}return Array.from(o.entries()).map(([r,i])=>({group:r,value:Zt(i,n),count:i.length})).sort((r,i)=>i.value-r.value)}function ai(e,t,A=1){let n=new Date(e);return n.setHours(0,0,0,0),t==="week"&&n.setDate(n.getDate()-(n.getDay()-A+7)%7),t==="month"&&n.setDate(1),t==="quarter"&&n.setMonth(Math.floor(n.getMonth()/3)*3,1),t==="year"&&n.setMonth(0,1),n}function wn(e,t,A){let n=new Date(e);return t==="day"&&n.setDate(n.getDate()+A),t==="week"&&n.setDate(n.getDate()+7*A),t==="month"&&n.setMonth(n.getMonth()+A),t==="quarter"&&n.setMonth(n.getMonth()+3*A),t==="year"&&n.setFullYear(n.getFullYear()+A),n}function ql(e,t){let A=t.referenceDate?new Date(t.referenceDate):new Date,n=ai(A,t.period,t.weekStartsOn),o=t.toDate===!1?wn(n,t.period,1):new Date(Math.max(A.getTime()+1,n.getTime()+1)),r=wn(n,t.period,-1),i=t.toDate===!1?n:new Date(r.getTime()+(o.getTime()-n.getTime())),s=t.agg??"sum",g=new Map,a=new Map;for(let I of e){let d=si(I[t.dateKey]);if(d===null)continue;let m=d>=n.getTime()&&d<o.getTime()?g:d>=r.getTime()&&d<i.getTime()?a:null;if(!m)continue;let f=t.groupKey?String(I[t.groupKey]??"\u2014"):"All",c=s==="count"?1:NA(I[t.metricKey]);c!==null&&m.set(f,[...m.get(f)??[],c])}let l=new Set([...g.keys(),...a.keys()]),u=Array.from(l).map(I=>{let d=Zt(g.get(I)??[],s),m=Zt(a.get(I)??[],s);return{group:I,current:d,previous:m,change:d-m,changePct:m===0?null:(d-m)/Math.abs(m)*100}});return{period:t.period,current:{from:n,to:o},previous:{from:r,to:i},rows:u}}function Hl(e,t,A,n,o="sum"){let r=new Map;for(let i of e){let s=si(i[t]),g=o==="count"?1:NA(i[A]);if(s===null||g===null)continue;let a=ai(new Date(s),n).getTime();r.set(a,[...r.get(a)??[],g])}return Array.from(r.entries()).sort((i,s)=>i[0]-s[0]).map(([i,s])=>({start:new Date(i),value:Zt(s,o)}))}var $l=/rate|conversion|ratio|percent|%|score|rating|margin|ctr|avg|average/i;function Wl(e){let t=e.match(/\b(today|yesterday|this|last|previous|past)\s*(day|week|month|quarter|year)?\b/);return t?t[1]==="today"?{period:"day",shift:0}:t[1]==="yesterday"?{period:"day",shift:-1}:t[2]?{period:t[2],shift:t[1]==="this"?0:-1}:null:null}var xe=e=>e.toLocaleString("en-IN",{maximumFractionDigits:2}),En=e=>e===null?"new":`${e>0?"+":""}${e.toFixed(1)}%`;function gi(e,t,A,n={}){let o=e.toLowerCase(),r=A.filter(p=>p.type==="number"),i=Ke(o,A,"number")??r.find(p=>/amount|revenue|sales|total|value/i.test(`${p.key} ${p.label}`))??r[0],s=A.find(p=>p.type==="date")??A.find(p=>/date|time|day|created|month/i.test(`${p.key} ${p.label}`)),g=o.match(/\b(?:which|by|per|each|across|every|top|for each)\s+([\p{L}\p{M}\p{N} _]+)/u)?.[1]??"",a=Ke(g,A,"text"),l=/how many|number of|count/.test(o),u=l?"count":/average|avg|mean/.test(o)?"avg":/\btotal\b|\bsum\b/.test(o)?"sum":i&&$l.test(`${i.key} ${i.label}`)?"avg":"sum",I=/drop|decline|decrease|fell|fall|down|worst|lost|shrink|reduc/.test(o),d=/increase|growth|grew|rise|rose|up\b|best|improv|gain/.test(o),m=/lowest|least|smallest|bottom|worst|minimum/.test(o),f=Wl(o);if(!i&&!l)return{kind:"unknown",answer:"I couldn't find a numeric column to analyse.",table:[]};let c=l?"rows":i.label;if(f&&s&&(d||I||/change|compare|vs|versus/.test(o))){let p=n.referenceDate?new Date(n.referenceDate):new Date,B=f.shift?wn(p,f.period,f.shift):p,E=[...ql(t,{dateKey:s.key,metricKey:i?.key??s.key,groupKey:a?.key,agg:u,period:f.period,referenceDate:B,toDate:f.shift===0}).rows].sort((z,O)=>I?z.change-O.change:O.change-z.change),w=E.map(z=>({[a?.label??"Group"]:z.group,Current:xe(z.current),Previous:xe(z.previous),Change:xe(z.change),"Change %":En(z.changePct)}));if(!E.length)return{kind:"period-change",answer:`No ${c} data in this ${f.period} or the one before.`,table:w};let G=E[0],U=`${f.shift?"last":"this"} ${f.period} vs the ${f.period} before`,W=G.change===0?"did not change":G.change<0?`dropped ${xe(Math.abs(G.change))}`:`rose ${xe(G.change)}`,S=`${c} ${W} (${xe(G.previous)} \u2192 ${xe(G.current)}, ${En(G.changePct)}) \u2014 ${U}.`,D=I&&G.change>=0||d&&G.change<=0;return{kind:"period-change",answer:a?D?`No ${a.label.toLowerCase()} ${I?"dropped":"grew"}. Closest is ${G.group}: ${S}`:`${G.group}: ${S}`:S,table:w}}if(/trend|over time|month by month|week by week/.test(o)&&s&&i){let p=/week/.test(o)?"week":/day|daily/.test(o)?"day":/year/.test(o)?"year":"month",B=Hl(t,s.key,i.key,p,u),h=B.map(U=>({Period:U.start.toISOString().slice(0,10),[i.label]:xe(U.value)}));if(B.length<2)return{kind:"trend",answer:`Not enough ${p}s of data for a trend.`,table:h};let E=B[0].value,w=B[B.length-1].value,G=B.reduce((U,W)=>W.value>U.value?W:U);return{kind:"trend",answer:`${i.label} went from ${xe(E)} to ${xe(w)} over ${B.length} ${p}s (${En(E?(w-E)/Math.abs(E)*100:null)}). Peak: ${xe(G.value)} in the ${p} of ${G.start.toISOString().slice(0,10)}.`,table:h}}if(a){let p=Kl(t,a.key,i?.key??null,u),B=m?[...p].reverse():p,h=B.map(w=>({[a.label]:w.group,[`${u} of ${c}`]:xe(w.value),Rows:w.count}));if(!B.length)return{kind:"group",answer:"No data.",table:h};let E=B[0];return{kind:"group",answer:`${E.group} has the ${m?"lowest":"highest"} ${u==="sum"?"total":u==="avg"?"average":u} ${c}: ${xe(E.value)} (across ${B.length} ${a.label.toLowerCase()} groups).`,table:h}}let C=l?t.map(()=>1):t.map(p=>NA(p[i.key])).filter(p=>p!==null),y=Zt(C,u);return{kind:"total",answer:`${u==="avg"?"Average":u==="count"?"Count of":u==="sum"?"Total":u} ${c}: ${xe(y)} across ${t.length} row(s).`,table:[{Metric:c,Aggregation:u,Value:xe(y)}]}}var li={high:12,medium:6,low:2};function ci(e={}){let t=Ne(e.root),A=[],n=(s,g,a,l,u)=>A.push({category:s,severity:g,message:a,suggestion:l,selector:u?He(u):void 0});if(t&&Xe()){let s=e.minFontSize??14,g=e.maxLineLength??90,a=S=>window.getComputedStyle(S),l=$(t,"h1");l.length===0&&n("hierarchy","medium","There is no h1, so the page has no clear main title.","Add one prominent h1 near the top."),l.length>1&&n("hierarchy","low",`${l.length} h1 headings compete for attention.`,"Keep one h1 and demote the rest.",l[1]);let u=S=>{let D=$(t,S)[0];return D&&parseFloat(a(D).fontSize)||0},[I,d,m]=[u("h1"),u("h2"),u("h3")];I&&d&&d>=I&&n("hierarchy","medium",`h2 (${d}px) is as large as or larger than h1 (${I}px).`,"Make each heading level visibly smaller than the one above it."),d&&m&&m>d&&n("hierarchy","low",`h3 (${m}px) is larger than h2 (${d}px).`,"Keep heading sizes in descending order.");let f=st({root:e.root,skip:["color-contrast","target-size","duplicate-id","page-title","html-lang","form-error","positive-tabindex"]});for(let S of f.issues.filter(D=>D.rule==="heading-order").slice(0,3))n("hierarchy","low",S.message,S.fix,S.element);let c=0,C;for(let S of $(t,"p,li,td,span,a,label,small,div").slice(0,1500)){if(!Jt(S))continue;(parseFloat(a(S).fontSize)||16)<s&&(c++,C??=S)}c&&n("readability",c>10?"high":"medium",`${c} text element(s) are smaller than ${s}px, e.g. "${me(C?.textContent??"",30)}".`,`Use at least ${s}px for body text (16px for senior-friendly pages).`,C);for(let S of $(t,"p").slice(0,200)){let D=a(S),b=parseFloat(D.fontSize)||16,z=S.getBoundingClientRect().width,O=z/(b*.5);if(z>0&&O>g&&(S.textContent??"").length>g){n("readability","low",`A paragraph is about ${Math.round(O)} characters wide.`,`Limit text width to ~${g} characters (e.g. max-width: 70ch).`,S);break}let Y=parseFloat(D.lineHeight);if(Number.isFinite(Y)&&Y/b<1.3){n("readability","low",`Line height is ${(Y/b).toFixed(2)}\xD7 the font size.`,"Use line-height of at least 1.5 for body text (WCAG 1.4.12).",S);break}}let y=st({root:e.root,skip:["html-lang","page-title","image-alt","heading-order","single-h1","landmark-main","form-label","button-name","link-name","positive-tabindex","keyboard-access","duplicate-id","form-error","target-size"]});y.issues.length&&n("readability",y.issues.length>5?"high":"medium",`${y.issues.length} text element(s) have weak contrast. ${y.issues[0].message}`,"Raise contrast to at least 4.5:1 for body text.",y.issues[0].element);let p=zl();p.length&&n("interaction","high",`Focus outlines are removed by CSS (${p.slice(0,2).join(", ")}) with no replacement.`,"Never remove outlines without a visible :focus-visible style (WCAG 2.4.7).");let B=$(t,iA).filter(S=>{let D=S.getBoundingClientRect();return D.width>0&&D.height>0&&(D.width<24||D.height<24)&&!(S.tagName==="A"&&S.closest("p,li"))});B.length&&n("interaction",B.length>5?"high":"medium",`${B.length} control(s) are smaller than 24\xD724px.`,"Give controls at least 24\xD724px, ideally 44\xD744px for touch and seniors.",B[0]);let h=window.innerHeight||800,E=$(t,Fn).filter(S=>{let D=S.getBoundingClientRect();return D.height>0&&D.top<h});E.length>40&&n("clutter","medium",`${E.length} interactive elements in the first screen.`,"Group secondary actions into menus and keep the first screen focused on one task.");let w=$(t,"button,a[href],[role='button']").filter(S=>{let D=S.getBoundingClientRect();if(D.height===0||D.top>h)return!1;let b=a(S).backgroundColor;return!!b&&!/rgba\(0, 0, 0, 0\)|transparent/.test(b)&&!/rgb\(255, 255, 255\)/.test(b)});w.length>4&&n("clutter","medium",`${w.length} filled buttons compete in the first screen.`,"Keep one primary action per view; make the rest secondary (outline or text).",w[0]);let G=new Set,U=new Set;for(let S of $(t,"body *").slice(0,2e3)){if(!Jt(S))continue;let D=a(S);G.add(D.fontFamily.split(",")[0].replace(/["']/g,"").trim().toLowerCase()),U.add(Math.round(parseFloat(D.fontSize)||0))}G.size>4&&n("consistency","low",`${G.size} different font families are used.`,"Stick to 1\u20132 font families (e.g. one Telugu + one Latin)."),U.size>10&&n("consistency","low",`${U.size} different font sizes are used.`,"Use a small type scale (5\u20137 sizes) for a calmer page.");let W=$(t,"img:not([width]):not([height])").filter(S=>!a(S).aspectRatio||a(S).aspectRatio==="auto");W.length>3&&n("consistency","low",`${W.length} images have no width/height, so the layout jumps while loading.`,"Set width and height (or aspect-ratio) on images.",W[0])}let o=["hierarchy","readability","interaction","clutter","consistency"].reduce((s,g)=>{let a=A.filter(l=>l.category===g);return s[g]={score:Math.max(0,100-a.reduce((l,u)=>l+li[u.severity]*2,0)),findings:a.length},s},{}),r=Math.max(0,100-A.reduce((s,g)=>s+li[g.severity],0)),i=Object.entries(o).sort((s,g)=>s[1].score-g[1].score)[0];return{score:r,categories:o,findings:A,summary:A.length?`Design score ${r}/100 with ${A.length} finding(s). Weakest area: ${i[0]}.`:"No design issues found by the automatic review."}}function zl(){let e=[],t=!1,A=n=>{for(let o of Array.from(n)){let r=o.cssRules;r&&A(r);let i=o;if(!i.selectorText||!/:focus/.test(i.selectorText))continue;let s=`${i.style.outline} ${i.style.outlineStyle} ${i.style.outlineWidth}`,g=/\bnone\b|\b0(px)?\b/.test(s),a=!!(i.style.boxShadow&&i.style.boxShadow!=="none")||!!i.style.borderColor||!!i.style.backgroundColor||!!i.style.textDecoration;/:focus-visible/.test(i.selectorText)&&(!g||a)&&(t=!0),g&&!a&&e.push(i.selectorText)}};for(let n of Array.from(document.styleSheets))try{A(n.cssRules)}catch{}return t?[]:e}import{useCallback as xn,useEffect as di,useMemo as kn,useRef as _t,useState as ce}from"react";import{Fragment as ui,jsx as v,jsxs as ne}from"react/jsx-runtime";var Ol=/\b(trend|over time|this (week|month|quarter|year)|last (week|month|quarter|year)|compare|versus|vs)\b|\b(by|per|each|which)\b.*\b(total|average|avg|sum|drop|increase|growth|highest|lowest|most|least)\b|\b(total|average|avg|sum)\b.*\b(by|per|each)\b/i;function Wu(e){let{data:t,rowKey:A="id"}=e,n=kn(()=>yt(e.columns),[e.columns]),[o,r]=ce([]),[i,s]=ce(null),[g,a]=ce([]),[l,u]=ce(""),[I,d]=ce(null),[m,f]=ce([]),[c,C]=ce([]),[y,p]=ce(!1),B=_t(o);B.current=o;let h=xn(()=>({data:t,columns:n,rowKey:A,filters:B.current,onFiltersChange:U=>{B.current=U,r(U)},onSortChange:s,onHighlightRows:a,onOpenRow:e.onOpenRow,onSelectRow:U=>a([U])}),[t,n,A,e.onOpenRow]),E=xn(async U=>{let W=U.trim();if(W){p(!0),C([]),f([]);try{if(bn(W).length>1){let S=[],D=await ri(W,h(),{onStep:b=>C((S.push(b),[...S]))});d("tasks"),u(D.summary)}else if(Ol.test(W)){let S=at(t,n,{filters:B.current,search:[],sort:null,limit:null,notes:[],explanation:""}),D=gi(W,S,n,{referenceDate:e.referenceDate});d("insight"),u(D.answer),f(D.table)}else{let S=_o(W,h());d(S.kind),u(S.message)}}finally{p(!1)}}},[h,t,n,e.referenceDate]),w=xn(()=>{B.current=[],r([]),s(null),a([]),u(""),d(null),f([]),C([])},[]),G=kn(()=>at(t,n,{filters:o,search:[],sort:i,limit:null,notes:[],explanation:""}),[t,n,o,i]);return{gridData:G,highlightIds:g,filters:o,sort:i,ask:E,reset:w,answer:l,kind:I,table:m,steps:c,busy:y,visibleIds:G.map(U=>Qe(U,A))}}var Ci={border:"1px solid color-mix(in srgb, CanvasText 20%, transparent)",borderRadius:12,padding:16,background:"Canvas",color:"CanvasText",font:"inherit"},pe={minHeight:44,padding:"8px 14px",borderRadius:8,border:"1px solid color-mix(in srgb, CanvasText 35%, transparent)",background:"ButtonFace",color:"ButtonText",font:"inherit",cursor:"pointer"},Dn={...pe,flex:1,minWidth:0,background:"Field",color:"FieldText",cursor:"text"},TA={opacity:.75,fontSize:"0.9em"};function Sn({rows:e}){if(!e.length)return null;let t=Object.keys(e[0]);return v("div",{style:{overflowX:"auto",marginTop:12},children:ne("table",{style:{borderCollapse:"collapse",width:"100%"},children:[v("thead",{children:v("tr",{children:t.map(A=>v("th",{scope:"col",style:{textAlign:"left",padding:"6px 8px",borderBottom:"1px solid currentColor"},children:A},A))})}),v("tbody",{children:e.slice(0,50).map((A,n)=>v("tr",{children:t.map(o=>v("td",{style:{padding:"6px 8px",borderBottom:"1px solid color-mix(in srgb, CanvasText 12%, transparent)"},children:A[o]},o))},n))})]})})}function Ii(e,t,A){let n=URL.createObjectURL(new Blob([t],{type:A})),o=document.createElement("a");o.href=n,o.download=e,o.click(),setTimeout(()=>URL.revokeObjectURL(n),1e3)}function zu({grid:e,placeholder:t="Ask about this data, e.g. \u201Coverdue and over \u20B910,000\u201D",examples:A=[],style:n}){let[o,r]=ce(""),i=s=>{s.preventDefault(),e.ask(o)};return ne("section",{"data-yuktai-panel":"","aria-label":"Data assistant",style:{...Ci,...n},children:[ne("form",{onSubmit:i,style:{display:"flex",gap:8,flexWrap:"wrap"},children:[v("label",{htmlFor:"yuktai-grid-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about the data"}),v("input",{id:"yuktai-grid-ask",value:o,onChange:s=>r(s.target.value),placeholder:t,style:Dn}),v("button",{type:"submit",style:pe,disabled:e.busy,children:e.busy?"Working\u2026":"Ask"}),v("button",{type:"button",style:pe,onClick:()=>{r(""),e.reset()},children:"Reset"})]}),A.length>0&&v("div",{style:{display:"flex",gap:6,flexWrap:"wrap",marginTop:8},children:A.map(s=>v("button",{type:"button",style:{...pe,minHeight:36,fontSize:"0.85em"},onClick:()=>{r(s),e.ask(s)},children:s},s))}),v("div",{"aria-live":"polite",style:{marginTop:12,whiteSpace:"pre-line"},children:e.answer}),e.steps.length>0&&v("ol",{style:{marginTop:8,paddingLeft:20},children:e.steps.map((s,g)=>ne("li",{style:{marginBottom:4},children:[v("span",{"aria-hidden":"true",children:s.success?"\u2705 ":"\u26A0\uFE0F "}),v("strong",{children:s.text})," \u2014 ",v("span",{style:{whiteSpace:"pre-line"},children:s.message})]},g))}),v(Sn,{rows:e.table})]})}var FA=[["copilot","Copilot"],["qa","QA report"],["forms","Forms"],["design","Design"],["ask","Ask page"],["voice","Voice"]];function Ou({defaultTab:e="copilot",voiceLang:t="en-IN",generate:A,engine:n,style:o}){let[r,i]=ce(e),s=_t([]),g=(a,l)=>{let u=a.key==="ArrowRight"?1:a.key==="ArrowLeft"?-1:0;if(!u)return;a.preventDefault();let I=(l+u+FA.length)%FA.length;i(FA[I][0]),s.current[I]?.focus()};return ne("section",{"data-yuktai-panel":"","aria-label":"yuktai agentic tools",style:{...Ci,...o},children:[v("div",{role:"tablist","aria-label":"Tools",style:{display:"flex",gap:6,flexWrap:"wrap",marginBottom:12},children:FA.map(([a,l],u)=>v("button",{ref:I=>{s.current[u]=I},role:"tab",id:`yuktai-tab-${a}`,"aria-selected":r===a,"aria-controls":`yuktai-tabpanel-${a}`,tabIndex:r===a?0:-1,onClick:()=>i(a),onKeyDown:I=>g(I,u),style:{...pe,fontWeight:r===a?700:400,outlineOffset:2,borderWidth:r===a?2:1},children:l},a))}),ne("div",{role:"tabpanel",id:`yuktai-tabpanel-${r}`,"aria-labelledby":`yuktai-tab-${r}`,children:[r==="copilot"&&v(Xl,{}),r==="qa"&&v(Vl,{}),r==="forms"&&v(jl,{}),r==="design"&&v(Zl,{}),r==="ask"&&v(_l,{generate:A,engine:n}),r==="voice"&&v(ec,{lang:t})]})]})}function Xl(){let e=_t(null),[t,A]=ce(null),[n,o]=ce(null),[r,i]=ce("");di(()=>(e.current=Oo({onUpdate:A}),e.current.scan(),()=>e.current?.stop()),[]);let s=e.current,g=t?.report?.issues??[];return ne("div",{children:[ne("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[v("button",{type:"button",style:pe,onClick:()=>t?.watching?s?.stop():s?.start(),children:t?.watching?"Stop watching":"Watch page live"}),v("button",{type:"button",style:pe,onClick:()=>s?.scan(),children:"Scan now"}),v("button",{type:"button",style:pe,onClick:()=>i(`${s?.applyAllFixes().filter(a=>a.applied).length??0} fix(es) applied.`),children:"Apply safe fixes"}),v("button",{type:"button",style:pe,onClick:()=>i(`${s?.undoAll()??0} change(s) undone.`),children:"Undo all"})]}),ne("p",{"aria-live":"polite",style:{marginTop:12},children:[t?.report?.summary," ",r]}),v("ul",{style:{listStyle:"none",padding:0,margin:0},children:g.slice(0,40).map(a=>ne("li",{style:{borderTop:"1px solid color-mix(in srgb, CanvasText 12%, transparent)",padding:"8px 0"},children:[ne("div",{style:{display:"flex",gap:8,alignItems:"center",flexWrap:"wrap"},children:[v("span",{style:{...TA,minWidth:70},children:a.severity}),v("span",{style:{flex:1},children:a.message}),v("button",{type:"button",style:pe,"aria-expanded":n===a.id,onClick:()=>o(n===a.id?null:a.id),children:"Why?"}),a.autoFixable&&v("button",{type:"button",style:pe,onClick:()=>i(s?.applyFix(a.id).message??""),children:"Fix"})]}),n===a.id&&v("p",{style:{whiteSpace:"pre-line",margin:"8px 0 0"},children:s?.explain(a.id)})]},a.id))})]})}function Vl(){let[e,t]=ce(null);return ne("div",{children:[ne("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:[v("button",{type:"button",style:pe,onClick:()=>t(st()),children:"Run QA check"}),e&&ne(ui,{children:[v("button",{type:"button",style:pe,onClick:()=>Ii("accessibility-report.md",Wo(e),"text/markdown"),children:"Download .md"}),v("button",{type:"button",style:pe,onClick:()=>Ii("accessibility-report.json",zo(e),"application/json"),children:"Download .json"})]})]}),e&&ne(ui,{children:[ne("p",{"aria-live":"polite",style:{marginTop:12},children:[v("strong",{children:e.passed?"PASS":"FAIL"})," \u2014 ",e.summary]}),v(Sn,{rows:e.checks.map(A=>({Check:A.title,Result:A.passed?"\u2705 Pass":"\u274C Fail",Issues:A.issueCount}))})]})]})}function jl(){let[e,t]=ce(null);return ne("div",{children:[v("button",{type:"button",style:pe,onClick:()=>t(vA()),children:"Review forms"}),ne("div",{"aria-live":"polite",children:[e&&e.length===0&&v("p",{children:"No forms on this page."}),e?.map(A=>ne("div",{style:{marginTop:12},children:[v("p",{children:v("strong",{children:A.summary})}),v("ul",{children:A.findings.map((n,o)=>ne("li",{children:[n.level==="problem"?"Problem: ":"Suggestion: ",n.message," ",v("span",{style:TA,children:n.suggestion})]},o))})]},A.selector))]})]})}function Zl(){let[e,t]=ce(null);return ne("div",{children:[v("button",{type:"button",style:pe,onClick:()=>t(ci()),children:"Review design"}),e&&ne("div",{"aria-live":"polite",children:[v("p",{style:{marginTop:12},children:v("strong",{children:e.summary})}),v(Sn,{rows:Object.entries(e.categories).map(([A,n])=>({Area:A,Score:n.score,Findings:n.findings}))}),v("ul",{children:e.findings.map((A,n)=>ne("li",{children:["[",A.severity,"] ",A.message," ",v("span",{style:TA,children:A.suggestion})]},n))})]})]})}function _l({generate:e,engine:t}){let[A,n]=ce(""),o=_t(null),r=_t(t),[i,s]=ce(""),[g,a]=ce([]);return ne("div",{children:[ne("form",{onSubmit:async u=>{if(u.preventDefault(),!A.trim())return;let I=await Xo(A);if(I.intent!=="unknown"&&I.intent!=="purpose"){s(I.answer),a(I.suggestions);return}!o.current||r.current!==t?(o.current=mA({engine:t}),r.current=t):o.current.rebuild();let d=await o.current.ask(A,{generate:e});s(I.intent==="purpose"&&!d.hits.length?I.answer:d.hits.length?d.answer:I.answer),a(I.suggestions)},style:{display:"flex",gap:8,flexWrap:"wrap"},children:[v("label",{htmlFor:"yuktai-page-ask",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Question about this page"}),v("input",{id:"yuktai-page-ask",value:A,onChange:u=>n(u.target.value),placeholder:"What does this page do? Which fields are missing labels?",style:Dn}),v("button",{type:"submit",style:pe,children:"Ask"})]}),v("p",{"aria-live":"polite",style:{whiteSpace:"pre-line",marginTop:12},children:i}),g.length>0&&v("ul",{children:g.map((u,I)=>v("li",{children:u},I))})]})}function ec({lang:e}){let t=kn(()=>Ai({lang:e,onTranscript:(g,a)=>r(`\u201C${g}\u201D \u2192 ${a?a.say:"not a command"}`)}),[e]),[A,n]=ce(!1),[o,r]=ce(""),[i,s]=ce("");return di(()=>()=>t.stop(),[t]),ne("div",{children:[v("div",{style:{display:"flex",gap:8,flexWrap:"wrap"},children:v("button",{type:"button",style:pe,"aria-pressed":A,onClick:()=>{A?(t.stop(),n(!1)):n(t.start())},children:A?"Stop listening":"Start voice commands"})}),ne("form",{onSubmit:g=>{g.preventDefault(),t.handle(i),s("")},style:{display:"flex",gap:8,marginTop:8,flexWrap:"wrap"},children:[v("label",{htmlFor:"yuktai-voice-typed",style:{position:"absolute",width:1,height:1,overflow:"hidden",clip:"rect(0 0 0 0)"},children:"Type a command"}),v("input",{id:"yuktai-voice-typed",value:i,onChange:g=>s(g.target.value),placeholder:"Or type: turn on high contrast",style:Dn}),v("button",{type:"submit",style:pe,children:"Run"})]}),v("p",{"aria-live":"polite",style:{marginTop:12},children:o}),v("p",{style:TA,children:"Try: \u201Cturn on high contrast\u201D, \u201Cbigger text\u201D, \u201Cdark mode off\u201D, \u201Cnext row\u201D, \u201C\u0C2A\u0C46\u0C26\u0C4D\u0C26 \u0C05\u0C15\u0C4D\u0C37\u0C30\u0C3E\u0C32\u0C41\u201D, \u201Creset settings\u201D."})]})}function tc(){if(typeof globalThis>"u")return new mt;if(!globalThis.__yuktai_runtime__){let e=new mt;e.register(Se.name,Se),e.register(hA.name,hA),e.register(yA.name,yA),globalThis.__yuktai_runtime__=e}return globalThis.__yuktai_runtime__}var pi=typeof window<"u"?tc():new mt,pd={wcagPlugin:Se,list(){return pi.getPlugins()},use(e){return pi.use(e)},fix(e){return Se.applyFixes({enabled:!0,autoFix:!0,...e})},scan(){return Se.scan()}};export{GA as AUDIT_RULES,cs as AbcIcon,Fi as AccessibilityIcon,da as AdminIcon,zu as AgenticGridBar,Ou as AgenticPanel,ir as AlertIcon,os as AlignCenterIcon,rs as AlignJustifyIcon,ns as AlignLeftIcon,is as AlignRightIcon,Rs as ApiIcon,Hs as ArchitectureIcon,Vs as ArrowDownIcon,Rr as ArrowLeftIcon,Nr as ArrowRightIcon,vr as ArrowUpIcon,ua as BarChartIcon,es as BoldIcon,pr as BookIcon,Ps as BookmarkIcon,$s as BrainIcon,Ca as BugReportIcon,$r as BulbIcon,Ia as CakeIcon,fr as CalendarIcon,Xi as CardsIcon,Vi as ChatIcon,vi as CheckIcon,Si as ChevronLeftIcon,Gi as ChevronRightIcon,zi as ChevronsIcon,ta as CleaningIcon,mr as ClockIcon,Ri as CloseIcon,Ms as CloudIcon,Zr as CodeIcon,Fs as ComputerIcon,Ti as ContrastIcon,er as CopyIcon,ti as DEFAULT_A11Y_SETTINGS,ea as DashboardIcon,Ns as DataObjectIcon,zr as DeleteIcon,_s as DocumentScannerIcon,_i as DownloadIcon,Aa as DragHandleIcon,ra as ExploreIcon,Gr as ExternalIcon,ar as EyeIcon,Js as EyeOffIcon,Ll as FONT_MAX,Ml as FONT_MIN,ei as FONT_STEP,js as FactCheckIcon,Sr as FileIcon,tr as FilterIcon,Ar as FirstIcon,gs as FontIcon,sr as FormIcon,Bs as FullscreenExitIcon,Qs as FullscreenIcon,qs as GavelIcon,kr as GiftIcon,Qr as GlobeIcon,Ht as GridCore,Oi as GridIcon,Fr as HeadphonesIcon,Vr as HeartFilledIcon,Xr as HeartIcon,Pr as HelpIcon,dr as HomeIcon,jr as HubIcon,Qi as ICON_MIN_CONTRAST,yi as ICON_NAMES,hi as ICON_PATHS,wi as IconBase,Dr as ImageIcon,Zs as ImageSearchIcon,rr as InfoIcon,ia as InsightsIcon,Jr as InstallIcon,fa as IntegrationIcon,ts as ItalicIcon,Es as JoinIcon,fs as KeyIcon,ga as KeyboardIcon,aa as LabelIcon,Br as LampIcon,nr as LastIcon,gr as LayoutIcon,us as LinkIcon,wa as LoaderIcon,Cs as LockIcon,Qa as LoginIcon,Ba as LogoutIcon,Lr as MapIcon,qr as MeditateIcon,Cr as MenuIcon,bs as MergeIcon,ji as MicIcon,Hi as MinusIcon,Mi as MoonIcon,Li as MotionIcon,Ss as MovieIcon,Tr as MusicIcon,ks as MusicOffIcon,Ds as MusicVideoIcon,ma as NamaskarIcon,Is as PageBreakIcon,Pi as PaletteIcon,Er as PauseIcon,Yr as PenIcon,hr as PersonIcon,Ts as PhoneIcon,Mr as PinIcon,br as PlayIcon,ur as PlugIcon,qi as PlusIcon,ss as QuoteIcon,Io as RUST_AUTO_MIN_ROWS,Os as RadioCheckedIcon,zs as RadioIcon,Yi as ReadingIcon,ms as RedoIcon,Ea as RepeatIcon,$i as ResetIcon,Or as RobotIcon,mt as Runtime,sa as SaveIcon,Ks as SchoolIcon,xi as SearchIcon,Us as SearchOffIcon,wr as SendIcon,pa as SentimentSadIcon,xr as ShareIcon,ka as ShieldCheckIcon,ys as ShuffleIcon,Ki as SkipIcon,Gs as SlideshowIcon,Di as SortDownIcon,Wi as SortIcon,ki as SortUpIcon,or as SparkIcon,Ji as SpeakerIcon,ba as SpeedIcon,ls as SpellcheckIcon,xa as StarIcon,Zi as StopIcon,vs as StorageIcon,ds as StyleIcon,Wr as SunIcon,ha as SunriseIcon,ya as SunsetIcon,hs as SwapIcon,Ui as TargetIcon,Kr as TempleIcon,_r as TextIcon,as as TitleIcon,Ir as ToolsIcon,ws as TouchIcon,ca as TrendingDownIcon,la as TrendingUpIcon,Hr as TrophyIcon,As as UnderlineIcon,cr as UndoIcon,ps as UnlockIcon,Xs as UploadIcon,yr as UsersIcon,xs as VolumeOffIcon,Ws as VolunteerIcon,Ur as WalletIcon,lr as WandIcon,Ls as WifiIcon,Ys as WifiOffIcon,pd as YuktAI,rn as YuktAIWrapper,ll as YuktaiGrid,an as YuktaiGridAI,Xg as YuktaiGridAgent,kA as YuktaiGridWebMCP,Ni as YuktaiIcon,na as ZoomInIcon,oa as ZoomOutIcon,Le as accessibleName,wn as addPeriods,Zt as aggregate,hA as aiPlugin,bl as analyzePage,_o as answerGridQuestion,nt as applyGridFilters,Xo as askAboutPage,gi as askInsight,zo as auditToJSON,Wo as auditToMarkdown,To as clearFilters,Lo as clearSort,ql as comparePeriods,JA as contrastRatio,vo as countGrid,Oo as createA11yCopilot,mA as createContextIndex,Xt as createGridTools,Ai as createVoiceA11yController,rn as default,Qn as detectAnomalies,xl as detectPageIntent,at as executeGridQuery,Fo as filterGrid,Ke as findMentionedColumn,Ro as getColumns,No as getRow,Qe as getRowId,bg as gridPassages,Kl as groupBy,Ot as highlightRows,Bi as iconContrast,Ei as iconSvg,nn as loadGridCore,Ul as moveGridRowFocus,EA as openRow,Bg as pagePassages,fn as parseAmount,UA as parseColor,Jo as parseGridIntent,Tt as parseGridQuery,Yl as parseVoiceA11yCommand,bi as pickGlyphColor,bn as planTasks,Ql as readFormFields,mi as relativeLuminance,ci as reviewDesign,Bl as reviewForm,vA as reviewForms,Rl as runGridQuery,st as runQaAudit,ri as runTasks,Go as searchGrid,bA as selectRow,Mo as sortGrid,ai as startOfPeriod,Bn as summarizeRows,yt as toGridToolColumns,fA as tokenize,Hl as trend,Wu as useAgenticGrid,dl as useGrid,xA as useYuktaiGridAgent,yA as voicePlugin,tn as wantsRustEngine,Se as wcag,Se as wcagPlugin};
|