PageSourceSearch

http://node.cc/static/js/es2015.HS3QcJYh.js

js node.cc collected 2026-10-06 13:17:38 UTC 18,497 bytes, 1 lines download raw bytes

1import{o as e}from"./rolldown-runtime.DAXXjFlN.js";import{r as t}from"./emotion-is-prop-valid.esm.CygBv61C.js";import{y as n}from"./emotion-styled.browser.esm.DsRKNFfx.js";import{n as r,t as i}from"./objectWithoutPropertiesLoose.DkqnLJVA.js";import{t as a}from"./tslib.es6.DWZnz9P1.js";import{n as o}from"./assertThisInitialized.Cpir0pD1.js";var s=`data-focus-lock`,c=`data-focus-lock-disabled`,l=`data-no-focus-lock`,u=`data-autofocus-inside`,d=`data-no-autofocus`,f=function(e){for(var t=Array(e.length),n=0;n<e.length;++n)t[n]=e[n];return t},p=function(e){return Array.isArray(e)?e:[e]},m=function(e){return Array.isArray(e)?e[0]:e},h=function(e){if(e.nodeType!==Node.ELEMENT_NODE)return!1;var t=window.getComputedStyle(e,null);return!t||!t.getPropertyValue?!1:t.getPropertyValue(`display`)===`none`||t.getPropertyValue(`visibility`)===`hidden`},g=function(e){return e.parentNode&&e.parentNode.nodeType===Node.DOCUMENT_FRAGMENT_NODE?e.parentNode.host:e.parentNode},_=function(e){return e===document||e&&e.nodeType===Node.DOCUMENT_NODE},v=function(e){return e.hasAttribute(`inert`)},y=function(e,t){return!e||_(e)||!h(e)&&!v(e)&&t(g(e))},b=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=y(t,b.bind(void 0,e));return e.set(t,r),r},ee=function(e,t){return e&&!_(e)?ie(e)?t(g(e)):!1:!0},x=function(e,t){var n=e.get(t);if(n!==void 0)return n;var r=ee(t,x.bind(void 0,e));return e.set(t,r),r},S=function(e){return e.dataset},te=function(e){return e.tagName===`BUTTON`},ne=function(e){return e.tagName===`INPUT`},C=function(e){return ne(e)&&e.type===`radio`},re=function(e){return!((ne(e)||te(e))&&(e.type===`hidden`||e.disabled))},ie=function(e){var t=e.getAttribute(d);return![!0,`true`,``].includes(t)},w=function(e){return!!(e&&S(e)?.focusGuard)},T=function(e){return!w(e)},ae=function(e){return!!e},E=function(e,t){var n=Math.max(0,e.tabIndex),r=Math.max(0,t.tabIndex),i=n-r,a=e.index-t.index;if(i){if(!n)return 1;if(!r)return-1}return i||a},oe=function(e){return e.tabIndex<0&&!e.hasAttribute(`tabindex`)?0:e.tabIndex},D=function(e,t,n){return f(e).map(function(e,t){var r=oe(e);return{node:e,index:t,tabIndex:n&&r===-1?(e.dataset||{}).focusGuard?0:-1:r}}).filter(function(e){return!t||e.tabIndex>=0}).sort(E)},O=[`button:enabled`,`select:enabled`,`textarea:enabled`,`input:enabled`,`a[href]`,`area[href]`,`summary`,`iframe`,`object`,`embed`,`audio[controls]`,`video[controls]`,`[tabindex]`,`[contenteditable]`,`[autofocus]`].join(`,`),k=`${O}, [data-focus-guard]`,se=function(e,t){return f((e.shadowRoot||e).children).reduce(function(e,n){return e.concat(n.matches(t?k:O)?[n]:[],se(n))},[])},A=function(e,t){return e instanceof HTMLIFrameElement&&e.contentDocument?.body?j([e.contentDocument.body],t):[e]},j=function(e,t){return e.reduce(function(e,n){var r,i=se(n,t),a=(r=[]).concat.apply(r,i.map(function(e){return A(e,t)}));return e.concat(a,n.parentNode?f(n.parentNode.querySelectorAll(O)).filter(function(e){return e===n}):[])},[])},ce=function(e){return f(e.querySelectorAll(`[${u}]`)).map(function(e){return j([e])}).reduce(function(e,t){return e.concat(t)},[])},M=function(e,t){return f(e).filter(function(e){return b(t,e)}).filter(function(e){return re(e)})},le=function(e,t){return t===void 0&&(t=new Map),f(e).filter(function(e){return x(t,e)})},N=function(e,t,n){return D(M(j(e,n),t),!0,n)},P=function(e,t){return D(M(j(e),t),!1)},ue=function(e,t){return M(ce(e),t)},F=function(e,t){return e.shadowRoot?F(e.shadowRoot,t):Object.getPrototypeOf(e).contains!==void 0&&Object.getPrototypeOf(e).contains.call(e,t)?!0:f(e.children).some(function(e){if(e instanceof HTMLIFrameElement){var n=e.contentDocument?.body;return n?F(n,t):!1}return F(e,t)})},de=function(e){for(var t=new Set,n=e.length,r=0;r<n;r+=1)for(var i=r+1;i<n;i+=1){var a=e[r].compareDocumentPosition(e[i]);(a&Node.DOCUMENT_POSITION_CONTAINED_BY)>0&&t.add(i),(a&Node.DOCUMENT_POSITION_CONTAINS)>0&&t.add(r)}return e.filter(function(e,n){return!t.has(n)})},I=function(e){return e.parentNode?I(e.parentNode):e},L=function(e){return p(e).filter(Boolean).reduce(function(e,t){var n=t.getAttribute(s);return e.push.apply(e,n?de(f(I(t).querySelectorAll(`[${s}="${n}"]:not([${c}="disabled"])`))):[t]),e},[])},fe=function(e){try{return e()}catch{return}},R=function(e){if(e===void 0&&(e=document),!(!e||!e.activeElement)){var t=e.activeElement;return t.shadowRoot?R(t.shadowRoot):t instanceof HTMLIFrameElement&&fe(function(){return t.contentWindow.document})?R(t.contentWindow.document):t}},pe=function(e,t){return e===t},me=function(e,t){return!!f(e.querySelectorAll(`iframe`)).some(function(e){return pe(e,t)})},he=function(e,t){return t===void 0&&(t=R(m(e).ownerDocument)),!t||t.dataset&&t.dataset.focusGuard?!1:L(e).some(function(e){return F(e,t)||me(e,t)})},ge=function(e){e===void 0&&(e=document);var t=R(e);return t?f(e.querySelectorAll(`[${l}]`)).some(function(e){return F(e,t)}):!1},_e=function(e,t){return t.filter(C).filter(function(t){return t.name===e.name}).filter(function(e){return e.checked})[0]||e},z=function(e,t){return C(e)&&e.name?_e(e,t):e},ve=function(e){var t=new Set;return e.forEach(function(n){return t.add(z(n,e))}),e.filter(function(e){return t.has(e)})},ye=function(e){return e[0]&&e.length>1?z(e[0],e):e[0]},be=function(e,t){return e.indexOf(z(t,e))},xe=`NEW_FOCUS`,Se=function(e,t,n,r,i){var a=e.length,o=e[0],s=e[a-1],c=w(r);if(!(r&&e.indexOf(r)>=0)){var l=r===void 0?-1:n.indexOf(r),u=i?n.indexOf(i):l,d=i?e.indexOf(i):-1;
1if(l===-1)return d===-1?xe:d;if(d===-1)return xe;var f=l-u,p=n.indexOf(o),m=n.indexOf(s),h=ve(n),g=r===void 0?-1:h.indexOf(r),_=i?h.indexOf(i):g,v=h.filter(function(e){return e.tabIndex>=0}),y=r===void 0?-1:v.indexOf(r),b=i?v.indexOf(i):y,ee=y>=0&&b>=0?b-y:_-g;if(!f&&d>=0||t.length===0)return d;var x=be(e,t[0]),S=be(e,t[t.length-1]);if(l<=p&&c&&Math.abs(f)>1)return S;if(l>=m&&c&&Math.abs(f)>1)return x;if(f&&Math.abs(ee)>1)return d;if(l<=p)return S;if(l>m)return x;if(f)return Math.abs(f)>1?d:(a+d+f)%a}},Ce=function(e){return function(t){var n=S(t)?.autofocus;return t.autofocus||n!==void 0&&n!==`false`||e.indexOf(t)>=0}},we=function(e,t,n){var r=le(e.map(function(e){return e.node}).filter(Ce(n)));return r&&r.length?ye(r):ye(le(t))},B=function(e,t){return t===void 0&&(t=[]),t.push(e),e.parentNode&&B(e.parentNode.host||e.parentNode,t),t},V=function(e,t){for(var n=B(e),r=B(t),i=0;i<n.length;i+=1){var a=n[i];if(r.indexOf(a)>=0)return a}return!1},Te=function(e,t,n){var r=p(e),i=p(t),a=r[0],o=!1;return i.filter(Boolean).forEach(function(e){o=V(o||e,e)||o,n.filter(Boolean).forEach(function(e){var t=V(a,e);t&&(o=!o||F(t,o)?t:V(t,o))})}),o},Ee=function(e,t){return e.reduce(function(e,n){return e.concat(ue(n,t))},[])},De=function(e,t){var n=new Map;return t.forEach(function(e){return n.set(e.node,e)}),e.map(function(e){return n.get(e)}).filter(ae)},Oe=function(e,t){var n=R(p(e).length>0?document:m(e).ownerDocument),r=L(e).filter(T),i=Te(n||e,e,r),a=new Map,o=P(r,a),s=o.filter(function(e){var t=e.node;return T(t)});if(s[0]){var c=P([i],a).map(function(e){return e.node}),l=De(c,s),u=l.map(function(e){return e.node}),d=l.filter(function(e){return e.tabIndex>=0}).map(function(e){return e.node}),f=Se(u,d,c,n,t);if(f===`NEW_FOCUS`){var h=we(o,d,Ee(r,a))||we(o,u,Ee(r,a));if(h)return{node:h};console.warn(`focus-lock: cannot find any node to move focus into`);return}return f===void 0?f:l[f]}},ke=function(e){var t=L(e).filter(T),n=D(j([Te(e,e,t)],!0),!0,!0),r=j(t,!1);return n.map(function(e){var t=e.node;return{node:t,index:e.index,lockItem:r.indexOf(t)>=0,guard:w(t)}})},H=function(e,t){e&&(`focus`in e&&e.focus(t),`contentWindow`in e&&e.contentWindow&&e.contentWindow.focus())},U=0,W=!1,Ae=function(e,t,n){n===void 0&&(n={});var r=Oe(e,t);if(!W&&r){if(U>2){console.error(`FocusLock: focus-fighting detected. Only one focus management system could be active. See https://github.com/theKashey/focus-lock/#focus-fighting`),W=!0,setTimeout(function(){W=!1},1);return}U++,H(r.node,n.focusOptions),U--}};function G(e){if(!e)return null;if(typeof WeakRef>`u`)return function(){return e||null};var t=e?new WeakRef(e):null;return function(){return t?.deref()||null}}var je=function(e){if(!e)return null;for(var t=[],n=e;n&&n!==document.body;)t.push({current:G(n),parent:G(n.parentElement),left:G(n.previousElementSibling),right:G(n.nextElementSibling)}),n=n.parentElement;return{element:G(e),stack:t,ownerDocument:e.ownerDocument}},Me=function(e){if(e)for(var t=e.stack,n=e.ownerDocument,r=new Map,i=0,a=t;i<a.length;i++){var o=a[i],s=o.parent?.call(o);if(s&&n.contains(s)){for(var c=o.left?.call(o),l=o.current(),u=s.contains(l)?l:void 0,d=o.right?.call(o),f=N([s],r),p=u??c?.nextElementSibling??d??c;p;){for(var m=0,h=f;m<h.length;m++){var g=h[m];if(p?.contains(g.node))return g.node}p=p.nextElementSibling}if(f.length)return f[0].node}}},Ne=function(e){var t=je(e);return function(){return Me(t)}},Pe=function(e,t,n){if(!e||!t)return console.error(`no element or scope given`),{};var r=p(t);if(r.every(function(t){return!F(t,e)}))return console.error(`Active element is not contained in the scope`),{};var i=n?N(r,new Map):P(r,new Map),a=i.findIndex(function(t){return t.node===e});if(a!==-1)return{prev:i[a-1],next:i[a+1],first:i[0],last:i[i.length-1]}},Fe=function(e,t){var n=t?N(p(e),new Map):P(p(e),new Map);return{first:n[0],last:n[n.length-1]}},Ie=function(e){return Object.assign({scope:document.body,cycle:!0,onlyTabbable:!0},e)},Le=function(e,t,n){t===void 0&&(t={});var r=Ie(t),i=Pe(e,r.scope,r.onlyTabbable);if(i){var a=n(i,r.cycle);a&&H(a.node,r.focusOptions)}},Re=function(e,t){t===void 0&&(t={}),Le(e,t,function(e,t){var n=e.next,r=e.first;return n||t&&r})},ze=function(e,t){t===void 0&&(t={}),Le(e,t,function(e,t){var n=e.prev,r=e.last;return n||t&&r})},Be=function(e,t,n){var r=Fe(e,t.onlyTabbable??!0)[n];r&&H(r.node,t.focusOptions)},Ve=function(e,t){t===void 0&&(t={}),Be(e,t,`first`)},He=function(e,t){t===void 0&&(t={}),Be(e,t,`last`)},K=e(t());function Ue(e,t){return typeof e==`function`?e(t):e&&(e.current=t),e}function We(e,t){var n=(0,K.useState)(function(){return{value:e,callback:t,facade:{get current(){return n.value},set current(e){var t=n.value;t!==e&&(n.value=e,n.callback(e,t))}}}})[0];return n.callback=t,n.facade}var Ge=typeof window<`u`?K.useLayoutEffect:K.useEffect,Ke=new WeakMap;function qe(e,t){var n=We(t||null,function(t){return e.forEach(function(e){return Ue(e,t)})});return Ge(function(){var t=Ke.get(n);if(t){var r=new Set(t),i=new Set(e),a=n.current;r.forEach(function(e){i.has(e)||Ue(e,null)}
1),i.forEach(function(e){r.has(e)||Ue(e,a)})}Ke.set(n,e)},[e]),n}var q={width:`1px`,height:`0px`,padding:0,overflow:`hidden`,position:`fixed`,top:`1px`,left:`1px`},Je=function(e){var t=e.children,n=t===void 0?null:t;return K.createElement(K.Fragment,null,K.createElement(`div`,{key:`guard-first`,"data-focus-guard":!0,"data-focus-auto-guard":!0,style:q}),n,n&&K.createElement(`div`,{key:`guard-last`,"data-focus-guard":!0,"data-focus-auto-guard":!0,style:q}))};Je.propTypes={};function Ye(e){return e}function Xe(e,t){t===void 0&&(t=Ye);var n=[],r=!1;return{read:function(){if(r)throw Error("Sidecar: could not `read` from an `assigned` medium. `read` could be used only with `useMedium`.");return n.length?n[n.length-1]:e},useMedium:function(e){var i=t(e,r);return n.push(i),function(){n=n.filter(function(e){return e!==i})}},assignSyncMedium:function(e){for(r=!0;n.length;){var t=n;n=[],t.forEach(e)}n={push:function(t){return e(t)},filter:function(){return n}}},assignMedium:function(e){r=!0;var t=[];if(n.length){var i=n;n=[],i.forEach(e),t=n}var a=function(){var n=t;t=[],n.forEach(e)},o=function(){return Promise.resolve().then(a)};o(),n={push:function(e){t.push(e),o()},filter:function(e){return t=t.filter(e),n}}}}}function Ze(e,t){return t===void 0&&(t=Ye),Xe(e,t)}function Qe(e){e===void 0&&(e={});var t=Xe(null);return t.options=a({async:!0,ssr:!1},e),t}var $e=Ze({},function(e){return{target:e.target,currentTarget:e.currentTarget}}),et=Ze(),tt=Ze(),nt=Qe({async:!0,ssr:typeof document<`u`}),rt=(0,K.createContext)(void 0),it=[],at=(0,K.forwardRef)(function(e,t){var r,i=(0,K.useState)(),a=i[0],o=i[1],l=(0,K.useRef)(),u=(0,K.useRef)(!1),d=(0,K.useRef)(null),f=(0,K.useState)({})[1],p=e.children,m=e.disabled,h=m!==void 0&&m,g=e.noFocusGuards,_=g!==void 0&&g,v=e.persistentFocus,y=v!==void 0&&v,b=e.crossFrame,ee=b===void 0||b,x=e.autoFocus,S=x===void 0||x;e.allowTextSelection;var te=e.group,ne=e.className,C=e.whiteList,re=e.hasPositiveIndices,ie=e.shards,w=ie===void 0?it:ie,T=e.as,ae=T===void 0?`div`:T,E=e.lockProps,oe=E===void 0?{}:E,D=e.sideCar,O=e.returnFocus,k=O!==void 0&&O,se=e.focusOptions,A=e.onActivation,j=e.onDeactivation,ce=(0,K.useState)({})[0],M=(0,K.useCallback)(function(e){var t=e.captureFocusRestore;if(!d.current){var n=document?.activeElement;d.current=n,n!==document.body&&(d.current=t(n))}l.current&&A&&A(l.current),u.current=!0,f()},[A]),le=(0,K.useCallback)(function(){u.current=!1,j&&j(l.current),f()},[j]),N=(0,K.useCallback)(function(e){var t=d.current;if(t){var n=(typeof t==`function`?t():t)||document.body,r=typeof k==`function`?k(n):k;if(r){var i=typeof r==`object`?r:void 0;d.current=null,e?Promise.resolve().then(function(){return n.focus(i)}):n.focus(i)}}},[k]),P=(0,K.useCallback)(function(e){u.current&&$e.useMedium(e)},[]),ue=et.useMedium,F=(0,K.useCallback)(function(e){l.current!==e&&(l.current=e,o(e))},[]),de=n((r={},r[c]=h&&`disabled`,r[s]=te,r),oe),I=_!==!0,L=I&&_!==`tail`,fe=qe([t,F]),R=(0,K.useMemo)(function(){return{observed:l,shards:w,enabled:!h,get active(){return u.current}}},[h,u,w,l]);return K.createElement(K.Fragment,null,I&&[K.createElement(`div`,{key:`guard-first`,"data-focus-guard":!0,tabIndex:h?-1:0,style:q}),re?K.createElement(`div`,{key:`guard-nearest`,"data-focus-guard":!0,tabIndex:h?-1:1,style:q}):null],!h&&K.createElement(D,{id:ce,sideCar:nt,observed:a,disabled:h,persistentFocus:y,crossFrame:ee,autoFocus:S,whiteList:C,shards:w,onActivation:M,onDeactivation:le,returnFocus:N,focusOptions:se,noFocusGuards:_}),K.createElement(ae,n({ref:fe},de,{className:ne,onBlur:ue,onFocus:P}),K.createElement(rt.Provider,{value:R},p)),L&&K.createElement(`div`,{"data-focus-guard":!0,tabIndex:h?-1:0,style:q}))});at.propTypes={};function ot(e,t){e.prototype=Object.create(t.prototype),e.prototype.constructor=e,o(e,t)}function st(e,t){function n(e){return e.displayName||e.name||`Component`}return function(i){var a=[],o;function s(){o=e(a.map(function(e){return e.props})),t(o)}var c=function(e){ot(t,e);function t(){return e.apply(this,arguments)||this}t.peek=function(){return o};var n=t.prototype;return n.componentDidMount=function(){a.push(this),s()},n.componentDidUpdate=function(){s()},n.componentWillUnmount=function(){var e=a.indexOf(this);a.splice(e,1),s()},n.render=function(){return K.createElement(i,this.props)},t}(K.PureComponent);return r(c,`displayName`,`SideEffect(`+n(i)+`)`),c}}function ct(e){setTimeout(e,1)}var lt=function(e,t){var n={};return n[e]=t,n},ut=function(e){return e&&`current`in e?e.current:e},dt=function(){return document&&document.activeElement===document.body},ft=function(){return dt()||ge()},J=null,Y=null,pt=function(){return null},X=null,Z=!1,mt=!1,ht=function(){return!0},gt=function(e){return(J.whiteList||ht)(e)},_t=function(e,t){X={observerNode:e,portaledElement:t}},vt=function(e){return X&&X.portaledElement===e};function yt(e,t,n,r){var i=null,a=e;do{var o=r[a];if(o.guard)o.node.dataset.focusAutoGuard&&(i=o);else if(o.lockItem){if(a!==e)return;i=null}else break}while((a+=n)!==t);i&&(i.node.tabIndex=0)}var bt=function(e){return e?!!Z:Z===`meanwhile`},xt=function e(t,n,r){return n&&(n.host===t&&(!n.activeElement||r.contains(n.activeElement))||n.parentNode&&e(t,n.parentNode,r))},St=function(e,t){return t.some(function(t){return xt(e,t,t)})},Ct=function(e){return P(e,new Map)},wt=function(e){return!Ct([e.parentNode]).some(function(t){return t.node===e})},Q=function(){var e=!1;
1if(J){var t=J,n=t.observed,r=t.persistentFocus,i=t.autoFocus,a=t.shards,o=t.crossFrame,s=t.focusOptions,c=t.noFocusGuards,l=n||X&&X.portaledElement;if(dt()&&Y&&Y!==document.body&&(!document.body.contains(Y)||wt(Y))){var u=pt();u&&u.focus()}var d=document&&document.activeElement;if(l){var f=[l].concat(a.map(ut).filter(Boolean));if((!d||gt(d))&&(r||function(){if(!bt(o)||!c||!Y||mt)return!1;var e=Ct(f),t=e.findIndex(function(e){return e.node===Y});return t===0||t===e.length-1}()||!ft()||!Y&&i)&&(l&&!(he(f)||d&&St(d,f)||vt(d,l))&&(document&&!Y&&d&&!i?(d.blur&&d.blur(),document.body.focus()):(e=Ae(f,Y,{focusOptions:s}),X={})),Y=document&&document.activeElement,Y!==document.body&&(pt=Ne(Y)),Z=!1),document&&d!==document.activeElement&&document.querySelector(`[data-focus-auto-guard]`)){var p=document&&document.activeElement,m=ke(f),h=m.map(function(e){return e.node}).indexOf(p);h>-1&&(m.filter(function(e){var t=e.guard,n=e.node;return t&&n.dataset.focusAutoGuard}).forEach(function(e){return e.node.removeAttribute(`tabIndex`)}),yt(h,m.length,1,m),yt(h,-1,-1,m))}}}return e},Tt=function(e){Q()&&e&&(e.stopPropagation(),e.preventDefault())},$=function(){return ct(Q)},Et=function(e){var t=e.target,n=e.currentTarget;n.contains(t)||_t(n,t)},Dt=function(){return null},Ot=function(e){var t=e.children;return K.createElement(`div`,{onBlur:$,onFocus:Et},t)};Ot.propTypes={};var kt=function(){mt=!0},At=function(){mt=!1,Z=`just`,ct(function(){Z=`meanwhile`})},jt=function(){document.addEventListener(`focusin`,Tt),document.addEventListener(`focusout`,$),window.addEventListener(`focus`,kt),window.addEventListener(`blur`,At)},Mt=function(){document.removeEventListener(`focusin`,Tt),document.removeEventListener(`focusout`,$),window.removeEventListener(`focus`,kt),window.removeEventListener(`blur`,At)};function Nt(e){return e.filter(function(e){return!e.disabled})}var Pt={moveFocusInside:Ae,focusInside:he,focusNextElement:Re,focusPrevElement:ze,focusFirstElement:Ve,focusLastElement:He,captureFocusRestore:Ne};function Ft(e){var t=e.slice(-1)[0];t&&!J&&jt();var n=J,r=n&&t&&t.id===n.id;J=t,n&&!r&&(n.onDeactivation(),e.filter(function(e){return e.id===n.id}).length||n.returnFocus(!t)),t?(Y=null,(!r||n.observed!==t.observed)&&t.onActivation(Pt),Q(!0),ct(Q)):(Mt(),Y=null)}$e.assignSyncMedium(Et),et.assignMedium($),tt.assignMedium(function(e){return e(Pt)});var It=st(Nt,Ft)(Dt),Lt=(0,K.forwardRef)(function(e,t){return K.createElement(at,n({sideCar:It,ref:t},e))}),Rt=at.propTypes||{};Rt.sideCar,i(Rt,[`sideCar`]),Lt.propTypes={};var zt=Lt;export{Re as a,tt as i,lt as n,ze as o,ot as r,u as s,zt 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.