1import{o as e}from"./rolldown-runtime.DAXXjFlN.js";import{r as t}from"./emotion-is-prop-valid.esm.CygBv61C.js";import{t as n}from"./react-dom.DZwq-Xzd.js";import{B as r,C as i,G as a,H as o,J as s,M as c,S as l,U as u,V as d,W as f,b as p,ct as m,it as h,k as g,lt as _,q as v,st as y,ut as ee}from"./Tooltip.DJg7muty.js";import{d as b,f as te,i as x,o as ne}from"./useFocusRing.Ct2U5AmE.js";import{a as S,n as C,r as w,t as T}from"./useDescription.CAgugccB.js";import{n as E}from"./useFocusable.CmSBtV6e.js";import{n as D}from"./Hidden.Bpblr2PM.js";import{t as O}from"./shim.Bu3ywy0h.js";import{t as k}from"./usePress.GgBX5I76.js";import{r as A}from"./FocusScope.DCb12P2c.js";var j=e(t(),1),M=e(n(),1),N=`react-aria-clear-focus`,P=`react-aria-focus`;function re(e){let t=L(v(e));t!==e&&(t&&F(t,e),e&&I(e,t))}function F(e,t){e.dispatchEvent(new FocusEvent(`blur`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusout`,{bubbles:!0,relatedTarget:t}))}function I(e,t){e.dispatchEvent(new FocusEvent(`focus`,{relatedTarget:t})),e.dispatchEvent(new FocusEvent(`focusin`,{bubbles:!0,relatedTarget:t}))}function L(e){let t=f(e),n=t?.getAttribute(`aria-activedescendant`);return n&&e.getElementById(n)||t}function R(e){return g()?e.metaKey:e.ctrlKey}var z=new Set([`checkbox`,`radio`,`range`,`color`,`file`,`image`,`button`,`submit`,`reset`]);function B(e){return e instanceof HTMLInputElement&&!z.has(e.type)||e instanceof HTMLTextAreaElement||e instanceof HTMLElement&&e.isContentEditable}var V=class{constructor(e){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue=``,this[`aria-label`]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=this.constructor.type,this.key=e}get childNodes(){throw Error(`childNodes is not supported`)}clone(){let e=new this.constructor(this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e[`aria-label`]=this[`aria-label`],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}filter(e,t,n){let r=this.clone();return t.addDescendants(r,e),r}},H=class extends V{filter(e,t,n){let[r,i]=K(e,t,this.firstChildKey,n),a=this.clone();return a.firstChildKey=r,a.lastChildKey=i,a}};(class extends V{static{this.type=`header`}});var U=class extends V{static{this.type=`loader`}},W=class extends H{static{this.type=`item`}filter(e,t,n){if(n(this.textValue,this)){let n=this.clone();return t.addDescendants(n,e),n}return null}};(class extends H{static{this.type=`section`}filter(e,t,n){let r=super.filter(e,t,n);if(r&&r.lastChildKey!==null){let t=e.getItem(r.lastChildKey);if(t&&t.type!==`header`)return r}return null}});var G=class{get size(){return this.itemCount}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey==null?void 0:this.keyMap.get(this.firstKey);for(;e;)yield e,e=e.nextKey==null?void 0:this.keyMap.get(e.nextKey)}getChildren(e){let t=this.keyMap;return{*[Symbol.iterator](){let n=t.get(e),r=n?.firstChildKey==null?null:t.get(n.firstChildKey);for(;r;)yield r,r=r.nextKey==null?void 0:t.get(r.nextKey)}}}getKeyBefore(e){let t=this.keyMap.get(e);if(!t)return null;if(t.prevKey!=null){for(t=this.keyMap.get(t.prevKey);t&&t.type!==`item`&&t.lastChildKey!=null;)t=this.keyMap.get(t.lastChildKey);return t?.key??null}return t.parentKey}getKeyAfter(e){let t=this.keyMap.get(e);if(!t)return null;if(t.type!==`item`&&t.firstChildKey!=null)return t.firstChildKey;for(;t;){if(t.nextKey!=null)return t.nextKey;if(t.parentKey!=null)t=this.keyMap.get(t.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey==null?null:this.keyMap.get(this.lastKey);for(;e?.lastChildKey!=null;)e=this.keyMap.get(e.lastChildKey);return e?.key??null}getItem(e){return this.keyMap.get(e)??null}at(){throw Error(`Not implemented`)}clone(){let e=this.constructor,t=new e;return t.keyMap=new Map(this.keyMap),t.firstKey=this.firstKey,t.lastKey=this.lastKey,t.itemCount=this.itemCount,t}addNode(e){if(this.frozen)throw Error(`Cannot add a node to a frozen collection`);e.type===`item`&&this.keyMap.get(e.key)==null&&this.itemCount++,this.keyMap.set(e.key,e)}addDescendants(e,t){this.addNode(e);let n=t.getChildren(e.key);for(let e of n)this.addDescendants(e,t)}removeNode(e){if(this.frozen)throw Error(`Cannot remove a node to a frozen collection`);let t=this.keyMap.get(e);t!=null&&t.type===`item`&&this.itemCount--,this.keyMap.delete(e)}commit(e,t,n=!1){if(this.frozen)throw Error(`Cannot commit a frozen collection`);this.firstKey=e,this.lastKey=t,this.frozen=!n}filter(e){let t=new this.constructor,[n,r]=K(this,t,this.firstKey,e);return t?.commit(n,r),t}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1,this.itemCount=0}};
1function K(e,t,n,r){if(n==null)return[null,null];let i=null,a=null,o=e.getItem(n);for(;o!=null;){let n=o.filter(e,t,r);n!=null&&(n.nextKey=null,a&&(n.prevKey=a.key,a.nextKey=n.key),i??=n,t.addNode(n),a=n),o=o.nextKey==null?null:e.getItem(o.nextKey)}if(a&&a.type===`separator`){let e=a.prevKey;t.removeNode(a.key),e==null?a=null:(a=t.getItem(e),a.nextKey=null)}return[i?.key??null,a?.key??null]}var q=class{constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){return this.parentNode?.isConnected||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||!this._minInvalidChildIndex.isConnected||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e,this.ownerDocument.markDirty(this))}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild??=e,this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.isConnected&&this.ownerDocument.queueUpdate()}insertBefore(e,t){if(t==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=t,e.previousSibling=t.previousSibling,e.index=t.index-1,this.firstChild===t?this.firstChild=e:t.previousSibling&&(t.previousSibling.nextSibling=e),t.previousSibling=e,e.parentNode=t.parentNode,this.invalidateChildIndices(e),this.isConnected&&this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode===this&&(this._minInvalidChildIndex===e&&(this._minInvalidChildIndex=null),e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.isConnected&&this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}},J=class e extends q{constructor(e,t){super(t),this.nodeType=8,this.isMutated=!0,this._index=0,this.isHidden=!1,this.node=null}get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof e?this.parentNode.level+ +(this.parentNode.node?.type===`item`):0}getMutableNode(){return this.node==null?null:(this.isMutated||=(this.node=this.node.clone(),!0),this.ownerDocument.markDirty(this),this.node)}updateNode(){let t=this.nextVisibleSibling,n=this.getMutableNode();if(n!=null&&(n.index=this.index,n.level=this.level,n.parentKey=this.parentNode instanceof e?this.parentNode.node?.key??null:null,n.prevKey=this.previousVisibleSibling?.node?.key??null,
1n.nextKey=t?.node?.key??null,n.hasChildNodes=!!this.firstChild,n.firstChildKey=this.firstVisibleChild?.node?.key??null,n.lastChildKey=this.lastVisibleChild?.node?.key??null,(n.colSpan!=null||n.colIndex!=null)&&t)){let e=(n.colIndex??n.index)+(n.colSpan??1);if(t.node!=null&&e!==t.node.colIndex){let n=t.getMutableNode();n.colIndex=e}}}setProps(e,t,n,r,i){let a,{value:o,textValue:s,id:c,...l}=e;if(this.node==null?(a=new n(c??`react-aria-${++this.ownerDocument.nodeId}`),this.node=a):a=this.getMutableNode(),l.ref=t,a.props=l,a.rendered=r,a.render=i,a.value=o,e[`aria-label`]&&(a[`aria-label`]=e[`aria-label`]),a.textValue=s||(typeof l.children==`string`?l.children:``)||e[`aria-label`]||``,c!=null&&c!==a.key)throw Error(`Cannot change the id of an item`);l.colSpan!=null&&(a.colSpan=l.colSpan),this.isConnected&&this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?`none`:``},set display(t){let n=t===`none`;if(e.isHidden!==n){(e.parentNode?.firstVisibleChild===e||e.parentNode?.lastVisibleChild===e)&&e.ownerDocument.markDirty(e.parentNode);let t=e.previousVisibleSibling,r=e.nextVisibleSibling;t&&e.ownerDocument.markDirty(t),r&&e.ownerDocument.markDirty(r),e.isHidden=n,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}},ie=class extends q{constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}get isConnected(){return!0}createElement(e){return new J(e,this)}getMutableCollection(){return this.nextCollection||=this.collection.clone(),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden||e.node==null)return;let t=this.getMutableCollection();if(!t.getItem(e.node.key))for(let t of e)this.addNode(t);t.addNode(e.node)}removeNode(e){for(let t of e)this.removeNode(t);e.node&&this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection:(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let e of this.dirtyNodes)e instanceof J&&(!e.isConnected||e.isHidden)?this.removeNode(e):e.updateChildIndices();for(let e of this.dirtyNodes)e instanceof J?(e.isConnected&&!e.isHidden&&(e.updateNode(),this.addNode(e)),e.node&&this.dirtyNodes.delete(e),e.isMutated=!1):this.dirtyNodes.delete(e);this.nextCollection&&(this.nextCollection.commit(this.firstVisibleChild?.node?.key??null,this.lastVisibleChild?.node?.key??null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null))}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0,this.isSSR||(this.collection=this.collection.clone());for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}};function ae(e){let{children:t,items:n,idScope:r,addIdAndValue:i,dependencies:a=[]}=e,o=(0,j.useMemo)(()=>void 0,[t]),s=(0,j.useMemo)(()=>new WeakMap,[...a,o]);return(0,j.useMemo)(()=>{if(n&&typeof t==`function`){let e=[];for(let a of n){let n=oe(a)?a:null,o=n?s.get(n):null;if(!o){o=t(a);let c=o.props.id??a?.key??a?.id;r!=null&&o.props.id==null&&c!=null&&(c=r+`:`+c);let l=c??e.length;o=(0,j.cloneElement)(o,i?{key:l,id:c,value:a}:{key:l}),n&&s.set(n,o)}e.push(o)}return e}else if(typeof t!=`function`)return t},[t,n,s,r,i])}function oe(e){switch(typeof e){case`object`:return e!=null;case`function`:case`symbol`:return!0;default:return!1}}var se=O(),ce=(0,j.createContext)(!1),Y=(0,j.createContext)(null);function le(e){if((0,j.useContext)(Y))return e.content;let{collection:t,document:n}=pe(e.createCollection);return j.createElement(j.Fragment,null,j.createElement(D,null,j.createElement(Y.Provider,{value:n},e.content)),j.createElement(ue,{render:e.children,collection:t}))}function ue({collection:e,render:t}){return t(e)}function de(e,t,n){let r=m(),i=(0,j.useRef)(r);return i.current=r,(0,se.useSyncExternalStore)(e,(0,j.useCallback)(()=>i.current?n():t(),[t,n]))}var fe=typeof j.useSyncExternalStore==`function`?j.useSyncExternalStore:de;
1function pe(e){let[t]=(0,j.useState)(()=>new ie(e?.()||new G));return{collection:fe((0,j.useCallback)(e=>t.subscribe(e),[t]),(0,j.useCallback)(()=>{let e=t.getCollection();return t.isSSR&&t.resetAfterSSR(),e},[t]),(0,j.useCallback)(()=>(t.isSSR=!0,t.getCollection()),[t])),document:t}}var X=(0,j.createContext)(null);function me(e){return class extends V{static{this.type=e}}}function he(e,t,n,r,i,a){typeof e==`string`&&(e=me(e));let o=(0,j.useCallback)(i=>{i?.setProps(t,n,e,r,a)},[t,n,r,a,e]),s=(0,j.useContext)(X);if(s){let o=s.ownerDocument.nodesByProps.get(t);return o||(o=s.ownerDocument.createElement(e.type),o.setProps(t,n,e,r,a),s.appendChild(o),s.ownerDocument.updateCollection(),s.ownerDocument.nodesByProps.set(t,o)),i?j.createElement(X.Provider,{value:o},i):null}return j.createElement(e.type,{ref:o},i)}function ge(e,t){let n=({node:e})=>t(e.props,e.props.ref,e),r=(0,j.forwardRef)((r,i)=>{let a=(0,j.useContext)(E);if(!(0,j.useContext)(ce)){if(t.length>=3)throw Error(t.name+` cannot be rendered outside a collection.`);return t(r,i)}return he(e,r,i,`children`in r?r.children:null,null,e=>j.createElement(E.Provider,{value:a},j.createElement(n,{node:e})))});return r.displayName=t.name,r}function _e(e){return ae({...e,addIdAndValue:!0})}var ve=(0,j.createContext)(null);function ye(e){let t=(0,j.useContext)(ve),n=(t?.dependencies||[]).concat(e.dependencies),r=e.idScope??t?.idScope,i=_e({...e,idScope:r,dependencies:n});return(0,j.useContext)(Y)&&(i=j.createElement(be,null,i)),t=(0,j.useMemo)(()=>({dependencies:n,idScope:r}),[r,...n]),j.createElement(ve.Provider,{value:t},i)}function be({children:e}){let t=(0,j.useContext)(Y),n=(0,j.useMemo)(()=>j.createElement(Y.Provider,{value:null},j.createElement(ce.Provider,{value:!0},e)),[e]);return m()?j.createElement(X.Provider,{value:t},n):(0,M.createPortal)(n,t)}var xe=(0,j.createContext)(null),Se={CollectionRoot({collection:e,renderDropIndicator:t}){return Ce(e,null,t)},CollectionBranch({collection:e,parent:t,renderDropIndicator:n}){return Ce(e,t,n)}};function Ce(e,t,n){return ae({items:t?e.getChildren(t.key):e,dependencies:[n],children(t){if(t.type===`content`)return j.createElement(j.Fragment,null);let r=t.render(t);return!n||t.type!==`item`?r:j.createElement(j.Fragment,null,n({type:`item`,key:t.key,dropPosition:`before`}),r,we(e,t,n))}})}function we(e,t,n){let r=t.key,i=e.getKeyAfter(r),a=i==null?null:e.getItem(i);for(;a!=null&&a.type!==`item`;)i=e.getKeyAfter(a.key),a=i==null?null:e.getItem(i);let o=t.nextKey==null?null:e.getItem(t.nextKey);for(;o!=null&&o.type!==`item`;)o=o.nextKey==null?null:e.getItem(o.nextKey);let s=[];if(o==null){let r=t;for(;r?.type===`item`&&(!a||r.parentKey!==a.parentKey&&a.level<r.level);){let t=n({type:`item`,key:r.key,dropPosition:`after`});(0,j.isValidElement)(t)&&s.push((0,j.cloneElement)(t,{key:`${r.key}-after`})),r=r.parentKey==null?null:e.getItem(r.parentKey)}}return s}var Te=(0,j.createContext)(Se);function Ee(e){return(0,j.useMemo)(()=>e==null?null:new Set([e]),[e])}function Z(e){return c()?e.altKey:e.ctrlKey}function Q(e,t){let n=`[data-key="${CSS.escape(String(t))}"]`,r=e.current?.dataset.collection;return r&&(n=`[data-collection="${CSS.escape(r)}"]${n}`),e.current?.querySelector(n)}var De=new WeakMap;function Oe(e){let t=y();return De.set(e,t),t}function ke(e){return De.get(e)}var Ae=1e3;function je(e){let{keyboardDelegate:t,selectionManager:n,onTypeSelect:r}=e,i=(0,j.useRef)({search:``,timeout:void 0});return(0,j.useEffect)(()=>{let e=i.current.timeout;return()=>{clearTimeout(e)}},[i]),{typeSelectProps:{onKeyDownCapture:t.getKeyForSearch?e=>{if(i.current.search.length>0&&e.key===` `){if(e.preventDefault(),(!(`continuePropagation`in e)||`continuePropagation`in e&&!e.isPropagationStopped())&&e.stopPropagation(),i.current.search+=` `,t.getKeyForSearch!=null){let e=t.getKeyForSearch(i.current.search,n.focusedKey);e??=t.getKeyForSearch(i.current.search),e!=null&&(n.setFocusedKey(e),r&&r(e))}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},Ae)}}:void 0,onKeyDown:t.getKeyForSearch?e=>{let s=Me(e.key);if(!(!s||e.ctrlKey||e.metaKey||e.altKey||!o(e.currentTarget,a(e))||i.current.search.length===0&&s===` `)){if(i.current.search+=s,t.getKeyForSearch!=null){let a=t.getKeyForSearch(i.current.search,n.focusedKey);if(a??=t.getKeyForSearch(i.current.search),a!=null)n.setFocusedKey(a),r&&r(a),e.preventDefault(),`continuePropagation`in e||e.stopPropagation();else{i.current.search=``,clearTimeout(i.current.timeout),i.current.timeout=void 0;return}}clearTimeout(i.current.timeout),i.current.timeout=setTimeout(()=>{i.current.search=``},Ae)}}:void 0}}}function Me(e){return e.length===1||!/^[A-Z]/i.test(e)?e:``}function Ne(e,t){let n=(0,j.useRef)(!0),r=(0,j.useRef)(null);_(()=>(n.current=!0,()=>{n.current=!1}),[]),_(()=>{n.current?n.current=!1:(!r.current||t.some((e,t)=>!Object.is(e,r[t])))&&e(),r.current=t},t)}function Pe(e){let{selectionManager:t,keyboardDelegate:n,ref:s,autoFocus:c=!1,shouldFocusWrap:l=!1,disallowEmptySelection:p=!1,disallowSelectAll:m=!1,escapeKeyBehavior:g=`clearSelection`,selectOnFocus:_=t.selectionBehavior===`replace`,disallowTypeAhead:v=!1,shouldUseVirtualFocus:y,allowsTabNavigation:ee=!1,scrollRef:b=s,linkBehavior:T=`action`,UNSTABLE_focusOnEntry:E}=e,{direction:D}=i(),O=te(),k=e=>{if(e.altKey&&e.key===`Tab`&&e.preventDefault(),!s.current||!o(s.current,a(e)))return;let i=(n,r)=>{if(n!=null){if(t.isLink(n)&&T===`selection`&&_&&!Z(e)){(0,M.flushSync)(()=>{t.setFocusedKey(n,r)});let i=Q(s,n),a=t.getItemProps(n);i&&O.open(i,e,a.href,a.routerOptions);return}if(t.setFocusedKey(n,r),t.isLink(n)&&T===`override`)return;e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(n):_&&!Z(e)&&t.replaceSelection(n)}};switch(e.key){case`ArrowDown`:if(n.getKeyBelow){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyBelow?.(t.focusedKey);r==null&&l&&(r=n.getFirstKey?.(t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowUp`:if(n.getKeyAbove){let r=t.focusedKey==null?n.getLastKey?.():n.getKeyAbove?.(t.focusedKey);r==null&&l&&(r=n.getLastKey?.(t.focusedKey)),r!=null&&(e.preventDefault(),i(r))}break;case`ArrowLeft`:if(n.getKeyLeftOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyLeftOf?.(t.focusedKey);r==null&&l&&(r=D===`rtl`?n.getFirstKey?.(t.focusedKey):n.getLastKey?.(t.focusedKey)),r!=null&&(e.preventDefault(),i(r,D===`rtl`?`first`:`last`))}break;case`ArrowRight`:if(n.getKeyRightOf){let r=t.focusedKey==null?n.getFirstKey?.():n.getKeyRightOf?.(t.focusedKey);r==null&&l&&(r=D===`rtl`?n.getLastKey?.(t.focusedKey):n.getFirstKey?.(t.focusedKey)),r!=null&&(e.preventDefault(),i(r,D===`rtl`?`last`:`first`))}break;case`Home`:if(n.getFirstKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getFirstKey(t.focusedKey,R(e));t.setFocusedKey(r),r!=null&&(R(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):_&&t.replaceSelection(r))}break;case`End`:if(n.getLastKey){if(t.focusedKey===null&&e.shiftKey)return;e.preventDefault();let r=n.getLastKey(t.focusedKey,R(e));t.setFocusedKey(r),r!=null&&(R(e)&&e.shiftKey&&t.selectionMode===`multiple`?t.extendSelection(r):_&&t.replaceSelection(r))}break;
1case`PageDown`:if(n.getKeyPageBelow&&t.focusedKey!=null){let r=n.getKeyPageBelow(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`PageUp`:if(n.getKeyPageAbove&&t.focusedKey!=null){let r=n.getKeyPageAbove(t.focusedKey);r!=null&&(e.preventDefault(),i(r))}break;case`a`:R(e)&&t.selectionMode===`multiple`&&m!==!0&&(e.preventDefault(),t.selectAll());break;case`Escape`:g===`clearSelection`&&!p&&t.selectedKeys.size!==0&&(e.stopPropagation(),e.preventDefault(),t.clearSelection());break;case`Tab`:if(!ee){if(e.shiftKey)s.current.focus();else{let e=A(s.current,{tabbable:!0}),t,n;do n=e.lastChild(),n&&(t=n);while(n);let i=f();t&&(!u(t)||i&&!r(i))&&d(t)}break}}},F=(0,j.useRef)({top:0,left:0});S(b,`scroll`,()=>{F.current={top:b.current?.scrollTop??0,left:b.current?.scrollLeft??0}});let L=e=>{if(t.isFocused){o(e.currentTarget,a(e))||t.setFocused(!1);return}if(!o(e.currentTarget,a(e)))return;let r=ne();t.setFocused(!0);let i=e=>{e!=null&&(t.setFocusedKey(e),_&&!t.isSelected(e)&&t.replaceSelection(e))};if(E&&(r===`keyboard`||r===`virtual`))i(E===`first`?n.getFirstKey?.():n.getLastKey?.());else if(t.focusedKey==null){let r=e.relatedTarget;r&&e.currentTarget.compareDocumentPosition(r)&Node.DOCUMENT_POSITION_FOLLOWING?i(t.lastSelectedKey??n.getLastKey?.()):i(t.firstSelectedKey??n.getFirstKey?.())}else b.current&&(b.current.scrollTop=F.current.top,b.current.scrollLeft=F.current.left);if(t.focusedKey!=null&&b.current){let e=Q(s,t.focusedKey);e instanceof HTMLElement&&(!u(e)&&!y&&d(e),(r===`keyboard`||E&&r===`virtual`)&&w(e,{containingElement:s.current}))}},z=e=>{o(e.currentTarget,e.relatedTarget)||t.setFocused(!1)},B=(0,j.useRef)(!1);S(s,P,y?e=>{let{detail:n}=e;
1e.stopPropagation(),t.setFocused(!0),n?.focusStrategy===`first`&&(B.current=!0)}:void 0);let V=n.getFirstKey?.()??null;Ne(()=>{if(B.current)if(V==null){let e=f();re(s.current),I(e,null),t.collection.size>0&&(B.current=!1)}else t.setFocusedKey(V),B.current=!1},[V,t.collection.size]),Ne(()=>{t.collection.size>0&&(B.current=!1)},[t.focusedKey]),S(s,N,y?e=>{e.stopPropagation(),t.setFocused(!1),e.detail?.clearFocusKey&&t.setFocusedKey(null)}:void 0);let H=(0,j.useRef)(c),U=(0,j.useRef)(!1);(0,j.useEffect)(()=>{if(H.current){let e=null;c===`first`&&(e=n.getFirstKey?.()??null),c===`last`&&(e=n.getLastKey?.()??null);let r=t.selectedKeys;if(r.size){for(let n of r)if(t.canSelectItem(n)){e=n;break}}t.setFocused(!0),t.setFocusedKey(e),e==null&&!y&&s.current&&x(s.current),t.collection.size>0&&(H.current=!1,U.current=!0)}});let W=(0,j.useRef)(t.focusedKey),G=(0,j.useRef)(null);(0,j.useEffect)(()=>{if(t.isFocused&&t.focusedKey!=null&&(t.focusedKey!==W.current||U.current)&&b.current&&s.current){let e=ne(),n=Q(s,t.focusedKey);if(!(n instanceof HTMLElement))return;(e===`keyboard`||U.current)&&(G.current&&cancelAnimationFrame(G.current),G.current=requestAnimationFrame(()=>{b.current&&(C(b.current,n),e!==`virtual`&&w(n,{containingElement:s.current}))}))}
vendor: 10,218 bytes, line 1
1!y&&t.isFocused&&t.focusedKey==null&&W.current!=null&&s.current&&x(s.current),W.current=t.focusedKey,U.current=!1}),(0,j.useEffect)(()=>()=>{G.current&&cancelAnimationFrame(G.current)},[]),S(s,`react-aria-focus-scope-restore`,e=>{e.preventDefault(),t.setFocused(!0)});let K={onKeyDown:k,onFocus:L,onBlur:z,onMouseDown(e){b.current===a(e)&&e.preventDefault()}},{typeSelectProps:q}=je({keyboardDelegate:n,selectionManager:t});v||(K=h(q,K));let J;y||(J=t.focusedKey==null?0:-1);let ie=Oe(t.collection);return{collectionProps:h(K,{tabIndex:J,"data-collection":ie})}}var Fe=500;function Ie(e){let{isDisabled:t,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:a=Fe,accessibilityDescription:o}=e,c=(0,j.useRef)(void 0),{addGlobalListener:l,removeGlobalListener:u}=p(),{pressProps:f}=k({isDisabled:t,onPressStart(e){if(e.continuePropagation(),(e.pointerType===`mouse`||e.pointerType===`touch`)&&(n&&n({...e,type:`longpressstart`}),c.current=setTimeout(()=>{e.target.dispatchEvent(new PointerEvent(`pointercancel`,{bubbles:!0})),v(e.target).activeElement!==e.target&&d(e.target),i&&i({...e,type:`longpress`}),c.current=void 0},a),e.pointerType===`touch`)){let t=e=>{e.preventDefault()},n=s(e.target);l(e.target,`contextmenu`,t,{once:!0}),l(n,`pointerup`,()=>{setTimeout(()=>{u(e.target,`contextmenu`,t)},30)},{once:!0})}},onPressEnd(e){c.current&&clearTimeout(c.current),r&&(e.pointerType===`mouse`||e.pointerType===`touch`)&&r({...e,type:`longpressend`})}});return{longPressProps:h(f,T(i&&!t?o:void 0))}}function Le(e){let{id:t,selectionManager:n,key:r,ref:i,shouldSelectOnPressUp:o,shouldUseVirtualFocus:s,focus:c,isDisabled:l,onAction:u,allowsDifferentPressOrigin:d,linkBehavior:p=`action`}=e,m=te();t=y(t);let g=e=>{if(e.pointerType===`keyboard`&&Z(e))n.toggleSelection(r);else{if(n.selectionMode===`none`)return;if(n.isLink(r)){if(p===`selection`&&i.current){let t=n.getItemProps(r);m.open(i.current,e,t.href,t.routerOptions),n.setSelectedKeys(n.selectedKeys);return}else if(p===`override`||p===`none`)return}n.selectionMode===`single`?n.isSelected(r)&&!n.disallowEmptySelection?n.toggleSelection(r):n.replaceSelection(r):e&&e.shiftKey?n.extendSelection(r):n.selectionBehavior===`toggle`||e&&(R(e)||e.pointerType===`touch`||e.pointerType===`virtual`)?n.toggleSelection(r):n.replaceSelection(r)}};(0,j.useEffect)(()=>{r===n.focusedKey&&n.isFocused&&(s?re(i.current):c?c():f()!==i.current&&i.current&&x(i.current))},[i,r,n.focusedKey,n.childFocusStrategy,n.isFocused,s]),l||=n.isDisabled(r);let _={};!s&&!l?_={tabIndex:r===n.focusedKey?0:-1,onFocus(e){a(e)===i.current&&n.setFocusedKey(r)}}:l&&(_.onMouseDown=e=>{e.preventDefault()}),(0,j.useEffect)(()=>{l&&n.focusedKey===r&&n.setFocusedKey(null)},[n,l,r]);let v=n.isLink(r)&&p===`override`,ne=u&&e.UNSTABLE_itemBehavior===`action`,S=n.isLink(r)&&p!==`selection`&&p!==`none`,C=!l&&n.canSelectItem(r)&&!v&&!ne,w=(u||S)&&!l,T=w&&(n.selectionBehavior===`replace`?!C:!C||n.isEmpty),E=w&&C&&n.selectionBehavior===`replace`,D=T||E,O=(0,j.useRef)(null),A=D&&C,M=(0,j.useRef)(!1),N=(0,j.useRef)(!1),P=n.getItemProps(r),F=e=>{u&&(u(),i.current?.dispatchEvent(new CustomEvent(`react-aria-item-action`,{bubbles:!0}))),S&&i.current&&m.open(i.current,e,P.href,P.routerOptions)},I={ref:i};if(o?(I.onPressStart=e=>{O.current=e.pointerType,M.current=A,e.pointerType===`keyboard`&&(!D||ze(e.key))&&g(e)},d?(I.onPressUp=T?void 0:e=>{e.pointerType===`mouse`&&C&&g(e)},I.onPress=T?F:e=>{e.pointerType!==`keyboard`&&e.pointerType!==`mouse`&&C&&g(e)}):I.onPress=e=>{if(T||E&&e.pointerType!==`mouse`){if(e.pointerType===`keyboard`&&!Re(e.key))return;F(e)}else e.pointerType!==`keyboard`&&C&&g(e)}):(I.onPressStart=e=>{O.current=e.pointerType,M.current=A,N.current=T,C&&(e.pointerType===`mouse`&&!T||e.pointerType===`keyboard`&&(!w||ze(e.key)))&&g(e)},I.onPress=e=>{(e.pointerType===`touch`||e.pointerType===`pen`||e.pointerType===`virtual`||e.pointerType===`keyboard`&&D&&Re(e.key)||e.pointerType===`mouse`&&N.current)&&(D?F(e):C&&g(e))}),_[`data-collection`]=ke(n.collection),_[`data-key`]=r,I.preventFocusOnPress=s,s&&(I=h(I,{onPressStart(e){e.pointerType!==`touch`&&(n.setFocused(!0),n.setFocusedKey(r))},onPress(e){e.pointerType===`touch`&&(n.setFocused(!0),n.setFocusedKey(r))}})),P)for(let e of[`onPressStart`,`onPressEnd`,`onPressChange`,`onPress`,`onPressUp`,`onClick`])P[e]&&(I[e]=ee(I[e],P[e]));let{pressProps:L,isPressed:z}=k(I),B=E?e=>{O.current===`mouse`&&(e.stopPropagation(),e.preventDefault(),F(e))}:void 0,{longPressProps:V}=Ie({isDisabled:!A,onLongPress(e){e.pointerType===`touch`&&(g(e),n.setSelectionBehavior(`toggle`))}}),H=e=>{O.current===`touch`&&M.current&&e.preventDefault()},U=p!==`none`&&n.isLink(r)?e=>{b.isOpening||e.preventDefault()}:void 0;return{itemProps:h(_,C||T||s&&!l?L:{},A?V:{},{onDoubleClick:B,onDragStartCapture:H,onClick:U,id:t},s?{onMouseDown:e=>e.preventDefault()}:void 0),isPressed:z,isSelected:n.isSelected(r),isFocused:n.isFocused&&n.focusedKey===r,isDisabled:l,allowsSelection:C,hasAction:D}}function Re(e){return e===`Enter`}function ze(e){return e===` `}function Be(e,t){return typeof t.getChildren==`function`?t.getChildren(e.key):e.childNodes}function Ve(e){return He(e,0)}function He(e,t){if(t<0)return;let n=0;for(let r of e){if(n===t)return r;n++}}function Ue(e,t,n){if(t.parentKey===n.parentKey)return t.index-n.index;let r=[...We(e,t),t],i=[...We(e,n),n],a=r.slice(0,i.length).findIndex((e,t)=>e!==i[t]);return a===-1?r.findIndex(e=>e===n)>=0?1:(i.findIndex(e=>e===t),-1):(t=r[a],n=i[a],t.index-n.index)}function We(e,t){let n=[],r=t;for(;r?.parentKey!=null;)r=e.getItem(r.parentKey),r&&n.unshift(r);return n}var $=class e extends Set{constructor(t,n,r){super(t),t instanceof e?(this.anchorKey=n??t.anchorKey,this.currentKey=r??t.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}};function Ge(e,t){if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;return!0}function Ke(e){let{selectionMode:t=`none`,disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:i=`toggle`,disabledBehavior:a=`all`}=e,o=(0,j.useRef)(!1),[,s]=(0,j.useState)(!1),c=(0,j.useRef)(null),u=(0,j.useRef)(null),[,d]=(0,j.useState)(null),[f,p]=l((0,j.useMemo)(()=>qe(e.selectedKeys),[e.selectedKeys]),(0,j.useMemo)(()=>qe(e.defaultSelectedKeys,new $),[e.defaultSelectedKeys]),e.onSelectionChange),m=(0,j.useMemo)(()=>e.disabledKeys?new Set(e.disabledKeys):new Set,[e.disabledKeys]),[h,g]=(0,j.useState)(i);i===`replace`&&h===`toggle`&&typeof f==`object`&&f.size===0&&g(`replace`);let _=(0,j.useRef)(i);return(0,j.useEffect)(()=>{i!==_.current&&(g(i),_.current=i)},[i]),{selectionMode:t,disallowEmptySelection:n,selectionBehavior:h,setSelectionBehavior:g,get isFocused(){return o.current},setFocused(e){o.current=e,s(e)},get focusedKey(){return c.current},get childFocusStrategy(){return u.current},setFocusedKey(e,t=`first`){c.current=e,u.current=t,d(e)},selectedKeys:f,setSelectedKeys(e){(r||!Ge(e,f))&&p(e)},disabledKeys:m,disabledBehavior:a}}function qe(e,t){return e?e===`all`?`all`:new $(e):t}var Je=class e{constructor(e,t,n){this.collection=e,this.state=t,this.allowsCellSelection=n?.allowsCellSelection??!1,this._isSelectAll=null,this.layoutDelegate=n?.layoutDelegate||null,this.fullCollection=n?.fullCollection||null}get selectionMode(){return this.state.selectionMode}get disallowEmptySelection(){return this.state.disallowEmptySelection}get selectionBehavior(){return this.state.selectionBehavior}setSelectionBehavior(e){this.state.setSelectionBehavior(e)}get isFocused(){return this.state.isFocused}setFocused(e){this.state.setFocused(e)}get focusedKey(){return this.state.focusedKey}get childFocusStrategy(){return this.state.childFocusStrategy}setFocusedKey(e,t){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,t)}get selectedKeys(){return this.state.selectedKeys===`all`?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){if(this.state.selectionMode===`none`)return!1;let t=this.getKey(e);return t==null?!1:this.state.selectedKeys===`all`?this.canSelectItem(t):this.state.selectedKeys.has(t)}get isEmpty(){return this.state.selectedKeys!==`all`&&this.state.selectedKeys.size===0}get isSelectAll(){if(this.isEmpty)return!1;if(this.state.selectedKeys===`all`)return!0;if(this._isSelectAll!=null)return this._isSelectAll;let e=this.getSelectAllKeys(),t=this.state.selectedKeys;return this._isSelectAll=e.every(e=>t.has(e)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Ue(this.collection,n,e)<0)&&(e=n)}return e?.key??null}get lastSelectedKey(){let e=null;for(let t of this.state.selectedKeys){let n=this.collection.getItem(t);(!e||n&&Ue(this.collection,n,e)>0)&&(e=n)}return e?.key??null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;let n;if(this.state.selectedKeys===`all`)n=new $([t],t,t);else{let e=this.state.selectedKeys,r=e.anchorKey??t;n=new $(e,r,t);for(let i of this.getKeyRange(r,e.currentKey??t))n.delete(i);for(let e of this.getKeyRange(t,r))this.canSelectItem(e)&&n.add(e)}this.state.setSelectedKeys(n)}getKeyRange(e,t){let n=this.collection.getItem(e),r=this.collection.getItem(t);return n&&r?Ue(this.collection,n,r)<=0?this.getKeyRangeInternal(e,t):this.getKeyRangeInternal(t,e):[]}getKeyRangeInternal(e,t){if(this.layoutDelegate?.getKeyRange)return this.layoutDelegate.getKeyRange(e,t);let n=[],r=e;for(;r!=null;){let e=this.collection.getItem(r);if(e&&(e.type===`item`||e.type===`cell`&&this.allowsCellSelection)&&n.push(r),r===t)return n;r=this.collection.getKeyAfter(r)}return[]}getKey(e){let t=this.collection.getItem(e);if(!t||t.type===`cell`&&this.allowsCellSelection)return e;for(;t&&t.type!==`item`&&t.parentKey!=null;)t=this.collection.getItem(t.parentKey);return!t||t.type!==`item`?null:t.key}toggleSelection(e){if(this.selectionMode===`none`)return;if(this.selectionMode===`single`&&!this.isSelected(e)){this.replaceSelection(e);return}let t=this.getKey(e);if(t==null)return;
1let n=new $(this.state.selectedKeys===`all`?this.getSelectAllKeys():this.state.selectedKeys);n.has(t)?n.delete(t):this.canSelectItem(t)&&(n.add(t),n.anchorKey=t,n.currentKey=t),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode===`none`)return;let t=this.getKey(e);if(t==null)return;let n=this.canSelectItem(t)?new $([t],t,t):new $;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode===`none`)return;let t=new $;for(let n of e){let e=this.getKey(n);if(e!=null&&(t.add(e),this.selectionMode===`single`))break}this.state.setSelectedKeys(t)}getSelectAllKeys(){let e=this.fullCollection??this.collection,t=[],n=r=>{for(;r!=null;){if(this.canSelectItemIn(r,e)){let i=e.getItem(r);i?.type===`item`&&t.push(r),i?.hasChildNodes&&(this.allowsCellSelection||i.type!==`item`)&&n(Ve(Be(i,e))?.key??null)}r=e.getKeyAfter(r)}};return n(e.getFirstKey()),t}selectAll(){!this.isSelectAll&&this.selectionMode===`multiple`&&this.state.setSelectedKeys(`all`)}clearSelection(){!this.disallowEmptySelection&&(this.state.selectedKeys===`all`||this.state.selectedKeys.size>0)&&this.state.setSelectedKeys(new $)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,t){this.selectionMode!==`none`&&(this.selectionMode===`single`?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior===`toggle`||t&&(t.pointerType===`touch`||t.pointerType===`virtual`)?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let t=this.selectedKeys;if(e.size!==t.size)return!1;for(let n of e)if(!t.has(n))return!1;for(let n of t)if(!e.has(n))return!1;return!0}canSelectItem(e){return this.canSelectItemIn(e,this.collection)}canSelectItemIn(e,t){if(this.state.selectionMode===`none`||this.state.disabledKeys.has(e))return!1;let n=t.getItem(e);return!(!n||n?.props?.isDisabled||n.type===`cell`&&!this.allowsCellSelection)}isDisabled(e){let t=this.collection.getItem(e);return this.state.disabledBehavior===`all`&&(this.state.disabledKeys.has(e)||!!t?.props?.isDisabled)&&t?.props?.disabledBehavior!==`selection`}isLink(e){return!!this.collection.getItem(e)?.props?.href}getItemProps(e){return this.collection.getItem(e)?.props}withCollection(t){return new e(t,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0,fullCollection:this.fullCollection??this.collection})}},Ye=class{build(e,t){return this.context=t,Xe(()=>this.iterateCollection(e))}*iterateCollection(e){let{children:t,items:n}=e;if(j.isValidElement(t)&&t.type===j.Fragment)yield*this.iterateCollection({children:t.props.children,items:n});else if(typeof t==`function`){if(!n)throw Error(`props.children was a function but props.items is missing`);let e=0;for(let r of n)yield*this.getFullNode({value:r,index:e},{renderer:t}),e++}else{let e=[];j.Children.forEach(t,t=>{t&&e.push(t)});let n=0;for(let t of e){let e=this.getFullNode({element:t,index:n},{});for(let t of e)n++,yield t}}}
vendor: 2,725 bytes, line 1
1getKey(e,t,n,r){if(e.key!=null)return e.key;if(t.type===`cell`&&t.key!=null)return`${r}${t.key}`;let i=t.value;if(i!=null){let e=i.key??i.id;if(e==null)throw Error(`No key found for item`);return e}return r?`${r}.${t.index}`:`$.${t.index}`}getChildState(e,t){return{renderer:t.renderer||e.renderer}}*getFullNode(e,t,n,r){if(j.isValidElement(e.element)&&e.element.type===j.Fragment){let i=[];j.Children.forEach(e.element.props.children,e=>{i.push(e)});let a=e.index??0;for(let e of i)yield*this.getFullNode({element:e,index:a++},t,n,r);return}let i=e.element;if(!i&&e.value&&t&&t.renderer){let n=this.cache.get(e.value);if(n&&(!n.shouldInvalidate||!n.shouldInvalidate(this.context))){n.index=e.index,n.parentKey=r?r.key:null,yield n;return}i=t.renderer(e.value)}if(j.isValidElement(i)){let a=i.type;if(typeof a!=`function`&&typeof a.getCollectionNode!=`function`){let e=i.type;throw Error(`Unknown element <${e}> in collection.`)}let o=a.getCollectionNode(i.props,this.context),s=e.index??0,c=o.next();for(;!c.done&&c.value;){let a=c.value;e.index=s;let l=a.key??null;l??=a.element?null:this.getKey(i,e,t,n);let u=[...this.getFullNode({...a,key:l,index:s,wrapper:Ze(e.wrapper,a.wrapper)},this.getChildState(t,a),n?`${n}${i.key}`:i.key,r)];for(let t of u){if(t.value=a.value??e.value??null,t.value&&this.cache.set(t.value,t),e.type&&t.type!==e.type)throw Error(`Unsupported type <${Qe(t.type)}> in <${Qe(r?.type??`unknown parent type`)}>. Only <${Qe(e.type)}> is supported.`);s++,yield t}c=o.next(u)}return}if(e.key==null||e.type==null)return;let a=this,o={type:e.type,props:e.props,key:e.key,parentKey:r?r.key:null,value:e.value??null,level:(r?.level??0)+ +(r?.type===`item`),index:e.index,rendered:e.rendered,textValue:e.textValue??``,"aria-label":e[`aria-label`],wrapper:e.wrapper,shouldInvalidate:e.shouldInvalidate,hasChildNodes:e.hasChildNodes||!1,childNodes:Xe(function*(){if(!e.hasChildNodes||!e.childNodes)return;let n=0;for(let r of e.childNodes()){r.key!=null&&(r.key=`${o.key}${r.key}`);let e=a.getFullNode({...r,index:n},a.getChildState(t,r),o.key,o);for(let t of e)n++,yield t}})};yield o}constructor(){this.cache=new WeakMap}};function Xe(e){let t=[],n=null;return{*[Symbol.iterator](){for(let e of t)yield e;n||=e();for(let e of n)t.push(e),yield e}}}function Ze(e,t){if(e&&t)return n=>e(t(n));if(e)return e;if(t)return t}function Qe(e){return e[0].toUpperCase()+e.slice(1)}function $e(e,t,n){let r=(0,j.useMemo)(()=>new Ye,[]),{children:i,items:a,collection:o}=e;return(0,j.useMemo)(()=>o||t(r.build({children:i,items:a},n)),[r,i,a,o,n,t])}export{U as _,Le as a,B as b,Q as c,Ee as d,Se as f,ye as g,le as h,Be as i,we as l,ge as m,Je as n,Ie as o,xe as p,Ke as r,Pe as s,$e as t,Te as u,V as v,I as x,W as y};
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.