PageSourceSearch

https://l2beat.com/static/assets/dist-B1gMYyr6.js

js l2beat.com collected 2026-10-02 03:01:24 UTC 5,678 bytes, 1 lines download raw bytes

vendor: 4,310 bytes, line 1
1import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./index-9nNjHsL8.js";import{X as r,Y as i,dt as a,lt as o,ot as s,rt as c,st as l,ut as u}from"./SideNavLayout-CQx-PAqO.js";import{n as d,t as f}from"./dist-ChQ5yZTm.js";var p=e(t(),1),m=n(),h=`rovingFocusGroup.onEntryFocus`,g={bubbles:!1,cancelable:!0},_=`RovingFocusGroup`,[v,y,b]=d(_),[x,S]=o(_,[b]),[C,w]=x(_),T=p.forwardRef((e,t)=>(0,m.jsx)(v.Provider,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(v.Slot,{scope:e.__scopeRovingFocusGroup,children:(0,m.jsx)(E,{...e,ref:t})})}));T.displayName=_;var E=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,orientation:r,loop:o=!1,dir:c,currentTabStopId:d,defaultCurrentTabStopId:v,onCurrentTabStopIdChange:b,onEntryFocus:x,preventScrollOnEntryFocus:S=!1,...w}=e,T=p.useRef(null),E=u(t,T),D=f(c),[O,k]=i({prop:d,defaultProp:v??null,onChange:b,caller:_}),[A,j]=p.useState(!1),N=s(x),P=y(n),F=p.useRef(!1),[I,L]=p.useState(0);return p.useEffect(()=>{let e=T.current;if(e)return e.addEventListener(h,N),()=>e.removeEventListener(h,N)},[N]),(0,m.jsx)(C,{scope:n,orientation:r,dir:D,loop:o,currentTabStopId:O,onItemFocus:p.useCallback(e=>k(e),[k]),onItemShiftTab:p.useCallback(()=>j(!0),[]),onFocusableItemAdd:p.useCallback(()=>L(e=>e+1),[]),onFocusableItemRemove:p.useCallback(()=>L(e=>e-1),[]),children:(0,m.jsx)(l.div,{tabIndex:A||I===0?-1:0,"data-orientation":r,...w,ref:E,style:{outline:`none`,...e.style},onMouseDown:a(e.onMouseDown,()=>{F.current=!0}),onFocus:a(e.onFocus,e=>{let t=!F.current;if(e.target===e.currentTarget&&t&&!A){let t=new CustomEvent(h,g);if(e.currentTarget.dispatchEvent(t),!t.defaultPrevented){let e=P().filter(e=>e.focusable);M([e.find(e=>e.active),e.find(e=>e.id===O),...e].filter(Boolean).map(e=>e.ref.current),S)}}F.current=!1}),onBlur:a(e.onBlur,()=>j(!1))})})}),D=`RovingFocusGroupItem`,O=p.forwardRef((e,t)=>{let{__scopeRovingFocusGroup:n,focusable:r=!0,active:i=!1,tabStopId:o,children:s,...u}=e,d=c(),f=o||d,h=w(D,n),g=h.currentTabStopId===f,_=y(n),{onFocusableItemAdd:b,onFocusableItemRemove:x,currentTabStopId:S}=h;return p.useEffect(()=>{if(r)return b(),()=>x()},[r,b,x]),(0,m.jsx)(v.ItemSlot,{scope:n,id:f,focusable:r,active:i,children:(0,m.jsx)(l.span,{tabIndex:g?0:-1,"data-orientation":h.orientation,...u,ref:t,onMouseDown:a(e.onMouseDown,e=>{r?h.onItemFocus(f):e.preventDefault()}),onFocus:a(e.onFocus,()=>h.onItemFocus(f)),onKeyDown:a(e.onKeyDown,e=>{if(e.key===`Tab`&&e.shiftKey){h.onItemShiftTab();return}if(e.target!==e.currentTarget)return;let t=j(e,h.orientation,h.dir);if(t!==void 0){if(e.metaKey||e.ctrlKey||e.altKey||e.shiftKey)return;e.preventDefault();let n=_().filter(e=>e.focusable).map(e=>e.ref.current);if(t===`last`)n.reverse();else if(t===`prev`||t===`next`){t===`prev`&&n.reverse();let r=n.indexOf(e.currentTarget);n=h.loop?N(n,r+1):n.slice(r+1)}setTimeout(()=>M(n))}}),children:typeof s==`function`?s({isCurrentTabStop:g,hasTabStop:S!=null}):s})})});O.displayName=D;var k={ArrowLeft:`prev`,ArrowUp:`prev`,ArrowRight:`next`,ArrowDown:`next`,PageUp:`first`,Home:`first`,PageDown:`last`,End:`last`};function A(e,t){return t===`rtl`?e===`ArrowLeft`?`ArrowRight`:e===`ArrowRight`?`ArrowLeft`:e:e}function j(e,t,n){let r=A(e.key,n);if(!(t===`vertical`&&[`ArrowLeft`,`ArrowRight`].includes(r))&&!(t===`horizontal`&&[`ArrowUp`,`ArrowDown`].includes(r)))return k[r]}function M(e,t=!1){let n=document.activeElement;for(let r of e)if(r===n||(r.focus({preventScroll:t}),document.activeElement!==n))return}function N(e,t){return e.map((n,r)=>e[(t+r)%e.length])}var P=T,F=O,I=`Tabs`,[L,ee]=o(I,[S]),R=S(),[z,B]=L(I),V=p.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:u,activationMode:d=`automatic`,...p}=e,h=f(u),[g,_]=i({prop:r,onChange:a,defaultProp:o??``,caller:I});return(0,m.jsx)(z,{scope:n,baseId:c(),value:g,onValueChange:_,orientation:s,dir:h,activationMode:d,children:(0,m.jsx)(l.div,{dir:h,"data-orientation":s,...p,ref:t})})});V.displayName=I;var H=`TabsList`,U=p.forwardRef((e,t)=>{let{__scopeTabs:n,loop:r=!0,...i}=e,a=B(H,n),o=R(n);return(0,m.jsx)(P,{asChild:!0,...o,orientation:a.orientation,dir:a.dir,loop:r,children:(0,m.jsx)(l.div,{role:`tablist`,"aria-orientation":a.orientation,...i,ref:t})})});U.displayName=H;var W=`TabsTrigger`,G=p.forwardRef((e,t)=>
vendor: 1,368 bytes, line 1
1{let{__scopeTabs:n,value:r,disabled:i=!1,...o}=e,s=B(W,n),c=R(n),u=J(s.baseId,r),d=Y(s.baseId,r),f=r===s.value;return(0,m.jsx)(F,{asChild:!0,...c,focusable:!i,active:f,children:(0,m.jsx)(l.button,{type:`button`,role:`tab`,"aria-selected":f,"aria-controls":d,"data-state":f?`active`:`inactive`,"data-disabled":i?``:void 0,disabled:i,id:u,...o,ref:t,onMouseDown:a(e.onMouseDown,e=>{!i&&e.button===0&&e.ctrlKey===!1?s.onValueChange(r):e.preventDefault()}),onKeyDown:a(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&s.onValueChange(r)}),onFocus:a(e.onFocus,()=>{let e=s.activationMode!==`manual`;!f&&!i&&e&&s.onValueChange(r)})})})});G.displayName=W;var K=`TabsContent`,q=p.forwardRef((e,t)=>{let{__scopeTabs:n,value:i,forceMount:a,children:o,...s}=e,c=B(K,n),u=J(c.baseId,i),d=Y(c.baseId,i),f=i===c.value,h=p.useRef(f);return p.useEffect(()=>{let e=requestAnimationFrame(()=>h.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,m.jsx)(r,{present:a||f,children:({present:n})=>(0,m.jsx)(l.div,{"data-state":f?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":u,hidden:!n,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:h.current?`0s`:void 0},children:n&&o})})});q.displayName=K;function J(e,t){return`${e}-trigger-${t}`}function Y(e,t){return`${e}-content-${t}`}var X=V,Z=U,Q=G,$=q;export{Q as i,Z as n,X as r,$ 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.