PageSourceSearch

https://rateitall.com/_app/focus-management.7beb6074.js

js rateitall.com collected 2026-09-24 15:34:39 UTC 2,662 bytes, 1 lines download raw bytes

1import{t as v,u as p}from"./open-closed.8a7b10ac.js";var h=(e=>(e.Space=" ",e.Enter="Enter",e.Escape="Escape",e.Backspace="Backspace",e.Delete="Delete",e.ArrowLeft="ArrowLeft",e.ArrowUp="ArrowUp",e.ArrowRight="ArrowRight",e.ArrowDown="ArrowDown",e.Home="Home",e.End="End",e.PageUp="PageUp",e.PageDown="PageDown",e.Tab="Tab",e))(h||{});function x(e){if(typeof window>"u")return null;if(e instanceof Node)return e.ownerDocument;if(e!=null&&e.hasOwnProperty("value")){let r=v(e);if(r)return r.ownerDocument}return document}let f=["[contentEditable=true]","[tabindex]","a[href]","area[href]","button:not([disabled])","iframe","input:not([disabled])","select:not([disabled])","textarea:not([disabled])"].map(e=>`${e}:not([tabindex='-1'])`).join(",");var A=(e=>(e[e.First=1]="First",e[e.Previous=2]="Previous",e[e.Next=4]="Next",e[e.Last=8]="Last",e[e.WrapAround=16]="WrapAround",e[e.NoScroll=32]="NoScroll",e))(A||{}),E=(e=>(e[e.Error=0]="Error",e[e.Overflow=1]="Overflow",e[e.Success=2]="Success",e[e.Underflow=3]="Underflow",e))(E||{}),N=(e=>(e[e.Previous=-1]="Previous",e[e.Next=1]="Next",e))(N||{});function b(e=document.body){return e==null?[]:Array.from(e.querySelectorAll(f))}var P=(e=>(e[e.Strict=0]="Strict",e[e.Loose=1]="Loose",e))(P||{});function L(e,r=0){var t;return e===((t=x(e))==null?void 0:t.body)?!1:p(r,{0(){return e.matches(f)},1(){let n=e;for(;n!==null;){if(n.matches(f))return!0;n=n.parentElement}return!1}})}let D=["textarea","input"].join(",");function F(e){var r,t;return(t=(r=e==null?void 0:e.matches)==null?void 0:r.call(e,D))!=null?t:!1}function O(e,r=t=>t){return e.slice().sort((t,n)=>{let i=r(t),o=r(n);if(i===null||o===null)return 0;let l=i.compareDocumentPosition(o);return l&Node.DOCUMENT_POSITION_FOLLOWING?-1:l&Node.DOCUMENT_POSITION_PRECEDING?1:0})}function S(e,r,t=!0){var n;let i=(n=Array.isArray(e)?e.length>0?e[0].ownerDocument:document:e==null?void 0:e.ownerDocument)!=null?n:document,o=Array.isArray(e)?t?O(e):e:b(e),l=i.activeElement,d=(()=>
1{if(r&5)return 1;if(r&10)return-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),w=(()=>{if(r&1)return 0;if(r&2)return Math.max(0,o.indexOf(l))-1;if(r&4)return Math.max(0,o.indexOf(l))+1;if(r&8)return o.length-1;throw new Error("Missing Focus.First, Focus.Previous, Focus.Next or Focus.Last")})(),m=r&32?{preventScroll:!0}:{},c=0,a=o.length,u;do{if(c>=a||c+a<=0)return 0;let s=w+c;if(r&16)s=(s+a)%a;else{if(s<0)return 3;if(s>=a)return 1}u=o[s],u==null||u.focus(m),c+=d}while(u!==i.activeElement);return u.hasAttribute("tabindex")||u.setAttribute("tabindex","0"),r&6&&F(u)&&u.select(),2}export{L as F,A as L,P as M,S as P,x as e,h as o,O as w};

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.