PageSourceSearch

https://jinko.ai/assets/use-keyboard-focus-list-C5HlWb97.js

js jinko.ai collected 2026-10-05 12:05:35 UTC 845 bytes, 1 lines download raw bytes

1import{En as e,Ht as t,ct as n}from"./runtime-core.esm-bundler-B8D2lM98.js";import{d as r,n as i}from"./dist-D5uod7ME.js";function a({items:a,keyPressTarget:o,onFocus:s,wrap:c=!0}){let l=null;function u(e){let t=e.element.value;if(Array.isArray(t))return t[0];if(t)return t}function d(t){l=t;let n=e(a)?.[t];if(n){let{focused:e}=r(u(n));e.value=!0,s?.(n.value)}}n(async()=>{let n=e(a).map(e=>r(u(e)).focused);t(n,e=>{let t=e.findIndex(e=>e);t!==-1&&t!==l&&d(t)})}),i([`ArrowUp`,`ArrowDown`,`ArrowLeft`,`ArrowRight`],e=>{e.preventDefault(),f.get(e.key)?.()},{target:o});let f=new Map([[`ArrowUp`,p],[`ArrowDown`,m],[`ArrowLeft`,p],[`ArrowRight`,m]]);function p(){let t=l;t===null?t=e(a).length-1:c?t===0?t=e(a).length-1:t--:t!==0&&t--,d(t)}function m(){let t=l;t===null?t=0:c?t===e(a).length-1?t=0:t++:t!==e(a).length-1&&t++,d(t)}}export{a as t};

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.