@sps-woodland/tabs 7.17.13 → 7.19.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/{index.es.js → index.js} +699 -699
- package/lib/index.umd.cjs +64 -0
- package/lib/style.css +1 -1
- package/package.json +10 -10
- package/sps-woodland-tabs-7.19.0.tgz +0 -0
- package/vite.config.js +13 -4
- package/lib/index.cjs.js +0 -64
@@ -0,0 +1,64 @@
|
|
1
|
+
(function(I,f){typeof exports=="object"&&typeof module<"u"?f(exports,require("react"),require("@react-stately/collections"),require("react-dom"),require("@sps-woodland/core"),require("@spscommerce/utils")):typeof define=="function"&&define.amd?define(["exports","react","@react-stately/collections","react-dom","@sps-woodland/core","@spscommerce/utils"],f):(I=typeof globalThis<"u"?globalThis:I||self,f(I.Tabs={},I.$73SJx$react,I.collections,I.reactDom,I.core,I.utils))})(this,function(I,f,X,Lt,F,ze){"use strict";const Ct=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function It(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const n in t)if(n!=="default"){const r=Object.getOwnPropertyDescriptor(t,n);Object.defineProperty(e,n,r.get?r:{enumerable:!0,get:()=>t[n]})}}return e.default=t,Object.freeze(e)}const O=Ct(f),z=It(f);function Re(t,e,n){let[r,i]=f.useState(t||e),l=f.useRef(t!==void 0),o=t!==void 0;f.useEffect(()=>{let h=l.current;h!==o&&console.warn(`WARN: A component changed from ${h?"controlled":"uncontrolled"} to ${o?"controlled":"uncontrolled"}.`),l.current=o},[o]);let u=o?t:r,p=f.useCallback((h,...g)=>{let S=(m,...v)=>{n&&(Object.is(u,m)||n(m,...v)),o||(u=m)};typeof h=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((v,...M)=>{let P=h(o?u:v,...M);return S(P,...g),o?v:P})):(o||i(h),S(h,...g))},[o,u,n]);return[u,p]}class A extends Set{constructor(e,n,r){super(e),e instanceof A?(this.anchorKey=n||e.anchorKey,this.currentKey=r||e.currentKey):(this.anchorKey=n,this.currentKey=r)}}function Dt(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function At(t){let{selectionMode:e="none",disallowEmptySelection:n,allowDuplicateSelectionEvents:r,selectionBehavior:i="toggle",disabledBehavior:l="all"}=t,o=f.useRef(!1),[,u]=f.useState(!1),p=f.useRef(null),h=f.useRef(null),[,g]=f.useState(null),S=f.useMemo(()=>Ne(t.selectedKeys),[t.selectedKeys]),m=f.useMemo(()=>Ne(t.defaultSelectedKeys,new A),[t.defaultSelectedKeys]),[v,M]=Re(S,m,t.onSelectionChange),P=f.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[T,x]=f.useState(i);i==="replace"&&T==="toggle"&&typeof v=="object"&&v.size===0&&x("replace");let k=f.useRef(i);return f.useEffect(()=>{i!==k.current&&(x(i),k.current=i)},[i]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:T,setSelectionBehavior:x,get isFocused(){return o.current},setFocused(_){o.current=_,u(_)},get focusedKey(){return p.current},get childFocusStrategy(){return h.current},setFocusedKey(_,L="first"){p.current=_,h.current=L,g(_)},selectedKeys:v,setSelectedKeys(_){(r||!Dt(_,v))&&M(_)},disabledKeys:P,disabledBehavior:l}}function Ne(t,e){return t?t==="all"?"all":new A(t):e}class Ft{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,n){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,n)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){return this.state.selectionMode==="none"?!1:(e=this.getKey(e),this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e))}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(),n=this.state.selectedKeys;return this._isSelectAll=e.every(r=>n.has(r)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&X.compareNodeOrder(this.collection,r,e)<0)&&(e=r)}return e==null?void 0:e.key}get lastSelectedKey(){let e=null;for(let n of this.state.selectedKeys){let r=this.collection.getItem(n);(!e||r&&X.compareNodeOrder(this.collection,r,e)>0)&&(e=r)}return e==null?void 0:e.key}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}e=this.getKey(e);let n;if(this.state.selectedKeys==="all")n=new A([e],e,e);else{let r=this.state.selectedKeys,i=r.anchorKey||e;n=new A(r,i,e);for(let l of this.getKeyRange(i,r.currentKey||e))n.delete(l);for(let l of this.getKeyRange(e,i))this.canSelectItem(l)&&n.add(l)}this.state.setSelectedKeys(n)}getKeyRange(e,n){let r=this.collection.getItem(e),i=this.collection.getItem(n);return r&&i?X.compareNodeOrder(this.collection,r,i)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){let r=[],i=e;for(;i;){let l=this.collection.getItem(i);if((l&&l.type==="item"||l.type==="cell"&&this.allowsCellSelection)&&r.push(i),i===n)return r;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n.type!=="item"&&n.parentKey!=null;)n=this.collection.getItem(n.parentKey);return!n||n.type!=="item"?null:n.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}if(e=this.getKey(e),e==null)return;let n=new A(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);n.has(e)?n.delete(e):this.canSelectItem(e)&&(n.add(e),n.anchorKey=e,n.currentKey=e),!(this.disallowEmptySelection&&n.size===0)&&this.state.setSelectedKeys(n)}replaceSelection(e){if(this.selectionMode==="none"||(e=this.getKey(e),e==null))return;let n=this.canSelectItem(e)?new A([e],e,e):new A;this.state.setSelectedKeys(n)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new A;for(let r of e)if(r=this.getKey(r),r!=null&&(n.add(r),this.selectionMode==="single"))break;this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r;){if(this.canSelectItem(r)){let i=this.collection.getItem(r);i.type==="item"&&e.push(r),i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n(X.getFirstItem(X.getChildNodes(i,this.collection)).key)}r=this.collection.getKeyAfter(r)}};return n(this.collection.getFirstKey()),e}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 A)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,n){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||n&&(n.pointerType==="touch"||n.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let n=this.selectedKeys;if(e.size!==n.size)return!1;for(let r of e)if(!n.has(r))return!1;for(let r of n)if(!e.has(r))return!1;return!0}canSelectItem(e){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let n=this.collection.getItem(e);return!(!n||n.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){return this.state.disabledKeys.has(e)&&this.state.disabledBehavior==="all"}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}constructor(e,n,r){this.collection=e,this.state=n;var i;this.allowsCellSelection=(i=r==null?void 0:r.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null}}class Be{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);return n?n.prevKey:null}getKeyAfter(e){let n=this.keyMap.get(e);return n?n.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){let n=this.keyMap.get(e);return(n==null?void 0:n.childNodes)||[]}constructor(e){this.keyMap=new Map,this.iterable=e;let n=l=>{if(this.keyMap.set(l.key,l),l.childNodes&&l.type==="section")for(let o of l.childNodes)n(o)};for(let l of e)n(l);let r,i=0;for(let[l,o]of this.keyMap)r?(r.nextKey=l,o.prevKey=r.key):(this.firstKey=l,o.prevKey=void 0),o.type==="item"&&(o.index=i++),r=o,r.nextKey=void 0;this.lastKey=r==null?void 0:r.key}}function Ot(t){let{filter:e}=t,n=At(t),r=f.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=f.useCallback(h=>e?new Be(e(h)):new Be(h),[e]),l=f.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),o=X.useCollection(t,i,l),u=f.useMemo(()=>new Ft(o,n),[o,n]);const p=f.useRef(null);return f.useEffect(()=>{if(n.focusedKey!=null&&!o.getItem(n.focusedKey)){const h=p.current.getItem(n.focusedKey),g=[...p.current.getKeys()].map(P=>{const T=p.current.getItem(P);return T.type==="item"?T:null}).filter(P=>P!==null),S=[...o.getKeys()].map(P=>{const T=o.getItem(P);return T.type==="item"?T:null}).filter(P=>P!==null),m=g.length-S.length;let v=Math.min(m>1?Math.max(h.index-m+1,0):h.index,S.length-1),M;for(;v>=0;){if(!u.isDisabled(S[v].key)){M=S[v];break}v<S.length-1?v++:(v>h.index&&(v=h.index),v--)}n.setFocusedKey(M?M.key:null)}p.current=o},[o,u,n,n.focusedKey]),{collection:o,disabledKeys:r,selectionManager:u}}function zt(t){var e;let[n,r]=Re(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=f.useMemo(()=>n!=null?[n]:[],[n]),{collection:l,disabledKeys:o,selectionManager:u}=Ot({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:h=>{var g;let S=(g=h.values().next().value)!==null&&g!==void 0?g:null;S===n&&t.onSelectionChange&&t.onSelectionChange(S),r(S)}}),p=n!=null?l.getItem(n):null;return{collection:l,disabledKeys:o,selectionManager:u,selectedKey:n,setSelectedKey:r,selectedItem:p}}function Rt(t){var e;let n=zt({...t,suppressTextValueWarning:!0,defaultSelectedKey:(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Ue(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)}),{selectionManager:r,collection:i,selectedKey:l}=n,o=f.useRef(l);return f.useEffect(()=>{let u=l;(r.isEmpty||!i.getItem(u))&&(u=Ue(i,n.disabledKeys),u!=null&&r.setSelectedKeys([u])),(u!=null&&r.focusedKey==null||!r.isFocused&&u!==o.current)&&r.setFocusedKey(u),o.current=u}),{...n,isDisabled:t.isDisabled||!1}}function Ue(t,e){let n=null;if(t){for(n=t.getFirstKey();e.has(n)&&n!==t.getLastKey();)n=t.getKeyAfter(n);e.has(n)&&n===t.getLastKey()&&(n=t.getFirstKey())}return n}const le={prefix:String(Math.round(Math.random()*1e10)),current:0},je=O.default.createContext(le),Nt=O.default.createContext(!1);let Bt=Boolean(typeof window<"u"&&window.document&&window.document.createElement),he=new WeakMap;function Ut(t=!1){let e=f.useContext(je),n=f.useRef(null);if(n.current===null&&!t){var r,i;let l=(i=O.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(r=i.ReactCurrentOwner)===null||r===void 0?void 0:r.current;if(l){let o=he.get(l);o==null?he.set(l,{id:e.current,state:l.memoizedState}):l.memoizedState!==o.state&&(e.current=o.id,he.delete(l))}n.current=++e.current}return n.current}function jt(t){let e=f.useContext(je);e===le&&!Bt&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let n=Ut(!!t),r=e===le&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${r}-${n}`}function Wt(t){let e=O.default.useId(),[n]=f.useState(We()),r=n||process.env.NODE_ENV==="test"?"react-aria":`react-aria${le.prefix}`;return t||`${r}-${e}`}const Ht=typeof O.default.useId=="function"?Wt:jt;function Vt(){return!1}function Gt(){return!0}function qt(t){return()=>{}}function We(){return typeof O.default.useSyncExternalStore=="function"?O.default.useSyncExternalStore(qt,Vt,Gt):f.useContext(Nt)}function He(t){var e,n,r="";if(typeof t=="string"||typeof t=="number")r+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(n=He(t[e]))&&(r&&(r+=" "),r+=n)}else for(n in t)t[n]&&(r&&(r+=" "),r+=n);return r}function Xt(){for(var t,e,n=0,r="",i=arguments.length;n<i;n++)(t=arguments[n])&&(e=He(t))&&(r&&(r+=" "),r+=e);return r}const re=typeof document<"u"?O.default.useLayoutEffect:()=>{};function Y(t){const e=f.useRef(null);return re(()=>{e.current=t},[t]),f.useCallback((...n)=>{const r=e.current;return r(...n)},[])}let Yt=Boolean(typeof window<"u"&&window.document&&window.document.createElement),oe=new Map;function Ve(t){let[e,n]=f.useState(t),r=f.useRef(null),i=Ht(e),l=f.useCallback(o=>{r.current=o},[]);return Yt&&oe.set(i,l),re(()=>{let o=i;return()=>{oe.delete(o)}},[i]),f.useEffect(()=>{let o=r.current;o&&(r.current=null,n(o))}),i}function Zt(t,e){if(t===e)return t;let n=oe.get(t);if(n)return n(e),e;let r=oe.get(e);return r?(r(t),t):e}function Qt(...t){return(...e)=>{for(let n of t)typeof n=="function"&&n(...e)}}const R=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},ae=t=>t&&"window"in t&&t.window===t?t:R(t).defaultView||window;function W(...t){let e={...t[0]};for(let n=1;n<t.length;n++){let r=t[n];for(let i in r){let l=e[i],o=r[i];typeof l=="function"&&typeof o=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=Qt(l,o):(i==="className"||i==="UNSAFE_className")&&typeof l=="string"&&typeof o=="string"?e[i]=Xt(l,o):i==="id"&&l&&o?e.id=Zt(l,o):e[i]=o!==void 0?o:l}}return e}const Jt=new Set(["id"]),en=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),tn=new Set(["href","target","rel","download","ping","referrerPolicy"]),nn=/^(data-.*)$/;function rn(t,e={}){let{labelable:n,isLink:r,propNames:i}=e,l={};for(const o in t)Object.prototype.hasOwnProperty.call(t,o)&&(Jt.has(o)||n&&en.has(o)||r&&tn.has(o)||(i==null?void 0:i.has(o))||nn.test(o))&&(l[o]=t[o]);return l}function N(t){if(sn())t.focus({preventScroll:!0});else{let e=ln(t);t.focus(),on(e)}}let ce=null;function sn(){if(ce==null){ce=!1;try{var t=document.createElement("div");t.focus({get preventScroll(){return ce=!0,!0}})}catch{}}return ce}function ln(t){for(var e=t.parentNode,n=[],r=document.scrollingElement||document.documentElement;e instanceof HTMLElement&&e!==r;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&n.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return r instanceof HTMLElement&&n.push({element:r,scrollTop:r.scrollTop,scrollLeft:r.scrollLeft}),n}function on(t){for(let{element:e,scrollTop:n,scrollLeft:r}of t)e.scrollTop=n,e.scrollLeft=r}function ue(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(n=>t.test(n.brand)))||t.test(window.navigator.userAgent)}function ge(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function H(){return ge(/^Mac/i)}function an(){return ge(/^iPhone/i)}function Ge(){return ge(/^iPad/i)||H()&&navigator.maxTouchPoints>1}function ve(){return an()||Ge()}function cn(){return H()||ve()}function un(){return ue(/AppleWebKit/i)&&!dn()}function dn(){return ue(/Chrome/i)}function qe(){return ue(/Android/i)}function fn(){return ue(/Firefox/i)}const pn=f.createContext({isNative:!0,open:yn});function Xe(){return f.useContext(pn)}function V(t,e,n=!0){var r,i;let{metaKey:l,ctrlKey:o,altKey:u,shiftKey:p}=e;fn()&&((i=window.event)===null||i===void 0||(r=i.type)===null||r===void 0?void 0:r.startsWith("key"))&&t.target==="_blank"&&(H()?l=!0:o=!0);let h=un()&&H()&&!Ge()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:l,ctrlKey:o,altKey:u,shiftKey:p}):new MouseEvent("click",{metaKey:l,ctrlKey:o,altKey:u,shiftKey:p,bubbles:!0,cancelable:!0});V.isOpening=n,N(t),t.dispatchEvent(h),V.isOpening=!1}V.isOpening=!1;function bn(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let n=document.createElement("a");n.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(n.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(n.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(n.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(n.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(n.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(n),e(n),t.removeChild(n)}}function yn(t,e){bn(t,n=>V(n,e))}let Z=new Map,me=new Set;function Ye(){if(typeof window>"u")return;let t=n=>{let r=Z.get(n.target);r||(r=new Set,Z.set(n.target,r),n.target.addEventListener("transitioncancel",e)),r.add(n.propertyName)},e=n=>{let r=Z.get(n.target);if(!!r&&(r.delete(n.propertyName),r.size===0&&(n.target.removeEventListener("transitioncancel",e),Z.delete(n.target)),Z.size===0)){for(let i of me)i();me.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",e)}typeof document<"u"&&(document.readyState!=="loading"?Ye():document.addEventListener("DOMContentLoaded",Ye));function Ze(t){requestAnimationFrame(()=>{Z.size===0?t():me.add(t)})}function Qe(){let t=f.useRef(new Map),e=f.useCallback((i,l,o,u)=>{let p=u!=null&&u.once?(...h)=>{t.current.delete(o),o(...h)}:o;t.current.set(o,{type:l,eventTarget:i,fn:p,options:u}),i.addEventListener(l,o,u)},[]),n=f.useCallback((i,l,o,u)=>{var p;let h=((p=t.current.get(o))===null||p===void 0?void 0:p.fn)||o;i.removeEventListener(l,h,u),t.current.delete(o)},[]),r=f.useCallback(()=>{t.current.forEach((i,l)=>{n(i.eventTarget,i.type,l,i.options)})},[n]);return f.useEffect(()=>r,[r]),{addGlobalListener:e,removeGlobalListener:n,removeAllGlobalListeners:r}}function Je(t,e){let{id:n,"aria-label":r,"aria-labelledby":i}=t;return n=Ve(n),i&&r?i=[...new Set([n,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!r&&!i&&e&&(r=e),{id:n,"aria-label":r,"aria-labelledby":i}}function hn(t,e){re(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref.current=null}})}function et(t,e){for(tt(t,e)&&(t=t.parentElement);t&&!tt(t,e);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function tt(t,e){let n=window.getComputedStyle(t),r=/(auto|scroll)/.test(n.overflow+n.overflowX+n.overflowY);return r&&e&&(r=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),r}let gn=0;const $e=new Map;function vn(t){let[e,n]=f.useState(void 0);return re(()=>{if(!t)return;let r=$e.get(t);if(r)n(r.element.id);else{let i=`react-aria-description-${gn++}`;n(i);let l=document.createElement("div");l.id=i,l.style.display="none",l.textContent=t,document.body.appendChild(l),r={refCount:0,element:l},$e.set(t,r)}return r.refCount++,()=>{--r.refCount===0&&(r.element.remove(),$e.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function mn(t,e,n,r){let i=Y(n),l=n==null;f.useEffect(()=>{if(l)return;let o=t.current;return o.addEventListener(e,i,r),()=>{o.removeEventListener(e,i,r)}},[t,e,r,l,i])}function nt(t,e){let n=rt(t,e,"left"),r=rt(t,e,"top"),i=e.offsetWidth,l=e.offsetHeight,o=t.scrollLeft,u=t.scrollTop,{borderTopWidth:p,borderLeftWidth:h}=getComputedStyle(t),g=t.scrollLeft+parseInt(h,10),S=t.scrollTop+parseInt(p,10),m=g+t.clientWidth,v=S+t.clientHeight;n<=o?o=n-parseInt(h,10):n+i>m&&(o+=n+i-m),r<=S?u=r-parseInt(p,10):r+l>v&&(u+=r+l-v),t.scrollLeft=o,t.scrollTop=u}function rt(t,e,n){const r=n==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[r],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[r];break}e=e.offsetParent}return i}function it(t,e){if(document.contains(t)){let o=document.scrollingElement||document.documentElement;if(window.getComputedStyle(o).overflow==="hidden"){let p=et(t);for(;t&&p&&t!==o&&p!==o;)nt(p,t),t=p,p=et(t)}else{var n;let{left:p,top:h}=t.getBoundingClientRect();t==null||(n=t.scrollIntoView)===null||n===void 0||n.call(t,{block:"nearest"});let{left:g,top:S}=t.getBoundingClientRect();if(Math.abs(p-g)>1||Math.abs(h-S)>1){var r,i,l;e==null||(i=e.containingElement)===null||i===void 0||(r=i.scrollIntoView)===null||r===void 0||r.call(i,{block:"center",inline:"center"}),(l=t.scrollIntoView)===null||l===void 0||l.call(t,{block:"nearest"})}}}}function Ke(t){return t.mozInputSource===0&&t.isTrusted?!0:qe()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function $n(t){return!qe()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function Kn(t,e){return e.get?e.get.call(t):e.value}function st(t,e,n){if(!e.has(t))throw new TypeError("attempted to "+n+" private field on non-instance");return e.get(t)}function Tn(t,e){var n=st(t,e,"get");return Kn(t,n)}function wn(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Sn(t,e,n){wn(t,e),e.set(t,n)}function Pn(t,e,n){if(e.set)e.set.call(t,n);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=n}}function lt(t,e,n){var r=st(t,e,"set");return Pn(t,r,n),n}let Q="default",Te="",de=new WeakMap;function ot(t){if(ve()){if(Q==="default"){const e=R(t);Te=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}Q="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(de.set(t,t.style.userSelect),t.style.userSelect="none")}function fe(t){if(ve()){if(Q!=="disabled")return;Q="restoring",setTimeout(()=>{Ze(()=>{if(Q==="restoring"){const e=R(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Te||""),Te="",Q="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&de.has(t)){let e=de.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),de.delete(t)}}const at=O.default.createContext({register:()=>{}});at.displayName="PressResponderContext";function _n(t){let e=f.useContext(at);if(e){let{register:n,...r}=e;t=W(r,t),n()}return hn(e,t.ref),t}var pe=new WeakMap;class be{continuePropagation(){lt(this,pe,!1)}get shouldStopPropagation(){return Tn(this,pe)}constructor(e,n,r){Sn(this,pe,{writable:!0,value:void 0}),lt(this,pe,!0),this.type=e,this.pointerType=n,this.target=r.currentTarget,this.shiftKey=r.shiftKey,this.metaKey=r.metaKey,this.ctrlKey=r.ctrlKey,this.altKey=r.altKey}}const ct=Symbol("linkClicked");function ut(t){let{onPress:e,onPressChange:n,onPressStart:r,onPressEnd:i,onPressUp:l,isDisabled:o,isPressed:u,preventFocusOnPress:p,shouldCancelOnPointerExit:h,allowTextSelectionOnPress:g,ref:S,...m}=_n(t),[v,M]=f.useState(!1),P=f.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:T,removeAllGlobalListeners:x}=Qe(),k=Y((s,$)=>{let b=P.current;if(o||b.didFirePressStart)return!1;let c=!0;if(b.isTriggeringEvent=!0,r){let w=new be("pressstart",$,s);r(w),c=w.shouldStopPropagation}return n&&n(!0),b.isTriggeringEvent=!1,b.didFirePressStart=!0,M(!0),c}),_=Y((s,$,b=!0)=>{let c=P.current;if(!c.didFirePressStart)return!1;c.ignoreClickAfterPress=!0,c.didFirePressStart=!1,c.isTriggeringEvent=!0;let w=!0;if(i){let a=new be("pressend",$,s);i(a),w=a.shouldStopPropagation}if(n&&n(!1),M(!1),e&&b&&!o){let a=new be("press",$,s);e(a),w&&(w=a.shouldStopPropagation)}return c.isTriggeringEvent=!1,w}),L=Y((s,$)=>{let b=P.current;if(o)return!1;if(l){b.isTriggeringEvent=!0;let c=new be("pressup",$,s);return l(c),b.isTriggeringEvent=!1,c.shouldStopPropagation}return!0}),C=Y(s=>{let $=P.current;$.isPressed&&$.target&&($.isOverTarget&&$.pointerType!=null&&_(B($.target,s),$.pointerType,!1),$.isPressed=!1,$.isOverTarget=!1,$.activePointerId=null,$.pointerType=null,x(),g||fe($.target))}),D=Y(s=>{h&&C(s)}),U=f.useMemo(()=>{let s=P.current,$={onKeyDown(c){if(Se(c.nativeEvent,c.currentTarget)&&c.currentTarget.contains(c.target)){var w;ft(c.target,c.key)&&c.preventDefault();let a=!0;!s.isPressed&&!c.repeat&&(s.target=c.currentTarget,s.isPressed=!0,a=k(c,"keyboard"),T(R(c.currentTarget),"keyup",b,!1)),a&&c.stopPropagation(),c.metaKey&&H()&&((w=s.metaKeyEvents)===null||w===void 0||w.set(c.key,c.nativeEvent))}else c.key==="Meta"&&(s.metaKeyEvents=new Map)},onKeyUp(c){Se(c.nativeEvent,c.currentTarget)&&!c.repeat&&c.currentTarget.contains(c.target)&&s.target&&L(B(s.target,c),"keyboard")},onClick(c){if(!(c&&!c.currentTarget.contains(c.target))&&c&&c.button===0&&!s.isTriggeringEvent&&!V.isOpening){let w=!0;if(o&&c.preventDefault(),!s.ignoreClickAfterPress&&!s.ignoreEmulatedMouseEvents&&!s.isPressed&&(s.pointerType==="virtual"||Ke(c.nativeEvent))){!o&&!p&&N(c.currentTarget);let a=k(c,"virtual"),d=L(c,"virtual"),E=_(c,"virtual");w=a&&d&&E}s.ignoreEmulatedMouseEvents=!1,s.ignoreClickAfterPress=!1,w&&c.stopPropagation()}}},b=c=>{var w;if(s.isPressed&&s.target&&Se(c,s.target)){var a;ft(c.target,c.key)&&c.preventDefault();let E=c.target,j=_(B(s.target,c),"keyboard",s.target.contains(E));x(),j&&c.stopPropagation(),c.key!=="Enter"&&we(s.target)&&s.target.contains(E)&&!c[ct]&&(c[ct]=!0,V(s.target,c,!1)),s.isPressed=!1,(a=s.metaKeyEvents)===null||a===void 0||a.delete(c.key)}else if(c.key==="Meta"&&((w=s.metaKeyEvents)===null||w===void 0?void 0:w.size)){var d;let E=s.metaKeyEvents;s.metaKeyEvents=void 0;for(let j of E.values())(d=s.target)===null||d===void 0||d.dispatchEvent(new KeyboardEvent("keyup",j))}};if(typeof PointerEvent<"u"){$.onPointerDown=d=>{if(d.button!==0||!d.currentTarget.contains(d.target))return;if($n(d.nativeEvent)){s.pointerType="virtual";return}Pe(d.currentTarget)&&d.preventDefault(),s.pointerType=d.pointerType;let E=!0;s.isPressed||(s.isPressed=!0,s.isOverTarget=!0,s.activePointerId=d.pointerId,s.target=d.currentTarget,!o&&!p&&N(d.currentTarget),g||ot(s.target),E=k(d,s.pointerType),T(R(d.currentTarget),"pointermove",c,!1),T(R(d.currentTarget),"pointerup",w,!1),T(R(d.currentTarget),"pointercancel",a,!1)),E&&d.stopPropagation()},$.onMouseDown=d=>{!d.currentTarget.contains(d.target)||d.button===0&&(Pe(d.currentTarget)&&d.preventDefault(),d.stopPropagation())},$.onPointerUp=d=>{!d.currentTarget.contains(d.target)||s.pointerType==="virtual"||d.button===0&&J(d,d.currentTarget)&&L(d,s.pointerType||d.pointerType)};let c=d=>{d.pointerId===s.activePointerId&&(s.target&&J(d,s.target)?!s.isOverTarget&&s.pointerType!=null&&(s.isOverTarget=!0,k(B(s.target,d),s.pointerType)):s.target&&s.isOverTarget&&s.pointerType!=null&&(s.isOverTarget=!1,_(B(s.target,d),s.pointerType,!1),D(d)))},w=d=>{d.pointerId===s.activePointerId&&s.isPressed&&d.button===0&&s.target&&(J(d,s.target)&&s.pointerType!=null?_(B(s.target,d),s.pointerType):s.isOverTarget&&s.pointerType!=null&&_(B(s.target,d),s.pointerType,!1),s.isPressed=!1,s.isOverTarget=!1,s.activePointerId=null,s.pointerType=null,x(),g||fe(s.target))},a=d=>{C(d)};$.onDragStart=d=>{!d.currentTarget.contains(d.target)||C(d)}}else{$.onMouseDown=a=>{if(a.button!==0||!a.currentTarget.contains(a.target))return;if(Pe(a.currentTarget)&&a.preventDefault(),s.ignoreEmulatedMouseEvents){a.stopPropagation();return}s.isPressed=!0,s.isOverTarget=!0,s.target=a.currentTarget,s.pointerType=Ke(a.nativeEvent)?"virtual":"mouse",!o&&!p&&N(a.currentTarget),k(a,s.pointerType)&&a.stopPropagation(),T(R(a.currentTarget),"mouseup",c,!1)},$.onMouseEnter=a=>{if(!a.currentTarget.contains(a.target))return;let d=!0;s.isPressed&&!s.ignoreEmulatedMouseEvents&&s.pointerType!=null&&(s.isOverTarget=!0,d=k(a,s.pointerType)),d&&a.stopPropagation()},$.onMouseLeave=a=>{if(!a.currentTarget.contains(a.target))return;let d=!0;s.isPressed&&!s.ignoreEmulatedMouseEvents&&s.pointerType!=null&&(s.isOverTarget=!1,d=_(a,s.pointerType,!1),D(a)),d&&a.stopPropagation()},$.onMouseUp=a=>{!a.currentTarget.contains(a.target)||!s.ignoreEmulatedMouseEvents&&a.button===0&&L(a,s.pointerType||"mouse")};let c=a=>{if(a.button===0){if(s.isPressed=!1,x(),s.ignoreEmulatedMouseEvents){s.ignoreEmulatedMouseEvents=!1;return}s.target&&J(a,s.target)&&s.pointerType!=null?_(B(s.target,a),s.pointerType):s.target&&s.isOverTarget&&s.pointerType!=null&&_(B(s.target,a),s.pointerType,!1),s.isOverTarget=!1}};$.onTouchStart=a=>{if(!a.currentTarget.contains(a.target))return;let d=En(a.nativeEvent);if(!d)return;s.activePointerId=d.identifier,s.ignoreEmulatedMouseEvents=!0,s.isOverTarget=!0,s.isPressed=!0,s.target=a.currentTarget,s.pointerType="touch",!o&&!p&&N(a.currentTarget),g||ot(s.target),k(a,s.pointerType)&&a.stopPropagation(),T(ae(a.currentTarget),"scroll",w,!0)},$.onTouchMove=a=>{if(!a.currentTarget.contains(a.target))return;if(!s.isPressed){a.stopPropagation();return}let d=dt(a.nativeEvent,s.activePointerId),E=!0;d&&J(d,a.currentTarget)?!s.isOverTarget&&s.pointerType!=null&&(s.isOverTarget=!0,E=k(a,s.pointerType)):s.isOverTarget&&s.pointerType!=null&&(s.isOverTarget=!1,E=_(a,s.pointerType,!1),D(a)),E&&a.stopPropagation()},$.onTouchEnd=a=>{if(!a.currentTarget.contains(a.target))return;if(!s.isPressed){a.stopPropagation();return}let d=dt(a.nativeEvent,s.activePointerId),E=!0;d&&J(d,a.currentTarget)&&s.pointerType!=null?(L(a,s.pointerType),E=_(a,s.pointerType)):s.isOverTarget&&s.pointerType!=null&&(E=_(a,s.pointerType,!1)),E&&a.stopPropagation(),s.isPressed=!1,s.activePointerId=null,s.isOverTarget=!1,s.ignoreEmulatedMouseEvents=!0,s.target&&!g&&fe(s.target),x()},$.onTouchCancel=a=>{!a.currentTarget.contains(a.target)||(a.stopPropagation(),s.isPressed&&C(a))};let w=a=>{s.isPressed&&a.target.contains(s.target)&&C({currentTarget:s.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};$.onDragStart=a=>{!a.currentTarget.contains(a.target)||C(a)}}return $},[T,o,p,x,g,C,D,_,k,L]);return f.useEffect(()=>()=>{var s;g||fe((s=P.current.target)!==null&&s!==void 0?s:void 0)},[g]),{isPressed:u||v,pressProps:W(m,U)}}function we(t){return t.tagName==="A"&&t.hasAttribute("href")}function Se(t,e){const{key:n,code:r}=t,i=e,l=i.getAttribute("role");return(n==="Enter"||n===" "||n==="Spacebar"||r==="Space")&&!(i instanceof ae(i).HTMLInputElement&&!pt(i,n)||i instanceof ae(i).HTMLTextAreaElement||i.isContentEditable)&&!((l==="link"||!l&&we(i))&&n!=="Enter")}function En(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function dt(t,e){const n=t.changedTouches;for(let r=0;r<n.length;r++){const i=n[r];if(i.identifier===e)return i}return null}function B(t,e){return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey}}function kn(t){let e=0,n=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?n=t.height/2:t.radiusY!==void 0&&(n=t.radiusY),{top:t.clientY-n,right:t.clientX+e,bottom:t.clientY+n,left:t.clientX-e}}function Mn(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function J(t,e){let n=e.getBoundingClientRect(),r=kn(t);return Mn(n,r)}function Pe(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function ft(t,e){return t instanceof HTMLInputElement?!pt(t,e):t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!we(t)}const xn=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function pt(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":xn.has(t.type)}let ie=null,Ln=new Set,bt=!1,G=!1,_e=!1;function Ee(t,e){for(let n of Ln)n(t,e)}function Cn(t){return!(t.metaKey||!H()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function yt(t){G=!0,Cn(t)&&(ie="keyboard",Ee("keyboard",t))}function ee(t){ie="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(G=!0,Ee("pointer",t))}function In(t){Ke(t)&&(G=!0,ie="virtual")}function Dn(t){t.target===window||t.target===document||(!G&&!_e&&(ie="virtual",Ee("virtual",t)),G=!1,_e=!1)}function An(){G=!1,_e=!0}function ht(){if(typeof window>"u"||bt)return;let t=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){G=!0,t.apply(this,arguments)},document.addEventListener("keydown",yt,!0),document.addEventListener("keyup",yt,!0),document.addEventListener("click",In,!0),window.addEventListener("focus",Dn,!0),window.addEventListener("blur",An,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",ee,!0),document.addEventListener("pointermove",ee,!0),document.addEventListener("pointerup",ee,!0)):(document.addEventListener("mousedown",ee,!0),document.addEventListener("mousemove",ee,!0),document.addEventListener("mouseup",ee,!0)),bt=!0}typeof document<"u"&&(document.readyState!=="loading"?ht():document.addEventListener("DOMContentLoaded",ht));function ke(){return ie}const Fn=500;function On(t){let{isDisabled:e,onLongPressStart:n,onLongPressEnd:r,onLongPress:i,threshold:l=Fn,accessibilityDescription:o}=t;const u=f.useRef();let{addGlobalListener:p,removeGlobalListener:h}=Qe(),{pressProps:g}=ut({isDisabled:e,onPressStart(m){if(m.continuePropagation(),(m.pointerType==="mouse"||m.pointerType==="touch")&&(n&&n({...m,type:"longpressstart"}),u.current=setTimeout(()=>{m.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...m,type:"longpress"}),u.current=void 0},l),m.pointerType==="touch")){let v=M=>{M.preventDefault()};p(m.target,"contextmenu",v,{once:!0}),p(window,"pointerup",()=>{setTimeout(()=>{h(m.target,"contextmenu",v)},30)},{once:!0})}},onPressEnd(m){u.current&&clearTimeout(u.current),r&&(m.pointerType==="mouse"||m.pointerType==="touch")&&r({...m,type:"longpressend"})}}),S=vn(i&&!e?o:void 0);return{longPressProps:W(g,S)}}function Me(t){const e=R(t);if(ke()==="virtual"){let n=e.activeElement;Ze(()=>{e.activeElement===n&&t.isConnected&&N(t)})}else N(t)}function zn(t){const e=ae(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:n,visibility:r}=t.style,i=n!=="none"&&r!=="hidden"&&r!=="collapse";if(i){const{getComputedStyle:l}=t.ownerDocument.defaultView;let{display:o,visibility:u}=l(t);i=o!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function Rn(t,e){return!t.hasAttribute("hidden")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function gt(t,e){return t.nodeName!=="#comment"&&zn(t)&&Rn(t,e)&&(!t.parentElement||gt(t.parentElement,t))}const xe=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Nn=xe.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";xe.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Bn=xe.join(':not([hidden]):not([tabindex="-1"]),');function vt(t,e){return!t||!e?!1:e.some(n=>n.contains(t))}function mt(t,e,n){let r=e!=null&&e.tabbable?Bn:Nn,i=R(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(l){var o;return!(e==null||(o=e.from)===null||o===void 0)&&o.contains(l)?NodeFilter.FILTER_REJECT:l.matches(r)&>(l)&&(!n||vt(l,n))&&(!(e!=null&&e.accept)||e.accept(l))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class Le{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,n,r){let i=this.fastMap.get(n!=null?n:null);if(!i)return;let l=new $t({scopeRef:e});i.addChild(l),l.parent=i,this.fastMap.set(e,l),r&&(l.nodeToRestore=r)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let n=this.fastMap.get(e);if(!n)return;let r=n.parent;for(let l of this.traverse())l!==n&&n.nodeToRestore&&l.nodeToRestore&&n.scopeRef&&n.scopeRef.current&&vt(l.nodeToRestore,n.scopeRef.current)&&(l.nodeToRestore=n.nodeToRestore);let i=n.children;r&&(r.removeChild(n),i.size>0&&i.forEach(l=>r&&r.addChild(l))),this.fastMap.delete(n.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let n of e.children)yield*this.traverse(n)}clone(){var e;let n=new Le;var r;for(let i of this.traverse())n.addTreeNode(i.scopeRef,(r=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&r!==void 0?r:null,i.nodeToRestore);return n}constructor(){this.fastMap=new Map,this.root=new $t({scopeRef:null}),this.fastMap.set(null,this.root)}}class $t{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new Le;function Un(t,e){let n=e==null?void 0:e.isDisabled,[r,i]=f.useState(!1);return re(()=>{if((t==null?void 0:t.current)&&!n){let l=()=>{if(t.current){let u=mt(t.current,{tabbable:!0});i(!!u.nextNode())}};l();let o=new MutationObserver(l);return o.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{o.disconnect()}}}),n?!1:r}const jn=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),Wn=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Hn(t){if(Intl.Locale){let n=new Intl.Locale(t).maximize(),r=typeof n.getTextInfo=="function"?n.getTextInfo():n.textInfo;if(r)return r.direction==="rtl";if(n.script)return jn.has(n.script)}let e=t.split("-")[0];return Wn.has(e)}const Vn=Symbol.for("react-aria.i18n.locale");function Kt(){let t=typeof window<"u"&&window[Vn]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Hn(t)?"rtl":"ltr"}}let Ce=Kt(),se=new Set;function Tt(){Ce=Kt();for(let t of se)t(Ce)}function Gn(){let t=We(),[e,n]=f.useState(Ce);return f.useEffect(()=>(se.size===0&&window.addEventListener("languagechange",Tt),se.add(n),()=>{se.delete(n),se.size===0&&window.removeEventListener("languagechange",Tt)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const qn=O.default.createContext(null);function wt(){let t=Gn();return f.useContext(qn)||t}function Ie(t){return cn()?t.altKey:t.ctrlKey}function te(t){return H()?t.metaKey:t.ctrlKey}const Xn=1e3;function Yn(t){let{keyboardDelegate:e,selectionManager:n,onTypeSelect:r}=t,i=f.useRef({search:"",timeout:null}).current,l=o=>{let u=Zn(o.key);if(!u||o.ctrlKey||o.metaKey||!o.currentTarget.contains(o.target))return;u===" "&&i.search.trim().length>0&&(o.preventDefault(),"continuePropagation"in o||o.stopPropagation()),i.search+=u;let p=e.getKeyForSearch(i.search,n.focusedKey);p==null&&(p=e.getKeyForSearch(i.search)),p!=null&&(n.setFocusedKey(p),r&&r(p)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},Xn)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?l:null}}}function Zn(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Qn(t){let{selectionManager:e,keyboardDelegate:n,ref:r,autoFocus:i=!1,shouldFocusWrap:l=!1,disallowEmptySelection:o=!1,disallowSelectAll:u=!1,selectOnFocus:p=e.selectionBehavior==="replace",disallowTypeAhead:h=!1,shouldUseVirtualFocus:g,allowsTabNavigation:S=!1,isVirtualized:m,scrollRef:v=r,linkBehavior:M="action"}=t,{direction:P}=wt(),T=Xe(),x=b=>{if(b.altKey&&b.key==="Tab"&&b.preventDefault(),!r.current.contains(b.target))return;const c=(K,q)=>{if(K!=null){if(e.isLink(K)&&M==="selection"&&p&&!Ie(b)){Lt.flushSync(()=>{e.setFocusedKey(K,q)});let ne=v.current.querySelector(`[data-key="${CSS.escape(K.toString())}"]`);T.open(ne,b);return}if(e.setFocusedKey(K,q),e.isLink(K)&&M==="override")return;b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(K):p&&!Ie(b)&&e.replaceSelection(K)}};switch(b.key){case"ArrowDown":if(n.getKeyBelow){var w,a;b.preventDefault();let K=e.focusedKey!=null?n.getKeyBelow(e.focusedKey):(w=n.getFirstKey)===null||w===void 0?void 0:w.call(n);K==null&&l&&(K=(a=n.getFirstKey)===null||a===void 0?void 0:a.call(n,e.focusedKey)),c(K)}break;case"ArrowUp":if(n.getKeyAbove){var d,E;b.preventDefault();let K=e.focusedKey!=null?n.getKeyAbove(e.focusedKey):(d=n.getLastKey)===null||d===void 0?void 0:d.call(n);K==null&&l&&(K=(E=n.getLastKey)===null||E===void 0?void 0:E.call(n,e.focusedKey)),c(K)}break;case"ArrowLeft":if(n.getKeyLeftOf){var j,y;b.preventDefault();let K=n.getKeyLeftOf(e.focusedKey);K==null&&l&&(K=P==="rtl"?(j=n.getFirstKey)===null||j===void 0?void 0:j.call(n,e.focusedKey):(y=n.getLastKey)===null||y===void 0?void 0:y.call(n,e.focusedKey)),c(K,P==="rtl"?"first":"last")}break;case"ArrowRight":if(n.getKeyRightOf){var Fe,Oe;b.preventDefault();let K=n.getKeyRightOf(e.focusedKey);K==null&&l&&(K=P==="rtl"?(Fe=n.getLastKey)===null||Fe===void 0?void 0:Fe.call(n,e.focusedKey):(Oe=n.getFirstKey)===null||Oe===void 0?void 0:Oe.call(n,e.focusedKey)),c(K,P==="rtl"?"last":"first")}break;case"Home":if(n.getFirstKey){b.preventDefault();let K=n.getFirstKey(e.focusedKey,te(b));e.setFocusedKey(K),te(b)&&b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(K):p&&e.replaceSelection(K)}break;case"End":if(n.getLastKey){b.preventDefault();let K=n.getLastKey(e.focusedKey,te(b));e.setFocusedKey(K),te(b)&&b.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(K):p&&e.replaceSelection(K)}break;case"PageDown":if(n.getKeyPageBelow){b.preventDefault();let K=n.getKeyPageBelow(e.focusedKey);c(K)}break;case"PageUp":if(n.getKeyPageAbove){b.preventDefault();let K=n.getKeyPageAbove(e.focusedKey);c(K)}break;case"a":te(b)&&e.selectionMode==="multiple"&&u!==!0&&(b.preventDefault(),e.selectAll());break;case"Escape":b.preventDefault(),o||e.clearSelection();break;case"Tab":if(!S){if(b.shiftKey)r.current.focus();else{let K=mt(r.current,{tabbable:!0}),q,ne;do ne=K.lastChild(),ne&&(q=ne);while(ne);q&&!q.contains(document.activeElement)&&N(q)}break}}},k=f.useRef({top:0,left:0});mn(v,"scroll",m?null:()=>{k.current={top:v.current.scrollTop,left:v.current.scrollLeft}});let _=b=>{if(e.isFocused){b.currentTarget.contains(b.target)||e.setFocused(!1);return}if(!!b.currentTarget.contains(b.target)){if(e.setFocused(!0),e.focusedKey==null){let a=E=>{E!=null&&(e.setFocusedKey(E),p&&e.replaceSelection(E))},d=b.relatedTarget;var c,w;d&&b.currentTarget.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_FOLLOWING?a((c=e.lastSelectedKey)!==null&&c!==void 0?c:n.getLastKey()):a((w=e.firstSelectedKey)!==null&&w!==void 0?w:n.getFirstKey())}else m||(v.current.scrollTop=k.current.top,v.current.scrollLeft=k.current.left);if(!m&&e.focusedKey!=null){let a=v.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);a&&(a.contains(document.activeElement)||N(a),ke()==="keyboard"&&it(a,{containingElement:r.current}))}}},L=b=>{b.currentTarget.contains(b.relatedTarget)||e.setFocused(!1)};const C=f.useRef(i);f.useEffect(()=>{if(C.current){let b=null;i==="first"&&(b=n.getFirstKey()),i==="last"&&(b=n.getLastKey());let c=e.selectedKeys;if(c.size){for(let w of c)if(e.canSelectItem(w)){b=w;break}}e.setFocused(!0),e.setFocusedKey(b),b==null&&!g&&Me(r.current)}},[]);let D=f.useRef(e.focusedKey);f.useEffect(()=>{let b=ke();if(e.isFocused&&e.focusedKey!=null&&(v==null?void 0:v.current)){let c=v.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);c&&(b==="keyboard"||C.current)&&(m||nt(v.current,c),it(c,{containingElement:r.current}))}e.isFocused&&e.focusedKey==null&&D.current!=null&&Me(r.current),D.current=e.focusedKey,C.current=!1},[m,v,e.focusedKey,e.isFocused,r]);let U={onKeyDown:x,onFocus:_,onBlur:L,onMouseDown(b){v.current===b.target&&b.preventDefault()}},{typeSelectProps:s}=Yn({keyboardDelegate:n,selectionManager:e});h||(U=W(s,U));let $;return g||($=e.focusedKey==null?0:-1),{collectionProps:{...U,tabIndex:$}}}function Jn(t){let{selectionManager:e,key:n,ref:r,shouldSelectOnPressUp:i,shouldUseVirtualFocus:l,focus:o,isDisabled:u,onAction:p,allowsDifferentPressOrigin:h,linkBehavior:g="action"}=t,S=Xe(),m=y=>{if(y.pointerType==="keyboard"&&Ie(y))e.toggleSelection(n);else{if(e.selectionMode==="none")return;if(e.isLink(n)){if(g==="selection"){S.open(r.current,y),e.setSelectedKeys(e.selectedKeys);return}else if(g==="override"||g==="none")return}e.selectionMode==="single"?e.isSelected(n)&&!e.disallowEmptySelection?e.toggleSelection(n):e.replaceSelection(n):y&&y.shiftKey?e.extendSelection(n):e.selectionBehavior==="toggle"||y&&(te(y)||y.pointerType==="touch"||y.pointerType==="virtual")?e.toggleSelection(n):e.replaceSelection(n)}};f.useEffect(()=>{n===e.focusedKey&&e.isFocused&&!l&&(o?o():document.activeElement!==r.current&&Me(r.current))},[r,n,e.focusedKey,e.childFocusStrategy,e.isFocused,l]),u=u||e.isDisabled(n);let v={};!l&&!u?v={tabIndex:n===e.focusedKey?0:-1,onFocus(y){y.target===r.current&&e.setFocusedKey(n)}}:u&&(v.onMouseDown=y=>{y.preventDefault()});let M=e.isLink(n)&&g==="override",P=e.isLink(n)&&g!=="selection"&&g!=="none",T=!u&&e.canSelectItem(n)&&!M,x=(p||P)&&!u,k=x&&(e.selectionBehavior==="replace"?!T:!T||e.isEmpty),_=x&&T&&e.selectionBehavior==="replace",L=k||_,C=f.useRef(null),D=L&&T,U=f.useRef(!1),s=f.useRef(!1),$=y=>{p&&p(),P&&S.open(r.current,y)},b={};i?(b.onPressStart=y=>{C.current=y.pointerType,U.current=D,y.pointerType==="keyboard"&&(!L||Pt())&&m(y)},h?(b.onPressUp=k?null:y=>{y.pointerType!=="keyboard"&&T&&m(y)},b.onPress=k?$:null):b.onPress=y=>{if(k||_&&y.pointerType!=="mouse"){if(y.pointerType==="keyboard"&&!St())return;$(y)}else y.pointerType!=="keyboard"&&T&&m(y)}):(b.onPressStart=y=>{C.current=y.pointerType,U.current=D,s.current=k,T&&(y.pointerType==="mouse"&&!k||y.pointerType==="keyboard"&&(!x||Pt()))&&m(y)},b.onPress=y=>{(y.pointerType==="touch"||y.pointerType==="pen"||y.pointerType==="virtual"||y.pointerType==="keyboard"&&L&&St()||y.pointerType==="mouse"&&s.current)&&(L?$(y):T&&m(y))}),v["data-key"]=n,b.preventFocusOnPress=l;let{pressProps:c,isPressed:w}=ut(b),a=_?y=>{C.current==="mouse"&&(y.stopPropagation(),y.preventDefault(),$(y))}:void 0,{longPressProps:d}=On({isDisabled:!D,onLongPress(y){y.pointerType==="touch"&&(m(y),e.setSelectionBehavior("toggle"))}}),E=y=>{C.current==="touch"&&U.current&&y.preventDefault()},j=e.isLink(n)?y=>{V.isOpening||y.preventDefault()}:void 0;return{itemProps:W(v,T||k?c:{},D?d:{},{onDoubleClick:a,onDragStartCapture:E,onClick:j}),isPressed:w,isSelected:e.isSelected(n),isFocused:e.isFocused&&e.focusedKey===n,isDisabled:u,allowsSelection:T,hasAction:L}}function St(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function Pt(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}const _t=new WeakMap;function ye(t,e,n){return typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${_t.get(t)}-${n}-${e}`}function er(t,e,n){var r;let{key:i,isDisabled:l,shouldSelectOnPressUp:o}=t,{selectionManager:u,selectedKey:p}=e,h=i===p,g=l||e.isDisabled||e.disabledKeys.has(i),{itemProps:S,isPressed:m}=Jn({selectionManager:u,key:i,ref:n,isDisabled:g,shouldSelectOnPressUp:o,linkBehavior:"selection"}),v=ye(e,i,"tab"),M=ye(e,i,"tabpanel"),{tabIndex:P}=S,T=e.collection.getItem(i),x=rn(T==null?void 0:T.props,{isLink:!!(!(T==null||(r=T.props)===null||r===void 0)&&r.href),labelable:!0});return delete x.id,{tabProps:W(x,S,{id:v,"aria-selected":h,"aria-disabled":g||void 0,"aria-controls":h?M:void 0,tabIndex:g?void 0:P,role:"tab"}),isSelected:h,isDisabled:g,isPressed:m}}function tr(t,e,n){let r=Un(n)?void 0:0;var i;const l=ye(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),o=Je({...t,id:l,"aria-labelledby":ye(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:W(o,{tabIndex:r,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class nr{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}getKeyAbove(e){return this.getPreviousKey(e)}getKeyBelow(e){return this.getNextKey(e)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.disabledKeys.has(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.disabledKeys.has(e)&&(e=this.getPreviousKey(e)),e}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.disabledKeys.has(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.disabledKeys.has(e));return e}constructor(e,n,r,i=new Set){this.collection=e,this.flipDirection=n==="rtl"&&r==="horizontal",this.disabledKeys=i}}function rr(t,e,n){let{orientation:r="horizontal",keyboardActivation:i="automatic"}=t,{collection:l,selectionManager:o,disabledKeys:u}=e,{direction:p}=wt(),h=f.useMemo(()=>new nr(l,p,r,u),[l,u,r,p]),{collectionProps:g}=Qn({ref:n,selectionManager:o,keyboardDelegate:h,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:n,linkBehavior:"selection"}),S=Ve();_t.set(e,S);let m=Je({...t,id:S});return{tabListProps:{...W(g,m),role:"tablist","aria-orientation":r,tabIndex:void 0}}}const ur="";function ir(t,e,n){return e in t?Object.defineProperty(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}function Et(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(t);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),n.push.apply(n,r)}return n}function kt(t){for(var e=1;e<arguments.length;e++){var n=arguments[e]!=null?arguments[e]:{};e%2?Et(Object(n),!0).forEach(function(r){ir(t,r,n[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):Et(Object(n)).forEach(function(r){Object.defineProperty(t,r,Object.getOwnPropertyDescriptor(n,r))})}return t}var sr=(t,e,n)=>{for(var r of Object.keys(t)){var i;if(t[r]!==((i=e[r])!==null&&i!==void 0?i:n[r]))return!1}return!0},De=t=>e=>{var n=t.defaultClassName,r=kt(kt({},t.defaultVariants),e);for(var i in r){var l,o=(l=r[i])!==null&&l!==void 0?l:t.defaultVariants[i];if(o!=null){var u=o;typeof u=="boolean"&&(u=u===!0?"true":"false");var p=t.variantClassNames[i][u];p&&(n+=" "+p)}}for(var[h,g]of t.compoundVariants)sr(h,r,t.defaultVariants)&&(n+=" "+g);return n},lr=De({defaultClassName:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz0",variantClassNames:{context:{container:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz1",navigation:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz2"},active:{true:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz3",false:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz4"},disabled:{true:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz5",false:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz6"}},defaultVariants:{},compoundVariants:[[{context:"container",active:!0},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz7"],[{context:"container",active:!1},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz8"],[{context:"container",active:!1,disabled:!1},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz9"],[{context:"navigation",active:!0},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzza"],[{context:"navigation",active:!1},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzb"],[{context:"navigation",active:!1,disabled:!1},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzc"],[{context:"navigation",active:!1,disabled:!0},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzd"]]}),or=De({defaultClassName:"",variantClassNames:{active:{true:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzze",false:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzf"},disabled:{true:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzg",false:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzh"},context:{navigation:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzi",container:"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzj"}},defaultVariants:{},compoundVariants:[[{context:"navigation",active:!0},"pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzk"]]});function Mt({context:t,item:e,state:n,...r}){const{key:i}=e,l=z.useRef(null),{tabProps:o}=er({key:i},n,l),u=n.selectedKey===i,p=n.disabledKeys.has(i),h=F.modChildren(e.rendered,g=>g.type.displayName==="SpsTag"||F.Metadata.isWoodlandComponent(g.type)&&F.Metadata.get(g.type).name==="Tag"?[{className:F.cl(g.props.className,or({active:u,disabled:p,context:t}))}]:[{}]);return z.createElement("div",{...o,ref:l,className:lr({active:u,disabled:p,context:t}),...r},h)}F.Metadata.set(Mt,{name:"Tab"});function xt({context:t,"data-testid":e,state:n,...r}){const i=z.useRef(null),{tabPanelProps:l}=tr(r,n,i),o=t==="container"?F.Content:"div";return z.createElement(o,{...l,ref:i,"data-testid":e},n.selectedItem?n.selectedItem.props.children:null)}F.Metadata.set(xt,{name:"TabPanel"});const dr="";var ar=De({defaultClassName:"pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er0",variantClassNames:{context:{container:"pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er1",navigation:"pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er2"}},defaultVariants:{},compoundVariants:[]});function Ae({className:t,context:e="navigation","data-testid":n,...r}){const i=Rt(r),l=z.useRef(null),{tabListProps:o}=rr(r,i,l),u=F.useChildTestIdAttrBuilder({"data-testid":n});return z.createElement(z.Fragment,null,z.createElement("div",{...o,ref:l,className:F.cl(ar({context:e}),t),"data-testid":n},[...i.collection].map(p=>z.createElement(Mt,{key:p.key,item:p,state:i,context:e,...u(`tab-${String(p.key)}`)}))),z.createElement(xt,{key:i.selectedItem?i.selectedItem.key:null,state:i,context:e,...u("tab-panel")}))}F.Metadata.set(Ae,{name:"Tabs"});const cr={"Tabbed Navigation":{components:[Ae],examples:{basic:{label:"Basic Navigation Tabs",description:ze.code`
|
2
|
+
<p>Navigation tabs</p>
|
3
|
+
`,examples:{basic:{react:ze.code`
|
4
|
+
import { Item } from "@react-stately/collections";
|
5
|
+
import { Box, Icon } from "@sps-woodland/core";
|
6
|
+
import { Tabs } from "@sps-woodland/tabs";
|
7
|
+
import { Tag } from "@sps-woodland/tags";
|
8
|
+
|
9
|
+
function Component() {
|
10
|
+
/* If you have no need to know or control which tab is selected, you
|
11
|
+
* can omit this state and the change handler; the tabs will work
|
12
|
+
* on their own. */
|
13
|
+
const [selectedTab, setSelectedTab] = React.useState("trust");
|
14
|
+
|
15
|
+
return (
|
16
|
+
<Tabs
|
17
|
+
selectedKey={selectedTab}
|
18
|
+
onSelectionChange={setSelectedTab}
|
19
|
+
disabledKeys={["bold"]}
|
20
|
+
>
|
21
|
+
<Item key="trust" title="Trust">
|
22
|
+
<p>
|
23
|
+
So, what is it? What is it exactly that's going to revolutionize
|
24
|
+
the way we do business?
|
25
|
+
</p>
|
26
|
+
</Item>
|
27
|
+
<Item
|
28
|
+
key="reliability"
|
29
|
+
title={
|
30
|
+
<>
|
31
|
+
<Box mr="xs">Reliability</Box>
|
32
|
+
<Tag kind="error">00</Tag>
|
33
|
+
</>
|
34
|
+
}
|
35
|
+
>
|
36
|
+
<p>Reliability tab content</p>
|
37
|
+
</Item>
|
38
|
+
<Item
|
39
|
+
key="future"
|
40
|
+
title={
|
41
|
+
<>
|
42
|
+
<Icon icon="heart"/>
|
43
|
+
<Box ml="xs">The Future</Box>
|
44
|
+
</>
|
45
|
+
}
|
46
|
+
>
|
47
|
+
<p>The Future tab content</p>
|
48
|
+
</Item>
|
49
|
+
<Item
|
50
|
+
key="bold"
|
51
|
+
title={
|
52
|
+
<>
|
53
|
+
<Icon icon="heart"/>
|
54
|
+
<Box mx="xs">Bold</Box>
|
55
|
+
<Tag kind="key">00</Tag>
|
56
|
+
</>
|
57
|
+
}
|
58
|
+
>
|
59
|
+
<p>Bold tab content</p>
|
60
|
+
</Item>
|
61
|
+
</Tabs>
|
62
|
+
)
|
63
|
+
}
|
64
|
+
`}}}}}};I.MANIFEST=cr,I.Tabs=Ae,Object.defineProperties(I,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/lib/style.css
CHANGED
@@ -1 +1 @@
|
|
1
|
-
.
|
1
|
+
.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz0{align-items:center;border-top-width:.0625rem;border-right-width:.0625rem;border-style:solid;cursor:pointer;display:flex;font-size:.75rem;font-weight:600;line-height:.875rem;padding:.5rem 1rem}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz1{border-bottom-width:0;border-left-width:.0625rem;border-top-left-radius:.25rem;border-top-right-radius:.25rem;color:#717779;margin-bottom:-1px}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz2{border-bottom-width:.0625rem;border-left-width:0}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz2:first-child{border-left-width:.0625rem;border-bottom-left-radius:.25rem;border-top-left-radius:.25rem}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz2:last-child{border-bottom-right-radius:.25rem;border-top-right-radius:.25rem}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz5{cursor:not-allowed}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz7{background-color:#fff;border-color:#d2d4d4;color:#1f282c}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz8{border-color:transparent}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzz9:hover{background-color:#f3f4f4;border-color:#d2d4d4;box-shadow:0 -.0625rem #d2d4d4 inset}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzza{background-color:#007db8;border-color:#007db8;color:#fff}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzb{background-color:#fff;border-color:#d2d4d4;color:#4b5356}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzc:hover{background-color:#f3f4f4}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzd{color:#717779}.pkg_sps-woodland_tabs__version_7_19_0__hash_kz6kzzk{background-color:#fff;color:#4b5356}.pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er0{display:flex;flex-wrap:wrap}.pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er1{background-color:#e9e9ea;border-bottom-color:#d2d4d4;border-bottom-style:solid;border-bottom-width:.0625rem;border-top-left-radius:.25rem;border-top-right-radius:.25rem;padding-top:1rem;padding-left:1rem;padding-right:1rem}.pkg_sps-woodland_tabs__version_7_19_0__hash_fy26er2{margin-bottom:1rem}
|
package/package.json
CHANGED
@@ -1,20 +1,20 @@
|
|
1
1
|
{
|
2
2
|
"name": "@sps-woodland/tabs",
|
3
3
|
"description": "SPS Woodland Design System tabs component",
|
4
|
-
"version": "7.
|
4
|
+
"version": "7.19.0",
|
5
5
|
"author": "SPS Commerce",
|
6
6
|
"license": "UNLICENSED",
|
7
7
|
"repository": "https://github.com/SPSCommerce/woodland/tree/main/packages/@sps-woodland/tabs",
|
8
8
|
"homepage": "https://github.com/SPSCommerce/woodland/tree/master/packages/@sps-woodland/tabs#readme",
|
9
|
-
"module": "./lib/index.es.js",
|
10
9
|
"type": "module",
|
11
|
-
"
|
10
|
+
"module": "./lib/index.js",
|
11
|
+
"main": "./lib/index.umd.cjs",
|
12
12
|
"types": "./lib/index.d.ts",
|
13
13
|
"exports": {
|
14
14
|
".": {
|
15
|
-
"
|
16
|
-
"
|
17
|
-
"default": "./lib/index.
|
15
|
+
"require": "./lib/index.umd.cjs",
|
16
|
+
"import": "./lib/index.js",
|
17
|
+
"default": "./lib/index.js",
|
18
18
|
"types": "./lib/index.d.ts"
|
19
19
|
},
|
20
20
|
"./lib/style.css": {
|
@@ -30,8 +30,8 @@
|
|
30
30
|
"@spscommerce/utils": "^6.12.1",
|
31
31
|
"react": "^16.14.0",
|
32
32
|
"react-dom": "^16.14.0",
|
33
|
-
"@sps-woodland/tokens": "7.
|
34
|
-
"@sps-woodland/core": "7.
|
33
|
+
"@sps-woodland/tokens": "7.19.0",
|
34
|
+
"@sps-woodland/core": "7.19.0"
|
35
35
|
},
|
36
36
|
"devDependencies": {
|
37
37
|
"@react-stately/collections": "^3.6.0",
|
@@ -46,8 +46,8 @@
|
|
46
46
|
"react": "^16.14.0",
|
47
47
|
"react-dom": "^16.14.0",
|
48
48
|
"vite": "^3.2.5",
|
49
|
-
"@sps-woodland/core": "7.
|
50
|
-
"@sps-woodland/tokens": "7.
|
49
|
+
"@sps-woodland/core": "7.19.0",
|
50
|
+
"@sps-woodland/tokens": "7.19.0"
|
51
51
|
},
|
52
52
|
"dependencies": {
|
53
53
|
"@react-aria/tabs": "^3.3.4",
|
Binary file
|
package/vite.config.js
CHANGED
@@ -1,16 +1,25 @@
|
|
1
1
|
import path from "path";
|
2
2
|
import { vanillaExtractPlugin } from "@vanilla-extract/vite-plugin";
|
3
3
|
import { defineConfig } from "vite";
|
4
|
-
|
4
|
+
import { getVanillaExtractPluginProps } from "../../../scripts/vanilla-extract-plugin-props.js";
|
5
5
|
import pkg from "./package.json";
|
6
6
|
|
7
|
+
const packageVersion = process.env.PREDICTED_VERSION || pkg.version;
|
8
|
+
|
7
9
|
export default defineConfig({
|
8
|
-
plugins: [
|
10
|
+
plugins: [
|
11
|
+
vanillaExtractPlugin(
|
12
|
+
getVanillaExtractPluginProps({
|
13
|
+
packageName: pkg.name,
|
14
|
+
packageVersion,
|
15
|
+
})
|
16
|
+
),
|
17
|
+
],
|
9
18
|
build: {
|
10
19
|
lib: {
|
11
20
|
entry: path.resolve(__dirname, "src/index.ts"),
|
12
|
-
|
13
|
-
fileName:
|
21
|
+
name: "Tabs",
|
22
|
+
fileName: "index",
|
14
23
|
},
|
15
24
|
outDir: path.resolve(__dirname, "./lib"),
|
16
25
|
emptyOutDir: false,
|
package/lib/index.cjs.js
DELETED
@@ -1,64 +0,0 @@
|
|
1
|
-
"use strict";Object.defineProperties(exports,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}});const y=require("react"),_=require("@react-stately/collections"),Lt=require("react-dom"),z=require("@sps-woodland/core"),ze=require("@spscommerce/utils"),Ct=t=>t&&typeof t=="object"&&"default"in t?t:{default:t};function It(t){if(t&&t.__esModule)return t;const e=Object.create(null,{[Symbol.toStringTag]:{value:"Module"}});if(t){for(const r in t)if(r!=="default"){const n=Object.getOwnPropertyDescriptor(t,r);Object.defineProperty(e,r,n.get?n:{enumerable:!0,get:()=>t[r]})}}return e.default=t,Object.freeze(e)}const R=Ct(y),F=It(y);function ot(t,e,r){let[n,i]=y.useState(t||e),o=y.useRef(t!==void 0),s=t!==void 0;y.useEffect(()=>{let g=o.current;g!==s&&console.warn(`WARN: A component changed from ${g?"controlled":"uncontrolled"} to ${s?"controlled":"uncontrolled"}.`),o.current=s},[s]);let u=s?t:n,f=y.useCallback((g,...v)=>{let w=($,...h)=>{r&&(Object.is(u,$)||r($,...h)),s||(u=$)};typeof g=="function"?(console.warn("We can not support a function callback. See Github Issues for details https://github.com/adobe/react-spectrum/issues/2320"),i((h,...M)=>{let P=g(s?u:h,...M);return w(P,...v),s?h:P})):(s||i(g),w(g,...v))},[s,u,r]);return[u,f]}class A extends Set{constructor(e,r,n){super(e),e instanceof A?(this.anchorKey=r||e.anchorKey,this.currentKey=n||e.currentKey):(this.anchorKey=r,this.currentKey=n)}}function Dt(t,e){if(t.size!==e.size)return!1;for(let r of t)if(!e.has(r))return!1;return!0}function At(t){let{selectionMode:e="none",disallowEmptySelection:r,allowDuplicateSelectionEvents:n,selectionBehavior:i="toggle",disabledBehavior:o="all"}=t,s=y.useRef(!1),[,u]=y.useState(!1),f=y.useRef(null),g=y.useRef(null),[,v]=y.useState(null),w=y.useMemo(()=>Re(t.selectedKeys),[t.selectedKeys]),$=y.useMemo(()=>Re(t.defaultSelectedKeys,new A),[t.defaultSelectedKeys]),[h,M]=ot(w,$,t.onSelectionChange),P=y.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[K,L]=y.useState(i);i==="replace"&&K==="toggle"&&typeof h=="object"&&h.size===0&&L("replace");let k=y.useRef(i);return y.useEffect(()=>{i!==k.current&&(L(i),k.current=i)},[i]),{selectionMode:e,disallowEmptySelection:r,selectionBehavior:K,setSelectionBehavior:L,get isFocused(){return s.current},setFocused(E){s.current=E,u(E)},get focusedKey(){return f.current},get childFocusStrategy(){return g.current},setFocusedKey(E,C="first"){f.current=E,g.current=C,v(E)},selectedKeys:h,setSelectedKeys(E){(n||!Dt(E,h))&&M(E)},disabledKeys:P,disabledBehavior:o}}function Re(t,e){return t?t==="all"?"all":new A(t):e}class Ft{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,r){(e==null||this.collection.getItem(e))&&this.state.setFocusedKey(e,r)}get selectedKeys(){return this.state.selectedKeys==="all"?new Set(this.getSelectAllKeys()):this.state.selectedKeys}get rawSelection(){return this.state.selectedKeys}isSelected(e){return this.state.selectionMode==="none"?!1:(e=this.getKey(e),this.state.selectedKeys==="all"?this.canSelectItem(e):this.state.selectedKeys.has(e))}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(),r=this.state.selectedKeys;return this._isSelectAll=e.every(n=>r.has(n)),this._isSelectAll}get firstSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&_.compareNodeOrder(this.collection,n,e)<0)&&(e=n)}return e==null?void 0:e.key}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let n=this.collection.getItem(r);(!e||n&&_.compareNodeOrder(this.collection,n,e)>0)&&(e=n)}return e==null?void 0:e.key}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}e=this.getKey(e);let r;if(this.state.selectedKeys==="all")r=new A([e],e,e);else{let n=this.state.selectedKeys,i=n.anchorKey||e;r=new A(n,i,e);for(let o of this.getKeyRange(i,n.currentKey||e))r.delete(o);for(let o of this.getKeyRange(e,i))this.canSelectItem(o)&&r.add(o)}this.state.setSelectedKeys(r)}getKeyRange(e,r){let n=this.collection.getItem(e),i=this.collection.getItem(r);return n&&i?_.compareNodeOrder(this.collection,n,i)<=0?this.getKeyRangeInternal(e,r):this.getKeyRangeInternal(r,e):[]}getKeyRangeInternal(e,r){let n=[],i=e;for(;i;){let o=this.collection.getItem(i);if((o&&o.type==="item"||o.type==="cell"&&this.allowsCellSelection)&&n.push(i),i===r)return n;i=this.collection.getKeyAfter(i)}return[]}getKey(e){let r=this.collection.getItem(e);if(!r||r.type==="cell"&&this.allowsCellSelection)return e;for(;r.type!=="item"&&r.parentKey!=null;)r=this.collection.getItem(r.parentKey);return!r||r.type!=="item"?null:r.key}toggleSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"&&!this.isSelected(e)){this.replaceSelection(e);return}if(e=this.getKey(e),e==null)return;let r=new A(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(e)?r.delete(e):this.canSelectItem(e)&&(r.add(e),r.anchorKey=e,r.currentKey=e),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none"||(e=this.getKey(e),e==null))return;let r=this.canSelectItem(e)?new A([e],e,e):new A;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let r=new A;for(let n of e)if(n=this.getKey(n),n!=null&&(r.add(n),this.selectionMode==="single"))break;this.state.setSelectedKeys(r)}getSelectAllKeys(){let e=[],r=n=>{for(;n;){if(this.canSelectItem(n)){let i=this.collection.getItem(n);i.type==="item"&&e.push(n),i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&r(_.getFirstItem(_.getChildNodes(i,this.collection)).key)}n=this.collection.getKeyAfter(n)}};return r(this.collection.getFirstKey()),e}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 A)}toggleSelectAll(){this.isSelectAll?this.clearSelection():this.selectAll()}select(e,r){this.selectionMode!=="none"&&(this.selectionMode==="single"?this.isSelected(e)&&!this.disallowEmptySelection?this.toggleSelection(e):this.replaceSelection(e):this.selectionBehavior==="toggle"||r&&(r.pointerType==="touch"||r.pointerType==="virtual")?this.toggleSelection(e):this.replaceSelection(e))}isSelectionEqual(e){if(e===this.state.selectedKeys)return!0;let r=this.selectedKeys;if(e.size!==r.size)return!1;for(let n of e)if(!r.has(n))return!1;for(let n of r)if(!e.has(n))return!1;return!0}canSelectItem(e){if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){return this.state.disabledKeys.has(e)&&this.state.disabledBehavior==="all"}isLink(e){var r,n;return!!(!((n=this.collection.getItem(e))===null||n===void 0||(r=n.props)===null||r===void 0)&&r.href)}constructor(e,r,n){this.collection=e,this.state=r;var i;this.allowsCellSelection=(i=n==null?void 0:n.allowsCellSelection)!==null&&i!==void 0?i:!1,this._isSelectAll=null}}class Ne{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let r=this.keyMap.get(e);return r?r.prevKey:null}getKeyAfter(e){let r=this.keyMap.get(e);return r?r.nextKey:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){return this.keyMap.get(e)}at(e){const r=[...this.getKeys()];return this.getItem(r[e])}getChildren(e){let r=this.keyMap.get(e);return(r==null?void 0:r.childNodes)||[]}constructor(e){this.keyMap=new Map,this.iterable=e;let r=o=>{if(this.keyMap.set(o.key,o),o.childNodes&&o.type==="section")for(let s of o.childNodes)r(s)};for(let o of e)r(o);let n,i=0;for(let[o,s]of this.keyMap)n?(n.nextKey=o,s.prevKey=n.key):(this.firstKey=o,s.prevKey=void 0),s.type==="item"&&(s.index=i++),n=s,n.nextKey=void 0;this.lastKey=n==null?void 0:n.key}}function Ot(t){let{filter:e}=t,r=At(t),n=y.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=y.useCallback(g=>e?new Ne(e(g)):new Ne(g),[e]),o=y.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),s=_.useCollection(t,i,o),u=y.useMemo(()=>new Ft(s,r),[s,r]);const f=y.useRef(null);return y.useEffect(()=>{if(r.focusedKey!=null&&!s.getItem(r.focusedKey)){const g=f.current.getItem(r.focusedKey),v=[...f.current.getKeys()].map(P=>{const K=f.current.getItem(P);return K.type==="item"?K:null}).filter(P=>P!==null),w=[...s.getKeys()].map(P=>{const K=s.getItem(P);return K.type==="item"?K:null}).filter(P=>P!==null),$=v.length-w.length;let h=Math.min($>1?Math.max(g.index-$+1,0):g.index,w.length-1),M;for(;h>=0;){if(!u.isDisabled(w[h].key)){M=w[h];break}h<w.length-1?h++:(h>g.index&&(h=g.index),h--)}r.setFocusedKey(M?M.key:null)}f.current=s},[s,u,r,r.focusedKey]),{collection:s,disabledKeys:n,selectionManager:u}}function zt(t){var e;let[r,n]=ot(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),i=y.useMemo(()=>r!=null?[r]:[],[r]),{collection:o,disabledKeys:s,selectionManager:u}=Ot({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:i,onSelectionChange:g=>{var v;let w=(v=g.values().next().value)!==null&&v!==void 0?v:null;w===r&&t.onSelectionChange&&t.onSelectionChange(w),n(w)}}),f=r!=null?o.getItem(r):null;return{collection:o,disabledKeys:s,selectionManager:u,selectedKey:r,setSelectedKey:n,selectedItem:f}}function Rt(t){var e;let r=zt({...t,suppressTextValueWarning:!0,defaultSelectedKey:(e=t.defaultSelectedKey)!==null&&e!==void 0?e:Be(t.collection,t.disabledKeys?new Set(t.disabledKeys):new Set)}),{selectionManager:n,collection:i,selectedKey:o}=r,s=y.useRef(o);return y.useEffect(()=>{let u=o;(n.isEmpty||!i.getItem(u))&&(u=Be(i,r.disabledKeys),u!=null&&n.setSelectedKeys([u])),(u!=null&&n.focusedKey==null||!n.isFocused&&u!==s.current)&&n.setFocusedKey(u),s.current=u}),{...r,isDisabled:t.isDisabled||!1}}function Be(t,e){let r=null;if(t){for(r=t.getFirstKey();e.has(r)&&r!==t.getLastKey();)r=t.getKeyAfter(r);e.has(r)&&r===t.getLastKey()&&(r=t.getFirstKey())}return r}const ue={prefix:String(Math.round(Math.random()*1e10)),current:0},st=R.default.createContext(ue),Nt=R.default.createContext(!1);let Bt=Boolean(typeof window<"u"&&window.document&&window.document.createElement),ve=new WeakMap;function Ut(t=!1){let e=y.useContext(st),r=y.useRef(null);if(r.current===null&&!t){var n,i;let o=(i=R.default.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED)===null||i===void 0||(n=i.ReactCurrentOwner)===null||n===void 0?void 0:n.current;if(o){let s=ve.get(o);s==null?ve.set(o,{id:e.current,state:o.memoizedState}):o.memoizedState!==s.state&&(e.current=s.id,ve.delete(o))}r.current=++e.current}return r.current}function jt(t){let e=y.useContext(st);e===ue&&!Bt&&console.warn("When server rendering, you must wrap your application in an <SSRProvider> to ensure consistent ids are generated between the client and server.");let r=Ut(!!t),n=e===ue&&process.env.NODE_ENV==="test"?"react-aria":`react-aria${e.prefix}`;return t||`${n}-${r}`}function Wt(t){let e=R.default.useId(),[r]=y.useState(at()),n=r||process.env.NODE_ENV==="test"?"react-aria":`react-aria${ue.prefix}`;return t||`${n}-${e}`}const Ht=typeof R.default.useId=="function"?Wt:jt;function Vt(){return!1}function Gt(){return!0}function qt(t){return()=>{}}function at(){return typeof R.default.useSyncExternalStore=="function"?R.default.useSyncExternalStore(qt,Vt,Gt):y.useContext(Nt)}function ct(t){var e,r,n="";if(typeof t=="string"||typeof t=="number")n+=t;else if(typeof t=="object")if(Array.isArray(t)){var i=t.length;for(e=0;e<i;e++)t[e]&&(r=ct(t[e]))&&(n&&(n+=" "),n+=r)}else for(r in t)t[r]&&(n&&(n+=" "),n+=r);return n}function Xt(){for(var t,e,r=0,n="",i=arguments.length;r<i;r++)(t=arguments[r])&&(e=ct(t))&&(n&&(n+=" "),n+=e);return n}const ne=typeof document<"u"?R.default.useLayoutEffect:()=>{};function Z(t){const e=y.useRef(null);return ne(()=>{e.current=t},[t]),y.useCallback((...r)=>{const n=e.current;return n(...r)},[])}let Yt=Boolean(typeof window<"u"&&window.document&&window.document.createElement),de=new Map;function ut(t){let[e,r]=y.useState(t),n=y.useRef(null),i=Ht(e),o=y.useCallback(s=>{n.current=s},[]);return Yt&&de.set(i,o),ne(()=>{let s=i;return()=>{de.delete(s)}},[i]),y.useEffect(()=>{let s=n.current;s&&(n.current=null,r(s))}),i}function Jt(t,e){if(t===e)return t;let r=de.get(t);if(r)return r(e),e;let n=de.get(e);return n?(n(t),t):e}function _t(...t){return(...e)=>{for(let r of t)typeof r=="function"&&r(...e)}}const O=t=>{var e;return(e=t==null?void 0:t.ownerDocument)!==null&&e!==void 0?e:document},fe=t=>t&&"window"in t&&t.window===t?t:O(t).defaultView||window;function W(...t){let e={...t[0]};for(let r=1;r<t.length;r++){let n=t[r];for(let i in n){let o=e[i],s=n[i];typeof o=="function"&&typeof s=="function"&&i[0]==="o"&&i[1]==="n"&&i.charCodeAt(2)>=65&&i.charCodeAt(2)<=90?e[i]=_t(o,s):(i==="className"||i==="UNSAFE_className")&&typeof o=="string"&&typeof s=="string"?e[i]=Xt(o,s):i==="id"&&o&&s?e.id=Jt(o,s):e[i]=s!==void 0?s:o}}return e}const Zt=new Set(["id"]),Qt=new Set(["aria-label","aria-labelledby","aria-describedby","aria-details"]),er=new Set(["href","target","rel","download","ping","referrerPolicy"]),tr=/^(data-.*)$/;function rr(t,e={}){let{labelable:r,isLink:n,propNames:i}=e,o={};for(const s in t)Object.prototype.hasOwnProperty.call(t,s)&&(Zt.has(s)||r&&Qt.has(s)||n&&er.has(s)||(i==null?void 0:i.has(s))||tr.test(s))&&(o[s]=t[s]);return o}function j(t){if(nr())t.focus({preventScroll:!0});else{let e=ir(t);t.focus(),lr(e)}}let le=null;function nr(){if(le==null){le=!1;try{var t=document.createElement("div");t.focus({get preventScroll(){return le=!0,!0}})}catch{}}return le}function ir(t){for(var e=t.parentNode,r=[],n=document.scrollingElement||document.documentElement;e instanceof HTMLElement&&e!==n;)(e.offsetHeight<e.scrollHeight||e.offsetWidth<e.scrollWidth)&&r.push({element:e,scrollTop:e.scrollTop,scrollLeft:e.scrollLeft}),e=e.parentNode;return n instanceof HTMLElement&&r.push({element:n,scrollTop:n.scrollTop,scrollLeft:n.scrollLeft}),r}function lr(t){for(let{element:e,scrollTop:r,scrollLeft:n}of t)e.scrollTop=r,e.scrollLeft=n}function ye(t){var e;return typeof window>"u"||window.navigator==null?!1:((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.brands.some(r=>t.test(r.brand)))||t.test(window.navigator.userAgent)}function Me(t){var e;return typeof window<"u"&&window.navigator!=null?t.test(((e=window.navigator.userAgentData)===null||e===void 0?void 0:e.platform)||window.navigator.platform):!1}function V(){return Me(/^Mac/i)}function or(){return Me(/^iPhone/i)}function dt(){return Me(/^iPad/i)||V()&&navigator.maxTouchPoints>1}function Le(){return or()||dt()}function sr(){return V()||Le()}function ar(){return ye(/AppleWebKit/i)&&!cr()}function cr(){return ye(/Chrome/i)}function ft(){return ye(/Android/i)}function ur(){return ye(/Firefox/i)}const dr=y.createContext({isNative:!0,open:pr});function pt(){return y.useContext(dr)}function G(t,e,r=!0){var n,i;let{metaKey:o,ctrlKey:s,altKey:u,shiftKey:f}=e;ur()&&((i=window.event)===null||i===void 0||(n=i.type)===null||n===void 0?void 0:n.startsWith("key"))&&t.target==="_blank"&&(V()?o=!0:s=!0);let g=ar()&&V()&&!dt()?new KeyboardEvent("keydown",{keyIdentifier:"Enter",metaKey:o,ctrlKey:s,altKey:u,shiftKey:f}):new MouseEvent("click",{metaKey:o,ctrlKey:s,altKey:u,shiftKey:f,bubbles:!0,cancelable:!0});G.isOpening=r,j(t),t.dispatchEvent(g),G.isOpening=!1}G.isOpening=!1;function fr(t,e){if(t instanceof HTMLAnchorElement)e(t);else if(t.hasAttribute("data-href")){let r=document.createElement("a");r.href=t.getAttribute("data-href"),t.hasAttribute("data-target")&&(r.target=t.getAttribute("data-target")),t.hasAttribute("data-rel")&&(r.rel=t.getAttribute("data-rel")),t.hasAttribute("data-download")&&(r.download=t.getAttribute("data-download")),t.hasAttribute("data-ping")&&(r.ping=t.getAttribute("data-ping")),t.hasAttribute("data-referrer-policy")&&(r.referrerPolicy=t.getAttribute("data-referrer-policy")),t.appendChild(r),e(r),t.removeChild(r)}}function pr(t,e){fr(t,r=>G(r,e))}let Q=new Map,Se=new Set;function Ue(){if(typeof window>"u")return;let t=r=>{let n=Q.get(r.target);n||(n=new Set,Q.set(r.target,n),r.target.addEventListener("transitioncancel",e)),n.add(r.propertyName)},e=r=>{let n=Q.get(r.target);if(!!n&&(n.delete(r.propertyName),n.size===0&&(r.target.removeEventListener("transitioncancel",e),Q.delete(r.target)),Q.size===0)){for(let i of Se)i();Se.clear()}};document.body.addEventListener("transitionrun",t),document.body.addEventListener("transitionend",e)}typeof document<"u"&&(document.readyState!=="loading"?Ue():document.addEventListener("DOMContentLoaded",Ue));function yt(t){requestAnimationFrame(()=>{Q.size===0?t():Se.add(t)})}function bt(){let t=y.useRef(new Map),e=y.useCallback((i,o,s,u)=>{let f=u!=null&&u.once?(...g)=>{t.current.delete(s),s(...g)}:s;t.current.set(s,{type:o,eventTarget:i,fn:f,options:u}),i.addEventListener(o,s,u)},[]),r=y.useCallback((i,o,s,u)=>{var f;let g=((f=t.current.get(s))===null||f===void 0?void 0:f.fn)||s;i.removeEventListener(o,g,u),t.current.delete(s)},[]),n=y.useCallback(()=>{t.current.forEach((i,o)=>{r(i.eventTarget,i.type,o,i.options)})},[r]);return y.useEffect(()=>n,[n]),{addGlobalListener:e,removeGlobalListener:r,removeAllGlobalListeners:n}}function gt(t,e){let{id:r,"aria-label":n,"aria-labelledby":i}=t;return r=ut(r),i&&n?i=[...new Set([r,...i.trim().split(/\s+/)])].join(" "):i&&(i=i.trim().split(/\s+/).join(" ")),!n&&!i&&e&&(n=e),{id:r,"aria-label":n,"aria-labelledby":i}}function yr(t,e){ne(()=>{if(t&&t.ref&&e)return t.ref.current=e.current,()=>{t.ref.current=null}})}function je(t,e){for(We(t,e)&&(t=t.parentElement);t&&!We(t,e);)t=t.parentElement;return t||document.scrollingElement||document.documentElement}function We(t,e){let r=window.getComputedStyle(t),n=/(auto|scroll)/.test(r.overflow+r.overflowX+r.overflowY);return n&&e&&(n=t.scrollHeight!==t.clientHeight||t.scrollWidth!==t.clientWidth),n}let br=0;const he=new Map;function gr(t){let[e,r]=y.useState(void 0);return ne(()=>{if(!t)return;let n=he.get(t);if(n)r(n.element.id);else{let i=`react-aria-description-${br++}`;r(i);let o=document.createElement("div");o.id=i,o.style.display="none",o.textContent=t,document.body.appendChild(o),n={refCount:0,element:o},he.set(t,n)}return n.refCount++,()=>{--n.refCount===0&&(n.element.remove(),he.delete(t))}},[t]),{"aria-describedby":t?e:void 0}}function vr(t,e,r,n){let i=Z(r),o=r==null;y.useEffect(()=>{if(o)return;let s=t.current;return s.addEventListener(e,i,n),()=>{s.removeEventListener(e,i,n)}},[t,e,n,o,i])}function vt(t,e){let r=He(t,e,"left"),n=He(t,e,"top"),i=e.offsetWidth,o=e.offsetHeight,s=t.scrollLeft,u=t.scrollTop,{borderTopWidth:f,borderLeftWidth:g}=getComputedStyle(t),v=t.scrollLeft+parseInt(g,10),w=t.scrollTop+parseInt(f,10),$=v+t.clientWidth,h=w+t.clientHeight;r<=s?s=r-parseInt(g,10):r+i>$&&(s+=r+i-$),n<=w?u=n-parseInt(f,10):n+o>h&&(u+=n+o-h),t.scrollLeft=s,t.scrollTop=u}function He(t,e,r){const n=r==="left"?"offsetLeft":"offsetTop";let i=0;for(;e.offsetParent&&(i+=e[n],e.offsetParent!==t);){if(e.offsetParent.contains(t)){i-=t[n];break}e=e.offsetParent}return i}function Ve(t,e){if(document.contains(t)){let s=document.scrollingElement||document.documentElement;if(window.getComputedStyle(s).overflow==="hidden"){let f=je(t);for(;t&&f&&t!==s&&f!==s;)vt(f,t),t=f,f=je(t)}else{var r;let{left:f,top:g}=t.getBoundingClientRect();t==null||(r=t.scrollIntoView)===null||r===void 0||r.call(t,{block:"nearest"});let{left:v,top:w}=t.getBoundingClientRect();if(Math.abs(f-v)>1||Math.abs(g-w)>1){var n,i,o;e==null||(i=e.containingElement)===null||i===void 0||(n=i.scrollIntoView)===null||n===void 0||n.call(i,{block:"center",inline:"center"}),(o=t.scrollIntoView)===null||o===void 0||o.call(t,{block:"nearest"})}}}}function Ke(t){return t.mozInputSource===0&&t.isTrusted?!0:ft()&&t.pointerType?t.type==="click"&&t.buttons===1:t.detail===0&&!t.pointerType}function hr(t){return!ft()&&t.width===0&&t.height===0||t.width===1&&t.height===1&&t.pressure===0&&t.detail===0&&t.pointerType==="mouse"}function $r(t,e){return e.get?e.get.call(t):e.value}function ht(t,e,r){if(!e.has(t))throw new TypeError("attempted to "+r+" private field on non-instance");return e.get(t)}function mr(t,e){var r=ht(t,e,"get");return $r(t,r)}function Sr(t,e){if(e.has(t))throw new TypeError("Cannot initialize the same private elements twice on an object")}function Kr(t,e,r){Sr(t,e),e.set(t,r)}function Tr(t,e,r){if(e.set)e.set.call(t,r);else{if(!e.writable)throw new TypeError("attempted to set read only private field");e.value=r}}function Ge(t,e,r){var n=ht(t,e,"set");return Tr(t,n,r),r}let te="default",Te="",ce=new WeakMap;function qe(t){if(Le()){if(te==="default"){const e=O(t);Te=e.documentElement.style.webkitUserSelect,e.documentElement.style.webkitUserSelect="none"}te="disabled"}else(t instanceof HTMLElement||t instanceof SVGElement)&&(ce.set(t,t.style.userSelect),t.style.userSelect="none")}function oe(t){if(Le()){if(te!=="disabled")return;te="restoring",setTimeout(()=>{yt(()=>{if(te==="restoring"){const e=O(t);e.documentElement.style.webkitUserSelect==="none"&&(e.documentElement.style.webkitUserSelect=Te||""),Te="",te="default"}})},300)}else if((t instanceof HTMLElement||t instanceof SVGElement)&&t&&ce.has(t)){let e=ce.get(t);t.style.userSelect==="none"&&(t.style.userSelect=e),t.getAttribute("style")===""&&t.removeAttribute("style"),ce.delete(t)}}const $t=R.default.createContext({register:()=>{}});$t.displayName="PressResponderContext";function wr(t){let e=y.useContext($t);if(e){let{register:r,...n}=e;t=W(n,t),r()}return yr(e,t.ref),t}var se=new WeakMap;class ae{continuePropagation(){Ge(this,se,!1)}get shouldStopPropagation(){return mr(this,se)}constructor(e,r,n){Kr(this,se,{writable:!0,value:void 0}),Ge(this,se,!0),this.type=e,this.pointerType=r,this.target=n.currentTarget,this.shiftKey=n.shiftKey,this.metaKey=n.metaKey,this.ctrlKey=n.ctrlKey,this.altKey=n.altKey}}const Xe=Symbol("linkClicked");function mt(t){let{onPress:e,onPressChange:r,onPressStart:n,onPressEnd:i,onPressUp:o,isDisabled:s,isPressed:u,preventFocusOnPress:f,shouldCancelOnPointerExit:g,allowTextSelectionOnPress:v,ref:w,...$}=wr(t),[h,M]=y.useState(!1),P=y.useRef({isPressed:!1,ignoreEmulatedMouseEvents:!1,ignoreClickAfterPress:!1,didFirePressStart:!1,isTriggeringEvent:!1,activePointerId:null,target:null,isOverTarget:!1,pointerType:null}),{addGlobalListener:K,removeAllGlobalListeners:L}=bt(),k=Z((l,m)=>{let p=P.current;if(s||p.didFirePressStart)return!1;let c=!0;if(p.isTriggeringEvent=!0,n){let T=new ae("pressstart",m,l);n(T),c=T.shouldStopPropagation}return r&&r(!0),p.isTriggeringEvent=!1,p.didFirePressStart=!0,M(!0),c}),E=Z((l,m,p=!0)=>{let c=P.current;if(!c.didFirePressStart)return!1;c.ignoreClickAfterPress=!0,c.didFirePressStart=!1,c.isTriggeringEvent=!0;let T=!0;if(i){let a=new ae("pressend",m,l);i(a),T=a.shouldStopPropagation}if(r&&r(!1),M(!1),e&&p&&!s){let a=new ae("press",m,l);e(a),T&&(T=a.shouldStopPropagation)}return c.isTriggeringEvent=!1,T}),C=Z((l,m)=>{let p=P.current;if(s)return!1;if(o){p.isTriggeringEvent=!0;let c=new ae("pressup",m,l);return o(c),p.isTriggeringEvent=!1,c.shouldStopPropagation}return!0}),I=Z(l=>{let m=P.current;m.isPressed&&m.target&&(m.isOverTarget&&m.pointerType!=null&&E(U(m.target,l),m.pointerType,!1),m.isPressed=!1,m.isOverTarget=!1,m.activePointerId=null,m.pointerType=null,L(),v||oe(m.target))}),D=Z(l=>{g&&I(l)}),N=y.useMemo(()=>{let l=P.current,m={onKeyDown(c){if($e(c.nativeEvent,c.currentTarget)&&c.currentTarget.contains(c.target)){var T;Je(c.target,c.key)&&c.preventDefault();let a=!0;!l.isPressed&&!c.repeat&&(l.target=c.currentTarget,l.isPressed=!0,a=k(c,"keyboard"),K(O(c.currentTarget),"keyup",p,!1)),a&&c.stopPropagation(),c.metaKey&&V()&&((T=l.metaKeyEvents)===null||T===void 0||T.set(c.key,c.nativeEvent))}else c.key==="Meta"&&(l.metaKeyEvents=new Map)},onKeyUp(c){$e(c.nativeEvent,c.currentTarget)&&!c.repeat&&c.currentTarget.contains(c.target)&&l.target&&C(U(l.target,c),"keyboard")},onClick(c){if(!(c&&!c.currentTarget.contains(c.target))&&c&&c.button===0&&!l.isTriggeringEvent&&!G.isOpening){let T=!0;if(s&&c.preventDefault(),!l.ignoreClickAfterPress&&!l.ignoreEmulatedMouseEvents&&!l.isPressed&&(l.pointerType==="virtual"||Ke(c.nativeEvent))){!s&&!f&&j(c.currentTarget);let a=k(c,"virtual"),d=C(c,"virtual"),x=E(c,"virtual");T=a&&d&&x}l.ignoreEmulatedMouseEvents=!1,l.ignoreClickAfterPress=!1,T&&c.stopPropagation()}}},p=c=>{var T;if(l.isPressed&&l.target&&$e(c,l.target)){var a;Je(c.target,c.key)&&c.preventDefault();let x=c.target,B=E(U(l.target,c),"keyboard",l.target.contains(x));L(),B&&c.stopPropagation(),c.key!=="Enter"&&Ce(l.target)&&l.target.contains(x)&&!c[Xe]&&(c[Xe]=!0,G(l.target,c,!1)),l.isPressed=!1,(a=l.metaKeyEvents)===null||a===void 0||a.delete(c.key)}else if(c.key==="Meta"&&((T=l.metaKeyEvents)===null||T===void 0?void 0:T.size)){var d;let x=l.metaKeyEvents;l.metaKeyEvents=void 0;for(let B of x.values())(d=l.target)===null||d===void 0||d.dispatchEvent(new KeyboardEvent("keyup",B))}};if(typeof PointerEvent<"u"){m.onPointerDown=d=>{if(d.button!==0||!d.currentTarget.contains(d.target))return;if(hr(d.nativeEvent)){l.pointerType="virtual";return}me(d.currentTarget)&&d.preventDefault(),l.pointerType=d.pointerType;let x=!0;l.isPressed||(l.isPressed=!0,l.isOverTarget=!0,l.activePointerId=d.pointerId,l.target=d.currentTarget,!s&&!f&&j(d.currentTarget),v||qe(l.target),x=k(d,l.pointerType),K(O(d.currentTarget),"pointermove",c,!1),K(O(d.currentTarget),"pointerup",T,!1),K(O(d.currentTarget),"pointercancel",a,!1)),x&&d.stopPropagation()},m.onMouseDown=d=>{!d.currentTarget.contains(d.target)||d.button===0&&(me(d.currentTarget)&&d.preventDefault(),d.stopPropagation())},m.onPointerUp=d=>{!d.currentTarget.contains(d.target)||l.pointerType==="virtual"||d.button===0&&Y(d,d.currentTarget)&&C(d,l.pointerType||d.pointerType)};let c=d=>{d.pointerId===l.activePointerId&&(l.target&&Y(d,l.target)?!l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!0,k(U(l.target,d),l.pointerType)):l.target&&l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!1,E(U(l.target,d),l.pointerType,!1),D(d)))},T=d=>{d.pointerId===l.activePointerId&&l.isPressed&&d.button===0&&l.target&&(Y(d,l.target)&&l.pointerType!=null?E(U(l.target,d),l.pointerType):l.isOverTarget&&l.pointerType!=null&&E(U(l.target,d),l.pointerType,!1),l.isPressed=!1,l.isOverTarget=!1,l.activePointerId=null,l.pointerType=null,L(),v||oe(l.target))},a=d=>{I(d)};m.onDragStart=d=>{!d.currentTarget.contains(d.target)||I(d)}}else{m.onMouseDown=a=>{if(a.button!==0||!a.currentTarget.contains(a.target))return;if(me(a.currentTarget)&&a.preventDefault(),l.ignoreEmulatedMouseEvents){a.stopPropagation();return}l.isPressed=!0,l.isOverTarget=!0,l.target=a.currentTarget,l.pointerType=Ke(a.nativeEvent)?"virtual":"mouse",!s&&!f&&j(a.currentTarget),k(a,l.pointerType)&&a.stopPropagation(),K(O(a.currentTarget),"mouseup",c,!1)},m.onMouseEnter=a=>{if(!a.currentTarget.contains(a.target))return;let d=!0;l.isPressed&&!l.ignoreEmulatedMouseEvents&&l.pointerType!=null&&(l.isOverTarget=!0,d=k(a,l.pointerType)),d&&a.stopPropagation()},m.onMouseLeave=a=>{if(!a.currentTarget.contains(a.target))return;let d=!0;l.isPressed&&!l.ignoreEmulatedMouseEvents&&l.pointerType!=null&&(l.isOverTarget=!1,d=E(a,l.pointerType,!1),D(a)),d&&a.stopPropagation()},m.onMouseUp=a=>{!a.currentTarget.contains(a.target)||!l.ignoreEmulatedMouseEvents&&a.button===0&&C(a,l.pointerType||"mouse")};let c=a=>{if(a.button===0){if(l.isPressed=!1,L(),l.ignoreEmulatedMouseEvents){l.ignoreEmulatedMouseEvents=!1;return}l.target&&Y(a,l.target)&&l.pointerType!=null?E(U(l.target,a),l.pointerType):l.target&&l.isOverTarget&&l.pointerType!=null&&E(U(l.target,a),l.pointerType,!1),l.isOverTarget=!1}};m.onTouchStart=a=>{if(!a.currentTarget.contains(a.target))return;let d=Pr(a.nativeEvent);if(!d)return;l.activePointerId=d.identifier,l.ignoreEmulatedMouseEvents=!0,l.isOverTarget=!0,l.isPressed=!0,l.target=a.currentTarget,l.pointerType="touch",!s&&!f&&j(a.currentTarget),v||qe(l.target),k(a,l.pointerType)&&a.stopPropagation(),K(fe(a.currentTarget),"scroll",T,!0)},m.onTouchMove=a=>{if(!a.currentTarget.contains(a.target))return;if(!l.isPressed){a.stopPropagation();return}let d=Ye(a.nativeEvent,l.activePointerId),x=!0;d&&Y(d,a.currentTarget)?!l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!0,x=k(a,l.pointerType)):l.isOverTarget&&l.pointerType!=null&&(l.isOverTarget=!1,x=E(a,l.pointerType,!1),D(a)),x&&a.stopPropagation()},m.onTouchEnd=a=>{if(!a.currentTarget.contains(a.target))return;if(!l.isPressed){a.stopPropagation();return}let d=Ye(a.nativeEvent,l.activePointerId),x=!0;d&&Y(d,a.currentTarget)&&l.pointerType!=null?(C(a,l.pointerType),x=E(a,l.pointerType)):l.isOverTarget&&l.pointerType!=null&&(x=E(a,l.pointerType,!1)),x&&a.stopPropagation(),l.isPressed=!1,l.activePointerId=null,l.isOverTarget=!1,l.ignoreEmulatedMouseEvents=!0,l.target&&!v&&oe(l.target),L()},m.onTouchCancel=a=>{!a.currentTarget.contains(a.target)||(a.stopPropagation(),l.isPressed&&I(a))};let T=a=>{l.isPressed&&a.target.contains(l.target)&&I({currentTarget:l.target,shiftKey:!1,ctrlKey:!1,metaKey:!1,altKey:!1})};m.onDragStart=a=>{!a.currentTarget.contains(a.target)||I(a)}}return m},[K,s,f,L,v,I,D,E,k,C]);return y.useEffect(()=>()=>{var l;v||oe((l=P.current.target)!==null&&l!==void 0?l:void 0)},[v]),{isPressed:u||h,pressProps:W($,N)}}function Ce(t){return t.tagName==="A"&&t.hasAttribute("href")}function $e(t,e){const{key:r,code:n}=t,i=e,o=i.getAttribute("role");return(r==="Enter"||r===" "||r==="Spacebar"||n==="Space")&&!(i instanceof fe(i).HTMLInputElement&&!St(i,r)||i instanceof fe(i).HTMLTextAreaElement||i.isContentEditable)&&!((o==="link"||!o&&Ce(i))&&r!=="Enter")}function Pr(t){const{targetTouches:e}=t;return e.length>0?e[0]:null}function Ye(t,e){const r=t.changedTouches;for(let n=0;n<r.length;n++){const i=r[n];if(i.identifier===e)return i}return null}function U(t,e){return{currentTarget:t,shiftKey:e.shiftKey,ctrlKey:e.ctrlKey,metaKey:e.metaKey,altKey:e.altKey}}function Er(t){let e=0,r=0;return t.width!==void 0?e=t.width/2:t.radiusX!==void 0&&(e=t.radiusX),t.height!==void 0?r=t.height/2:t.radiusY!==void 0&&(r=t.radiusY),{top:t.clientY-r,right:t.clientX+e,bottom:t.clientY+r,left:t.clientX-e}}function xr(t,e){return!(t.left>e.right||e.left>t.right||t.top>e.bottom||e.top>t.bottom)}function Y(t,e){let r=e.getBoundingClientRect(),n=Er(t);return xr(r,n)}function me(t){return!(t instanceof HTMLElement)||!t.hasAttribute("draggable")}function Je(t,e){return t instanceof HTMLInputElement?!St(t,e):t instanceof HTMLButtonElement?t.type!=="submit"&&t.type!=="reset":!Ce(t)}const kr=new Set(["checkbox","radio","range","color","file","image","button","submit","reset"]);function St(t,e){return t.type==="checkbox"||t.type==="radio"?e===" ":kr.has(t.type)}let ie=null,Mr=new Set,_e=!1,q=!1,we=!1;function Ie(t,e){for(let r of Mr)r(t,e)}function Lr(t){return!(t.metaKey||!V()&&t.altKey||t.ctrlKey||t.key==="Control"||t.key==="Shift"||t.key==="Meta")}function Ze(t){q=!0,Lr(t)&&(ie="keyboard",Ie("keyboard",t))}function J(t){ie="pointer",(t.type==="mousedown"||t.type==="pointerdown")&&(q=!0,Ie("pointer",t))}function Cr(t){Ke(t)&&(q=!0,ie="virtual")}function Ir(t){t.target===window||t.target===document||(!q&&!we&&(ie="virtual",Ie("virtual",t)),q=!1,we=!1)}function Dr(){q=!1,we=!0}function Qe(){if(typeof window>"u"||_e)return;let t=HTMLElement.prototype.focus;HTMLElement.prototype.focus=function(){q=!0,t.apply(this,arguments)},document.addEventListener("keydown",Ze,!0),document.addEventListener("keyup",Ze,!0),document.addEventListener("click",Cr,!0),window.addEventListener("focus",Ir,!0),window.addEventListener("blur",Dr,!1),typeof PointerEvent<"u"?(document.addEventListener("pointerdown",J,!0),document.addEventListener("pointermove",J,!0),document.addEventListener("pointerup",J,!0)):(document.addEventListener("mousedown",J,!0),document.addEventListener("mousemove",J,!0),document.addEventListener("mouseup",J,!0)),_e=!0}typeof document<"u"&&(document.readyState!=="loading"?Qe():document.addEventListener("DOMContentLoaded",Qe));function Pe(){return ie}const Ar=500;function Fr(t){let{isDisabled:e,onLongPressStart:r,onLongPressEnd:n,onLongPress:i,threshold:o=Ar,accessibilityDescription:s}=t;const u=y.useRef();let{addGlobalListener:f,removeGlobalListener:g}=bt(),{pressProps:v}=mt({isDisabled:e,onPressStart($){if($.continuePropagation(),($.pointerType==="mouse"||$.pointerType==="touch")&&(r&&r({...$,type:"longpressstart"}),u.current=setTimeout(()=>{$.target.dispatchEvent(new PointerEvent("pointercancel",{bubbles:!0})),i&&i({...$,type:"longpress"}),u.current=void 0},o),$.pointerType==="touch")){let h=M=>{M.preventDefault()};f($.target,"contextmenu",h,{once:!0}),f(window,"pointerup",()=>{setTimeout(()=>{g($.target,"contextmenu",h)},30)},{once:!0})}},onPressEnd($){u.current&&clearTimeout(u.current),n&&($.pointerType==="mouse"||$.pointerType==="touch")&&n({...$,type:"longpressend"})}}),w=gr(i&&!e?s:void 0);return{longPressProps:W(v,w)}}function Ee(t){const e=O(t);if(Pe()==="virtual"){let r=e.activeElement;yt(()=>{e.activeElement===r&&t.isConnected&&j(t)})}else j(t)}function Or(t){const e=fe(t);if(!(t instanceof e.HTMLElement)&&!(t instanceof e.SVGElement))return!1;let{display:r,visibility:n}=t.style,i=r!=="none"&&n!=="hidden"&&n!=="collapse";if(i){const{getComputedStyle:o}=t.ownerDocument.defaultView;let{display:s,visibility:u}=o(t);i=s!=="none"&&u!=="hidden"&&u!=="collapse"}return i}function zr(t,e){return!t.hasAttribute("hidden")&&(t.nodeName==="DETAILS"&&e&&e.nodeName!=="SUMMARY"?t.hasAttribute("open"):!0)}function Kt(t,e){return t.nodeName!=="#comment"&&Or(t)&&zr(t,e)&&(!t.parentElement||Kt(t.parentElement,t))}const De=["input:not([disabled]):not([type=hidden])","select:not([disabled])","textarea:not([disabled])","button:not([disabled])","a[href]","area[href]","summary","iframe","object","embed","audio[controls]","video[controls]","[contenteditable]"],Rr=De.join(":not([hidden]),")+",[tabindex]:not([disabled]):not([hidden])";De.push('[tabindex]:not([tabindex="-1"]):not([disabled])');const Nr=De.join(':not([hidden]):not([tabindex="-1"]),');function Tt(t,e){return!t||!e?!1:e.some(r=>r.contains(t))}function wt(t,e,r){let n=e!=null&&e.tabbable?Nr:Rr,i=O(t).createTreeWalker(t,NodeFilter.SHOW_ELEMENT,{acceptNode(o){var s;return!(e==null||(s=e.from)===null||s===void 0)&&s.contains(o)?NodeFilter.FILTER_REJECT:o.matches(n)&&Kt(o)&&(!r||Tt(o,r))&&(!(e!=null&&e.accept)||e.accept(o))?NodeFilter.FILTER_ACCEPT:NodeFilter.FILTER_SKIP}});return e!=null&&e.from&&(i.currentNode=e.from),i}class Ae{get size(){return this.fastMap.size}getTreeNode(e){return this.fastMap.get(e)}addTreeNode(e,r,n){let i=this.fastMap.get(r!=null?r:null);if(!i)return;let o=new et({scopeRef:e});i.addChild(o),o.parent=i,this.fastMap.set(e,o),n&&(o.nodeToRestore=n)}addNode(e){this.fastMap.set(e.scopeRef,e)}removeTreeNode(e){if(e===null)return;let r=this.fastMap.get(e);if(!r)return;let n=r.parent;for(let o of this.traverse())o!==r&&r.nodeToRestore&&o.nodeToRestore&&r.scopeRef&&r.scopeRef.current&&Tt(o.nodeToRestore,r.scopeRef.current)&&(o.nodeToRestore=r.nodeToRestore);let i=r.children;n&&(n.removeChild(r),i.size>0&&i.forEach(o=>n&&n.addChild(o))),this.fastMap.delete(r.scopeRef)}*traverse(e=this.root){if(e.scopeRef!=null&&(yield e),e.children.size>0)for(let r of e.children)yield*this.traverse(r)}clone(){var e;let r=new Ae;var n;for(let i of this.traverse())r.addTreeNode(i.scopeRef,(n=(e=i.parent)===null||e===void 0?void 0:e.scopeRef)!==null&&n!==void 0?n:null,i.nodeToRestore);return r}constructor(){this.fastMap=new Map,this.root=new et({scopeRef:null}),this.fastMap.set(null,this.root)}}class et{addChild(e){this.children.add(e),e.parent=this}removeChild(e){this.children.delete(e),e.parent=void 0}constructor(e){this.children=new Set,this.contain=!1,this.scopeRef=e.scopeRef}}new Ae;function Br(t,e){let r=e==null?void 0:e.isDisabled,[n,i]=y.useState(!1);return ne(()=>{if((t==null?void 0:t.current)&&!r){let o=()=>{if(t.current){let u=wt(t.current,{tabbable:!0});i(!!u.nextNode())}};o();let s=new MutationObserver(o);return s.observe(t.current,{subtree:!0,childList:!0,attributes:!0,attributeFilter:["tabIndex","disabled"]}),()=>{s.disconnect()}}}),r?!1:n}const Ur=new Set(["Arab","Syrc","Samr","Mand","Thaa","Mend","Nkoo","Adlm","Rohg","Hebr"]),jr=new Set(["ae","ar","arc","bcc","bqi","ckb","dv","fa","glk","he","ku","mzn","nqo","pnb","ps","sd","ug","ur","yi"]);function Wr(t){if(Intl.Locale){let r=new Intl.Locale(t).maximize(),n=typeof r.getTextInfo=="function"?r.getTextInfo():r.textInfo;if(n)return n.direction==="rtl";if(r.script)return Ur.has(r.script)}let e=t.split("-")[0];return jr.has(e)}const Hr=Symbol.for("react-aria.i18n.locale");function Pt(){let t=typeof window<"u"&&window[Hr]||typeof navigator<"u"&&(navigator.language||navigator.userLanguage)||"en-US";try{Intl.DateTimeFormat.supportedLocalesOf([t])}catch{t="en-US"}return{locale:t,direction:Wr(t)?"rtl":"ltr"}}let xe=Pt(),re=new Set;function tt(){xe=Pt();for(let t of re)t(xe)}function Vr(){let t=at(),[e,r]=y.useState(xe);return y.useEffect(()=>(re.size===0&&window.addEventListener("languagechange",tt),re.add(r),()=>{re.delete(r),re.size===0&&window.removeEventListener("languagechange",tt)}),[]),t?{locale:"en-US",direction:"ltr"}:e}const Gr=R.default.createContext(null);function Et(){let t=Vr();return y.useContext(Gr)||t}function ke(t){return sr()?t.altKey:t.ctrlKey}function ee(t){return V()?t.metaKey:t.ctrlKey}const qr=1e3;function Xr(t){let{keyboardDelegate:e,selectionManager:r,onTypeSelect:n}=t,i=y.useRef({search:"",timeout:null}).current,o=s=>{let u=Yr(s.key);if(!u||s.ctrlKey||s.metaKey||!s.currentTarget.contains(s.target))return;u===" "&&i.search.trim().length>0&&(s.preventDefault(),"continuePropagation"in s||s.stopPropagation()),i.search+=u;let f=e.getKeyForSearch(i.search,r.focusedKey);f==null&&(f=e.getKeyForSearch(i.search)),f!=null&&(r.setFocusedKey(f),n&&n(f)),clearTimeout(i.timeout),i.timeout=setTimeout(()=>{i.search=""},qr)};return{typeSelectProps:{onKeyDownCapture:e.getKeyForSearch?o:null}}}function Yr(t){return t.length===1||!/^[A-Z]/i.test(t)?t:""}function Jr(t){let{selectionManager:e,keyboardDelegate:r,ref:n,autoFocus:i=!1,shouldFocusWrap:o=!1,disallowEmptySelection:s=!1,disallowSelectAll:u=!1,selectOnFocus:f=e.selectionBehavior==="replace",disallowTypeAhead:g=!1,shouldUseVirtualFocus:v,allowsTabNavigation:w=!1,isVirtualized:$,scrollRef:h=n,linkBehavior:M="action"}=t,{direction:P}=Et(),K=pt(),L=p=>{if(p.altKey&&p.key==="Tab"&&p.preventDefault(),!n.current.contains(p.target))return;const c=(S,H)=>{if(S!=null){if(e.isLink(S)&&M==="selection"&&f&&!ke(p)){Lt.flushSync(()=>{e.setFocusedKey(S,H)});let X=h.current.querySelector(`[data-key="${CSS.escape(S.toString())}"]`);K.open(X,p);return}if(e.setFocusedKey(S,H),e.isLink(S)&&M==="override")return;p.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(S):f&&!ke(p)&&e.replaceSelection(S)}};switch(p.key){case"ArrowDown":if(r.getKeyBelow){var T,a;p.preventDefault();let S=e.focusedKey!=null?r.getKeyBelow(e.focusedKey):(T=r.getFirstKey)===null||T===void 0?void 0:T.call(r);S==null&&o&&(S=(a=r.getFirstKey)===null||a===void 0?void 0:a.call(r,e.focusedKey)),c(S)}break;case"ArrowUp":if(r.getKeyAbove){var d,x;p.preventDefault();let S=e.focusedKey!=null?r.getKeyAbove(e.focusedKey):(d=r.getLastKey)===null||d===void 0?void 0:d.call(r);S==null&&o&&(S=(x=r.getLastKey)===null||x===void 0?void 0:x.call(r,e.focusedKey)),c(S)}break;case"ArrowLeft":if(r.getKeyLeftOf){var B,b;p.preventDefault();let S=r.getKeyLeftOf(e.focusedKey);S==null&&o&&(S=P==="rtl"?(B=r.getFirstKey)===null||B===void 0?void 0:B.call(r,e.focusedKey):(b=r.getLastKey)===null||b===void 0?void 0:b.call(r,e.focusedKey)),c(S,P==="rtl"?"first":"last")}break;case"ArrowRight":if(r.getKeyRightOf){var be,ge;p.preventDefault();let S=r.getKeyRightOf(e.focusedKey);S==null&&o&&(S=P==="rtl"?(be=r.getLastKey)===null||be===void 0?void 0:be.call(r,e.focusedKey):(ge=r.getFirstKey)===null||ge===void 0?void 0:ge.call(r,e.focusedKey)),c(S,P==="rtl"?"last":"first")}break;case"Home":if(r.getFirstKey){p.preventDefault();let S=r.getFirstKey(e.focusedKey,ee(p));e.setFocusedKey(S),ee(p)&&p.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(S):f&&e.replaceSelection(S)}break;case"End":if(r.getLastKey){p.preventDefault();let S=r.getLastKey(e.focusedKey,ee(p));e.setFocusedKey(S),ee(p)&&p.shiftKey&&e.selectionMode==="multiple"?e.extendSelection(S):f&&e.replaceSelection(S)}break;case"PageDown":if(r.getKeyPageBelow){p.preventDefault();let S=r.getKeyPageBelow(e.focusedKey);c(S)}break;case"PageUp":if(r.getKeyPageAbove){p.preventDefault();let S=r.getKeyPageAbove(e.focusedKey);c(S)}break;case"a":ee(p)&&e.selectionMode==="multiple"&&u!==!0&&(p.preventDefault(),e.selectAll());break;case"Escape":p.preventDefault(),s||e.clearSelection();break;case"Tab":if(!w){if(p.shiftKey)n.current.focus();else{let S=wt(n.current,{tabbable:!0}),H,X;do X=S.lastChild(),X&&(H=X);while(X);H&&!H.contains(document.activeElement)&&j(H)}break}}},k=y.useRef({top:0,left:0});vr(h,"scroll",$?null:()=>{k.current={top:h.current.scrollTop,left:h.current.scrollLeft}});let E=p=>{if(e.isFocused){p.currentTarget.contains(p.target)||e.setFocused(!1);return}if(!!p.currentTarget.contains(p.target)){if(e.setFocused(!0),e.focusedKey==null){let a=x=>{x!=null&&(e.setFocusedKey(x),f&&e.replaceSelection(x))},d=p.relatedTarget;var c,T;d&&p.currentTarget.compareDocumentPosition(d)&Node.DOCUMENT_POSITION_FOLLOWING?a((c=e.lastSelectedKey)!==null&&c!==void 0?c:r.getLastKey()):a((T=e.firstSelectedKey)!==null&&T!==void 0?T:r.getFirstKey())}else $||(h.current.scrollTop=k.current.top,h.current.scrollLeft=k.current.left);if(!$&&e.focusedKey!=null){let a=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);a&&(a.contains(document.activeElement)||j(a),Pe()==="keyboard"&&Ve(a,{containingElement:n.current}))}}},C=p=>{p.currentTarget.contains(p.relatedTarget)||e.setFocused(!1)};const I=y.useRef(i);y.useEffect(()=>{if(I.current){let p=null;i==="first"&&(p=r.getFirstKey()),i==="last"&&(p=r.getLastKey());let c=e.selectedKeys;if(c.size){for(let T of c)if(e.canSelectItem(T)){p=T;break}}e.setFocused(!0),e.setFocusedKey(p),p==null&&!v&&Ee(n.current)}},[]);let D=y.useRef(e.focusedKey);y.useEffect(()=>{let p=Pe();if(e.isFocused&&e.focusedKey!=null&&(h==null?void 0:h.current)){let c=h.current.querySelector(`[data-key="${CSS.escape(e.focusedKey.toString())}"]`);c&&(p==="keyboard"||I.current)&&($||vt(h.current,c),Ve(c,{containingElement:n.current}))}e.isFocused&&e.focusedKey==null&&D.current!=null&&Ee(n.current),D.current=e.focusedKey,I.current=!1},[$,h,e.focusedKey,e.isFocused,n]);let N={onKeyDown:L,onFocus:E,onBlur:C,onMouseDown(p){h.current===p.target&&p.preventDefault()}},{typeSelectProps:l}=Xr({keyboardDelegate:r,selectionManager:e});g||(N=W(l,N));let m;return v||(m=e.focusedKey==null?0:-1),{collectionProps:{...N,tabIndex:m}}}function _r(t){let{selectionManager:e,key:r,ref:n,shouldSelectOnPressUp:i,shouldUseVirtualFocus:o,focus:s,isDisabled:u,onAction:f,allowsDifferentPressOrigin:g,linkBehavior:v="action"}=t,w=pt(),$=b=>{if(b.pointerType==="keyboard"&&ke(b))e.toggleSelection(r);else{if(e.selectionMode==="none")return;if(e.isLink(r)){if(v==="selection"){w.open(n.current,b),e.setSelectedKeys(e.selectedKeys);return}else if(v==="override"||v==="none")return}e.selectionMode==="single"?e.isSelected(r)&&!e.disallowEmptySelection?e.toggleSelection(r):e.replaceSelection(r):b&&b.shiftKey?e.extendSelection(r):e.selectionBehavior==="toggle"||b&&(ee(b)||b.pointerType==="touch"||b.pointerType==="virtual")?e.toggleSelection(r):e.replaceSelection(r)}};y.useEffect(()=>{r===e.focusedKey&&e.isFocused&&!o&&(s?s():document.activeElement!==n.current&&Ee(n.current))},[n,r,e.focusedKey,e.childFocusStrategy,e.isFocused,o]),u=u||e.isDisabled(r);let h={};!o&&!u?h={tabIndex:r===e.focusedKey?0:-1,onFocus(b){b.target===n.current&&e.setFocusedKey(r)}}:u&&(h.onMouseDown=b=>{b.preventDefault()});let M=e.isLink(r)&&v==="override",P=e.isLink(r)&&v!=="selection"&&v!=="none",K=!u&&e.canSelectItem(r)&&!M,L=(f||P)&&!u,k=L&&(e.selectionBehavior==="replace"?!K:!K||e.isEmpty),E=L&&K&&e.selectionBehavior==="replace",C=k||E,I=y.useRef(null),D=C&&K,N=y.useRef(!1),l=y.useRef(!1),m=b=>{f&&f(),P&&w.open(n.current,b)},p={};i?(p.onPressStart=b=>{I.current=b.pointerType,N.current=D,b.pointerType==="keyboard"&&(!C||nt())&&$(b)},g?(p.onPressUp=k?null:b=>{b.pointerType!=="keyboard"&&K&&$(b)},p.onPress=k?m:null):p.onPress=b=>{if(k||E&&b.pointerType!=="mouse"){if(b.pointerType==="keyboard"&&!rt())return;m(b)}else b.pointerType!=="keyboard"&&K&&$(b)}):(p.onPressStart=b=>{I.current=b.pointerType,N.current=D,l.current=k,K&&(b.pointerType==="mouse"&&!k||b.pointerType==="keyboard"&&(!L||nt()))&&$(b)},p.onPress=b=>{(b.pointerType==="touch"||b.pointerType==="pen"||b.pointerType==="virtual"||b.pointerType==="keyboard"&&C&&rt()||b.pointerType==="mouse"&&l.current)&&(C?m(b):K&&$(b))}),h["data-key"]=r,p.preventFocusOnPress=o;let{pressProps:c,isPressed:T}=mt(p),a=E?b=>{I.current==="mouse"&&(b.stopPropagation(),b.preventDefault(),m(b))}:void 0,{longPressProps:d}=Fr({isDisabled:!D,onLongPress(b){b.pointerType==="touch"&&($(b),e.setSelectionBehavior("toggle"))}}),x=b=>{I.current==="touch"&&N.current&&b.preventDefault()},B=e.isLink(r)?b=>{G.isOpening||b.preventDefault()}:void 0;return{itemProps:W(h,K||k?c:{},D?d:{},{onDoubleClick:a,onDragStartCapture:x,onClick:B}),isPressed:T,isSelected:e.isSelected(r),isFocused:e.isFocused&&e.focusedKey===r,isDisabled:u,allowsSelection:K,hasAction:C}}function rt(){let t=window.event;return(t==null?void 0:t.key)==="Enter"}function nt(){let t=window.event;return(t==null?void 0:t.key)===" "||(t==null?void 0:t.code)==="Space"}const xt=new WeakMap;function pe(t,e,r){return typeof e=="string"&&(e=e.replace(/\s+/g,"")),`${xt.get(t)}-${r}-${e}`}function Zr(t,e,r){var n;let{key:i,isDisabled:o,shouldSelectOnPressUp:s}=t,{selectionManager:u,selectedKey:f}=e,g=i===f,v=o||e.isDisabled||e.disabledKeys.has(i),{itemProps:w,isPressed:$}=_r({selectionManager:u,key:i,ref:r,isDisabled:v,shouldSelectOnPressUp:s,linkBehavior:"selection"}),h=pe(e,i,"tab"),M=pe(e,i,"tabpanel"),{tabIndex:P}=w,K=e.collection.getItem(i),L=rr(K==null?void 0:K.props,{isLink:!!(!(K==null||(n=K.props)===null||n===void 0)&&n.href),labelable:!0});return delete L.id,{tabProps:W(L,w,{id:h,"aria-selected":g,"aria-disabled":v||void 0,"aria-controls":g?M:void 0,tabIndex:v?void 0:P,role:"tab"}),isSelected:g,isDisabled:v,isPressed:$}}function Qr(t,e,r){let n=Br(r)?void 0:0;var i;const o=pe(e,(i=t.id)!==null&&i!==void 0?i:e==null?void 0:e.selectedKey,"tabpanel"),s=gt({...t,id:o,"aria-labelledby":pe(e,e==null?void 0:e.selectedKey,"tab")});return{tabPanelProps:W(s,{tabIndex:n,role:"tabpanel","aria-describedby":t["aria-describedby"],"aria-details":t["aria-details"]})}}class en{getKeyLeftOf(e){return this.flipDirection?this.getNextKey(e):this.getPreviousKey(e)}getKeyRightOf(e){return this.flipDirection?this.getPreviousKey(e):this.getNextKey(e)}getKeyAbove(e){return this.getPreviousKey(e)}getKeyBelow(e){return this.getNextKey(e)}getFirstKey(){let e=this.collection.getFirstKey();return e!=null&&this.disabledKeys.has(e)&&(e=this.getNextKey(e)),e}getLastKey(){let e=this.collection.getLastKey();return e!=null&&this.disabledKeys.has(e)&&(e=this.getPreviousKey(e)),e}getNextKey(e){do e=this.collection.getKeyAfter(e),e==null&&(e=this.collection.getFirstKey());while(this.disabledKeys.has(e));return e}getPreviousKey(e){do e=this.collection.getKeyBefore(e),e==null&&(e=this.collection.getLastKey());while(this.disabledKeys.has(e));return e}constructor(e,r,n,i=new Set){this.collection=e,this.flipDirection=r==="rtl"&&n==="horizontal",this.disabledKeys=i}}function tn(t,e,r){let{orientation:n="horizontal",keyboardActivation:i="automatic"}=t,{collection:o,selectionManager:s,disabledKeys:u}=e,{direction:f}=Et(),g=y.useMemo(()=>new en(o,f,n,u),[o,u,n,f]),{collectionProps:v}=Jr({ref:r,selectionManager:s,keyboardDelegate:g,selectOnFocus:i==="automatic",disallowEmptySelection:!0,scrollRef:r,linkBehavior:"selection"}),w=ut();xt.set(e,w);let $=gt({...t,id:w});return{tabListProps:{...W(v,$),role:"tablist","aria-orientation":n,tabIndex:void 0}}}function rn(t,e,r){return e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function it(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(i){return Object.getOwnPropertyDescriptor(t,i).enumerable})),r.push.apply(r,n)}return r}function lt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?it(Object(r),!0).forEach(function(n){rn(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):it(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}var nn=(t,e,r)=>{for(var n of Object.keys(t)){var i;if(t[n]!==((i=e[n])!==null&&i!==void 0?i:r[n]))return!1}return!0},Fe=t=>e=>{var r=t.defaultClassName,n=lt(lt({},t.defaultVariants),e);for(var i in n){var o,s=(o=n[i])!==null&&o!==void 0?o:t.defaultVariants[i];if(s!=null){var u=s;typeof u=="boolean"&&(u=u===!0?"true":"false");var f=t.variantClassNames[i][u];f&&(r+=" "+f)}}for(var[g,v]of t.compoundVariants)nn(g,n,t.defaultVariants)&&(r+=" "+v);return r},ln=Fe({defaultClassName:"kz6kzz0",variantClassNames:{context:{container:"kz6kzz1",navigation:"kz6kzz2"},active:{true:"kz6kzz3",false:"kz6kzz4"},disabled:{true:"kz6kzz5",false:"kz6kzz6"}},defaultVariants:{},compoundVariants:[[{context:"container",active:!0},"kz6kzz7"],[{context:"container",active:!1},"kz6kzz8"],[{context:"container",active:!1,disabled:!1},"kz6kzz9"],[{context:"navigation",active:!0},"kz6kzza"],[{context:"navigation",active:!1},"kz6kzzb"],[{context:"navigation",active:!1,disabled:!1},"kz6kzzc"],[{context:"navigation",active:!1,disabled:!0},"kz6kzzd"]]}),on=Fe({defaultClassName:"",variantClassNames:{active:{true:"kz6kzze",false:"kz6kzzf"},disabled:{true:"kz6kzzg",false:"kz6kzzh"},context:{navigation:"kz6kzzi",container:"kz6kzzj"}},defaultVariants:{},compoundVariants:[[{context:"navigation",active:!0},"kz6kzzk"]]});function kt({context:t,item:e,state:r,...n}){const{key:i}=e,o=F.useRef(null),{tabProps:s}=Zr({key:i},r,o),u=r.selectedKey===i,f=r.disabledKeys.has(i),g=z.modChildren(e.rendered,v=>v.type.displayName==="SpsTag"||z.Metadata.isWoodlandComponent(v.type)&&z.Metadata.get(v.type).name==="Tag"?[{className:z.cl(v.props.className,on({active:u,disabled:f,context:t}))}]:[{}]);return F.createElement("div",{...s,ref:o,className:ln({active:u,disabled:f,context:t}),...n},g)}z.Metadata.set(kt,{name:"Tab"});function Mt({context:t,"data-testid":e,state:r,...n}){const i=F.useRef(null),{tabPanelProps:o}=Qr(n,r,i),s=t==="container"?z.Content:"div";return F.createElement(s,{...o,ref:i,"data-testid":e},r.selectedItem?r.selectedItem.props.children:null)}z.Metadata.set(Mt,{name:"TabPanel"});var sn=Fe({defaultClassName:"fy26er0",variantClassNames:{context:{container:"fy26er1",navigation:"fy26er2"}},defaultVariants:{},compoundVariants:[]});function Oe({className:t,context:e="navigation","data-testid":r,...n}){const i=Rt(n),o=F.useRef(null),{tabListProps:s}=tn(n,i,o),u=z.useChildTestIdAttrBuilder({"data-testid":r});return F.createElement(F.Fragment,null,F.createElement("div",{...s,ref:o,className:z.cl(sn({context:e}),t),"data-testid":r},[...i.collection].map(f=>F.createElement(kt,{key:f.key,item:f,state:i,context:e,...u(`tab-${String(f.key)}`)}))),F.createElement(Mt,{key:i.selectedItem?i.selectedItem.key:null,state:i,context:e,...u("tab-panel")}))}z.Metadata.set(Oe,{name:"Tabs"});const an={components:[Oe],examples:{basic:{label:"Basic Navigation Tabs",description:ze.code`
|
2
|
-
<p>Navigation tabs</p>
|
3
|
-
`,examples:{basic:{react:ze.code`
|
4
|
-
import { Item } from "@react-stately/collections";
|
5
|
-
import { Box, Icon } from "@sps-woodland/core";
|
6
|
-
import { Tabs } from "@sps-woodland/tabs";
|
7
|
-
import { Tag } from "@sps-woodland/tags";
|
8
|
-
|
9
|
-
function Component() {
|
10
|
-
/* If you have no need to know or control which tab is selected, you
|
11
|
-
* can omit this state and the change handler; the tabs will work
|
12
|
-
* on their own. */
|
13
|
-
const [selectedTab, setSelectedTab] = React.useState("trust");
|
14
|
-
|
15
|
-
return (
|
16
|
-
<Tabs
|
17
|
-
selectedKey={selectedTab}
|
18
|
-
onSelectionChange={setSelectedTab}
|
19
|
-
disabledKeys={["bold"]}
|
20
|
-
>
|
21
|
-
<Item key="trust" title="Trust">
|
22
|
-
<p>
|
23
|
-
So, what is it? What is it exactly that's going to revolutionize
|
24
|
-
the way we do business?
|
25
|
-
</p>
|
26
|
-
</Item>
|
27
|
-
<Item
|
28
|
-
key="reliability"
|
29
|
-
title={
|
30
|
-
<>
|
31
|
-
<Box mr="xs">Reliability</Box>
|
32
|
-
<Tag kind="error">00</Tag>
|
33
|
-
</>
|
34
|
-
}
|
35
|
-
>
|
36
|
-
<p>Reliability tab content</p>
|
37
|
-
</Item>
|
38
|
-
<Item
|
39
|
-
key="future"
|
40
|
-
title={
|
41
|
-
<>
|
42
|
-
<Icon icon="heart"/>
|
43
|
-
<Box ml="xs">The Future</Box>
|
44
|
-
</>
|
45
|
-
}
|
46
|
-
>
|
47
|
-
<p>The Future tab content</p>
|
48
|
-
</Item>
|
49
|
-
<Item
|
50
|
-
key="bold"
|
51
|
-
title={
|
52
|
-
<>
|
53
|
-
<Icon icon="heart"/>
|
54
|
-
<Box mx="xs">Bold</Box>
|
55
|
-
<Tag kind="key">00</Tag>
|
56
|
-
</>
|
57
|
-
}
|
58
|
-
>
|
59
|
-
<p>Bold tab content</p>
|
60
|
-
</Item>
|
61
|
-
</Tabs>
|
62
|
-
)
|
63
|
-
}
|
64
|
-
`}}}}},cn={"Tabbed Navigation":an};exports.MANIFEST=cn;exports.Tabs=Oe;
|