@yuktishaalaa/yuktai 2.0.2 → 2.0.5
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/index.global.js +75 -0
- package/package.json +4 -3
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
"use strict";var YuktAI=(()=>{var Dt=Object.create;var Re=Object.defineProperty;var Wt=Object.getOwnPropertyDescriptor;var Ht=Object.getOwnPropertyNames;var zt=Object.getPrototypeOf,qt=Object.prototype.hasOwnProperty;var oe=(r,n)=>()=>(n||r((n={exports:{}}).exports,n),n.exports),Ft=(r,n)=>{for(var c in n)Re(r,c,{get:n[c],enumerable:!0})},pt=(r,n,c,d)=>{if(n&&typeof n=="object"||typeof n=="function")for(let a of Ht(n))!qt.call(r,a)&&a!==c&&Re(r,a,{get:()=>n[a],enumerable:!(d=Wt(n,a))||d.enumerable});return r};var ie=(r,n,c)=>(c=r!=null?Dt(zt(r)):{},pt(n||!r||!r.__esModule?Re(c,"default",{value:r,enumerable:!0}):c,r)),Ut=r=>pt(Re({},"__esModule",{value:!0}),r);var kt=oe(y=>{"use strict";var Ue=Symbol.for("react.transitional.element"),Vt=Symbol.for("react.portal"),Qt=Symbol.for("react.fragment"),Xt=Symbol.for("react.strict_mode"),Zt=Symbol.for("react.profiler"),Jt=Symbol.for("react.consumer"),er=Symbol.for("react.context"),tr=Symbol.for("react.forward_ref"),rr=Symbol.for("react.suspense"),nr=Symbol.for("react.memo"),Et=Symbol.for("react.lazy"),or=Symbol.for("react.activity"),yt=Symbol.iterator;function ir(r){return r===null||typeof r!="object"?null:(r=yt&&r[yt]||r["@@iterator"],typeof r=="function"?r:null)}var _t={isMounted:function(){return!1},enqueueForceUpdate:function(){},enqueueReplaceState:function(){},enqueueSetState:function(){}},xt=Object.assign,wt={};function ue(r,n,c){this.props=r,this.context=n,this.refs=wt,this.updater=c||_t}ue.prototype.isReactComponent={};ue.prototype.setState=function(r,n){if(typeof r!="object"&&typeof r!="function"&&r!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,r,n,"setState")};ue.prototype.forceUpdate=function(r){this.updater.enqueueForceUpdate(this,r,"forceUpdate")};function Tt(){}Tt.prototype=ue.prototype;function Be(r,n,c){this.props=r,this.context=n,this.refs=wt,this.updater=c||_t}var Ge=Be.prototype=new Tt;Ge.constructor=Be;xt(Ge,ue.prototype);Ge.isPureReactComponent=!0;var ht=Array.isArray;function Fe(){}var O={H:null,A:null,T:null,S:null},St=Object.prototype.hasOwnProperty;function Ke(r,n,c){var d=c.ref;return{$$typeof:Ue,type:r,key:n,ref:d!==void 0?d:null,props:c}}function ar(r,n){return Ke(r.type,n,r.props)}function Ve(r){return typeof r=="object"&&r!==null&&r.$$typeof===Ue}function sr(r){var n={"=":"=0",":":"=2"};return"$"+r.replace(/[=:]/g,function(c){return n[c]})}var vt=/\/+/g;function qe(r,n){return typeof r=="object"&&r!==null&&r.key!=null?sr(""+r.key):n.toString(36)}function ur(r){switch(r.status){case"fulfilled":return r.value;case"rejected":throw r.reason;default:switch(typeof r.status=="string"?r.then(Fe,Fe):(r.status="pending",r.then(function(n){r.status==="pending"&&(r.status="fulfilled",r.value=n)},function(n){r.status==="pending"&&(r.status="rejected",r.reason=n)})),r.status){case"fulfilled":return r.value;case"rejected":throw r.reason}}throw r}function se(r,n,c,d,a){var f=typeof r;(f==="undefined"||f==="boolean")&&(r=null);var t=!1;if(r===null)t=!0;else switch(f){case"bigint":case"string":case"number":t=!0;break;case"object":switch(r.$$typeof){case Ue:case Vt:t=!0;break;case Et:return t=r._init,se(t(r._payload),n,c,d,a)}}if(t)return a=a(r),t=d===""?"."+qe(r,0):d,ht(a)?(c="",t!=null&&(c=t.replace(vt,"$&/")+"/"),se(a,n,c,"",function(w){return w})):a!=null&&(Ve(a)&&(a=ar(a,c+(a.key==null||r&&r.key===a.key?"":(""+a.key).replace(vt,"$&/")+"/")+t)),n.push(a)),1;t=0;var i=d===""?".":d+":";if(ht(r))for(var k=0;k<r.length;k++)d=r[k],f=i+qe(d,k),t+=se(d,n,c,f,a);else if(k=ir(r),typeof k=="function")for(r=k.call(r),k=0;!(d=r.next()).done;)d=d.value,f=i+qe(d,k++),t+=se(d,n,c,f,a);else if(f==="object"){if(typeof r.then=="function")return se(ur(r),n,c,d,a);throw n=String(r),Error("Objects are not valid as a React child (found: "+(n==="[object Object]"?"object with keys {"+Object.keys(r).join(", ")+"}":n)+"). If you meant to render a collection of children, use an array instead.")}return t}function Pe(r,n,c){if(r==null)return r;var d=[],a=0;return se(r,d,"","",function(f){return n.call(c,f,a++)}),d}function lr(r){if(r._status===-1){var n=r._result;n=n(),n.then(function(c){(r._status===0||r._status===-1)&&(r._status=1,r._result=c)},function(c){(r._status===0||r._status===-1)&&(r._status=2,r._result=c)}),r._status===-1&&(r._status=0,r._result=n)}if(r._status===1)return r._result.default;throw r._result}var At=typeof reportError=="function"?reportError:function(r){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var n=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof r=="object"&&r!==null&&typeof r.message=="string"?String(r.message):String(r),error:r});if(!window.dispatchEvent(n))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",r);return}console.error(r)},cr={map:Pe,forEach:function(r,n,c){Pe(r,function(){n.apply(this,arguments)},c)},count:function(r){var n=0;return Pe(r,function(){n++}),n},toArray:function(r){return Pe(r,function(n){return n})||[]},only:function(r){if(!Ve(r))throw Error("React.Children.only expected to receive a single React element child.");return r}};y.Activity=or;y.Children=cr;y.Component=ue;y.Fragment=Qt;y.Profiler=Zt;y.PureComponent=Be;y.StrictMode=Xt;y.Suspense=rr;y.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=O;y.__COMPILER_RUNTIME={__proto__:null,c:function(r){return O.H.useMemoCache(r)}};y.cache=function(r){return function(){return r.apply(null,arguments)}};y.cacheSignal=function(){return null};y.cloneElement=function(r,n,c){if(r==null)throw Error("The argument must be a React element, but you passed "+r+".");var d=xt({},r.props),a=r.key;if(n!=null)for(f in n.key!==void 0&&(a=""+n.key),n)!St.call(n,f)||f==="key"||f==="__self"||f==="__source"||f==="ref"&&n.ref===void 0||(d[f]=n[f]);var f=arguments.length-2;if(f===1)d.children=c;else if(1<f){for(var t=Array(f),i=0;i<f;i++)t[i]=arguments[i+2];d.children=t}return Ke(r.type,a,d)};y.createContext=function(r){return r={$$typeof:er,_currentValue:r,_currentValue2:r,_threadCount:0,Provider:null,Consumer:null},r.Provider=r,r.Consumer={$$typeof:Jt,_context:r},r};y.createElement=function(r,n,c){var d,a={},f=null;if(n!=null)for(d in n.key!==void 0&&(f=""+n.key),n)St.call(n,d)&&d!=="key"&&d!=="__self"&&d!=="__source"&&(a[d]=n[d]);var t=arguments.length-2;if(t===1)a.children=c;else if(1<t){for(var i=Array(t),k=0;k<t;k++)i[k]=arguments[k+2];a.children=i}if(r&&r.defaultProps)for(d in t=r.defaultProps,t)a[d]===void 0&&(a[d]=t[d]);return Ke(r,f,a)};y.createRef=function(){return{current:null}};y.forwardRef=function(r){return{$$typeof:tr,render:r}};y.isValidElement=Ve;y.lazy=function(r){return{$$typeof:Et,_payload:{_status:-1,_result:r},_init:lr}};y.memo=function(r,n){return{$$typeof:nr,type:r,compare:n===void 0?null:n}};y.startTransition=function(r){var n=O.T,c={};O.T=c;try{var d=r(),a=O.S;a!==null&&a(c,d),typeof d=="object"&&d!==null&&typeof d.then=="function"&&d.then(Fe,At)}catch(f){At(f)}finally{n!==null&&c.types!==null&&(n.types=c.types),O.T=n}};y.unstable_useCacheRefresh=function(){return O.H.useCacheRefresh()};y.use=function(r){return O.H.use(r)};y.useActionState=function(r,n,c){return O.H.useActionState(r,n,c)};y.useCallback=function(r,n){return O.H.useCallback(r,n)};y.useContext=function(r){return O.H.useContext(r)};y.useDebugValue=function(){};y.useDeferredValue=function(r,n){return O.H.useDeferredValue(r,n)};y.useEffect=function(r,n){return O.H.useEffect(r,n)};y.useEffectEvent=function(r){return O.H.useEffectEvent(r)};y.useId=function(){return O.H.useId()};y.useImperativeHandle=function(r,n,c){return O.H.useImperativeHandle(r,n,c)};y.useInsertionEffect=function(r,n){return O.H.useInsertionEffect(r,n)};y.useLayoutEffect=function(r,n){return O.H.useLayoutEffect(r,n)};y.useMemo=function(r,n){return O.H.useMemo(r,n)};y.useOptimistic=function(r,n){return O.H.useOptimistic(r,n)};y.useReducer=function(r,n,c){return O.H.useReducer(r,n,c)};y.useRef=function(r){return O.H.useRef(r)};y.useState=function(r){return O.H.useState(r)};y.useSyncExternalStore=function(r,n,c){return O.H.useSyncExternalStore(r,n,c)};y.useTransition=function(){return O.H.useTransition()};y.version="19.2.5"});var Rt=oe((g,Me)=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function r(e,o){Object.defineProperty(d.prototype,e,{get:function(){console.warn("%s(...) is deprecated in plain JavaScript React classes. %s",o[0],o[1])}})}function n(e){return e===null||typeof e!="object"?null:(e=xe&&e[xe]||e["@@iterator"],typeof e=="function"?e:null)}function c(e,o){e=(e=e.constructor)&&(e.displayName||e.name)||"ReactClass";var l=e+"."+o;et[l]||(console.error("Can't call %s on a component that is not yet mounted. This is a no-op, but it might indicate a bug in your application. Instead, assign to `this.state` directly or define a `state = {};` class property with the desired state in the %s component.",o,e),et[l]=!0)}function d(e,o,l){this.props=e,this.context=o,this.refs=We,this.updater=l||tt}function a(){}function f(e,o,l){this.props=e,this.context=o,this.refs=We,this.updater=l||tt}function t(){}function i(e){return""+e}function k(e){try{i(e);var o=!1}catch{o=!0}if(o){o=console;var l=o.error,p=typeof Symbol=="function"&&Symbol.toStringTag&&e[Symbol.toStringTag]||e.constructor.name||"Object";return l.call(o,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",p),i(e)}}function w(e){if(e==null)return null;if(typeof e=="function")return e.$$typeof===jt?null:e.displayName||e.name||null;if(typeof e=="string")return e;switch(e){case te:return"Fragment";case u:return"Profiler";case me:return"StrictMode";case V:return"Suspense";case ge:return"SuspenseList";case re:return"Activity"}if(typeof e=="object")switch(typeof e.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),e.$$typeof){case be:return"Portal";case C:return e.displayName||"Context";case h:return(e._context.displayName||"Context")+".Consumer";case N:var o=e.render;return e=e.displayName,e||(e=o.displayName||o.name||"",e=e!==""?"ForwardRef("+e+")":"ForwardRef"),e;case M:return o=e.displayName||null,o!==null?o:w(e.type)||"Memo";case Y:o=e._payload,e=e._init;try{return w(e(o))}catch{}}return null}function S(e){if(e===te)return"<>";if(typeof e=="object"&&e!==null&&e.$$typeof===Y)return"<...>";try{var o=w(e);return o?"<"+o+">":"<...>"}catch{return"<...>"}}function s(){var e=A.A;return e===null?null:e.getOwner()}function m(){return Error("react-stack-top-frame")}function L(e){if(we.call(e,"key")){var o=Object.getOwnPropertyDescriptor(e,"key").get;if(o&&o.isReactWarning)return!1}return e.key!==void 0}function Q(e,o){function l(){it||(it=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",o))}l.isReactWarning=!0,Object.defineProperty(e,"key",{get:l,configurable:!0})}function fe(){var e=w(this.type);return st[e]||(st[e]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),e=this.props.ref,e!==void 0?e:null}function H(e,o,l,p,b,_){var v=l.ref;return e={$$typeof:ee,type:e,key:o,props:l,_owner:p},(v!==void 0?v:null)!==null?Object.defineProperty(e,"ref",{enumerable:!1,get:fe}):Object.defineProperty(e,"ref",{enumerable:!1,value:null}),e._store={},Object.defineProperty(e._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(e,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(e,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:b}),Object.defineProperty(e,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:_}),Object.freeze&&(Object.freeze(e.props),Object.freeze(e)),e}function Ee(e,o){return o=H(e.type,o,e.props,e._owner,e._debugStack,e._debugTask),e._store&&(o._store.validated=e._store.validated),o}function T(e){I(e)?e._store&&(e._store.validated=1):typeof e=="object"&&e!==null&&e.$$typeof===Y&&(e._payload.status==="fulfilled"?I(e._payload.value)&&e._payload.value._store&&(e._payload.value._store.validated=1):e._store&&(e._store.validated=1))}function I(e){return typeof e=="object"&&e!==null&&e.$$typeof===ee}function z(e){var o={"=":"=0",":":"=2"};return"$"+e.replace(/[=:]/g,function(l){return o[l]})}function de(e,o){return typeof e=="object"&&e!==null&&e.key!=null?(k(e.key),z(""+e.key)):o.toString(36)}function De(e){switch(e.status){case"fulfilled":return e.value;case"rejected":throw e.reason;default:switch(typeof e.status=="string"?e.then(t,t):(e.status="pending",e.then(function(o){e.status==="pending"&&(e.status="fulfilled",e.value=o)},function(o){e.status==="pending"&&(e.status="rejected",e.reason=o)})),e.status){case"fulfilled":return e.value;case"rejected":throw e.reason}}throw e}function q(e,o,l,p,b){var _=typeof e;(_==="undefined"||_==="boolean")&&(e=null);var v=!1;if(e===null)v=!0;else switch(_){case"bigint":case"string":case"number":v=!0;break;case"object":switch(e.$$typeof){case ee:case be:v=!0;break;case Y:return v=e._init,q(v(e._payload),o,l,p,b)}}if(v){v=e,b=b(v);var R=p===""?"."+de(v,0):p;return nt(b)?(l="",R!=null&&(l=R.replace(lt,"$&/")+"/"),q(b,o,l,"",function(B){return B})):b!=null&&(I(b)&&(b.key!=null&&(v&&v.key===b.key||k(b.key)),l=Ee(b,l+(b.key==null||v&&v.key===b.key?"":(""+b.key).replace(lt,"$&/")+"/")+R),p!==""&&v!=null&&I(v)&&v.key==null&&v._store&&!v._store.validated&&(l._store.validated=2),b=l),o.push(b)),1}if(v=0,R=p===""?".":p+":",nt(e))for(var x=0;x<e.length;x++)p=e[x],_=R+de(p,x),v+=q(p,o,l,_,b);else if(x=n(e),typeof x=="function")for(x===e.entries&&(ut||console.warn("Using Maps as children is not supported. Use an array of keyed ReactElements instead."),ut=!0),e=x.call(e),x=0;!(p=e.next()).done;)p=p.value,_=R+de(p,x++),v+=q(p,o,l,_,b);else if(_==="object"){if(typeof e.then=="function")return q(De(e),o,l,p,b);throw o=String(e),Error("Objects are not valid as a React child (found: "+(o==="[object Object]"?"object with keys {"+Object.keys(e).join(", ")+"}":o)+"). If you meant to render a collection of children, use an array instead.")}return v}function X(e,o,l){if(e==null)return e;var p=[],b=0;return q(e,p,"","",function(_){return o.call(l,_,b++)}),p}function pe(e){if(e._status===-1){var o=e._ioInfo;o!=null&&(o.start=o.end=performance.now()),o=e._result;var l=o();if(l.then(function(b){if(e._status===0||e._status===-1){e._status=1,e._result=b;var _=e._ioInfo;_!=null&&(_.end=performance.now()),l.status===void 0&&(l.status="fulfilled",l.value=b)}},function(b){if(e._status===0||e._status===-1){e._status=2,e._result=b;var _=e._ioInfo;_!=null&&(_.end=performance.now()),l.status===void 0&&(l.status="rejected",l.reason=b)}}),o=e._ioInfo,o!=null){o.value=l;var p=l.displayName;typeof p=="string"&&(o.name=p)}e._status===-1&&(e._status=0,e._result=l)}if(e._status===1)return o=e._result,o===void 0&&console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
2
|
+
|
|
3
|
+
Your code should look like:
|
|
4
|
+
const MyComponent = lazy(() => import('./MyComponent'))
|
|
5
|
+
|
|
6
|
+
Did you accidentally put curly braces around the import?`,o),"default"in o||console.error(`lazy: Expected the result of a dynamic import() call. Instead received: %s
|
|
7
|
+
|
|
8
|
+
Your code should look like:
|
|
9
|
+
const MyComponent = lazy(() => import('./MyComponent'))`,o),o.default;throw e._result}function P(){var e=A.H;return e===null&&console.error(`Invalid hook call. Hooks can only be called inside of the body of a function component. This could happen for one of the following reasons:
|
|
10
|
+
1. You might have mismatching versions of React and the renderer (such as React DOM)
|
|
11
|
+
2. You might be breaking the Rules of Hooks
|
|
12
|
+
3. You might have more than one copy of React in the same app
|
|
13
|
+
See https://react.dev/link/invalid-hook-call for tips about how to debug and fix this problem.`),e}function _e(){A.asyncTransitions--}function F(e){if(Te===null)try{var o=("require"+Math.random()).slice(0,7);Te=(Me&&Me[o]).call(Me,"timers").setImmediate}catch{Te=function(p){ft===!1&&(ft=!0,typeof MessageChannel>"u"&&console.error("This browser does not have a MessageChannel implementation, so enqueuing tasks via await act(async () => ...) will fail. Please file an issue at https://github.com/facebook/react/issues if you encounter this warning."));var b=new MessageChannel;b.port1.onmessage=p,b.port2.postMessage(void 0)}}return Te(e)}function U(e){return 1<e.length&&typeof AggregateError=="function"?new AggregateError(e):e[0]}function Z(e,o){o!==Se-1&&console.error("You seem to have overlapping act() calls, this is not supported. Be sure to await previous act() calls before making a new one. "),Se=o}function K(e,o,l){var p=A.actQueue;if(p!==null)if(p.length!==0)try{J(p),F(function(){return K(e,o,l)});return}catch(b){A.thrownErrors.push(b)}else A.actQueue=null;0<A.thrownErrors.length?(p=U(A.thrownErrors),A.thrownErrors.length=0,l(p)):o(e)}function J(e){if(!He){He=!0;var o=0;try{for(;o<e.length;o++){var l=e[o];do{A.didUsePromise=!1;var p=l(!1);if(p!==null){if(A.didUsePromise){e[o]=l,e.splice(0,o);return}l=p}else break}while(!0)}e.length=0}catch(b){e.splice(0,o+1),A.thrownErrors.push(b)}finally{He=!1}}}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var ee=Symbol.for("react.transitional.element"),be=Symbol.for("react.portal"),te=Symbol.for("react.fragment"),me=Symbol.for("react.strict_mode"),u=Symbol.for("react.profiler"),h=Symbol.for("react.consumer"),C=Symbol.for("react.context"),N=Symbol.for("react.forward_ref"),V=Symbol.for("react.suspense"),ge=Symbol.for("react.suspense_list"),M=Symbol.for("react.memo"),Y=Symbol.for("react.lazy"),re=Symbol.for("react.activity"),xe=Symbol.iterator,et={},tt={isMounted:function(){return!1},enqueueForceUpdate:function(e){c(e,"forceUpdate")},enqueueReplaceState:function(e){c(e,"replaceState")},enqueueSetState:function(e){c(e,"setState")}},rt=Object.assign,We={};Object.freeze(We),d.prototype.isReactComponent={},d.prototype.setState=function(e,o){if(typeof e!="object"&&typeof e!="function"&&e!=null)throw Error("takes an object of state variables to update or a function which returns an object of state variables.");this.updater.enqueueSetState(this,e,o,"setState")},d.prototype.forceUpdate=function(e){this.updater.enqueueForceUpdate(this,e,"forceUpdate")};var D={isMounted:["isMounted","Instead, make sure to clean up subscriptions and pending requests in componentWillUnmount to prevent memory leaks."],replaceState:["replaceState","Refactor your code to use setState instead (see https://github.com/facebook/react/issues/3236)."]};for(ye in D)D.hasOwnProperty(ye)&&r(ye,D[ye]);a.prototype=d.prototype,D=f.prototype=new a,D.constructor=f,rt(D,d.prototype),D.isPureReactComponent=!0;var nt=Array.isArray,jt=Symbol.for("react.client.reference"),A={H:null,A:null,T:null,S:null,actQueue:null,asyncTransitions:0,isBatchingLegacy:!1,didScheduleLegacyUpdate:!1,didUsePromise:!1,thrownErrors:[],getCurrentStack:null,recentlyCreatedOwnerStacks:0},we=Object.prototype.hasOwnProperty,ot=console.createTask?console.createTask:function(){return null};D={react_stack_bottom_frame:function(e){return e()}};var it,at,st={},$t=D.react_stack_bottom_frame.bind(D,m)(),Lt=ot(S(m)),ut=!1,lt=/\/+/g,ct=typeof reportError=="function"?reportError:function(e){if(typeof window=="object"&&typeof window.ErrorEvent=="function"){var o=new window.ErrorEvent("error",{bubbles:!0,cancelable:!0,message:typeof e=="object"&&e!==null&&typeof e.message=="string"?String(e.message):String(e),error:e});if(!window.dispatchEvent(o))return}else if(typeof process=="object"&&typeof process.emit=="function"){process.emit("uncaughtException",e);return}console.error(e)},ft=!1,Te=null,Se=0,ke=!1,He=!1,dt=typeof queueMicrotask=="function"?function(e){queueMicrotask(function(){return queueMicrotask(e)})}:F;D=Object.freeze({__proto__:null,c:function(e){return P().useMemoCache(e)}});var ye={map:X,forEach:function(e,o,l){X(e,function(){o.apply(this,arguments)},l)},count:function(e){var o=0;return X(e,function(){o++}),o},toArray:function(e){return X(e,function(o){return o})||[]},only:function(e){if(!I(e))throw Error("React.Children.only expected to receive a single React element child.");return e}};g.Activity=re,g.Children=ye,g.Component=d,g.Fragment=te,g.Profiler=u,g.PureComponent=f,g.StrictMode=me,g.Suspense=V,g.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE=A,g.__COMPILER_RUNTIME=D,g.act=function(e){var o=A.actQueue,l=Se;Se++;var p=A.actQueue=o!==null?o:[],b=!1;try{var _=e()}catch(x){A.thrownErrors.push(x)}if(0<A.thrownErrors.length)throw Z(o,l),e=U(A.thrownErrors),A.thrownErrors.length=0,e;if(_!==null&&typeof _=="object"&&typeof _.then=="function"){var v=_;return dt(function(){b||ke||(ke=!0,console.error("You called act(async () => ...) without await. This could lead to unexpected testing behaviour, interleaving multiple act calls and mixing their scopes. You should - await act(async () => ...);"))}),{then:function(x,B){b=!0,v.then(function(ne){if(Z(o,l),l===0){try{J(p),F(function(){return K(ne,x,B)})}catch(Yt){A.thrownErrors.push(Yt)}if(0<A.thrownErrors.length){var It=U(A.thrownErrors);A.thrownErrors.length=0,B(It)}}else x(ne)},function(ne){Z(o,l),0<A.thrownErrors.length&&(ne=U(A.thrownErrors),A.thrownErrors.length=0),B(ne)})}}}var R=_;if(Z(o,l),l===0&&(J(p),p.length!==0&&dt(function(){b||ke||(ke=!0,console.error("A component suspended inside an `act` scope, but the `act` call was not awaited. When testing React components that depend on asynchronous data, you must await the result:\n\nawait act(() => ...)"))}),A.actQueue=null),0<A.thrownErrors.length)throw e=U(A.thrownErrors),A.thrownErrors.length=0,e;return{then:function(x,B){b=!0,l===0?(A.actQueue=p,F(function(){return K(R,x,B)})):x(R)}}},g.cache=function(e){return function(){return e.apply(null,arguments)}},g.cacheSignal=function(){return null},g.captureOwnerStack=function(){var e=A.getCurrentStack;return e===null?null:e()},g.cloneElement=function(e,o,l){if(e==null)throw Error("The argument must be a React element, but you passed "+e+".");var p=rt({},e.props),b=e.key,_=e._owner;if(o!=null){var v;e:{if(we.call(o,"ref")&&(v=Object.getOwnPropertyDescriptor(o,"ref").get)&&v.isReactWarning){v=!1;break e}v=o.ref!==void 0}v&&(_=s()),L(o)&&(k(o.key),b=""+o.key);for(R in o)!we.call(o,R)||R==="key"||R==="__self"||R==="__source"||R==="ref"&&o.ref===void 0||(p[R]=o[R])}var R=arguments.length-2;if(R===1)p.children=l;else if(1<R){v=Array(R);for(var x=0;x<R;x++)v[x]=arguments[x+2];p.children=v}for(p=H(e.type,b,p,_,e._debugStack,e._debugTask),b=2;b<arguments.length;b++)T(arguments[b]);return p},g.createContext=function(e){return e={$$typeof:C,_currentValue:e,_currentValue2:e,_threadCount:0,Provider:null,Consumer:null},e.Provider=e,e.Consumer={$$typeof:h,_context:e},e._currentRenderer=null,e._currentRenderer2=null,e},g.createElement=function(e,o,l){for(var p=2;p<arguments.length;p++)T(arguments[p]);p={};var b=null;if(o!=null)for(x in at||!("__self"in o)||"key"in o||(at=!0,console.warn("Your app (or one of its dependencies) is using an outdated JSX transform. Update to the modern JSX transform for faster performance: https://react.dev/link/new-jsx-transform")),L(o)&&(k(o.key),b=""+o.key),o)we.call(o,x)&&x!=="key"&&x!=="__self"&&x!=="__source"&&(p[x]=o[x]);var _=arguments.length-2;if(_===1)p.children=l;else if(1<_){for(var v=Array(_),R=0;R<_;R++)v[R]=arguments[R+2];Object.freeze&&Object.freeze(v),p.children=v}if(e&&e.defaultProps)for(x in _=e.defaultProps,_)p[x]===void 0&&(p[x]=_[x]);b&&Q(p,typeof e=="function"?e.displayName||e.name||"Unknown":e);var x=1e4>A.recentlyCreatedOwnerStacks++;return H(e,b,p,s(),x?Error("react-stack-top-frame"):$t,x?ot(S(e)):Lt)},g.createRef=function(){var e={current:null};return Object.seal(e),e},g.forwardRef=function(e){e!=null&&e.$$typeof===M?console.error("forwardRef requires a render function but received a `memo` component. Instead of forwardRef(memo(...)), use memo(forwardRef(...))."):typeof e!="function"?console.error("forwardRef requires a render function but was given %s.",e===null?"null":typeof e):e.length!==0&&e.length!==2&&console.error("forwardRef render functions accept exactly two parameters: props and ref. %s",e.length===1?"Did you forget to use the ref parameter?":"Any additional parameter will be undefined."),e!=null&&e.defaultProps!=null&&console.error("forwardRef render functions do not support defaultProps. Did you accidentally pass a React component?");var o={$$typeof:N,render:e},l;return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:function(){return l},set:function(p){l=p,e.name||e.displayName||(Object.defineProperty(e,"name",{value:p}),e.displayName=p)}}),o},g.isValidElement=I,g.lazy=function(e){e={_status:-1,_result:e};var o={$$typeof:Y,_payload:e,_init:pe},l={name:"lazy",start:-1,end:-1,value:null,owner:null,debugStack:Error("react-stack-top-frame"),debugTask:console.createTask?console.createTask("lazy()"):null};return e._ioInfo=l,o._debugInfo=[{awaited:l}],o},g.memo=function(e,o){e==null&&console.error("memo: The first argument must be a component. Instead received: %s",e===null?"null":typeof e),o={$$typeof:M,type:e,compare:o===void 0?null:o};var l;return Object.defineProperty(o,"displayName",{enumerable:!1,configurable:!0,get:function(){return l},set:function(p){l=p,e.name||e.displayName||(Object.defineProperty(e,"name",{value:p}),e.displayName=p)}}),o},g.startTransition=function(e){var o=A.T,l={};l._updatedFibers=new Set,A.T=l;try{var p=e(),b=A.S;b!==null&&b(l,p),typeof p=="object"&&p!==null&&typeof p.then=="function"&&(A.asyncTransitions++,p.then(_e,_e),p.then(t,ct))}catch(_){ct(_)}finally{o===null&&l._updatedFibers&&(e=l._updatedFibers.size,l._updatedFibers.clear(),10<e&&console.warn("Detected a large number of updates inside startTransition. If this is due to a subscription please re-write it to use React provided hooks. Otherwise concurrent mode guarantees are off the table.")),o!==null&&l.types!==null&&(o.types!==null&&o.types!==l.types&&console.error("We expected inner Transitions to have transferred the outer types set and that you cannot add to the outer Transition while inside the inner.This is a bug in React."),o.types=l.types),A.T=o}},g.unstable_useCacheRefresh=function(){return P().useCacheRefresh()},g.use=function(e){return P().use(e)},g.useActionState=function(e,o,l){return P().useActionState(e,o,l)},g.useCallback=function(e,o){return P().useCallback(e,o)},g.useContext=function(e){var o=P();return e.$$typeof===h&&console.error("Calling useContext(Context.Consumer) is not supported and will cause bugs. Did you mean to call useContext(Context) instead?"),o.useContext(e)},g.useDebugValue=function(e,o){return P().useDebugValue(e,o)},g.useDeferredValue=function(e,o){return P().useDeferredValue(e,o)},g.useEffect=function(e,o){return e==null&&console.warn("React Hook useEffect requires an effect callback. Did you forget to pass a callback to the hook?"),P().useEffect(e,o)},g.useEffectEvent=function(e){return P().useEffectEvent(e)},g.useId=function(){return P().useId()},g.useImperativeHandle=function(e,o,l){return P().useImperativeHandle(e,o,l)},g.useInsertionEffect=function(e,o){return e==null&&console.warn("React Hook useInsertionEffect requires an effect callback. Did you forget to pass a callback to the hook?"),P().useInsertionEffect(e,o)},g.useLayoutEffect=function(e,o){return e==null&&console.warn("React Hook useLayoutEffect requires an effect callback. Did you forget to pass a callback to the hook?"),P().useLayoutEffect(e,o)},g.useMemo=function(e,o){return P().useMemo(e,o)},g.useOptimistic=function(e,o){return P().useOptimistic(e,o)},g.useReducer=function(e,o,l){return P().useReducer(e,o,l)},g.useRef=function(e){return P().useRef(e)},g.useState=function(e){return P().useState(e)},g.useSyncExternalStore=function(e,o,l){return P().useSyncExternalStore(e,o,l)},g.useTransition=function(){return P().useTransition()},g.version="19.2.5",typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())})()});var Ne=oe((Ar,Qe)=>{"use strict";process.env.NODE_ENV==="production"?Qe.exports=kt():Qe.exports=Rt()});var Ot=oe(je=>{"use strict";var fr=Symbol.for("react.transitional.element"),dr=Symbol.for("react.fragment");function Ct(r,n,c){var d=null;if(c!==void 0&&(d=""+c),n.key!==void 0&&(d=""+n.key),"key"in n){c={};for(var a in n)a!=="key"&&(c[a]=n[a])}else c=n;return n=c.ref,{$$typeof:fr,type:r,key:d,ref:n!==void 0?n:null,props:c}}je.Fragment=dr;je.jsx=Ct;je.jsxs=Ct});var Pt=oe($e=>{"use strict";process.env.NODE_ENV!=="production"&&(function(){function r(u){if(u==null)return null;if(typeof u=="function")return u.$$typeof===_e?null:u.displayName||u.name||null;if(typeof u=="string")return u;switch(u){case H:return"Fragment";case T:return"Profiler";case Ee:return"StrictMode";case De:return"Suspense";case q:return"SuspenseList";case P:return"Activity"}if(typeof u=="object")switch(typeof u.tag=="number"&&console.error("Received an unexpected object in getComponentNameFromType(). This is likely a bug in React. Please file an issue."),u.$$typeof){case fe:return"Portal";case z:return u.displayName||"Context";case I:return(u._context.displayName||"Context")+".Consumer";case de:var h=u.render;return u=u.displayName,u||(u=h.displayName||h.name||"",u=u!==""?"ForwardRef("+u+")":"ForwardRef"),u;case X:return h=u.displayName||null,h!==null?h:r(u.type)||"Memo";case pe:h=u._payload,u=u._init;try{return r(u(h))}catch{}}return null}function n(u){return""+u}function c(u){try{n(u);var h=!1}catch{h=!0}if(h){h=console;var C=h.error,N=typeof Symbol=="function"&&Symbol.toStringTag&&u[Symbol.toStringTag]||u.constructor.name||"Object";return C.call(h,"The provided key is an unsupported type %s. This value must be coerced to a string before using it here.",N),n(u)}}function d(u){if(u===H)return"<>";if(typeof u=="object"&&u!==null&&u.$$typeof===pe)return"<...>";try{var h=r(u);return h?"<"+h+">":"<...>"}catch{return"<...>"}}function a(){var u=F.A;return u===null?null:u.getOwner()}function f(){return Error("react-stack-top-frame")}function t(u){if(U.call(u,"key")){var h=Object.getOwnPropertyDescriptor(u,"key").get;if(h&&h.isReactWarning)return!1}return u.key!==void 0}function i(u,h){function C(){J||(J=!0,console.error("%s: `key` is not a prop. Trying to access it will result in `undefined` being returned. If you need to access the same value within the child component, you should pass it as a different prop. (https://react.dev/link/special-props)",h))}C.isReactWarning=!0,Object.defineProperty(u,"key",{get:C,configurable:!0})}function k(){var u=r(this.type);return ee[u]||(ee[u]=!0,console.error("Accessing element.ref was removed in React 19. ref is now a regular prop. It will be removed from the JSX Element type in a future release.")),u=this.props.ref,u!==void 0?u:null}function w(u,h,C,N,V,ge){var M=C.ref;return u={$$typeof:Q,type:u,key:h,props:C,_owner:N},(M!==void 0?M:null)!==null?Object.defineProperty(u,"ref",{enumerable:!1,get:k}):Object.defineProperty(u,"ref",{enumerable:!1,value:null}),u._store={},Object.defineProperty(u._store,"validated",{configurable:!1,enumerable:!1,writable:!0,value:0}),Object.defineProperty(u,"_debugInfo",{configurable:!1,enumerable:!1,writable:!0,value:null}),Object.defineProperty(u,"_debugStack",{configurable:!1,enumerable:!1,writable:!0,value:V}),Object.defineProperty(u,"_debugTask",{configurable:!1,enumerable:!1,writable:!0,value:ge}),Object.freeze&&(Object.freeze(u.props),Object.freeze(u)),u}function S(u,h,C,N,V,ge){var M=h.children;if(M!==void 0)if(N)if(Z(M)){for(N=0;N<M.length;N++)s(M[N]);Object.freeze&&Object.freeze(M)}else console.error("React.jsx: Static children should always be an array. You are likely explicitly calling React.jsxs or React.jsxDEV. Use the Babel transform instead.");else s(M);if(U.call(h,"key")){M=r(u);var Y=Object.keys(h).filter(function(xe){return xe!=="key"});N=0<Y.length?"{key: someKey, "+Y.join(": ..., ")+": ...}":"{key: someKey}",me[M+N]||(Y=0<Y.length?"{"+Y.join(": ..., ")+": ...}":"{}",console.error(`A props object containing a "key" prop is being spread into JSX:
|
|
14
|
+
let props = %s;
|
|
15
|
+
<%s {...props} />
|
|
16
|
+
React keys must be passed directly to JSX without using spread:
|
|
17
|
+
let props = %s;
|
|
18
|
+
<%s key={someKey} {...props} />`,N,M,Y,M),me[M+N]=!0)}if(M=null,C!==void 0&&(c(C),M=""+C),t(h)&&(c(h.key),M=""+h.key),"key"in h){C={};for(var re in h)re!=="key"&&(C[re]=h[re])}else C=h;return M&&i(C,typeof u=="function"?u.displayName||u.name||"Unknown":u),w(u,M,C,a(),V,ge)}function s(u){m(u)?u._store&&(u._store.validated=1):typeof u=="object"&&u!==null&&u.$$typeof===pe&&(u._payload.status==="fulfilled"?m(u._payload.value)&&u._payload.value._store&&(u._payload.value._store.validated=1):u._store&&(u._store.validated=1))}function m(u){return typeof u=="object"&&u!==null&&u.$$typeof===Q}var L=Ne(),Q=Symbol.for("react.transitional.element"),fe=Symbol.for("react.portal"),H=Symbol.for("react.fragment"),Ee=Symbol.for("react.strict_mode"),T=Symbol.for("react.profiler"),I=Symbol.for("react.consumer"),z=Symbol.for("react.context"),de=Symbol.for("react.forward_ref"),De=Symbol.for("react.suspense"),q=Symbol.for("react.suspense_list"),X=Symbol.for("react.memo"),pe=Symbol.for("react.lazy"),P=Symbol.for("react.activity"),_e=Symbol.for("react.client.reference"),F=L.__CLIENT_INTERNALS_DO_NOT_USE_OR_WARN_USERS_THEY_CANNOT_UPGRADE,U=Object.prototype.hasOwnProperty,Z=Array.isArray,K=console.createTask?console.createTask:function(){return null};L={react_stack_bottom_frame:function(u){return u()}};var J,ee={},be=L.react_stack_bottom_frame.bind(L,f)(),te=K(d(f)),me={};$e.Fragment=H,$e.jsx=function(u,h,C){var N=1e4>F.recentlyCreatedOwnerStacks++;return S(u,h,C,!1,N?Error("react-stack-top-frame"):be,N?K(d(u)):te)},$e.jsxs=function(u,h,C){var N=1e4>F.recentlyCreatedOwnerStacks++;return S(u,h,C,!0,N?Error("react-stack-top-frame"):be,N?K(d(u)):te)}})()});var he=oe((xr,Xe)=>{"use strict";process.env.NODE_ENV==="production"?Xe.exports=Ot():Xe.exports=Pt()});var gr={};Ft(gr,{Runtime:()=>G,YuktAI:()=>mr,YuktAIWrapper:()=>Ye,aiPlugin:()=>ve,default:()=>Ye,voicePlugin:()=>Ae,wcag:()=>j,wcagPlugin:()=>j});var ae=null,Ce=null,Oe={deuteranopia:"yuktai-cb-d",protanopia:"yuktai-cb-p",tritanopia:"yuktai-cb-t"},bt=new Set(["h1","h2","h3","h4","h5","h6"]),mt=new Set(["input","select","textarea"]),gt=new Set(["button","a","input","select","textarea","details","summary"]),Bt=new Set(["video","audio"]),Gt=new Set(["ul","ol","dl"]);var Kt=new Set(["span","strong","em","b","i","u","s","small","mark","del","ins","sub","sup","abbr","cite","code","kbd","samp","var","time","q"]),ze={nav:"navigation",header:"banner",footer:"contentinfo",main:"main",aside:"complementary"},j={name:"yuktai-a11y",version:"1.0.0",observer:null,async execute(r){if(!r.enabled)return this.stopObserver(),"yuktai-a11y: disabled.";let n=this.applyFixes(r);return r.autoFix&&this.startObserver(r),`yuktai-a11y: ${n.fixed} fixes applied across ${n.scanned} nodes in ${n.renderTime}ms.`},scan(){let r={fixed:0,scanned:0,renderTime:0,details:[]};if(typeof document>"u")return r;let n=performance.now(),c=document.querySelectorAll("*");r.scanned=c.length;let d=(a,f,t,i)=>r.details.push({tag:a,fix:f,severity:t,element:i.outerHTML.slice(0,100)});return c.forEach(a=>{let f=a,t=f.tagName.toLowerCase();(t==="a"||t==="button")&&!f.innerText?.trim()&&!f.getAttribute("aria-label")&&d(t,"needs aria-label (empty)","critical",f),t==="img"&&!f.hasAttribute("alt")&&d(t,"needs alt text","serious",f),mt.has(t)&&!f.getAttribute("aria-label")&&!f.getAttribute("aria-labelledby")&&d(t,"needs aria-label","serious",f),t==="iframe"&&!f.getAttribute("title")&&!f.getAttribute("aria-label")&&d(t,"iframe needs title","serious",f),Bt.has(t)&&!a.querySelector("track")&&!f.getAttribute("aria-label")&&d(t,"media needs captions/aria-label","serious",f),bt.has(t)&&!f.innerText?.trim()&&!f.getAttribute("aria-label")&&d(t,"empty heading","moderate",f)}),r.fixed=r.details.length,r.renderTime=parseFloat((performance.now()-n).toFixed(2)),r},applyFixes(r){let n={fixed:0,scanned:0,renderTime:0,details:[]};if(typeof document>"u")return n;let c=performance.now(),d=document.querySelectorAll("*");n.scanned=d.length;let a=(f,t,i,k)=>{n.details.push({tag:f,fix:t,severity:i,element:k.outerHTML.slice(0,100)}),n.fixed++};if(d.forEach(f=>{let t=f,i=t.tagName.toLowerCase();if(i==="html"&&!t.getAttribute("lang")&&(t.setAttribute("lang","en"),a(i,'lang="en" added to <html>',"critical",t)),i==="head"&&!document.title&&(document.title=document.querySelector("h1")?.innerText?.trim()||"Page",a(i,`document.title set to "${document.title}"`,"serious",t)),i==="meta"){let s=t.getAttribute("name"),m=t.getAttribute("content")||"";s==="viewport"&&m.includes("user-scalable=no")&&(t.setAttribute("content",m.replace("user-scalable=no","user-scalable=yes")),a(i,"user-scalable=yes restored","serious",t)),s==="viewport"&&/maximum-scale=1(?:[^0-9]|$)/.test(m)&&(t.setAttribute("content",m.replace(/maximum-scale=1(?=[^0-9]|$)/,"maximum-scale=5")),a(i,"maximum-scale=5 restored","serious",t))}if(i==="body"&&!document.querySelector("[data-yuktai-skip]")){let s=document.createElement("a");s.setAttribute("href","#main-content"),s.setAttribute("data-yuktai-skip","true"),s.setAttribute("aria-label","Skip to main content"),s.textContent="Skip to main content",s.style.cssText="position:fixed;top:-40px;left:0;background:#0d9488;color:#fff;padding:8px 16px;z-index:99999;font-family:system-ui;font-size:14px;border-radius:0 0 4px 0;text-decoration:none;transition:top 0.2s;",s.addEventListener("focus",()=>{s.style.top="0"}),s.addEventListener("blur",()=>{s.style.top="-40px"}),t.insertBefore(s,t.firstChild),a(i,"skip-to-content link injected","minor",t);let m=document.querySelector("main,[role='main']");m&&!m.getAttribute("tabindex")&&m.setAttribute("tabindex","-1")}if(bt.has(i)&&(!t.innerText?.trim()&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label",`${i.toUpperCase()} section`),a(i,`aria-label="${i.toUpperCase()} section" (empty heading)`,"moderate",t)),t.hasAttribute("onclick")&&!t.getAttribute("tabindex")&&(t.setAttribute("tabindex","0"),t.onkeydown||(t.onkeydown=s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t.click())}),a(i,"tabindex=0 + keydown (clickable heading)","minor",t))),i==="p"&&t.getAttribute("dir")==="rtl"&&!t.getAttribute("lang")&&!document.documentElement.getAttribute("lang")&&(t.setAttribute("lang","ar"),a(i,'lang="ar" (rtl paragraph)',"moderate",t)),i==="img"&&(t.hasAttribute("alt")||(t.setAttribute("alt",""),t.setAttribute("aria-hidden","true"),a(i,'alt="" aria-hidden="true"',"serious",t)),t.getAttribute("role")==="presentation"&&t.getAttribute("alt")!==""&&(t.setAttribute("alt",""),a(i,'alt="" (role=presentation)',"minor",t))),i==="area"&&!t.getAttribute("alt")){let s=t.getAttribute("title")||t.getAttribute("href")||"map area";t.setAttribute("alt",s),a(i,`alt="${s}" on <area>`,"serious",t)}if(i==="svg"){if(!t.getAttribute("aria-hidden")&&!t.getAttribute("aria-label")&&!f.querySelector("title"))if(!t.getAttribute("role")||t.getAttribute("role")==="img"){let s=document.createElementNS("http://www.w3.org/2000/svg","title");s.textContent="graphic",t.prepend(s),t.setAttribute("role","img"),a(i,'role="img" + <title> injected',"moderate",t)}else t.setAttribute("aria-hidden","true"),a(i,'aria-hidden="true" (decorative svg)',"minor",t);t.getAttribute("focusable")||t.setAttribute("focusable","false")}if(i==="canvas"&&(t.getAttribute("role")||(t.setAttribute("role","img"),a(i,'role="img"',"serious",t)),t.getAttribute("aria-label")||(t.setAttribute("aria-label",t.getAttribute("title")||"canvas graphic"),a(i,"aria-label added to canvas","serious",t))),(i==="object"||i==="embed")&&!t.getAttribute("aria-label")&&!t.getAttribute("title")&&(t.setAttribute("aria-label",`embedded ${i} content`),a(i,`aria-label added to <${i}>`,"moderate",t)),i==="video"&&!f.querySelector("track")&&!t.getAttribute("aria-label")&&(t.setAttribute("aria-label",t.getAttribute("title")||"video player"),a(i,"aria-label added (no captions track)","serious",t)),i==="audio"&&!f.querySelector("track")&&!t.getAttribute("aria-label")&&(t.setAttribute("aria-label",t.getAttribute("title")||"audio player"),a(i,"aria-label added to audio","serious",t)),i==="iframe"&&!t.getAttribute("title")&&!t.getAttribute("aria-label")&&(t.setAttribute("title","embedded content"),t.setAttribute("aria-label","embedded content"),a(i,'title + aria-label="embedded content"',"serious",t)),i==="figure"&&!f.querySelector("figcaption")&&!t.getAttribute("aria-label")){let m=f.querySelector("img")?.getAttribute("alt");m&&(t.setAttribute("aria-label",m),a(i,"aria-label from inner img alt","minor",t))}if(i==="button"){if(!t.innerText?.trim()&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")){let s=t.getAttribute("title")||t.getAttribute("data-label")||"button";t.setAttribute("aria-label",s),a(i,`aria-label="${s}" (empty button)`,"critical",t)}t.hasAttribute("disabled")&&!t.getAttribute("aria-disabled")&&(t.setAttribute("aria-disabled","true"),n.fixed++)}if(i==="a"){let s=t;if(!t.innerText?.trim()&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")){let m=t.getAttribute("title")||"link";t.setAttribute("aria-label",m),a(i,`aria-label="${m}" (empty link)`,"critical",t)}if(s.target==="_blank"){s.rel?.includes("noopener")||(s.rel="noopener noreferrer",n.fixed++);let m=s.getAttribute("aria-label")||s.innerText?.trim()||"link";m.includes("opens in new window")||(s.setAttribute("aria-label",`${m} (opens in new window)`),a(i,"aria-label: new-window warning","moderate",t))}!s.href&&!s.getAttribute("role")&&!s.getAttribute("tabindex")&&(s.setAttribute("role","button"),s.setAttribute("tabindex","0"),a(i,'role="button" tabindex=0 (href-less link)',"serious",t))}if((t.hasAttribute("onclick")||typeof window<"u"&&window.getComputedStyle(t).cursor==="pointer")&&!gt.has(i)&&(t.getAttribute("role")||(t.setAttribute("role","button"),a(i,'role="button" (clickable non-interactive)',"serious",t)),t.tabIndex<0&&(t.tabIndex=0,n.fixed++),t.onkeydown||(t.onkeydown=s=>{(s.key==="Enter"||s.key===" ")&&(s.preventDefault(),t.click())})),mt.has(i)){let s=t;if(!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")){let m=t.getAttribute("placeholder")||t.getAttribute("name")||t.getAttribute("title")||i;t.setAttribute("aria-label",m),a(i,`aria-label="${m}"`,"serious",t)}if(t.hasAttribute("required")&&!t.getAttribute("aria-required")&&(t.setAttribute("aria-required","true"),n.fixed++),t.hasAttribute("disabled")&&!t.getAttribute("aria-disabled")&&(t.setAttribute("aria-disabled","true"),n.fixed++),t.hasAttribute("readonly")&&!t.getAttribute("aria-readonly")&&(t.setAttribute("aria-readonly","true"),n.fixed++),i==="input"&&!s.autocomplete){let m=s.name||"";s.type==="email"||m.includes("email")?(s.autocomplete="email",n.fixed++):s.type==="tel"||m.includes("tel")?(s.autocomplete="tel",n.fixed++):s.type==="password"?(s.autocomplete="current-password",n.fixed++):m.includes("firstname")||m.includes("fname")?(s.autocomplete="given-name",n.fixed++):m.includes("lastname")||m.includes("lname")?(s.autocomplete="family-name",n.fixed++):m==="name"||m.includes("fullname")?(s.autocomplete="name",n.fixed++):m.includes("zip")||m.includes("postal")?(s.autocomplete="postal-code",n.fixed++):m.includes("city")?(s.autocomplete="address-level2",n.fixed++):m.includes("country")&&(s.autocomplete="country",n.fixed++)}i==="input"&&s.type==="image"&&!t.getAttribute("alt")&&(t.setAttribute("alt",t.getAttribute("value")||"submit"),a(i,"alt added to input[type=image]","serious",t)),i==="input"&&s.type==="range"&&(t.getAttribute("aria-valuemin")||t.setAttribute("aria-valuemin",s.min||"0"),t.getAttribute("aria-valuemax")||t.setAttribute("aria-valuemax",s.max||"100"),t.getAttribute("aria-valuenow")||t.setAttribute("aria-valuenow",s.value||"50"),n.fixed++)}if(i==="fieldset"&&!f.querySelector("legend")&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label","form group"),a(i,'aria-label="form group" (no legend)',"moderate",t)),i==="label"){let s=t.getAttribute("for"),m=f.querySelector("input,select,textarea");!s&&!m&&!t.getAttribute("aria-label")&&a(i,"label not associated with any control","moderate",t)}if(i==="table"&&(!f.querySelector("th")&&!t.getAttribute("role")&&(t.setAttribute("role","grid"),a(i,'role="grid" (no <th>)',"serious",t)),!f.querySelector("caption")&&!t.getAttribute("aria-label")&&!t.getAttribute("summary")&&(t.setAttribute("aria-label","data table"),a(i,'aria-label="data table" (no caption)',"moderate",t))),i==="th"&&!t.getAttribute("scope")){let s=t.closest("thead")!==null;t.setAttribute("scope",s?"col":"row"),a(i,`scope="${s?"col":"row"}"`,"moderate",t)}if(Gt.has(i)&&(t.getAttribute("role")==="presentation"&&(f.querySelectorAll("li").forEach(s=>{s.getAttribute("role")||s.setAttribute("role","presentation")}),n.fixed++),(i==="ul"||i==="ol")&&!t.getAttribute("aria-label"))){let s=t.closest("nav");s&&(t.setAttribute("aria-label",s.getAttribute("aria-label")||"navigation list"),a(i,"aria-label from parent nav","minor",t))}if(i==="dt"&&!t.getAttribute("aria-label")){let s=t.nextElementSibling;(!s||s.tagName.toLowerCase()!=="dd")&&(t.setAttribute("aria-label",t.innerText?.trim()||"term"),a(i,"aria-label on <dt> (no following <dd>)","minor",t))}if(ze[i]&&!t.getAttribute("role")&&(t.setAttribute("role",ze[i]),a(i,`role="${ze[i]}"`,"minor",t)),["nav","section","article","aside"].includes(i)){let s=f.parentElement?.querySelectorAll(i);if(s&&s.length>1&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")){let L=f.querySelector("h1,h2,h3,h4,h5,h6")?.textContent?.trim();L&&(t.setAttribute("aria-label",L),a(i,"aria-label from inner heading","moderate",t))}}if(i==="details"&&!f.querySelector("summary")){let s=document.createElement("summary");s.textContent=t.getAttribute("aria-label")||"More details",t.prepend(s),a(i,"<summary> injected","moderate",t)}if(i==="summary"&&!t.innerText?.trim()&&!t.getAttribute("aria-label")&&(t.setAttribute("aria-label","Toggle details"),a(i,'aria-label="Toggle details" (empty summary)',"moderate",t)),i==="dialog"){let s=t.getAttribute("role");if(s&&s!=="dialog"&&(t.setAttribute("role","dialog"),a(i,'role corrected to "dialog"',"serious",t)),!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")){let L=f.querySelector("h1,h2,h3,h4,h5,h6")?.textContent?.trim()||"dialog";t.setAttribute("aria-label",L),a(i,"aria-label added to dialog","serious",t)}}if(i==="abbr"&&!t.getAttribute("title")&&(t.setAttribute("title",t.innerText?.trim()||"abbreviation"),a(i,"title added to <abbr>","minor",t)),i==="time"&&!t.getAttribute("datetime")&&t.innerText?.trim()&&(t.setAttribute("datetime",t.innerText.trim()),a(i,`datetime="${t.innerText.trim()}" added`,"minor",t)),i==="mark"&&!t.getAttribute("aria-label")&&(t.setAttribute("aria-label",`highlighted: ${t.innerText?.trim()?.slice(0,60)}`),a(i,"aria-label added to <mark>","minor",t)),i==="meter"&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label",t.getAttribute("title")||"meter"),a(i,"aria-label added to <meter>","moderate",t)),i==="progress"){!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label",t.getAttribute("title")||"progress"),a(i,"aria-label added to <progress>","moderate",t));let s=t;t.getAttribute("aria-valuenow")||t.setAttribute("aria-valuenow",String(s.value)),t.getAttribute("aria-valuemax")||t.setAttribute("aria-valuemax",String(s.max||1)),n.fixed++}let w=t.getAttribute("role")||"";if(w==="tab"&&!t.getAttribute("aria-selected")&&(t.setAttribute("aria-selected","false"),n.fixed++),w==="tabpanel"&&(!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label","tab panel"),a(i,'aria-label="tab panel"',"moderate",t)),t.getAttribute("tabindex")||(t.setAttribute("tabindex","0"),n.fixed++)),["alert","status","log","marquee"].includes(w)){if(!t.getAttribute("aria-live")){let s=w==="alert"?"assertive":"polite";t.setAttribute("aria-live",s),a(i,`aria-live="${s}" on role=${w}`,"moderate",t)}t.getAttribute("aria-atomic")||(t.setAttribute("aria-atomic","true"),n.fixed++)}w==="tooltip"&&!t.getAttribute("aria-live")&&(t.setAttribute("aria-live","polite"),n.fixed++),(w==="menu"||w==="menubar")&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label","menu"),a(i,'aria-label="menu"',"moderate",t)),w==="menuitem"&&t.tabIndex<0&&(t.tabIndex=-1,n.fixed++),w==="listbox"&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label","listbox"),a(i,'aria-label="listbox"',"moderate",t)),w==="option"&&!t.getAttribute("aria-selected")&&(t.setAttribute("aria-selected","false"),n.fixed++),w==="slider"&&(t.getAttribute("aria-valuemin")||t.setAttribute("aria-valuemin","0"),t.getAttribute("aria-valuemax")||t.setAttribute("aria-valuemax","100"),t.getAttribute("aria-valuenow")||t.setAttribute("aria-valuenow","50"),n.fixed++),(w==="checkbox"||w==="radio")&&!t.getAttribute("aria-checked")&&(t.setAttribute("aria-checked","false"),a(i,`aria-checked="false" on role=${w}`,"serious",t)),w==="combobox"&&(t.getAttribute("aria-expanded")||(t.setAttribute("aria-expanded","false"),a(i,'aria-expanded="false" on combobox',"serious",t)),t.getAttribute("aria-haspopup")||(t.setAttribute("aria-haspopup","listbox"),n.fixed++)),(w==="grid"||w==="treegrid")&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label","data grid"),a(i,'aria-label="data grid"',"moderate",t)),w==="tree"&&!t.getAttribute("aria-label")&&!t.getAttribute("aria-labelledby")&&(t.setAttribute("aria-label","tree"),a(i,'aria-label="tree"',"moderate",t)),w==="treeitem"&&f.querySelector('[role="group"]')&&!t.getAttribute("aria-expanded")&&(t.setAttribute("aria-expanded","false"),n.fixed++),w==="spinbutton"&&(t.getAttribute("aria-valuenow")||t.setAttribute("aria-valuenow","0"),t.getAttribute("aria-valuemin")||t.setAttribute("aria-valuemin","0"),t.getAttribute("aria-valuemax")||t.setAttribute("aria-valuemax","100"),n.fixed++);let S=!["html","head","meta","script","style","link","noscript"].includes(i);if(r.highContrast&&S&&!Kt.has(i)&&(t.style.filter="contrast(1.15) brightness(1.05)"),r.reduceMotion&&S&&(t.style.transition="none",t.style.animation="none"),r.fontSizeMultiplier&&r.fontSizeMultiplier!==1&&S){let s=parseFloat(window.getComputedStyle(t).fontSize);!isNaN(s)&&s>0&&(t.style.fontSize=`${s*r.fontSizeMultiplier}px`)}if(r.colorBlindMode&&r.colorBlindMode!=="none"&&i==="body"){let s=r.colorBlindMode==="achromatopsia"?"grayscale(100%)":`url(#${Oe[r.colorBlindMode]})`;t.style.filter=s}r.keyboardHints&&(gt.has(i)||t.tabIndex>=0)&&(t.style.outline="2px solid #007acc",t.style.outlineOffset="2px")}),r.colorBlindMode&&r.colorBlindMode!=="none"&&!Ce){let f=document.createElementNS("http://www.w3.org/2000/svg","svg");f.setAttribute("aria-hidden","true"),f.style.cssText="position:absolute;width:0;height:0;overflow:hidden;",f.innerHTML=`
|
|
19
|
+
<defs>
|
|
20
|
+
<filter id="${Oe.deuteranopia}">
|
|
21
|
+
<feColorMatrix type="matrix" values="0.625 0.375 0 0 0 0.7 0.3 0 0 0 0 0.3 0.7 0 0 0 0 0 1 0"/>
|
|
22
|
+
</filter>
|
|
23
|
+
<filter id="${Oe.protanopia}">
|
|
24
|
+
<feColorMatrix type="matrix" values="0.567 0.433 0 0 0 0.558 0.442 0 0 0 0 0.242 0.758 0 0 0 0 0 1 0"/>
|
|
25
|
+
</filter>
|
|
26
|
+
<filter id="${Oe.tritanopia}">
|
|
27
|
+
<feColorMatrix type="matrix" values="0.95 0.05 0 0 0 0 0.433 0.567 0 0 0 0.475 0.525 0 0 0 0 0 1 0"/>
|
|
28
|
+
</filter>
|
|
29
|
+
</defs>`,document.body.appendChild(f),Ce=f}return this.ensureLiveRegion(),n.renderTime=parseFloat((performance.now()-c).toFixed(2)),n},removeColorBlindSvg(){Ce?.remove(),Ce=null},startObserver(r){this.observer||typeof document>"u"||(this.observer=new MutationObserver(()=>this.applyFixes(r)),this.observer.observe(document.body,{childList:!0,subtree:!0,attributes:!1}))},stopObserver(){this.observer?.disconnect(),this.observer=null},ensureLiveRegion(){if(typeof document>"u"||ae)return;let r=document.createElement("div");r.setAttribute("aria-live","polite"),r.setAttribute("aria-atomic","true"),r.style.cssText="position:absolute;left:-9999px;width:1px;height:1px;overflow:hidden;",document.body.appendChild(r),ae=r},removeLiveRegion(){ae?.remove(),ae=null},announce(r){ae&&(ae.textContent=r)}};var $=ie(Ne(),1);var Le=ie(Ne(),1),E=ie(he(),1),Ze={highContrast:!1,reduceMotion:!1,autoFix:!0,dyslexiaFont:!1,fontScale:100},le=[80,90,100,110,120,130,140,150],Mt=[{id:"highContrast",label:"High contrast",description:"contrast(1.15) brightness on all nodes",icon:"\u25D1"},{id:"reduceMotion",label:"Reduce motion",description:"Disables all transitions & animations",icon:"\u23F8"},{id:"autoFix",label:"Auto-fix ARIA",description:"MutationObserver on new DOM nodes",icon:"\u267F"},{id:"dyslexiaFont",label:"Dyslexia-friendly font",description:"Wider letter & word spacing",icon:"Aa"}];function pr({checked:r,onChange:n,label:c}){return(0,E.jsxs)("label",{"aria-label":c,style:{position:"relative",display:"inline-flex",width:40,height:24,cursor:"pointer",flexShrink:0},children:[(0,E.jsx)("input",{type:"checkbox",checked:r,onChange:d=>n(d.target.checked),style:{opacity:0,width:0,height:0,position:"absolute"}}),(0,E.jsx)("span",{style:{position:"absolute",inset:0,borderRadius:99,background:r?"#0d9488":"#cbd5e1",transition:"background 0.2s"}}),(0,E.jsx)("span",{style:{position:"absolute",top:3,left:r?19:3,width:18,height:18,background:"#fff",borderRadius:"50%",transition:"left 0.2s",boxShadow:"0 1px 3px rgba(0,0,0,0.2)",pointerEvents:"none"}})]})}var Je=(0,Le.forwardRef)(({position:r,settings:n,report:c,isActive:d,set:a,onApply:f,onReset:t,onClose:i},k)=>(0,E.jsxs)("div",{ref:k,role:"dialog","aria-modal":"true","aria-label":"yuktai-a11y accessibility options",style:{position:"fixed",bottom:24,...r==="left"?{left:88}:{right:88},width:312,background:"#fff",border:"1px solid #e2e8f0",borderRadius:16,boxShadow:"0 8px 32px rgba(0,0,0,0.12)",zIndex:9998,overflow:"hidden",fontFamily:"system-ui,-apple-system,sans-serif"},children:[(0,E.jsxs)("div",{style:{padding:"14px 18px 12px",borderBottom:"1px solid #f1f5f9",display:"flex",alignItems:"flex-start",justifyContent:"space-between"},children:[(0,E.jsxs)("div",{children:[(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:7,marginBottom:5},children:[(0,E.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 7px",borderRadius:99,background:"#f0fdfa",color:"#0d9488",letterSpacing:"0.05em",fontFamily:"monospace"},children:"@yuktishaalaa/yuktai v1.0.0"}),d&&(0,E.jsx)("span",{style:{fontSize:10,fontWeight:700,padding:"2px 7px",borderRadius:99,background:"#f0fdfa",color:"#0f766e",border:"1px solid #99f6e4"},children:"\u25CF ACTIVE"})]}),(0,E.jsx)("p",{style:{margin:"0 0 2px",fontSize:15,fontWeight:600,color:"#0f172a"},children:"Accessibility"}),(0,E.jsx)("p",{style:{margin:0,fontSize:12,color:"#64748b"},children:"Zero-config WCAG fixes \xB7 Open Source"})]}),(0,E.jsx)("button",{onClick:i,"aria-label":"Close panel",style:{background:"none",border:"none",cursor:"pointer",padding:4,color:"#94a3b8",fontSize:18,lineHeight:1,borderRadius:6},children:"\xD7"})]}),(0,E.jsx)("div",{style:{padding:"6px 0"},children:Mt.map((S,s)=>(0,E.jsxs)(Le.default.Fragment,{children:[(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",padding:"10px 18px",gap:12},children:[(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:10,flex:1},children:[(0,E.jsx)("span",{"aria-hidden":"true",style:{width:30,height:30,borderRadius:8,background:"#f0fdfa",color:"#0d9488",display:"flex",alignItems:"center",justifyContent:"center",fontSize:13,flexShrink:0,fontWeight:700},children:S.icon}),(0,E.jsxs)("div",{children:[(0,E.jsx)("p",{style:{margin:0,fontSize:13,fontWeight:500,color:"#0f172a"},children:S.label}),(0,E.jsx)("p",{style:{margin:0,fontSize:11,color:"#94a3b8"},children:S.description})]})]}),(0,E.jsx)(pr,{checked:n[S.id],onChange:m=>a(S.id,m),label:`Toggle ${S.label}`})]}),s<Mt.length-1&&(0,E.jsx)("div",{style:{height:1,background:"#f8fafc",margin:"0 18px"}})]},S.id))}),(0,E.jsxs)("div",{style:{padding:"10px 18px 14px",borderTop:"1px solid #f1f5f9"},children:[(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",justifyContent:"space-between",marginBottom:10},children:[(0,E.jsx)("p",{style:{margin:0,fontSize:13,fontWeight:500,color:"#0f172a"},children:"Text size"}),(0,E.jsxs)("span",{style:{fontSize:12,fontWeight:600,color:"#0d9488",background:"#f0fdfa",padding:"2px 8px",borderRadius:99},children:[n.fontScale,"%"]})]}),(0,E.jsxs)("div",{style:{display:"flex",alignItems:"center",gap:8},children:[(0,E.jsx)("button",{onClick:()=>{let S=le.indexOf(n.fontScale);S>0&&a("fontScale",le[S-1])},disabled:n.fontScale<=80,"aria-label":"Decrease text size",style:{width:30,height:30,borderRadius:8,border:"1px solid #e2e8f0",background:"#fff",cursor:n.fontScale<=80?"not-allowed":"pointer",fontSize:16,color:n.fontScale<=80?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"\u2212"}),(0,E.jsx)("div",{style:{flex:1,display:"flex",gap:3},children:le.map(S=>(0,E.jsx)("button",{onClick:()=>a("fontScale",S),"aria-label":`Set text size to ${S}%`,style:{flex:1,height:6,borderRadius:99,border:"none",cursor:"pointer",padding:0,background:S<=n.fontScale?"#0d9488":"#e2e8f0",transition:"background 0.15s"}},S))}),(0,E.jsx)("button",{onClick:()=>{let S=le.indexOf(n.fontScale);S<le.length-1&&a("fontScale",le[S+1])},disabled:n.fontScale>=150,"aria-label":"Increase text size",style:{width:30,height:30,borderRadius:8,border:"1px solid #e2e8f0",background:"#fff",cursor:n.fontScale>=150?"not-allowed":"pointer",fontSize:16,color:n.fontScale>=150?"#cbd5e1":"#0f172a",display:"flex",alignItems:"center",justifyContent:"center",flexShrink:0},children:"+"})]})]}),c&&(0,E.jsx)("div",{role:"status",style:{margin:"0 14px",padding:"8px 12px",background:"#f0fdfa",border:"1px solid #99f6e4",borderRadius:8,fontSize:12,color:"#0f766e",fontWeight:500,fontFamily:"monospace"},children:c.fixed>0?`\u2713 ${c.fixed} fixes applied \xB7 ${c.scanned} nodes \xB7 ${c.renderTime}ms`:`\u2713 0 fixes needed \xB7 ${c.scanned} nodes clean \xB7 ${c.renderTime}ms`}),(0,E.jsxs)("div",{style:{display:"flex",gap:8,padding:"12px 14px 14px"},children:[(0,E.jsx)("button",{onClick:t,style:{flex:1,padding:"8px 0",fontSize:13,fontWeight:500,borderRadius:9,border:"1px solid #e2e8f0",background:"#fff",color:"#64748b",cursor:"pointer"},children:"Reset"}),(0,E.jsx)("button",{onClick:f,style:{flex:2,padding:"8px 0",fontSize:13,fontWeight:600,borderRadius:9,border:"none",background:"#0d9488",color:"#fff",cursor:"pointer"},children:"Apply settings"})]})]}));Je.displayName="WidgetPanel";var W=ie(he(),1),Ie=null,ce=null;function Ye({children:r,position:n="left"}){let[c,d]=(0,$.useState)(!1),[a,f]=(0,$.useState)(!1),[t,i]=(0,$.useState)(Ze),[k,w]=(0,$.useState)(null),[S,s]=(0,$.useState)(!1),m=(0,$.useRef)(null),L=(0,$.useRef)(null);(0,$.useEffect)(()=>d(!0),[]),(0,$.useEffect)(()=>{if(Ie)return;let T=document.createElement("style");return T.innerHTML="*:focus-visible{outline:3px solid #0d9488!important;outline-offset:2px!important;box-shadow:0 0 0 5px rgba(13,148,136,.25)!important;}",document.head.appendChild(T),Ie=T,()=>{Ie?.remove(),Ie=null}},[]),(0,$.useEffect)(()=>()=>{j.stopObserver(),j.removeLiveRegion(),j.removeColorBlindSvg()},[]),(0,$.useEffect)(()=>{if(!a)return;let T=I=>{m.current&&!m.current.contains(I.target)&&L.current&&!L.current.contains(I.target)&&f(!1)};return document.addEventListener("mousedown",T),()=>document.removeEventListener("mousedown",T)},[a]),(0,$.useEffect)(()=>{let T=I=>{I.key==="Escape"&&a&&(f(!1),L.current?.focus())};return document.addEventListener("keydown",T),()=>document.removeEventListener("keydown",T)},[a]);let Q=(T,I)=>i(z=>({...z,[T]:I})),fe=(0,$.useCallback)(async()=>{let T={enabled:!0,highContrast:t.highContrast,reduceMotion:t.reduceMotion,autoFix:t.autoFix},I=await j.execute(T);if(console.log("[yuktai-a11y]",I),w(j.applyFixes(T)),document.documentElement.style.fontSize=`${t.fontScale}%`,t.dyslexiaFont){if(!ce){let z=document.createElement("style");z.textContent="body,body *{font-family:'Georgia',serif!important;letter-spacing:.06em!important;word-spacing:.12em!important;line-height:1.9!important;}",document.head.appendChild(z),ce=z}}else ce?.remove(),ce=null;s(!0),f(!1),j.announce("yuktai-a11y active.")},[t]),H=(0,$.useCallback)(async()=>{await j.execute({enabled:!1}),document.documentElement.style.fontSize="",ce?.remove(),ce=null,document.querySelectorAll("*").forEach(T=>{T.style.filter="",T.style.transition="",T.style.animation=""}),i(Ze),w(null),s(!1),j.announce("yuktai-a11y disabled.")},[]);return c?(0,W.jsxs)(W.Fragment,{children:[r,(0,W.jsxs)("button",{ref:L,onClick:()=>f(T=>!T),"aria-label":"Open yuktai-a11y accessibility options","aria-expanded":a,"aria-haspopup":"dialog",style:{position:"fixed",bottom:24,...n==="left"?{left:24}:{right:24},width:52,height:52,borderRadius:"50%",background:S?"#0f766e":"#0d9488",border:"none",cursor:"pointer",display:"flex",alignItems:"center",justifyContent:"center",boxShadow:"0 4px 14px rgba(0,0,0,0.18)",zIndex:9999,transition:"background 0.2s, transform 0.15s",outline:"none"},onMouseEnter:T=>T.currentTarget.style.transform="scale(1.08)",onMouseLeave:T=>T.currentTarget.style.transform="scale(1)",onFocus:T=>T.currentTarget.style.boxShadow="0 0 0 4px rgba(13,148,136,0.45)",onBlur:T=>T.currentTarget.style.boxShadow="0 4px 14px rgba(0,0,0,0.18)",children:[(0,W.jsx)("svg",{viewBox:"0 0 24 24",style:{width:26,height:26,fill:"#fff"},"aria-hidden":"true",children:(0,W.jsx)("path",{d:"M12 2a2 2 0 1 1 0 4 2 2 0 0 1 0-4zm9 4.5l-5-.5-2-.2V5l-4 .5-4-.5v.8L4 6.5 3 7l1 3 4-.5v2.3L6 17h2l2-4.5L12 14l2 2.5L16 17h2l-2-4.2V9.5l4 .5 1-3z"})}),S&&(0,W.jsx)("span",{"aria-hidden":"true",style:{position:"absolute",top:4,right:4,width:10,height:10,borderRadius:"50%",background:"#5eead4",border:"2px solid #fff"}})]}),a&&(0,W.jsx)(Je,{ref:m,position:n,settings:t,report:k,isActive:S,set:Q,onApply:fe,onReset:H,onClose:()=>f(!1)})]}):(0,W.jsx)(W.Fragment,{children:r})}var ve={name:"ai.text",async execute(r){return`\u{1F916} YuktAI says: ${r}`}};var Ae={name:"voice.text",async execute(r){return!r||r.trim()===""?"\u{1F3A4} No speech detected":`\u{1F3A4} You said: ${r}`}};var G=class{plugins=new Map;register(n,c){if(!c||typeof c.execute!="function")throw new Error(`Invalid plugin: ${n}`);this.plugins.set(n,c)}use(n){return this.plugins.get(n)}async run(n,c){try{let d=this.use(n);if(!d)throw new Error(`Plugin not found: ${n}`);return await d.execute(c)}catch(d){throw console.error(`[YuktAI Runtime Error in ${n}]:`,d),d}}getPlugins(){return Array.from(this.plugins.keys())}};function br(){if(typeof globalThis>"u")return new G;if(!globalThis.__yuktai_runtime__){let r=new G;r.register(j.name,j),r.register(ve.name,ve),r.register(Ae.name,Ae),globalThis.__yuktai_runtime__=r}return globalThis.__yuktai_runtime__}var Nt=typeof window<"u"?br():new G,mr={wcagPlugin:j,list(){return Nt.getPlugins()},use(r){return Nt.use(r)},fix(r){return j.applyFixes({enabled:!0,autoFix:!0,...r})},scan(){return j.scan()}};return Ut(gr);})();
|
|
30
|
+
/*! Bundled license information:
|
|
31
|
+
|
|
32
|
+
react/cjs/react.production.js:
|
|
33
|
+
(**
|
|
34
|
+
* @license React
|
|
35
|
+
* react.production.js
|
|
36
|
+
*
|
|
37
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
38
|
+
*
|
|
39
|
+
* This source code is licensed under the MIT license found in the
|
|
40
|
+
* LICENSE file in the root directory of this source tree.
|
|
41
|
+
*)
|
|
42
|
+
|
|
43
|
+
react/cjs/react.development.js:
|
|
44
|
+
(**
|
|
45
|
+
* @license React
|
|
46
|
+
* react.development.js
|
|
47
|
+
*
|
|
48
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
49
|
+
*
|
|
50
|
+
* This source code is licensed under the MIT license found in the
|
|
51
|
+
* LICENSE file in the root directory of this source tree.
|
|
52
|
+
*)
|
|
53
|
+
|
|
54
|
+
react/cjs/react-jsx-runtime.production.js:
|
|
55
|
+
(**
|
|
56
|
+
* @license React
|
|
57
|
+
* react-jsx-runtime.production.js
|
|
58
|
+
*
|
|
59
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
60
|
+
*
|
|
61
|
+
* This source code is licensed under the MIT license found in the
|
|
62
|
+
* LICENSE file in the root directory of this source tree.
|
|
63
|
+
*)
|
|
64
|
+
|
|
65
|
+
react/cjs/react-jsx-runtime.development.js:
|
|
66
|
+
(**
|
|
67
|
+
* @license React
|
|
68
|
+
* react-jsx-runtime.development.js
|
|
69
|
+
*
|
|
70
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
71
|
+
*
|
|
72
|
+
* This source code is licensed under the MIT license found in the
|
|
73
|
+
* LICENSE file in the root directory of this source tree.
|
|
74
|
+
*)
|
|
75
|
+
*/
|
package/package.json
CHANGED
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@yuktishaalaa/yuktai",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.5",
|
|
4
4
|
"description": "Privacy-first, offline-first universal accessibility engine with WCAG auto-fix, OCR, voice, and Indic language AI support.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
8
|
+
"browser": "./dist/index.global.js",
|
|
8
9
|
"types": "./dist/index.d.ts",
|
|
9
10
|
"exports": {
|
|
10
11
|
".": {
|
|
@@ -56,8 +57,8 @@
|
|
|
56
57
|
"dist"
|
|
57
58
|
],
|
|
58
59
|
"scripts": {
|
|
59
|
-
"dev": "tsup src/index.ts --format cjs,esm --watch --dts --external react --external react-dom",
|
|
60
|
-
"build": "tsup src/index.ts --format cjs,esm --clean --dts --minify --external react --external react-dom",
|
|
60
|
+
"dev": "tsup src/index.ts --format cjs,esm,iife --watch --dts --external react --external react-dom --global-name YuktAI",
|
|
61
|
+
"build": "tsup src/index.ts --format cjs,esm,iife --clean --dts --minify --external react --external react-dom --global-name YuktAI",
|
|
61
62
|
"lint": "tsc --noEmit",
|
|
62
63
|
"prepublishOnly": "npm run build"
|
|
63
64
|
},
|