ape-accessibility 0.5.0 → 0.6.1
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/dist/auto.cjs +5 -5
- package/dist/auto.global.js +10 -10
- package/dist/auto.js +5 -5
- package/dist/index.cjs +5 -5
- package/dist/index.global.js +10 -10
- package/dist/index.js +5 -5
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{createRoot as yn}from"react-dom/client";import{useState as fn,useEffect as mn}from"react";import Jt from"react";import qt from"clsx";function L(...e){return qt(e)}import{jsx as G,jsxs as Ae}from"react/jsx-runtime";var le=Jt.forwardRef(({children:e,className:t,size:n="lg",leftIcon:i,rightIcon:s,disabled:r,...a},c)=>{let l=!!e,x=!l&&!!i!==!!s,A=n==="sm"?"text-sm px-3 py-2":"text-lg px-5 py-3",v=x?L("rounded-full",n==="sm"?"w-[40px] h-[40px] p-0":"w-[60px] h-[60px] p-0"):"rounded-[30px] py-2 px-5";return Ae("button",{ref:c,className:L("group cursor-pointer inline-flex items-center justify-center transition-all ease-in-out duration-200 relative overflow-hidden","apea-gradient text-white bg-blue-500 hover:ring-2 hover:ring-yellow-500 hover:font-semibold",A,v,r?"opacity-50 cursor-not-allowed":"active:scale-90",t),disabled:r,...a,children:[i&&G("span",{className:L(l&&"mr-2"),children:i}),l&&Ae("span",{className:"relative inline-flex items-center whitespace-nowrap",children:[G("span",{className:"invisible font-bold","aria-hidden":"true",children:e}),G("span",{className:"absolute inset-0 transition-all duration-200",children:e})]}),s&&G("span",{className:L(l&&"ml-2"),children:s})]})});le.displayName="Button";import{jsx as de,jsxs as Qt}from"react/jsx-runtime";function Le({size:e=24,color:t="currentColor",className:n,...i}){return Qt("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 26 30",fill:t,className:n,"aria-hidden":"true",focusable:"false",...i,children:[de("mask",{id:"path-1-inside-1_2435_12083",fill:"white",children:de("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4917 0.0390191C10.9891 0.276653 9.83951 1.43644 9.61036 2.94578C9.45194 3.98907 9.82094 5.09148 10.5813 5.84664C11.935 7.19114 14.0664 7.19114 15.4201 5.84664C16.7606 4.51534 16.7599 2.35948 15.4184 1.00802C14.6598 0.24369 13.5405 -0.126872 12.4917 0.0390191ZM12.706 1.73821C12.3594 1.80312 12.0529 1.96654 11.7962 2.22334C11.5927 2.42688 11.4709 2.62091 11.3736 2.8966L11.3042 3.09318V3.42818V3.76317L11.3736 3.95975C11.4709 4.23544 11.5927 4.42947 11.7962 4.63302C11.9997 4.83659 12.1937 4.95842 12.4693 5.05578L12.6658 5.12519H13.0007H13.3356L13.5321 5.05578C13.8077 4.95842 14.0017 4.83659 14.2052 4.63302C14.4087 4.42947 14.5305 4.23544 14.6278 3.95975L14.6972 3.76317V3.42818V3.09318L14.6278 2.8966C14.5305 2.62091 14.4087 2.42688 14.2052 2.22334C13.8866 1.90463 13.5251 1.74475 13.0811 1.72625C12.9411 1.72041 12.7723 1.7258 12.706 1.73821ZM2.25726 6.41702C2.03505 6.46277 1.77857 6.56493 1.57407 6.68923C0.660849 7.24423 0.26669 8.37245 0.639978 9.36291C0.842577 9.90052 1.26101 10.3605 1.76161 10.5958C1.86476 10.6442 3.47127 11.225 5.3316 11.8863L8.71405 13.0887V15.9233V18.7579L7.62872 23.1003C7.0318 25.4885 6.53337 27.5356 6.5211 27.6494C6.40938 28.6853 7.0643 29.6429 8.08672 29.9387L8.29878 30L8.64707 29.998C9.06199 29.9955 9.23847 29.9553 9.5888 29.7832C10.0024 29.58 10.368 29.2187 10.5625 28.821C10.6057 28.7326 11.169 27.0715 11.8142 25.1297C12.4594 23.188 12.9933 21.5993 13.0007 21.5993C13.0081 21.5993 13.542 23.188 14.1872 25.1297C14.8324 27.0715 15.3957 28.7326 15.439 28.821C15.6334 29.2187 15.999 29.58 16.4126 29.7832C16.763 29.9553 16.9394 29.9955 17.3544 29.998L17.7026 30L17.9147 29.9387C18.9371 29.6429 19.5921 28.6853 19.4803 27.6494C19.4681 27.5356 18.9696 25.4885 18.3727 23.1003L17.2874 18.7579V15.9233V13.0887L20.6698 11.8863C22.5302 11.225 24.1367 10.6442 24.2398 10.5958C25.1725 10.1573 25.6811 9.08532 25.4407 8.06454C25.3872 7.83741 25.2031 7.44981 25.0524 7.24699C24.8326 6.95136 24.4552 6.66642 24.0925 6.5224C23.7068 6.36927 23.1663 6.33116 22.7663 6.4289C22.6484 6.45768 21.1414 6.95206 19.4174 7.5275L16.283 8.57374H13.0007H9.71847L6.58398 7.5275C4.86001 6.95206 3.35304 6.45768 3.23515 6.4289L3.02082 6.37653L2.72611 6.37886C2.56402 6.38015 2.35304 6.39733 2.25726 6.41702ZM2.50479 8.13564C2.30015 8.23654 2.17455 8.4846 2.2258 8.68659C2.25602 8.80572 2.34248 8.94165 2.42955 9.00696C2.46227 9.03151 4.27547 9.68767 6.45889 10.4651L10.4287 11.8786V15.4254V18.9723L9.33026 23.3672C8.7261 25.7844 8.2318 27.8136 8.2318 27.8766C8.2318 28.0357 8.30837 28.1644 8.44648 28.2374C8.63659 28.338 8.82523 28.3031 8.96045 28.1424L9.03019 28.0595L10.6277 23.2679L12.2253 18.4763L12.3139 18.3555C12.4162 18.2158 12.5635 18.1109 12.7427 18.05C13.0769 17.9365 13.4748 18.0652 13.6876 18.3555L13.7761 18.4763L15.3737 23.2679L16.9712 28.0595L17.041 28.1424C17.1762 28.3031 17.3648 28.338 17.5549 28.2374C17.6931 28.1644 17.7696 28.0357 17.7696 27.8766C17.7696 27.8136 17.2753 25.7844 16.6712 23.3672L15.5727 18.9723V15.4254V11.8785L19.5518 10.4618L23.531 9.04509L23.6127 8.96515C23.732 8.84849 23.781 8.73869 23.7817 8.58604C23.7826 8.42537 23.7211 8.30671 23.5763 8.18967L23.4754 8.10809L23.3218 8.09826L23.1681 8.08842L19.8729 9.18869L16.5776 10.2889H13.0007H9.42379L6.12865 9.19013L2.83352 8.09134L2.71285 8.09196C2.64646 8.09228 2.55285 8.11195 2.50479 8.13564Z"})}),de("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4917 0.0390191C10.9891 0.276653 9.83951 1.43644 9.61036 2.94578C9.45194 3.98907 9.82094 5.09148 10.5813 5.84664C11.935 7.19114 14.0664 7.19114 15.4201 5.84664C16.7606 4.51534 16.7599 2.35948 15.4184 1.00802C14.6598 0.24369 13.5405 -0.126872 12.4917 0.0390191ZM12.706 1.73821C12.3594 1.80312 12.0529 1.96654 11.7962 2.22334C11.5927 2.42688 11.4709 2.62091 11.3736 2.8966L11.3042 3.09318V3.42818V3.76317L11.3736 3.95975C11.4709 4.23544 11.5927 4.42947 11.7962 4.63302C11.9997 4.83659 12.1937 4.95842 12.4693 5.05578L12.6658 5.12519H13.0007H13.3356L13.5321 5.05578C13.8077 4.95842 14.0017 4.83659 14.2052 4.63302C14.4087 4.42947 14.5305 4.23544 14.6278 3.95975L14.6972 3.76317V3.42818V3.09318L14.6278 2.8966C14.5305 2.62091 14.4087 2.42688 14.2052 2.22334C13.8866 1.90463 13.5251 1.74475 13.0811 1.72625C12.9411 1.72041 12.7723 1.7258 12.706 1.73821ZM2.25726 6.41702C2.03505 6.46277 1.77857 6.56493 1.57407 6.68923C0.660849 7.24423 0.26669 8.37245 0.639978 9.36291C0.842577 9.90052 1.26101 10.3605 1.76161 10.5958C1.86476 10.6442 3.47127 11.225 5.3316 11.8863L8.71405 13.0887V15.9233V18.7579L7.62872 23.1003C7.0318 25.4885 6.53337 27.5356 6.5211 27.6494C6.40938 28.6853 7.0643 29.6429 8.08672 29.9387L8.29878 30L8.64707 29.998C9.06199 29.9955 9.23847 29.9553 9.5888 29.7832C10.0024 29.58 10.368 29.2187 10.5625 28.821C10.6057 28.7326 11.169 27.0715 11.8142 25.1297C12.4594 23.188 12.9933 21.5993 13.0007 21.5993C13.0081 21.5993 13.542 23.188 14.1872 25.1297C14.8324 27.0715 15.3957 28.7326 15.439 28.821C15.6334 29.2187 15.999 29.58 16.4126 29.7832C16.763 29.9553 16.9394 29.9955 17.3544 29.998L17.7026 30L17.9147 29.9387C18.9371 29.6429 19.5921 28.6853 19.4803 27.6494C19.4681 27.5356 18.9696 25.4885 18.3727 23.1003L17.2874 18.7579V15.9233V13.0887L20.6698 11.8863C22.5302 11.225 24.1367 10.6442 24.2398 10.5958C25.1725 10.1573 25.6811 9.08532 25.4407 8.06454C25.3872 7.83741 25.2031 7.44981 25.0524 7.24699C24.8326 6.95136 24.4552 6.66642 24.0925 6.5224C23.7068 6.36927 23.1663 6.33116 22.7663 6.4289C22.6484 6.45768 21.1414 6.95206 19.4174 7.5275L16.283 8.57374H13.0007H9.71847L6.58398 7.5275C4.86001 6.95206 3.35304 6.45768 3.23515 6.4289L3.02082 6.37653L2.72611 6.37886C2.56402 6.38015 2.35304 6.39733 2.25726 6.41702ZM2.50479 8.13564C2.30015 8.23654 2.17455 8.4846 2.2258 8.68659C2.25602 8.80572 2.34248 8.94165 2.42955 9.00696C2.46227 9.03151 4.27547 9.68767 6.45889 10.4651L10.4287 11.8786V15.4254V18.9723L9.33026 23.3672C8.7261 25.7844 8.2318 27.8136 8.2318 27.8766C8.2318 28.0357 8.30837 28.1644 8.44648 28.2374C8.63659 28.338 8.82523 28.3031 8.96045 28.1424L9.03019 28.0595L10.6277 23.2679L12.2253 18.4763L12.3139 18.3555C12.4162 18.2158 12.5635 18.1109 12.7427 18.05C13.0769 17.9365 13.4748 18.0652 13.6876 18.3555L13.7761 18.4763L15.3737 23.2679L16.9712 28.0595L17.041 28.1424C17.1762 28.3031 17.3648 28.338 17.5549 28.2374C17.6931 28.1644 17.7696 28.0357 17.7696 27.8766C17.7696 27.8136 17.2753 25.7844 16.6712 23.3672L15.5727 18.9723V15.4254V11.8785L19.5518 10.4618L23.531 9.04509L23.6127 8.96515C23.732 8.84849 23.781 8.73869 23.7817 8.58604C23.7826 8.42537 23.7211 8.30671 23.5763 8.18967L23.4754 8.10809L23.3218 8.09826L23.1681 8.08842L19.8729 9.18869L16.5776 10.2889H13.0007H9.42379L6.12865 9.19013L2.83352 8.09134L2.71285 8.09196C2.64646 8.09228 2.55285 8.11195 2.50479 8.13564Z",strokeWidth:"0.354242",mask:"url(#path-1-inside-1_2435_12083)"})]})}import{useState as ci,useEffect as Ie,useCallback as R}from"react";var we=["p","span","div","h1","h2","h3","h4","h5","h6","a","li","td","th","label","input","textarea","select","button","blockquote","pre","code"],ei={normal:null,high:{styles:{filter:"contrast(125%)"}},dark:{styles:{color:"#FFF",fill:"#FFF","background-color":"#000"},childrenSelector:we},light:{styles:{color:"#000",fill:"#000","background-color":"#FFF"},childrenSelector:we}};function ti(e){let{styles:t,selector:n,childrenSelector:i}=e,s="";if(t){let a=Object.keys(t).map(c=>`${c}: ${t[c]} !important;`).join(" ");s+=`${n} { ${a} }`,i&&i.forEach(c=>{s+=`${n} ${c} { ${a} }`})}return s}function ii({css:e,id:t}){let n=document.getElementById(t);n&&n.remove();let i=document.createElement("style");i.id=t,i.textContent=e,document.head.appendChild(i)}function $(e){let t=ei[e],n="ape-accessibility-contrast",i="ape-contrast-active";if(!t){let r=document.getElementById(n);r&&r.remove(),document.documentElement.classList.remove(i);return}let s=ti({...t,selector:`html.${i}`});ii({css:s,id:n}),document.documentElement.classList.add(i)}var ue="ape-accessibility-settings";function Ee(e,t,n=30){let i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),document.cookie=`${e}=${t};expires=${i.toUTCString()};path=/`}function ni(e){let t=e+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let s=n[i];for(;s?.charAt(0)===" ";)s=s?.substring(1,s?.length);if(s?.indexOf(t)===0)return s.substring(t.length,s.length)}return null}function oi(e,t){let n=JSON.stringify(t);try{localStorage.setItem(e,n)}catch(i){console.error("Error saving storage data:",i),Ee(e,n)}}function si(e){let t=null;try{t=localStorage.getItem(e)}catch(n){console.error("Error getting storage data:",n),t=ni(e)}if(!t)return null;try{return JSON.parse(t)}catch(n){return console.error("Error parsing storage data:",n),null}}function ri(e){try{localStorage.removeItem(e)}catch(t){Ee(e,"",-1),console.error("Error clearing storage data:",t)}}var ge=class{getSettings(){return si(ue)}saveSettings(t){let n={...t,updatedAt:new Date};oi(ue,n)}clearSettings(){ri(ue)}},Z=new ge;var C={fontSize:100,contrast:"normal",language:"es",colorblindMode:"normal",saturationMode:"normal",dyslexiaFont:!1,letterSpacing:0,lineHeight:0,fontWeight:!1,highlightMode:"none",readingGuide:!1,stopAnimations:!1,bigCursor:!1,hideImages:!1,textAlign:"default",ttsActive:!1},y={...C};function ai(){let e=Z.getSettings();return e&&(y={...C,...e}),y}function d(){return{...y}}function pe(e){return y={...y,...e,updatedAt:new Date},Z.saveSettings(y),Me("update",y),y}function W(){return y={...C},Z.saveSettings(y),Me("reset",y),y}function g(e,t){return pe({[e]:t})}function Me(e,t){let n=new CustomEvent("accessibilitySettingsChanged",{detail:{type:e,settings:t,timestamp:new Date}});window.dispatchEvent(n)}function ke(e=y){return e.fontSize!==C.fontSize||e.contrast!==C.contrast||e.colorblindMode!==C.colorblindMode||e.saturationMode!==C.saturationMode||e.dyslexiaFont===!0||(e.letterSpacing??0)>0||(e.lineHeight??0)>0||e.fontWeight===!0||e.highlightMode!==C.highlightMode||e.readingGuide===!0||e.stopAnimations===!0||e.bigCursor===!0||e.hideImages===!0||e.textAlign!==C.textAlign||e.ttsActive===!0}typeof window<"u"&&ai();function Ne(){let[e,t]=ci(()=>d().contrast||"normal");Ie(()=>{$(e)},[]),Ie(()=>{let p=x=>{let{settings:A}=x.detail,v=A.contrast||"normal";v!==e&&(t(v),$(v))};return window.addEventListener("accessibilitySettingsChanged",p),()=>{window.removeEventListener("accessibilitySettingsChanged",p)}},[e]);let n=R(p=>{t(p),$(p),g("contrast",p),window.dispatchEvent(new CustomEvent("accessibilityContrastChanged",{detail:{mode:p,isActive:p!=="normal"}}))},[]),i=R(()=>{n(e==="normal"?"high":"normal")},[e,n]),s=R(p=>{n(p)},[n]),r=R(()=>{n(e==="high"?"normal":"high")},[e,n]),a=R(()=>{n(e==="dark"?"normal":"dark")},[e,n]),c=R(()=>{n(e==="light"?"normal":"light")},[e,n]),l=R(()=>{switch(e){case"high":return"Alto contraste";case"dark":return"Contraste oscuro";case"light":return"Contraste claro";default:return"Normal"}},[e]);return{contrastMode:e,isActive:e!=="normal",getContrastDescription:l,setContrastMode:s,updateContrast:n,toggleContrast:i,toggleHighContrast:r,toggleDarkContrast:a,toggleLightContrast:c,isHighContrast:e==="high",isDarkContrast:e==="dark",isLightContrast:e==="light"}}import{useState as Pe,useEffect as _e,useCallback as P}from"react";var Te=['i[class*="icon"]','i[class*="fa-"]',".icon",".fa",".material-icons","[data-icon]","svg"],li="h1,h2,h3,h4,h5,h6,p,a,dl,dt,li,ol,th,td,span,blockquote,.asw-text",Re={};Te.forEach(e=>{Re[e]=!0});function di(e=1){document.querySelectorAll(li).forEach(t=>{let n=t;if(Array.prototype.slice.call(n.classList).some(a=>Re[`.${a}`])||Te.some(a=>n.matches(a)))return;let s=Number(n.dataset.apeOrgFontSize)||parseInt(window.getComputedStyle(n).fontSize);n.dataset.apeOrgFontSize||(n.dataset.apeOrgFontSize=String(s));let r=s*e;n.style.fontSize=`${r}px`})}function ui(){document.querySelectorAll("[data-ape-org-font-size]").forEach(e=>{let t=e,n=t.dataset.apeOrgFontSize;n&&(t.style.fontSize=`${n}px`,delete t.dataset.apeOrgFontSize)})}function gi(e){return e/100}function j(e){let t=gi(e);e===100?ui():di(t)}function He(){let[s,r]=Pe(()=>d().fontSize||100),[a,c]=Pe(!1);_e(()=>{j(s)},[]),_e(()=>{let f=T=>{let{settings:S}=T.detail,H=S.fontSize||100;H!==s&&(r(H),j(H))};return window.addEventListener("accessibilitySettingsChanged",f),()=>{window.removeEventListener("accessibilitySettingsChanged",f)}},[s]);let l=P(f=>{r(f),j(f),g("fontSize",f),window.dispatchEvent(new CustomEvent("accessibilityTextSizeChanged",{detail:{percentage:f,isActive:f!==100}}))},[]),h=P(()=>{let f=Math.min(s+5,120);f!==s&&l(f)},[s,l]),p=P(()=>{let f=Math.max(s-5,90);f!==s&&l(f)},[s,l]),x=P(()=>{l(100)},[l]),A=P(f=>{f>=90&&f<=120&&l(f)},[l]),v=P(()=>{c(!a)},[a]),M=P(()=>s===100?"Normal":s<100?`Reducido ${s}%`:`Aumentado ${s}%`,[s]),_=s<120,k=s>90;return{textSizePercentage:s,increaseTextSize:h,decreaseTextSize:p,resetTextSize:x,canIncrease:_,canDecrease:k,getTextSizeDescription:M,isActive:s!==100,toggleTextSizeOptions:v,setSpecificTextSize:A,isOptionsOpen:a,setIsOptionsOpen:c,MIN_SIZE:90,MAX_SIZE:120,NORMAL_SIZE:100,INCREMENT:5}}import{useState as pi,useEffect as fi,useCallback as U}from"react";function We(){let[e,t]=pi(()=>d().language||"es");fi(()=>{let a=c=>{let{settings:l}=c.detail,h=l.language||"es";h!==e&&t(h)};return window.addEventListener("accessibilitySettingsChanged",a),()=>{window.removeEventListener("accessibilitySettingsChanged",a)}},[e]);let n=U(a=>{t(a),g("language",a),window.dispatchEvent(new CustomEvent("accessibilityLanguageChanged",{detail:{mode:a,isActive:a!=="es"}}))},[]),i=U(()=>{n(e==="es"?"en":"es")},[e,n]),s=U(a=>{n(a)},[n]),r=U(()=>e==="en"?"English":"Espa\xF1ol",[e]);return{languageMode:e,isActive:e!=="es",toggleLanguage:i,setSpecificLanguage:s,getLanguageDescription:r,updateLanguage:n,isEnglish:e==="en",isSpanish:e==="es"}}import{useState as mi,useEffect as Oe,useCallback as hi}from"react";function X(e){let t=document.documentElement;e==="normal"?t.removeAttribute("data-colorblind-mode"):t.setAttribute("data-colorblind-mode",e)}function ze(){let[e,t]=mi(()=>d().colorblindMode??"normal");Oe(()=>{X(e)},[]),Oe(()=>{let i=s=>{let{settings:r}=s.detail,a=r.colorblindMode??"normal";a!==e&&(t(a),X(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=hi(i=>{t(i),X(i),g("colorblindMode",i),window.dispatchEvent(new CustomEvent("accessibilityColorblindChanged",{detail:{mode:i}}))},[]);return{colorblindMode:e,setColorblindMode:n,isActive:e!=="normal"}}import{useState as yi,useEffect as De,useCallback as vi}from"react";var Fe={normal:null,high:"accessibility-saturation-high",low:"accessibility-saturation-low",mono:"accessibility-saturation-mono"},bi=Object.values(Fe).filter(Boolean);function K(e){let t=document.documentElement;bi.forEach(i=>t.classList.remove(i));let n=Fe[e];n&&t.classList.add(n)}function Be(){let[e,t]=yi(()=>d().saturationMode??"normal");De(()=>{K(e)},[]),De(()=>{let i=s=>{let{settings:r}=s.detail,a=r.saturationMode??"normal";a!==e&&(t(a),K(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=vi(i=>{t(i),K(i),g("saturationMode",i),window.dispatchEvent(new CustomEvent("accessibilitySaturationChanged",{detail:{mode:i}}))},[]);return{saturationMode:e,setSaturationMode:n,isActive:e!=="normal"}}import{useState as Si,useEffect as Ge,useCallback as Ci}from"react";var Ve="accessibility-dyslexia";function Y(e){let t=document.documentElement;e?t.classList.add(Ve):t.classList.remove(Ve)}function $e(){let[e,t]=Si(()=>d().dyslexiaFont??!1);Ge(()=>{Y(e)},[]),Ge(()=>{let i=s=>{let{settings:r}=s.detail,a=r.dyslexiaFont??!1;a!==e&&(t(a),Y(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Ci(()=>{let i=!e;t(i),Y(i),g("dyslexiaFont",i),window.dispatchEvent(new CustomEvent("accessibilityDyslexiaChanged",{detail:{isActive:i}}))},[e]);return{isActive:e,toggle:n}}import{useState as xi,useEffect as Xe,useCallback as fe}from"react";var Ze="accessibility-letter-spacing",je="accessibility-line-height",Ue="accessibility-font-weight";function O(e){let t=document.documentElement;t.style.setProperty("--accessibility-letter-spacing",String(e)),e>0?t.classList.add(Ze):t.classList.remove(Ze)}function z(e){let t=document.documentElement;t.style.setProperty("--accessibility-line-height",String(e)),e>0?t.classList.add(je):t.classList.remove(je)}function q(e){let t=document.documentElement;e?t.classList.add(Ue):t.classList.remove(Ue)}var Ke=3;function Ye(){let[e,t]=xi(()=>d().letterSpacing??0);Xe(()=>{O(e)},[]),Xe(()=>{let r=a=>{let{settings:c}=a.detail,l=c.letterSpacing??0;l!==e&&(t(l),O(l))};return window.addEventListener("accessibilitySettingsChanged",r),()=>window.removeEventListener("accessibilitySettingsChanged",r)},[e]);let n=fe(()=>{let r=Math.min(e+1,Ke);t(r),O(r),g("letterSpacing",r)},[e]),i=fe(()=>{let r=Math.max(e-1,0);t(r),O(r),g("letterSpacing",r)},[e]),s=fe(()=>{t(0),O(0),g("letterSpacing",0)},[]);return{level:e,increase:n,decrease:i,reset:s,isActive:e>0,canIncrease:e<Ke,canDecrease:e>0}}import{useState as Ai,useEffect as qe,useCallback as me}from"react";var Je=3;function Qe(){let[e,t]=Ai(()=>d().lineHeight??0);qe(()=>{z(e)},[]),qe(()=>{let r=a=>{let{settings:c}=a.detail,l=c.lineHeight??0;l!==e&&(t(l),z(l))};return window.addEventListener("accessibilitySettingsChanged",r),()=>window.removeEventListener("accessibilitySettingsChanged",r)},[e]);let n=me(()=>{let r=Math.min(e+1,Je);t(r),z(r),g("lineHeight",r)},[e]),i=me(()=>{let r=Math.max(e-1,0);t(r),z(r),g("lineHeight",r)},[e]),s=me(()=>{t(0),z(0),g("lineHeight",0)},[]);return{level:e,increase:n,decrease:i,reset:s,isActive:e>0,canIncrease:e<Je,canDecrease:e>0}}import{useState as Li,useEffect as et,useCallback as wi}from"react";function tt(){let[e,t]=Li(()=>d().fontWeight??!1);et(()=>{q(e)},[]),et(()=>{let i=s=>{let{settings:r}=s.detail,a=r.fontWeight??!1;a!==e&&(t(a),q(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=wi(()=>{let i=!e;t(i),q(i),g("fontWeight",i)},[e]);return{isBold:e,toggle:n,isActive:e}}import{useState as Ei,useEffect as it,useCallback as he}from"react";function J(e){let t=document.documentElement;e==="none"?t.removeAttribute("data-highlight"):t.setAttribute("data-highlight",e)}function nt(){let[e,t]=Ei(()=>d().highlightMode??"none");it(()=>{J(e)},[]),it(()=>{let r=a=>{let{settings:c}=a.detail,l=c.highlightMode??"none";l!==e&&(t(l),J(l))};return window.addEventListener("accessibilitySettingsChanged",r),()=>window.removeEventListener("accessibilitySettingsChanged",r)},[e]);let n=he(r=>{t(r),J(r),g("highlightMode",r)},[]),i=he(()=>{n(e==="titles"?"none":e==="links"?"both":e==="both"?"links":"titles")},[e,n]),s=he(()=>{n(e==="links"?"none":e==="titles"?"both":e==="both"?"titles":"links")},[e,n]);return{highlightMode:e,setHighlightMode:n,toggleTitles:i,toggleLinks:s,isTitlesActive:e==="titles"||e==="both",isLinksActive:e==="links"||e==="both",isActive:e!=="none"}}import{useState as Ii,useEffect as lt,useCallback as Ni}from"react";var ot="accessibility-stop-animations",st="accessibility-big-cursor";function Q(e){e?Mi():ki()}function ee(e){let t=document.documentElement;e?t.classList.add(ot):t.classList.remove(ot)}function te(e){let t=document.documentElement;e?t.classList.add(st):t.classList.remove(st)}var rt=`
|
|
1
|
+
import{createRoot as Zn}from"react-dom/client";import{useState as Bn,useEffect as Vn}from"react";import bi from"react";import hi from"clsx";function O(...e){return hi(e)}import{jsx as K,jsxs as De}from"react/jsx-runtime";var ye=bi.forwardRef(({children:e,className:t,size:n="lg",leftIcon:i,rightIcon:o,disabled:s,...a},l)=>{let c=!!e,h=!c&&!!i!==!!o,v=n==="sm"?"text-sm px-3 py-2":"text-lg px-5 py-3",x=h?O("rounded-full",n==="sm"?"w-[40px] h-[40px] p-0":"w-[60px] h-[60px] p-0"):"rounded-[30px] py-2 px-5";return De("button",{ref:l,className:O("group cursor-pointer inline-flex items-center justify-center transition-all ease-in-out duration-200 relative overflow-hidden","apea-gradient text-white bg-blue-500 hover:ring-2 hover:ring-yellow-500 hover:font-semibold",v,x,s?"opacity-50 cursor-not-allowed":"active:scale-90",t),disabled:s,...a,children:[i&&K("span",{className:O(c&&"mr-2"),children:i}),c&&De("span",{className:"relative inline-flex items-center whitespace-nowrap",children:[K("span",{className:"invisible font-bold","aria-hidden":"true",children:e}),K("span",{className:"absolute inset-0 transition-all duration-200",children:e})]}),o&&K("span",{className:O(c&&"ml-2"),children:o})]})});ye.displayName="Button";import{jsx as Se,jsxs as vi}from"react/jsx-runtime";function Be({size:e=24,color:t="currentColor",className:n,...i}){return vi("svg",{xmlns:"http://www.w3.org/2000/svg",width:e,height:e,viewBox:"0 0 26 30",fill:t,className:n,"aria-hidden":"true",focusable:"false",...i,children:[Se("mask",{id:"path-1-inside-1_2435_12083",fill:"white",children:Se("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4917 0.0390191C10.9891 0.276653 9.83951 1.43644 9.61036 2.94578C9.45194 3.98907 9.82094 5.09148 10.5813 5.84664C11.935 7.19114 14.0664 7.19114 15.4201 5.84664C16.7606 4.51534 16.7599 2.35948 15.4184 1.00802C14.6598 0.24369 13.5405 -0.126872 12.4917 0.0390191ZM12.706 1.73821C12.3594 1.80312 12.0529 1.96654 11.7962 2.22334C11.5927 2.42688 11.4709 2.62091 11.3736 2.8966L11.3042 3.09318V3.42818V3.76317L11.3736 3.95975C11.4709 4.23544 11.5927 4.42947 11.7962 4.63302C11.9997 4.83659 12.1937 4.95842 12.4693 5.05578L12.6658 5.12519H13.0007H13.3356L13.5321 5.05578C13.8077 4.95842 14.0017 4.83659 14.2052 4.63302C14.4087 4.42947 14.5305 4.23544 14.6278 3.95975L14.6972 3.76317V3.42818V3.09318L14.6278 2.8966C14.5305 2.62091 14.4087 2.42688 14.2052 2.22334C13.8866 1.90463 13.5251 1.74475 13.0811 1.72625C12.9411 1.72041 12.7723 1.7258 12.706 1.73821ZM2.25726 6.41702C2.03505 6.46277 1.77857 6.56493 1.57407 6.68923C0.660849 7.24423 0.26669 8.37245 0.639978 9.36291C0.842577 9.90052 1.26101 10.3605 1.76161 10.5958C1.86476 10.6442 3.47127 11.225 5.3316 11.8863L8.71405 13.0887V15.9233V18.7579L7.62872 23.1003C7.0318 25.4885 6.53337 27.5356 6.5211 27.6494C6.40938 28.6853 7.0643 29.6429 8.08672 29.9387L8.29878 30L8.64707 29.998C9.06199 29.9955 9.23847 29.9553 9.5888 29.7832C10.0024 29.58 10.368 29.2187 10.5625 28.821C10.6057 28.7326 11.169 27.0715 11.8142 25.1297C12.4594 23.188 12.9933 21.5993 13.0007 21.5993C13.0081 21.5993 13.542 23.188 14.1872 25.1297C14.8324 27.0715 15.3957 28.7326 15.439 28.821C15.6334 29.2187 15.999 29.58 16.4126 29.7832C16.763 29.9553 16.9394 29.9955 17.3544 29.998L17.7026 30L17.9147 29.9387C18.9371 29.6429 19.5921 28.6853 19.4803 27.6494C19.4681 27.5356 18.9696 25.4885 18.3727 23.1003L17.2874 18.7579V15.9233V13.0887L20.6698 11.8863C22.5302 11.225 24.1367 10.6442 24.2398 10.5958C25.1725 10.1573 25.6811 9.08532 25.4407 8.06454C25.3872 7.83741 25.2031 7.44981 25.0524 7.24699C24.8326 6.95136 24.4552 6.66642 24.0925 6.5224C23.7068 6.36927 23.1663 6.33116 22.7663 6.4289C22.6484 6.45768 21.1414 6.95206 19.4174 7.5275L16.283 8.57374H13.0007H9.71847L6.58398 7.5275C4.86001 6.95206 3.35304 6.45768 3.23515 6.4289L3.02082 6.37653L2.72611 6.37886C2.56402 6.38015 2.35304 6.39733 2.25726 6.41702ZM2.50479 8.13564C2.30015 8.23654 2.17455 8.4846 2.2258 8.68659C2.25602 8.80572 2.34248 8.94165 2.42955 9.00696C2.46227 9.03151 4.27547 9.68767 6.45889 10.4651L10.4287 11.8786V15.4254V18.9723L9.33026 23.3672C8.7261 25.7844 8.2318 27.8136 8.2318 27.8766C8.2318 28.0357 8.30837 28.1644 8.44648 28.2374C8.63659 28.338 8.82523 28.3031 8.96045 28.1424L9.03019 28.0595L10.6277 23.2679L12.2253 18.4763L12.3139 18.3555C12.4162 18.2158 12.5635 18.1109 12.7427 18.05C13.0769 17.9365 13.4748 18.0652 13.6876 18.3555L13.7761 18.4763L15.3737 23.2679L16.9712 28.0595L17.041 28.1424C17.1762 28.3031 17.3648 28.338 17.5549 28.2374C17.6931 28.1644 17.7696 28.0357 17.7696 27.8766C17.7696 27.8136 17.2753 25.7844 16.6712 23.3672L15.5727 18.9723V15.4254V11.8785L19.5518 10.4618L23.531 9.04509L23.6127 8.96515C23.732 8.84849 23.781 8.73869 23.7817 8.58604C23.7826 8.42537 23.7211 8.30671 23.5763 8.18967L23.4754 8.10809L23.3218 8.09826L23.1681 8.08842L19.8729 9.18869L16.5776 10.2889H13.0007H9.42379L6.12865 9.19013L2.83352 8.09134L2.71285 8.09196C2.64646 8.09228 2.55285 8.11195 2.50479 8.13564Z"})}),Se("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M12.4917 0.0390191C10.9891 0.276653 9.83951 1.43644 9.61036 2.94578C9.45194 3.98907 9.82094 5.09148 10.5813 5.84664C11.935 7.19114 14.0664 7.19114 15.4201 5.84664C16.7606 4.51534 16.7599 2.35948 15.4184 1.00802C14.6598 0.24369 13.5405 -0.126872 12.4917 0.0390191ZM12.706 1.73821C12.3594 1.80312 12.0529 1.96654 11.7962 2.22334C11.5927 2.42688 11.4709 2.62091 11.3736 2.8966L11.3042 3.09318V3.42818V3.76317L11.3736 3.95975C11.4709 4.23544 11.5927 4.42947 11.7962 4.63302C11.9997 4.83659 12.1937 4.95842 12.4693 5.05578L12.6658 5.12519H13.0007H13.3356L13.5321 5.05578C13.8077 4.95842 14.0017 4.83659 14.2052 4.63302C14.4087 4.42947 14.5305 4.23544 14.6278 3.95975L14.6972 3.76317V3.42818V3.09318L14.6278 2.8966C14.5305 2.62091 14.4087 2.42688 14.2052 2.22334C13.8866 1.90463 13.5251 1.74475 13.0811 1.72625C12.9411 1.72041 12.7723 1.7258 12.706 1.73821ZM2.25726 6.41702C2.03505 6.46277 1.77857 6.56493 1.57407 6.68923C0.660849 7.24423 0.26669 8.37245 0.639978 9.36291C0.842577 9.90052 1.26101 10.3605 1.76161 10.5958C1.86476 10.6442 3.47127 11.225 5.3316 11.8863L8.71405 13.0887V15.9233V18.7579L7.62872 23.1003C7.0318 25.4885 6.53337 27.5356 6.5211 27.6494C6.40938 28.6853 7.0643 29.6429 8.08672 29.9387L8.29878 30L8.64707 29.998C9.06199 29.9955 9.23847 29.9553 9.5888 29.7832C10.0024 29.58 10.368 29.2187 10.5625 28.821C10.6057 28.7326 11.169 27.0715 11.8142 25.1297C12.4594 23.188 12.9933 21.5993 13.0007 21.5993C13.0081 21.5993 13.542 23.188 14.1872 25.1297C14.8324 27.0715 15.3957 28.7326 15.439 28.821C15.6334 29.2187 15.999 29.58 16.4126 29.7832C16.763 29.9553 16.9394 29.9955 17.3544 29.998L17.7026 30L17.9147 29.9387C18.9371 29.6429 19.5921 28.6853 19.4803 27.6494C19.4681 27.5356 18.9696 25.4885 18.3727 23.1003L17.2874 18.7579V15.9233V13.0887L20.6698 11.8863C22.5302 11.225 24.1367 10.6442 24.2398 10.5958C25.1725 10.1573 25.6811 9.08532 25.4407 8.06454C25.3872 7.83741 25.2031 7.44981 25.0524 7.24699C24.8326 6.95136 24.4552 6.66642 24.0925 6.5224C23.7068 6.36927 23.1663 6.33116 22.7663 6.4289C22.6484 6.45768 21.1414 6.95206 19.4174 7.5275L16.283 8.57374H13.0007H9.71847L6.58398 7.5275C4.86001 6.95206 3.35304 6.45768 3.23515 6.4289L3.02082 6.37653L2.72611 6.37886C2.56402 6.38015 2.35304 6.39733 2.25726 6.41702ZM2.50479 8.13564C2.30015 8.23654 2.17455 8.4846 2.2258 8.68659C2.25602 8.80572 2.34248 8.94165 2.42955 9.00696C2.46227 9.03151 4.27547 9.68767 6.45889 10.4651L10.4287 11.8786V15.4254V18.9723L9.33026 23.3672C8.7261 25.7844 8.2318 27.8136 8.2318 27.8766C8.2318 28.0357 8.30837 28.1644 8.44648 28.2374C8.63659 28.338 8.82523 28.3031 8.96045 28.1424L9.03019 28.0595L10.6277 23.2679L12.2253 18.4763L12.3139 18.3555C12.4162 18.2158 12.5635 18.1109 12.7427 18.05C13.0769 17.9365 13.4748 18.0652 13.6876 18.3555L13.7761 18.4763L15.3737 23.2679L16.9712 28.0595L17.041 28.1424C17.1762 28.3031 17.3648 28.338 17.5549 28.2374C17.6931 28.1644 17.7696 28.0357 17.7696 27.8766C17.7696 27.8136 17.2753 25.7844 16.6712 23.3672L15.5727 18.9723V15.4254V11.8785L19.5518 10.4618L23.531 9.04509L23.6127 8.96515C23.732 8.84849 23.781 8.73869 23.7817 8.58604C23.7826 8.42537 23.7211 8.30671 23.5763 8.18967L23.4754 8.10809L23.3218 8.09826L23.1681 8.08842L19.8729 9.18869L16.5776 10.2889H13.0007H9.42379L6.12865 9.19013L2.83352 8.09134L2.71285 8.09196C2.64646 8.09228 2.55285 8.11195 2.50479 8.13564Z",strokeWidth:"0.354242",mask:"url(#path-1-inside-1_2435_12083)"})]})}import{useState as Mi,useEffect as je,useCallback as F}from"react";var Ve=["p","span","div","h1","h2","h3","h4","h5","h6","a","li","td","th","label","input","textarea","select","button","blockquote","pre","code"],yi={normal:null,high:{styles:{filter:"contrast(125%)"}},dark:{styles:{color:"#FFF",fill:"#FFF","background-color":"#000"},childrenSelector:Ve},light:{styles:{color:"#000",fill:"#000","background-color":"#FFF"},childrenSelector:Ve}};function Si(e){let{styles:t,selector:n,childrenSelector:i}=e,o="";if(t){let a=Object.keys(t).map(l=>`${l}: ${t[l]} !important;`).join(" ");o+=`${n} { ${a} }`,i&&i.forEach(l=>{o+=`${n} ${l} { ${a} }`})}return o}function Ci({css:e,id:t}){let n=document.getElementById(t);n&&n.remove();let i=document.createElement("style");i.id=t,i.textContent=e,document.head.appendChild(i)}function q(e){let t=yi[e],n="ape-accessibility-contrast",i="ape-contrast-active";if(!t){let s=document.getElementById(n);s&&s.remove(),document.documentElement.classList.remove(i);return}let o=Si({...t,selector:`html.${i}`});Ci({css:o,id:n}),document.documentElement.classList.add(i)}var Ce="ape-accessibility-settings";function Ge(e,t,n=30){let i=new Date;i.setTime(i.getTime()+n*24*60*60*1e3),document.cookie=`${e}=${t};expires=${i.toUTCString()};path=/`}function xi(e){let t=e+"=",n=document.cookie.split(";");for(let i=0;i<n.length;i++){let o=n[i];for(;o?.charAt(0)===" ";)o=o?.substring(1,o?.length);if(o?.indexOf(t)===0)return o.substring(t.length,o.length)}return null}function wi(e,t){let n=JSON.stringify(t);try{localStorage.setItem(e,n)}catch(i){console.error("Error saving storage data:",i),Ge(e,n)}}function Li(e){let t=null;try{t=localStorage.getItem(e)}catch(n){console.error("Error getting storage data:",n),t=xi(e)}if(!t)return null;try{return JSON.parse(t)}catch(n){return console.error("Error parsing storage data:",n),null}}function Ei(e){try{localStorage.removeItem(e)}catch(t){Ge(e,"",-1),console.error("Error clearing storage data:",t)}}var xe=class{getSettings(){return Li(Ce)}saveSettings(t){let n={...t,updatedAt:new Date};wi(Ce,n)}clearSettings(){Ei(Ce)}},J=new xe;var M={fontSize:100,contrast:"normal",language:"es",colorblindMode:"normal",saturationMode:"normal",dyslexiaFont:!1,letterSpacing:0,lineHeight:0,fontWeight:!1,highlightMode:"none",readingGuide:!1,stopAnimations:!1,bigCursor:!1,hideImages:!1,textAlign:"default",ttsActive:!1},A={...M};function Ai(){let e=J.getSettings();return e&&(A={...M,...e}),A}function u(){return{...A}}function we(e){return A={...A,...e,updatedAt:new Date},J.saveSettings(A),$e("update",A),A}function V(){return A={...M},J.saveSettings(A),$e("reset",A),A}function f(e,t){return we({[e]:t})}function $e(e,t){let n=new CustomEvent("accessibilitySettingsChanged",{detail:{type:e,settings:t,timestamp:new Date}});window.dispatchEvent(n)}function Ze(e=A){return e.fontSize!==M.fontSize||e.contrast!==M.contrast||e.colorblindMode!==M.colorblindMode||e.saturationMode!==M.saturationMode||e.dyslexiaFont===!0||(e.letterSpacing??0)>0||(e.lineHeight??0)>0||e.fontWeight===!0||e.highlightMode!==M.highlightMode||e.readingGuide===!0||e.stopAnimations===!0||e.bigCursor===!0||e.hideImages===!0||e.textAlign!==M.textAlign||e.ttsActive===!0}typeof window<"u"&&Ai();function Ue(){let[e,t]=Mi(()=>u().contrast||"normal");je(()=>{q(e)},[]),je(()=>{let d=h=>{let{settings:v}=h.detail,x=v.contrast||"normal";x!==e&&(t(x),q(x))};return window.addEventListener("accessibilitySettingsChanged",d),()=>{window.removeEventListener("accessibilitySettingsChanged",d)}},[e]);let n=F(d=>{t(d),q(d),f("contrast",d),window.dispatchEvent(new CustomEvent("accessibilityContrastChanged",{detail:{mode:d,isActive:d!=="normal"}}))},[]),i=F(()=>{n(e==="normal"?"high":"normal")},[e,n]),o=F(d=>{n(d)},[n]),s=F(()=>{n(e==="high"?"normal":"high")},[e,n]),a=F(()=>{n(e==="dark"?"normal":"dark")},[e,n]),l=F(()=>{n(e==="light"?"normal":"light")},[e,n]),c=F(()=>{switch(e){case"high":return"Alto contraste";case"dark":return"Contraste oscuro";case"light":return"Contraste claro";default:return"Normal"}},[e]);return{contrastMode:e,isActive:e!=="normal",getContrastDescription:c,setContrastMode:o,updateContrast:n,toggleContrast:i,toggleHighContrast:s,toggleDarkContrast:a,toggleLightContrast:l,isHighContrast:e==="high",isDarkContrast:e==="dark",isLightContrast:e==="light"}}import{useState as Ke,useEffect as qe,useCallback as z}from"react";var Xe=['i[class*="icon"]','i[class*="fa-"]',".icon",".fa",".material-icons","[data-icon]","svg"],ki="h1,h2,h3,h4,h5,h6,p,a,dl,dt,li,ol,th,td,span,blockquote,.asw-text",Ye={};Xe.forEach(e=>{Ye[e]=!0});function Ii(e=1){document.querySelectorAll(ki).forEach(t=>{let n=t;if(Array.prototype.slice.call(n.classList).some(a=>Ye[`.${a}`])||Xe.some(a=>n.matches(a)))return;let o=Number(n.dataset.apeOrgFontSize)||parseInt(window.getComputedStyle(n).fontSize);n.dataset.apeOrgFontSize||(n.dataset.apeOrgFontSize=String(o));let s=o*e;n.style.fontSize=`${s}px`})}function Ti(){document.querySelectorAll("[data-ape-org-font-size]").forEach(e=>{let t=e,n=t.dataset.apeOrgFontSize;n&&(t.style.fontSize=`${n}px`,delete t.dataset.apeOrgFontSize)})}function Ni(e){return e/100}function Q(e){let t=Ni(e);e===100?Ti():Ii(t)}function Je(){let[o,s]=Ke(()=>u().fontSize||100),[a,l]=Ke(!1);qe(()=>{Q(o)},[]),qe(()=>{let m=T=>{let{settings:w}=T.detail,k=w.fontSize||100;k!==o&&(s(k),Q(k))};return window.addEventListener("accessibilitySettingsChanged",m),()=>{window.removeEventListener("accessibilitySettingsChanged",m)}},[o]);let c=z(m=>{s(m),Q(m),f("fontSize",m),window.dispatchEvent(new CustomEvent("accessibilityTextSizeChanged",{detail:{percentage:m,isActive:m!==100}}))},[]),p=z(()=>{let m=Math.min(o+5,120);m!==o&&c(m)},[o,c]),d=z(()=>{let m=Math.max(o-5,90);m!==o&&c(m)},[o,c]),h=z(()=>{c(100)},[c]),v=z(m=>{m>=90&&m<=120&&c(m)},[c]),x=z(()=>{l(!a)},[a]),y=z(()=>o===100?"Normal":o<100?`Reducido ${o}%`:`Aumentado ${o}%`,[o]),H=o<120,E=o>90;return{textSizePercentage:o,increaseTextSize:p,decreaseTextSize:d,resetTextSize:h,canIncrease:H,canDecrease:E,getTextSizeDescription:y,isActive:o!==100,toggleTextSizeOptions:x,setSpecificTextSize:v,isOptionsOpen:a,setIsOptionsOpen:l,MIN_SIZE:90,MAX_SIZE:120,NORMAL_SIZE:100,INCREMENT:5}}import{useState as Ri,useEffect as Hi,useCallback as ee}from"react";function Qe(){let[e,t]=Ri(()=>u().language||"es");Hi(()=>{let a=l=>{let{settings:c}=l.detail,p=c.language||"es";p!==e&&t(p)};return window.addEventListener("accessibilitySettingsChanged",a),()=>{window.removeEventListener("accessibilitySettingsChanged",a)}},[e]);let n=ee(a=>{t(a),f("language",a),window.dispatchEvent(new CustomEvent("accessibilityLanguageChanged",{detail:{mode:a,isActive:a!=="es"}}))},[]),i=ee(()=>{n(e==="es"?"en":"es")},[e,n]),o=ee(a=>{n(a)},[n]),s=ee(()=>e==="en"?"English":"Espa\xF1ol",[e]);return{languageMode:e,isActive:e!=="es",toggleLanguage:i,setSpecificLanguage:o,getLanguageDescription:s,updateLanguage:n,isEnglish:e==="en",isSpanish:e==="es"}}import{useState as Pi,useEffect as et,useCallback as Oi}from"react";function te(e){let t=document.documentElement;e==="normal"?t.removeAttribute("data-colorblind-mode"):t.setAttribute("data-colorblind-mode",e)}function tt(){let[e,t]=Pi(()=>u().colorblindMode??"normal");et(()=>{te(e)},[]),et(()=>{let i=o=>{let{settings:s}=o.detail,a=s.colorblindMode??"normal";a!==e&&(t(a),te(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Oi(i=>{t(i),te(i),f("colorblindMode",i),window.dispatchEvent(new CustomEvent("accessibilityColorblindChanged",{detail:{mode:i}}))},[]);return{colorblindMode:e,setColorblindMode:n,isActive:e!=="normal"}}import{useState as Wi,useEffect as nt,useCallback as Fi}from"react";var it={normal:null,high:"accessibility-saturation-high",low:"accessibility-saturation-low",mono:"accessibility-saturation-mono"},_i=Object.values(it).filter(Boolean);function ie(e){let t=document.documentElement;_i.forEach(i=>t.classList.remove(i));let n=it[e];n&&t.classList.add(n)}function ot(){let[e,t]=Wi(()=>u().saturationMode??"normal");nt(()=>{ie(e)},[]),nt(()=>{let i=o=>{let{settings:s}=o.detail,a=s.saturationMode??"normal";a!==e&&(t(a),ie(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Fi(i=>{t(i),ie(i),f("saturationMode",i),window.dispatchEvent(new CustomEvent("accessibilitySaturationChanged",{detail:{mode:i}}))},[]);return{saturationMode:e,setSaturationMode:n,isActive:e!=="normal"}}import{useState as zi,useEffect as rt,useCallback as Di}from"react";var st="accessibility-dyslexia";function ne(e){let t=document.documentElement;e?t.classList.add(st):t.classList.remove(st)}function at(){let[e,t]=zi(()=>u().dyslexiaFont??!1);rt(()=>{ne(e)},[]),rt(()=>{let i=o=>{let{settings:s}=o.detail,a=s.dyslexiaFont??!1;a!==e&&(t(a),ne(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Di(()=>{let i=!e;t(i),ne(i),f("dyslexiaFont",i),window.dispatchEvent(new CustomEvent("accessibilityDyslexiaChanged",{detail:{isActive:i}}))},[e]);return{isActive:e,toggle:n}}import{useState as Bi,useEffect as ut,useCallback as Le}from"react";var ct="accessibility-letter-spacing",lt="accessibility-line-height",dt="accessibility-font-weight";function G(e){let t=document.documentElement;t.style.setProperty("--accessibility-letter-spacing",String(e)),e>0?t.classList.add(ct):t.classList.remove(ct)}function $(e){let t=document.documentElement;t.style.setProperty("--accessibility-line-height",String(e)),e>0?t.classList.add(lt):t.classList.remove(lt)}function oe(e){let t=document.documentElement;e?t.classList.add(dt):t.classList.remove(dt)}var gt=3;function ft(){let[e,t]=Bi(()=>u().letterSpacing??0);ut(()=>{G(e)},[]),ut(()=>{let s=a=>{let{settings:l}=a.detail,c=l.letterSpacing??0;c!==e&&(t(c),G(c))};return window.addEventListener("accessibilitySettingsChanged",s),()=>window.removeEventListener("accessibilitySettingsChanged",s)},[e]);let n=Le(()=>{let s=Math.min(e+1,gt);t(s),G(s),f("letterSpacing",s)},[e]),i=Le(()=>{let s=Math.max(e-1,0);t(s),G(s),f("letterSpacing",s)},[e]),o=Le(()=>{t(0),G(0),f("letterSpacing",0)},[]);return{level:e,increase:n,decrease:i,reset:o,isActive:e>0,canIncrease:e<gt,canDecrease:e>0}}import{useState as Vi,useEffect as pt,useCallback as Ee}from"react";var mt=3;function ht(){let[e,t]=Vi(()=>u().lineHeight??0);pt(()=>{$(e)},[]),pt(()=>{let s=a=>{let{settings:l}=a.detail,c=l.lineHeight??0;c!==e&&(t(c),$(c))};return window.addEventListener("accessibilitySettingsChanged",s),()=>window.removeEventListener("accessibilitySettingsChanged",s)},[e]);let n=Ee(()=>{let s=Math.min(e+1,mt);t(s),$(s),f("lineHeight",s)},[e]),i=Ee(()=>{let s=Math.max(e-1,0);t(s),$(s),f("lineHeight",s)},[e]),o=Ee(()=>{t(0),$(0),f("lineHeight",0)},[]);return{level:e,increase:n,decrease:i,reset:o,isActive:e>0,canIncrease:e<mt,canDecrease:e>0}}import{useState as Gi,useEffect as bt,useCallback as $i}from"react";function vt(){let[e,t]=Gi(()=>u().fontWeight??!1);bt(()=>{oe(e)},[]),bt(()=>{let i=o=>{let{settings:s}=o.detail,a=s.fontWeight??!1;a!==e&&(t(a),oe(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=$i(()=>{let i=!e;t(i),oe(i),f("fontWeight",i)},[e]);return{isBold:e,toggle:n,isActive:e}}import{useState as Zi,useEffect as yt,useCallback as Ae}from"react";function se(e){let t=document.documentElement;e==="none"?t.removeAttribute("data-highlight"):t.setAttribute("data-highlight",e)}function St(){let[e,t]=Zi(()=>u().highlightMode??"none");yt(()=>{se(e)},[]),yt(()=>{let s=a=>{let{settings:l}=a.detail,c=l.highlightMode??"none";c!==e&&(t(c),se(c))};return window.addEventListener("accessibilitySettingsChanged",s),()=>window.removeEventListener("accessibilitySettingsChanged",s)},[e]);let n=Ae(s=>{t(s),se(s),f("highlightMode",s)},[]),i=Ae(()=>{n(e==="titles"?"none":e==="links"?"both":e==="both"?"links":"titles")},[e,n]),o=Ae(()=>{n(e==="links"?"none":e==="titles"?"both":e==="both"?"titles":"links")},[e,n]);return{highlightMode:e,setHighlightMode:n,toggleTitles:i,toggleLinks:o,isTitlesActive:e==="titles"||e==="both",isLinksActive:e==="links"||e==="both",isActive:e!=="none"}}import{useState as Xi,useEffect as At,useCallback as Yi}from"react";var Ct="accessibility-stop-animations",xt="accessibility-big-cursor";function re(e){e?ji():Ui()}function ae(e){let t=document.documentElement;e?t.classList.add(Ct):t.classList.remove(Ct)}function ce(e){let t=document.documentElement;e?t.classList.add(xt):t.classList.remove(xt)}var wt=`
|
|
2
2
|
position: fixed;
|
|
3
3
|
left: 0;
|
|
4
4
|
right: 0;
|
|
5
5
|
background: rgba(0, 0, 0, 0.65);
|
|
6
6
|
pointer-events: none;
|
|
7
7
|
z-index: 9998;
|
|
8
|
-
`,w=null,I=null;function Mi(){w||(w=document.createElement("div"),w.id="ape-reading-guide-top",w.style.cssText=rt+"top: 0;",I=document.createElement("div"),I.id="ape-reading-guide-bottom",I.style.cssText=rt+"bottom: 0;",document.body.appendChild(w),document.body.appendChild(I),ct(window.innerHeight/2),document.addEventListener("mousemove",at))}function ki(){document.removeEventListener("mousemove",at),w?.remove(),I?.remove(),w=null,I=null}function at(e){ct(e.clientY)}function ct(e){let n=Math.max(0,e-40),i=e+40;w&&(w.style.height=`${n}px`),I&&(I.style.top=`${i}px`)}function dt(){let[e,t]=Ii(()=>d().stopAnimations??!1);lt(()=>{ee(e)},[]),lt(()=>{let i=s=>{let{settings:r}=s.detail,a=r.stopAnimations??!1;a!==e&&(t(a),ee(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Ni(()=>{let i=!e;t(i),ee(i),g("stopAnimations",i)},[e]);return{isActive:e,toggle:n}}import{useState as Ti,useEffect as ut,useCallback as Ri}from"react";function gt(){let[e,t]=Ti(()=>d().bigCursor??!1);ut(()=>{te(e)},[]),ut(()=>{let i=s=>{let{settings:r}=s.detail,a=r.bigCursor??!1;a!==e&&(t(a),te(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Ri(()=>{let i=!e;t(i),te(i),g("bigCursor",i)},[e]);return{isActive:e,toggle:n}}import{useState as Pi,useEffect as pt,useCallback as _i}from"react";function ft(){let[e,t]=Pi(()=>d().readingGuide??!1);pt(()=>{Q(e)},[]),pt(()=>{let i=s=>{let{settings:r}=s.detail,a=r.readingGuide??!1;a!==e&&(t(a),Q(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=_i(()=>{let i=!e;t(i),Q(i),g("readingGuide",i)},[e]);return{isActive:e,toggle:n}}import{useState as Hi,useEffect as ht,useCallback as Wi}from"react";var mt="accessibility-hide-images";function ie(e){let t=document.documentElement;e?t.classList.add(mt):t.classList.remove(mt)}function bt(){let[e,t]=Hi(()=>d().hideImages??!1);ht(()=>{ie(e)},[]),ht(()=>{let i=s=>{let{settings:r}=s.detail,a=r.hideImages??!1;a!==e&&(t(a),ie(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Wi(()=>{let i=!e;t(i),ie(i),g("hideImages",i)},[e]);return{isActive:e,toggle:n}}import{useState as Oi,useEffect as yt,useCallback as vt}from"react";function B(e){let t=document.documentElement;e==="default"?t.removeAttribute("data-text-align"):t.setAttribute("data-text-align",e)}var be=["default","left","center","right"];function St(){let[e,t]=Oi(()=>d().textAlign??"default");yt(()=>{B(e)},[]),yt(()=>{let s=r=>{let{settings:a}=r.detail,c=a.textAlign??"default";c!==e&&(t(c),B(c))};return window.addEventListener("accessibilitySettingsChanged",s),()=>window.removeEventListener("accessibilitySettingsChanged",s)},[e]);let n=vt(()=>{let s=be.indexOf(e),r=be[(s+1)%be.length]??"default";t(r),B(r),g("textAlign",r)},[e]),i=vt(s=>{t(s),B(s),g("textAlign",s)},[]);return{mode:e,cycle:n,setMode:i,isActive:e!=="default",label:e==="default"?"Por defecto":e==="left"?"Izquierda":e==="center"?"Centrado":"Derecha"}}import{useState as At,useEffect as Lt,useCallback as zi}from"react";var F=null;function ne(){return typeof window<"u"&&"speechSynthesis"in window}function Ct(e="es"){if(!ne())return;V();let n=(document.querySelector("main")??document.body).innerText;n.trim()&&(F=new SpeechSynthesisUtterance(n),F.lang=e==="es"?"es-ES":"en-US",F.rate=1,window.speechSynthesis.speak(F))}function V(){ne()&&(window.speechSynthesis.cancel(),F=null)}function xt(){return F}function wt(){let[e,t]=At(!1),[n]=At(()=>ne());Lt(()=>()=>{V()},[]),Lt(()=>{let s=()=>{V(),t(!1)};return window.addEventListener("accessibilityReset",s),()=>window.removeEventListener("accessibilityReset",s)},[]);let i=zi(()=>{if(e)V(),t(!1);else{let s=d().language??"es";Ct(s),t(!0);let r=xt();r&&(r.onend=()=>t(!1),r.onerror=()=>t(!1))}},[e]);return{isReading:e,isSupported:n,toggle:i}}import{useState as Fi,useEffect as kt,useCallback as Di}from"react";var Et={visionImpaired:{contrast:"high",fontSize:120,highlightMode:"both",bigCursor:!0},cognitive:{dyslexiaFont:!0,lineHeight:2,letterSpacing:1,stopAnimations:!0},motorImpaired:{bigCursor:!0,stopAnimations:!0,fontSize:110},seniorFriendly:{fontSize:120,lineHeight:2,contrast:"high",bigCursor:!0}},ye={visionImpaired:"Visi\xF3n reducida",cognitive:"Cognitivo",motorImpaired:"Motor",seniorFriendly:"Adulto mayor"};function ve(e){for(let[t,n]of Object.entries(Et))if(Object.entries(n).every(([s,r])=>e[s]===r))return t;return"none"}function Mt(e){return e==="none"?{...C}:Et[e]}function It(){let[e,t]=Fi(()=>ve(d()));kt(()=>{let i=s=>{let{settings:r}=s.detail;t(ve(r))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[]),kt(()=>{let i=()=>t("none");return window.addEventListener("accessibilityReset",i),()=>window.removeEventListener("accessibilityReset",i)},[]);let n=Di(i=>{if(i===e){W(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}));return}let s=Mt(i);pe(s)},[e]);return{activeProfile:e,applyProfile:n}}import{useState as Rt,useCallback as oe}from"react";var Bi=["H1","H2","H3","H4","H5","H6"],Vi=["main","nav","aside","footer","header",'[role="banner"]','[role="navigation"]','[role="main"]','[role="complementary"]','[role="contentinfo"]'];function Nt(){let e=[],t=new Set;return document.querySelectorAll(Vi.join(",")).forEach(s=>{if(t.has(s))return;t.add(s);let r=s.getAttribute("role")||s.tagName.toLowerCase(),a=s.getAttribute("aria-label")||r;e.push({tag:r,text:a,level:0,element:s})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(s=>{let r=s.tagName;if(!Bi.includes(r))return;let a=parseInt(r.charAt(1),10),c=(s.textContent??"").trim().slice(0,80);c&&e.push({tag:r.toLowerCase(),text:c,level:a,element:s})}),e}function Tt(e){e.scrollIntoView({behavior:"smooth",block:"center"}),e.focus({preventScroll:!0})}function Pt(){let[e,t]=Rt(!1),[n,i]=Rt([]),s=oe(()=>{i(Nt()),t(!0)},[]),r=oe(()=>{t(!1)},[]),a=oe(()=>{e?r():s()},[e,s,r]),c=oe(l=>{Tt(l.element)},[]);return{isOpen:e,structure:n,toggle:a,open:s,close:r,navigateTo:c}}function se(){let e=Ne(),t=He(),n=We(),i=ze(),s=Be(),r=$e(),a=Ye(),c=Qe(),l=tt(),h=nt(),p=dt(),x=gt(),A=ft(),v=bt(),M=St(),_=wt(),k=It(),f=Pt(),T=d(),S=ke(T);return{contrast:e,textSize:t,language:n,colorblind:i,saturation:s,dyslexia:r,letterSpacing:a,lineHeight:c,fontWeight:l,highlight:h,animations:p,cursor:x,readingGuide:A,hideImages:v,textAlign:M,tts:_,profiles:k,pageStructure:f,hasActiveFeatures:S,resetAllFeatures:()=>{W(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}))},currentSettings:T}}import{useState as ji}from"react";import{jsx as Gi,jsxs as $i}from"react/jsx-runtime";function re({title:e,children:t}){return $i("section",{className:"px-4 py-3",children:[Gi("h3",{className:"text-xs font-semibold text-blue-700 uppercase tracking-wider mb-3",children:e}),t]})}import{jsx as _t,jsxs as Zi}from"react/jsx-runtime";function b({icon:e,label:t,isActive:n,onClick:i,disabled:s=!1,className:r}){return Zi("button",{type:"button",onClick:s?void 0:i,disabled:s,"aria-pressed":n,"aria-label":t,className:L("flex flex-col items-center justify-center gap-1.5 rounded-3xl p-3 shadow-lg text-center cursor-pointer transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus:bg-blue-50",n?"ring-2 ring-green-500 bg-green-50 text-blue-900":"border-gray-200 bg-white text-gray-700 hover:ring-2 hover:ring-blue-300 hover:bg-blue-50",s&&"cursor-not-allowed opacity-40",r),children:[_t("span",{className:L("h-6 w-6",n?"text-blue-700":"text-gray-500"),children:e}),_t("span",{className:"text-base font-medium leading-tight",children:t})]})}import{jsx as Ht,jsxs as Wt}from"react/jsx-runtime";function Ot({percentage:e,onIncrease:t,onDecrease:n,onReset:i,canIncrease:s,canDecrease:r}){return Wt("div",{className:"flex items-center gap-2",children:[Ht("button",{type:"button",onClick:n,disabled:!r,"aria-label":"Reducir tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"\u2212"}),Wt("button",{type:"button",onClick:i,"aria-label":"Restablecer tama\xF1o de texto",className:"flex-1 rounded-lg border border-gray-200 bg-white py-2 text-center text-sm font-semibold text-blue-900 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:[e,"%"]}),Ht("button",{type:"button",onClick:t,disabled:!s,"aria-label":"Aumentar tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"+"})]})}import{Fragment as pn,jsx as o,jsxs as u}from"react/jsx-runtime";function Ft({onClose:e}){let[t,n]=ji(!1),{contrast:i,textSize:s,saturation:r,dyslexia:a,letterSpacing:c,lineHeight:l,fontWeight:h,highlight:p,animations:x,cursor:A,readingGuide:v,colorblind:M,hideImages:_,textAlign:k,tts:f,profiles:T,pageStructure:S,resetAllFeatures:H}=se();return u("div",{role:"dialog","aria-modal":"true","aria-label":"Men\xFA de Accesibilidad",className:"flex flex-col h-full overflow-hidden",style:{backgroundColor:"var(--apea-color-panel-bg, #f9fafb)"},children:[u("div",{className:"flex items-center justify-between apea-gradient px-4 py-3 shrink-0",children:[o("h2",{className:"text-sm font-bold text-white tracking-wide",children:"Men\xFA de Accesibilidad"}),o("div",{className:"flex items-center gap-2",children:o("button",{type:"button",onClick:e,"aria-label":"Cerrar men\xFA de accesibilidad",className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/30 text-white cursor-pointer transition hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",children:o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,className:"h-4 w-4","data-a11y-icon":!0,children:o("path",{d:"M18 6 6 18M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),u("div",{className:"flex-1 overflow-y-auto",children:[u("section",{className:"px-4 py-3",children:[u("button",{type:"button",onClick:()=>n(m=>!m),"aria-expanded":t,className:"flex w-full items-center justify-between text-xs font-semibold text-blue-700 uppercase tracking-wider cursor-pointer",children:["Perfiles de accesibilidad",o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:`h-4 w-4 transition-transform duration-300 ease-in-out ${t?"rotate-180":""}`,"data-a11y-icon":!0,children:o("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),o("div",{className:`grid transition-[grid-template-rows] duration-300 ease-in-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:o("div",{className:"overflow-hidden pb-5 px-2 -mx-2",children:o("div",{className:`grid grid-cols-2 gap-2 pt-3 transition-opacity duration-300 ease-in-out ${t?"opacity-100":"opacity-0"}`,children:Object.keys(ye).map(m=>o(b,{icon:o(gn,{profile:m}),label:ye[m],isActive:T.activeProfile===m,onClick:()=>T.applyProfile(m)},m))})})})]}),u(re,{title:"Ajustes de contenido",children:[u("div",{className:"mb-3 rounded-xl border border-gray-200 bg-white p-3",children:[u("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-gray-700",children:[o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-4 w-4 shrink-0","data-a11y-icon":!0,children:o("path",{d:"M4 7V4h16v3M9 20h6M12 4v16",strokeLinecap:"round",strokeLinejoin:"round"})}),"Tama\xF1o de fuente"]}),o(Ot,{percentage:s.textSizePercentage,onIncrease:s.increaseTextSize,onDecrease:s.decreaseTextSize,onReset:s.resetTextSize,canIncrease:s.canIncrease,canDecrease:s.canDecrease})]}),u("div",{className:"grid grid-cols-3 gap-2",children:[o(b,{icon:o(Ui,{}),label:"Resaltar t\xEDtulos",isActive:p.isTitlesActive,onClick:p.toggleTitles}),o(b,{icon:o(Xi,{}),label:"Resaltar enlaces",isActive:p.isLinksActive,onClick:p.toggleLinks}),o(b,{icon:o(Ki,{}),label:"Fuente dislexia",isActive:a.isActive,onClick:a.toggle}),o(zt,{icon:o(Yi,{}),label:"Esp. de letras",level:c.level,onIncrease:c.increase,onDecrease:c.decrease,canIncrease:c.canIncrease,canDecrease:c.canDecrease}),o(zt,{icon:o(qi,{}),label:"Interlineado",level:l.level,onIncrease:l.increase,onDecrease:l.decrease,canIncrease:l.canIncrease,canDecrease:l.canDecrease}),o(b,{icon:o(Ji,{}),label:"Fuente negrita",isActive:h.isBold,onClick:h.toggle}),o(b,{icon:o(an,{}),label:"Ocultar im\xE1genes",isActive:_.isActive,onClick:_.toggle}),o(b,{icon:o(cn,{mode:k.mode}),label:`Alinear: ${k.label}`,isActive:k.isActive,onClick:k.cycle})]})]}),u(re,{title:"Ajustes de color",children:[u("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[o(b,{icon:o(Qi,{}),label:"Alto contraste",isActive:i.isHighContrast,onClick:()=>i.setContrastMode(i.isHighContrast?"normal":"high")}),o(b,{icon:o(en,{}),label:"Alta saturaci\xF3n",isActive:r.saturationMode==="high",onClick:()=>r.setSaturationMode(r.saturationMode==="high"?"normal":"high")}),o(b,{icon:o(tn,{}),label:"Baja saturaci\xF3n",isActive:r.saturationMode==="low",onClick:()=>r.setSaturationMode(r.saturationMode==="low"?"normal":"low")}),o(b,{icon:o(nn,{}),label:"Monocromo",isActive:r.saturationMode==="mono",onClick:()=>r.setSaturationMode(r.saturationMode==="mono"?"normal":"mono")})]}),o("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide hidden",children:"Daltonismo"}),o("div",{className:"grid grid-cols-2 gap-2 hidden",children:[["protanopia","Protanop\xEDa"],["deuteranopia","Deuteranop\xEDa"],["tritanopia","Tritanop\xEDa"],["achromatopsia","Acromatopsia"]].map(([m,ce])=>o(b,{icon:o(un,{mode:m}),label:ce,isActive:M.colorblindMode===m,onClick:()=>M.setColorblindMode(M.colorblindMode===m?"normal":m)},m))})]}),u(re,{title:"Herramientas",children:[u("div",{className:"grid grid-cols-3 gap-2",children:[o(b,{icon:o(on,{}),label:"Gu\xEDa de lectura",isActive:v.isActive,onClick:v.toggle}),o(b,{icon:o(sn,{}),label:"Pausar animaciones",isActive:x.isActive,onClick:x.toggle}),o(b,{icon:o(rn,{}),label:"Cursor grande",isActive:A.isActive,onClick:A.toggle}),o(b,{icon:o(ln,{}),label:f.isReading?"Detener lectura":"Leer p\xE1gina",isActive:f.isReading,onClick:f.toggle,disabled:!f.isSupported}),o(b,{icon:o(dn,{}),label:"Estructura",isActive:S.isOpen,onClick:S.toggle})]}),S.isOpen&&S.structure.length>0&&u("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3 max-h-60 overflow-y-auto",children:[o("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Estructura de la p\xE1gina"}),o("ul",{className:"space-y-1",children:S.structure.map((m,ce)=>o("li",{children:u("button",{type:"button",onClick:()=>S.navigateTo(m),className:"w-full text-left px-2 py-1.5 rounded-lg text-sm hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 transition-colors",style:{paddingLeft:`${(m.level||1)*12}px`},children:[o("span",{className:"inline-block mr-2 text-xs font-mono text-blue-600 bg-blue-100 px-1.5 py-0.5 rounded",children:m.tag}),o("span",{className:"text-gray-700",children:m.text})]})},`${m.tag}-${ce}`))})]}),S.isOpen&&S.structure.length===0&&o("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3",children:o("p",{className:"text-sm text-gray-500 text-center",children:"No se encontraron encabezados"})})]})]}),o("section",{className:"px-4 pb-6 pt-2",children:o("button",{type:"button",onClick:H,className:"w-full rounded-xl apea-gradient py-3 text-sm font-semibold text-white cursor-pointer transition hover:bg-none hover:bg-green-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",children:"Restablecer configuraci\xF3n"})})]})}function zt({icon:e,label:t,level:n,onIncrease:i,onDecrease:s,canIncrease:r,canDecrease:a}){let c=n>0;return u("div",{className:`flex flex-col items-center justify-between gap-1 rounded-3xl border p-2 shadow-md/20 text-center transition-all ${c?"border-yellow-500 bg-yellow-50 text-blue-900":"border-gray-200 bg-white text-gray-700"}`,children:[o("span",{className:"h-5 w-5 text-gray-500",children:e}),o("span",{className:"text-sm font-medium leading-tight",children:t}),u("div",{className:"flex items-center gap-1 w-full justify-center",children:[o("button",{type:"button",onClick:s,disabled:!a,"aria-label":`Reducir ${t}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"\u2212"}),o("span",{className:"w-4 text-center text-sm font-semibold tabular-nums",children:n}),o("button",{type:"button",onClick:i,disabled:!r,"aria-label":`Aumentar ${t}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"+"})]})]})}function Ui(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M4 6h16M4 12h8M4 18h12",strokeLinecap:"round"}),o("path",{d:"M15 14l5 5M20 14l-5 5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Xi(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",strokeLinecap:"round",strokeLinejoin:"round"})]})}function Ki(){return o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:o("path",{d:"M4 7l4 10 4-10M20 7v10M17 7h6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Yi(){return o("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:o("path",{d:"m20.003 16.975-2.027 2.028m.113-3.943 1.914 1.915m-16.006 0 2.027-2.029m-.113 3.944-1.914-1.915m0 0h16.006m-2-5.975L15.16 4.997 12.317 11m.568-1.2h4.547M4.997 4.997 7.84 11l2.843-6.003",stroke:"#000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function qi(){return u("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:[o("path",{d:"M12.754 4a.75.75 0 0 1 .75-.75H20.5a.75.75 0 0 1 0 1.5h-6.996a.75.75 0 0 1-.75-.75m7.746 9.917h-6.996a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5m-6.996 5.333a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5zm6.996-9.167h-6.996a.75.75 0 0 1 0-1.5H20.5a.75.75 0 0 1 0 1.5",opacity:.4,fill:"#323544"}),o("path",{d:"m9.974 16.47-1.722 1.72V5.81l1.722 1.72a.75.75 0 0 0 1.06-1.06l-3.002-3a.75.75 0 0 0-1.06 0l-3.002 3a.75.75 0 0 0 1.06 1.06l1.722-1.72v12.38L5.03 16.47a.75.75 0 0 0-1.06 1.06l3.002 3a.75.75 0 0 0 1.06 0l3.002-3a.75.75 0 0 0-1.06-1.06",fill:"#323544"})]})}function Ji(){return u("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),o("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}function Qi(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"12",r:"9"}),o("path",{d:"M12 3v18"}),o("path",{d:"M12 3a9 9 0 0 1 0 18V3z",fill:"currentColor",stroke:"none"})]})}function en(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"12",r:"8"}),o("path",{d:"M12 4v16M8 8l8 8M4 12h16",strokeLinecap:"round",strokeOpacity:.4}),o("circle",{cx:"12",cy:"12",r:"4",fill:"currentColor"})]})}function tn(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"12",r:"8"}),o("circle",{cx:"12",cy:"12",r:"3",strokeDasharray:"2 2"})]})}function nn(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),o("path",{d:"M3 12h18M12 5v14"}),o("path",{d:"M3 5h9v14H3z",fill:"currentColor",fillOpacity:.15,stroke:"none"})]})}function on(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M4 6h16M4 10h16M4 14h10",strokeLinecap:"round"}),o("path",{d:"M3 18h18",strokeWidth:3,strokeLinecap:"round"})]})}function sn(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"12",r:"9"}),o("rect",{x:"9",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"}),o("rect",{x:"13",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"})]})}function rn(){return o("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:o("path",{d:"M5 3l14 9-7.5 1.5L9 20l-4-17z"})})}function an(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),o("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:"currentColor",stroke:"none"}),o("path",{d:"M21 15l-5-5L5 21",strokeLinecap:"round",strokeLinejoin:"round"}),o("path",{d:"M2 2l20 20",strokeLinecap:"round",strokeWidth:2.5})]})}function cn({mode:e}){return e==="center"?o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:o("path",{d:"M6 6h12M8 10h8M6 14h12M8 18h8",strokeLinecap:"round"})}):e==="right"?o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:o("path",{d:"M4 6h16M8 10h12M4 14h16M8 18h12",strokeLinecap:"round"})}):o("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:o("path",{d:"M4 6h16M4 10h12M4 14h16M4 18h12",strokeLinecap:"round"})})}function ln(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M11 5L6 9H2v6h4l5 4V5z",fill:"currentColor",stroke:"none"}),o("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",strokeLinecap:"round"}),o("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",strokeLinecap:"round"})]})}function dn(){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M4 6h16M4 10h12M8 14h12M8 18h8",strokeLinecap:"round"}),o("circle",{cx:"4",cy:"14",r:"1",fill:"currentColor",stroke:"none"}),o("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor",stroke:"none"})]})}function un({mode:e}){return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"12",r:"9"}),o("path",{d:"M12 3c-3 4-3 10 0 18",strokeLinecap:"round"}),o("path",{d:"M12 3c3 4 3 10 0 18",strokeLinecap:"round"}),e==="achromatopsia"?o("path",{d:"M3 12h18"}):u(pn,{children:[o("path",{d:"M4 8h16",strokeOpacity:.4}),o("path",{d:"M4 16h16",strokeOpacity:.4})]})]})}function gn({profile:e}){switch(e){case"visionImpaired":return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),o("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor"})]});case"cognitive":return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("path",{d:"M12 2a7 7 0 0 1 7 7c0 3-2 5-3 7h-8c-1-2-3-4-3-7a7 7 0 0 1 7-7z"}),o("path",{d:"M9 16v2a3 3 0 0 0 6 0v-2"})]});case"motorImpaired":return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),o("path",{d:"M12 6v6l4 4M12 12l-4 4",strokeLinecap:"round",strokeLinejoin:"round"}),o("circle",{cx:"8",cy:"20",r:"2"}),o("circle",{cx:"16",cy:"20",r:"2"})]});case"seniorFriendly":return u("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[o("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),o("path",{d:"M12 6v8M12 14l-3 6M12 14l3 6M12 10h-2l-3 4M12 10h2",strokeLinecap:"round",strokeLinejoin:"round"})]});default:return null}}import{Fragment as hn,jsx as D,jsxs as bn}from"react/jsx-runtime";function Se({position:e="bottom-left",className:t}={}){let[n,i]=fn(!0),{hasActiveFeatures:s}=se();mn(()=>{if(!n)return;let c=l=>{l.key==="Escape"&&i(!1)};return document.addEventListener("keydown",c),()=>document.removeEventListener("keydown",c)},[n]);let r=n||s?"var(--apea-color-fab-active, #FFD54F)":"var(--apea-color-fab-inactive, #F6F6F6)";return bn(hn,{children:[D("div",{className:L("fixed z-50 apea-fab",e==="bottom-right"?"bottom-8 right-5":"bottom-8 left-5",t),style:{filter:s?"drop-shadow(0 4px 12px rgba(255, 213, 79, 0.3))":"none"},onClick:()=>i(c=>!c),children:D(le,{size:"lg","aria-expanded":n,"aria-haspopup":"dialog","aria-label":`Accesibilidad - ${s?"Funciones activas":"Sin funciones activas"}`,leftIcon:D(Le,{className:"w-full z-50",color:r,stroke:r})})}),D("div",{className:"fixed inset-0 z-40 apea-backdrop",style:{backgroundColor:"var(--apea-color-backdrop, rgba(0, 0, 0, 0.2))"},"data-visible":n?"true":"false",onClick:()=>i(!1),"aria-hidden":"true"}),D("div",{role:"none",className:"fixed inset-y-0 right-0 z-50 w-full max-w-sm shadow-2xl apea-panel","data-open":n?"true":"false",children:D(Ft,{onClose:()=>i(!1)})})]})}import{jsx as Bt}from"react/jsx-runtime";var vn={primary500:"#005dca",primary600:"#004faf",primary700:"#003b8a",panelBackground:"#f9fafb",fabActive:"#ffd54f",fabInactive:"#f6f6f6",backdrop:"rgba(0, 0, 0, 0.2)"};function Ce(e){return{...vn,...e}}function Sn(e,t){return{...e,...t,theme:{...e.theme??{},...t.theme??{}}}}function Dt(e,t){e.style.setProperty("--apea-color-primary-500",t.primary500),e.style.setProperty("--apea-color-primary-600",t.primary600),e.style.setProperty("--apea-color-primary-700",t.primary700),e.style.setProperty("--apea-color-panel-bg",t.panelBackground),e.style.setProperty("--apea-color-fab-active",t.fabActive),e.style.setProperty("--apea-color-fab-inactive",t.fabInactive),e.style.setProperty("--apea-color-backdrop",t.backdrop)}function Vt(e={}){let t={position:e.position||"bottom-left",zIndex:e.zIndex||9999,containerId:e.containerId||"ape-accessibility-root",theme:Ce(e.theme)},n=Ce(t.theme),i=t.containerId||"ape-accessibility-root";if(document.getElementById(i))return console.warn("[ape-accessibility] Widget already mounted. Call destroy() first."),{destroy:()=>{},updateConfig:()=>{},config:e};let s=document.createElement("style");s.id="ape-accessibility-tools-css",s.textContent=`/* ============================================= */
|
|
8
|
+
`,N=null,_=null;function ji(){N||(N=document.createElement("div"),N.id="ape-reading-guide-top",N.style.cssText=wt+"top: 0;",_=document.createElement("div"),_.id="ape-reading-guide-bottom",_.style.cssText=wt+"bottom: 0;",document.body.appendChild(N),document.body.appendChild(_),Et(window.innerHeight/2),document.addEventListener("mousemove",Lt))}function Ui(){document.removeEventListener("mousemove",Lt),N?.remove(),_?.remove(),N=null,_=null}function Lt(e){Et(e.clientY)}function Et(e){let n=Math.max(0,e-40),i=e+40;N&&(N.style.height=`${n}px`),_&&(_.style.top=`${i}px`)}function Mt(){let[e,t]=Xi(()=>u().stopAnimations??!1);At(()=>{ae(e)},[]),At(()=>{let i=o=>{let{settings:s}=o.detail,a=s.stopAnimations??!1;a!==e&&(t(a),ae(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Yi(()=>{let i=!e;t(i),ae(i),f("stopAnimations",i)},[e]);return{isActive:e,toggle:n}}import{useState as Ki,useEffect as kt,useCallback as qi}from"react";function It(){let[e,t]=Ki(()=>u().bigCursor??!1);kt(()=>{ce(e)},[]),kt(()=>{let i=o=>{let{settings:s}=o.detail,a=s.bigCursor??!1;a!==e&&(t(a),ce(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=qi(()=>{let i=!e;t(i),ce(i),f("bigCursor",i)},[e]);return{isActive:e,toggle:n}}import{useState as Ji,useEffect as Tt,useCallback as Qi}from"react";function Nt(){let[e,t]=Ji(()=>u().readingGuide??!1);Tt(()=>{re(e)},[]),Tt(()=>{let i=o=>{let{settings:s}=o.detail,a=s.readingGuide??!1;a!==e&&(t(a),re(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=Qi(()=>{let i=!e;t(i),re(i),f("readingGuide",i)},[e]);return{isActive:e,toggle:n}}import{useState as en,useEffect as Ht,useCallback as tn}from"react";var Rt="accessibility-hide-images";function le(e){let t=document.documentElement;e?t.classList.add(Rt):t.classList.remove(Rt)}function Pt(){let[e,t]=en(()=>u().hideImages??!1);Ht(()=>{le(e)},[]),Ht(()=>{let i=o=>{let{settings:s}=o.detail,a=s.hideImages??!1;a!==e&&(t(a),le(a))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[e]);let n=tn(()=>{let i=!e;t(i),le(i),f("hideImages",i)},[e]);return{isActive:e,toggle:n}}import{useState as nn,useEffect as Ot,useCallback as _t}from"react";function X(e){let t=document.documentElement;e==="default"?t.removeAttribute("data-text-align"):t.setAttribute("data-text-align",e)}var Me=["default","left","center","right"];function Wt(){let[e,t]=nn(()=>u().textAlign??"default");Ot(()=>{X(e)},[]),Ot(()=>{let o=s=>{let{settings:a}=s.detail,l=a.textAlign??"default";l!==e&&(t(l),X(l))};return window.addEventListener("accessibilitySettingsChanged",o),()=>window.removeEventListener("accessibilitySettingsChanged",o)},[e]);let n=_t(()=>{let o=Me.indexOf(e),s=Me[(o+1)%Me.length]??"default";t(s),X(s),f("textAlign",s)},[e]),i=_t(o=>{t(o),X(o),f("textAlign",o)},[]);return{mode:e,cycle:n,setMode:i,isActive:e!=="default",label:e==="default"?"Por defecto":e==="left"?"Izquierda":e==="center"?"Centrado":"Derecha"}}import{useState as Dt,useEffect as Bt,useCallback as on}from"react";var Z=null;function de(){return typeof window<"u"&&"speechSynthesis"in window}function Ft(e="es"){if(!de())return;Y();let n=(document.querySelector("main")??document.body).innerText;n.trim()&&(Z=new SpeechSynthesisUtterance(n),Z.lang=e==="es"?"es-ES":"en-US",Z.rate=1,window.speechSynthesis.speak(Z))}function Y(){de()&&(window.speechSynthesis.cancel(),Z=null)}function zt(){return Z}function Vt(){let[e,t]=Dt(!1),[n]=Dt(()=>de());Bt(()=>()=>{Y()},[]),Bt(()=>{let o=()=>{Y(),t(!1)};return window.addEventListener("accessibilityReset",o),()=>window.removeEventListener("accessibilityReset",o)},[]);let i=on(()=>{if(e)Y(),t(!1);else{let o=u().language??"es";Ft(o),t(!0);let s=zt();s&&(s.onend=()=>t(!1),s.onerror=()=>t(!1))}},[e]);return{isReading:e,isSupported:n,toggle:i}}import{useState as sn,useEffect as Zt,useCallback as rn}from"react";var Gt={visionImpaired:{contrast:"high",fontSize:120,highlightMode:"both",bigCursor:!0},cognitive:{dyslexiaFont:!0,lineHeight:2,letterSpacing:1,stopAnimations:!0},motorImpaired:{bigCursor:!0,stopAnimations:!0,fontSize:110},seniorFriendly:{fontSize:120,lineHeight:2,contrast:"high",bigCursor:!0}},ke={visionImpaired:"Visi\xF3n reducida",cognitive:"Cognitivo",motorImpaired:"Motor",seniorFriendly:"Adulto mayor"};function Ie(e){for(let[t,n]of Object.entries(Gt))if(Object.entries(n).every(([o,s])=>e[o]===s))return t;return"none"}function $t(e){return e==="none"?{...M}:Gt[e]}function jt(){let[e,t]=sn(()=>Ie(u()));Zt(()=>{let i=o=>{let{settings:s}=o.detail;t(Ie(s))};return window.addEventListener("accessibilitySettingsChanged",i),()=>window.removeEventListener("accessibilitySettingsChanged",i)},[]),Zt(()=>{let i=()=>t("none");return window.addEventListener("accessibilityReset",i),()=>window.removeEventListener("accessibilityReset",i)},[]);let n=rn(i=>{if(i===e){V(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}));return}let o=$t(i);we(o)},[e]);return{activeProfile:e,applyProfile:n}}import{useState as Yt,useCallback as ue}from"react";var an=["H1","H2","H3","H4","H5","H6"],cn=["main","nav","aside","footer","header",'[role="banner"]','[role="navigation"]','[role="main"]','[role="complementary"]','[role="contentinfo"]'];function Ut(){let e=[],t=new Set;return document.querySelectorAll(cn.join(",")).forEach(o=>{if(t.has(o))return;t.add(o);let s=o.getAttribute("role")||o.tagName.toLowerCase(),a=o.getAttribute("aria-label")||s;e.push({tag:s,text:a,level:0,element:o})}),document.querySelectorAll("h1, h2, h3, h4, h5, h6").forEach(o=>{let s=o.tagName;if(!an.includes(s))return;let a=parseInt(s.charAt(1),10),l=(o.textContent??"").trim().slice(0,80);l&&e.push({tag:s.toLowerCase(),text:l,level:a,element:o})}),e}function Xt(e){e.scrollIntoView({behavior:"smooth",block:"center"}),e.focus({preventScroll:!0})}function Kt(){let[e,t]=Yt(!1),[n,i]=Yt([]),o=ue(()=>{i(Ut()),t(!0)},[]),s=ue(()=>{t(!1)},[]),a=ue(()=>{e?s():o()},[e,o,s]),l=ue(c=>{Xt(c.element)},[]);return{isOpen:e,structure:n,toggle:a,open:o,close:s,navigateTo:l}}function ge(){let e=Ue(),t=Je(),n=Qe(),i=tt(),o=ot(),s=at(),a=ft(),l=ht(),c=vt(),p=St(),d=Mt(),h=It(),v=Nt(),x=Pt(),y=Wt(),H=Vt(),E=jt(),m=Kt(),T=u(),w=Ze(T);return{contrast:e,textSize:t,language:n,colorblind:i,saturation:o,dyslexia:s,letterSpacing:a,lineHeight:l,fontWeight:c,highlight:p,animations:d,cursor:h,readingGuide:v,hideImages:x,textAlign:y,tts:H,profiles:E,pageStructure:m,hasActiveFeatures:w,resetAllFeatures:()=>{V(),window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}))},currentSettings:T}}import{useCallback as ln,useEffect as dn,useRef as fe,useState as Te}from"react";var Ne="apea-fab-position",I=60,L=16,un=6;function j(e,t,n){return Math.max(t,Math.min(n,e))}function gn(){try{let e=localStorage.getItem(Ne);if(!e)return null;let t=JSON.parse(e);if(t.vEdge!=="top"&&t.vEdge!=="bottom"||t.hEdge!=="left"&&t.hEdge!=="right"||typeof t.vOffset!="number"||typeof t.hOffset!="number"||isNaN(t.vOffset)||isNaN(t.hOffset))return localStorage.removeItem(Ne),null;let n=typeof window<"u"?window.innerWidth:1e3,i=typeof window<"u"?window.innerHeight:1e3,o=j(t.hOffset,L,Math.max(L,n/2-I/2)),s=j(t.vOffset,L,Math.max(L,i/2-I/2));return o>L&&s>L&&(o<s?o=L:s=L),{vEdge:t.vEdge,hEdge:t.hEdge,hOffset:o,vOffset:s}}catch{return null}}function fn(e){try{localStorage.setItem(Ne,JSON.stringify(e))}catch{}}function pn(e){return gn()??{vEdge:"bottom",hEdge:e==="bottom-right"?"right":"left",vOffset:32,hOffset:20}}function pe(e,t,n){return{x:e.hEdge==="left"?e.hOffset:t-e.hOffset-I,y:e.vEdge==="top"?e.vOffset:n-e.vOffset-I}}function mn(e,t,n,i){let o=e,s=n-e-I,a=t,l=i-t-I,c=Math.min(o,s,a,l),p="left",d="top",h=L,v=L;return c===o||c===s?(p=c===o?"left":"right",h=L,d=a<=l?"top":"bottom",v=j(d==="top"?t:l,L,i/2-I/2)):(d=c===a?"top":"bottom",v=L,p=o<=s?"left":"right",h=j(p==="left"?e:s,L,n/2-I/2)),{hEdge:p,vEdge:d,hOffset:h,vOffset:v}}function hn(e,t,n,i){let o=pe(e,n,i);return{position:"fixed",top:`${o.y}px`,left:`${o.x}px`,cursor:t?"grabbing":"grab",userSelect:"none",touchAction:"none",transition:t?"none":"top 0.25s ease, left 0.25s ease"}}function qt({defaultPosition:e="bottom-left",onTap:t,disabled:n=!1}={}){let[i,o]=Te(()=>pn(e)),[s,a]=Te(!1),[l,c]=Te(()=>({w:typeof window<"u"?window.innerWidth:1e3,h:typeof window<"u"?window.innerHeight:1e3})),p=fe(null),d=fe(t);d.current=t;let h=fe(i);h.current=i;let v=fe(n);v.current=n,dn(()=>{let y=()=>{c({w:window.innerWidth,h:window.innerHeight})};return window.addEventListener("resize",y),()=>window.removeEventListener("resize",y)},[]);let x=ln((y,H)=>{if(v.current)return;let E=pe(h.current,window.innerWidth,window.innerHeight),m=y-E.x,T=H-E.y,w=E.x,k=E.y,b=0;function D(S,P){let B=j(S-m,0,window.innerWidth-I),be=j(P-T,0,window.innerHeight-I);b+=Math.abs(B-w)+Math.abs(be-k),w=B,k=be;let ve=p.current;ve&&(ve.style.top=`${be}px`,ve.style.left=`${B}px`)}function Oe(){mi();let S=p.current;if(b<un){if(S){let P=pe(h.current,window.innerWidth,window.innerHeight);S.style.transition="top 0.25s ease, left 0.25s ease",S.offsetHeight,S.style.top=`${P.y}px`,S.style.left=`${P.x}px`}a(!1),d.current?.()}else{let P=mn(w,k,window.innerWidth,window.innerHeight);if(fn(P),S){S.style.transition="top 0.25s ease, left 0.25s ease",S.offsetHeight;let B=pe(P,window.innerWidth,window.innerHeight);S.style.top=`${B.y}px`,S.style.left=`${B.x}px`}a(!1),o(P)}}function _e(S){D(S.clientX,S.clientY)}function We(S){S.preventDefault(),D(S.touches[0].clientX,S.touches[0].clientY)}function Fe(){Oe()}function ze(){Oe()}function mi(){window.removeEventListener("mousemove",_e),window.removeEventListener("mouseup",Fe),window.removeEventListener("touchmove",We),window.removeEventListener("touchend",ze)}window.addEventListener("mousemove",_e),window.addEventListener("mouseup",Fe),window.addEventListener("touchmove",We,{passive:!1}),window.addEventListener("touchend",ze),a(!0)},[]);return{fabStyle:hn(i,s,l.w,l.h),isDragging:s,fabRef:p,dragHandlers:{onMouseDown:y=>{y.button!==0||v.current||(y.preventDefault(),x(y.clientX,y.clientY))},onTouchStart:y=>{v.current||x(y.touches[0].clientX,y.touches[0].clientY)}}}}import{useState as Sn}from"react";import{jsx as bn,jsxs as vn}from"react/jsx-runtime";function me({title:e,children:t}){return vn("section",{className:"px-4 py-3",children:[bn("h3",{className:"text-xs font-semibold text-blue-700 uppercase tracking-wider mb-3",children:e}),t]})}import{jsx as Jt,jsxs as yn}from"react/jsx-runtime";function C({icon:e,label:t,isActive:n,onClick:i,disabled:o=!1,className:s}){return yn("button",{type:"button",onClick:o?void 0:i,disabled:o,"aria-pressed":n,"aria-label":t,className:O("flex flex-col items-center justify-center gap-1.5 rounded-3xl p-3 shadow-lg text-center cursor-pointer transition-all","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-1 focus:bg-blue-50",n?"ring-2 ring-green-500 bg-green-50 text-blue-900":"border-gray-200 bg-white text-gray-700 hover:ring-2 hover:ring-blue-300 hover:bg-blue-50",o&&"cursor-not-allowed opacity-40",s),children:[Jt("span",{className:O("h-6 w-6",n?"text-blue-700":"text-gray-500"),children:e}),Jt("span",{className:"text-base font-medium leading-tight",children:t})]})}import{jsx as Qt,jsxs as ei}from"react/jsx-runtime";function ti({percentage:e,onIncrease:t,onDecrease:n,onReset:i,canIncrease:o,canDecrease:s}){return ei("div",{className:"flex items-center gap-2",children:[Qt("button",{type:"button",onClick:n,disabled:!s,"aria-label":"Reducir tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"\u2212"}),ei("button",{type:"button",onClick:i,"aria-label":"Restablecer tama\xF1o de texto",className:"flex-1 rounded-lg border border-gray-200 bg-white py-2 text-center text-sm font-semibold text-blue-900 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:[e,"%"]}),Qt("button",{type:"button",onClick:t,disabled:!o,"aria-label":"Aumentar tama\xF1o de texto",className:"flex h-9 w-9 items-center justify-center rounded-lg border border-gray-200 bg-white text-lg font-bold text-blue-700 cursor-pointer transition hover:border-blue-400 hover:bg-blue-50 disabled:cursor-not-allowed disabled:opacity-40 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500",children:"+"})]})}import{Fragment as Dn,jsx as r,jsxs as g}from"react/jsx-runtime";function ni({onClose:e}){let[t,n]=Sn(!1),{contrast:i,textSize:o,saturation:s,dyslexia:a,letterSpacing:l,lineHeight:c,fontWeight:p,highlight:d,animations:h,cursor:v,readingGuide:x,colorblind:y,hideImages:H,textAlign:E,tts:m,profiles:T,pageStructure:w,resetAllFeatures:k}=ge();return g("div",{role:"dialog","aria-modal":"true","aria-label":"Men\xFA de Accesibilidad",className:"flex flex-col h-full overflow-hidden",style:{backgroundColor:"var(--apea-color-panel-bg, #f9fafb)"},children:[g("div",{className:"flex items-center justify-between apea-gradient px-4 py-3 shrink-0",children:[r("h2",{className:"text-sm font-bold text-white tracking-wide",children:"Men\xFA de Accesibilidad"}),r("div",{className:"flex items-center gap-2",children:r("button",{type:"button",onClick:e,"aria-label":"Cerrar men\xFA de accesibilidad",className:"flex h-8 w-8 items-center justify-center rounded-full border border-white/30 text-white cursor-pointer transition hover:bg-white/20 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-white",children:r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2.2,className:"h-4 w-4","data-a11y-icon":!0,children:r("path",{d:"M18 6 6 18M6 6l12 12",strokeLinecap:"round",strokeLinejoin:"round"})})})})]}),g("div",{className:"flex-1 overflow-y-auto",children:[g("section",{className:"px-4 py-3",children:[g("button",{type:"button",onClick:()=>n(b=>!b),"aria-expanded":t,className:"flex w-full items-center justify-between text-xs font-semibold text-blue-700 uppercase tracking-wider cursor-pointer",children:["Perfiles de accesibilidad",r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:`h-4 w-4 transition-transform duration-300 ease-in-out ${t?"rotate-180":""}`,"data-a11y-icon":!0,children:r("path",{d:"M6 9l6 6 6-6",strokeLinecap:"round",strokeLinejoin:"round"})})]}),r("div",{className:`grid transition-[grid-template-rows] duration-300 ease-in-out ${t?"grid-rows-[1fr]":"grid-rows-[0fr]"}`,children:r("div",{className:"overflow-hidden pb-5 px-2 -mx-2",children:r("div",{className:`grid grid-cols-2 gap-2 pt-3 transition-opacity duration-300 ease-in-out ${t?"opacity-100":"opacity-0"}`,children:Object.keys(ke).map(b=>r(C,{icon:r(zn,{profile:b}),label:ke[b],isActive:T.activeProfile===b,onClick:()=>T.applyProfile(b)},b))})})})]}),g(me,{title:"Ajustes de contenido",children:[g("div",{className:"mb-3 rounded-xl border border-gray-200 bg-white p-3",children:[g("div",{className:"mb-2 flex items-center gap-2 text-sm font-medium text-gray-700",children:[r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-4 w-4 shrink-0","data-a11y-icon":!0,children:r("path",{d:"M4 7V4h16v3M9 20h6M12 4v16",strokeLinecap:"round",strokeLinejoin:"round"})}),"Tama\xF1o de fuente"]}),r(ti,{percentage:o.textSizePercentage,onIncrease:o.increaseTextSize,onDecrease:o.decreaseTextSize,onReset:o.resetTextSize,canIncrease:o.canIncrease,canDecrease:o.canDecrease})]}),g("div",{className:"grid grid-cols-3 gap-2",children:[r(C,{icon:r(Cn,{}),label:"Resaltar t\xEDtulos",isActive:d.isTitlesActive,onClick:d.toggleTitles}),r(C,{icon:r(xn,{}),label:"Resaltar enlaces",isActive:d.isLinksActive,onClick:d.toggleLinks}),r(C,{icon:r(wn,{}),label:"Fuente dislexia",isActive:a.isActive,onClick:a.toggle}),r(ii,{icon:r(Ln,{}),label:"Esp. de letras",level:l.level,onIncrease:l.increase,onDecrease:l.decrease,canIncrease:l.canIncrease,canDecrease:l.canDecrease}),r(ii,{icon:r(En,{}),label:"Interlineado",level:c.level,onIncrease:c.increase,onDecrease:c.decrease,canIncrease:c.canIncrease,canDecrease:c.canDecrease}),r(C,{icon:r(An,{}),label:"Fuente negrita",isActive:p.isBold,onClick:p.toggle}),r(C,{icon:r(Pn,{}),label:"Ocultar im\xE1genes",isActive:H.isActive,onClick:H.toggle}),r(C,{icon:r(On,{mode:E.mode}),label:`Alinear: ${E.label}`,isActive:E.isActive,onClick:E.cycle})]})]}),g(me,{title:"Ajustes de color",children:[g("div",{className:"grid grid-cols-3 gap-2 mb-3",children:[r(C,{icon:r(Mn,{}),label:"Alto contraste",isActive:i.isHighContrast,onClick:()=>i.setContrastMode(i.isHighContrast?"normal":"high")}),r(C,{icon:r(kn,{}),label:"Alta saturaci\xF3n",isActive:s.saturationMode==="high",onClick:()=>s.setSaturationMode(s.saturationMode==="high"?"normal":"high")}),r(C,{icon:r(In,{}),label:"Baja saturaci\xF3n",isActive:s.saturationMode==="low",onClick:()=>s.setSaturationMode(s.saturationMode==="low"?"normal":"low")}),r(C,{icon:r(Tn,{}),label:"Monocromo",isActive:s.saturationMode==="mono",onClick:()=>s.setSaturationMode(s.saturationMode==="mono"?"normal":"mono")})]}),r("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide hidden",children:"Daltonismo"}),r("div",{className:"grid grid-cols-2 gap-2 hidden",children:[["protanopia","Protanop\xEDa"],["deuteranopia","Deuteranop\xEDa"],["tritanopia","Tritanop\xEDa"],["achromatopsia","Acromatopsia"]].map(([b,D])=>r(C,{icon:r(Fn,{mode:b}),label:D,isActive:y.colorblindMode===b,onClick:()=>y.setColorblindMode(y.colorblindMode===b?"normal":b)},b))})]}),g(me,{title:"Herramientas",children:[g("div",{className:"grid grid-cols-3 gap-2",children:[r(C,{icon:r(Nn,{}),label:"Gu\xEDa de lectura",isActive:x.isActive,onClick:x.toggle}),r(C,{icon:r(Rn,{}),label:"Pausar animaciones",isActive:h.isActive,onClick:h.toggle}),r(C,{icon:r(Hn,{}),label:"Cursor grande",isActive:v.isActive,onClick:v.toggle}),r(C,{icon:r(_n,{}),label:m.isReading?"Detener lectura":"Leer p\xE1gina",isActive:m.isReading,onClick:m.toggle,disabled:!m.isSupported}),r(C,{icon:r(Wn,{}),label:"Estructura",isActive:w.isOpen,onClick:w.toggle})]}),w.isOpen&&w.structure.length>0&&g("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3 max-h-60 overflow-y-auto",children:[r("p",{className:"mb-2 text-xs font-medium text-gray-500 uppercase tracking-wide",children:"Estructura de la p\xE1gina"}),r("ul",{className:"space-y-1",children:w.structure.map((b,D)=>r("li",{children:g("button",{type:"button",onClick:()=>w.navigateTo(b),className:"w-full text-left px-2 py-1.5 rounded-lg text-sm hover:bg-blue-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 transition-colors",style:{paddingLeft:`${(b.level||1)*12}px`},children:[r("span",{className:"inline-block mr-2 text-xs font-mono text-blue-600 bg-blue-100 px-1.5 py-0.5 rounded",children:b.tag}),r("span",{className:"text-gray-700",children:b.text})]})},`${b.tag}-${D}`))})]}),w.isOpen&&w.structure.length===0&&r("div",{className:"mt-3 rounded-xl border border-gray-200 bg-white p-3",children:r("p",{className:"text-sm text-gray-500 text-center",children:"No se encontraron encabezados"})})]})]}),r("section",{className:"px-4 pb-6 pt-2",children:r("button",{type:"button",onClick:k,className:"w-full rounded-xl apea-gradient py-3 text-sm font-semibold text-white cursor-pointer transition hover:bg-none hover:bg-green-500 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-blue-500 focus-visible:ring-offset-2",children:"Restablecer configuraci\xF3n"})})]})}function ii({icon:e,label:t,level:n,onIncrease:i,onDecrease:o,canIncrease:s,canDecrease:a}){let l=n>0;return g("div",{className:`flex flex-col items-center justify-between gap-1 rounded-3xl border p-2 shadow-md/20 text-center transition-all ${l?"border-yellow-500 bg-yellow-50 text-blue-900":"border-gray-200 bg-white text-gray-700"}`,children:[r("span",{className:"h-5 w-5 text-gray-500",children:e}),r("span",{className:"text-sm font-medium leading-tight",children:t}),g("div",{className:"flex items-center gap-1 w-full justify-center",children:[r("button",{type:"button",onClick:o,disabled:!a,"aria-label":`Reducir ${t}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"\u2212"}),r("span",{className:"w-4 text-center text-sm font-semibold tabular-nums",children:n}),r("button",{type:"button",onClick:i,disabled:!s,"aria-label":`Aumentar ${t}`,className:"flex h-5 w-5 items-center justify-center rounded text-xs font-bold text-blue-700 cursor-pointer hover:bg-blue-100 disabled:opacity-30 focus-visible:outline-none",children:"+"})]})]})}function Cn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M4 6h16M4 12h8M4 18h12",strokeLinecap:"round"}),r("path",{d:"M15 14l5 5M20 14l-5 5",strokeLinecap:"round",strokeLinejoin:"round"})]})}function xn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71",strokeLinecap:"round",strokeLinejoin:"round"})]})}function wn(){return r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:r("path",{d:"M4 7l4 10 4-10M20 7v10M17 7h6",strokeLinecap:"round",strokeLinejoin:"round"})})}function Ln(){return r("svg",{width:24,height:24,viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:r("path",{d:"m20.003 16.975-2.027 2.028m.113-3.943 1.914 1.915m-16.006 0 2.027-2.029m-.113 3.944-1.914-1.915m0 0h16.006m-2-5.975L15.16 4.997 12.317 11m.568-1.2h4.547M4.997 4.997 7.84 11l2.843-6.003",stroke:"#000",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})})}function En(){return g("svg",{width:25,height:24,viewBox:"0 0 25 24",fill:"none",xmlns:"http://www.w3.org/2000/svg","data-a11y-icon":!0,children:[r("path",{d:"M12.754 4a.75.75 0 0 1 .75-.75H20.5a.75.75 0 0 1 0 1.5h-6.996a.75.75 0 0 1-.75-.75m7.746 9.917h-6.996a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5m-6.996 5.333a.75.75 0 0 0 0 1.5H20.5a.75.75 0 0 0 0-1.5zm6.996-9.167h-6.996a.75.75 0 0 1 0-1.5H20.5a.75.75 0 0 1 0 1.5",opacity:.4,fill:"#323544"}),r("path",{d:"m9.974 16.47-1.722 1.72V5.81l1.722 1.72a.75.75 0 0 0 1.06-1.06l-3.002-3a.75.75 0 0 0-1.06 0l-3.002 3a.75.75 0 0 0 1.06 1.06l1.722-1.72v12.38L5.03 16.47a.75.75 0 0 0-1.06 1.06l3.002 3a.75.75 0 0 0 1.06 0l3.002-3a.75.75 0 0 0-1.06-1.06",fill:"#323544"})]})}function An(){return g("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M6 4h8a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"}),r("path",{d:"M6 12h9a4 4 0 0 1 4 4 4 4 0 0 1-4 4H6z"})]})}function Mn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M12 3v18"}),r("path",{d:"M12 3a9 9 0 0 1 0 18V3z",fill:"currentColor",stroke:"none"})]})}function kn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"12",r:"8"}),r("path",{d:"M12 4v16M8 8l8 8M4 12h16",strokeLinecap:"round",strokeOpacity:.4}),r("circle",{cx:"12",cy:"12",r:"4",fill:"currentColor"})]})}function In(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"12",r:"8"}),r("circle",{cx:"12",cy:"12",r:"3",strokeDasharray:"2 2"})]})}function Tn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("rect",{x:"3",y:"5",width:"18",height:"14",rx:"2"}),r("path",{d:"M3 12h18M12 5v14"}),r("path",{d:"M3 5h9v14H3z",fill:"currentColor",fillOpacity:.15,stroke:"none"})]})}function Nn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M4 6h16M4 10h16M4 14h10",strokeLinecap:"round"}),r("path",{d:"M3 18h18",strokeWidth:3,strokeLinecap:"round"})]})}function Rn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("rect",{x:"9",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"}),r("rect",{x:"13",y:"9",width:"2",height:"6",fill:"currentColor",stroke:"none"})]})}function Hn(){return r("svg",{viewBox:"0 0 24 24",fill:"currentColor",className:"h-full w-full","data-a11y-icon":!0,children:r("path",{d:"M5 3l14 9-7.5 1.5L9 20l-4-17z"})})}function Pn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("rect",{x:"3",y:"3",width:"18",height:"18",rx:"2"}),r("circle",{cx:"8.5",cy:"8.5",r:"1.5",fill:"currentColor",stroke:"none"}),r("path",{d:"M21 15l-5-5L5 21",strokeLinecap:"round",strokeLinejoin:"round"}),r("path",{d:"M2 2l20 20",strokeLinecap:"round",strokeWidth:2.5})]})}function On({mode:e}){return e==="center"?r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:r("path",{d:"M6 6h12M8 10h8M6 14h12M8 18h8",strokeLinecap:"round"})}):e==="right"?r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:r("path",{d:"M4 6h16M8 10h12M4 14h16M8 18h12",strokeLinecap:"round"})}):r("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:r("path",{d:"M4 6h16M4 10h12M4 14h16M4 18h12",strokeLinecap:"round"})})}function _n(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M11 5L6 9H2v6h4l5 4V5z",fill:"currentColor",stroke:"none"}),r("path",{d:"M15.54 8.46a5 5 0 0 1 0 7.07",strokeLinecap:"round"}),r("path",{d:"M19.07 4.93a10 10 0 0 1 0 14.14",strokeLinecap:"round"})]})}function Wn(){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M4 6h16M4 10h12M8 14h12M8 18h8",strokeLinecap:"round"}),r("circle",{cx:"4",cy:"14",r:"1",fill:"currentColor",stroke:"none"}),r("circle",{cx:"4",cy:"18",r:"1",fill:"currentColor",stroke:"none"})]})}function Fn({mode:e}){return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"12",r:"9"}),r("path",{d:"M12 3c-3 4-3 10 0 18",strokeLinecap:"round"}),r("path",{d:"M12 3c3 4 3 10 0 18",strokeLinecap:"round"}),e==="achromatopsia"?r("path",{d:"M3 12h18"}):g(Dn,{children:[r("path",{d:"M4 8h16",strokeOpacity:.4}),r("path",{d:"M4 16h16",strokeOpacity:.4})]})]})}function zn({profile:e}){switch(e){case"visionImpaired":return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M1 12s4-8 11-8 11 8 11 8-4 8-11 8-11-8-11-8z"}),r("circle",{cx:"12",cy:"12",r:"3",fill:"currentColor"})]});case"cognitive":return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("path",{d:"M12 2a7 7 0 0 1 7 7c0 3-2 5-3 7h-8c-1-2-3-4-3-7a7 7 0 0 1 7-7z"}),r("path",{d:"M9 16v2a3 3 0 0 0 6 0v-2"})]});case"motorImpaired":return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),r("path",{d:"M12 6v6l4 4M12 12l-4 4",strokeLinecap:"round",strokeLinejoin:"round"}),r("circle",{cx:"8",cy:"20",r:"2"}),r("circle",{cx:"16",cy:"20",r:"2"})]});case"seniorFriendly":return g("svg",{viewBox:"0 0 24 24",fill:"none",stroke:"currentColor",strokeWidth:2,className:"h-full w-full","data-a11y-icon":!0,children:[r("circle",{cx:"12",cy:"4",r:"2",fill:"currentColor"}),r("path",{d:"M12 6v8M12 14l-3 6M12 14l3 6M12 10h-2l-3 4M12 10h2",strokeLinecap:"round",strokeLinejoin:"round"})]});default:return null}}import{Fragment as Gn,jsx as U,jsxs as $n}from"react/jsx-runtime";function Re({position:e="bottom-left",className:t}={}){let[n,i]=Bn(!1),{hasActiveFeatures:o}=ge(),{fabStyle:s,isDragging:a,fabRef:l,dragHandlers:c}=qt({defaultPosition:e,onTap:()=>i(d=>!d),disabled:n});Vn(()=>{if(!n)return;let d=h=>{h.key==="Escape"&&i(!1)};return document.addEventListener("keydown",d),()=>document.removeEventListener("keydown",d)},[n]);let p=n||o?"var(--apea-color-fab-active, #FFD54F)":"var(--apea-color-fab-inactive, #F6F6F6)";return $n(Gn,{children:[U("div",{ref:l,className:t,style:{...s,zIndex:n?30:50,opacity:a?.85:1,filter:o?"drop-shadow(0 4px 12px rgba(255, 213, 79, 0.3))":"none"},role:"button",tabIndex:0,"aria-expanded":n,"aria-haspopup":"dialog","aria-label":`Accesibilidad - ${o?"Funciones activas":"Sin funciones activas"}`,...c,onKeyDown:d=>{n||(d.key==="Enter"||d.key===" ")&&(d.preventDefault(),i(!0))},children:U(ye,{size:"lg","aria-hidden":"true",tabIndex:-1,leftIcon:U(Be,{className:"w-full z-50",color:p,stroke:p})})}),U("div",{className:"fixed inset-0 z-40 apea-backdrop",style:{backgroundColor:"var(--apea-color-backdrop, rgba(0, 0, 0, 0.2))"},"data-visible":n?"true":"false",onClick:()=>i(!1),"aria-hidden":"true"}),U("div",{role:"none",className:"fixed inset-y-0 right-0 z-50 w-full max-w-sm shadow-2xl apea-panel","data-open":n?"true":"false",children:U(ni,{onClose:()=>i(!1)})})]})}import{jsx as si}from"react/jsx-runtime";var jn={primary500:"#005dca",primary600:"#004faf",primary700:"#003b8a",panelBackground:"#f9fafb",fabActive:"#ffd54f",fabInactive:"#f6f6f6",backdrop:"rgba(0, 0, 0, 0.2)"};function He(e){return{...jn,...e}}function Un(e,t){return{...e,...t,theme:{...e.theme??{},...t.theme??{}}}}function oi(e,t){e.style.setProperty("--apea-color-primary-500",t.primary500),e.style.setProperty("--apea-color-primary-600",t.primary600),e.style.setProperty("--apea-color-primary-700",t.primary700),e.style.setProperty("--apea-color-panel-bg",t.panelBackground),e.style.setProperty("--apea-color-fab-active",t.fabActive),e.style.setProperty("--apea-color-fab-inactive",t.fabInactive),e.style.setProperty("--apea-color-backdrop",t.backdrop)}function ri(e={}){let t={position:e.position||"bottom-left",zIndex:e.zIndex||9999,containerId:e.containerId||"ape-accessibility-root",theme:He(e.theme)},n=He(t.theme),i=t.containerId||"ape-accessibility-root";if(document.getElementById(i))return console.warn("[ape-accessibility] Widget already mounted. Call destroy() first."),{destroy:()=>{},updateConfig:()=>{},config:e};let o=document.createElement("style");o.id="ape-accessibility-tools-css",o.textContent=`/* ============================================= */
|
|
9
9
|
/* Accessibility Feature Styles */
|
|
10
10
|
/* ============================================= */
|
|
11
11
|
|
|
@@ -163,8 +163,8 @@ import{createRoot as yn}from"react-dom/client";import{useState as fn,useEffect a
|
|
|
163
163
|
:root[data-text-align='right'] * {
|
|
164
164
|
text-align: right !important;
|
|
165
165
|
}
|
|
166
|
-
`,document.head.appendChild(
|
|
167
|
-
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-500:#fec905;--color-green-50:oklch(98.2% .018 155.826);--color-green-500:#0a0;--color-blue-50:#eef5ff;--color-blue-100:#cfe5ff;--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:#7cb8ff;--color-blue-500:#005dca;--color-blue-600:#004faf;--color-blue-700:#003b8a;--color-blue-900:#002e64;--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--radius-lg:.5rem;--radius-xl:.75rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.right-0{right:calc(var(--spacing) * 0)}.right-5{right:calc(var(--spacing) * 5)}.bottom-8{bottom:calc(var(--spacing) * 8)}.left-5{left:calc(var(--spacing) * 5)}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-\\[40px\\]{height:40px}.h-\\[60px\\]{height:60px}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing) * 60)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-\\[40px\\]{width:40px}.w-\\[60px\\]{width:60px}.w-full{width:100%}.max-w-sm{max-width:var(--container-sm)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-180{rotate:180deg}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[30px\\]{border-radius:30px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-white\\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.border-white\\/30{border-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.border-yellow-500{border-color:var(--color-yellow-500)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-green-50{background-color:var(--color-green-50)}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.p-0{padding:calc(var(--spacing) * 0)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow-md\\/20{--tw-shadow-alpha:20%;--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,oklab(0% 0 0/.2)), 0 2px 4px -2px var(--tw-shadow-color,oklab(0% 0 0/.2));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-green-500{--tw-ring-color:var(--color-green-500)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.hover\\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\\:bg-none:hover{background-image:none}.hover\\:font-semibold:hover{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.hover\\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:ring-blue-300:hover{--tw-ring-color:var(--color-blue-300)}.hover\\:ring-yellow-500:hover{--tw-ring-color:var(--color-yellow-500)}}.focus\\:bg-blue-50:focus{background-color:var(--color-blue-50)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-white:focus-visible{--tw-ring-color:var(--color-white)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
|
|
166
|
+
`,document.head.appendChild(o);let s=document.createElement("div");s.id=i,s.setAttribute("data-a11y-icon",""),s.style.position="fixed",s.style.zIndex=String(t.zIndex||9999),s.style.top="0",s.style.left="0",s.style.width="0",s.style.height="0",s.style.overflow="visible",oi(s,n),document.body.appendChild(s);let a=s.attachShadow({mode:"open"}),l=document.createElement("style");l.textContent=`/*! tailwindcss v4.2.2 | MIT License | https://tailwindcss.com */
|
|
167
|
+
@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-space-y-reverse:0;--tw-border-style:solid;--tw-leading:initial;--tw-font-weight:initial;--tw-tracking:initial;--tw-ordinal:initial;--tw-slashed-zero:initial;--tw-numeric-figure:initial;--tw-numeric-spacing:initial;--tw-numeric-fraction:initial;--tw-shadow:0 0 #0000;--tw-shadow-color:initial;--tw-shadow-alpha:100%;--tw-inset-shadow:0 0 #0000;--tw-inset-shadow-color:initial;--tw-inset-shadow-alpha:100%;--tw-ring-color:initial;--tw-ring-shadow:0 0 #0000;--tw-inset-ring-color:initial;--tw-inset-ring-shadow:0 0 #0000;--tw-ring-inset:initial;--tw-ring-offset-width:0px;--tw-ring-offset-color:#fff;--tw-ring-offset-shadow:0 0 #0000;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-duration:initial;--tw-ease:initial;--tw-scale-x:1;--tw-scale-y:1;--tw-scale-z:1}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--color-yellow-50:oklch(98.7% .026 102.212);--color-yellow-500:#fec905;--color-green-50:oklch(98.2% .018 155.826);--color-green-500:#0a0;--color-blue-50:#eef5ff;--color-blue-100:#cfe5ff;--color-blue-300:oklch(80.9% .105 251.813);--color-blue-400:#7cb8ff;--color-blue-500:#005dca;--color-blue-600:#004faf;--color-blue-700:#003b8a;--color-blue-900:#002e64;--color-gray-200:oklch(92.8% .006 264.531);--color-gray-500:oklch(55.1% .027 264.364);--color-gray-700:oklch(37.3% .034 259.733);--color-white:#fff;--spacing:.25rem;--container-sm:24rem;--text-xs:.75rem;--text-xs--line-height:calc(1 / .75);--text-sm:.875rem;--text-sm--line-height:calc(1.25 / .875);--text-base:1rem;--text-base--line-height:calc(1.5 / 1);--text-lg:1.125rem;--text-lg--line-height:calc(1.75 / 1.125);--font-weight-medium:500;--font-weight-semibold:600;--font-weight-bold:700;--tracking-wide:.025em;--tracking-wider:.05em;--leading-tight:1.25;--radius-lg:.5rem;--radius-xl:.75rem;--radius-3xl:1.5rem;--ease-in-out:cubic-bezier(.4, 0, .2, 1);--default-transition-duration:.15s;--default-transition-timing-function:cubic-bezier(.4, 0, .2, 1);--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab, red, red)){::placeholder{color:color-mix(in oklab, currentcolor 50%, transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){appearance:button}::file-selector-button{appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.invisible{visibility:hidden}.visible{visibility:visible}.absolute{position:absolute}.fixed{position:fixed}.relative{position:relative}.inset-0{inset:calc(var(--spacing) * 0)}.inset-y-0{inset-block:calc(var(--spacing) * 0)}.start{inset-inline-start:var(--spacing)}.right-0{right:calc(var(--spacing) * 0)}.right-5{right:calc(var(--spacing) * 5)}.bottom-8{bottom:calc(var(--spacing) * 8)}.left-5{left:calc(var(--spacing) * 5)}.z-40{z-index:40}.z-50{z-index:50}.container{width:100%}@media (min-width:40rem){.container{max-width:40rem}}@media (min-width:48rem){.container{max-width:48rem}}@media (min-width:64rem){.container{max-width:64rem}}@media (min-width:80rem){.container{max-width:80rem}}@media (min-width:96rem){.container{max-width:96rem}}.-mx-2{margin-inline:calc(var(--spacing) * -2)}.mt-3{margin-top:calc(var(--spacing) * 3)}.mr-2{margin-right:calc(var(--spacing) * 2)}.mb-2{margin-bottom:calc(var(--spacing) * 2)}.mb-3{margin-bottom:calc(var(--spacing) * 3)}.ml-2{margin-left:calc(var(--spacing) * 2)}.block{display:block}.contents{display:contents}.flex{display:flex}.grid{display:grid}.hidden{display:none}.inline-block{display:inline-block}.inline-flex{display:inline-flex}.h-4{height:calc(var(--spacing) * 4)}.h-5{height:calc(var(--spacing) * 5)}.h-6{height:calc(var(--spacing) * 6)}.h-8{height:calc(var(--spacing) * 8)}.h-9{height:calc(var(--spacing) * 9)}.h-\\[40px\\]{height:40px}.h-\\[60px\\]{height:60px}.h-full{height:100%}.max-h-60{max-height:calc(var(--spacing) * 60)}.w-4{width:calc(var(--spacing) * 4)}.w-5{width:calc(var(--spacing) * 5)}.w-6{width:calc(var(--spacing) * 6)}.w-8{width:calc(var(--spacing) * 8)}.w-9{width:calc(var(--spacing) * 9)}.w-\\[40px\\]{width:40px}.w-\\[60px\\]{width:60px}.w-full{width:100%}.max-w-sm{max-width:var(--container-sm)}.flex-1{flex:1}.shrink-0{flex-shrink:0}.rotate-180{rotate:180deg}.cursor-not-allowed{cursor:not-allowed}.cursor-pointer{cursor:pointer}.resize{resize:both}.grid-cols-2{grid-template-columns:repeat(2,minmax(0,1fr))}.grid-cols-3{grid-template-columns:repeat(3,minmax(0,1fr))}.grid-rows-\\[0fr\\]{grid-template-rows:0fr}.grid-rows-\\[1fr\\]{grid-template-rows:1fr}.flex-col{flex-direction:column}.items-center{align-items:center}.justify-between{justify-content:space-between}.justify-center{justify-content:center}.gap-1{gap:calc(var(--spacing) * 1)}.gap-1\\.5{gap:calc(var(--spacing) * 1.5)}.gap-2{gap:calc(var(--spacing) * 2)}:where(.space-y-1>:not(:last-child)){--tw-space-y-reverse:0;margin-block-start:calc(calc(var(--spacing) * 1) * var(--tw-space-y-reverse));margin-block-end:calc(calc(var(--spacing) * 1) * calc(1 - var(--tw-space-y-reverse)))}.overflow-hidden{overflow:hidden}.overflow-y-auto{overflow-y:auto}.rounded{border-radius:.25rem}.rounded-3xl{border-radius:var(--radius-3xl)}.rounded-\\[30px\\]{border-radius:30px}.rounded-full{border-radius:3.40282e38px}.rounded-lg{border-radius:var(--radius-lg)}.rounded-xl{border-radius:var(--radius-xl)}.border{border-style:var(--tw-border-style);border-width:1px}.border-gray-200{border-color:var(--color-gray-200)}.border-white\\/30{border-color:#ffffff4d}@supports (color:color-mix(in lab, red, red)){.border-white\\/30{border-color:color-mix(in oklab, var(--color-white) 30%, transparent)}}.border-yellow-500{border-color:var(--color-yellow-500)}.bg-blue-100{background-color:var(--color-blue-100)}.bg-blue-500{background-color:var(--color-blue-500)}.bg-green-50{background-color:var(--color-green-50)}.bg-white{background-color:var(--color-white)}.bg-yellow-50{background-color:var(--color-yellow-50)}.p-0{padding:calc(var(--spacing) * 0)}.p-2{padding:calc(var(--spacing) * 2)}.p-3{padding:calc(var(--spacing) * 3)}.px-1\\.5{padding-inline:calc(var(--spacing) * 1.5)}.px-2{padding-inline:calc(var(--spacing) * 2)}.px-3{padding-inline:calc(var(--spacing) * 3)}.px-4{padding-inline:calc(var(--spacing) * 4)}.px-5{padding-inline:calc(var(--spacing) * 5)}.py-0\\.5{padding-block:calc(var(--spacing) * .5)}.py-1\\.5{padding-block:calc(var(--spacing) * 1.5)}.py-2{padding-block:calc(var(--spacing) * 2)}.py-3{padding-block:calc(var(--spacing) * 3)}.pt-2{padding-top:calc(var(--spacing) * 2)}.pt-3{padding-top:calc(var(--spacing) * 3)}.pb-5{padding-bottom:calc(var(--spacing) * 5)}.pb-6{padding-bottom:calc(var(--spacing) * 6)}.text-center{text-align:center}.text-left{text-align:left}.font-mono{font-family:var(--font-mono)}.text-base{font-size:var(--text-base);line-height:var(--tw-leading,var(--text-base--line-height))}.text-lg{font-size:var(--text-lg);line-height:var(--tw-leading,var(--text-lg--line-height))}.text-sm{font-size:var(--text-sm);line-height:var(--tw-leading,var(--text-sm--line-height))}.text-xs{font-size:var(--text-xs);line-height:var(--tw-leading,var(--text-xs--line-height))}.leading-tight{--tw-leading:var(--leading-tight);line-height:var(--leading-tight)}.font-bold{--tw-font-weight:var(--font-weight-bold);font-weight:var(--font-weight-bold)}.font-medium{--tw-font-weight:var(--font-weight-medium);font-weight:var(--font-weight-medium)}.font-semibold{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.tracking-wide{--tw-tracking:var(--tracking-wide);letter-spacing:var(--tracking-wide)}.tracking-wider{--tw-tracking:var(--tracking-wider);letter-spacing:var(--tracking-wider)}.whitespace-nowrap{white-space:nowrap}.text-blue-600{color:var(--color-blue-600)}.text-blue-700{color:var(--color-blue-700)}.text-blue-900{color:var(--color-blue-900)}.text-gray-500{color:var(--color-gray-500)}.text-gray-700{color:var(--color-gray-700)}.text-white{color:var(--color-white)}.uppercase{text-transform:uppercase}.tabular-nums{--tw-numeric-spacing:tabular-nums;font-variant-numeric:var(--tw-ordinal,) var(--tw-slashed-zero,) var(--tw-numeric-figure,) var(--tw-numeric-spacing,) var(--tw-numeric-fraction,)}.opacity-0{opacity:0}.opacity-40{opacity:.4}.opacity-50{opacity:.5}.opacity-100{opacity:1}.shadow-md\\/20{--tw-shadow-alpha:20%;--tw-shadow:0 4px 6px -1px var(--tw-shadow-color,oklab(0% 0 0/.2)), 0 2px 4px -2px var(--tw-shadow-color,oklab(0% 0 0/.2));box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow{--tw-shadow:0 1px 3px 0 var(--tw-shadow-color,#0000001a), 0 1px 2px -1px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-2xl{--tw-shadow:0 25px 50px -12px var(--tw-shadow-color,#00000040);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.shadow-lg{--tw-shadow:0 10px 15px -3px var(--tw-shadow-color,#0000001a), 0 4px 6px -4px var(--tw-shadow-color,#0000001a);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-2{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.ring-green-500{--tw-ring-color:var(--color-green-500)}.filter{filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.transition{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to,opacity,box-shadow,transform,translate,scale,rotate,filter,-webkit-backdrop-filter,backdrop-filter,display,content-visibility,overlay,pointer-events;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-\\[grid-template-rows\\]{transition-property:grid-template-rows;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-all{transition-property:all;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-colors{transition-property:color,background-color,border-color,outline-color,text-decoration-color,fill,stroke,--tw-gradient-from,--tw-gradient-via,--tw-gradient-to;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-opacity{transition-property:opacity;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.transition-transform{transition-property:transform,translate,scale,rotate;transition-timing-function:var(--tw-ease,var(--default-transition-timing-function));transition-duration:var(--tw-duration,var(--default-transition-duration))}.duration-200{--tw-duration:.2s;transition-duration:.2s}.duration-300{--tw-duration:.3s;transition-duration:.3s}.ease-in-out{--tw-ease:var(--ease-in-out);transition-timing-function:var(--ease-in-out)}@media (hover:hover){.hover\\:border-blue-400:hover{border-color:var(--color-blue-400)}.hover\\:bg-blue-50:hover{background-color:var(--color-blue-50)}.hover\\:bg-blue-100:hover{background-color:var(--color-blue-100)}.hover\\:bg-green-500:hover{background-color:var(--color-green-500)}.hover\\:bg-white\\/20:hover{background-color:#fff3}@supports (color:color-mix(in lab, red, red)){.hover\\:bg-white\\/20:hover{background-color:color-mix(in oklab, var(--color-white) 20%, transparent)}}.hover\\:bg-none:hover{background-image:none}.hover\\:font-semibold:hover{--tw-font-weight:var(--font-weight-semibold);font-weight:var(--font-weight-semibold)}.hover\\:ring-2:hover{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.hover\\:ring-blue-300:hover{--tw-ring-color:var(--color-blue-300)}.hover\\:ring-yellow-500:hover{--tw-ring-color:var(--color-yellow-500)}}.focus\\:bg-blue-50:focus{background-color:var(--color-blue-50)}.focus-visible\\:ring-2:focus-visible{--tw-ring-shadow:var(--tw-ring-inset,) 0 0 0 calc(2px + var(--tw-ring-offset-width)) var(--tw-ring-color,currentcolor);box-shadow:var(--tw-inset-shadow), var(--tw-inset-ring-shadow), var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow)}.focus-visible\\:ring-blue-500:focus-visible{--tw-ring-color:var(--color-blue-500)}.focus-visible\\:ring-white:focus-visible{--tw-ring-color:var(--color-white)}.focus-visible\\:ring-offset-1:focus-visible{--tw-ring-offset-width:1px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:ring-offset-2:focus-visible{--tw-ring-offset-width:2px;--tw-ring-offset-shadow:var(--tw-ring-inset,) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color)}.focus-visible\\:outline-none:focus-visible{--tw-outline-style:none;outline-style:none}.active\\:scale-90:active{--tw-scale-x:90%;--tw-scale-y:90%;--tw-scale-z:90%;scale:var(--tw-scale-x) var(--tw-scale-y)}.disabled\\:cursor-not-allowed:disabled{cursor:not-allowed}.disabled\\:opacity-30:disabled{opacity:.3}.disabled\\:opacity-40:disabled{opacity:.4}}@property --tw-space-y-reverse{syntax:"*";inherits:false;initial-value:0}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-leading{syntax:"*";inherits:false}@property --tw-font-weight{syntax:"*";inherits:false}@property --tw-tracking{syntax:"*";inherits:false}@property --tw-ordinal{syntax:"*";inherits:false}@property --tw-slashed-zero{syntax:"*";inherits:false}@property --tw-numeric-figure{syntax:"*";inherits:false}@property --tw-numeric-spacing{syntax:"*";inherits:false}@property --tw-numeric-fraction{syntax:"*";inherits:false}@property --tw-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-shadow-color{syntax:"*";inherits:false}@property --tw-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-inset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-shadow-color{syntax:"*";inherits:false}@property --tw-inset-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-ring-color{syntax:"*";inherits:false}@property --tw-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-inset-ring-color{syntax:"*";inherits:false}@property --tw-inset-ring-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-ring-inset{syntax:"*";inherits:false}@property --tw-ring-offset-width{syntax:"<length>";inherits:false;initial-value:0}@property --tw-ring-offset-color{syntax:"*";inherits:false;initial-value:#fff}@property --tw-ring-offset-shadow{syntax:"*";inherits:false;initial-value:0 0 #0000}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-duration{syntax:"*";inherits:false}@property --tw-ease{syntax:"*";inherits:false}@property --tw-scale-x{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-y{syntax:"*";inherits:false;initial-value:1}@property --tw-scale-z{syntax:"*";inherits:false;initial-value:1}
|
|
168
168
|
/* Widget animation styles */
|
|
169
169
|
|
|
170
170
|
/* FAB button */
|
|
@@ -207,5 +207,5 @@ import{createRoot as yn}from"react-dom/client";import{useState as fn,useEffect a
|
|
|
207
207
|
var(--apea-color-primary-700, var(--color-blue-700)) 80%
|
|
208
208
|
);
|
|
209
209
|
}
|
|
210
|
-
`,a.appendChild(
|
|
210
|
+
`,a.appendChild(l);let c=document.createElement("div");a.appendChild(c);let p=Zn(c);p.render(si(Re,{position:t.position}));let d=!1;return{updateConfig(h){t=Un(t,h),n=He(t.theme),s.style.zIndex=String(t.zIndex||9999),oi(s,n),p&&p.render(si(Re,{position:t.position}))},destroy(){if(d)return;d=!0;let h=p,v=s,x=o;p=null,queueMicrotask(()=>{try{h?.unmount()}catch{}v.remove(),x.remove()})},get config(){return t}}}var R=null,W={};function ai(e,t){return{...e,...t,theme:{...e.theme??{},...t.theme??{}}}}function ci(e={}){return R?(console.warn("[ape-accessibility] Already initialized. Call destroy() first."),R):(W=ai(W,e),R=ri(W),R)}function li(){R&&(R.destroy(),R=null)}function di(){return u()}function ui(e={}){return W=ai(W,e),R&&R.updateConfig(W),Pe()}function Pe(){return{...W,theme:{...W.theme??{}}}}function gi(){V(),typeof window<"u"&&window.dispatchEvent(new CustomEvent("accessibilityReset",{detail:{timestamp:Date.now()}}))}var he={init:ci,destroy:li,getSettings:di,resetAllSettings:gi,configure:ui,getConfig:Pe};import{useEffect as fi,useRef as pi}from"react";function Xn({config:e={}}){let t=pi(null),n=pi(!1);return fi(()=>(n.current=!1,t.current=he.init(e),()=>{n.current=!0,t.current?.destroy(),t.current=null}),[]),fi(()=>{n.current||he.configure(e)},[e]),null}export{Xn as AccessibilityWidget,he as accessibility,ui as configure,li as destroy,Pe as getConfig,di as getSettings,ci as init,gi as resetAllSettings};
|
|
211
211
|
//# sourceMappingURL=index.js.map
|