@protonradio/proton-ui 0.11.0-beta.10 → 0.11.0-beta.11

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/dist/index.cjs.js CHANGED
@@ -43,5 +43,5 @@ React keys must be passed directly to JSX without using spread:
43
43
  *
44
44
  * This source code is licensed under the MIT license found in the
45
45
  * LICENSE file in the root directory of this source tree.
46
- */var bo;function Zp(){return bo||(bo=1,process.env.NODE_ENV!=="production"&&function(){function t(v,h){return v===h&&(v!==0||1/v===1/h)||v!==v&&h!==h}function e(v,h){f||l.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!d){var E=h();o(g,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}E=i({inst:{value:g,getSnapshot:h}});var x=E[0].inst,C=E[1];return s(function(){x.value=g,x.getSnapshot=h,n(x)&&C({inst:x})},[v,g,h]),u(function(){return n(x)&&C({inst:x}),v(function(){n(x)&&C({inst:x})})},[v]),c(g),g}function n(v){var h=v.getSnapshot;v=v.value;try{var g=h();return!o(v,g)}catch{return!0}}function r(v,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=a,o=typeof Object.is=="function"?Object.is:t,i=l.useState,u=l.useEffect,s=l.useLayoutEffect,c=l.useDebugValue,f=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;yr.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),yr}process.env.NODE_ENV==="production"?Fr.exports=Xp():Fr.exports=Zp();var Jp=Fr.exports;const Ns=new WeakMap;function Qp(t,e,n){let{value:r,children:l,"aria-label":o,"aria-labelledby":i}=t;const u=t.isDisabled||e.isDisabled;let s=l!=null,c=o!=null||i!=null;!s&&!c&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let f=e.selectedValue===r,d=N=>{N.stopPropagation(),e.setSelectedValue(r)},{pressProps:p,isPressed:v}=je({isDisabled:u}),{pressProps:h,isPressed:g}=je({isDisabled:u,onPress(){var N;e.setSelectedValue(r),(N=n.current)===null||N===void 0||N.focus()}}),{focusableProps:E}=Bt(V(t,{onFocus:()=>e.setLastFocusedValue(r)}),n),x=V(p,E),C=pe(t,{labelable:!0}),w=-1;e.selectedValue!=null?e.selectedValue===r&&(w=0):(e.lastFocusedValue===r||e.lastFocusedValue==null)&&(w=0),u&&(w=void 0);let{name:T,descriptionId:S,errorMessageId:P,validationBehavior:I}=Ns.get(e);return jn(n,e.selectedValue,e.setSelectedValue),Zr({validationBehavior:I},e,n),{labelProps:V(h,{onClick:N=>N.preventDefault()}),inputProps:V(C,{...x,type:"radio",name:T,tabIndex:w,disabled:u,required:e.isRequired&&I==="native",checked:f,value:r,onChange:d,"aria-describedby":[t["aria-describedby"],e.isInvalid?P:null,S].filter(Boolean).join(" ")||void 0}),isDisabled:u,isSelected:f,isPressed:v||g}}function ev(t,e){let{name:n,isReadOnly:r,isRequired:l,isDisabled:o,orientation:i="vertical",validationBehavior:u="aria"}=t,{direction:s}=Me(),{isInvalid:c,validationErrors:f,validationDetails:d}=e.displayValidation,{labelProps:p,fieldProps:v,descriptionProps:h,errorMessageProps:g}=Jr({...t,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:t.errorMessage||f}),E=pe(t,{labelable:!0}),{focusWithinProps:x}=rn({onBlurWithin(T){var S;(S=t.onBlur)===null||S===void 0||S.call(t,T),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:t.onFocus,onFocusWithinChange:t.onFocusChange}),C=T=>{let S;switch(T.key){case"ArrowRight":s==="rtl"&&i!=="vertical"?S="prev":S="next";break;case"ArrowLeft":s==="rtl"&&i!=="vertical"?S="next":S="prev";break;case"ArrowDown":S="next";break;case"ArrowUp":S="prev";break;default:return}T.preventDefault();let P=Se(T.currentTarget,{from:T.target}),I;S==="next"?(I=P.nextNode(),I||(P.currentNode=T.currentTarget,I=P.firstChild())):(I=P.previousNode(),I||(P.currentNode=T.currentTarget,I=P.lastChild())),I&&(I.focus(),e.setSelectedValue(I.value))},w=ce(n);return Ns.set(e,{name:w,descriptionId:h.id,errorMessageId:g.id,validationBehavior:u}),{radioGroupProps:V(E,{role:"radiogroup",onKeyDown:C,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":t["aria-errormessage"],"aria-readonly":r||void 0,"aria-required":l||void 0,"aria-disabled":o||void 0,"aria-orientation":i,...v,...x}),labelProps:p,descriptionProps:h,errorMessageProps:g,isInvalid:c,validationErrors:f,validationDetails:d}}var Is={};Is={"Clear search":"مسح البحث"};var Fs={};Fs={"Clear search":"Изчистване на търсене"};var _s={};_s={"Clear search":"Vymazat hledání"};var Ls={};Ls={"Clear search":"Ryd søgning"};var Os={};Os={"Clear search":"Suche zurücksetzen"};var js={};js={"Clear search":"Απαλοιφή αναζήτησης"};var zs={};zs={"Clear search":"Clear search"};var Vs={};Vs={"Clear search":"Borrar búsqueda"};var Hs={};Hs={"Clear search":"Tühjenda otsing"};var Ws={};Ws={"Clear search":"Tyhjennä haku"};var Us={};Us={"Clear search":"Effacer la recherche"};var Gs={};Gs={"Clear search":"נקה חיפוש"};var Ys={};Ys={"Clear search":"Obriši pretragu"};var qs={};qs={"Clear search":"Keresés törlése"};var Xs={};Xs={"Clear search":"Cancella ricerca"};var Zs={};Zs={"Clear search":"検索をクリア"};var Js={};Js={"Clear search":"검색 지우기"};var Qs={};Qs={"Clear search":"Išvalyti iešką"};var ea={};ea={"Clear search":"Notīrīt meklēšanu"};var ta={};ta={"Clear search":"Tøm søk"};var na={};na={"Clear search":"Zoekactie wissen"};var ra={};ra={"Clear search":"Wyczyść zawartość wyszukiwania"};var la={};la={"Clear search":"Limpar pesquisa"};var oa={};oa={"Clear search":"Limpar pesquisa"};var ia={};ia={"Clear search":"Ştergeţi căutarea"};var ua={};ua={"Clear search":"Очистить поиск"};var sa={};sa={"Clear search":"Vymazať vyhľadávanie"};var aa={};aa={"Clear search":"Počisti iskanje"};var ca={};ca={"Clear search":"Obriši pretragu"};var da={};da={"Clear search":"Rensa sökning"};var fa={};fa={"Clear search":"Aramayı temizle"};var pa={};pa={"Clear search":"Очистити пошук"};var va={};va={"Clear search":"清除搜索"};var ha={};ha={"Clear search":"清除搜尋條件"};var ba={};ba={"ar-AE":Is,"bg-BG":Fs,"cs-CZ":_s,"da-DK":Ls,"de-DE":Os,"el-GR":js,"en-US":zs,"es-ES":Vs,"et-EE":Hs,"fi-FI":Ws,"fr-FR":Us,"he-IL":Gs,"hr-HR":Ys,"hu-HU":qs,"it-IT":Xs,"ja-JP":Zs,"ko-KR":Js,"lt-LT":Qs,"lv-LV":ea,"nb-NO":ta,"nl-NL":na,"pl-PL":ra,"pt-BR":la,"pt-PT":oa,"ro-RO":ia,"ru-RU":ua,"sk-SK":sa,"sl-SI":aa,"sr-SP":ca,"sv-SE":da,"tr-TR":fa,"uk-UA":pa,"zh-CN":va,"zh-TW":ha};function tv(t){return t&&t.__esModule?t.default:t}function nv(t,e,n){let r=ht(tv(ba),"@react-aria/searchfield"),{isDisabled:l,isReadOnly:o,onSubmit:i,onClear:u,type:s="search"}=t,c=x=>{const C=x.key;C==="Enter"&&(l||o)&&x.preventDefault(),!(l||o)&&(C==="Enter"&&i&&(x.preventDefault(),i(e.value)),C==="Escape"&&(e.value===""&&(!n.current||n.current.value==="")?x.continuePropagation():(x.preventDefault(),e.setValue(""),u&&u())))},f=()=>{e.setValue(""),u&&u()},d=()=>{var x;(x=n.current)===null||x===void 0||x.focus()},{labelProps:p,inputProps:v,descriptionProps:h,errorMessageProps:g,...E}=pi({...t,value:e.value,onChange:e.setValue,onKeyDown:o?t.onKeyDown:Ye(c,t.onKeyDown),type:s},n);return{labelProps:p,inputProps:{...v,defaultValue:void 0},clearButtonProps:{"aria-label":r.format("Clear search"),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:l||o,onPress:f,onPressStart:d},descriptionProps:h,errorMessageProps:g,...E}}const ma=new WeakMap;function rv(t,e,n){let{keyboardDelegate:r,isDisabled:l,isRequired:o,name:i,validationBehavior:u="aria"}=t,s=Hn({usage:"search",sensitivity:"base"}),c=a.useMemo(()=>r||new su(e.collection,e.disabledKeys,n,s),[r,e.collection,e.disabledKeys,s,n]),{menuTriggerProps:f,menuProps:d}=rl({isDisabled:l,type:"listbox"},e,n),p=N=>{switch(N.key){case"ArrowLeft":{var B,A;N.preventDefault();let F=e.selectedKey!=null?(B=c.getKeyAbove)===null||B===void 0?void 0:B.call(c,e.selectedKey):(A=c.getFirstKey)===null||A===void 0?void 0:A.call(c);F&&e.setSelectedKey(F);break}case"ArrowRight":{var m,K;N.preventDefault();let F=e.selectedKey!=null?(m=c.getKeyBelow)===null||m===void 0?void 0:m.call(c,e.selectedKey):(K=c.getFirstKey)===null||K===void 0?void 0:K.call(c);F&&e.setSelectedKey(F);break}}},{typeSelectProps:v}=iu({keyboardDelegate:c,selectionManager:e.selectionManager,onTypeSelect(N){e.setSelectedKey(N)}}),{isInvalid:h,validationErrors:g,validationDetails:E}=e.displayValidation,{labelProps:x,fieldProps:C,descriptionProps:w,errorMessageProps:T}=Jr({...t,labelElementType:"span",isInvalid:h,errorMessage:t.errorMessage||g});v.onKeyDown=v.onKeyDownCapture,delete v.onKeyDownCapture;let S=pe(t,{labelable:!0}),P=V(v,f,C),I=ce();return ma.set(e,{isDisabled:l,isRequired:o,name:i,validationBehavior:u}),{labelProps:{...x,onClick:()=>{if(!t.isDisabled){var N;(N=n.current)===null||N===void 0||N.focus(),Qo("keyboard")}}},triggerProps:V(S,{...P,isDisabled:l,onKeyDown:Ye(P.onKeyDown,p,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[I,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(N){e.isFocused||(t.onFocus&&t.onFocus(N),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(N){e.isOpen||(t.onBlur&&t.onBlur(N),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:I},menuProps:{...d,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:N=>{N.currentTarget.contains(N.relatedTarget)||(t.onBlur&&t.onBlur(N),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[C["aria-labelledby"],P["aria-label"]&&!C["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:w,errorMessageProps:T,isInvalid:h,validationErrors:g,validationDetails:E}}function lv(t,e,n){let r=ma.get(e)||{},{autoComplete:l,name:o=r.name,isDisabled:i=r.isDisabled}=t,{validationBehavior:u,isRequired:s}=r,{visuallyHiddenProps:c}=fi();jn(t.selectRef,e.selectedKey,e.setSelectedKey),Zr({validationBehavior:u,focus:()=>{var d;return(d=n.current)===null||d===void 0?void 0:d.focus()}},e,t.selectRef);var f;return{containerProps:{...c,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:l,disabled:i,required:u==="native"&&s,name:o,value:(f=e.selectedKey)!==null&&f!==void 0?f:void 0,onChange:d=>e.setSelectedKey(d.target.value)}}}function ov(t){let{state:e,triggerRef:n,label:r,name:l,isDisabled:o}=t,i=a.useRef(null),{containerProps:u,selectProps:s}=lv({...t,selectRef:i},e,n);var c;return e.collection.size<=300?a.createElement("div",{...u,"data-testid":"hidden-select-container"},a.createElement("label",null,r,a.createElement("select",{...s,ref:i},a.createElement("option",null),[...e.collection.getKeys()].map(f=>{let d=e.collection.getItem(f);if(d&&d.type==="item")return a.createElement("option",{key:d.key,value:d.key},d.textValue)})))):l?a.createElement("input",{type:"hidden",autoComplete:s.autoComplete,name:l,disabled:o,value:(c=e.selectedKey)!==null&&c!==void 0?c:""}):null}function iv(t,e,n){let{labelProps:r,inputProps:l,isSelected:o,isPressed:i,isDisabled:u,isReadOnly:s}=Qf(t,e,n);return{labelProps:r,inputProps:{...l,role:"switch",checked:o},isSelected:o,isPressed:i,isDisabled:u,isReadOnly:s}}const il=new WeakMap;function _r(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function uv(t,e){let n=il.get(t);if(!n)throw new Error("Unknown grid");return`${n}-${_r(e)}`}function ga(t,e,n){let r=il.get(t);if(!r)throw new Error("Unknown grid");return`${r}-${_r(e)}-${_r(n)}`}function sv(t,e){return[...t.collection.rowHeaderColumnKeys].map(n=>ga(t,e,n)).join(" ")}var ya={};ya={ascending:"تصاعدي",ascendingSort:t=>`ترتيب حسب العمود ${t.columnName} بترتيب تصاعدي`,columnSize:t=>`${t.value} بالبكسل`,descending:"تنازلي",descendingSort:t=>`ترتيب حسب العمود ${t.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var $a={};$a={ascending:"възходящ",ascendingSort:t=>`сортирано по колона ${t.columnName} във възходящ ред`,columnSize:t=>`${t.value} пиксела`,descending:"низходящ",descendingSort:t=>`сортирано по колона ${t.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var xa={};xa={ascending:"vzestupně",ascendingSort:t=>`řazeno vzestupně podle sloupce ${t.columnName}`,columnSize:t=>`${t.value} pixelů`,descending:"sestupně",descendingSort:t=>`řazeno sestupně podle sloupce ${t.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var Ea={};Ea={ascending:"stigende",ascendingSort:t=>`sorteret efter kolonne ${t.columnName} i stigende rækkefølge`,columnSize:t=>`${t.value} pixels`,descending:"faldende",descendingSort:t=>`sorteret efter kolonne ${t.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var Ca={};Ca={ascending:"aufsteigend",ascendingSort:t=>`sortiert nach Spalte ${t.columnName} in aufsteigender Reihenfolge`,columnSize:t=>`${t.value} Pixel`,descending:"absteigend",descendingSort:t=>`sortiert nach Spalte ${t.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var Sa={};Sa={ascending:"αύξουσα",ascendingSort:t=>`διαλογή ανά στήλη ${t.columnName} σε αύξουσα σειρά`,columnSize:t=>`${t.value} pixel`,descending:"φθίνουσα",descendingSort:t=>`διαλογή ανά στήλη ${t.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var wa={};wa={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:t=>`sorted by column ${t.columnName} in ascending order`,descendingSort:t=>`sorted by column ${t.columnName} in descending order`,columnSize:t=>`${t.value} pixels`,resizerDescription:"Press Enter to start resizing"};var Pa={};Pa={ascending:"ascendente",ascendingSort:t=>`ordenado por columna ${t.columnName} en sentido ascendente`,columnSize:t=>`${t.value} píxeles`,descending:"descendente",descendingSort:t=>`ordenado por columna ${t.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var Da={};Da={ascending:"tõusev järjestus",ascendingSort:t=>`sorditud veeru järgi ${t.columnName} tõusvas järjestuses`,columnSize:t=>`${t.value} pikslit`,descending:"laskuv järjestus",descendingSort:t=>`sorditud veeru järgi ${t.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var ka={};ka={ascending:"nouseva",ascendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan nousevassa järjestyksessä`,columnSize:t=>`${t.value} pikseliä`,descending:"laskeva",descendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var Ta={};Ta={ascending:"croissant",ascendingSort:t=>`trié en fonction de la colonne ${t.columnName} par ordre croissant`,columnSize:t=>`${t.value} pixels`,descending:"décroissant",descendingSort:t=>`trié en fonction de la colonne ${t.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var Aa={};Aa={ascending:"עולה",ascendingSort:t=>`מוין לפי עמודה ${t.columnName} בסדר עולה`,columnSize:t=>`${t.value} פיקסלים`,descending:"יורד",descendingSort:t=>`מוין לפי עמודה ${t.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var Ra={};Ra={ascending:"rastući",ascendingSort:t=>`razvrstano po stupcima ${t.columnName} rastućem redoslijedom`,columnSize:t=>`${t.value} piksela`,descending:"padajući",descendingSort:t=>`razvrstano po stupcima ${t.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var Ba={};Ba={ascending:"növekvő",ascendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, növekvő sorrendben`,columnSize:t=>`${t.value} képpont`,descending:"csökkenő",descendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var Ka={};Ka={ascending:"crescente",ascendingSort:t=>`in ordine crescente in base alla colonna ${t.columnName}`,columnSize:t=>`${t.value} pixel`,descending:"decrescente",descendingSort:t=>`in ordine decrescente in base alla colonna ${t.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var Ma={};Ma={ascending:"昇順",ascendingSort:t=>`列 ${t.columnName} を昇順で並べ替え`,columnSize:t=>`${t.value} ピクセル`,descending:"降順",descendingSort:t=>`列 ${t.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var Na={};Na={ascending:"오름차순",ascendingSort:t=>`${t.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:t=>`${t.value} 픽셀`,descending:"내림차순",descendingSort:t=>`${t.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var Ia={};Ia={ascending:"didėjančia tvarka",ascendingSort:t=>`surikiuota pagal stulpelį ${t.columnName} didėjančia tvarka`,columnSize:t=>`${t.value} piks.`,descending:"mažėjančia tvarka",descendingSort:t=>`surikiuota pagal stulpelį ${t.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var Fa={};Fa={ascending:"augošā secībā",ascendingSort:t=>`kārtots pēc kolonnas ${t.columnName} augošā secībā`,columnSize:t=>`${t.value} pikseļi`,descending:"dilstošā secībā",descendingSort:t=>`kārtots pēc kolonnas ${t.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var _a={};_a={ascending:"stigende",ascendingSort:t=>`sortert etter kolonne ${t.columnName} i stigende rekkefølge`,columnSize:t=>`${t.value} piksler`,descending:"synkende",descendingSort:t=>`sortert etter kolonne ${t.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var La={};La={ascending:"oplopend",ascendingSort:t=>`gesorteerd in oplopende volgorde in kolom ${t.columnName}`,columnSize:t=>`${t.value} pixels`,descending:"aflopend",descendingSort:t=>`gesorteerd in aflopende volgorde in kolom ${t.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var Oa={};Oa={ascending:"rosnąco",ascendingSort:t=>`posortowano według kolumny ${t.columnName} w porządku rosnącym`,columnSize:t=>`Liczba pikseli: ${t.value}`,descending:"malejąco",descendingSort:t=>`posortowano według kolumny ${t.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var ja={};ja={ascending:"crescente",ascendingSort:t=>`classificado pela coluna ${t.columnName} em ordem crescente`,columnSize:t=>`${t.value} pixels`,descending:"decrescente",descendingSort:t=>`classificado pela coluna ${t.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var za={};za={ascending:"ascendente",ascendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem ascendente`,columnSize:t=>`${t.value} pixels`,descending:"descendente",descendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var Va={};Va={ascending:"crescătoare",ascendingSort:t=>`sortate după coloana ${t.columnName} în ordine crescătoare`,columnSize:t=>`${t.value} pixeli`,descending:"descrescătoare",descendingSort:t=>`sortate după coloana ${t.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var Ha={};Ha={ascending:"возрастание",ascendingSort:t=>`сортировать столбец ${t.columnName} в порядке возрастания`,columnSize:t=>`${t.value} пикс.`,descending:"убывание",descendingSort:t=>`сортировать столбец ${t.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var Wa={};Wa={ascending:"vzostupne",ascendingSort:t=>`zoradené zostupne podľa stĺpca ${t.columnName}`,columnSize:t=>`Počet pixelov: ${t.value}`,descending:"zostupne",descendingSort:t=>`zoradené zostupne podľa stĺpca ${t.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var Ua={};Ua={ascending:"naraščajoče",ascendingSort:t=>`razvrščeno po stolpcu ${t.columnName} v naraščajočem vrstnem redu`,columnSize:t=>`${t.value} slikovnih pik`,descending:"padajoče",descendingSort:t=>`razvrščeno po stolpcu ${t.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var Ga={};Ga={ascending:"rastući",ascendingSort:t=>`sortirano po kolonama ${t.columnName} rastućim redosledom`,columnSize:t=>`${t.value} piksela`,descending:"padajući",descendingSort:t=>`sortirano po kolonama ${t.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var Ya={};Ya={ascending:"stigande",ascendingSort:t=>`sorterat på kolumn ${t.columnName} i stigande ordning`,columnSize:t=>`${t.value} pixlar`,descending:"fallande",descendingSort:t=>`sorterat på kolumn ${t.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var qa={};qa={ascending:"artan sırada",ascendingSort:t=>`${t.columnName} sütuna göre artan düzende sırala`,columnSize:t=>`${t.value} piksel`,descending:"azalan sırada",descendingSort:t=>`${t.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var Xa={};Xa={ascending:"висхідний",ascendingSort:t=>`відсортовано за стовпцем ${t.columnName} у висхідному порядку`,columnSize:t=>`${t.value} пікс.`,descending:"низхідний",descendingSort:t=>`відсортовано за стовпцем ${t.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var Za={};Za={ascending:"升序",ascendingSort:t=>`按列 ${t.columnName} 升序排序`,columnSize:t=>`${t.value} 像素`,descending:"降序",descendingSort:t=>`按列 ${t.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var Ja={};Ja={ascending:"遞增",ascendingSort:t=>`已依據「${t.columnName}」欄遞增排序`,columnSize:t=>`${t.value} 像素`,descending:"遞減",descendingSort:t=>`已依據「${t.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var ul={};ul={"ar-AE":ya,"bg-BG":$a,"cs-CZ":xa,"da-DK":Ea,"de-DE":Ca,"el-GR":Sa,"en-US":wa,"es-ES":Pa,"et-EE":Da,"fi-FI":ka,"fr-FR":Ta,"he-IL":Aa,"hr-HR":Ra,"hu-HU":Ba,"it-IT":Ka,"ja-JP":Ma,"ko-KR":Na,"lt-LT":Ia,"lv-LV":Fa,"nb-NO":_a,"nl-NL":La,"pl-PL":Oa,"pt-BR":ja,"pt-PT":za,"ro-RO":Va,"ru-RU":Ha,"sk-SK":Wa,"sl-SI":Ua,"sr-SP":Ga,"sv-SE":Ya,"tr-TR":qa,"uk-UA":Xa,"zh-CN":Za,"zh-TW":Ja};class av extends Qu{isCell(e){return e.type==="cell"||e.type==="rowheader"||e.type==="column"}getKeyBelow(e){let n=this.collection.getItem(e);if(!n)return null;if(n.type==="column"){let r=Ue(fe(n,this.collection));if(r)return r.key;let l=this.getFirstKey();return l==null||!this.collection.getItem(l)?null:super.getKeyForItemInRowByIndex(l,n.index)}return super.getKeyBelow(e)}getKeyAbove(e){let n=this.collection.getItem(e);if(!n)return null;if(n.type==="column"){let o=n.parentKey!=null?this.collection.getItem(n.parentKey):null;return o&&o.type==="column"?o.key:null}let r=super.getKeyAbove(e),l=r!=null?this.collection.getItem(r):null;return l&&l.type!=="headerrow"?r:this.isCell(n)?this.collection.columns[n.index].key:this.collection.columns[0].key}findNextColumnKey(e){let n=this.findNextKey(e.key,l=>l.type==="column");if(n!=null)return n;let r=this.collection.headerRows[e.level];for(let l of fe(r,this.collection))if(l.type==="column")return l.key;return null}findPreviousColumnKey(e){let n=this.findPreviousKey(e.key,o=>o.type==="column");if(n!=null)return n;let r=this.collection.headerRows[e.level],l=[...fe(r,this.collection)];for(let o=l.length-1;o>=0;o--){let i=l[o];if(i.type==="column")return i.key}return null}getKeyRightOf(e){let n=this.collection.getItem(e);return n?n.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(n):this.findNextColumnKey(n):super.getKeyRightOf(e):null}getKeyLeftOf(e){let n=this.collection.getItem(e);return n?n.type==="column"?this.direction==="rtl"?this.findNextColumnKey(n):this.findPreviousColumnKey(n):super.getKeyLeftOf(e):null}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,l=n??this.getFirstKey();if(l==null)return null;let o=r.getItem(l);var i;(o==null?void 0:o.type)==="cell"&&(l=(i=o.parentKey)!==null&&i!==void 0?i:null);let u=!1;for(;l!=null;){let s=r.getItem(l);if(!s)return null;if(s.textValue){let c=s.textValue.slice(0,e.length);if(this.collator.compare(c,e)===0)return s.key}for(let c of fe(s,this.collection)){let f=r.columns[c.index];if(r.rowHeaderColumnKeys.has(f.key)&&c.textValue){let d=c.textValue.slice(0,e.length);if(this.collator.compare(d,e)===0){let p=n!=null?r.getItem(n):o;return(p==null?void 0:p.type)==="cell"?c.key:s.key}}}l=this.getKeyBelow(l),l==null&&!u&&(l=this.getFirstKey(),u=!0)}return null}}function cv(t){return t&&t.__esModule?t.default:t}function dv(t,e,n){let{keyboardDelegate:r,isVirtualized:l,layoutDelegate:o,layout:i}=t,u=Hn({usage:"search",sensitivity:"base"}),{direction:s}=Me(),c=e.selectionManager.disabledBehavior,f=a.useMemo(()=>r||new av({collection:e.collection,disabledKeys:e.disabledKeys,disabledBehavior:c,ref:n,direction:s,collator:u,layoutDelegate:o,layout:i}),[r,e.collection,e.disabledKeys,c,n,s,u,o,i]),d=ce(t.id);il.set(e,d);let{gridProps:p}=Gp({...t,id:d,keyboardDelegate:f},e,n);l&&(p["aria-rowcount"]=e.collection.size+e.collection.headerRows.length),xn()&&"expandedKeys"in e&&(p.role="treegrid");let{column:v,direction:h}=e.sortDescriptor||{},g=ht(cv(ul),"@react-aria/table"),E=a.useMemo(()=>{var C,w;let T=(w=(C=e.collection.columns.find(S=>S.key===v))===null||C===void 0?void 0:C.textValue)!==null&&w!==void 0?w:"";return h&&v?g.format(`${h}Sort`,{columnName:T}):void 0},[h,v,e.collection.columns]),x=On(E);return Lo(()=>{E&&Tn(E,"assertive",500)},[E]),{gridProps:V(p,x,{"aria-describedby":[x["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")})}}function fv(t){return t&&t.__esModule?t.default:t}function pv(t,e,n){var r,l;let{node:o}=t,i=o.props.allowsSorting,{gridCellProps:u}=Ms({...t,focusMode:"child"},e,n),s=o.props.isSelectionCell&&e.selectionManager.selectionMode==="single",{pressProps:c}=je({isDisabled:!i||s,onPress(){e.sort(o.key)},ref:n}),{focusableProps:f}=Bt({},n),d,p=((r=e.sortDescriptor)===null||r===void 0?void 0:r.column)===o.key,v=(l=e.sortDescriptor)===null||l===void 0?void 0:l.direction;o.props.allowsSorting&&!Xt()&&(d=p?v:"none");let h=ht(fv(ul),"@react-aria/table"),g;i&&(g=`${h.format("sortable")}`,p&&v&&Xt()&&(g=`${g}, ${h.format(v)}`));let E=On(g),x=e.collection.size===0;return a.useEffect(()=>{x&&e.selectionManager.focusedKey===o.key&&e.selectionManager.setFocusedKey(null)},[x,e.selectionManager,o.key]),{columnHeaderProps:{...V(f,u,c,E,x?{tabIndex:-1}:null),role:"columnheader",id:uv(e,o.key),"aria-colspan":o.colSpan&&o.colSpan>1?o.colSpan:void 0,"aria-sort":d}}}const mo={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function vv(t,e,n){let{node:r,isVirtualized:l}=t,{rowProps:o,...i}=qp(t,e,n),{direction:u}=Me();l&&!(xn()&&"expandedKeys"in e)?o["aria-rowindex"]=r.index+1+e.collection.headerRows.length:delete o["aria-rowindex"];let s={};if(xn()&&"expandedKeys"in e){let S=e.keyMap.get(r.key);if(S!=null){var c,f,d,p,v,h;let P=((c=S.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((d=S.props)===null||d===void 0||(f=d.children)===null||f===void 0?void 0:f.length)>e.userColumnCount;var g,E,x,C;s={onKeyDown:I=>{(I.key===mo.expand[u]&&e.selectionManager.focusedKey===S.key&&P&&e.expandedKeys!=="all"&&!e.expandedKeys.has(S.key)||I.key===mo.collapse[u]&&e.selectionManager.focusedKey===S.key&&P&&(e.expandedKeys==="all"||e.expandedKeys.has(S.key)))&&(e.toggleKey(S.key),I.stopPropagation())},"aria-expanded":P?e.expandedKeys==="all"||e.expandedKeys.has(r.key):void 0,"aria-level":S.level,"aria-posinset":((g=S.indexOfType)!==null&&g!==void 0?g:0)+1,"aria-setsize":S.level>1?((x=(p=nt((E=(v=e.keyMap.get(S.parentKey))===null||v===void 0?void 0:v.childNodes)!==null&&E!==void 0?E:[]))===null||p===void 0?void 0:p.indexOfType)!==null&&x!==void 0?x:0)+1:((C=(h=nt(e.collection.body.childNodes))===null||h===void 0?void 0:h.indexOfType)!==null&&C!==void 0?C:0)+1}}}let w=Od(r.props),T=i.hasAction?w:{};return{rowProps:{...V(o,s,T),"aria-labelledby":sv(e,r.key)},...i}}function hv(t,e,n){let{node:r,isVirtualized:l}=t,o={role:"row"};return l&&!(xn()&&"expandedKeys"in e)&&(o["aria-rowindex"]=r.index+1),{rowProps:o}}function bv(t,e,n){var r;let{gridCellProps:l,isPressed:o}=Ms(t,e,n),i=(r=t.node.column)===null||r===void 0?void 0:r.key;return i!=null&&e.collection.rowHeaderColumnKeys.has(i)&&(l.role="rowheader",l.id=ga(e,t.node.parentKey,i)),{gridCellProps:l,isPressed:o}}function mv(){return Yp()}function gv(t,e){let n=pe(t,{labelable:!0}),{hoverProps:r}=Kt({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:V(n,r,{role:"tooltip"})}}function yv(t,e,n){let{isDisabled:r,trigger:l}=t,o=ce(),i=a.useRef(!1),u=a.useRef(!1),s=()=>{(i.current||u.current)&&e.open(u.current)},c=x=>{!i.current&&!u.current&&e.close(x)};a.useEffect(()=>{let x=C=>{n&&n.current&&C.key==="Escape"&&(C.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("keydown",x,!0)}},[n,e]);let f=()=>{l!=="focus"&&(en()==="pointer"?i.current=!0:i.current=!1,s())},d=()=>{l!=="focus"&&(u.current=!1,i.current=!1,c())},p=()=>{u.current=!1,i.current=!1,c(!0)},v=()=>{ot()&&(u.current=!0,s())},h=()=>{u.current=!1,i.current=!1,c(!0)},{hoverProps:g}=Kt({isDisabled:r,onHoverStart:f,onHoverEnd:d}),{focusableProps:E}=Bt({isDisabled:r,onFocus:v,onBlur:h},n);return{triggerProps:{"aria-describedby":e.isOpen?o:void 0,...V(E,g,{onPointerDown:p,onKeyDown:p,tabIndex:void 0})},tooltipProps:{id:o}}}class go{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}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.firstKey=null,this.lastKey=null,this.iterable=e;let n=i=>{if(this.keyMap.set(i.key,i),i.childNodes&&i.type==="section")for(let u of i.childNodes)n(u)};for(let i of e)n(i);let r=null,l=0;for(let[i,u]of this.keyMap)r?(r.nextKey=i,u.prevKey=r.key):(this.firstKey=i,u.prevKey=void 0),u.type==="item"&&(u.index=l++),r=u,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}class Ke extends Set{constructor(e,n,r){super(e),e instanceof Ke?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function $v(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Gn(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:l="toggle",disabledBehavior:o="all"}=t,i=a.useRef(!1),[,u]=a.useState(!1),s=a.useRef(null),c=a.useRef(null),[,f]=a.useState(null),d=a.useMemo(()=>yo(t.selectedKeys),[t.selectedKeys]),p=a.useMemo(()=>yo(t.defaultSelectedKeys,new Ke),[t.defaultSelectedKeys]),[v,h]=it(d,p,t.onSelectionChange),g=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[E,x]=a.useState(l);l==="replace"&&E==="toggle"&&typeof v=="object"&&v.size===0&&x("replace");let C=a.useRef(l);return a.useEffect(()=>{l!==C.current&&(x(l),C.current=l)},[l]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:E,setSelectionBehavior:x,get isFocused(){return i.current},setFocused(w){i.current=w,u(w)},get focusedKey(){return s.current},get childFocusStrategy(){return c.current},setFocusedKey(w,T="first"){s.current=w,c.current=T,f(w)},selectedKeys:v,setSelectedKeys(w){(r||!$v(w,v))&&h(w)},disabledKeys:g,disabledBehavior:o}}function yo(t,e){return t?t==="all"?"all":new Ke(t):e}class Mt{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){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}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 r of this.state.selectedKeys){let l=this.collection.getItem(r);(!e||l&&br(this.collection,l,e)<0)&&(e=l)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let l=this.collection.getItem(r);(!e||l&&br(this.collection,l,e)>0)&&(e=l)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Ke([n],n,n);else{let i=this.state.selectedKeys;var l;let u=(l=i.anchorKey)!==null&&l!==void 0?l:n;r=new Ke(i,u,n);var o;for(let s of this.getKeyRange(u,(o=i.currentKey)!==null&&o!==void 0?o:n))r.delete(s);for(let s of this.getKeyRange(n,u))this.canSelectItem(s)&&r.add(s)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),l=this.collection.getItem(n);return r&&l?br(this.collection,r,l)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let l=[],o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&l.push(o),o===n)return l;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&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}let n=this.getKey(e);if(n==null)return;let r=new Ke(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Ke([n],n,n):new Ke;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Ke;for(let r of e){let l=this.getKey(r);if(l!=null&&(n.add(l),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var l;let i=this.collection.getItem(r);(i==null?void 0:i.type)==="item"&&e.push(r);var o;i!=null&&i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n((o=(l=Ue(fe(i,this.collection)))===null||l===void 0?void 0:l.key)!==null&&o!==void 0?o:null)}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 Ke)}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){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}withCollection(e){return new Mt(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,n,r){this.collection=e,this.state=n;var l;this.allowsCellSelection=(l=r==null?void 0:r.allowsCellSelection)!==null&&l!==void 0?l:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function xv(t){let{filter:e,layoutDelegate:n}=t,r=Gn(t),l=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=a.useCallback(c=>e?new go(e(c)):new go(c),[e]),i=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),u=nl(t,o,i),s=a.useMemo(()=>new Mt(u,r,{layoutDelegate:n}),[u,r,n]);return Ev(u,s),{collection:u,disabledKeys:l,selectionManager:s}}function Ev(t,e){const n=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&n.current){const f=n.current.getItem(e.focusedKey),d=[...n.current.getKeys()].map(x=>{const C=n.current.getItem(x);return(C==null?void 0:C.type)==="item"?C:null}).filter(x=>x!==null),p=[...t.getKeys()].map(x=>{const C=t.getItem(x);return(C==null?void 0:C.type)==="item"?C:null}).filter(x=>x!==null);var r,l;const v=((r=d==null?void 0:d.length)!==null&&r!==void 0?r:0)-((l=p==null?void 0:p.length)!==null&&l!==void 0?l:0);var o,i,u;let h=Math.min(v>1?Math.max(((o=f==null?void 0:f.index)!==null&&o!==void 0?o:0)-v+1,0):(i=f==null?void 0:f.index)!==null&&i!==void 0?i:0,((u=p==null?void 0:p.length)!==null&&u!==void 0?u:0)-1),g=null,E=!1;for(;h>=0;){if(!e.isDisabled(p[h].key)){g=p[h];break}if(h<p.length-1&&!E)h++;else{E=!0;var s,c;h>((s=f==null?void 0:f.index)!==null&&s!==void 0?s:0)&&(h=(c=f==null?void 0:f.index)!==null&&c!==void 0?c:0),h--}}e.setFocusedKey(g?g.key:null)}n.current=t},[t,e])}function Cv(t){var e;let[n,r]=it(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),l=a.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:i,selectionManager:u}=xv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:l,onSelectionChange:c=>{if(c==="all")return;var f;let d=(f=c.values().next().value)!==null&&f!==void 0?f:null;d===n&&t.onSelectionChange&&t.onSelectionChange(d),r(d)}}),s=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:i,selectionManager:u,selectedKey:n,setSelectedKey:r,selectedItem:s}}function Nt(t){let[e,n]=it(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=a.useCallback(()=>{n(!0)},[n]),l=a.useCallback(()=>{n(!1)},[n]),o=a.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:l,toggle:o}}function sl(t){let e=Nt(t),[n,r]=a.useState(null),[l,o]=a.useState([]),i=()=>{o([]),e.close()};return{focusStrategy:n,...e,open(c=null){r(c),e.open()},toggle(c=null){r(c),e.toggle()},close(){i()},expandedKeysStack:l,openSubmenu:(c,f)=>{o(d=>f>d.length?d:[...d.slice(0,f),c])},closeSubmenu:(c,f)=>{o(d=>d[f]===c?d.slice(0,f):d)}}}function Sv(t,e){let{triggerKey:n}=t,{expandedKeysStack:r,openSubmenu:l,closeSubmenu:o,close:i}=e,[u]=a.useState(r==null?void 0:r.length),s=a.useMemo(()=>r[u]===n,[r,n,u]),[c,f]=a.useState(null),d=a.useCallback(h=>{f(h??null),l(n,u)},[l,u,n]),p=a.useCallback(()=>{f(null),o(n,u)},[o,u,n]),v=a.useCallback(h=>{f(h??null),s?p():d(h)},[p,d,s]);return a.useMemo(()=>({focusStrategy:c,isOpen:s,open:d,close:p,closeAll:i,submenuLevel:u,setOpen:()=>{},toggle:v}),[s,d,p,i,c,v,u])}let wv=Math.round(Math.random()*1e10),Pv=0;function Dv(t){let e=a.useMemo(()=>t.name||`radio-group-${wv}-${++Pv}`,[t.name]);var n;let[r,l]=it(t.value,(n=t.defaultValue)!==null&&n!==void 0?n:null,t.onChange),[o,i]=a.useState(null),u=Xr({...t,value:r}),s=f=>{!t.isReadOnly&&!t.isDisabled&&(l(f),u.commitValidation())},c=u.displayValidation.isInvalid;return{...u,name:e,selectedValue:r,setSelectedValue:s,lastFocusedValue:o,setLastFocusedValue:i,isDisabled:t.isDisabled||!1,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1,validationState:t.validationState||(c?"invalid":null),isInvalid:c}}function kv(t){let[e,n]=it($o(t.value),$o(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function $o(t){if(t!=null)return t.toString()}function Tv(t){let e=Nt(t),[n,r]=a.useState(null),l=Cv({...t,onSelectionChange:s=>{t.onSelectionChange!=null&&t.onSelectionChange(s),e.close(),o.commitValidation()}}),o=Xr({...t,value:l.selectedKey}),[i,u]=a.useState(!1);return{...o,...l,...e,focusStrategy:n,open(s=null){l.collection.size!==0&&(r(s),e.open())},toggle(s=null){l.collection.size!==0&&(r(s),e.toggle())},isFocused:i,setFocused:u}}function Av(t){let{collection:e,focusMode:n}=t,r=t.UNSAFE_selectionState||Gn(t),l=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=r.setFocusedKey;r.setFocusedKey=(s,c)=>{if(n==="cell"&&s!=null){let h=e.getItem(s);if((h==null?void 0:h.type)==="item"){var f,d;let g=fe(h,e);var p,v;c==="last"?s=(p=(f=nt(g))===null||f===void 0?void 0:f.key)!==null&&p!==void 0?p:null:s=(v=(d=Ue(g))===null||d===void 0?void 0:d.key)!==null&&v!==void 0?v:null}}o(s,c)};let i=a.useMemo(()=>new Mt(e,r),[e,r]);const u=a.useRef(null);return a.useEffect(()=>{if(r.focusedKey!=null&&u.current&&!e.getItem(r.focusedKey)){const s=u.current.getItem(r.focusedKey),c=(s==null?void 0:s.parentKey)!=null&&(s.type==="cell"||s.type==="rowheader"||s.type==="column")?u.current.getItem(s.parentKey):s;if(!c){r.setFocusedKey(null);return}const f=u.current.rows,d=e.rows,p=f.length-d.length;let v=Math.min(p>1?Math.max(c.index-p+1,0):c.index,d.length-1),h=null;for(;v>=0;){if(!i.isDisabled(d[v].key)&&d[v].type!=="headerrow"){h=d[v];break}v<d.length-1?v++:(v>c.index&&(v=c.index),v--)}if(h){const g=h.hasChildNodes?[...fe(h,e)]:[],E=h.hasChildNodes&&c!==s&&s&&s.index<g.length?g[s.index].key:h.key;r.setFocusedKey(E)}else r.setFocusedKey(null)}u.current=e},[e,i,r,r.focusedKey]),{collection:e,disabledKeys:l,isKeyboardNavigationDisabled:!1,selectionManager:i}}class Rv{*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){var e;return(e=[...this.rows][0])===null||e===void 0?void 0:e.key}getLastKey(){var e;let n=[...this.rows];return(e=n[n.length-1])===null||e===void 0?void 0:e.key}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}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.keyMap=new Map,this.columnCount=e==null?void 0:e.columnCount,this.rows=[];let n=d=>{let p=this.keyMap.get(d.key);e.visitNode&&(d=e.visitNode(d)),this.keyMap.set(d.key,d);let v=new Set,h=null,g=!1;if(d.type==="item"){var E;for(let S of d.childNodes)if(((E=S.props)===null||E===void 0?void 0:E.colSpan)!==void 0){g=!0;break}}for(let S of d.childNodes){if(S.type==="cell"&&g){var x,C;S.colspan=(x=S.props)===null||x===void 0?void 0:x.colSpan,S.colSpan=(C=S.props)===null||C===void 0?void 0:C.colSpan;var w,T;S.colIndex=h?((w=h.colIndex)!==null&&w!==void 0?w:h.index)+((T=h.colSpan)!==null&&T!==void 0?T:1):S.index}S.type==="cell"&&S.parentKey==null&&(S.parentKey=d.key),v.add(S.key),h?(h.nextKey=S.key,S.prevKey=h.key):S.prevKey=null,n(S),h=S}if(h&&(h.nextKey=null),p)for(let S of p.childNodes)v.has(S.key)||r(S)},r=d=>{this.keyMap.delete(d.key);for(let p of d.childNodes)this.keyMap.get(p.key)===p&&r(p)},l=null;for(let[d,p]of e.items.entries()){var o,i,u,s,c,f;let v={...p,level:(o=p.level)!==null&&o!==void 0?o:0,key:(i=p.key)!==null&&i!==void 0?i:"row-"+d,type:(u=p.type)!==null&&u!==void 0?u:"row",value:(s=p.value)!==null&&s!==void 0?s:null,hasChildNodes:!0,childNodes:[...p.childNodes],rendered:p.rendered,textValue:(c=p.textValue)!==null&&c!==void 0?c:"",index:(f=p.index)!==null&&f!==void 0?f:d};l?(l.nextKey=v.key,v.prevKey=l.key):v.prevKey=null,this.rows.push(v),n(v),l=v}l&&(l.nextKey=null)}}const Qa="row-header-column-"+Math.random().toString(36).slice(2);let Lr="row-header-column-"+Math.random().toString(36).slice(2);for(;Qa===Lr;)Lr="row-header-column-"+Math.random().toString(36).slice(2);function Bv(t,e){if(e.length===0)return[];let n=[],r=new Map;for(let f of e){let d=f.parentKey,p=[f];for(;d;){let v=t.get(d);if(!v)break;if(r.has(v)){var l,o;(o=(l=v).colSpan)!==null&&o!==void 0||(l.colSpan=0),v.colSpan++,v.colspan=v.colSpan;let{column:h,index:g}=r.get(v);if(g>p.length)break;for(let E=g;E<p.length;E++)h.splice(E,0,null);for(let E=p.length;E<h.length;E++)h[E]&&r.has(h[E])&&(r.get(h[E]).index=E)}else v.colSpan=1,v.colspan=1,p.push(v),r.set(v,{column:p,index:p.length-1});d=v.parentKey}n.push(p),f.index=n.length-1}let i=Math.max(...n.map(f=>f.length)),u=Array(i).fill(0).map(()=>[]),s=0;for(let f of n){let d=i-1;for(let p of f){if(p){let v=u[d],h=v.reduce((g,E)=>{var x;return g+((x=E.colSpan)!==null&&x!==void 0?x:1)},0);if(h<s){let g={type:"placeholder",key:"placeholder-"+p.key,colspan:s-h,colSpan:s-h,index:h,value:null,rendered:null,level:d,hasChildNodes:!1,childNodes:[],textValue:""};v.length>0&&(v[v.length-1].nextKey=g.key,g.prevKey=v[v.length-1].key),v.push(g)}v.length>0&&(v[v.length-1].nextKey=p.key,p.prevKey=v[v.length-1].key),p.level=d,p.colIndex=s,v.push(p)}d--}s++}let c=0;for(let f of u){let d=f.reduce((p,v)=>{var h;return p+((h=v.colSpan)!==null&&h!==void 0?h:1)},0);if(d<e.length){let p={type:"placeholder",key:"placeholder-"+f[f.length-1].key,colSpan:e.length-d,colspan:e.length-d,index:d,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:f[f.length-1].key};f.push(p)}c++}return u.map((f,d)=>({type:"headerrow",key:"headerrow-"+d,index:d,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:f,textValue:""}))}class Kv extends Rv{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return(r=n==null?void 0:n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return(r=n==null?void 0:n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){var e,n;return(n=(e=Ue(this.body.childNodes))===null||e===void 0?void 0:e.key)!==null&&n!==void 0?n:null}getLastKey(){var e,n;return(n=(e=nt(this.body.childNodes))===null||e===void 0?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){return e===this.body.key?this.body.childNodes:super.getChildren(e)}getTextValue(e){let n=this.getItem(e);if(!n)return"";if(n.textValue)return n.textValue;let r=this.rowHeaderColumnKeys;if(r){let l=[];for(let o of n.childNodes){let i=this.columns[o.index];if(r.has(i.key)&&o.textValue&&l.push(o.textValue),l.length===r.size)break}return l.join(" ")}return""}constructor(e,n,r){let l=new Set,o=null,i=[];if(r!=null&&r.showSelectionCheckboxes){let d={type:"column",key:Qa,value:null,textValue:"",level:0,index:r!=null&&r.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};i.unshift(d)}if(r!=null&&r.showDragButtons){let d={type:"column",key:Lr,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};i.unshift(d)}let u=[],s=new Map,c=d=>{switch(d.type){case"body":o=d;break;case"column":s.set(d.key,d),d.hasChildNodes||(i.push(d),d.props.isRowHeader&&l.add(d.key));break;case"item":u.push(d);return}for(let p of d.childNodes)c(p)};for(let d of e)c(d);let f=Bv(s,i);if(f.forEach((d,p)=>u.splice(p,0,d)),super({columnCount:i.length,items:u,visitNode:d=>(d.column=i[d.index],d)}),this._size=0,this.columns=i,this.rowHeaderColumnKeys=l,this.body=o,this.headerRows=f,this._size=[...o.childNodes].length,this.rowHeaderColumnKeys.size===0){let d=this.columns.find(p=>{var v,h;return!(!((v=p.props)===null||v===void 0)&&v.isDragButtonCell)&&!(!((h=p.props)===null||h===void 0)&&h.isSelectionCell)});d&&this.rowHeaderColumnKeys.add(d.key)}}}const Mv={ascending:"descending",descending:"ascending"};function Nv(t){let[e,n]=a.useState(!1),{selectionMode:r="none",showSelectionCheckboxes:l,showDragButtons:o}=t,i=a.useMemo(()=>({showSelectionCheckboxes:l&&r!=="none",showDragButtons:o,selectionMode:r,columns:[]}),[t.children,l,r,o]),u=nl(t,a.useCallback(d=>new Kv(d,null,i),[i]),i),{disabledKeys:s,selectionManager:c}=Av({...t,collection:u,disabledBehavior:t.disabledBehavior||"selection"});var f;return{collection:u,disabledKeys:s,selectionManager:c,showSelectionCheckboxes:t.showSelectionCheckboxes||!1,sortDescriptor:(f=t.sortDescriptor)!==null&&f!==void 0?f:null,isKeyboardNavigationDisabled:u.size===0||e,setKeyboardNavigationDisabled:n,sort(d,p){var v,h;(h=t.onSortChange)===null||h===void 0||h.call(t,{column:d,direction:p??(((v=t.sortDescriptor)===null||v===void 0?void 0:v.column)===d?Mv[t.sortDescriptor.direction]:"ascending")})}}}function ec(t){return null}ec.getCollectionNode=function*(e,n){let{children:r,columns:l}=e;if(n.columns=[],typeof r=="function"){if(!l)throw new Error("props.children was a function but props.columns is missing");for(let o of l)yield{type:"column",value:o,renderer:r}}else{let o=[];a.Children.forEach(r,i=>{o.push({type:"column",element:i})}),yield*o}};let Iv=ec;function tc(t){return null}tc.getCollectionNode=function*(e){let{children:n,items:r}=e;yield{type:"body",hasChildNodes:!0,props:e,*childNodes(){if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let l of r)yield{type:"item",value:l,renderer:n}}else{let l=[];a.Children.forEach(n,o=>{l.push({type:"item",element:o})}),yield*l}}}};let Fv=tc;function nc(t){return null}nc.getCollectionNode=function*(e,n){let{title:r,children:l,childColumns:o}=e,i=r||l,u=e.textValue||(typeof i=="string"?i:"")||e["aria-label"],s=yield{type:"column",hasChildNodes:!!o||!!r&&a.Children.count(l)>0,rendered:i,textValue:u,props:e,*childNodes(){if(o)for(let f of o)yield{type:"column",value:f};else if(r){let f=[];a.Children.forEach(l,d=>{f.push({type:"column",element:d})}),yield*f}},shouldInvalidate(f){return c(f),!1}},c=f=>{for(let d of s)d.hasChildNodes||f.columns.push(d)};c(n)};let _v=nc;function Or(t){return null}Or.getCollectionNode=function*(e,n){let{children:r,textValue:l,UNSTABLE_childItems:o}=e;yield{type:"item",props:e,textValue:l,"aria-label":e["aria-label"],hasChildNodes:!0,*childNodes(){if(n.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),n.showSelectionCheckboxes&&n.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof r=="function"){for(let i of n.columns)yield{type:"cell",element:r(i.key),key:i.key};if(o)for(let i of o)yield{type:"item",value:i}}else{let i=[],u=[],s=0;if(a.Children.forEach(r,c=>{if(c.type===Or){if(i.length<n.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");u.push({type:"item",element:c})}else{i.push({type:"cell",element:c});var f;s+=(f=c.props.colSpan)!==null&&f!==void 0?f:1}}),s!==n.columns.length)throw new Error(`Cell count must match column count. Found ${s} cells and ${n.columns.length} columns.`);yield*i,yield*u}},shouldInvalidate(i){return i.columns.length!==n.columns.length||i.columns.some((u,s)=>u.key!==n.columns[s].key)||i.showSelectionCheckboxes!==n.showSelectionCheckboxes||i.showDragButtons!==n.showDragButtons||i.selectionMode!==n.selectionMode}}};let Lv=Or;function rc(t){return null}rc.getCollectionNode=function*(e){let{children:n}=e,r=e.textValue||(typeof n=="string"?n:"")||e["aria-label"]||"";yield{type:"cell",props:e,rendered:n,textValue:r,"aria-label":e["aria-label"],hasChildNodes:!1}};let Ov=rc;const jv=1500,xo=500;let at={},zv=0,Ht=!1,We=null,ct=null;function lc(t={}){let{delay:e=jv,closeDelay:n=xo}=t,{isOpen:r,open:l,close:o}=Nt(t),i=a.useMemo(()=>`${++zv}`,[]),u=a.useRef(null),s=a.useRef(o),c=()=>{at[i]=p},f=()=>{for(let h in at)h!==i&&(at[h](!0),delete at[h])},d=()=>{u.current&&clearTimeout(u.current),u.current=null,f(),c(),Ht=!0,l(),We&&(clearTimeout(We),We=null),ct&&(clearTimeout(ct),ct=null)},p=h=>{h||n<=0?(u.current&&clearTimeout(u.current),u.current=null,s.current()):u.current||(u.current=setTimeout(()=>{u.current=null,s.current()},n)),We&&(clearTimeout(We),We=null),Ht&&(ct&&clearTimeout(ct),ct=setTimeout(()=>{delete at[i],ct=null,Ht=!1},Math.max(xo,n)))},v=()=>{f(),c(),!r&&!We&&!Ht?We=setTimeout(()=>{We=null,Ht=!0,d()},e):r||d()};return a.useEffect(()=>{s.current=o},[o]),a.useEffect(()=>()=>{u.current&&clearTimeout(u.current),at[i]&&delete at[i]},[i]),{isOpen:r,open:h=>{!h&&e>0&&!u.current?v():d()},close:p}}class Vv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=u=>{if(this.keyMap.set(u.key,u),u.childNodes&&(u.type==="section"||n.has(u.key)))for(let s of u.childNodes)r(s)};for(let u of e)r(u);let l=null,o=0;for(let[u,s]of this.keyMap)l?(l.nextKey=u,s.prevKey=l.key):(this.firstKey=u,s.prevKey=void 0),s.type==="item"&&(s.index=o++),l=s,l.nextKey=void 0;var i;this.lastKey=(i=l==null?void 0:l.key)!==null&&i!==void 0?i:null}}function oc(t){let{onExpandedChange:e}=t,[n,r]=it(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),l=Gn(t),o=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=nl(t,a.useCallback(s=>new Vv(s,{expandedKeys:n}),[n]),null);return a.useEffect(()=>{l.focusedKey!=null&&!i.getItem(l.focusedKey)&&l.setFocusedKey(null)},[i,l.focusedKey]),{collection:i,expandedKeys:n,disabledKeys:o,toggleKey:s=>{r(Hv(n,s))},setExpandedKeys:r,selectionManager:new Mt(i,l)}}function Hv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const ic=a.createContext(void 0),Ce=()=>{const t=a.useContext(ic);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},Wv={[Te.THEMES.DARK]:"proton-ui__theme--dark",[Te.THEMES.CUSTOM_DARK]:"proton-ui__theme--custom-dark",[Te.THEMES.LIGHT]:"proton-ui__theme--light"},uc=({theme:t,children:e,palette:n=X.LIGHT_MODE})=>{const r=a.useRef(null),l=Wv[t],o=a.useMemo(()=>Gv(n,t),[n,t]);return a.useEffect(()=>{r.current&&(r.current.className=l,Object.entries(o).forEach(([i,u])=>{r.current.style.setProperty(i,u)}))},[t,l,n,o]),y.jsx(ic.Provider,{value:{theme:t,style:o,palette:n,className:l},children:y.jsx("div",{ref:r,children:e})})},Uv=(t,e)=>{const n=e===Te.THEMES.DARK||e===Te.THEMES.CUSTOM_DARK?{"--proton-color__gray-super-dark":X.DARK_GRAYSCALE.GRAY_SUPER_DARK,"--proton-color__gray-dark":X.DARK_GRAYSCALE.GRAY_DARK,"--proton-color__gray-medium":X.DARK_GRAYSCALE.GRAY_MEDIUM,"--proton-color__gray-medium-light":X.DARK_GRAYSCALE.GRAY_MEDIUM_LIGHT,"--proton-color__gray-light":X.DARK_GRAYSCALE.GRAY_LIGHT,"--proton-color__gray-lightest":X.DARK_GRAYSCALE.GRAY_LIGHTEST,"--proton-color__gray-super-light":X.DARK_GRAYSCALE.GRAY_SUPER_LIGHT}:{"--proton-color__gray-super-dark":X.GRAYSCALE.GRAY_SUPER_DARK,"--proton-color__gray-dark":X.GRAYSCALE.GRAY_DARK,"--proton-color__gray-medium":X.GRAYSCALE.GRAY_MEDIUM,"--proton-color__gray-medium-light":X.GRAYSCALE.GRAY_MEDIUM_LIGHT,"--proton-color__gray-light":X.GRAYSCALE.GRAY_LIGHT,"--proton-color__gray-lightest":X.GRAYSCALE.GRAY_LIGHTEST,"--proton-color__gray-super-light":X.GRAYSCALE.GRAY_SUPER_LIGHT};return{"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY,"--proton-control__primary-super-dark":t.PRIMARY.PRIMARY_SUPER_DARK,"--proton-control__primary-dark":t.PRIMARY.PRIMARY_DARK,"--proton-control__primary-medium":t.PRIMARY.PRIMARY_MEDIUM,"--proton-control__primary-medium-light":t.PRIMARY.PRIMARY_MEDIUM_LIGHT,"--proton-control__primary-light":t.PRIMARY.PRIMARY_LIGHT,"--proton-control__primary-lightest":t.PRIMARY.PRIMARY_LIGHTEST,"--proton-control__primary-super-light":t.PRIMARY.PRIMARY_SUPER_LIGHT,"--proton-control__secondary-super-dark":t.SECONDARY.SECONDARY_SUPER_DARK,"--proton-control__secondary-dark":t.SECONDARY.SECONDARY_DARK,"--proton-control__secondary-medium":t.SECONDARY.SECONDARY_MEDIUM,"--proton-control__secondary-medium-light":t.SECONDARY.SECONDARY_MEDIUM_LIGHT,"--proton-control__secondary-light":t.SECONDARY.SECONDARY_LIGHT,"--proton-control__secondary-lightest":t.SECONDARY.SECONDARY_LIGHTEST,"--proton-control__secondary-super-light":t.SECONDARY.SECONDARY_SUPER_LIGHT,...n}};function Gv(t,e){const n=Uv(t,e);switch(e){case Te.THEMES.DARK:return{"--proton-control__background-color":X.DARK_GRAYSCALE.GRAY_DARK,"--proton-control__background-color-light":X.DARK_GRAYSCALE.ELEVATION,"--proton-control__text-color":X.DARK_GRAYSCALE.WHITE,"--proton-control__border-color":X.DARK_GRAYSCALE.GRAY_LIGHT,"--proton-control__shadow-color":Be.transparentize(X.DARK_GRAYSCALE.GRAY_LIGHTEST,.5),...n};case Te.THEMES.LIGHT:return{"--proton-control__background-color":X.DEFAULT_WHITE_BACKGROUND,"--proton-control__background-color-light":X.GRAYSCALE.ELEVATION,"--proton-control__text-color":X.GRAYSCALE.GRAY_DARK,"--proton-control__border-color":X.GRAYSCALE.BORDER,"--proton-control__shadow-color":Be.transparentize(X.GRAYSCALE.GRAY_LIGHTEST,.5),...n};case Te.THEMES.CUSTOM_DARK:return{"--proton-control__background-color":X.DARK_GRAYSCALE.GRAY_DARK,"--proton-control__background-color-light":"rgba(255, 255, 255, 0.2)","--proton-control__text-color":X.DARK_GRAYSCALE.WHITE,"--proton-control__border-color":X.DARK_GRAYSCALE.BORDER,"--proton-control__shadow-color":Be.transparentize(X.DARK_GRAYSCALE.GRAY_LIGHTEST,.7),...n};default:return{"--proton-control__background-color":X.DEFAULT_WHITE_BACKGROUND,"--proton-control__background-color-light":X.GRAYSCALE.ELEVATION,"--proton-control__text-color":X.GRAYSCALE.WHITE,"--proton-control__border-color":X.GRAYSCALE.GRAY_DARK,"--proton-control__shadow-color":X.GRAYSCALE.GRAY_DARK,...n}}}const It=a.forwardRef(({variant:t="primary",size:e="medium",fullWidth:n,icon:r,to:l,target:o,onPress:i,type:u,isDisabled:s,"data-testid":c,children:f,__textShift:d},p)=>{const v=l?"a":"button",h=l&&j.isUrlExternal(l),g=v!=="a"?{}:{target:o||(h?"_blank":void 0),href:l,rel:h||o==="_blank"?"noopener noreferrer":void 0},{className:E}=Ce(),x=a.useRef(null),{buttonProps:C}=ln({onPress:i,elementType:v,type:u||"button",isDisabled:s},x);a.useLayoutEffect(()=>{typeof p=="function"?p(x.current):p&&(p.current=x.current)},[p]);const w=a.useRef(null),T=a.useRef(null),S=!!r,P=!!(l&&h),[I,N]=a.useState({});return a.useLayoutEffect(()=>{var m,K;if(!n)return;let B={},A=0;if(f&&S){const F=(m=w.current)==null?void 0:m.offsetWidth;B.paddingLeft=F,A+=-F/2}if(f&&P){const F=(K=T.current)==null?void 0:K.offsetWidth;B.paddingRight=F,A+=F/2}d&&(A+=d),A!==0&&(B.transform=`translateX(${A}px)`),N(B)},[f,S,P,d,n]),y.jsxs(v,{...C,...g,className:j.csx("proton-Button",`proton-Button--${t}`,n&&"proton-Button--fullWidth",s&&"proton-Button--disabled",e&&`proton-Button--${e}`,E),ref:x,"data-testid":c,children:[S&&y.jsx("div",{className:j.csx("proton-Button__icon-decorator","proton-Button__icon-decorator--prepend",n&&"proton-Button__icon-decorator--fullWidth"),ref:w,children:r}),f&&y.jsx("div",{className:"proton-Button__text",style:I,children:f}),P&&y.jsx("div",{className:j.csx("proton-Button__icon-decorator","proton-Button__icon-decorator--append",n&&"proton-Button__icon-decorator--fullWidth"),ref:T,children:y.jsx("svg",{viewBox:"0 0 512 512",width:"0.8em",height:"0.8em",children:y.jsx("path",{d:"M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"})})})]})}),Yn=a.forwardRef(({fadeIn:t=!1,onClose:e,children:n},r)=>{const{theme:l,palette:o}=Ce();return a.useEffect(()=>{if(!e)return;const i=u=>{u.key==="Escape"&&e()};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[e]),y.jsx(Rn,{children:y.jsx(uc,{theme:l,palette:o,children:y.jsx("div",{ref:r,id:"background","aria-label":"Background overlay",role:"dialog","aria-modal":"true","data-testid":"screen-overlay",className:j.csx("proton-ScreenOverlay__background","proton-ScreenOverlay__z-index",t&&"proton-ScreenOverlay__fade-in"),onClick:i=>{e&&i.target===i.currentTarget&&e()},children:n})})})});Yn.displayName="ScreenOverlay";const Yv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3csymbol%20id='external-link'%20viewBox='0%200%20512%20512'%3e%3cpath%20d='M384%20224v184a40%2040%200%2001-40%2040H104a40%2040%200%2001-40-40V168a40%2040%200%200140-40h167.48M336%2064h112v112M224%20288L440%2072'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='32'/%3e%3c/symbol%3e%3csymbol%20id='caret-down'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='currentColor'%20d='M233.4%20406.6c12.5%2012.5%2032.8%2012.5%2045.3%200l192-192c12.5-12.5%2012.5-32.8%200-45.3s-32.8-12.5-45.3%200L256%20338.7L86.6%20169.4c-12.5-12.5-32.8-12.5-45.3%200s-12.5%2032.8%200%2045.3l192%20192z'/%3e%3c/symbol%3e%3csymbol%20id='caret-right'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='currentColor'%20d='M216.5%20374.8c-11.3%2011.3-30%2011.3-41.3%200L74.8%20256c-11.3-11.3-11.3-30%200-41.3l128.5-128.5c11.3-11.3%2030-11.3%2041.3%200s11.3%2030%200%2041.3L145.7%20256l119.8%20119.8c11.3%2011.3%2011.3%2030%200%2041.3z'/%3e%3c/symbol%3e%3csymbol%20id='chevron-right'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M5.74%203.2a.75.75%200%200%200-.04%201.06L9.227%208L5.7%2011.74a.75.75%200%201%200%201.1%201.02l4-4.25a.75.75%200%200%200%200-1.02l-4-4.25a.75.75%200%200%200-1.06-.04'/%3e%3c/symbol%3e%3csymbol%20id='chevron-left'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M10.26%203.2a.75.75%200%200%201%20.04%201.06L6.773%208l3.527%203.74a.75.75%200%201%201-1.1%201.02l-4-4.25a.75.75%200%200%201%200-1.02l4-4.25a.75.75%200%200%201%201.06-.04'/%3e%3c/symbol%3e%3csymbol%20id='chevron-down'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M3.2%205.74a.75.75%200%200%201%201.06-.04L8%209.227L11.74%205.7a.75.75%200%201%201%201.02%201.1l-4.25%204a.75.75%200%200%201-1.02%200l-4.25-4a.75.75%200%200%201-.04-1.06'/%3e%3c/symbol%3e%3c/defs%3e%3c/svg%3e";function qn(t){let e={height:t.size||void 0,width:t.size||void 0,color:t.color||void 0};return t.id==="chevron-right"?y.jsx(mn,{direction:"right",...e}):t.id==="chevron-left"?y.jsx(mn,{direction:"left",...e}):t.id==="chevron-up"?y.jsx(mn,{direction:"up",...e}):t.id==="chevron-down"?y.jsx(mn,{direction:"down",...e}):(console.warn("⚠️ Sprite sheet does not work properly when loading in other apps!!"),y.jsx("svg",{style:e,...t,children:y.jsx("use",{href:`${Yv}#${t.id}`})}))}function mn({direction:t,...e}){const n={right:0,down:90,left:180,up:270};return y.jsx("svg",{viewBox:"0 0 16 16",style:{transform:`rotate(${n[t]}deg)`},...e,children:y.jsx("path",{fill:"currentColor",d:"M5.74 3.2a.75.75 0 0 0-.04 1.06L9.227 8L5.7 11.74a.75.75 0 1 0 1.1 1.02l4-4.25a.75.75 0 0 0 0-1.02l-4-4.25a.75.75 0 0 0-1.06-.04"})})}const al=({isOpen:t,selectionMode:e="single",selectedKeys:n,defaultSelectedKeys:r,disabledKeys:l,children:o,showCancel:i=!0,cancelButtonText:u="Cancel",actions:s,title:c,onSelectionChange:f,onClose:d,"data-testid":p})=>{Tt.useLockBodyScroll(t);const{className:v,theme:h}=Ce(),[g,E]=a.useState(0),[x,C]=a.useState([]),[w,T]=a.useState({title:null,actions:s,key:null,previousKey:null}),S=w.actions||[],P=a.useRef(null),I=a.useRef(null),N=a.useRef(null),B=a.useRef(!1),{isClosing:A,handleClose:m}=Tt.useIsClosing({onClose:d,overlayRef:N}),K=S&&S.length>0,F=()=>{E(0),m()},k=oc({items:S,children:S.map(O=>a.createElement(du,{...O,key:O.key,textValue:O.key},O.label)),defaultSelectedKeys:r?new Set(r):void 0,selectedKeys:n?new Set(n):void 0,onSelectionChange:f,selectionMode:e,disabledKeys:l}),{menuProps:L}=Xu({autoFocus:!0,shouldFocusWrap:!0,onAction:O=>{var G;const U=S.find(oe=>oe.key===O);if(!U){console.error(`Action with key ${O} not found`);return}(G=U==null?void 0:U.children)!=null&&G.length&&b(O)},onClose:()=>{if(B.current){B.current=!1;return}d==null||d()},disabledKeys:l,onSelectionChange:f,selectionMode:e,selectedKeys:n,defaultSelectedKeys:r,"aria-label":"Action Menu"},k,I);function b(O){const U=S.find(G=>G.key===O);if(!U){console.error(`Action with key ${O} not found`);return}C(G=>[...G,w]),T(G=>({title:U.label,actions:U.children,key:U.key,previousKey:G.key})),B.current=!0}function R(){if(x.length>0){const O=x[x.length-1];T(O),C(x.slice(0,-1))}}a.useEffect(()=>{t&&P.current&&E(P.current.scrollHeight)},[t,P,x]);const D=o||K||i;return t?y.jsx(Yn,{fadeIn:!0,ref:N,onClose:F,children:y.jsx("div",{className:"proton-ActionMenu__background-wrapper",style:{opacity:A?0:1},children:y.jsx("div",{"data-testid":p||"ActionMenu-wrapper",className:"proton-ActionMenu__wrapper",children:y.jsx("div",{className:j.csx("proton-ActionMenu__card",v),"data-testid":"ActionMenu-content",style:{height:`${g}px`},children:y.jsx("div",{ref:I,children:y.jsxs("div",{...L,ref:P,children:[(c||w.title)&&y.jsxs("div",{className:"proton-ActionMenu__title",children:[y.jsx("div",{style:{position:"absolute",left:0},children:w.previousKey&&y.jsx("button",{onClick:R,children:y.jsx(qn,{id:"chevron-left",size:16})})}),w.title||c]}),D?y.jsxs(on,{autoFocus:!0,contain:!0,children:[o&&y.jsx("div",{className:"proton-ActionMenu__content",children:typeof o=="function"?o({close:F}):o}),K&&y.jsx("div",{className:j.csx("proton-ActionMenu__list",e==="none"&&"proton-ActionMenu__list--disabled"),children:Array.from(k.collection).map((O,U)=>{var oe;const G=w.actions[U];return y.jsx(qv,{item:O,state:k,isSubmenu:!!((oe=G.children)!=null&&oe.length)},O.key)})}),i&&y.jsx("div",{className:"proton-ActionMenu__cancel-button",tabIndex:-1,children:y.jsx(It,{variant:h==="dark"||h==="custom-dark"?"translucent":"secondary",onPress:F,"data-testid":"ActionMenuItem-cancel",children:u})})]}):null]})})})})})}):null},qv=({state:t,item:e,isSubmenu:n})=>{const r=a.useRef(null),{props:l}=e,{menuItemProps:o}=Zu({key:e.key},t,r),i=l.to?"a":"div",u=l.to&&j.isUrlExternal(l.to),s=l.to?{href:l.to,target:u?"_blank":void 0,rel:u?"noopener noreferrer":void 0,onClick:c=>{u||!l.to||j.handleInternalNavigation(c,l.to)}}:{};return a.createElement(i,{...o,...s,key:e.key,className:"proton-ActionMenu__item","aria-label":`ActionMenu-Item-${e.key}`,ref:r},y.jsxs("div",{className:"proton-ActionMenu__item-content",children:[y.jsx("div",{className:"proton-ActionMenu__item-label",children:e.rendered}),l.description&&y.jsx("div",{className:"proton-ActionMenu__description",children:l.description})]}),n&&y.jsx(qn,{id:"chevron-right",size:16}))},Xv={primary:"primary",secondary:"secondary",transparent:"transparent",success:"success",warning:"warning",danger:"danger"},Zv=({variant:t,children:e,...n})=>{const{className:r}=Ce();return y.jsx("div",{role:"status","aria-live":"polite","data-testid":n["data-testid"],className:j.csx("proton-Badge",t&&`proton-Badge--${t}`,r),children:e})},sc={success:y.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:y.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"})}),warning:y.jsx("svg",{viewBox:"0 0 56 56",height:"17",width:"17",children:y.jsx("path",{d:"M9.59 50.207h36.82c3.516 0 5.719-2.531 5.719-5.719a5.56 5.56 0 0 0-.75-2.812l-18.445-33c-1.055-1.899-2.977-2.883-4.922-2.883c-1.922 0-3.89.984-4.946 2.883L4.645 41.699c-.516.89-.774 1.828-.774 2.79c0 3.187 2.227 5.718 5.719 5.718m18.422-16.055c-1.242 0-1.922-.703-1.969-1.968l-.328-11.578c-.047-1.266.937-2.204 2.273-2.204c1.313 0 2.344.961 2.297 2.227l-.351 11.555c-.047 1.289-.727 1.968-1.922 1.968m0 8.649c-1.36 0-2.625-1.078-2.625-2.532s1.242-2.53 2.625-2.53s2.625 1.054 2.625 2.53c0 1.477-1.266 2.532-2.625 2.532"})}),danger:y.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:y.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"})})},Jv={default:"default",success:"success",warning:"warning",danger:"danger"},Xn=a.createContext(void 0),Ze=({variant:t="default",rounded:e=!0,icon:n=!1,compact:r=!0,children:l,"data-testid":o})=>y.jsx(Xn.Provider,{value:t,children:y.jsx("div",{role:"status","aria-live":"polite",className:j.csx("proton-Banner",`proton-Banner--${t}`,e&&"proton-Banner--rounded"),"data-testid":o,children:y.jsxs("div",{className:j.csx("proton-Banner__wrapper",r&&"proton-Banner__wrapper--compact"),children:[y.jsx(Ze.Icon,{icon:n}),y.jsx("div",{className:"proton-Banner__content-wrapper",children:y.jsx("div",{className:"proton-Banner__container",children:l})})]})})}),Qv=({children:t,...e})=>{const n=a.useContext(Xn);if(!n)throw new Error("BannerTitle must be used within a Banner");return y.jsx("h3",{className:j.csx("proton-Banner__title",`proton-Banner--${n}__title`),"data-testid":e["data-testid"],children:t})},e0=({children:t,...e})=>{const n=a.useContext(Xn);if(!n)throw new Error("BannerContent must be used within a Banner");return y.jsx("p",{className:j.csx("proton-Banner__content",`proton-Banner--${n}__content`),"data-testid":e["data-testid"],children:t})};function t0(t,e){return a.isValidElement(t)?t:t?sc[e]:null}const n0=({children:t,icon:e,...n})=>{const r=a.useContext(Xn);if(!r)throw new Error("BannerIcon must be used within a Banner");const l=t0(e,r);return l?y.jsx("div",{"aria-hidden":"true","data-testid":n["data-testid"],className:j.csx("proton-Banner__icon",`proton-Banner--${r}__icon`),children:l}):null},r0=({children:t,...e})=>y.jsx(It,{...e,children:t}),l0=({children:t})=>y.jsx("div",{className:"proton-Banner__actions",children:t});Ze.Title=Qv;Ze.Content=e0;Ze.Icon=n0;Ze.Action=r0;Ze.Actions=l0;Ze.icons=sc;Ze.variants=Jv;let ac=a.createContext(null);function cc(t){let e={...t,"data-testid":void 0},n=Dv(e),{radioGroupProps:r}=ev(e,n);return y.jsx("div",{...r,className:"proton-ButtonGroup","data-value":n.selectedValue,"data-testid":t["data-testid"]||void 0,children:y.jsx(ac.Provider,{value:n,children:t.children})})}cc.Option=function(e){let n={...e,"data-testid":void 0},r=a.useContext(ac),l=a.useRef(null),{inputProps:o,isSelected:i}=Qp(n,r,l);return y.jsxs("label",{className:j.csx("proton-ButtonGroup__option",i&&"proton-ButtonGroup__option--selected"),"data-selected":i||void 0,"data-testid":e["data-testid"]||void 0,children:[y.jsx(Qr,{children:y.jsx("input",{...o,ref:l})}),e.children]})};const dc=Symbol("default");function Ft({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function bt(t){let{className:e,style:n,children:r,defaultClassName:l,defaultChildren:o,defaultStyle:i,values:u}=t;return a.useMemo(()=>{let s,c,f;return typeof e=="function"?s=e({...u,defaultClassName:l}):s=e,typeof n=="function"?c=n({...u,defaultStyle:i||{}}):c=n,typeof r=="function"?f=r({...u,defaultChildren:o}):r==null?f=o:f=r,{className:s??l,style:c||i?{...i,...c}:void 0,children:f??o,"data-rac":""}},[e,n,r,l,o,i,u])}function fc(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||dc;if(!n.slots[r]){let l=new Intl.ListFormat().format(Object.keys(n.slots).map(i=>`"${i}"`)),o=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${l}.`)}return n.slots[r]}return n}function ut(t,e,n){let r=fc(n,t.slot)||{},{ref:l,...o}=r,i=Rt(a.useMemo(()=>Ko(e,l),[e,l])),u=V(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?u.style=s=>{let c=typeof o.style=="function"?o.style(s):o.style,f={...s.defaultStyle,...c},d=typeof t.style=="function"?t.style({...s,defaultStyle:f}):t.style;return{...f,...d}}:u.style={...o.style,...t.style}),[u,i]}function o0(t=!0){let[e,n]=a.useState(t),r=a.useRef(!1),l=a.useCallback(o=>{r.current=!0,n(!!o)},[]);return Y(()=>{r.current||n(!1)},[]),[l,e]}class cl{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new cl(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=n}}class dl{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),l=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?n.get(l.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}UNSTABLE_filter(e){let n=new dl,r=null;for(let l of this)if(l.type==="section"&&l.hasChildNodes){let o=l.clone(),i=null;for(let u of this.getChildren(l.key))if(Eo(u,e,this,n)){let s=u.clone();i==null&&(o.firstChildKey=s.key),n.firstKey==null&&(n.firstKey=o.key),i&&i.parentKey===s.parentKey?(i.nextKey=s.key,s.prevKey=i.key):s.prevKey=null,s.nextKey=null,n.addNode(s),i=s}i&&(i.type!=="header"?(o.lastChildKey=i.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(i.key)))}else if(l.type==="separator"){let o=l.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else{let o=l.clone();Eo(o,e,this,n)&&(n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let l;r.prevKey!=null&&(l=n.getItem(r.prevKey),l.nextKey=null),n.removeNode(r.key),r=l}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function Eo(t,e,n,r){if(t.type==="subdialogtrigger"||t.type==="submenutrigger"){let l=[...n.getChildren(t.key)][0];if(l&&e(l.textValue)){let o=l.clone();return r.addNode(o),!0}else return!1}else return t.type==="header"?!0:e(t.textValue)}class pc{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(n),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class kt extends pc{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof kt?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,n,r;let l=this.nextVisibleSibling,o=this.getMutableNode();o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof kt?this.parentNode.node.key:null;var i;o.prevKey=(i=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&i!==void 0?i:null;var u;o.nextKey=(u=l==null?void 0:l.node.key)!==null&&u!==void 0?u:null,o.hasChildNodes=!!this.firstChild;var s;o.firstChildKey=(s=(n=this.firstVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null;var c;if(o.lastChildKey=(c=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&c!==void 0?c:null,(o.colSpan!=null||o.colIndex!=null)&&l){var f,d;let p=((f=o.colIndex)!==null&&f!==void 0?f:o.index)+((d=o.colSpan)!==null&&d!==void 0?d:1);if(p!==l.node.colIndex){let v=l.getMutableNode();v.colIndex=p}}}setProps(e,n,r,l){let o=this.getMutableNode(),{value:i,textValue:u,id:s,...c}=e;if(c.ref=n,o.props=c,o.rendered=r,o.render=l,o.value=i,o.textValue=u||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",s!=null&&s!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=s}c.colSpan!=null&&(o.colSpan=c.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){var l,o;(((l=e.parentNode)===null||l===void 0?void 0:l.firstVisibleChild)===e||((o=e.parentNode)===null||o===void 0?void 0:o.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let i=e.previousVisibleSibling,u=e.nextVisibleSibling;i&&e.ownerDocument.markDirty(i),u&&e.ownerDocument.markDirty(u),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new cl(e,`react-aria-${++n.nodeId}`)}}class i0 extends pc{get isConnected(){return this.isMounted}createElement(e){return new kt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof kt&&(!o.isConnected||o.isHidden)?this.removeNode(o):o.updateChildIndices();for(let o of this.dirtyNodes)o instanceof kt&&(o.isConnected&&!o.isHidden&&(o.updateNode(),this.addNode(o)),o.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,n,r,l;this.nextCollection.commit((r=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(l=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function vc(t){let{children:e,items:n,idScope:r,addIdAndValue:l,dependencies:o=[]}=t,i=a.useMemo(()=>new WeakMap,o);return a.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let f of n){let d=i.get(f);if(!d){d=e(f);var u,s;let p=(s=(u=d.props.id)!==null&&u!==void 0?u:f.key)!==null&&s!==void 0?s:f.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),d=a.cloneElement(d,l?{key:p,id:p,value:f}:{key:p}),i.set(f,d)}c.push(d)}return c}else if(typeof e!="function")return e},[e,n,i,r,l])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Bn=a.createContext(!1);function u0(t){if(a.useContext(Bn))return a.createElement(a.Fragment,null,t.children);let n=a.createElement(Bn.Provider,{value:!0},t.children);return a.createElement("template",{"data-react-aria-hidden":!0},n)}function s0(t){let e=(n,r)=>a.useContext(Bn)?null:t(n,r);return e.displayName=t.displayName||t.name,a.forwardRef(e)}function a0(){return a.useContext(Bn)}const hc=a.createContext(!1),tn=a.createContext(null);function c0(t){if(a.useContext(tn))return t.content;let{collection:n,document:r}=v0(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(u0,null,a.createElement(tn.Provider,{value:r},t.content)),a.createElement(d0,{render:t.children,collection:n}))}function d0({collection:t,render:e}){return e(t)}function f0(t,e,n){let r=vt(),l=a.useRef(r);l.current=r;let o=a.useCallback(()=>l.current?n():e(),[e,n]);return Jp.useSyncExternalStore(t,o)}const p0=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:f0;function v0(t){let[e]=a.useState(()=>new i0((t==null?void 0:t())||new dl)),n=a.useCallback(i=>e.subscribe(i),[e]),r=a.useCallback(()=>{let i=e.getCollection();return e.isSSR&&e.resetAfterSSR(),i},[e]),l=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=p0(n,r,l);return Y(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const jr=a.createContext(null);function bc(t,e,n,r,l,o){let i=a.useCallback(s=>{s==null||s.setProps(e,n,r,o)},[e,n,r,o]),u=a.useContext(jr);if(u){let s=u.ownerDocument.nodesByProps.get(e);return s||(s=u.ownerDocument.createElement(t),s.setProps(e,n,r,o),u.appendChild(s),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,s)),l?a.createElement(jr.Provider,{value:s},l):null}return a.createElement(t,{ref:i},l)}function mc(t,e){let n=({node:l})=>e(l.props,l.props.ref,l),r=a.forwardRef((l,o)=>{let i=a.useContext(Pn);if(!a.useContext(hc)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,o)}return bc(t,l,o,"children"in l?l.children:null,null,s=>a.createElement(Pn.Provider,{value:i},a.createElement(n,{node:s})))});return r.displayName=e.name,r}function gc(t,e,n=yc){let r=({node:o})=>e(o.props,o.props.ref,o),l=a.forwardRef((o,i)=>{let u=n(o);var s;return(s=bc(t,o,i,null,u,c=>a.createElement(r,{node:c})))!==null&&s!==void 0?s:a.createElement(a.Fragment,null)});return l.displayName=e.name,l}function yc(t){return vc({...t,addIdAndValue:!0})}const Co=a.createContext(null);function h0(t){let e=a.useContext(Co),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),l=yc({...t,idScope:r,dependencies:n});return a.useContext(tn)&&(l=a.createElement(b0,null,l)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(Co.Provider,{value:e},l)}function b0({children:t}){let e=a.useContext(tn),n=a.useMemo(()=>a.createElement(tn.Provider,{value:null},a.createElement(hc.Provider,{value:!0},t)),[t]);return vt()?a.createElement(jr.Provider,{value:e},n):At.createPortal(n,e)}const m0=a.createContext(null),g0=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),y0=a.createContext({}),$c=s0(function(e,n){[e,n]=ut(e,n,y0),e=$0(e);let r=e,{isPending:l}=r,{buttonProps:o,isPressed:i}=ln(e,n),{focusProps:u,isFocused:s,isFocusVisible:c}=Wn(e),{hoverProps:f,isHovered:d}=Kt({...e,isDisabled:e.isDisabled||l}),p={isHovered:d,isPressed:(r.isPressed||i)&&!l,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:l??!1},v=bt({...e,values:p,defaultClassName:"react-aria-Button"}),h=ce(o.id),g=ce(),E=o["aria-labelledby"];l&&(E?E=`${E} ${g}`:o["aria-label"]&&(E=`${h} ${g}`));let x=a.useRef(l);return a.useEffect(()=>{let C={"aria-labelledby":E||h};(!x.current&&s&&l||x.current&&s&&!l)&&Tn(C,"assertive"),x.current=l},[l,s,E,h]),a.createElement("button",{...pe(e,{propNames:g0}),...V(o,u,f),...v,type:o.type==="submit"&&l?"button":o.type,id:h,ref:n,"aria-labelledby":E,slot:e.slot||void 0,"aria-disabled":l?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":s||void 0,"data-pending":l||void 0,"data-focus-visible":c||void 0},a.createElement(m0.Provider,{value:{id:g}},v.children))});function $0(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const xc=a.createContext({}),So=a.forwardRef(function(e,n){[e,n]=ut(e,n,xc);let{elementType:r="span",...l}=e;return a.createElement(r,{className:"react-aria-Text",...l,ref:n})}),wo=a.createContext(null),x0=a.createContext(null),E0={CollectionRoot({collection:t,renderDropIndicator:e}){return Po(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Po(t,e,n)}};function Po(t,e,n){return vc({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var l;let o=r.render(r);if(!n||r.type!=="item")return o;let i=r.key,u=t.getKeyAfter(i);return a.createElement(a.Fragment,null,n({type:"item",key:i,dropPosition:"before"}),o,(u==null||((l=t.getItem(u))===null||l===void 0?void 0:l.type)!=="item")&&n({type:"item",key:i,dropPosition:"after"}))}})}const fl=a.createContext(E0);function C0(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const Ec=a.createContext({}),S0=mc("header",function(e,n){return[e,n]=ut(e,n,Ec),a.createElement("header",{className:"react-aria-Header",...e,ref:n},e.children)}),w0=a.createContext({}),pl=a.createContext({placement:"bottom"}),P0=a.forwardRef(function(e,n){[e,n]=ut(e,n,pl);let r=e.placement,l={position:"absolute",transform:r==="top"||r==="bottom"?"translateX(-50%)":"translateY(-50%)"};r!=null&&(l[r]="100%");let o=bt({...e,defaultClassName:"react-aria-OverlayArrow",values:{placement:r}});o.style&&Object.keys(o.style).forEach(u=>o.style[u]===void 0&&delete o.style[u]);let i=pe(e);return a.createElement("div",{...i,...o,style:{...l,...o.style},ref:n,"data-placement":r})}),vl=a.createContext(null),Do=a.createContext(null),Cc=a.forwardRef(function(e,n){[e,n]=ut(e,n,vl);let r=a.useContext(bl),l=Nt(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?l:r,i=zo(n,o.isOpen)||e.isExiting||!1,u=a0(),{direction:s}=Me();if(u){let c=e.children;return typeof c=="function"&&(c=c({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,c)}return o&&!o.isOpen&&!i?null:a.createElement(D0,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:i,dir:s})});function D0({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let l=a.useRef(null),[o,i]=a.useState(0),u=a.useRef(null),s=a.useContext(Do),c=s&&r.trigger==="SubmenuTrigger";Y(()=>{l.current&&t.isOpen&&i(l.current.getBoundingClientRect().width)},[t.isOpen,l]);var f;let{popoverProps:d,underlayProps:p,arrowProps:v,placement:h}=nu({...r,offset:(f=r.offset)!==null&&f!==void 0?f:8,arrowSize:o,groupRef:c?s:u},t),g=r.popoverRef,E=jo(g,!!h)||r.isEntering||!1,x=bt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:E,isExiting:e}}),C=!r.isNonModal||r.trigger==="SubmenuTrigger",[w,T]=a.useState(!1);Y(()=>{g.current&&T(C&&!g.current.querySelector("[role=dialog]"))},[g,C]),a.useEffect(()=>{w&&g.current&&!g.current.contains(document.activeElement)&&he(g.current)},[w,g]);let S={...d.style,...x.style},P=a.createElement("div",{...V(pe(r),d),...x,role:w?"dialog":void 0,tabIndex:w?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:g,slot:r.slot||void 0,style:S,dir:r.dir,"data-trigger":r.trigger,"data-placement":h,"data-entering":E||void 0,"data-exiting":e||void 0},!r.isNonModal&&a.createElement(Mr,{onDismiss:t.close}),a.createElement(pl.Provider,{value:{...v,placement:h,ref:l}},x.children),a.createElement(Mr,{onDismiss:t.close}));if(!c)return a.createElement(Rn,{...r,shouldContainFocus:w,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&a.createElement("div",{"data-testid":"underlay",...p,style:{position:"fixed",inset:0}}),a.createElement("div",{ref:u,style:{display:"contents"}},a.createElement(Do.Provider,{value:u},P)));var I;return a.createElement(Rn,{...r,shouldContainFocus:w,isExiting:e,portalContainer:(I=n??(s==null?void 0:s.current))!==null&&I!==void 0?I:void 0},P)}const k0=a.createContext({}),hl=a.createContext(null),Zn=a.createContext(null),Kn=a.createContext(null),Mn=a.createContext(null);function T0(t){let e=sl(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:l}=rl({...t,type:"menu"},e,n),[o,i]=a.useState(null),u=a.useCallback(()=>{n.current&&i(n.current.offsetWidth+"px")},[n]);En({ref:n,onResize:u});let s=a.useRef(null);return a.createElement(Ft,{values:[[hl,{...l,ref:s}],[bl,e],[Kn,e],[vl,{trigger:"MenuTrigger",triggerRef:n,scrollRef:s,placement:"bottom start",style:{"--trigger-width":o},"aria-labelledby":l["aria-labelledby"]}]]},a.createElement(bf,{...r,ref:n,isPressed:e.isOpen},t.children))}const Sc=a.createContext(null),A0=gc("submenutrigger",(t,e,n)=>{let{CollectionBranch:r}=a.useContext(fl),l=a.useContext(Zn),o=a.useContext(Kn),i=Sv({triggerKey:n.key},o),u=a.useRef(null),s=Rt(e),{parentMenuRef:c,shouldUseVirtualFocus:f}=a.useContext(Sc),{submenuTriggerProps:d,submenuProps:p,popoverProps:v}=jp({parentMenuRef:c,submenuRef:u,delay:t.delay,shouldUseVirtualFocus:f},i,s);return a.createElement(Ft,{values:[[Nn,{...d,onAction:void 0,ref:s}],[hl,p],[bl,i],[vl,{ref:u,trigger:"SubmenuTrigger",triggerRef:s,placement:"end top","aria-labelledby":p["aria-labelledby"],...v}]]},a.createElement(r,{collection:l.collection,parent:n}),t.children[1])},t=>t.children[0]),wc=a.forwardRef(function(e,n){return[e,n]=ut(e,n,hl),a.createElement(c0,{content:a.createElement(h0,e)},r=>a.createElement(R0,{props:e,collection:r,menuRef:n}))});function R0({props:t,collection:e,menuRef:n}){let{filter:r,collectionProps:l,collectionRef:o}=a.useContext(wo)||{};n=Rt(a.useMemo(()=>Ko(n,o!==void 0?o:null),[o,n]));let i=a.useMemo(()=>r?e.UNSTABLE_filter(r):e,[e,r]),u=oc({...t,collection:i,children:void 0}),s=a.useContext(Kn),{isVirtualized:c,CollectionRoot:f}=a.useContext(fl),{menuProps:d}=Xu({...t,...l,isVirtualized:c,onClose:t.onClose||(s==null?void 0:s.close)},u,n),p=bt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{isEmpty:u.collection.size===0}}),v=null;return u.collection.size===0&&t.renderEmptyState&&(v=a.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState())),a.createElement(on,null,a.createElement("div",{...pe(t),...d,...p,ref:n,slot:t.slot||void 0,"data-empty":u.collection.size===0||void 0,onScroll:t.onScroll},a.createElement(Ft,{values:[[Zn,u],[w0,{elementType:"div"}],[x0,{name:"MenuSection",render:Pc}],[Sc,{parentMenuRef:n,shouldUseVirtualFocus:l==null?void 0:l.shouldUseVirtualFocus}],[Nn,null],[wo,null],[Mn,u.selectionManager],[Kn,s??sl({})]]},a.createElement(f,{collection:u.collection,persistedKeys:C0(u.selectionManager.focusedKey),scrollRef:n})),v))}class B0 extends Mt{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function Pc(t,e,n,r="react-aria-MenuSection"){var l,o;let i=a.useContext(Zn),{CollectionBranch:u}=a.useContext(fl),[s,c]=o0();var f;let{headingProps:d,groupProps:p}=Fp({heading:c,"aria-label":(f=n.props["aria-label"])!==null&&f!==void 0?f:void 0}),v=bt({defaultClassName:r,className:(l=n.props)===null||l===void 0?void 0:l.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),h=a.useContext(Mn),g=Gn(t),E=t.selectionMode!=null?new B0(h,g):h;return a.createElement("section",{...pe(t),...p,...v,ref:e},a.createElement(Ft,{values:[[Ec,{...d,ref:s}],[Mn,E]]},a.createElement(u,{collection:i.collection,parent:n})))}const K0=gc("section",Pc),Nn=a.createContext(null),M0=mc("item",function(e,n,r){var l;[e,n]=ut(e,n,Nn);let o=(l=fc(Nn))===null||l===void 0?void 0:l.id,i=a.useContext(Zn),u=Rt(n),s=a.useContext(Mn),{menuItemProps:c,labelProps:f,descriptionProps:d,keyboardShortcutProps:p,...v}=Zu({...e,id:o,key:r.key,selectionManager:s},i,u),{hoverProps:h,isHovered:g}=Kt({isDisabled:v.isDisabled}),E=bt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...v,isHovered:g,isFocusVisible:v.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),x=e.href?"a":"div";return a.createElement(x,{...V(c,h),...E,ref:u,"data-disabled":v.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-selected":v.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(Ft,{values:[[xc,{slots:{[dc]:f,label:f,description:d}}],[k0,p]]},E.children))}),bl=a.createContext(null),ml=a.createContext(null),Dc=a.createContext(null);function N0(t){let e=lc(t),n=a.useRef(null),{triggerProps:r,tooltipProps:l}=yv(t,e,n);return a.createElement(Ft,{values:[[ml,e],[Dc,{...l,triggerRef:n}]]},a.createElement(hf,{...r,ref:n},t.children))}const I0=a.forwardRef(function({UNSTABLE_portalContainer:e,...n},r){[n,r]=ut(n,r,Dc);let l=a.useContext(ml),o=lc(n),i=n.isOpen!=null||n.defaultOpen!=null||!l?o:l,u=zo(r,i.isOpen)||n.isExiting||!1;return!i.isOpen&&!u?null:a.createElement($p,{portalContainer:e},a.createElement(F0,{...n,tooltipRef:r,isExiting:u}))});function F0(t){let e=a.useContext(ml),n=a.useRef(null),[r,l]=a.useState(0);Y(()=>{n.current&&e.isOpen&&l(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:o,arrowProps:i,placement:u}=bi({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip,onClose:()=>e.close(!0)}),s=jo(t.tooltipRef,!!u)||t.isEntering||!1,c=bt({...t,defaultClassName:"react-aria-Tooltip",values:{placement:u,isEntering:s,isExiting:t.isExiting,state:e}});t=V(t,o);let{tooltipProps:f}=gv(t,e);return a.createElement("div",{...f,ref:t.tooltipRef,...c,style:{...o.style,...c.style},"data-placement":u??void 0,"data-entering":s||void 0,"data-exiting":t.isExiting||void 0},a.createElement(pl.Provider,{value:{...i,placement:u,ref:n}},c.children))}function kc({renderTrigger:t,menuId:e,size:n=24,title:r,items:l,disabled:o,onClose:i,testId:u="MenuTrigger-Trigger",menuTestId:s,onSelectionChange:c,selectedKey:f,disabledKeys:d}){const{className:p,style:v}=Ce(),h=Tt.useBreakpoint(Te.BREAKPOINTS.SMALL),g=sl({}),{isOpen:E,setOpen:x}=g,C=a.useRef(null),{menuTriggerProps:w,menuProps:T}=rl({type:"menu"},g,C),{pressProps:S}=je({onPress:()=>x(!0),isDisabled:o,ref:C}),P={"data-testid":u,"aria-label":"Menu"},I={isOpen:E,disabled:o,triggerRef:C,domTriggerProps:{...S,...P},ariaTriggerProps:{...w,...P,onPress:()=>x(!0)}};function N(m){const K=Array.from(m)[0];K&&(c==null||c(K))}const B=y.jsx($c,{...P,...w,isDisabled:o,className:j.csx("proton-MenuTrigger__button"),ref:C,children:y.jsx(_0,{size:n})}),A=t?t(I):B;return a.useEffect(()=>()=>{E&&(i==null||i())},[E,i]),h?y.jsxs(y.Fragment,{children:[A,E&&y.jsx(al,{id:e,actions:l,title:r,isOpen:E,onClose:()=>x(!1),showCancel:!0,"data-testid":s,selectionMode:"single",onSelectionChange:N,selectedKeys:f?[f]:void 0,disabledKeys:d})]}):y.jsxs(T0,{onOpenChange:x,isOpen:E,children:[A,y.jsx(Cc,{className:j.csx("proton-Popover",p),style:v,triggerRef:C,children:y.jsx(wc,{items:l,className:j.csx("proton-ListBox","proton-MenuTrigger__menu"),selectionMode:"single",onSelectionChange:N,selectedKeys:f?[f]:void 0,disabledKeys:d,children:y.jsxs(K0,{children:[r&&y.jsx(S0,{className:"proton-MenuTrigger__menu-header",children:r}),l.map(m=>Tc(m,p,v,d))]})})})]})}function Tc(t,e,n,r){var o;let l=((o=t.label)==null?void 0:o.toString())||"";return t.children?y.jsxs(A0,{children:[y.jsx(ko,{textValue:l,children:t.label}),y.jsx(Cc,{className:j.csx("proton-Popover",e),style:n,children:y.jsx(wc,{items:t.children,className:"proton-ListBox proton-MenuTrigger__menu",disabledKeys:r,children:i=>Tc(i,e,n)})})]},t.key):y.jsxs(ko,{textValue:l,onAction:()=>{var i;return(i=t.onAction)==null?void 0:i.call(t,t.key)},isDisabled:r==null?void 0:r.includes(t.key),children:[y.jsx(So,{slot:"label",children:t.label}),y.jsx(So,{slot:"description",children:t.description})]},t.key)}function ko(t){return y.jsx(M0,{...t,className:({isFocused:e,isOpen:n})=>j.csx("proton-ListBox__item proton-MenuTrigger__menu-item",e&&"focused",n&&"open"),children:({hasSubmenu:e})=>y.jsxs(y.Fragment,{children:[t.children,e&&y.jsx("svg",{className:"proton-MenuTrigger__chevron",viewBox:"0 0 256 256",children:y.jsx("path",{fill:"currentColor",d:"m184.49 136.49l-80 80a12 12 0 0 1-17-17L159 128L87.51 56.49a12 12 0 1 1 17-17l80 80a12 12 0 0 1-.02 17"})})]})})}const _0=({size:t})=>y.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,children:y.jsx("path",{fill:"currentColor",d:"M4 14c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Ac=44;function L0({items:t,defaultValue:e,children:n,onSelectionChange:r,disabledKeys:l,selectedKey:o,icon:i,variant:u,fullWidth:s,onPress:c,...f}){return y.jsxs("div",{className:j.csx("proton-ButtonWithSelect"),children:[y.jsx(It,{...f,onPress:c,icon:i,fullWidth:s,variant:u,"data-testid":"ButtonWithSelect-Button",__textShift:s?Ac/2:void 0,children:n}),y.jsx(kc,{items:t,disabled:f.isDisabled,disabledKeys:l,onSelectionChange:r,selectedKey:o,renderTrigger:({triggerRef:d,ariaTriggerProps:p})=>y.jsx(O0,{...f,...p,variant:u,ref:d})})]})}const O0=a.forwardRef((t,e)=>y.jsx("div",{className:"proton-ButtonWithSelect__trigger",style:{width:Ac},children:y.jsx(It,{...t,"data-testid":"ButtonWithSelect-Trigger",ref:e,children:y.jsx("div",{className:"proton-ButtonWithSelect__trigger-content",children:y.jsx(qn,{id:"chevron-down",size:16})})})}));function j0({title:t,children:e,...n}){let r=a.useRef(null),{dialogProps:l,titleProps:o}=Ju(n,r);return y.jsxs("div",{...l,ref:r,className:"proton-Dialog",children:[t&&y.jsx("h3",{...o,className:"proton-Dialog__header",children:t}),e]})}const z0=({children:t,hasPrimaryGradient:e=!1,"data-testid":n})=>{const{theme:r,palette:l,style:o}=Ce(),i=o["--proton-control__background-color-light"];let u=i,s=Be.transparentize(i,.01);if(r===Te.THEMES.CUSTOM_DARK&&(u=Be.transparentize(i,.1),s=Be.transparentize(i,.12),e)){const c=Be.transparentize(l.PRIMARY.PRIMARY_MEDIUM_LIGHT,.88),f=Be.transparentize(l.PRIMARY.PRIMARY_LIGHT,.84);u=Be.mix(u,c,.15),s=Be.mix(s,f,.15)}return y.jsx("div",{className:"proton-Elevation","data-testid":n,role:"presentation","aria-label":"Elevated content area",style:{background:`linear-gradient(to top left, ${u}, ${s})`},children:t})};function V0(t){const[e,n]=a.useState("");return a.useEffect(()=>{},[]),e?y.jsxs(y.Fragment,{children:[y.jsx("div",{dangerouslySetInnerHTML:{__html:e},style:{display:"none"}}),y.jsx(qn,{...t})]}):null}const H0=t=>{const[e,n,r]=t,l=e+n+r;if(l<65){const o=l/100;return`rgba(255, 255, 255, ${Math.max(.14,.36-o)})`}return""};function W0({image:t,imageUrl:e="",onLoad:n}){const{palette:r}=Ce(),l=Be.parseToRgba(r.BASE_COLOR),o=H0(l);return y.jsxs("div",{id:"image-background","aria-label":"Background overlay",role:"dialog","aria-modal":"true",className:"proton-ScreenOverlay__background",children:[t?y.jsx("div",{"aria-hidden":"true",children:t}):y.jsx("img",{alt:"",src:e,className:"proton-ScreenOverlay__image",onLoad:i=>n==null?void 0:n(i.currentTarget),"aria-hidden":"true"}),y.jsx("div",{className:"proton-ScreenOverlay__blur","aria-hidden":"true",style:{background:o}})]})}const Rc=async(t,e)=>{let n=!1;if(navigator.clipboard)try{await navigator.clipboard.writeText(t),n=!0}catch(r){e?e==null||e(r):console.error(r)}else n=U0(t);return n||(e?e==null||e(new Error("Failed to copy to clipboard")):console.error("Failed to copy to clipboard")),n},U0=(t,{target:e=document.body}={})=>{if(typeof t!="string")throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof t}\`.`);const n=document.createElement("textarea"),r=document.activeElement;n.value=t,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const l=document.getSelection(),o=l.rangeCount>0&&l.getRangeAt(0);e.append(n),n.select(),n.selectionStart=0,n.selectionEnd=t.length;let i=!1;try{i=document.execCommand("copy")}catch{}return n.remove(),o&&(l.removeAllRanges(),l.addRange(o)),r instanceof HTMLElement&&r.focus(),i},Jn=a.forwardRef(({prefix:t,suffix:e,description:n,descriptionPosition:r="top",isDisabled:l,error:o,onChange:i,label:u,name:s,placeholder:c,type:f="text",value:d,autoFocus:p,autoComplete:v,"data-testid":h},g)=>{const E=a.useRef(null),x=a.useRef(null),C=a.useRef(null),w=a.useRef(null),{className:T}=Ce(),S=g||E,{labelProps:P,inputProps:I,descriptionProps:N,errorMessageProps:B}=pi({label:u,name:s,type:f,autoFocus:p,autoComplete:v?"on":"off","aria-label":u||s,"aria-describedby":o?`${s}-input-error`:`${s}-input`,errorMessage:o,isDisabled:l,placeholder:u?void 0:c,validationState:o?"invalid":"valid",value:d,onChange:i,onCopy:async()=>{var A;await Rc((A=E.current)==null?void 0:A.value)}},S);return a.useEffect(()=>{if(!w.current)return;const A=()=>{var K,F;if(w.current){const k=w.current.offsetWidth||200;w.current.style.setProperty("--container-width",`${k}px`)}if(x.current){const k=x.current.offsetWidth||32;(K=w.current)==null||K.style.setProperty("--prefix-width",`${k}px`)}if(C.current){const k=C.current.offsetWidth||32;(F=w.current)==null||F.style.setProperty("--suffix-width",`${k}px`)}};A();const m=new ResizeObserver(A);return w.current&&m.observe(w.current),x.current&&m.observe(x.current),C.current&&m.observe(C.current),()=>{m.disconnect()}},[t,e]),y.jsxs("div",{className:"proton-Input__container",ref:w,children:[n&&r==="top"&&y.jsx("div",{...N,className:"proton-Input__text",children:n}),y.jsxs("div",{className:"proton-Input__container-inner",children:[t&&y.jsx("div",{ref:x,className:j.csx("proton-Input__descriptor","proton-Input__prefix"),children:t}),y.jsx("input",{...I,"data-testid":h,id:`${s}-input`,"aria-invalid":!!o,ref:S,className:j.csx("proton-Input",o&&"proton-Input--error",u&&"proton-Input__label-top",T)}),y.jsx("label",{...P,className:j.csx("proton-Input__label",d&&"proton-Input__label--filled"),children:u}),e&&y.jsx("div",{ref:C,className:j.csx("proton-Input__descriptor","proton-Input__suffix"),children:e})]}),o?y.jsx("div",{...B,role:"alert",className:j.csx("proton-Input__error","proton-Input__text"),id:`${s}-error`,children:o}):n&&r==="bottom"?y.jsx("div",{...N,className:"proton-Input__text",children:n}):null]})});Jn.displayName="Input";function G0({name:t,value:e,isDisabled:n,onError:r,onSuccess:l}){const[o,i]=a.useState(!1);return y.jsx(Jn,{name:t,value:e,isDisabled:n,suffix:y.jsx(Y0,{isCopied:o,onClick:async()=>{await Rc(e,r)&&(i(!0),l==null||l(),setTimeout(()=>i(!1),5e3))}})})}const Y0=({isCopied:t,onClick:e})=>y.jsx("div",{className:"proton-CopyInput-button-container",onClick:e,children:y.jsxs("button",{"data-testid":"COPY_BUTTON",className:j.csx("proton-CopyInput-button",t&&"proton-CopyInput-button--copied"),children:[y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 512 512",children:[y.jsx("path",{fill:"currentColor",d:"M408 480H184a72 72 0 0 1-72-72V184a72 72 0 0 1 72-72h224a72 72 0 0 1 72 72v224a72 72 0 0 1-72 72"}),y.jsx("path",{fill:"currentColor",d:"M160 80h235.88A72.12 72.12 0 0 0 328 32H104a72 72 0 0 0-72 72v224a72.12 72.12 0 0 0 48 67.88V160a80 80 0 0 1 80-80"})]}),y.jsx("span",{className:j.csx("proton-CopyInput-button-text",t&&"proton-CopyInput-button-text--copied"),children:t?"Copied!":"Copy"})]})}),q0=({name:t="search",placeholder:e="Search...",autoComplete:n,isClearable:r=!0,isDisabled:l=!1,error:o,defaultValue:i,value:u,"data-testid":s="proton-SearchInput",onChange:c,onClear:f})=>{const d=kv({defaultValue:i,value:u,onChange:C=>c==null?void 0:c(C),onClear:()=>f==null?void 0:f(),label:e}),p=a.useRef(null),{inputProps:v,clearButtonProps:h}=nv({...d,placeholder:e,"aria-label":e},d,p),{value:g,setValue:E}=d,x=()=>{f&&f(),c==null||c(""),E("")};return y.jsx("div",{className:"proton-SearchInput__wrapper","data-testid":s,role:"search",children:y.jsx(Jn,{...v,type:"search",onChange:C=>d.setValue(C),value:g,name:t,placeholder:e,autoComplete:n,error:o,ref:p,isDisabled:l,prefix:y.jsxs("svg",{"aria-hidden":"true",width:"2.8em",height:"1.6em",viewBox:"0 0 24 24",onClick:()=>{var C;return(C=p.current)==null?void 0:C.focus()},children:[y.jsx("title",{children:"Magnifying Glass"}),y.jsx("path",{fill:"currentColor",d:"M10.5 18.5a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-1a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5.25-.75 4.5 4.5-1.25 1.25-4.5-4.5 1.25-1.25Z"})]}),suffix:y.jsx("button",{"aria-label":h["aria-label"],type:"button",className:j.csx("proton-SearchInput__button","proton-Input__descriptor","proton-Input__suffix",!(r&&(g==null?void 0:g.length)>0)&&"proton-SearchInput__button--hide"),"data-testid":`${s}-clear`,onClick:()=>{var C;x(),(C=p.current)==null||C.focus()},children:y.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 50 50",width:"3.2em",height:"1.2em",children:[y.jsx("title",{children:"Clear"}),y.jsx("path",{fill:"currentColor",d:"m37.304 11.282l1.414 1.414l-26.022 26.02l-1.414-1.413z"}),y.jsx("path",{fill:"currentColor",d:"m12.696 11.282l26.022 26.02l-1.414 1.415l-26.022-26.02z"})]})})})})},Bc=({children:t})=>y.jsx("h2",{className:"proton-Modal__title",children:t}),Kc=({children:t})=>y.jsx("h3",{className:"proton-Modal__subtitle",children:t}),Mc=({children:t})=>y.jsx("div",{className:"proton-Modal__body",children:t}),X0=t=>y.jsx("div",{className:"proton-Modal__action",children:y.jsx(It,{...t})}),Z0=({children:t})=>y.jsx(on,{autoFocus:!0,children:y.jsx("div",{className:"proton-Modal__actions",children:t})}),J0=({title:t,subtitle:e,body:n,onClose:r,children:l,isClosing:o,"data-testid":i})=>{const u=a.useRef(null),s=Nt({isOpen:!0,onOpenChange:r}),{modalProps:c}=Cp({isDismissable:!1},s,u),{dialogProps:f}=Ju({role:"dialog"},u);el();const d=a.useRef(null),{buttonProps:p}=ln({onPress:r,"aria-label":"Close"},d);return y.jsx(on,{contain:!0,restoreFocus:!0,autoFocus:!0,children:y.jsxs("div",{"data-testid":i,className:j.csx("proton-Modal",o&&"proton-Modal--closing"),...V(c,f),ref:u,children:[y.jsx("button",{name:"Close",className:"proton-Modal__close-button",...p,ref:d,children:"×"}),t&&y.jsx(Bc,{children:t}),e&&y.jsx(Kc,{children:e}),n&&y.jsx(Mc,{children:n}),y.jsx("div",{className:"proton-Modal__content",children:l})]})})},Q0=({isOpen:t,onClose:e,title:n,subtitle:r,body:l,children:o,isOverlay:i=!0,"data-testid":u})=>{const s=a.useRef(null),{isClosing:c,handleClose:f}=Tt.useIsClosing({onClose:e,overlayRef:s}),d=Tt.useBreakpoint(Te.BREAKPOINTS.MEDIUM);if(!t)return null;const p=y.jsx(J0,{isOpen:t,title:n,subtitle:r,body:l,onClose:f,isClosing:c,"data-testid":u,children:o});return i||d?y.jsx(Yn,{fadeIn:!0,ref:s,onClose:f,children:p}):p},eh=Object.assign(Q0,{Title:Bc,Subtitle:Kc,Body:Mc,Action:X0,Actions:Z0});function th(t){const e=a.useRef(null),n=Nt(t||{}),{triggerProps:r,overlayProps:l}=gi({type:"dialog"},n,e),{buttonProps:o}=ln(r,e);return{buttonProps:o,overlayProps:l,buttonRef:e,state:n}}function Nc({children:t,state:e,arrow:n=!1,offset:r,...l}){const o=a.useRef(null),{popoverRef:i=o}=l,{className:u,style:s}=Ce();let{popoverProps:c,underlayProps:f,arrowProps:d,placement:p}=nu({...l,offset:r,popoverRef:i},e);return y.jsxs(Rn,{children:[y.jsx("div",{...f,style:{position:"fixed",inset:0}}),y.jsxs("div",{...c,ref:i,className:j.csx("proton-Popover",u),style:{...c.style,...s},"data-testid":l["data-testid"]||void 0,"data-placement":p,"data-entering":!0,children:[y.jsx(Mr,{onDismiss:e.close}),n&&y.jsxs("svg",{...d,className:"arrow","data-placement":p,viewBox:"0 0 12 12",children:[y.jsx("title",{children:"arrow"}),y.jsx("path",{d:"M0 0 L6 6 L12 0"})]}),t]})]})}const nh=t=>{let e=a.useRef(null),{state:n}=t,{listBoxProps:r}=Ap(t,n,e);return y.jsx("ul",{...r,ref:e,"data-testid":"listbox",className:"proton-ListBox",children:[...n.collection].map(l=>y.jsx(rh,{item:l,state:n},l.key))})};function rh({item:t,state:e}){let n=a.useRef(null),{optionProps:r,isSelected:l,isFocused:o,isDisabled:i}=Np({key:t.key},e,n);return y.jsx("li",{...r,className:"proton-ListBox__item",ref:n,children:t.rendered})}const lh=a.forwardRef((t,e)=>{let{buttonProps:n}=ln({...t,isDisabled:t.disabled},e);return y.jsx("button",{...n,ref:e,className:j.csx("proton-Select__trigger",t.disabled&&"proton-Select__trigger--disabled",!t.isOpen&&"proton-Select__trigger--closed",t.isOpen&&"proton-Select__trigger--opened"),children:t.children})});function oh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:o,defaultSelectedKey:i,onOpen:u,onClose:s,items:c,"data-testid":f}){const d={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,defaultSelectedKey:i,onSelectionChange:o,onOpenChange:S=>{S?u==null||u():s==null||s()},"data-testid":f,children:c.map(S=>y.jsx(du,{textValue:S.label,children:S.label},S.key))},p=Tv(d),v=Tt.useBreakpoint(Te.BREAKPOINTS.MEDIUM),h=a.useRef(null),g=a.useRef(null),{labelProps:E,triggerProps:x,valueProps:C,menuProps:w}=rv({...d,label:t||e},p,h);a.useEffect(()=>{p.isOpen&&g.current&&h.current&&!g.current.style.minWidth&&(g.current.style.minWidth=`${h.current.offsetWidth}px`)},[p.isOpen]);const T=c.map(S=>({key:S.key,label:S.label,to:S.to,onAction:()=>{p.setSelectedKey(S.key),p.close()}}));return y.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?y.jsx("div",{...E,className:"proton-Select__label","data-testid":"select-label",children:t}):y.jsx("div",{...E}),y.jsx(ov,{isDisabled:n,state:p,triggerRef:h,label:t||e,name:e,"data-testid":"hidden-select-container"}),y.jsxs(lh,{...x,isOpen:p.isOpen,ref:h,disabled:n,"data-testid":f,children:[y.jsx("div",{...C,className:"proton-Select__value",children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),y.jsx("div",{className:j.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:y.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[y.jsx("title",{children:p.isOpen?"caret down":"caret up"}),y.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&y.jsx(y.Fragment,{children:v?y.jsx(al,{isOpen:p.isOpen,onClose:()=>p.close(),actions:T,selectedKeys:[p.selectedKey.toString()],disabledKeys:r}):y.jsx("div",{className:"proton-Select__popover",children:y.jsx(Nc,{state:p,triggerRef:h,popoverRef:g,placement:"bottom start","data-testid":"select-popover",children:y.jsx(nh,{...w,state:p})})})})]})}function ih(t){let e={...t,isSelected:t.isOn,"data-testid":void 0},n=a.useRef(null),r=ep(e),{inputProps:l}=iv(e,r,n);return y.jsxs("label",{className:j.csx("proton-Switch",t.isDisabled&&"proton-Switch--disabled",r.isSelected&&"proton-Switch--on"),"data-on":r.isSelected||void 0,"data-disabled":t.isDisabled||void 0,"data-testid":t["data-testid"]||void 0,"aria-label":t.label||void 0,children:[y.jsx(Qr,{children:y.jsx("input",{...l,ref:n})}),t.label&&y.jsx("div",{className:"proton-Switch__label",children:t.label}),y.jsxs("div",{className:"proton-Switch__wrapper",children:[y.jsx("div",{className:"proton-Switch__toggle",children:y.jsx("div",{className:"proton-Switch__slider"})}),t.children&&y.jsx("div",{className:"proton-Switch__description",children:t.children})]})]})}function uh({item:t,state:e,children:n}){let r=a.useRef(),{rowProps:l}=hv({node:t},e);return y.jsx("tr",{className:j.csx("proton-Table__headerRow"),...l,ref:r,children:n})}function sh({column:t,state:e}){var s,c;let n=a.useRef(),{columnHeaderProps:r}=pv({node:t},e,n);const{align:l="left"}=t.props;let{isFocusVisible:o,focusProps:i}=Wn(),u=((s=e.sortDescriptor)==null?void 0:s.direction)==="ascending"?"▲":"▼";return y.jsxs("th",{...V(r,i),colSpan:t.colspan,className:j.csx("proton-Table__header",`proton-Table__header--${l}`,o?"proton-Table__header--focused":null),ref:n,children:[t.rendered,t.props.allowsSorting&&y.jsx("span",{"aria-hidden":"true",className:j.csx("proton-Table__headerSortIcon"),style:{visibility:((c=e.sortDescriptor)==null?void 0:c.column)===t.key?"visible":"hidden"},children:u})]})}function To({type:t,children:e,isHidden:n=!1}){let{rowGroupProps:r}=mv();return y.jsx(t,{...r,className:j.csx("proton-Table__rowGroup",t==="thead"?"proton-Table__rowGroup--header":"proton-Table__rowGroup--body"),style:n?{display:"none"}:void 0,children:e})}function ah({item:t,children:e,state:n,backgroundColor:r,onClick:l,showLines:o=!0}){let i=a.useRef(),u=n.selectionManager.isSelected(t.key),{rowProps:s,isPressed:c}=vv({node:t},n,i),{isFocusVisible:f,focusProps:d}=Wn();return y.jsx("tr",{className:j.csx("proton-Table__row",u?"proton-Table__row--selected":null,c?"proton-Table__row--pressed":null,f?"proton-Table__row--focused":null,o&&"proton-Table__row--showLines",l&&"proton-Table--clickable"),style:r?{backgroundColor:r}:void 0,...V(s,d),ref:i,onClick:l?()=>l(t.key):void 0,children:e})}function ch({cell:t,state:e,width:n,onClick:r}){let l=a.useRef(),{gridCellProps:o}=bv({node:t},e,l),{isFocusVisible:i,focusProps:u}=Wn();const{align:s="left"}=t.props;return y.jsx("td",{...V(o,u),className:j.csx("proton-Table__cell",i?"proton-Table__cell--focused":null,`proton-Table__cell--${s}`,r&&"proton-Table--clickable"),style:n?{width:n}:void 0,ref:l,onClick:r?()=>r(t.key):void 0,children:t.rendered})}const dh=_v,fh=Ov,ph=Lv,vh=Fv;function hh(t){var o;let e=Nv({...t}),n=a.useRef(),{collection:r}=e,{gridProps:l}=dv({...t,"aria-label":t["aria-label"]||"Table"},e,n);return y.jsxs("table",{...l,ref:n,className:j.csx("proton-Table"),children:[y.jsx(To,{type:"thead",isHidden:(o=t.headerProps)==null?void 0:o.isHidden,children:r.headerRows.map(i=>y.jsx(uh,{item:i,state:e,children:Array.from(r.getChildren(i.key)).map(u=>y.jsx(sh,{column:u,state:e},u.key))},i.key))}),y.jsx(To,{type:"tbody",children:Array.from(r.body.childNodes).map(i=>y.jsx(ah,{item:i,state:e,backgroundColor:i.props.backgroundColor,showLines:r.body.props.showLines,onClick:i.props.onClick,children:Array.from(r.getChildren(i.key)).map(u=>y.jsx(ch,{cell:u,state:e,width:u.props.width,onClick:u.props.onClick},u.key))},i.key))})]})}const bh=({children:t,maxWidth:e,singleLine:n=!0,lines:r=1,title:l,"data-testid":o})=>y.jsx("div",{className:j.csx("proton-TextEllipsis",n||r===1?"proton-TextEllipsis--single-line":r>1?"proton-TextEllipsis--multi-line":""),style:{maxWidth:e,WebkitLineClamp:r},title:l,"data-testid":o,children:t});function Ic({children:t,arrow:e,...n}){const{style:r,className:l}=Ce();return y.jsxs(I0,{...n,className:j.csx("proton__Tooltip","proton-Dialog",l),style:r,children:[e&&y.jsx(P0,{className:j.csx("proton__TooltipArrow",l),children:y.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:y.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})}function Fc({children:t,delay:e=500,closeDelay:n=500,isDisabled:r,defaultOpen:l,onOpenChange:o,disableTriggerClick:i,content:u,...s}){const[c,f]=a.useState(!1),d=a.useRef(!1),p=a.useRef(!1);return u===""?null:y.jsxs(N0,{delay:e,closeDelay:n,isDisabled:r,isOpen:c,defaultOpen:l,onOpenChange:v=>{v&&!d.current&&(p.current=!0),o&&o(v),d.current||f(v),d.current=!1},children:[i?y.jsx("span",{className:"proton__TooltipTrigger","aria-label":"Show tooltip",children:t}):y.jsx($c,{className:"proton__TooltipTrigger","aria-label":"Show tooltip",onPress:()=>{i||r||p.current||(d.current=!0,f(!c))},children:t}),y.jsx(Ic,{...s,children:u})]})}const mh=({to:t,children:e,tooltipProps:n,"data-testid":r})=>{const{className:l}=Ce(),o=n?y.jsx(Fc,{delay:50,closeDelay:75,...n,children:e}):e;if(t){const i=j.isUrlExternal(t);return y.jsx("span",{className:j.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),children:y.jsx("a",{"data-testid":r,href:t,target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,onClick:i?void 0:u=>j.handleInternalNavigation(u,t),children:o})})}return y.jsx("span",{className:j.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),"data-testid":r,children:o})},gh=({width:t="100%",height:e="1.5rem",borderRadius:n="4px"})=>{const{theme:r,palette:l}=Ce(),o={"--tombstone-custom-background":l.PRIMARY.PRIMARY_MEDIUM,"--tombstone-custom-primary":j.transparentize(l.PRIMARY.PRIMARY_DARK,.9),"--tombstone-custom-secondary":j.transparentize(l.SECONDARY.SECONDARY_DARK,.7)};return y.jsx("div",{className:`tombstone ${r}`,style:{...o,width:t,height:e,borderRadius:n}})};function yh({amplitude:t,isDisabled:e,isPlayed:n,isHovered:r,isVisible:l,hasAnimated:o,resolution:i,spacing:u,index:s}){const c=l?`${Math.max(t*100,4)}%`:"0%";return y.jsxs("div",{className:j.csx("proton-Waveform__bar-wrapper"),style:{width:`${i}px`,marginRight:`${u}px`},children:[y.jsx("div",{className:j.csx("proton-Waveform__bar","proton-Waveform__bar--upper",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",o&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":s}}),y.jsx("div",{className:j.csx("proton-Waveform__bar","proton-Waveform__bar--lower",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",o&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":s}}),r&&!e&&!n&&y.jsx("div",{className:"proton-Waveform__bar--hover",style:{"--hover-height":c}})]})}const $h=wh(100);function xh({data:t,resolution:e=2,startDuration:n,endDuration:r,currentTime:l=0,showTimestamps:o=!1,totalDuration:i,disabled:u,disabledMessage:s,onClick:c,"data-testid":f}){var F;const{className:d}=Ce(),p=a.useRef(null),[v,h]=a.useState([]),[g,E]=a.useState(null),[x,C]=a.useState(!1),[w,T]=a.useState(!1),S=t||$h,P=e;a.useEffect(()=>{if(!p.current)return;const k=R=>{const D=Math.floor(R/(e+P)),O=Ch(S,D);h(O)},L=p.current.clientWidth;k(L);const b=new ResizeObserver(R=>{R&&R[0]&&k(R[0].contentRect.width)});return b.observe(p.current),()=>b.disconnect()},[S,e,P]),a.useEffect(()=>{const k=setTimeout(()=>C(!0),50),L=setTimeout(()=>T(!0),500);return()=>{clearTimeout(k),clearTimeout(L)}},[]);const I=k=>{if(!p.current)return;const L=p.current.getBoundingClientRect(),R=(k.clientX-L.left)/L.width*i;E(R)},N=()=>{E(null)},B=e+P,A=(k,L)=>{var D;const b=k/i*100;return(L==="start"?Math.floor(b/100*v.length):Math.ceil(b/100*v.length))*B/((D=p.current)==null?void 0:D.clientWidth)*100},m=(F=p.current)==null?void 0:F.clientWidth,K=a.useMemo(()=>u&&s?s:t?null:"Waveform Unavailable",[u,s,t]);return y.jsxs("div",{className:j.csx("proton-Waveform",d),"data-testid":f,children:[o&&y.jsx(Ao,{direction:"left",seconds:l}),y.jsxs("div",{ref:p,className:"proton-Waveform__container",onMouseMove:I,onMouseLeave:N,onClick:k=>{if(!p.current||u)return;const L=p.current.getBoundingClientRect(),R=(k.clientX-L.left)/L.width*i;c==null||c(R,k)},"data-disabled":u,"data-testid":"waveform-container",children:[n!==void 0&&r!==void 0&&y.jsx("div",{className:"proton-Waveform__active-region",style:{left:p.current?`calc(${A(n,"start")}%`:"0%",right:p.current?`calc(${100-A(r,"end")}% - 2px)`:"0%"}}),g!==null&&y.jsx("div",{className:"proton-Waveform__hover-line",style:{left:`${g/i*100}%`}}),v.map((k,L)=>{const b=L/v.length*i,R=n!==void 0&&r!==void 0&&(b<n||b>r),D=l===0?!1:b<=l,O=g!==null&&b<=g;return y.jsx(yh,{amplitude:k,isDisabled:u||R,isPlayed:D,isHovered:O,isVisible:x,hasAnimated:w,resolution:e,spacing:P,index:L},L)})]}),K&&y.jsx("div",{className:"proton-Waveform__bar-unavailable",style:{fontSize:m<325?"0.85rem":"1rem"},children:K}),o&&y.jsx(Ao,{direction:"right",seconds:i})]})}function Ao({direction:t,seconds:e}){return y.jsx("div",{className:j.csx("proton-Waveform__timestamp",`proton-Waveform__timestamp--${t}`),children:Eh(e)})}function Eh(t){const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n.toFixed(0)}`}function Ch(t,e){const n=t.length,r=n/e,l=new Array(e).fill(0).map((o,i)=>{const u=i*r,s=Math.floor(u),c=Math.min(s+1,n-1),f=u-s;return t[s]*(1-f)+t[c]*f});return Sh(l)}function Sh(t){const e=Math.min(...t),n=Math.max(...t);return t.map(r=>{const l=(r-e)/(n-e);return Math.max(l*.8+.1,.1)})}function wh(t){return Array.from({length:t},(e,n)=>{const l=n/(t-1)*6*2*Math.PI-Math.PI/2;return Math.sin(l)*.5+.5})}exports.ActionMenu=al;exports.Badge=Zv;exports.BadgeVariants=Xv;exports.Banner=Ze;exports.Button=It;exports.ButtonGroup=cc;exports.ButtonWithSelect=L0;exports.Cell=fh;exports.Column=dh;exports.CopyInput=G0;exports.Dialog=j0;exports.Elevation=z0;exports.Icon=V0;exports.ImageBackground=W0;exports.Input=Jn;exports.MenuTrigger=kc;exports.Modal=eh;exports.Popover=Nc;exports.Row=ph;exports.ScreenOverlay=Yn;exports.SearchInput=q0;exports.Section=Bp;exports.Select=oh;exports.Switch=ih;exports.Table=hh;exports.TableBody=vh;exports.TableHeader=Iv;exports.TextEllipsis=bh;exports.TextEmphasis=mh;exports.ThemeProvider=uc;exports.Tombstone=gh;exports.Tooltip=Ic;exports.TooltipTrigger=Fc;exports.Waveform=xh;exports.usePopoverTrigger=th;exports.useTheme=Ce;
46
+ */var bo;function Zp(){return bo||(bo=1,process.env.NODE_ENV!=="production"&&function(){function t(v,h){return v===h&&(v!==0||1/v===1/h)||v!==v&&h!==h}function e(v,h){f||l.startTransition===void 0||(f=!0,console.error("You are using an outdated, pre-release alpha of React 18 that does not support useSyncExternalStore. The use-sync-external-store shim will not work correctly. Upgrade to a newer pre-release."));var g=h();if(!d){var E=h();o(g,E)||(console.error("The result of getSnapshot should be cached to avoid an infinite loop"),d=!0)}E=i({inst:{value:g,getSnapshot:h}});var x=E[0].inst,C=E[1];return s(function(){x.value=g,x.getSnapshot=h,n(x)&&C({inst:x})},[v,g,h]),u(function(){return n(x)&&C({inst:x}),v(function(){n(x)&&C({inst:x})})},[v]),c(g),g}function n(v){var h=v.getSnapshot;v=v.value;try{var g=h();return!o(v,g)}catch{return!0}}function r(v,h){return h()}typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStart(Error());var l=a,o=typeof Object.is=="function"?Object.is:t,i=l.useState,u=l.useEffect,s=l.useLayoutEffect,c=l.useDebugValue,f=!1,d=!1,p=typeof window>"u"||typeof window.document>"u"||typeof window.document.createElement>"u"?r:e;yr.useSyncExternalStore=l.useSyncExternalStore!==void 0?l.useSyncExternalStore:p,typeof __REACT_DEVTOOLS_GLOBAL_HOOK__<"u"&&typeof __REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop=="function"&&__REACT_DEVTOOLS_GLOBAL_HOOK__.registerInternalModuleStop(Error())}()),yr}process.env.NODE_ENV==="production"?Fr.exports=Xp():Fr.exports=Zp();var Jp=Fr.exports;const Ns=new WeakMap;function Qp(t,e,n){let{value:r,children:l,"aria-label":o,"aria-labelledby":i}=t;const u=t.isDisabled||e.isDisabled;let s=l!=null,c=o!=null||i!=null;!s&&!c&&process.env.NODE_ENV!=="production"&&console.warn("If you do not provide children, you must specify an aria-label for accessibility");let f=e.selectedValue===r,d=N=>{N.stopPropagation(),e.setSelectedValue(r)},{pressProps:p,isPressed:v}=je({isDisabled:u}),{pressProps:h,isPressed:g}=je({isDisabled:u,onPress(){var N;e.setSelectedValue(r),(N=n.current)===null||N===void 0||N.focus()}}),{focusableProps:E}=Bt(V(t,{onFocus:()=>e.setLastFocusedValue(r)}),n),x=V(p,E),C=pe(t,{labelable:!0}),w=-1;e.selectedValue!=null?e.selectedValue===r&&(w=0):(e.lastFocusedValue===r||e.lastFocusedValue==null)&&(w=0),u&&(w=void 0);let{name:T,descriptionId:S,errorMessageId:P,validationBehavior:I}=Ns.get(e);return jn(n,e.selectedValue,e.setSelectedValue),Zr({validationBehavior:I},e,n),{labelProps:V(h,{onClick:N=>N.preventDefault()}),inputProps:V(C,{...x,type:"radio",name:T,tabIndex:w,disabled:u,required:e.isRequired&&I==="native",checked:f,value:r,onChange:d,"aria-describedby":[t["aria-describedby"],e.isInvalid?P:null,S].filter(Boolean).join(" ")||void 0}),isDisabled:u,isSelected:f,isPressed:v||g}}function ev(t,e){let{name:n,isReadOnly:r,isRequired:l,isDisabled:o,orientation:i="vertical",validationBehavior:u="aria"}=t,{direction:s}=Me(),{isInvalid:c,validationErrors:f,validationDetails:d}=e.displayValidation,{labelProps:p,fieldProps:v,descriptionProps:h,errorMessageProps:g}=Jr({...t,labelElementType:"span",isInvalid:e.isInvalid,errorMessage:t.errorMessage||f}),E=pe(t,{labelable:!0}),{focusWithinProps:x}=rn({onBlurWithin(T){var S;(S=t.onBlur)===null||S===void 0||S.call(t,T),e.selectedValue||e.setLastFocusedValue(null)},onFocusWithin:t.onFocus,onFocusWithinChange:t.onFocusChange}),C=T=>{let S;switch(T.key){case"ArrowRight":s==="rtl"&&i!=="vertical"?S="prev":S="next";break;case"ArrowLeft":s==="rtl"&&i!=="vertical"?S="next":S="prev";break;case"ArrowDown":S="next";break;case"ArrowUp":S="prev";break;default:return}T.preventDefault();let P=Se(T.currentTarget,{from:T.target}),I;S==="next"?(I=P.nextNode(),I||(P.currentNode=T.currentTarget,I=P.firstChild())):(I=P.previousNode(),I||(P.currentNode=T.currentTarget,I=P.lastChild())),I&&(I.focus(),e.setSelectedValue(I.value))},w=ce(n);return Ns.set(e,{name:w,descriptionId:h.id,errorMessageId:g.id,validationBehavior:u}),{radioGroupProps:V(E,{role:"radiogroup",onKeyDown:C,"aria-invalid":e.isInvalid||void 0,"aria-errormessage":t["aria-errormessage"],"aria-readonly":r||void 0,"aria-required":l||void 0,"aria-disabled":o||void 0,"aria-orientation":i,...v,...x}),labelProps:p,descriptionProps:h,errorMessageProps:g,isInvalid:c,validationErrors:f,validationDetails:d}}var Is={};Is={"Clear search":"مسح البحث"};var Fs={};Fs={"Clear search":"Изчистване на търсене"};var _s={};_s={"Clear search":"Vymazat hledání"};var Ls={};Ls={"Clear search":"Ryd søgning"};var Os={};Os={"Clear search":"Suche zurücksetzen"};var js={};js={"Clear search":"Απαλοιφή αναζήτησης"};var zs={};zs={"Clear search":"Clear search"};var Vs={};Vs={"Clear search":"Borrar búsqueda"};var Hs={};Hs={"Clear search":"Tühjenda otsing"};var Ws={};Ws={"Clear search":"Tyhjennä haku"};var Us={};Us={"Clear search":"Effacer la recherche"};var Gs={};Gs={"Clear search":"נקה חיפוש"};var Ys={};Ys={"Clear search":"Obriši pretragu"};var qs={};qs={"Clear search":"Keresés törlése"};var Xs={};Xs={"Clear search":"Cancella ricerca"};var Zs={};Zs={"Clear search":"検索をクリア"};var Js={};Js={"Clear search":"검색 지우기"};var Qs={};Qs={"Clear search":"Išvalyti iešką"};var ea={};ea={"Clear search":"Notīrīt meklēšanu"};var ta={};ta={"Clear search":"Tøm søk"};var na={};na={"Clear search":"Zoekactie wissen"};var ra={};ra={"Clear search":"Wyczyść zawartość wyszukiwania"};var la={};la={"Clear search":"Limpar pesquisa"};var oa={};oa={"Clear search":"Limpar pesquisa"};var ia={};ia={"Clear search":"Ştergeţi căutarea"};var ua={};ua={"Clear search":"Очистить поиск"};var sa={};sa={"Clear search":"Vymazať vyhľadávanie"};var aa={};aa={"Clear search":"Počisti iskanje"};var ca={};ca={"Clear search":"Obriši pretragu"};var da={};da={"Clear search":"Rensa sökning"};var fa={};fa={"Clear search":"Aramayı temizle"};var pa={};pa={"Clear search":"Очистити пошук"};var va={};va={"Clear search":"清除搜索"};var ha={};ha={"Clear search":"清除搜尋條件"};var ba={};ba={"ar-AE":Is,"bg-BG":Fs,"cs-CZ":_s,"da-DK":Ls,"de-DE":Os,"el-GR":js,"en-US":zs,"es-ES":Vs,"et-EE":Hs,"fi-FI":Ws,"fr-FR":Us,"he-IL":Gs,"hr-HR":Ys,"hu-HU":qs,"it-IT":Xs,"ja-JP":Zs,"ko-KR":Js,"lt-LT":Qs,"lv-LV":ea,"nb-NO":ta,"nl-NL":na,"pl-PL":ra,"pt-BR":la,"pt-PT":oa,"ro-RO":ia,"ru-RU":ua,"sk-SK":sa,"sl-SI":aa,"sr-SP":ca,"sv-SE":da,"tr-TR":fa,"uk-UA":pa,"zh-CN":va,"zh-TW":ha};function tv(t){return t&&t.__esModule?t.default:t}function nv(t,e,n){let r=ht(tv(ba),"@react-aria/searchfield"),{isDisabled:l,isReadOnly:o,onSubmit:i,onClear:u,type:s="search"}=t,c=x=>{const C=x.key;C==="Enter"&&(l||o)&&x.preventDefault(),!(l||o)&&(C==="Enter"&&i&&(x.preventDefault(),i(e.value)),C==="Escape"&&(e.value===""&&(!n.current||n.current.value==="")?x.continuePropagation():(x.preventDefault(),e.setValue(""),u&&u())))},f=()=>{e.setValue(""),u&&u()},d=()=>{var x;(x=n.current)===null||x===void 0||x.focus()},{labelProps:p,inputProps:v,descriptionProps:h,errorMessageProps:g,...E}=pi({...t,value:e.value,onChange:e.setValue,onKeyDown:o?t.onKeyDown:Ye(c,t.onKeyDown),type:s},n);return{labelProps:p,inputProps:{...v,defaultValue:void 0},clearButtonProps:{"aria-label":r.format("Clear search"),excludeFromTabOrder:!0,preventFocusOnPress:!0,isDisabled:l||o,onPress:f,onPressStart:d},descriptionProps:h,errorMessageProps:g,...E}}const ma=new WeakMap;function rv(t,e,n){let{keyboardDelegate:r,isDisabled:l,isRequired:o,name:i,validationBehavior:u="aria"}=t,s=Hn({usage:"search",sensitivity:"base"}),c=a.useMemo(()=>r||new su(e.collection,e.disabledKeys,n,s),[r,e.collection,e.disabledKeys,s,n]),{menuTriggerProps:f,menuProps:d}=rl({isDisabled:l,type:"listbox"},e,n),p=N=>{switch(N.key){case"ArrowLeft":{var B,A;N.preventDefault();let F=e.selectedKey!=null?(B=c.getKeyAbove)===null||B===void 0?void 0:B.call(c,e.selectedKey):(A=c.getFirstKey)===null||A===void 0?void 0:A.call(c);F&&e.setSelectedKey(F);break}case"ArrowRight":{var m,K;N.preventDefault();let F=e.selectedKey!=null?(m=c.getKeyBelow)===null||m===void 0?void 0:m.call(c,e.selectedKey):(K=c.getFirstKey)===null||K===void 0?void 0:K.call(c);F&&e.setSelectedKey(F);break}}},{typeSelectProps:v}=iu({keyboardDelegate:c,selectionManager:e.selectionManager,onTypeSelect(N){e.setSelectedKey(N)}}),{isInvalid:h,validationErrors:g,validationDetails:E}=e.displayValidation,{labelProps:x,fieldProps:C,descriptionProps:w,errorMessageProps:T}=Jr({...t,labelElementType:"span",isInvalid:h,errorMessage:t.errorMessage||g});v.onKeyDown=v.onKeyDownCapture,delete v.onKeyDownCapture;let S=pe(t,{labelable:!0}),P=V(v,f,C),I=ce();return ma.set(e,{isDisabled:l,isRequired:o,name:i,validationBehavior:u}),{labelProps:{...x,onClick:()=>{if(!t.isDisabled){var N;(N=n.current)===null||N===void 0||N.focus(),Qo("keyboard")}}},triggerProps:V(S,{...P,isDisabled:l,onKeyDown:Ye(P.onKeyDown,p,t.onKeyDown),onKeyUp:t.onKeyUp,"aria-labelledby":[I,P["aria-labelledby"],P["aria-label"]&&!P["aria-labelledby"]?P.id:null].filter(Boolean).join(" "),onFocus(N){e.isFocused||(t.onFocus&&t.onFocus(N),t.onFocusChange&&t.onFocusChange(!0),e.setFocused(!0))},onBlur(N){e.isOpen||(t.onBlur&&t.onBlur(N),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))}}),valueProps:{id:I},menuProps:{...d,autoFocus:e.focusStrategy||!0,shouldSelectOnPressUp:!0,shouldFocusOnHover:!0,disallowEmptySelection:!0,linkBehavior:"selection",onBlur:N=>{N.currentTarget.contains(N.relatedTarget)||(t.onBlur&&t.onBlur(N),t.onFocusChange&&t.onFocusChange(!1),e.setFocused(!1))},"aria-labelledby":[C["aria-labelledby"],P["aria-label"]&&!C["aria-labelledby"]?P.id:null].filter(Boolean).join(" ")},descriptionProps:w,errorMessageProps:T,isInvalid:h,validationErrors:g,validationDetails:E}}function lv(t,e,n){let r=ma.get(e)||{},{autoComplete:l,name:o=r.name,isDisabled:i=r.isDisabled}=t,{validationBehavior:u,isRequired:s}=r,{visuallyHiddenProps:c}=fi();jn(t.selectRef,e.selectedKey,e.setSelectedKey),Zr({validationBehavior:u,focus:()=>{var d;return(d=n.current)===null||d===void 0?void 0:d.focus()}},e,t.selectRef);var f;return{containerProps:{...c,"aria-hidden":!0,"data-react-aria-prevent-focus":!0,"data-a11y-ignore":"aria-hidden-focus"},inputProps:{style:{display:"none"}},selectProps:{tabIndex:-1,autoComplete:l,disabled:i,required:u==="native"&&s,name:o,value:(f=e.selectedKey)!==null&&f!==void 0?f:void 0,onChange:d=>e.setSelectedKey(d.target.value)}}}function ov(t){let{state:e,triggerRef:n,label:r,name:l,isDisabled:o}=t,i=a.useRef(null),{containerProps:u,selectProps:s}=lv({...t,selectRef:i},e,n);var c;return e.collection.size<=300?a.createElement("div",{...u,"data-testid":"hidden-select-container"},a.createElement("label",null,r,a.createElement("select",{...s,ref:i},a.createElement("option",null),[...e.collection.getKeys()].map(f=>{let d=e.collection.getItem(f);if(d&&d.type==="item")return a.createElement("option",{key:d.key,value:d.key},d.textValue)})))):l?a.createElement("input",{type:"hidden",autoComplete:s.autoComplete,name:l,disabled:o,value:(c=e.selectedKey)!==null&&c!==void 0?c:""}):null}function iv(t,e,n){let{labelProps:r,inputProps:l,isSelected:o,isPressed:i,isDisabled:u,isReadOnly:s}=Qf(t,e,n);return{labelProps:r,inputProps:{...l,role:"switch",checked:o},isSelected:o,isPressed:i,isDisabled:u,isReadOnly:s}}const il=new WeakMap;function _r(t){return typeof t=="string"?t.replace(/\s*/g,""):""+t}function uv(t,e){let n=il.get(t);if(!n)throw new Error("Unknown grid");return`${n}-${_r(e)}`}function ga(t,e,n){let r=il.get(t);if(!r)throw new Error("Unknown grid");return`${r}-${_r(e)}-${_r(n)}`}function sv(t,e){return[...t.collection.rowHeaderColumnKeys].map(n=>ga(t,e,n)).join(" ")}var ya={};ya={ascending:"تصاعدي",ascendingSort:t=>`ترتيب حسب العمود ${t.columnName} بترتيب تصاعدي`,columnSize:t=>`${t.value} بالبكسل`,descending:"تنازلي",descendingSort:t=>`ترتيب حسب العمود ${t.columnName} بترتيب تنازلي`,resizerDescription:"اضغط على مفتاح Enter لبدء تغيير الحجم",select:"تحديد",selectAll:"تحديد الكل",sortable:"عمود قابل للترتيب"};var $a={};$a={ascending:"възходящ",ascendingSort:t=>`сортирано по колона ${t.columnName} във възходящ ред`,columnSize:t=>`${t.value} пиксела`,descending:"низходящ",descendingSort:t=>`сортирано по колона ${t.columnName} в низходящ ред`,resizerDescription:"Натиснете „Enter“, за да започнете да преоразмерявате",select:"Изберете",selectAll:"Изберете всичко",sortable:"сортираща колона"};var xa={};xa={ascending:"vzestupně",ascendingSort:t=>`řazeno vzestupně podle sloupce ${t.columnName}`,columnSize:t=>`${t.value} pixelů`,descending:"sestupně",descendingSort:t=>`řazeno sestupně podle sloupce ${t.columnName}`,resizerDescription:"Stisknutím klávesy Enter začnete měnit velikost",select:"Vybrat",selectAll:"Vybrat vše",sortable:"sloupec s možností řazení"};var Ea={};Ea={ascending:"stigende",ascendingSort:t=>`sorteret efter kolonne ${t.columnName} i stigende rækkefølge`,columnSize:t=>`${t.value} pixels`,descending:"faldende",descendingSort:t=>`sorteret efter kolonne ${t.columnName} i faldende rækkefølge`,resizerDescription:"Tryk på Enter for at ændre størrelse",select:"Vælg",selectAll:"Vælg alle",sortable:"sorterbar kolonne"};var Ca={};Ca={ascending:"aufsteigend",ascendingSort:t=>`sortiert nach Spalte ${t.columnName} in aufsteigender Reihenfolge`,columnSize:t=>`${t.value} Pixel`,descending:"absteigend",descendingSort:t=>`sortiert nach Spalte ${t.columnName} in absteigender Reihenfolge`,resizerDescription:"Eingabetaste zum Starten der Größenänderung drücken",select:"Auswählen",selectAll:"Alles auswählen",sortable:"sortierbare Spalte"};var Sa={};Sa={ascending:"αύξουσα",ascendingSort:t=>`διαλογή ανά στήλη ${t.columnName} σε αύξουσα σειρά`,columnSize:t=>`${t.value} pixel`,descending:"φθίνουσα",descendingSort:t=>`διαλογή ανά στήλη ${t.columnName} σε φθίνουσα σειρά`,resizerDescription:"Πατήστε Enter για έναρξη της αλλαγής μεγέθους",select:"Επιλογή",selectAll:"Επιλογή όλων",sortable:"Στήλη διαλογής"};var wa={};wa={select:"Select",selectAll:"Select All",sortable:"sortable column",ascending:"ascending",descending:"descending",ascendingSort:t=>`sorted by column ${t.columnName} in ascending order`,descendingSort:t=>`sorted by column ${t.columnName} in descending order`,columnSize:t=>`${t.value} pixels`,resizerDescription:"Press Enter to start resizing"};var Pa={};Pa={ascending:"ascendente",ascendingSort:t=>`ordenado por columna ${t.columnName} en sentido ascendente`,columnSize:t=>`${t.value} píxeles`,descending:"descendente",descendingSort:t=>`ordenado por columna ${t.columnName} en orden descendente`,resizerDescription:"Pulse Intro para empezar a redimensionar",select:"Seleccionar",selectAll:"Seleccionar todos",sortable:"columna ordenable"};var Da={};Da={ascending:"tõusev järjestus",ascendingSort:t=>`sorditud veeru järgi ${t.columnName} tõusvas järjestuses`,columnSize:t=>`${t.value} pikslit`,descending:"laskuv järjestus",descendingSort:t=>`sorditud veeru järgi ${t.columnName} laskuvas järjestuses`,resizerDescription:"Suuruse muutmise alustamiseks vajutage klahvi Enter",select:"Vali",selectAll:"Vali kõik",sortable:"sorditav veerg"};var ka={};ka={ascending:"nouseva",ascendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan nousevassa järjestyksessä`,columnSize:t=>`${t.value} pikseliä`,descending:"laskeva",descendingSort:t=>`lajiteltu sarakkeen ${t.columnName} mukaan laskevassa järjestyksessä`,resizerDescription:"Aloita koon muutos painamalla Enter-näppäintä",select:"Valitse",selectAll:"Valitse kaikki",sortable:"lajiteltava sarake"};var Ta={};Ta={ascending:"croissant",ascendingSort:t=>`trié en fonction de la colonne ${t.columnName} par ordre croissant`,columnSize:t=>`${t.value} pixels`,descending:"décroissant",descendingSort:t=>`trié en fonction de la colonne ${t.columnName} par ordre décroissant`,resizerDescription:"Appuyez sur Entrée pour commencer le redimensionnement.",select:"Sélectionner",selectAll:"Sélectionner tout",sortable:"colonne triable"};var Aa={};Aa={ascending:"עולה",ascendingSort:t=>`מוין לפי עמודה ${t.columnName} בסדר עולה`,columnSize:t=>`${t.value} פיקסלים`,descending:"יורד",descendingSort:t=>`מוין לפי עמודה ${t.columnName} בסדר יורד`,resizerDescription:"הקש Enter כדי לשנות את הגודל",select:"בחר",selectAll:"בחר הכול",sortable:"עמודה שניתן למיין"};var Ra={};Ra={ascending:"rastući",ascendingSort:t=>`razvrstano po stupcima ${t.columnName} rastućem redoslijedom`,columnSize:t=>`${t.value} piksela`,descending:"padajući",descendingSort:t=>`razvrstano po stupcima ${t.columnName} padajućim redoslijedom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Odaberite",selectAll:"Odaberite sve",sortable:"stupac koji se može razvrstati"};var Ba={};Ba={ascending:"növekvő",ascendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, növekvő sorrendben`,columnSize:t=>`${t.value} képpont`,descending:"csökkenő",descendingSort:t=>`rendezve a(z) ${t.columnName} oszlop szerint, csökkenő sorrendben`,resizerDescription:"Nyomja le az Enter billentyűt az átméretezés megkezdéséhez",select:"Kijelölés",selectAll:"Összes kijelölése",sortable:"rendezendő oszlop"};var Ka={};Ka={ascending:"crescente",ascendingSort:t=>`in ordine crescente in base alla colonna ${t.columnName}`,columnSize:t=>`${t.value} pixel`,descending:"decrescente",descendingSort:t=>`in ordine decrescente in base alla colonna ${t.columnName}`,resizerDescription:"Premi Invio per iniziare a ridimensionare",select:"Seleziona",selectAll:"Seleziona tutto",sortable:"colonna ordinabile"};var Ma={};Ma={ascending:"昇順",ascendingSort:t=>`列 ${t.columnName} を昇順で並べ替え`,columnSize:t=>`${t.value} ピクセル`,descending:"降順",descendingSort:t=>`列 ${t.columnName} を降順で並べ替え`,resizerDescription:"Enter キーを押してサイズ変更を開始",select:"選択",selectAll:"すべて選択",sortable:"並べ替え可能な列"};var Na={};Na={ascending:"오름차순",ascendingSort:t=>`${t.columnName} 열을 기준으로 오름차순으로 정렬됨`,columnSize:t=>`${t.value} 픽셀`,descending:"내림차순",descendingSort:t=>`${t.columnName} 열을 기준으로 내림차순으로 정렬됨`,resizerDescription:"크기 조정을 시작하려면 Enter를 누르세요.",select:"선택",selectAll:"모두 선택",sortable:"정렬 가능한 열"};var Ia={};Ia={ascending:"didėjančia tvarka",ascendingSort:t=>`surikiuota pagal stulpelį ${t.columnName} didėjančia tvarka`,columnSize:t=>`${t.value} piks.`,descending:"mažėjančia tvarka",descendingSort:t=>`surikiuota pagal stulpelį ${t.columnName} mažėjančia tvarka`,resizerDescription:"Paspauskite „Enter“, kad pradėtumėte keisti dydį",select:"Pasirinkti",selectAll:"Pasirinkti viską",sortable:"rikiuojamas stulpelis"};var Fa={};Fa={ascending:"augošā secībā",ascendingSort:t=>`kārtots pēc kolonnas ${t.columnName} augošā secībā`,columnSize:t=>`${t.value} pikseļi`,descending:"dilstošā secībā",descendingSort:t=>`kārtots pēc kolonnas ${t.columnName} dilstošā secībā`,resizerDescription:"Nospiediet Enter, lai sāktu izmēru mainīšanu",select:"Atlasīt",selectAll:"Atlasīt visu",sortable:"kārtojamā kolonna"};var _a={};_a={ascending:"stigende",ascendingSort:t=>`sortert etter kolonne ${t.columnName} i stigende rekkefølge`,columnSize:t=>`${t.value} piksler`,descending:"synkende",descendingSort:t=>`sortert etter kolonne ${t.columnName} i synkende rekkefølge`,resizerDescription:"Trykk på Enter for å starte størrelsesendring",select:"Velg",selectAll:"Velg alle",sortable:"kolonne som kan sorteres"};var La={};La={ascending:"oplopend",ascendingSort:t=>`gesorteerd in oplopende volgorde in kolom ${t.columnName}`,columnSize:t=>`${t.value} pixels`,descending:"aflopend",descendingSort:t=>`gesorteerd in aflopende volgorde in kolom ${t.columnName}`,resizerDescription:"Druk op Enter om het formaat te wijzigen",select:"Selecteren",selectAll:"Alles selecteren",sortable:"sorteerbare kolom"};var Oa={};Oa={ascending:"rosnąco",ascendingSort:t=>`posortowano według kolumny ${t.columnName} w porządku rosnącym`,columnSize:t=>`Liczba pikseli: ${t.value}`,descending:"malejąco",descendingSort:t=>`posortowano według kolumny ${t.columnName} w porządku malejącym`,resizerDescription:"Naciśnij Enter, aby rozpocząć zmienianie rozmiaru",select:"Zaznacz",selectAll:"Zaznacz wszystko",sortable:"kolumna z możliwością sortowania"};var ja={};ja={ascending:"crescente",ascendingSort:t=>`classificado pela coluna ${t.columnName} em ordem crescente`,columnSize:t=>`${t.value} pixels`,descending:"decrescente",descendingSort:t=>`classificado pela coluna ${t.columnName} em ordem decrescente`,resizerDescription:"Pressione Enter para começar a redimensionar",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"coluna classificável"};var za={};za={ascending:"ascendente",ascendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem ascendente`,columnSize:t=>`${t.value} pixels`,descending:"descendente",descendingSort:t=>`Ordenar por coluna ${t.columnName} em ordem descendente`,resizerDescription:"Prima Enter para iniciar o redimensionamento",select:"Selecionar",selectAll:"Selecionar tudo",sortable:"Coluna ordenável"};var Va={};Va={ascending:"crescătoare",ascendingSort:t=>`sortate după coloana ${t.columnName} în ordine crescătoare`,columnSize:t=>`${t.value} pixeli`,descending:"descrescătoare",descendingSort:t=>`sortate după coloana ${t.columnName} în ordine descrescătoare`,resizerDescription:"Apăsați pe Enter pentru a începe redimensionarea",select:"Selectare",selectAll:"Selectare totală",sortable:"coloană sortabilă"};var Ha={};Ha={ascending:"возрастание",ascendingSort:t=>`сортировать столбец ${t.columnName} в порядке возрастания`,columnSize:t=>`${t.value} пикс.`,descending:"убывание",descendingSort:t=>`сортировать столбец ${t.columnName} в порядке убывания`,resizerDescription:"Нажмите клавишу Enter для начала изменения размеров",select:"Выбрать",selectAll:"Выбрать все",sortable:"сортируемый столбец"};var Wa={};Wa={ascending:"vzostupne",ascendingSort:t=>`zoradené zostupne podľa stĺpca ${t.columnName}`,columnSize:t=>`Počet pixelov: ${t.value}`,descending:"zostupne",descendingSort:t=>`zoradené zostupne podľa stĺpca ${t.columnName}`,resizerDescription:"Stlačením klávesu Enter začnete zmenu veľkosti",select:"Vybrať",selectAll:"Vybrať všetko",sortable:"zoraditeľný stĺpec"};var Ua={};Ua={ascending:"naraščajoče",ascendingSort:t=>`razvrščeno po stolpcu ${t.columnName} v naraščajočem vrstnem redu`,columnSize:t=>`${t.value} slikovnih pik`,descending:"padajoče",descendingSort:t=>`razvrščeno po stolpcu ${t.columnName} v padajočem vrstnem redu`,resizerDescription:"Pritisnite tipko Enter da začnete spreminjati velikost",select:"Izberite",selectAll:"Izberite vse",sortable:"razvrstljivi stolpec"};var Ga={};Ga={ascending:"rastući",ascendingSort:t=>`sortirano po kolonama ${t.columnName} rastućim redosledom`,columnSize:t=>`${t.value} piksela`,descending:"padajući",descendingSort:t=>`sortirano po kolonama ${t.columnName} padajućim redosledom`,resizerDescription:"Pritisnite Enter da biste započeli promenu veličine",select:"Izaberite",selectAll:"Izaberite sve",sortable:"kolona koja se može sortirati"};var Ya={};Ya={ascending:"stigande",ascendingSort:t=>`sorterat på kolumn ${t.columnName} i stigande ordning`,columnSize:t=>`${t.value} pixlar`,descending:"fallande",descendingSort:t=>`sorterat på kolumn ${t.columnName} i fallande ordning`,resizerDescription:"Tryck på Retur för att börja ändra storlek",select:"Markera",selectAll:"Markera allt",sortable:"sorterbar kolumn"};var qa={};qa={ascending:"artan sırada",ascendingSort:t=>`${t.columnName} sütuna göre artan düzende sırala`,columnSize:t=>`${t.value} piksel`,descending:"azalan sırada",descendingSort:t=>`${t.columnName} sütuna göre azalan düzende sırala`,resizerDescription:"Yeniden boyutlandırmak için Enter'a basın",select:"Seç",selectAll:"Tümünü Seç",sortable:"Sıralanabilir sütun"};var Xa={};Xa={ascending:"висхідний",ascendingSort:t=>`відсортовано за стовпцем ${t.columnName} у висхідному порядку`,columnSize:t=>`${t.value} пікс.`,descending:"низхідний",descendingSort:t=>`відсортовано за стовпцем ${t.columnName} у низхідному порядку`,resizerDescription:"Натисніть Enter, щоб почати зміну розміру",select:"Вибрати",selectAll:"Вибрати все",sortable:"сортувальний стовпець"};var Za={};Za={ascending:"升序",ascendingSort:t=>`按列 ${t.columnName} 升序排序`,columnSize:t=>`${t.value} 像素`,descending:"降序",descendingSort:t=>`按列 ${t.columnName} 降序排序`,resizerDescription:"按“输入”键开始调整大小。",select:"选择",selectAll:"全选",sortable:"可排序的列"};var Ja={};Ja={ascending:"遞增",ascendingSort:t=>`已依據「${t.columnName}」欄遞增排序`,columnSize:t=>`${t.value} 像素`,descending:"遞減",descendingSort:t=>`已依據「${t.columnName}」欄遞減排序`,resizerDescription:"按 Enter 鍵以開始調整大小",select:"選取",selectAll:"全選",sortable:"可排序的欄"};var ul={};ul={"ar-AE":ya,"bg-BG":$a,"cs-CZ":xa,"da-DK":Ea,"de-DE":Ca,"el-GR":Sa,"en-US":wa,"es-ES":Pa,"et-EE":Da,"fi-FI":ka,"fr-FR":Ta,"he-IL":Aa,"hr-HR":Ra,"hu-HU":Ba,"it-IT":Ka,"ja-JP":Ma,"ko-KR":Na,"lt-LT":Ia,"lv-LV":Fa,"nb-NO":_a,"nl-NL":La,"pl-PL":Oa,"pt-BR":ja,"pt-PT":za,"ro-RO":Va,"ru-RU":Ha,"sk-SK":Wa,"sl-SI":Ua,"sr-SP":Ga,"sv-SE":Ya,"tr-TR":qa,"uk-UA":Xa,"zh-CN":Za,"zh-TW":Ja};class av extends Qu{isCell(e){return e.type==="cell"||e.type==="rowheader"||e.type==="column"}getKeyBelow(e){let n=this.collection.getItem(e);if(!n)return null;if(n.type==="column"){let r=Ue(fe(n,this.collection));if(r)return r.key;let l=this.getFirstKey();return l==null||!this.collection.getItem(l)?null:super.getKeyForItemInRowByIndex(l,n.index)}return super.getKeyBelow(e)}getKeyAbove(e){let n=this.collection.getItem(e);if(!n)return null;if(n.type==="column"){let o=n.parentKey!=null?this.collection.getItem(n.parentKey):null;return o&&o.type==="column"?o.key:null}let r=super.getKeyAbove(e),l=r!=null?this.collection.getItem(r):null;return l&&l.type!=="headerrow"?r:this.isCell(n)?this.collection.columns[n.index].key:this.collection.columns[0].key}findNextColumnKey(e){let n=this.findNextKey(e.key,l=>l.type==="column");if(n!=null)return n;let r=this.collection.headerRows[e.level];for(let l of fe(r,this.collection))if(l.type==="column")return l.key;return null}findPreviousColumnKey(e){let n=this.findPreviousKey(e.key,o=>o.type==="column");if(n!=null)return n;let r=this.collection.headerRows[e.level],l=[...fe(r,this.collection)];for(let o=l.length-1;o>=0;o--){let i=l[o];if(i.type==="column")return i.key}return null}getKeyRightOf(e){let n=this.collection.getItem(e);return n?n.type==="column"?this.direction==="rtl"?this.findPreviousColumnKey(n):this.findNextColumnKey(n):super.getKeyRightOf(e):null}getKeyLeftOf(e){let n=this.collection.getItem(e);return n?n.type==="column"?this.direction==="rtl"?this.findNextColumnKey(n):this.findPreviousColumnKey(n):super.getKeyLeftOf(e):null}getKeyForSearch(e,n){if(!this.collator)return null;let r=this.collection,l=n??this.getFirstKey();if(l==null)return null;let o=r.getItem(l);var i;(o==null?void 0:o.type)==="cell"&&(l=(i=o.parentKey)!==null&&i!==void 0?i:null);let u=!1;for(;l!=null;){let s=r.getItem(l);if(!s)return null;if(s.textValue){let c=s.textValue.slice(0,e.length);if(this.collator.compare(c,e)===0)return s.key}for(let c of fe(s,this.collection)){let f=r.columns[c.index];if(r.rowHeaderColumnKeys.has(f.key)&&c.textValue){let d=c.textValue.slice(0,e.length);if(this.collator.compare(d,e)===0){let p=n!=null?r.getItem(n):o;return(p==null?void 0:p.type)==="cell"?c.key:s.key}}}l=this.getKeyBelow(l),l==null&&!u&&(l=this.getFirstKey(),u=!0)}return null}}function cv(t){return t&&t.__esModule?t.default:t}function dv(t,e,n){let{keyboardDelegate:r,isVirtualized:l,layoutDelegate:o,layout:i}=t,u=Hn({usage:"search",sensitivity:"base"}),{direction:s}=Me(),c=e.selectionManager.disabledBehavior,f=a.useMemo(()=>r||new av({collection:e.collection,disabledKeys:e.disabledKeys,disabledBehavior:c,ref:n,direction:s,collator:u,layoutDelegate:o,layout:i}),[r,e.collection,e.disabledKeys,c,n,s,u,o,i]),d=ce(t.id);il.set(e,d);let{gridProps:p}=Gp({...t,id:d,keyboardDelegate:f},e,n);l&&(p["aria-rowcount"]=e.collection.size+e.collection.headerRows.length),xn()&&"expandedKeys"in e&&(p.role="treegrid");let{column:v,direction:h}=e.sortDescriptor||{},g=ht(cv(ul),"@react-aria/table"),E=a.useMemo(()=>{var C,w;let T=(w=(C=e.collection.columns.find(S=>S.key===v))===null||C===void 0?void 0:C.textValue)!==null&&w!==void 0?w:"";return h&&v?g.format(`${h}Sort`,{columnName:T}):void 0},[h,v,e.collection.columns]),x=On(E);return Lo(()=>{E&&Tn(E,"assertive",500)},[E]),{gridProps:V(p,x,{"aria-describedby":[x["aria-describedby"],p["aria-describedby"]].filter(Boolean).join(" ")})}}function fv(t){return t&&t.__esModule?t.default:t}function pv(t,e,n){var r,l;let{node:o}=t,i=o.props.allowsSorting,{gridCellProps:u}=Ms({...t,focusMode:"child"},e,n),s=o.props.isSelectionCell&&e.selectionManager.selectionMode==="single",{pressProps:c}=je({isDisabled:!i||s,onPress(){e.sort(o.key)},ref:n}),{focusableProps:f}=Bt({},n),d,p=((r=e.sortDescriptor)===null||r===void 0?void 0:r.column)===o.key,v=(l=e.sortDescriptor)===null||l===void 0?void 0:l.direction;o.props.allowsSorting&&!Xt()&&(d=p?v:"none");let h=ht(fv(ul),"@react-aria/table"),g;i&&(g=`${h.format("sortable")}`,p&&v&&Xt()&&(g=`${g}, ${h.format(v)}`));let E=On(g),x=e.collection.size===0;return a.useEffect(()=>{x&&e.selectionManager.focusedKey===o.key&&e.selectionManager.setFocusedKey(null)},[x,e.selectionManager,o.key]),{columnHeaderProps:{...V(f,u,c,E,x?{tabIndex:-1}:null),role:"columnheader",id:uv(e,o.key),"aria-colspan":o.colSpan&&o.colSpan>1?o.colSpan:void 0,"aria-sort":d}}}const mo={expand:{ltr:"ArrowRight",rtl:"ArrowLeft"},collapse:{ltr:"ArrowLeft",rtl:"ArrowRight"}};function vv(t,e,n){let{node:r,isVirtualized:l}=t,{rowProps:o,...i}=qp(t,e,n),{direction:u}=Me();l&&!(xn()&&"expandedKeys"in e)?o["aria-rowindex"]=r.index+1+e.collection.headerRows.length:delete o["aria-rowindex"];let s={};if(xn()&&"expandedKeys"in e){let S=e.keyMap.get(r.key);if(S!=null){var c,f,d,p,v,h;let P=((c=S.props)===null||c===void 0?void 0:c.UNSTABLE_childItems)||((d=S.props)===null||d===void 0||(f=d.children)===null||f===void 0?void 0:f.length)>e.userColumnCount;var g,E,x,C;s={onKeyDown:I=>{(I.key===mo.expand[u]&&e.selectionManager.focusedKey===S.key&&P&&e.expandedKeys!=="all"&&!e.expandedKeys.has(S.key)||I.key===mo.collapse[u]&&e.selectionManager.focusedKey===S.key&&P&&(e.expandedKeys==="all"||e.expandedKeys.has(S.key)))&&(e.toggleKey(S.key),I.stopPropagation())},"aria-expanded":P?e.expandedKeys==="all"||e.expandedKeys.has(r.key):void 0,"aria-level":S.level,"aria-posinset":((g=S.indexOfType)!==null&&g!==void 0?g:0)+1,"aria-setsize":S.level>1?((x=(p=nt((E=(v=e.keyMap.get(S.parentKey))===null||v===void 0?void 0:v.childNodes)!==null&&E!==void 0?E:[]))===null||p===void 0?void 0:p.indexOfType)!==null&&x!==void 0?x:0)+1:((C=(h=nt(e.collection.body.childNodes))===null||h===void 0?void 0:h.indexOfType)!==null&&C!==void 0?C:0)+1}}}let w=Od(r.props),T=i.hasAction?w:{};return{rowProps:{...V(o,s,T),"aria-labelledby":sv(e,r.key)},...i}}function hv(t,e,n){let{node:r,isVirtualized:l}=t,o={role:"row"};return l&&!(xn()&&"expandedKeys"in e)&&(o["aria-rowindex"]=r.index+1),{rowProps:o}}function bv(t,e,n){var r;let{gridCellProps:l,isPressed:o}=Ms(t,e,n),i=(r=t.node.column)===null||r===void 0?void 0:r.key;return i!=null&&e.collection.rowHeaderColumnKeys.has(i)&&(l.role="rowheader",l.id=ga(e,t.node.parentKey,i)),{gridCellProps:l,isPressed:o}}function mv(){return Yp()}function gv(t,e){let n=pe(t,{labelable:!0}),{hoverProps:r}=Kt({onHoverStart:()=>e==null?void 0:e.open(!0),onHoverEnd:()=>e==null?void 0:e.close()});return{tooltipProps:V(n,r,{role:"tooltip"})}}function yv(t,e,n){let{isDisabled:r,trigger:l}=t,o=ce(),i=a.useRef(!1),u=a.useRef(!1),s=()=>{(i.current||u.current)&&e.open(u.current)},c=x=>{!i.current&&!u.current&&e.close(x)};a.useEffect(()=>{let x=C=>{n&&n.current&&C.key==="Escape"&&(C.stopPropagation(),e.close(!0))};if(e.isOpen)return document.addEventListener("keydown",x,!0),()=>{document.removeEventListener("keydown",x,!0)}},[n,e]);let f=()=>{l!=="focus"&&(en()==="pointer"?i.current=!0:i.current=!1,s())},d=()=>{l!=="focus"&&(u.current=!1,i.current=!1,c())},p=()=>{u.current=!1,i.current=!1,c(!0)},v=()=>{ot()&&(u.current=!0,s())},h=()=>{u.current=!1,i.current=!1,c(!0)},{hoverProps:g}=Kt({isDisabled:r,onHoverStart:f,onHoverEnd:d}),{focusableProps:E}=Bt({isDisabled:r,onFocus:v,onBlur:h},n);return{triggerProps:{"aria-describedby":e.isOpen?o:void 0,...V(E,g,{onPointerDown:p,onKeyDown:p,tabIndex:void 0})},tooltipProps:{id:o}}}class go{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}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.firstKey=null,this.lastKey=null,this.iterable=e;let n=i=>{if(this.keyMap.set(i.key,i),i.childNodes&&i.type==="section")for(let u of i.childNodes)n(u)};for(let i of e)n(i);let r=null,l=0;for(let[i,u]of this.keyMap)r?(r.nextKey=i,u.prevKey=r.key):(this.firstKey=i,u.prevKey=void 0),u.type==="item"&&(u.index=l++),r=u,r.nextKey=void 0;var o;this.lastKey=(o=r==null?void 0:r.key)!==null&&o!==void 0?o:null}}class Ke extends Set{constructor(e,n,r){super(e),e instanceof Ke?(this.anchorKey=n??e.anchorKey,this.currentKey=r??e.currentKey):(this.anchorKey=n??null,this.currentKey=r??null)}}function $v(t,e){if(t.size!==e.size)return!1;for(let n of t)if(!e.has(n))return!1;return!0}function Gn(t){let{selectionMode:e="none",disallowEmptySelection:n=!1,allowDuplicateSelectionEvents:r,selectionBehavior:l="toggle",disabledBehavior:o="all"}=t,i=a.useRef(!1),[,u]=a.useState(!1),s=a.useRef(null),c=a.useRef(null),[,f]=a.useState(null),d=a.useMemo(()=>yo(t.selectedKeys),[t.selectedKeys]),p=a.useMemo(()=>yo(t.defaultSelectedKeys,new Ke),[t.defaultSelectedKeys]),[v,h]=it(d,p,t.onSelectionChange),g=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),[E,x]=a.useState(l);l==="replace"&&E==="toggle"&&typeof v=="object"&&v.size===0&&x("replace");let C=a.useRef(l);return a.useEffect(()=>{l!==C.current&&(x(l),C.current=l)},[l]),{selectionMode:e,disallowEmptySelection:n,selectionBehavior:E,setSelectionBehavior:x,get isFocused(){return i.current},setFocused(w){i.current=w,u(w)},get focusedKey(){return s.current},get childFocusStrategy(){return c.current},setFocusedKey(w,T="first"){s.current=w,c.current=T,f(w)},selectedKeys:v,setSelectedKeys(w){(r||!$v(w,v))&&h(w)},disabledKeys:g,disabledBehavior:o}}function yo(t,e){return t?t==="all"?"all":new Ke(t):e}class Mt{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){if(this.state.selectionMode==="none")return!1;let n=this.getKey(e);return n==null?!1:this.state.selectedKeys==="all"?this.canSelectItem(n):this.state.selectedKeys.has(n)}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 r of this.state.selectedKeys){let l=this.collection.getItem(r);(!e||l&&br(this.collection,l,e)<0)&&(e=l)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get lastSelectedKey(){let e=null;for(let r of this.state.selectedKeys){let l=this.collection.getItem(r);(!e||l&&br(this.collection,l,e)>0)&&(e=l)}var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}get disabledKeys(){return this.state.disabledKeys}get disabledBehavior(){return this.state.disabledBehavior}extendSelection(e){if(this.selectionMode==="none")return;if(this.selectionMode==="single"){this.replaceSelection(e);return}let n=this.getKey(e);if(n==null)return;let r;if(this.state.selectedKeys==="all")r=new Ke([n],n,n);else{let i=this.state.selectedKeys;var l;let u=(l=i.anchorKey)!==null&&l!==void 0?l:n;r=new Ke(i,u,n);var o;for(let s of this.getKeyRange(u,(o=i.currentKey)!==null&&o!==void 0?o:n))r.delete(s);for(let s of this.getKeyRange(n,u))this.canSelectItem(s)&&r.add(s)}this.state.setSelectedKeys(r)}getKeyRange(e,n){let r=this.collection.getItem(e),l=this.collection.getItem(n);return r&&l?br(this.collection,r,l)<=0?this.getKeyRangeInternal(e,n):this.getKeyRangeInternal(n,e):[]}getKeyRangeInternal(e,n){var r;if(!((r=this.layoutDelegate)===null||r===void 0)&&r.getKeyRange)return this.layoutDelegate.getKeyRange(e,n);let l=[],o=e;for(;o!=null;){let i=this.collection.getItem(o);if(i&&(i.type==="item"||i.type==="cell"&&this.allowsCellSelection)&&l.push(o),o===n)return l;o=this.collection.getKeyAfter(o)}return[]}getKey(e){let n=this.collection.getItem(e);if(!n||n.type==="cell"&&this.allowsCellSelection)return e;for(;n&&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}let n=this.getKey(e);if(n==null)return;let r=new Ke(this.state.selectedKeys==="all"?this.getSelectAllKeys():this.state.selectedKeys);r.has(n)?r.delete(n):this.canSelectItem(n)&&(r.add(n),r.anchorKey=n,r.currentKey=n),!(this.disallowEmptySelection&&r.size===0)&&this.state.setSelectedKeys(r)}replaceSelection(e){if(this.selectionMode==="none")return;let n=this.getKey(e);if(n==null)return;let r=this.canSelectItem(n)?new Ke([n],n,n):new Ke;this.state.setSelectedKeys(r)}setSelectedKeys(e){if(this.selectionMode==="none")return;let n=new Ke;for(let r of e){let l=this.getKey(r);if(l!=null&&(n.add(l),this.selectionMode==="single"))break}this.state.setSelectedKeys(n)}getSelectAllKeys(){let e=[],n=r=>{for(;r!=null;){if(this.canSelectItem(r)){var l;let i=this.collection.getItem(r);(i==null?void 0:i.type)==="item"&&e.push(r);var o;i!=null&&i.hasChildNodes&&(this.allowsCellSelection||i.type!=="item")&&n((o=(l=Ue(fe(i,this.collection)))===null||l===void 0?void 0:l.key)!==null&&o!==void 0?o:null)}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 Ke)}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){var n;if(this.state.selectionMode==="none"||this.state.disabledKeys.has(e))return!1;let r=this.collection.getItem(e);return!(!r||!(r==null||(n=r.props)===null||n===void 0)&&n.isDisabled||r.type==="cell"&&!this.allowsCellSelection)}isDisabled(e){var n,r;return this.state.disabledBehavior==="all"&&(this.state.disabledKeys.has(e)||!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.isDisabled))}isLink(e){var n,r;return!!(!((r=this.collection.getItem(e))===null||r===void 0||(n=r.props)===null||n===void 0)&&n.href)}getItemProps(e){var n;return(n=this.collection.getItem(e))===null||n===void 0?void 0:n.props}withCollection(e){return new Mt(e,this.state,{allowsCellSelection:this.allowsCellSelection,layoutDelegate:this.layoutDelegate||void 0})}constructor(e,n,r){this.collection=e,this.state=n;var l;this.allowsCellSelection=(l=r==null?void 0:r.allowsCellSelection)!==null&&l!==void 0?l:!1,this._isSelectAll=null,this.layoutDelegate=(r==null?void 0:r.layoutDelegate)||null}}function xv(t){let{filter:e,layoutDelegate:n}=t,r=Gn(t),l=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=a.useCallback(c=>e?new go(e(c)):new go(c),[e]),i=a.useMemo(()=>({suppressTextValueWarning:t.suppressTextValueWarning}),[t.suppressTextValueWarning]),u=nl(t,o,i),s=a.useMemo(()=>new Mt(u,r,{layoutDelegate:n}),[u,r,n]);return Ev(u,s),{collection:u,disabledKeys:l,selectionManager:s}}function Ev(t,e){const n=a.useRef(null);a.useEffect(()=>{if(e.focusedKey!=null&&!t.getItem(e.focusedKey)&&n.current){const f=n.current.getItem(e.focusedKey),d=[...n.current.getKeys()].map(x=>{const C=n.current.getItem(x);return(C==null?void 0:C.type)==="item"?C:null}).filter(x=>x!==null),p=[...t.getKeys()].map(x=>{const C=t.getItem(x);return(C==null?void 0:C.type)==="item"?C:null}).filter(x=>x!==null);var r,l;const v=((r=d==null?void 0:d.length)!==null&&r!==void 0?r:0)-((l=p==null?void 0:p.length)!==null&&l!==void 0?l:0);var o,i,u;let h=Math.min(v>1?Math.max(((o=f==null?void 0:f.index)!==null&&o!==void 0?o:0)-v+1,0):(i=f==null?void 0:f.index)!==null&&i!==void 0?i:0,((u=p==null?void 0:p.length)!==null&&u!==void 0?u:0)-1),g=null,E=!1;for(;h>=0;){if(!e.isDisabled(p[h].key)){g=p[h];break}if(h<p.length-1&&!E)h++;else{E=!0;var s,c;h>((s=f==null?void 0:f.index)!==null&&s!==void 0?s:0)&&(h=(c=f==null?void 0:f.index)!==null&&c!==void 0?c:0),h--}}e.setFocusedKey(g?g.key:null)}n.current=t},[t,e])}function Cv(t){var e;let[n,r]=it(t.selectedKey,(e=t.defaultSelectedKey)!==null&&e!==void 0?e:null,t.onSelectionChange),l=a.useMemo(()=>n!=null?[n]:[],[n]),{collection:o,disabledKeys:i,selectionManager:u}=xv({...t,selectionMode:"single",disallowEmptySelection:!0,allowDuplicateSelectionEvents:!0,selectedKeys:l,onSelectionChange:c=>{if(c==="all")return;var f;let d=(f=c.values().next().value)!==null&&f!==void 0?f:null;d===n&&t.onSelectionChange&&t.onSelectionChange(d),r(d)}}),s=n!=null?o.getItem(n):null;return{collection:o,disabledKeys:i,selectionManager:u,selectedKey:n,setSelectedKey:r,selectedItem:s}}function Nt(t){let[e,n]=it(t.isOpen,t.defaultOpen||!1,t.onOpenChange);const r=a.useCallback(()=>{n(!0)},[n]),l=a.useCallback(()=>{n(!1)},[n]),o=a.useCallback(()=>{n(!e)},[n,e]);return{isOpen:e,setOpen:n,open:r,close:l,toggle:o}}function sl(t){let e=Nt(t),[n,r]=a.useState(null),[l,o]=a.useState([]),i=()=>{o([]),e.close()};return{focusStrategy:n,...e,open(c=null){r(c),e.open()},toggle(c=null){r(c),e.toggle()},close(){i()},expandedKeysStack:l,openSubmenu:(c,f)=>{o(d=>f>d.length?d:[...d.slice(0,f),c])},closeSubmenu:(c,f)=>{o(d=>d[f]===c?d.slice(0,f):d)}}}function Sv(t,e){let{triggerKey:n}=t,{expandedKeysStack:r,openSubmenu:l,closeSubmenu:o,close:i}=e,[u]=a.useState(r==null?void 0:r.length),s=a.useMemo(()=>r[u]===n,[r,n,u]),[c,f]=a.useState(null),d=a.useCallback(h=>{f(h??null),l(n,u)},[l,u,n]),p=a.useCallback(()=>{f(null),o(n,u)},[o,u,n]),v=a.useCallback(h=>{f(h??null),s?p():d(h)},[p,d,s]);return a.useMemo(()=>({focusStrategy:c,isOpen:s,open:d,close:p,closeAll:i,submenuLevel:u,setOpen:()=>{},toggle:v}),[s,d,p,i,c,v,u])}let wv=Math.round(Math.random()*1e10),Pv=0;function Dv(t){let e=a.useMemo(()=>t.name||`radio-group-${wv}-${++Pv}`,[t.name]);var n;let[r,l]=it(t.value,(n=t.defaultValue)!==null&&n!==void 0?n:null,t.onChange),[o,i]=a.useState(null),u=Xr({...t,value:r}),s=f=>{!t.isReadOnly&&!t.isDisabled&&(l(f),u.commitValidation())},c=u.displayValidation.isInvalid;return{...u,name:e,selectedValue:r,setSelectedValue:s,lastFocusedValue:o,setLastFocusedValue:i,isDisabled:t.isDisabled||!1,isReadOnly:t.isReadOnly||!1,isRequired:t.isRequired||!1,validationState:t.validationState||(c?"invalid":null),isInvalid:c}}function kv(t){let[e,n]=it($o(t.value),$o(t.defaultValue)||"",t.onChange);return{value:e,setValue:n}}function $o(t){if(t!=null)return t.toString()}function Tv(t){let e=Nt(t),[n,r]=a.useState(null),l=Cv({...t,onSelectionChange:s=>{t.onSelectionChange!=null&&t.onSelectionChange(s),e.close(),o.commitValidation()}}),o=Xr({...t,value:l.selectedKey}),[i,u]=a.useState(!1);return{...o,...l,...e,focusStrategy:n,open(s=null){l.collection.size!==0&&(r(s),e.open())},toggle(s=null){l.collection.size!==0&&(r(s),e.toggle())},isFocused:i,setFocused:u}}function Av(t){let{collection:e,focusMode:n}=t,r=t.UNSAFE_selectionState||Gn(t),l=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),o=r.setFocusedKey;r.setFocusedKey=(s,c)=>{if(n==="cell"&&s!=null){let h=e.getItem(s);if((h==null?void 0:h.type)==="item"){var f,d;let g=fe(h,e);var p,v;c==="last"?s=(p=(f=nt(g))===null||f===void 0?void 0:f.key)!==null&&p!==void 0?p:null:s=(v=(d=Ue(g))===null||d===void 0?void 0:d.key)!==null&&v!==void 0?v:null}}o(s,c)};let i=a.useMemo(()=>new Mt(e,r),[e,r]);const u=a.useRef(null);return a.useEffect(()=>{if(r.focusedKey!=null&&u.current&&!e.getItem(r.focusedKey)){const s=u.current.getItem(r.focusedKey),c=(s==null?void 0:s.parentKey)!=null&&(s.type==="cell"||s.type==="rowheader"||s.type==="column")?u.current.getItem(s.parentKey):s;if(!c){r.setFocusedKey(null);return}const f=u.current.rows,d=e.rows,p=f.length-d.length;let v=Math.min(p>1?Math.max(c.index-p+1,0):c.index,d.length-1),h=null;for(;v>=0;){if(!i.isDisabled(d[v].key)&&d[v].type!=="headerrow"){h=d[v];break}v<d.length-1?v++:(v>c.index&&(v=c.index),v--)}if(h){const g=h.hasChildNodes?[...fe(h,e)]:[],E=h.hasChildNodes&&c!==s&&s&&s.index<g.length?g[s.index].key:h.key;r.setFocusedKey(E)}else r.setFocusedKey(null)}u.current=e},[e,i,r,r.focusedKey]),{collection:e,disabledKeys:l,isKeyboardNavigationDisabled:!1,selectionManager:i}}class Rv{*[Symbol.iterator](){yield*[...this.rows]}get size(){return[...this.rows].length}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){var e;return(e=[...this.rows][0])===null||e===void 0?void 0:e.key}getLastKey(){var e;let n=[...this.rows];return(e=n[n.length-1])===null||e===void 0?void 0:e.key}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}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.keyMap=new Map,this.columnCount=e==null?void 0:e.columnCount,this.rows=[];let n=d=>{let p=this.keyMap.get(d.key);e.visitNode&&(d=e.visitNode(d)),this.keyMap.set(d.key,d);let v=new Set,h=null,g=!1;if(d.type==="item"){var E;for(let S of d.childNodes)if(((E=S.props)===null||E===void 0?void 0:E.colSpan)!==void 0){g=!0;break}}for(let S of d.childNodes){if(S.type==="cell"&&g){var x,C;S.colspan=(x=S.props)===null||x===void 0?void 0:x.colSpan,S.colSpan=(C=S.props)===null||C===void 0?void 0:C.colSpan;var w,T;S.colIndex=h?((w=h.colIndex)!==null&&w!==void 0?w:h.index)+((T=h.colSpan)!==null&&T!==void 0?T:1):S.index}S.type==="cell"&&S.parentKey==null&&(S.parentKey=d.key),v.add(S.key),h?(h.nextKey=S.key,S.prevKey=h.key):S.prevKey=null,n(S),h=S}if(h&&(h.nextKey=null),p)for(let S of p.childNodes)v.has(S.key)||r(S)},r=d=>{this.keyMap.delete(d.key);for(let p of d.childNodes)this.keyMap.get(p.key)===p&&r(p)},l=null;for(let[d,p]of e.items.entries()){var o,i,u,s,c,f;let v={...p,level:(o=p.level)!==null&&o!==void 0?o:0,key:(i=p.key)!==null&&i!==void 0?i:"row-"+d,type:(u=p.type)!==null&&u!==void 0?u:"row",value:(s=p.value)!==null&&s!==void 0?s:null,hasChildNodes:!0,childNodes:[...p.childNodes],rendered:p.rendered,textValue:(c=p.textValue)!==null&&c!==void 0?c:"",index:(f=p.index)!==null&&f!==void 0?f:d};l?(l.nextKey=v.key,v.prevKey=l.key):v.prevKey=null,this.rows.push(v),n(v),l=v}l&&(l.nextKey=null)}}const Qa="row-header-column-"+Math.random().toString(36).slice(2);let Lr="row-header-column-"+Math.random().toString(36).slice(2);for(;Qa===Lr;)Lr="row-header-column-"+Math.random().toString(36).slice(2);function Bv(t,e){if(e.length===0)return[];let n=[],r=new Map;for(let f of e){let d=f.parentKey,p=[f];for(;d;){let v=t.get(d);if(!v)break;if(r.has(v)){var l,o;(o=(l=v).colSpan)!==null&&o!==void 0||(l.colSpan=0),v.colSpan++,v.colspan=v.colSpan;let{column:h,index:g}=r.get(v);if(g>p.length)break;for(let E=g;E<p.length;E++)h.splice(E,0,null);for(let E=p.length;E<h.length;E++)h[E]&&r.has(h[E])&&(r.get(h[E]).index=E)}else v.colSpan=1,v.colspan=1,p.push(v),r.set(v,{column:p,index:p.length-1});d=v.parentKey}n.push(p),f.index=n.length-1}let i=Math.max(...n.map(f=>f.length)),u=Array(i).fill(0).map(()=>[]),s=0;for(let f of n){let d=i-1;for(let p of f){if(p){let v=u[d],h=v.reduce((g,E)=>{var x;return g+((x=E.colSpan)!==null&&x!==void 0?x:1)},0);if(h<s){let g={type:"placeholder",key:"placeholder-"+p.key,colspan:s-h,colSpan:s-h,index:h,value:null,rendered:null,level:d,hasChildNodes:!1,childNodes:[],textValue:""};v.length>0&&(v[v.length-1].nextKey=g.key,g.prevKey=v[v.length-1].key),v.push(g)}v.length>0&&(v[v.length-1].nextKey=p.key,p.prevKey=v[v.length-1].key),p.level=d,p.colIndex=s,v.push(p)}d--}s++}let c=0;for(let f of u){let d=f.reduce((p,v)=>{var h;return p+((h=v.colSpan)!==null&&h!==void 0?h:1)},0);if(d<e.length){let p={type:"placeholder",key:"placeholder-"+f[f.length-1].key,colSpan:e.length-d,colspan:e.length-d,index:d,value:null,rendered:null,level:c,hasChildNodes:!1,childNodes:[],textValue:"",prevKey:f[f.length-1].key};f.push(p)}c++}return u.map((f,d)=>({type:"headerrow",key:"headerrow-"+d,index:d,value:null,rendered:null,level:0,hasChildNodes:!0,childNodes:f,textValue:""}))}class Kv extends Rv{*[Symbol.iterator](){yield*this.body.childNodes}get size(){return this._size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return(r=n==null?void 0:n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return(r=n==null?void 0:n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){var e,n;return(n=(e=Ue(this.body.childNodes))===null||e===void 0?void 0:e.key)!==null&&n!==void 0?n:null}getLastKey(){var e,n;return(n=(e=nt(this.body.childNodes))===null||e===void 0?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}getChildren(e){return e===this.body.key?this.body.childNodes:super.getChildren(e)}getTextValue(e){let n=this.getItem(e);if(!n)return"";if(n.textValue)return n.textValue;let r=this.rowHeaderColumnKeys;if(r){let l=[];for(let o of n.childNodes){let i=this.columns[o.index];if(r.has(i.key)&&o.textValue&&l.push(o.textValue),l.length===r.size)break}return l.join(" ")}return""}constructor(e,n,r){let l=new Set,o=null,i=[];if(r!=null&&r.showSelectionCheckboxes){let d={type:"column",key:Qa,value:null,textValue:"",level:0,index:r!=null&&r.showDragButtons?1:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isSelectionCell:!0}};i.unshift(d)}if(r!=null&&r.showDragButtons){let d={type:"column",key:Lr,value:null,textValue:"",level:0,index:0,hasChildNodes:!1,rendered:null,childNodes:[],props:{isDragButtonCell:!0}};i.unshift(d)}let u=[],s=new Map,c=d=>{switch(d.type){case"body":o=d;break;case"column":s.set(d.key,d),d.hasChildNodes||(i.push(d),d.props.isRowHeader&&l.add(d.key));break;case"item":u.push(d);return}for(let p of d.childNodes)c(p)};for(let d of e)c(d);let f=Bv(s,i);if(f.forEach((d,p)=>u.splice(p,0,d)),super({columnCount:i.length,items:u,visitNode:d=>(d.column=i[d.index],d)}),this._size=0,this.columns=i,this.rowHeaderColumnKeys=l,this.body=o,this.headerRows=f,this._size=[...o.childNodes].length,this.rowHeaderColumnKeys.size===0){let d=this.columns.find(p=>{var v,h;return!(!((v=p.props)===null||v===void 0)&&v.isDragButtonCell)&&!(!((h=p.props)===null||h===void 0)&&h.isSelectionCell)});d&&this.rowHeaderColumnKeys.add(d.key)}}}const Mv={ascending:"descending",descending:"ascending"};function Nv(t){let[e,n]=a.useState(!1),{selectionMode:r="none",showSelectionCheckboxes:l,showDragButtons:o}=t,i=a.useMemo(()=>({showSelectionCheckboxes:l&&r!=="none",showDragButtons:o,selectionMode:r,columns:[]}),[t.children,l,r,o]),u=nl(t,a.useCallback(d=>new Kv(d,null,i),[i]),i),{disabledKeys:s,selectionManager:c}=Av({...t,collection:u,disabledBehavior:t.disabledBehavior||"selection"});var f;return{collection:u,disabledKeys:s,selectionManager:c,showSelectionCheckboxes:t.showSelectionCheckboxes||!1,sortDescriptor:(f=t.sortDescriptor)!==null&&f!==void 0?f:null,isKeyboardNavigationDisabled:u.size===0||e,setKeyboardNavigationDisabled:n,sort(d,p){var v,h;(h=t.onSortChange)===null||h===void 0||h.call(t,{column:d,direction:p??(((v=t.sortDescriptor)===null||v===void 0?void 0:v.column)===d?Mv[t.sortDescriptor.direction]:"ascending")})}}}function ec(t){return null}ec.getCollectionNode=function*(e,n){let{children:r,columns:l}=e;if(n.columns=[],typeof r=="function"){if(!l)throw new Error("props.children was a function but props.columns is missing");for(let o of l)yield{type:"column",value:o,renderer:r}}else{let o=[];a.Children.forEach(r,i=>{o.push({type:"column",element:i})}),yield*o}};let Iv=ec;function tc(t){return null}tc.getCollectionNode=function*(e){let{children:n,items:r}=e;yield{type:"body",hasChildNodes:!0,props:e,*childNodes(){if(typeof n=="function"){if(!r)throw new Error("props.children was a function but props.items is missing");for(let l of r)yield{type:"item",value:l,renderer:n}}else{let l=[];a.Children.forEach(n,o=>{l.push({type:"item",element:o})}),yield*l}}}};let Fv=tc;function nc(t){return null}nc.getCollectionNode=function*(e,n){let{title:r,children:l,childColumns:o}=e,i=r||l,u=e.textValue||(typeof i=="string"?i:"")||e["aria-label"],s=yield{type:"column",hasChildNodes:!!o||!!r&&a.Children.count(l)>0,rendered:i,textValue:u,props:e,*childNodes(){if(o)for(let f of o)yield{type:"column",value:f};else if(r){let f=[];a.Children.forEach(l,d=>{f.push({type:"column",element:d})}),yield*f}},shouldInvalidate(f){return c(f),!1}},c=f=>{for(let d of s)d.hasChildNodes||f.columns.push(d)};c(n)};let _v=nc;function Or(t){return null}Or.getCollectionNode=function*(e,n){let{children:r,textValue:l,UNSTABLE_childItems:o}=e;yield{type:"item",props:e,textValue:l,"aria-label":e["aria-label"],hasChildNodes:!0,*childNodes(){if(n.showDragButtons&&(yield{type:"cell",key:"header-drag",props:{isDragButtonCell:!0}}),n.showSelectionCheckboxes&&n.selectionMode!=="none"&&(yield{type:"cell",key:"header",props:{isSelectionCell:!0}}),typeof r=="function"){for(let i of n.columns)yield{type:"cell",element:r(i.key),key:i.key};if(o)for(let i of o)yield{type:"item",value:i}}else{let i=[],u=[],s=0;if(a.Children.forEach(r,c=>{if(c.type===Or){if(i.length<n.columns.length)throw new Error("All of a Row's child Cells must be positioned before any child Rows.");u.push({type:"item",element:c})}else{i.push({type:"cell",element:c});var f;s+=(f=c.props.colSpan)!==null&&f!==void 0?f:1}}),s!==n.columns.length)throw new Error(`Cell count must match column count. Found ${s} cells and ${n.columns.length} columns.`);yield*i,yield*u}},shouldInvalidate(i){return i.columns.length!==n.columns.length||i.columns.some((u,s)=>u.key!==n.columns[s].key)||i.showSelectionCheckboxes!==n.showSelectionCheckboxes||i.showDragButtons!==n.showDragButtons||i.selectionMode!==n.selectionMode}}};let Lv=Or;function rc(t){return null}rc.getCollectionNode=function*(e){let{children:n}=e,r=e.textValue||(typeof n=="string"?n:"")||e["aria-label"]||"";yield{type:"cell",props:e,rendered:n,textValue:r,"aria-label":e["aria-label"],hasChildNodes:!1}};let Ov=rc;const jv=1500,xo=500;let at={},zv=0,Ht=!1,We=null,ct=null;function lc(t={}){let{delay:e=jv,closeDelay:n=xo}=t,{isOpen:r,open:l,close:o}=Nt(t),i=a.useMemo(()=>`${++zv}`,[]),u=a.useRef(null),s=a.useRef(o),c=()=>{at[i]=p},f=()=>{for(let h in at)h!==i&&(at[h](!0),delete at[h])},d=()=>{u.current&&clearTimeout(u.current),u.current=null,f(),c(),Ht=!0,l(),We&&(clearTimeout(We),We=null),ct&&(clearTimeout(ct),ct=null)},p=h=>{h||n<=0?(u.current&&clearTimeout(u.current),u.current=null,s.current()):u.current||(u.current=setTimeout(()=>{u.current=null,s.current()},n)),We&&(clearTimeout(We),We=null),Ht&&(ct&&clearTimeout(ct),ct=setTimeout(()=>{delete at[i],ct=null,Ht=!1},Math.max(xo,n)))},v=()=>{f(),c(),!r&&!We&&!Ht?We=setTimeout(()=>{We=null,Ht=!0,d()},e):r||d()};return a.useEffect(()=>{s.current=o},[o]),a.useEffect(()=>()=>{u.current&&clearTimeout(u.current),at[i]&&delete at[i]},[i]),{isOpen:r,open:h=>{!h&&e>0&&!u.current?v():d()},close:p}}class Vv{*[Symbol.iterator](){yield*this.iterable}get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}getKeyBefore(e){let n=this.keyMap.get(e);var r;return n&&(r=n.prevKey)!==null&&r!==void 0?r:null}getKeyAfter(e){let n=this.keyMap.get(e);var r;return n&&(r=n.nextKey)!==null&&r!==void 0?r:null}getFirstKey(){return this.firstKey}getLastKey(){return this.lastKey}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(e){const n=[...this.getKeys()];return this.getItem(n[e])}constructor(e,{expandedKeys:n}={}){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.iterable=e,n=n||new Set;let r=u=>{if(this.keyMap.set(u.key,u),u.childNodes&&(u.type==="section"||n.has(u.key)))for(let s of u.childNodes)r(s)};for(let u of e)r(u);let l=null,o=0;for(let[u,s]of this.keyMap)l?(l.nextKey=u,s.prevKey=l.key):(this.firstKey=u,s.prevKey=void 0),s.type==="item"&&(s.index=o++),l=s,l.nextKey=void 0;var i;this.lastKey=(i=l==null?void 0:l.key)!==null&&i!==void 0?i:null}}function oc(t){let{onExpandedChange:e}=t,[n,r]=it(t.expandedKeys?new Set(t.expandedKeys):void 0,t.defaultExpandedKeys?new Set(t.defaultExpandedKeys):new Set,e),l=Gn(t),o=a.useMemo(()=>t.disabledKeys?new Set(t.disabledKeys):new Set,[t.disabledKeys]),i=nl(t,a.useCallback(s=>new Vv(s,{expandedKeys:n}),[n]),null);return a.useEffect(()=>{l.focusedKey!=null&&!i.getItem(l.focusedKey)&&l.setFocusedKey(null)},[i,l.focusedKey]),{collection:i,expandedKeys:n,disabledKeys:o,toggleKey:s=>{r(Hv(n,s))},setExpandedKeys:r,selectionManager:new Mt(i,l)}}function Hv(t,e){let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n}const ic=a.createContext(void 0),Ce=()=>{const t=a.useContext(ic);if(t===void 0)throw new Error("useTheme must be used within a ThemeProvider");return t},Wv={[Te.THEMES.DARK]:"proton-ui__theme--dark",[Te.THEMES.CUSTOM_DARK]:"proton-ui__theme--custom-dark",[Te.THEMES.LIGHT]:"proton-ui__theme--light"},uc=({theme:t,children:e,palette:n=X.LIGHT_MODE})=>{const r=a.useRef(null),l=Wv[t],o=a.useMemo(()=>Gv(n,t),[n,t]);return a.useEffect(()=>{r.current&&(r.current.className=l,Object.entries(o).forEach(([i,u])=>{r.current.style.setProperty(i,u)}))},[t,l,n,o]),y.jsx(ic.Provider,{value:{theme:t,style:o,palette:n,className:l},children:y.jsx("div",{ref:r,children:e})})},Uv=(t,e)=>{const n=e===Te.THEMES.DARK||e===Te.THEMES.CUSTOM_DARK?{"--proton-color__gray-super-dark":X.DARK_GRAYSCALE.GRAY_SUPER_DARK,"--proton-color__gray-dark":X.DARK_GRAYSCALE.GRAY_DARK,"--proton-color__gray-medium":X.DARK_GRAYSCALE.GRAY_MEDIUM,"--proton-color__gray-medium-light":X.DARK_GRAYSCALE.GRAY_MEDIUM_LIGHT,"--proton-color__gray-light":X.DARK_GRAYSCALE.GRAY_LIGHT,"--proton-color__gray-lightest":X.DARK_GRAYSCALE.GRAY_LIGHTEST,"--proton-color__gray-super-light":X.DARK_GRAYSCALE.GRAY_SUPER_LIGHT}:{"--proton-color__gray-super-dark":X.GRAYSCALE.GRAY_SUPER_DARK,"--proton-color__gray-dark":X.GRAYSCALE.GRAY_DARK,"--proton-color__gray-medium":X.GRAYSCALE.GRAY_MEDIUM,"--proton-color__gray-medium-light":X.GRAYSCALE.GRAY_MEDIUM_LIGHT,"--proton-color__gray-light":X.GRAYSCALE.GRAY_LIGHT,"--proton-color__gray-lightest":X.GRAYSCALE.GRAY_LIGHTEST,"--proton-color__gray-super-light":X.GRAYSCALE.GRAY_SUPER_LIGHT};return{"--proton-color__primary":t.BRAND.PRIMARY,"--proton-color__primary-light":t.BRAND.PRIMARY_LIGHT,"--proton-color__secondary":t.BRAND.SECONDARY,"--proton-control__primary-super-dark":t.PRIMARY.PRIMARY_SUPER_DARK,"--proton-control__primary-dark":t.PRIMARY.PRIMARY_DARK,"--proton-control__primary-medium":t.PRIMARY.PRIMARY_MEDIUM,"--proton-control__primary-medium-light":t.PRIMARY.PRIMARY_MEDIUM_LIGHT,"--proton-control__primary-light":t.PRIMARY.PRIMARY_LIGHT,"--proton-control__primary-lightest":t.PRIMARY.PRIMARY_LIGHTEST,"--proton-control__primary-super-light":t.PRIMARY.PRIMARY_SUPER_LIGHT,"--proton-control__secondary-super-dark":t.SECONDARY.SECONDARY_SUPER_DARK,"--proton-control__secondary-dark":t.SECONDARY.SECONDARY_DARK,"--proton-control__secondary-medium":t.SECONDARY.SECONDARY_MEDIUM,"--proton-control__secondary-medium-light":t.SECONDARY.SECONDARY_MEDIUM_LIGHT,"--proton-control__secondary-light":t.SECONDARY.SECONDARY_LIGHT,"--proton-control__secondary-lightest":t.SECONDARY.SECONDARY_LIGHTEST,"--proton-control__secondary-super-light":t.SECONDARY.SECONDARY_SUPER_LIGHT,...n}};function Gv(t,e){const n=Uv(t,e);switch(e){case Te.THEMES.DARK:return{"--proton-control__background-color":X.DARK_GRAYSCALE.GRAY_DARK,"--proton-control__background-color-light":X.DARK_GRAYSCALE.ELEVATION,"--proton-control__text-color":X.DARK_GRAYSCALE.WHITE,"--proton-control__border-color":X.DARK_GRAYSCALE.GRAY_LIGHT,"--proton-control__shadow-color":Be.transparentize(X.DARK_GRAYSCALE.GRAY_LIGHTEST,.5),...n};case Te.THEMES.LIGHT:return{"--proton-control__background-color":X.DEFAULT_WHITE_BACKGROUND,"--proton-control__background-color-light":X.GRAYSCALE.ELEVATION,"--proton-control__text-color":X.GRAYSCALE.GRAY_DARK,"--proton-control__border-color":X.GRAYSCALE.BORDER,"--proton-control__shadow-color":Be.transparentize(X.GRAYSCALE.GRAY_LIGHTEST,.5),...n};case Te.THEMES.CUSTOM_DARK:return{"--proton-control__background-color":X.DARK_GRAYSCALE.GRAY_DARK,"--proton-control__background-color-light":"rgba(255, 255, 255, 0.2)","--proton-control__text-color":X.DARK_GRAYSCALE.WHITE,"--proton-control__border-color":X.DARK_GRAYSCALE.BORDER,"--proton-control__shadow-color":Be.transparentize(X.DARK_GRAYSCALE.GRAY_LIGHTEST,.7),...n};default:return{"--proton-control__background-color":X.DEFAULT_WHITE_BACKGROUND,"--proton-control__background-color-light":X.GRAYSCALE.ELEVATION,"--proton-control__text-color":X.GRAYSCALE.WHITE,"--proton-control__border-color":X.GRAYSCALE.GRAY_DARK,"--proton-control__shadow-color":X.GRAYSCALE.GRAY_DARK,...n}}}const It=a.forwardRef(({variant:t="primary",size:e="medium",fullWidth:n,icon:r,to:l,target:o,onPress:i,type:u,isDisabled:s,"data-testid":c,children:f,__textShift:d},p)=>{const v=l?"a":"button",h=l&&j.isUrlExternal(l),g=v!=="a"?{}:{target:o||(h?"_blank":void 0),href:l,rel:h||o==="_blank"?"noopener noreferrer":void 0},{className:E}=Ce(),x=a.useRef(null),{buttonProps:C}=ln({onPress:i,elementType:v,type:u||"button",isDisabled:s},x);a.useLayoutEffect(()=>{typeof p=="function"?p(x.current):p&&(p.current=x.current)},[p]);const w=a.useRef(null),T=a.useRef(null),S=!!r,P=!!(l&&h),[I,N]=a.useState({});return a.useLayoutEffect(()=>{var m,K;if(!n)return;let B={},A=0;if(f&&S){const F=(m=w.current)==null?void 0:m.offsetWidth;B.paddingLeft=F,A+=-F/2}if(f&&P){const F=(K=T.current)==null?void 0:K.offsetWidth;B.paddingRight=F,A+=F/2}d&&(A+=d),A!==0&&(B.transform=`translateX(${A}px)`),N(B)},[f,S,P,d,n]),y.jsxs(v,{...C,...g,className:j.csx("proton-Button",`proton-Button--${t}`,n&&"proton-Button--fullWidth",s&&"proton-Button--disabled",e&&`proton-Button--${e}`,E),ref:x,"data-testid":c,children:[S&&y.jsx("div",{className:j.csx("proton-Button__icon-decorator","proton-Button__icon-decorator--prepend",n&&"proton-Button__icon-decorator--fullWidth"),ref:w,children:r}),f&&y.jsx("div",{className:"proton-Button__text",style:I,children:f}),P&&y.jsx("div",{className:j.csx("proton-Button__icon-decorator","proton-Button__icon-decorator--append",n&&"proton-Button__icon-decorator--fullWidth"),ref:T,children:y.jsx("svg",{viewBox:"0 0 512 512",width:"0.8em",height:"0.8em",children:y.jsx("path",{d:"M384 224v184a40 40 0 01-40 40H104a40 40 0 01-40-40V168a40 40 0 0140-40h167.48M336 64h112v112M224 288L440 72",fill:"none",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round",strokeWidth:"32"})})})]})}),Yn=a.forwardRef(({fadeIn:t=!1,onClose:e,children:n},r)=>{const{theme:l,palette:o}=Ce();return a.useEffect(()=>{if(!e)return;const i=u=>{u.key==="Escape"&&e()};return document.addEventListener("keydown",i),()=>{document.removeEventListener("keydown",i)}},[e]),y.jsx(Rn,{children:y.jsx(uc,{theme:l,palette:o,children:y.jsx("div",{ref:r,id:"background","aria-label":"Background overlay",role:"dialog","aria-modal":"true","data-testid":"screen-overlay",className:j.csx("proton-ScreenOverlay__background","proton-ScreenOverlay__z-index",t&&"proton-ScreenOverlay__fade-in"),onClick:i=>{e&&i.target===i.currentTarget&&e()},children:n})})})});Yn.displayName="ScreenOverlay";const Yv="data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20xmlns:xlink='http://www.w3.org/1999/xlink'%3e%3cdefs%3e%3csymbol%20id='external-link'%20viewBox='0%200%20512%20512'%3e%3cpath%20d='M384%20224v184a40%2040%200%2001-40%2040H104a40%2040%200%2001-40-40V168a40%2040%200%200140-40h167.48M336%2064h112v112M224%20288L440%2072'%20fill='none'%20stroke='currentColor'%20stroke-linecap='round'%20stroke-linejoin='round'%20stroke-width='32'/%3e%3c/symbol%3e%3csymbol%20id='caret-down'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='currentColor'%20d='M233.4%20406.6c12.5%2012.5%2032.8%2012.5%2045.3%200l192-192c12.5-12.5%2012.5-32.8%200-45.3s-32.8-12.5-45.3%200L256%20338.7L86.6%20169.4c-12.5-12.5-32.8-12.5-45.3%200s-12.5%2032.8%200%2045.3l192%20192z'/%3e%3c/symbol%3e%3csymbol%20id='caret-right'%20viewBox='0%200%20512%20512'%3e%3cpath%20fill='currentColor'%20d='M216.5%20374.8c-11.3%2011.3-30%2011.3-41.3%200L74.8%20256c-11.3-11.3-11.3-30%200-41.3l128.5-128.5c11.3-11.3%2030-11.3%2041.3%200s11.3%2030%200%2041.3L145.7%20256l119.8%20119.8c11.3%2011.3%2011.3%2030%200%2041.3z'/%3e%3c/symbol%3e%3csymbol%20id='chevron-right'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M5.74%203.2a.75.75%200%200%200-.04%201.06L9.227%208L5.7%2011.74a.75.75%200%201%200%201.1%201.02l4-4.25a.75.75%200%200%200%200-1.02l-4-4.25a.75.75%200%200%200-1.06-.04'/%3e%3c/symbol%3e%3csymbol%20id='chevron-left'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M10.26%203.2a.75.75%200%200%201%20.04%201.06L6.773%208l3.527%203.74a.75.75%200%201%201-1.1%201.02l-4-4.25a.75.75%200%200%201%200-1.02l4-4.25a.75.75%200%200%201%201.06-.04'/%3e%3c/symbol%3e%3csymbol%20id='chevron-down'%20viewBox='0%200%2016%2016'%3e%3cpath%20fill='currentColor'%20d='M3.2%205.74a.75.75%200%200%201%201.06-.04L8%209.227L11.74%205.7a.75.75%200%201%201%201.02%201.1l-4.25%204a.75.75%200%200%201-1.02%200l-4.25-4a.75.75%200%200%201-.04-1.06'/%3e%3c/symbol%3e%3c/defs%3e%3c/svg%3e";function qn(t){let e={height:t.size||void 0,width:t.size||void 0,color:t.color||void 0};return t.id==="chevron-right"?y.jsx(mn,{direction:"right",...e}):t.id==="chevron-left"?y.jsx(mn,{direction:"left",...e}):t.id==="chevron-up"?y.jsx(mn,{direction:"up",...e}):t.id==="chevron-down"?y.jsx(mn,{direction:"down",...e}):(console.warn("⚠️ Sprite sheet does not work properly when loading in other apps!!"),y.jsx("svg",{style:e,...t,children:y.jsx("use",{href:`${Yv}#${t.id}`})}))}function mn({direction:t,...e}){const n={right:0,down:90,left:180,up:270};return y.jsx("svg",{viewBox:"0 0 16 16",style:{transform:`rotate(${n[t]}deg)`},...e,children:y.jsx("path",{fill:"currentColor",d:"M5.74 3.2a.75.75 0 0 0-.04 1.06L9.227 8L5.7 11.74a.75.75 0 1 0 1.1 1.02l4-4.25a.75.75 0 0 0 0-1.02l-4-4.25a.75.75 0 0 0-1.06-.04"})})}const al=({isOpen:t,selectionMode:e="single",selectedKeys:n,defaultSelectedKeys:r,disabledKeys:l,children:o,showCancel:i=!0,cancelButtonText:u="Cancel",actions:s,title:c,onSelectionChange:f,onClose:d,"data-testid":p})=>{Tt.useLockBodyScroll(t);const{className:v,theme:h}=Ce(),[g,E]=a.useState(0),[x,C]=a.useState([]),[w,T]=a.useState({title:c,actions:s,key:null,previousKey:null}),S=w.actions||[],P=a.useRef(null),I=a.useRef(null),N=a.useRef(null),B=a.useRef(!1),{isClosing:A,handleClose:m}=Tt.useIsClosing({onClose:d,overlayRef:N}),K=S&&S.length>0,F=()=>{E(0),m()},k=oc({items:S,children:S.map(O=>a.createElement(du,{...O,key:O.key,textValue:O.key},O.label)),defaultSelectedKeys:r?new Set(r):void 0,selectedKeys:n?new Set(n):void 0,onSelectionChange:f,selectionMode:e,disabledKeys:l}),{menuProps:L}=Xu({autoFocus:!0,shouldFocusWrap:!0,onAction:O=>{var G;const U=S.find(oe=>oe.key===O);if(!U){console.error(`Action with key ${O} not found`);return}(G=U==null?void 0:U.children)!=null&&G.length&&b(O)},onClose:()=>{if(B.current){B.current=!1;return}d==null||d()},disabledKeys:l,onSelectionChange:f,selectionMode:e,selectedKeys:n,defaultSelectedKeys:r,"aria-label":"Action Menu"},k,I);function b(O){const U=S.find(G=>G.key===O);if(!U){console.error(`Action with key ${O} not found`);return}C(G=>[...G,w]),T(G=>({title:U.label,actions:U.children,key:U.key,previousKey:G.key})),B.current=!0}function R(){if(x.length>0){const O=x[x.length-1];T(O),C(x.slice(0,-1))}}a.useEffect(()=>{t&&P.current&&E(P.current.scrollHeight)},[t,P,x]);const D=o||K||i;return t?y.jsx(Yn,{fadeIn:!0,ref:N,onClose:F,children:y.jsx("div",{className:"proton-ActionMenu__background-wrapper",style:{opacity:A?0:1},children:y.jsx("div",{"data-testid":p||"ActionMenu-wrapper",className:"proton-ActionMenu__wrapper",children:y.jsx("div",{className:j.csx("proton-ActionMenu__card",v),"data-testid":"ActionMenu-content",style:{height:`${g}px`},children:y.jsx("div",{ref:I,children:y.jsxs("div",{...L,ref:P,children:[w.title&&y.jsxs("div",{className:"proton-ActionMenu__title",children:[x.length>0&&y.jsx("div",{style:{position:"absolute",left:0},children:y.jsx("button",{onClick:R,children:y.jsx(qn,{id:"chevron-left",size:16})})}),w.title]}),D?y.jsxs(on,{autoFocus:!0,contain:!0,children:[o&&y.jsx("div",{className:"proton-ActionMenu__content",children:typeof o=="function"?o({close:F}):o}),K&&y.jsx("div",{className:j.csx("proton-ActionMenu__list",e==="none"&&"proton-ActionMenu__list--disabled"),children:Array.from(k.collection).map((O,U)=>{var oe;const G=w.actions[U];return y.jsx(qv,{item:O,state:k,isSubmenu:!!((oe=G.children)!=null&&oe.length)},O.key)})}),i&&y.jsx("div",{className:"proton-ActionMenu__cancel-button",tabIndex:-1,children:y.jsx(It,{variant:h==="dark"||h==="custom-dark"?"translucent":"secondary",onPress:F,"data-testid":"ActionMenuItem-cancel",children:u})})]}):null]})})})})})}):null},qv=({state:t,item:e,isSubmenu:n})=>{const r=a.useRef(null),{props:l}=e,{menuItemProps:o}=Zu({key:e.key},t,r),i=l.to?"a":"div",u=l.to&&j.isUrlExternal(l.to),s=l.to?{href:l.to,target:u?"_blank":void 0,rel:u?"noopener noreferrer":void 0,onClick:c=>{u||!l.to||j.handleInternalNavigation(c,l.to)}}:{};return a.createElement(i,{...o,...s,key:e.key,className:"proton-ActionMenu__item","aria-label":`ActionMenu-Item-${e.key}`,ref:r},y.jsxs("div",{className:"proton-ActionMenu__item-content",children:[y.jsx("div",{className:"proton-ActionMenu__item-label",children:e.rendered}),l.description&&y.jsx("div",{className:"proton-ActionMenu__description",children:l.description})]}),n&&y.jsx(qn,{id:"chevron-right",size:16}))},Xv={primary:"primary",secondary:"secondary",transparent:"transparent",success:"success",warning:"warning",danger:"danger"},Zv=({variant:t,children:e,...n})=>{const{className:r}=Ce();return y.jsx("div",{role:"status","aria-live":"polite","data-testid":n["data-testid"],className:j.csx("proton-Badge",t&&`proton-Badge--${t}`,r),children:e})},sc={success:y.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:y.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zm3.857-9.809a.75.75 0 00-1.214-.882l-3.483 4.79-1.88-1.88a.75.75 0 10-1.06 1.061l2.5 2.5a.75.75 0 001.137-.089l4-5.5z"})}),warning:y.jsx("svg",{viewBox:"0 0 56 56",height:"17",width:"17",children:y.jsx("path",{d:"M9.59 50.207h36.82c3.516 0 5.719-2.531 5.719-5.719a5.56 5.56 0 0 0-.75-2.812l-18.445-33c-1.055-1.899-2.977-2.883-4.922-2.883c-1.922 0-3.89.984-4.946 2.883L4.645 41.699c-.516.89-.774 1.828-.774 2.79c0 3.187 2.227 5.718 5.719 5.718m18.422-16.055c-1.242 0-1.922-.703-1.969-1.968l-.328-11.578c-.047-1.266.937-2.204 2.273-2.204c1.313 0 2.344.961 2.297 2.227l-.351 11.555c-.047 1.289-.727 1.968-1.922 1.968m0 8.649c-1.36 0-2.625-1.078-2.625-2.532s1.242-2.53 2.625-2.53s2.625 1.054 2.625 2.53c0 1.477-1.266 2.532-2.625 2.532"})}),danger:y.jsx("svg",{viewBox:"0 0 20 20",height:"18",width:"18",children:y.jsx("path",{fillRule:"evenodd",d:"M10 18a8 8 0 100-16 8 8 0 000 16zM8.28 7.22a.75.75 0 00-1.06 1.06L8.94 10l-1.72 1.72a.75.75 0 101.06 1.06L10 11.06l1.72 1.72a.75.75 0 101.06-1.06L11.06 10l1.72-1.72a.75.75 0 00-1.06-1.06L10 8.94 8.28 7.22z"})})},Jv={default:"default",success:"success",warning:"warning",danger:"danger"},Xn=a.createContext(void 0),Ze=({variant:t="default",rounded:e=!0,icon:n=!1,compact:r=!0,children:l,"data-testid":o})=>y.jsx(Xn.Provider,{value:t,children:y.jsx("div",{role:"status","aria-live":"polite",className:j.csx("proton-Banner",`proton-Banner--${t}`,e&&"proton-Banner--rounded"),"data-testid":o,children:y.jsxs("div",{className:j.csx("proton-Banner__wrapper",r&&"proton-Banner__wrapper--compact"),children:[y.jsx(Ze.Icon,{icon:n}),y.jsx("div",{className:"proton-Banner__content-wrapper",children:y.jsx("div",{className:"proton-Banner__container",children:l})})]})})}),Qv=({children:t,...e})=>{const n=a.useContext(Xn);if(!n)throw new Error("BannerTitle must be used within a Banner");return y.jsx("h3",{className:j.csx("proton-Banner__title",`proton-Banner--${n}__title`),"data-testid":e["data-testid"],children:t})},e0=({children:t,...e})=>{const n=a.useContext(Xn);if(!n)throw new Error("BannerContent must be used within a Banner");return y.jsx("p",{className:j.csx("proton-Banner__content",`proton-Banner--${n}__content`),"data-testid":e["data-testid"],children:t})};function t0(t,e){return a.isValidElement(t)?t:t?sc[e]:null}const n0=({children:t,icon:e,...n})=>{const r=a.useContext(Xn);if(!r)throw new Error("BannerIcon must be used within a Banner");const l=t0(e,r);return l?y.jsx("div",{"aria-hidden":"true","data-testid":n["data-testid"],className:j.csx("proton-Banner__icon",`proton-Banner--${r}__icon`),children:l}):null},r0=({children:t,...e})=>y.jsx(It,{...e,children:t}),l0=({children:t})=>y.jsx("div",{className:"proton-Banner__actions",children:t});Ze.Title=Qv;Ze.Content=e0;Ze.Icon=n0;Ze.Action=r0;Ze.Actions=l0;Ze.icons=sc;Ze.variants=Jv;let ac=a.createContext(null);function cc(t){let e={...t,"data-testid":void 0},n=Dv(e),{radioGroupProps:r}=ev(e,n);return y.jsx("div",{...r,className:"proton-ButtonGroup","data-value":n.selectedValue,"data-testid":t["data-testid"]||void 0,children:y.jsx(ac.Provider,{value:n,children:t.children})})}cc.Option=function(e){let n={...e,"data-testid":void 0},r=a.useContext(ac),l=a.useRef(null),{inputProps:o,isSelected:i}=Qp(n,r,l);return y.jsxs("label",{className:j.csx("proton-ButtonGroup__option",i&&"proton-ButtonGroup__option--selected"),"data-selected":i||void 0,"data-testid":e["data-testid"]||void 0,children:[y.jsx(Qr,{children:y.jsx("input",{...o,ref:l})}),e.children]})};const dc=Symbol("default");function Ft({values:t,children:e}){for(let[n,r]of t)e=a.createElement(n.Provider,{value:r},e);return e}function bt(t){let{className:e,style:n,children:r,defaultClassName:l,defaultChildren:o,defaultStyle:i,values:u}=t;return a.useMemo(()=>{let s,c,f;return typeof e=="function"?s=e({...u,defaultClassName:l}):s=e,typeof n=="function"?c=n({...u,defaultStyle:i||{}}):c=n,typeof r=="function"?f=r({...u,defaultChildren:o}):r==null?f=o:f=r,{className:s??l,style:c||i?{...i,...c}:void 0,children:f??o,"data-rac":""}},[e,n,r,l,o,i,u])}function fc(t,e){let n=a.useContext(t);if(e===null)return null;if(n&&typeof n=="object"&&"slots"in n&&n.slots){let r=e||dc;if(!n.slots[r]){let l=new Intl.ListFormat().format(Object.keys(n.slots).map(i=>`"${i}"`)),o=e?`Invalid slot "${e}".`:"A slot prop is required.";throw new Error(`${o} Valid slot names are ${l}.`)}return n.slots[r]}return n}function ut(t,e,n){let r=fc(n,t.slot)||{},{ref:l,...o}=r,i=Rt(a.useMemo(()=>Ko(e,l),[e,l])),u=V(o,t);return"style"in o&&o.style&&"style"in t&&t.style&&(typeof o.style=="function"||typeof t.style=="function"?u.style=s=>{let c=typeof o.style=="function"?o.style(s):o.style,f={...s.defaultStyle,...c},d=typeof t.style=="function"?t.style({...s,defaultStyle:f}):t.style;return{...f,...d}}:u.style={...o.style,...t.style}),[u,i]}function o0(t=!0){let[e,n]=a.useState(t),r=a.useRef(!1),l=a.useCallback(o=>{r.current=!0,n(!!o)},[]);return Y(()=>{r.current||n(!1)},[]),[l,e]}class cl{get childNodes(){throw new Error("childNodes is not supported")}clone(){let e=new cl(this.type,this.key);return e.value=this.value,e.level=this.level,e.hasChildNodes=this.hasChildNodes,e.rendered=this.rendered,e.textValue=this.textValue,e["aria-label"]=this["aria-label"],e.index=this.index,e.parentKey=this.parentKey,e.prevKey=this.prevKey,e.nextKey=this.nextKey,e.firstChildKey=this.firstChildKey,e.lastChildKey=this.lastChildKey,e.props=this.props,e.render=this.render,e.colSpan=this.colSpan,e.colIndex=this.colIndex,e}constructor(e,n){this.value=null,this.level=0,this.hasChildNodes=!1,this.rendered=null,this.textValue="",this["aria-label"]=void 0,this.index=0,this.parentKey=null,this.prevKey=null,this.nextKey=null,this.firstChildKey=null,this.lastChildKey=null,this.props={},this.colSpan=null,this.colIndex=null,this.type=e,this.key=n}}class dl{get size(){return this.keyMap.size}getKeys(){return this.keyMap.keys()}*[Symbol.iterator](){let e=this.firstKey!=null?this.keyMap.get(this.firstKey):void 0;for(;e;)yield e,e=e.nextKey!=null?this.keyMap.get(e.nextKey):void 0}getChildren(e){let n=this.keyMap;return{*[Symbol.iterator](){let r=n.get(e),l=(r==null?void 0:r.firstChildKey)!=null?n.get(r.firstChildKey):null;for(;l;)yield l,l=l.nextKey!=null?n.get(l.nextKey):void 0}}}getKeyBefore(e){let n=this.keyMap.get(e);if(!n)return null;if(n.prevKey!=null){for(n=this.keyMap.get(n.prevKey);n&&n.type!=="item"&&n.lastChildKey!=null;)n=this.keyMap.get(n.lastChildKey);var r;return(r=n==null?void 0:n.key)!==null&&r!==void 0?r:null}return n.parentKey}getKeyAfter(e){let n=this.keyMap.get(e);if(!n)return null;if(n.type!=="item"&&n.firstChildKey!=null)return n.firstChildKey;for(;n;){if(n.nextKey!=null)return n.nextKey;if(n.parentKey!=null)n=this.keyMap.get(n.parentKey);else return null}return null}getFirstKey(){return this.firstKey}getLastKey(){let e=this.lastKey!=null?this.keyMap.get(this.lastKey):null;for(;(e==null?void 0:e.lastChildKey)!=null;)e=this.keyMap.get(e.lastChildKey);var n;return(n=e==null?void 0:e.key)!==null&&n!==void 0?n:null}getItem(e){var n;return(n=this.keyMap.get(e))!==null&&n!==void 0?n:null}at(){throw new Error("Not implemented")}clone(){let e=this.constructor,n=new e;return n.keyMap=new Map(this.keyMap),n.firstKey=this.firstKey,n.lastKey=this.lastKey,n}addNode(e){if(this.frozen)throw new Error("Cannot add a node to a frozen collection");this.keyMap.set(e.key,e)}removeNode(e){if(this.frozen)throw new Error("Cannot remove a node to a frozen collection");this.keyMap.delete(e)}commit(e,n,r=!1){if(this.frozen)throw new Error("Cannot commit a frozen collection");this.firstKey=e,this.lastKey=n,this.frozen=!r}UNSTABLE_filter(e){let n=new dl,r=null;for(let l of this)if(l.type==="section"&&l.hasChildNodes){let o=l.clone(),i=null;for(let u of this.getChildren(l.key))if(Eo(u,e,this,n)){let s=u.clone();i==null&&(o.firstChildKey=s.key),n.firstKey==null&&(n.firstKey=o.key),i&&i.parentKey===s.parentKey?(i.nextKey=s.key,s.prevKey=i.key):s.prevKey=null,s.nextKey=null,n.addNode(s),i=s}i&&(i.type!=="header"?(o.lastChildKey=i.key,r==null?o.prevKey=null:(r.type==="section"||r.type==="separator")&&(r.nextKey=o.key,o.prevKey=r.key),o.nextKey=null,r=o,n.addNode(o)):(n.firstKey===o.key&&(n.firstKey=null),n.removeNode(i.key)))}else if(l.type==="separator"){let o=l.clone();o.nextKey=null,(r==null?void 0:r.type)==="section"&&(r.nextKey=o.key,o.prevKey=r.key,r=o,n.addNode(o))}else{let o=l.clone();Eo(o,e,this,n)&&(n.firstKey==null&&(n.firstKey=o.key),r!=null&&r.type!=="section"&&r.type!=="separator"&&r.parentKey===o.parentKey?(r.nextKey=o.key,o.prevKey=r.key):o.prevKey=null,o.nextKey=null,n.addNode(o),r=o)}if((r==null?void 0:r.type)==="separator"&&r.nextKey===null){let l;r.prevKey!=null&&(l=n.getItem(r.prevKey),l.nextKey=null),n.removeNode(r.key),r=l}return n.lastKey=(r==null?void 0:r.key)||null,n}constructor(){this.keyMap=new Map,this.firstKey=null,this.lastKey=null,this.frozen=!1}}function Eo(t,e,n,r){if(t.type==="subdialogtrigger"||t.type==="submenutrigger"){let l=[...n.getChildren(t.key)][0];if(l&&e(l.textValue)){let o=l.clone();return r.addNode(o),!0}else return!1}else return t.type==="header"?!0:e(t.textValue)}class pc{*[Symbol.iterator](){let e=this.firstChild;for(;e;)yield e,e=e.nextSibling}get firstChild(){return this._firstChild}set firstChild(e){this._firstChild=e,this.ownerDocument.markDirty(this)}get lastChild(){return this._lastChild}set lastChild(e){this._lastChild=e,this.ownerDocument.markDirty(this)}get previousSibling(){return this._previousSibling}set previousSibling(e){this._previousSibling=e,this.ownerDocument.markDirty(this)}get nextSibling(){return this._nextSibling}set nextSibling(e){this._nextSibling=e,this.ownerDocument.markDirty(this)}get parentNode(){return this._parentNode}set parentNode(e){this._parentNode=e,this.ownerDocument.markDirty(this)}get isConnected(){var e;return((e=this.parentNode)===null||e===void 0?void 0:e.isConnected)||!1}invalidateChildIndices(e){(this._minInvalidChildIndex==null||e.index<this._minInvalidChildIndex.index)&&(this._minInvalidChildIndex=e)}updateChildIndices(){let e=this._minInvalidChildIndex;for(;e;)e.index=e.previousSibling?e.previousSibling.index+1:0,e=e.nextSibling;this._minInvalidChildIndex=null}appendChild(e){e.parentNode&&e.parentNode.removeChild(e),this.firstChild==null&&(this.firstChild=e),this.lastChild?(this.lastChild.nextSibling=e,e.index=this.lastChild.index+1,e.previousSibling=this.lastChild):(e.previousSibling=null,e.index=0),e.parentNode=this,e.nextSibling=null,this.lastChild=e,this.ownerDocument.markDirty(this),this.ownerDocument.queueUpdate()}insertBefore(e,n){if(n==null)return this.appendChild(e);e.parentNode&&e.parentNode.removeChild(e),e.nextSibling=n,e.previousSibling=n.previousSibling,e.index=n.index,this.firstChild===n?this.firstChild=e:n.previousSibling&&(n.previousSibling.nextSibling=e),n.previousSibling=e,e.parentNode=n.parentNode,this.invalidateChildIndices(n),this.ownerDocument.queueUpdate()}removeChild(e){e.parentNode!==this||!this.ownerDocument.isMounted||(e.nextSibling&&(this.invalidateChildIndices(e.nextSibling),e.nextSibling.previousSibling=e.previousSibling),e.previousSibling&&(e.previousSibling.nextSibling=e.nextSibling),this.firstChild===e&&(this.firstChild=e.nextSibling),this.lastChild===e&&(this.lastChild=e.previousSibling),e.parentNode=null,e.nextSibling=null,e.previousSibling=null,e.index=0,this.ownerDocument.markDirty(e),this.ownerDocument.queueUpdate())}addEventListener(){}removeEventListener(){}get previousVisibleSibling(){let e=this.previousSibling;for(;e&&e.isHidden;)e=e.previousSibling;return e}get nextVisibleSibling(){let e=this.nextSibling;for(;e&&e.isHidden;)e=e.nextSibling;return e}get firstVisibleChild(){let e=this.firstChild;for(;e&&e.isHidden;)e=e.nextSibling;return e}get lastVisibleChild(){let e=this.lastChild;for(;e&&e.isHidden;)e=e.previousSibling;return e}constructor(e){this._firstChild=null,this._lastChild=null,this._previousSibling=null,this._nextSibling=null,this._parentNode=null,this._minInvalidChildIndex=null,this.ownerDocument=e}}class kt extends pc{get index(){return this._index}set index(e){this._index=e,this.ownerDocument.markDirty(this)}get level(){return this.parentNode instanceof kt?this.parentNode.level+(this.node.type==="item"?1:0):0}getMutableNode(){return this.isMutated||(this.node=this.node.clone(),this.isMutated=!0),this.ownerDocument.markDirty(this),this.node}updateNode(){var e,n,r;let l=this.nextVisibleSibling,o=this.getMutableNode();o.index=this.index,o.level=this.level,o.parentKey=this.parentNode instanceof kt?this.parentNode.node.key:null;var i;o.prevKey=(i=(e=this.previousVisibleSibling)===null||e===void 0?void 0:e.node.key)!==null&&i!==void 0?i:null;var u;o.nextKey=(u=l==null?void 0:l.node.key)!==null&&u!==void 0?u:null,o.hasChildNodes=!!this.firstChild;var s;o.firstChildKey=(s=(n=this.firstVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&s!==void 0?s:null;var c;if(o.lastChildKey=(c=(r=this.lastVisibleChild)===null||r===void 0?void 0:r.node.key)!==null&&c!==void 0?c:null,(o.colSpan!=null||o.colIndex!=null)&&l){var f,d;let p=((f=o.colIndex)!==null&&f!==void 0?f:o.index)+((d=o.colSpan)!==null&&d!==void 0?d:1);if(p!==l.node.colIndex){let v=l.getMutableNode();v.colIndex=p}}}setProps(e,n,r,l){let o=this.getMutableNode(),{value:i,textValue:u,id:s,...c}=e;if(c.ref=n,o.props=c,o.rendered=r,o.render=l,o.value=i,o.textValue=u||(typeof c.children=="string"?c.children:"")||e["aria-label"]||"",s!=null&&s!==o.key){if(this.hasSetProps)throw new Error("Cannot change the id of an item");o.key=s}c.colSpan!=null&&(o.colSpan=c.colSpan),this.hasSetProps=!0,this.ownerDocument.queueUpdate()}get style(){let e=this;return{get display(){return e.isHidden?"none":""},set display(n){let r=n==="none";if(e.isHidden!==r){var l,o;(((l=e.parentNode)===null||l===void 0?void 0:l.firstVisibleChild)===e||((o=e.parentNode)===null||o===void 0?void 0:o.lastVisibleChild)===e)&&e.ownerDocument.markDirty(e.parentNode);let i=e.previousVisibleSibling,u=e.nextVisibleSibling;i&&e.ownerDocument.markDirty(i),u&&e.ownerDocument.markDirty(u),e.isHidden=r,e.ownerDocument.markDirty(e)}}}}hasAttribute(){}setAttribute(){}setAttributeNS(){}removeAttribute(){}constructor(e,n){super(n),this.nodeType=8,this.isMutated=!0,this._index=0,this.hasSetProps=!1,this.isHidden=!1,this.node=new cl(e,`react-aria-${++n.nodeId}`)}}class i0 extends pc{get isConnected(){return this.isMounted}createElement(e){return new kt(e,this)}getMutableCollection(){return this.nextCollection||(this.nextCollection=this.collection.clone()),this.nextCollection}markDirty(e){this.dirtyNodes.add(e)}addNode(e){if(e.isHidden)return;let n=this.getMutableCollection();if(!n.getItem(e.node.key))for(let r of e)this.addNode(r);n.addNode(e.node)}removeNode(e){for(let r of e)this.removeNode(r);this.getMutableCollection().removeNode(e.node.key)}getCollection(){return this.inSubscription?this.collection.clone():(this.queuedRender=!1,this.updateCollection(),this.collection)}updateCollection(){for(let o of this.dirtyNodes)o instanceof kt&&(!o.isConnected||o.isHidden)?this.removeNode(o):o.updateChildIndices();for(let o of this.dirtyNodes)o instanceof kt&&(o.isConnected&&!o.isHidden&&(o.updateNode(),this.addNode(o)),o.isMutated=!1);if(this.dirtyNodes.clear(),this.nextCollection){var e,n,r,l;this.nextCollection.commit((r=(e=this.firstVisibleChild)===null||e===void 0?void 0:e.node.key)!==null&&r!==void 0?r:null,(l=(n=this.lastVisibleChild)===null||n===void 0?void 0:n.node.key)!==null&&l!==void 0?l:null,this.isSSR),this.isSSR||(this.collection=this.nextCollection,this.nextCollection=null)}}queueUpdate(){if(!(this.dirtyNodes.size===0||this.queuedRender)){this.queuedRender=!0,this.inSubscription=!0;for(let e of this.subscriptions)e();this.inSubscription=!1}}subscribe(e){return this.subscriptions.add(e),()=>this.subscriptions.delete(e)}resetAfterSSR(){this.isSSR&&(this.isSSR=!1,this.firstChild=null,this.lastChild=null,this.nodeId=0)}constructor(e){super(null),this.nodeType=11,this.ownerDocument=this,this.dirtyNodes=new Set,this.isSSR=!1,this.nodeId=0,this.nodesByProps=new WeakMap,this.isMounted=!0,this.nextCollection=null,this.subscriptions=new Set,this.queuedRender=!1,this.inSubscription=!1,this.collection=e,this.nextCollection=e}}function vc(t){let{children:e,items:n,idScope:r,addIdAndValue:l,dependencies:o=[]}=t,i=a.useMemo(()=>new WeakMap,o);return a.useMemo(()=>{if(n&&typeof e=="function"){let c=[];for(let f of n){let d=i.get(f);if(!d){d=e(f);var u,s;let p=(s=(u=d.props.id)!==null&&u!==void 0?u:f.key)!==null&&s!==void 0?s:f.id;if(p==null)throw new Error("Could not determine key for item");r&&(p=r+":"+p),d=a.cloneElement(d,l?{key:p,id:p,value:f}:{key:p}),i.set(f,d)}c.push(d)}return c}else if(typeof e!="function")return e},[e,n,i,r,l])}if(typeof HTMLTemplateElement<"u"){const t=Object.getOwnPropertyDescriptor(Node.prototype,"firstChild").get;Object.defineProperty(HTMLTemplateElement.prototype,"firstChild",{configurable:!0,enumerable:!0,get:function(){return this.dataset.reactAriaHidden?this.content.firstChild:t.call(this)}})}const Bn=a.createContext(!1);function u0(t){if(a.useContext(Bn))return a.createElement(a.Fragment,null,t.children);let n=a.createElement(Bn.Provider,{value:!0},t.children);return a.createElement("template",{"data-react-aria-hidden":!0},n)}function s0(t){let e=(n,r)=>a.useContext(Bn)?null:t(n,r);return e.displayName=t.displayName||t.name,a.forwardRef(e)}function a0(){return a.useContext(Bn)}const hc=a.createContext(!1),tn=a.createContext(null);function c0(t){if(a.useContext(tn))return t.content;let{collection:n,document:r}=v0(t.createCollection);return a.createElement(a.Fragment,null,a.createElement(u0,null,a.createElement(tn.Provider,{value:r},t.content)),a.createElement(d0,{render:t.children,collection:n}))}function d0({collection:t,render:e}){return e(t)}function f0(t,e,n){let r=vt(),l=a.useRef(r);l.current=r;let o=a.useCallback(()=>l.current?n():e(),[e,n]);return Jp.useSyncExternalStore(t,o)}const p0=typeof a.useSyncExternalStore=="function"?a.useSyncExternalStore:f0;function v0(t){let[e]=a.useState(()=>new i0((t==null?void 0:t())||new dl)),n=a.useCallback(i=>e.subscribe(i),[e]),r=a.useCallback(()=>{let i=e.getCollection();return e.isSSR&&e.resetAfterSSR(),i},[e]),l=a.useCallback(()=>(e.isSSR=!0,e.getCollection()),[e]),o=p0(n,r,l);return Y(()=>(e.isMounted=!0,()=>{e.isMounted=!1}),[e]),{collection:o,document:e}}const jr=a.createContext(null);function bc(t,e,n,r,l,o){let i=a.useCallback(s=>{s==null||s.setProps(e,n,r,o)},[e,n,r,o]),u=a.useContext(jr);if(u){let s=u.ownerDocument.nodesByProps.get(e);return s||(s=u.ownerDocument.createElement(t),s.setProps(e,n,r,o),u.appendChild(s),u.ownerDocument.updateCollection(),u.ownerDocument.nodesByProps.set(e,s)),l?a.createElement(jr.Provider,{value:s},l):null}return a.createElement(t,{ref:i},l)}function mc(t,e){let n=({node:l})=>e(l.props,l.props.ref,l),r=a.forwardRef((l,o)=>{let i=a.useContext(Pn);if(!a.useContext(hc)){if(e.length>=3)throw new Error(e.name+" cannot be rendered outside a collection.");return e(l,o)}return bc(t,l,o,"children"in l?l.children:null,null,s=>a.createElement(Pn.Provider,{value:i},a.createElement(n,{node:s})))});return r.displayName=e.name,r}function gc(t,e,n=yc){let r=({node:o})=>e(o.props,o.props.ref,o),l=a.forwardRef((o,i)=>{let u=n(o);var s;return(s=bc(t,o,i,null,u,c=>a.createElement(r,{node:c})))!==null&&s!==void 0?s:a.createElement(a.Fragment,null)});return l.displayName=e.name,l}function yc(t){return vc({...t,addIdAndValue:!0})}const Co=a.createContext(null);function h0(t){let e=a.useContext(Co),n=((e==null?void 0:e.dependencies)||[]).concat(t.dependencies),r=t.idScope||(e==null?void 0:e.idScope),l=yc({...t,idScope:r,dependencies:n});return a.useContext(tn)&&(l=a.createElement(b0,null,l)),e=a.useMemo(()=>({dependencies:n,idScope:r}),[r,...n]),a.createElement(Co.Provider,{value:e},l)}function b0({children:t}){let e=a.useContext(tn),n=a.useMemo(()=>a.createElement(tn.Provider,{value:null},a.createElement(hc.Provider,{value:!0},t)),[t]);return vt()?a.createElement(jr.Provider,{value:e},n):At.createPortal(n,e)}const m0=a.createContext(null),g0=new Set(["form","formAction","formEncType","formMethod","formNoValidate","formTarget","name","value"]),y0=a.createContext({}),$c=s0(function(e,n){[e,n]=ut(e,n,y0),e=$0(e);let r=e,{isPending:l}=r,{buttonProps:o,isPressed:i}=ln(e,n),{focusProps:u,isFocused:s,isFocusVisible:c}=Wn(e),{hoverProps:f,isHovered:d}=Kt({...e,isDisabled:e.isDisabled||l}),p={isHovered:d,isPressed:(r.isPressed||i)&&!l,isFocused:s,isFocusVisible:c,isDisabled:e.isDisabled||!1,isPending:l??!1},v=bt({...e,values:p,defaultClassName:"react-aria-Button"}),h=ce(o.id),g=ce(),E=o["aria-labelledby"];l&&(E?E=`${E} ${g}`:o["aria-label"]&&(E=`${h} ${g}`));let x=a.useRef(l);return a.useEffect(()=>{let C={"aria-labelledby":E||h};(!x.current&&s&&l||x.current&&s&&!l)&&Tn(C,"assertive"),x.current=l},[l,s,E,h]),a.createElement("button",{...pe(e,{propNames:g0}),...V(o,u,f),...v,type:o.type==="submit"&&l?"button":o.type,id:h,ref:n,"aria-labelledby":E,slot:e.slot||void 0,"aria-disabled":l?"true":o["aria-disabled"],"data-disabled":e.isDisabled||void 0,"data-pressed":p.isPressed||void 0,"data-hovered":d||void 0,"data-focused":s||void 0,"data-pending":l||void 0,"data-focus-visible":c||void 0},a.createElement(m0.Provider,{value:{id:g}},v.children))});function $0(t){return t.isPending&&(t.onPress=void 0,t.onPressStart=void 0,t.onPressEnd=void 0,t.onPressChange=void 0,t.onPressUp=void 0,t.onKeyDown=void 0,t.onKeyUp=void 0,t.onClick=void 0,t.href=void 0),t}const xc=a.createContext({}),So=a.forwardRef(function(e,n){[e,n]=ut(e,n,xc);let{elementType:r="span",...l}=e;return a.createElement(r,{className:"react-aria-Text",...l,ref:n})}),wo=a.createContext(null),x0=a.createContext(null),E0={CollectionRoot({collection:t,renderDropIndicator:e}){return Po(t,null,e)},CollectionBranch({collection:t,parent:e,renderDropIndicator:n}){return Po(t,e,n)}};function Po(t,e,n){return vc({items:e?t.getChildren(e.key):t,dependencies:[n],children(r){var l;let o=r.render(r);if(!n||r.type!=="item")return o;let i=r.key,u=t.getKeyAfter(i);return a.createElement(a.Fragment,null,n({type:"item",key:i,dropPosition:"before"}),o,(u==null||((l=t.getItem(u))===null||l===void 0?void 0:l.type)!=="item")&&n({type:"item",key:i,dropPosition:"after"}))}})}const fl=a.createContext(E0);function C0(t){return a.useMemo(()=>t!=null?new Set([t]):null,[t])}const Ec=a.createContext({}),S0=mc("header",function(e,n){return[e,n]=ut(e,n,Ec),a.createElement("header",{className:"react-aria-Header",...e,ref:n},e.children)}),w0=a.createContext({}),pl=a.createContext({placement:"bottom"}),P0=a.forwardRef(function(e,n){[e,n]=ut(e,n,pl);let r=e.placement,l={position:"absolute",transform:r==="top"||r==="bottom"?"translateX(-50%)":"translateY(-50%)"};r!=null&&(l[r]="100%");let o=bt({...e,defaultClassName:"react-aria-OverlayArrow",values:{placement:r}});o.style&&Object.keys(o.style).forEach(u=>o.style[u]===void 0&&delete o.style[u]);let i=pe(e);return a.createElement("div",{...i,...o,style:{...l,...o.style},ref:n,"data-placement":r})}),vl=a.createContext(null),Do=a.createContext(null),Cc=a.forwardRef(function(e,n){[e,n]=ut(e,n,vl);let r=a.useContext(bl),l=Nt(e),o=e.isOpen!=null||e.defaultOpen!=null||!r?l:r,i=zo(n,o.isOpen)||e.isExiting||!1,u=a0(),{direction:s}=Me();if(u){let c=e.children;return typeof c=="function"&&(c=c({trigger:e.trigger||null,placement:"bottom",isEntering:!1,isExiting:!1,defaultChildren:null})),a.createElement(a.Fragment,null,c)}return o&&!o.isOpen&&!i?null:a.createElement(D0,{...e,triggerRef:e.triggerRef,state:o,popoverRef:n,isExiting:i,dir:s})});function D0({state:t,isExiting:e,UNSTABLE_portalContainer:n,...r}){let l=a.useRef(null),[o,i]=a.useState(0),u=a.useRef(null),s=a.useContext(Do),c=s&&r.trigger==="SubmenuTrigger";Y(()=>{l.current&&t.isOpen&&i(l.current.getBoundingClientRect().width)},[t.isOpen,l]);var f;let{popoverProps:d,underlayProps:p,arrowProps:v,placement:h}=nu({...r,offset:(f=r.offset)!==null&&f!==void 0?f:8,arrowSize:o,groupRef:c?s:u},t),g=r.popoverRef,E=jo(g,!!h)||r.isEntering||!1,x=bt({...r,defaultClassName:"react-aria-Popover",values:{trigger:r.trigger||null,placement:h,isEntering:E,isExiting:e}}),C=!r.isNonModal||r.trigger==="SubmenuTrigger",[w,T]=a.useState(!1);Y(()=>{g.current&&T(C&&!g.current.querySelector("[role=dialog]"))},[g,C]),a.useEffect(()=>{w&&g.current&&!g.current.contains(document.activeElement)&&he(g.current)},[w,g]);let S={...d.style,...x.style},P=a.createElement("div",{...V(pe(r),d),...x,role:w?"dialog":void 0,tabIndex:w?-1:void 0,"aria-label":r["aria-label"],"aria-labelledby":r["aria-labelledby"],ref:g,slot:r.slot||void 0,style:S,dir:r.dir,"data-trigger":r.trigger,"data-placement":h,"data-entering":E||void 0,"data-exiting":e||void 0},!r.isNonModal&&a.createElement(Mr,{onDismiss:t.close}),a.createElement(pl.Provider,{value:{...v,placement:h,ref:l}},x.children),a.createElement(Mr,{onDismiss:t.close}));if(!c)return a.createElement(Rn,{...r,shouldContainFocus:w,isExiting:e,portalContainer:n},!r.isNonModal&&t.isOpen&&a.createElement("div",{"data-testid":"underlay",...p,style:{position:"fixed",inset:0}}),a.createElement("div",{ref:u,style:{display:"contents"}},a.createElement(Do.Provider,{value:u},P)));var I;return a.createElement(Rn,{...r,shouldContainFocus:w,isExiting:e,portalContainer:(I=n??(s==null?void 0:s.current))!==null&&I!==void 0?I:void 0},P)}const k0=a.createContext({}),hl=a.createContext(null),Zn=a.createContext(null),Kn=a.createContext(null),Mn=a.createContext(null);function T0(t){let e=sl(t),n=a.useRef(null),{menuTriggerProps:r,menuProps:l}=rl({...t,type:"menu"},e,n),[o,i]=a.useState(null),u=a.useCallback(()=>{n.current&&i(n.current.offsetWidth+"px")},[n]);En({ref:n,onResize:u});let s=a.useRef(null);return a.createElement(Ft,{values:[[hl,{...l,ref:s}],[bl,e],[Kn,e],[vl,{trigger:"MenuTrigger",triggerRef:n,scrollRef:s,placement:"bottom start",style:{"--trigger-width":o},"aria-labelledby":l["aria-labelledby"]}]]},a.createElement(bf,{...r,ref:n,isPressed:e.isOpen},t.children))}const Sc=a.createContext(null),A0=gc("submenutrigger",(t,e,n)=>{let{CollectionBranch:r}=a.useContext(fl),l=a.useContext(Zn),o=a.useContext(Kn),i=Sv({triggerKey:n.key},o),u=a.useRef(null),s=Rt(e),{parentMenuRef:c,shouldUseVirtualFocus:f}=a.useContext(Sc),{submenuTriggerProps:d,submenuProps:p,popoverProps:v}=jp({parentMenuRef:c,submenuRef:u,delay:t.delay,shouldUseVirtualFocus:f},i,s);return a.createElement(Ft,{values:[[Nn,{...d,onAction:void 0,ref:s}],[hl,p],[bl,i],[vl,{ref:u,trigger:"SubmenuTrigger",triggerRef:s,placement:"end top","aria-labelledby":p["aria-labelledby"],...v}]]},a.createElement(r,{collection:l.collection,parent:n}),t.children[1])},t=>t.children[0]),wc=a.forwardRef(function(e,n){return[e,n]=ut(e,n,hl),a.createElement(c0,{content:a.createElement(h0,e)},r=>a.createElement(R0,{props:e,collection:r,menuRef:n}))});function R0({props:t,collection:e,menuRef:n}){let{filter:r,collectionProps:l,collectionRef:o}=a.useContext(wo)||{};n=Rt(a.useMemo(()=>Ko(n,o!==void 0?o:null),[o,n]));let i=a.useMemo(()=>r?e.UNSTABLE_filter(r):e,[e,r]),u=oc({...t,collection:i,children:void 0}),s=a.useContext(Kn),{isVirtualized:c,CollectionRoot:f}=a.useContext(fl),{menuProps:d}=Xu({...t,...l,isVirtualized:c,onClose:t.onClose||(s==null?void 0:s.close)},u,n),p=bt({defaultClassName:"react-aria-Menu",className:t.className,style:t.style,values:{isEmpty:u.collection.size===0}}),v=null;return u.collection.size===0&&t.renderEmptyState&&(v=a.createElement("div",{role:"menuitem",style:{display:"contents"}},t.renderEmptyState())),a.createElement(on,null,a.createElement("div",{...pe(t),...d,...p,ref:n,slot:t.slot||void 0,"data-empty":u.collection.size===0||void 0,onScroll:t.onScroll},a.createElement(Ft,{values:[[Zn,u],[w0,{elementType:"div"}],[x0,{name:"MenuSection",render:Pc}],[Sc,{parentMenuRef:n,shouldUseVirtualFocus:l==null?void 0:l.shouldUseVirtualFocus}],[Nn,null],[wo,null],[Mn,u.selectionManager],[Kn,s??sl({})]]},a.createElement(f,{collection:u.collection,persistedKeys:C0(u.selectionManager.focusedKey),scrollRef:n})),v))}class B0 extends Mt{get focusedKey(){return this.parent.focusedKey}get isFocused(){return this.parent.isFocused}setFocusedKey(e,n){return this.parent.setFocusedKey(e,n)}setFocused(e){this.parent.setFocused(e)}get childFocusStrategy(){return this.parent.childFocusStrategy}constructor(e,n){super(e.collection,n),this.parent=e}}function Pc(t,e,n,r="react-aria-MenuSection"){var l,o;let i=a.useContext(Zn),{CollectionBranch:u}=a.useContext(fl),[s,c]=o0();var f;let{headingProps:d,groupProps:p}=Fp({heading:c,"aria-label":(f=n.props["aria-label"])!==null&&f!==void 0?f:void 0}),v=bt({defaultClassName:r,className:(l=n.props)===null||l===void 0?void 0:l.className,style:(o=n.props)===null||o===void 0?void 0:o.style,values:{}}),h=a.useContext(Mn),g=Gn(t),E=t.selectionMode!=null?new B0(h,g):h;return a.createElement("section",{...pe(t),...p,...v,ref:e},a.createElement(Ft,{values:[[Ec,{...d,ref:s}],[Mn,E]]},a.createElement(u,{collection:i.collection,parent:n})))}const K0=gc("section",Pc),Nn=a.createContext(null),M0=mc("item",function(e,n,r){var l;[e,n]=ut(e,n,Nn);let o=(l=fc(Nn))===null||l===void 0?void 0:l.id,i=a.useContext(Zn),u=Rt(n),s=a.useContext(Mn),{menuItemProps:c,labelProps:f,descriptionProps:d,keyboardShortcutProps:p,...v}=Zu({...e,id:o,key:r.key,selectionManager:s},i,u),{hoverProps:h,isHovered:g}=Kt({isDisabled:v.isDisabled}),E=bt({...e,id:void 0,children:r.rendered,defaultClassName:"react-aria-MenuItem",values:{...v,isHovered:g,isFocusVisible:v.isFocusVisible,selectionMode:s.selectionMode,selectionBehavior:s.selectionBehavior,hasSubmenu:!!e["aria-haspopup"],isOpen:e["aria-expanded"]==="true"}}),x=e.href?"a":"div";return a.createElement(x,{...V(c,h),...E,ref:u,"data-disabled":v.isDisabled||void 0,"data-hovered":g||void 0,"data-focused":v.isFocused||void 0,"data-focus-visible":v.isFocusVisible||void 0,"data-pressed":v.isPressed||void 0,"data-selected":v.isSelected||void 0,"data-selection-mode":s.selectionMode==="none"?void 0:s.selectionMode,"data-has-submenu":!!e["aria-haspopup"]||void 0,"data-open":e["aria-expanded"]==="true"||void 0},a.createElement(Ft,{values:[[xc,{slots:{[dc]:f,label:f,description:d}}],[k0,p]]},E.children))}),bl=a.createContext(null),ml=a.createContext(null),Dc=a.createContext(null);function N0(t){let e=lc(t),n=a.useRef(null),{triggerProps:r,tooltipProps:l}=yv(t,e,n);return a.createElement(Ft,{values:[[ml,e],[Dc,{...l,triggerRef:n}]]},a.createElement(hf,{...r,ref:n},t.children))}const I0=a.forwardRef(function({UNSTABLE_portalContainer:e,...n},r){[n,r]=ut(n,r,Dc);let l=a.useContext(ml),o=lc(n),i=n.isOpen!=null||n.defaultOpen!=null||!l?o:l,u=zo(r,i.isOpen)||n.isExiting||!1;return!i.isOpen&&!u?null:a.createElement($p,{portalContainer:e},a.createElement(F0,{...n,tooltipRef:r,isExiting:u}))});function F0(t){let e=a.useContext(ml),n=a.useRef(null),[r,l]=a.useState(0);Y(()=>{n.current&&e.isOpen&&l(n.current.getBoundingClientRect().width)},[e.isOpen,n]);let{overlayProps:o,arrowProps:i,placement:u}=bi({placement:t.placement||"top",targetRef:t.triggerRef,overlayRef:t.tooltipRef,offset:t.offset,crossOffset:t.crossOffset,isOpen:e.isOpen,arrowSize:r,arrowBoundaryOffset:t.arrowBoundaryOffset,shouldFlip:t.shouldFlip,onClose:()=>e.close(!0)}),s=jo(t.tooltipRef,!!u)||t.isEntering||!1,c=bt({...t,defaultClassName:"react-aria-Tooltip",values:{placement:u,isEntering:s,isExiting:t.isExiting,state:e}});t=V(t,o);let{tooltipProps:f}=gv(t,e);return a.createElement("div",{...f,ref:t.tooltipRef,...c,style:{...o.style,...c.style},"data-placement":u??void 0,"data-entering":s||void 0,"data-exiting":t.isExiting||void 0},a.createElement(pl.Provider,{value:{...i,placement:u,ref:n}},c.children))}function kc({renderTrigger:t,menuId:e,size:n=24,title:r,items:l,disabled:o,onClose:i,testId:u="MenuTrigger-Trigger",menuTestId:s,onSelectionChange:c,selectedKey:f,disabledKeys:d}){const{className:p,style:v}=Ce(),h=Tt.useBreakpoint(Te.BREAKPOINTS.SMALL),g=sl({}),{isOpen:E,setOpen:x}=g,C=a.useRef(null),{menuTriggerProps:w,menuProps:T}=rl({type:"menu"},g,C),{pressProps:S}=je({onPress:()=>x(!0),isDisabled:o,ref:C}),P={"data-testid":u,"aria-label":"Menu"},I={isOpen:E,disabled:o,triggerRef:C,domTriggerProps:{...S,...P},ariaTriggerProps:{...w,...P,onPress:()=>x(!0)}};function N(m){const K=Array.from(m)[0];K&&(c==null||c(K))}const B=y.jsx($c,{...P,...w,isDisabled:o,className:j.csx("proton-MenuTrigger__button"),ref:C,children:y.jsx(_0,{size:n})}),A=t?t(I):B;return a.useEffect(()=>()=>{E&&(i==null||i())},[E,i]),h?y.jsxs(y.Fragment,{children:[A,E&&y.jsx(al,{id:e,actions:l,title:r,isOpen:E,onClose:()=>x(!1),showCancel:!0,"data-testid":s,selectionMode:"single",onSelectionChange:N,selectedKeys:f?[f]:void 0,disabledKeys:d})]}):y.jsxs(T0,{onOpenChange:x,isOpen:E,children:[A,y.jsx(Cc,{className:j.csx("proton-Popover",p),style:v,triggerRef:C,children:y.jsx(wc,{items:l,className:j.csx("proton-ListBox","proton-MenuTrigger__menu"),selectionMode:"single",onSelectionChange:N,selectedKeys:f?[f]:void 0,disabledKeys:d,children:y.jsxs(K0,{children:[r&&y.jsx(S0,{className:"proton-MenuTrigger__menu-header",children:r}),l.map(m=>Tc(m,p,v,d))]})})})]})}function Tc(t,e,n,r){var o;let l=((o=t.label)==null?void 0:o.toString())||"";return t.children?y.jsxs(A0,{children:[y.jsx(ko,{textValue:l,children:t.label}),y.jsx(Cc,{className:j.csx("proton-Popover",e),style:n,children:y.jsx(wc,{items:t.children,className:"proton-ListBox proton-MenuTrigger__menu",disabledKeys:r,children:i=>Tc(i,e,n)})})]},t.key):y.jsxs(ko,{textValue:l,onAction:()=>{var i;return(i=t.onAction)==null?void 0:i.call(t,t.key)},isDisabled:r==null?void 0:r.includes(t.key),children:[y.jsx(So,{slot:"label",children:t.label}),y.jsx(So,{slot:"description",children:t.description})]},t.key)}function ko(t){return y.jsx(M0,{...t,className:({isFocused:e,isSelected:n,isOpen:r})=>j.csx("proton-ListBox__item proton-MenuTrigger__menu-item",e&&"focused",r&&"open"),children:({hasSubmenu:e})=>y.jsxs(y.Fragment,{children:[t.children,e&&y.jsx("svg",{className:"proton-MenuTrigger__chevron",viewBox:"0 0 256 256",children:y.jsx("path",{fill:"currentColor",d:"m184.49 136.49l-80 80a12 12 0 0 1-17-17L159 128L87.51 56.49a12 12 0 1 1 17-17l80 80a12 12 0 0 1-.02 17"})})]})})}const _0=({size:t})=>y.jsx("svg",{viewBox:"0 0 24 24",width:t,height:t,children:y.jsx("path",{fill:"currentColor",d:"M4 14c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm8 0c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2z"})}),Ac=44;function L0({items:t,defaultValue:e,children:n,onSelectionChange:r,disabledKeys:l,selectedKey:o,icon:i,variant:u,fullWidth:s,onPress:c,...f}){return y.jsxs("div",{className:j.csx("proton-ButtonWithSelect"),children:[y.jsx(It,{...f,onPress:c,icon:i,fullWidth:s,variant:u,"data-testid":"ButtonWithSelect-Button",__textShift:s?Ac/2:void 0,children:n}),y.jsx(kc,{items:t,disabled:f.isDisabled,disabledKeys:l,onSelectionChange:r,selectedKey:o,renderTrigger:({triggerRef:d,ariaTriggerProps:p})=>y.jsx(O0,{...f,...p,variant:u,ref:d})})]})}const O0=a.forwardRef((t,e)=>y.jsx("div",{className:"proton-ButtonWithSelect__trigger",style:{width:Ac},children:y.jsx(It,{...t,"data-testid":"ButtonWithSelect-Trigger",ref:e,children:y.jsx("div",{className:"proton-ButtonWithSelect__trigger-content",children:y.jsx(qn,{id:"chevron-down",size:16})})})}));function j0({title:t,children:e,...n}){let r=a.useRef(null),{dialogProps:l,titleProps:o}=Ju(n,r);return y.jsxs("div",{...l,ref:r,className:"proton-Dialog",children:[t&&y.jsx("h3",{...o,className:"proton-Dialog__header",children:t}),e]})}const z0=({children:t,hasPrimaryGradient:e=!1,"data-testid":n})=>{const{theme:r,palette:l,style:o}=Ce(),i=o["--proton-control__background-color-light"];let u=i,s=Be.transparentize(i,.01);if(r===Te.THEMES.CUSTOM_DARK&&(u=Be.transparentize(i,.1),s=Be.transparentize(i,.12),e)){const c=Be.transparentize(l.PRIMARY.PRIMARY_MEDIUM_LIGHT,.88),f=Be.transparentize(l.PRIMARY.PRIMARY_LIGHT,.84);u=Be.mix(u,c,.15),s=Be.mix(s,f,.15)}return y.jsx("div",{className:"proton-Elevation","data-testid":n,role:"presentation","aria-label":"Elevated content area",style:{background:`linear-gradient(to top left, ${u}, ${s})`},children:t})};function V0(t){const[e,n]=a.useState("");return a.useEffect(()=>{},[]),e?y.jsxs(y.Fragment,{children:[y.jsx("div",{dangerouslySetInnerHTML:{__html:e},style:{display:"none"}}),y.jsx(qn,{...t})]}):null}const H0=t=>{const[e,n,r]=t,l=e+n+r;if(l<65){const o=l/100;return`rgba(255, 255, 255, ${Math.max(.14,.36-o)})`}return""};function W0({image:t,imageUrl:e="",onLoad:n}){const{palette:r}=Ce(),l=Be.parseToRgba(r.BASE_COLOR),o=H0(l);return y.jsxs("div",{id:"image-background","aria-label":"Background overlay",role:"dialog","aria-modal":"true",className:"proton-ScreenOverlay__background",children:[t?y.jsx("div",{"aria-hidden":"true",children:t}):y.jsx("img",{alt:"",src:e,className:"proton-ScreenOverlay__image",onLoad:i=>n==null?void 0:n(i.currentTarget),"aria-hidden":"true"}),y.jsx("div",{className:"proton-ScreenOverlay__blur","aria-hidden":"true",style:{background:o}})]})}const Rc=async(t,e)=>{let n=!1;if(navigator.clipboard)try{await navigator.clipboard.writeText(t),n=!0}catch(r){e?e==null||e(r):console.error(r)}else n=U0(t);return n||(e?e==null||e(new Error("Failed to copy to clipboard")):console.error("Failed to copy to clipboard")),n},U0=(t,{target:e=document.body}={})=>{if(typeof t!="string")throw new TypeError(`Expected parameter \`text\` to be a \`string\`, got \`${typeof t}\`.`);const n=document.createElement("textarea"),r=document.activeElement;n.value=t,n.setAttribute("readonly",""),n.style.contain="strict",n.style.position="absolute",n.style.left="-9999px",n.style.fontSize="12pt";const l=document.getSelection(),o=l.rangeCount>0&&l.getRangeAt(0);e.append(n),n.select(),n.selectionStart=0,n.selectionEnd=t.length;let i=!1;try{i=document.execCommand("copy")}catch{}return n.remove(),o&&(l.removeAllRanges(),l.addRange(o)),r instanceof HTMLElement&&r.focus(),i},Jn=a.forwardRef(({prefix:t,suffix:e,description:n,descriptionPosition:r="top",isDisabled:l,error:o,onChange:i,label:u,name:s,placeholder:c,type:f="text",value:d,autoFocus:p,autoComplete:v,"data-testid":h},g)=>{const E=a.useRef(null),x=a.useRef(null),C=a.useRef(null),w=a.useRef(null),{className:T}=Ce(),S=g||E,{labelProps:P,inputProps:I,descriptionProps:N,errorMessageProps:B}=pi({label:u,name:s,type:f,autoFocus:p,autoComplete:v?"on":"off","aria-label":u||s,"aria-describedby":o?`${s}-input-error`:`${s}-input`,errorMessage:o,isDisabled:l,placeholder:u?void 0:c,validationState:o?"invalid":"valid",value:d,onChange:i,onCopy:async()=>{var A;await Rc((A=E.current)==null?void 0:A.value)}},S);return a.useEffect(()=>{if(!w.current)return;const A=()=>{var K,F;if(w.current){const k=w.current.offsetWidth||200;w.current.style.setProperty("--container-width",`${k}px`)}if(x.current){const k=x.current.offsetWidth||32;(K=w.current)==null||K.style.setProperty("--prefix-width",`${k}px`)}if(C.current){const k=C.current.offsetWidth||32;(F=w.current)==null||F.style.setProperty("--suffix-width",`${k}px`)}};A();const m=new ResizeObserver(A);return w.current&&m.observe(w.current),x.current&&m.observe(x.current),C.current&&m.observe(C.current),()=>{m.disconnect()}},[t,e]),y.jsxs("div",{className:"proton-Input__container",ref:w,children:[n&&r==="top"&&y.jsx("div",{...N,className:"proton-Input__text",children:n}),y.jsxs("div",{className:"proton-Input__container-inner",children:[t&&y.jsx("div",{ref:x,className:j.csx("proton-Input__descriptor","proton-Input__prefix"),children:t}),y.jsx("input",{...I,"data-testid":h,id:`${s}-input`,"aria-invalid":!!o,ref:S,className:j.csx("proton-Input",o&&"proton-Input--error",u&&"proton-Input__label-top",T)}),y.jsx("label",{...P,className:j.csx("proton-Input__label",d&&"proton-Input__label--filled"),children:u}),e&&y.jsx("div",{ref:C,className:j.csx("proton-Input__descriptor","proton-Input__suffix"),children:e})]}),o?y.jsx("div",{...B,role:"alert",className:j.csx("proton-Input__error","proton-Input__text"),id:`${s}-error`,children:o}):n&&r==="bottom"?y.jsx("div",{...N,className:"proton-Input__text",children:n}):null]})});Jn.displayName="Input";function G0({name:t,value:e,isDisabled:n,onError:r,onSuccess:l}){const[o,i]=a.useState(!1);return y.jsx(Jn,{name:t,value:e,isDisabled:n,suffix:y.jsx(Y0,{isCopied:o,onClick:async()=>{await Rc(e,r)&&(i(!0),l==null||l(),setTimeout(()=>i(!1),5e3))}})})}const Y0=({isCopied:t,onClick:e})=>y.jsx("div",{className:"proton-CopyInput-button-container",onClick:e,children:y.jsxs("button",{"data-testid":"COPY_BUTTON",className:j.csx("proton-CopyInput-button",t&&"proton-CopyInput-button--copied"),children:[y.jsxs("svg",{xmlns:"http://www.w3.org/2000/svg",width:"12",height:"12",viewBox:"0 0 512 512",children:[y.jsx("path",{fill:"currentColor",d:"M408 480H184a72 72 0 0 1-72-72V184a72 72 0 0 1 72-72h224a72 72 0 0 1 72 72v224a72 72 0 0 1-72 72"}),y.jsx("path",{fill:"currentColor",d:"M160 80h235.88A72.12 72.12 0 0 0 328 32H104a72 72 0 0 0-72 72v224a72.12 72.12 0 0 0 48 67.88V160a80 80 0 0 1 80-80"})]}),y.jsx("span",{className:j.csx("proton-CopyInput-button-text",t&&"proton-CopyInput-button-text--copied"),children:t?"Copied!":"Copy"})]})}),q0=({name:t="search",placeholder:e="Search...",autoComplete:n,isClearable:r=!0,isDisabled:l=!1,error:o,defaultValue:i,value:u,"data-testid":s="proton-SearchInput",onChange:c,onClear:f})=>{const d=kv({defaultValue:i,value:u,onChange:C=>c==null?void 0:c(C),onClear:()=>f==null?void 0:f(),label:e}),p=a.useRef(null),{inputProps:v,clearButtonProps:h}=nv({...d,placeholder:e,"aria-label":e},d,p),{value:g,setValue:E}=d,x=()=>{f&&f(),c==null||c(""),E("")};return y.jsx("div",{className:"proton-SearchInput__wrapper","data-testid":s,role:"search",children:y.jsx(Jn,{...v,type:"search",onChange:C=>d.setValue(C),value:g,name:t,placeholder:e,autoComplete:n,error:o,ref:p,isDisabled:l,prefix:y.jsxs("svg",{"aria-hidden":"true",width:"2.8em",height:"1.6em",viewBox:"0 0 24 24",onClick:()=>{var C;return(C=p.current)==null?void 0:C.focus()},children:[y.jsx("title",{children:"Magnifying Glass"}),y.jsx("path",{fill:"currentColor",d:"M10.5 18.5a8 8 0 1 1 0-16 8 8 0 0 1 0 16Zm0-1a7 7 0 1 0 0-14 7 7 0 0 0 0 14Zm5.25-.75 4.5 4.5-1.25 1.25-4.5-4.5 1.25-1.25Z"})]}),suffix:y.jsx("button",{"aria-label":h["aria-label"],type:"button",className:j.csx("proton-SearchInput__button","proton-Input__descriptor","proton-Input__suffix",!(r&&(g==null?void 0:g.length)>0)&&"proton-SearchInput__button--hide"),"data-testid":`${s}-clear`,onClick:()=>{var C;x(),(C=p.current)==null||C.focus()},children:y.jsxs("svg",{"aria-hidden":"true",viewBox:"0 0 50 50",width:"3.2em",height:"1.2em",children:[y.jsx("title",{children:"Clear"}),y.jsx("path",{fill:"currentColor",d:"m37.304 11.282l1.414 1.414l-26.022 26.02l-1.414-1.413z"}),y.jsx("path",{fill:"currentColor",d:"m12.696 11.282l26.022 26.02l-1.414 1.415l-26.022-26.02z"})]})})})})},Bc=({children:t})=>y.jsx("h2",{className:"proton-Modal__title",children:t}),Kc=({children:t})=>y.jsx("h3",{className:"proton-Modal__subtitle",children:t}),Mc=({children:t})=>y.jsx("div",{className:"proton-Modal__body",children:t}),X0=t=>y.jsx("div",{className:"proton-Modal__action",children:y.jsx(It,{...t})}),Z0=({children:t})=>y.jsx(on,{autoFocus:!0,children:y.jsx("div",{className:"proton-Modal__actions",children:t})}),J0=({title:t,subtitle:e,body:n,onClose:r,children:l,isClosing:o,"data-testid":i})=>{const u=a.useRef(null),s=Nt({isOpen:!0,onOpenChange:r}),{modalProps:c}=Cp({isDismissable:!1},s,u),{dialogProps:f}=Ju({role:"dialog"},u);el();const d=a.useRef(null),{buttonProps:p}=ln({onPress:r,"aria-label":"Close"},d);return y.jsx(on,{contain:!0,restoreFocus:!0,autoFocus:!0,children:y.jsxs("div",{"data-testid":i,className:j.csx("proton-Modal",o&&"proton-Modal--closing"),...V(c,f),ref:u,children:[y.jsx("button",{name:"Close",className:"proton-Modal__close-button",...p,ref:d,children:"×"}),t&&y.jsx(Bc,{children:t}),e&&y.jsx(Kc,{children:e}),n&&y.jsx(Mc,{children:n}),y.jsx("div",{className:"proton-Modal__content",children:l})]})})},Q0=({isOpen:t,onClose:e,title:n,subtitle:r,body:l,children:o,isOverlay:i=!0,"data-testid":u})=>{const s=a.useRef(null),{isClosing:c,handleClose:f}=Tt.useIsClosing({onClose:e,overlayRef:s}),d=Tt.useBreakpoint(Te.BREAKPOINTS.MEDIUM);if(!t)return null;const p=y.jsx(J0,{isOpen:t,title:n,subtitle:r,body:l,onClose:f,isClosing:c,"data-testid":u,children:o});return i||d?y.jsx(Yn,{fadeIn:!0,ref:s,onClose:f,children:p}):p},eh=Object.assign(Q0,{Title:Bc,Subtitle:Kc,Body:Mc,Action:X0,Actions:Z0});function th(t){const e=a.useRef(null),n=Nt(t||{}),{triggerProps:r,overlayProps:l}=gi({type:"dialog"},n,e),{buttonProps:o}=ln(r,e);return{buttonProps:o,overlayProps:l,buttonRef:e,state:n}}function Nc({children:t,state:e,arrow:n=!1,offset:r,...l}){const o=a.useRef(null),{popoverRef:i=o}=l,{className:u,style:s}=Ce();let{popoverProps:c,underlayProps:f,arrowProps:d,placement:p}=nu({...l,offset:r,popoverRef:i},e);return y.jsxs(Rn,{children:[y.jsx("div",{...f,style:{position:"fixed",inset:0}}),y.jsxs("div",{...c,ref:i,className:j.csx("proton-Popover",u),style:{...c.style,...s},"data-testid":l["data-testid"]||void 0,"data-placement":p,"data-entering":!0,children:[y.jsx(Mr,{onDismiss:e.close}),n&&y.jsxs("svg",{...d,className:"arrow","data-placement":p,viewBox:"0 0 12 12",children:[y.jsx("title",{children:"arrow"}),y.jsx("path",{d:"M0 0 L6 6 L12 0"})]}),t]})]})}const nh=t=>{let e=a.useRef(null),{state:n}=t,{listBoxProps:r}=Ap(t,n,e);return y.jsx("ul",{...r,ref:e,"data-testid":"listbox",className:"proton-ListBox",children:[...n.collection].map(l=>y.jsx(rh,{item:l,state:n},l.key))})};function rh({item:t,state:e}){let n=a.useRef(null),{optionProps:r,isSelected:l,isFocused:o,isDisabled:i}=Np({key:t.key},e,n);return y.jsx("li",{...r,className:"proton-ListBox__item",ref:n,children:t.rendered})}const lh=a.forwardRef((t,e)=>{let{buttonProps:n}=ln({...t,isDisabled:t.disabled},e);return y.jsx("button",{...n,ref:e,className:j.csx("proton-Select__trigger",t.disabled&&"proton-Select__trigger--disabled",!t.isOpen&&"proton-Select__trigger--closed",t.isOpen&&"proton-Select__trigger--opened"),children:t.children})});function oh({label:t,name:e,isDisabled:n,disabledKeys:r,selectedKey:l,onSelectionChange:o,defaultSelectedKey:i,onOpen:u,onClose:s,items:c,"data-testid":f}){const d={label:t,isDisabled:n,disabledKeys:r,selectedKey:l,defaultSelectedKey:i,onSelectionChange:o,onOpenChange:S=>{S?u==null||u():s==null||s()},"data-testid":f,children:c.map(S=>y.jsx(du,{textValue:S.label,children:S.label},S.key))},p=Tv(d),v=Tt.useBreakpoint(Te.BREAKPOINTS.MEDIUM),h=a.useRef(null),g=a.useRef(null),{labelProps:E,triggerProps:x,valueProps:C,menuProps:w}=rv({...d,label:t||e},p,h);a.useEffect(()=>{p.isOpen&&g.current&&h.current&&!g.current.style.minWidth&&(g.current.style.minWidth=`${h.current.offsetWidth}px`)},[p.isOpen]);const T=c.map(S=>({key:S.key,label:S.label,to:S.to,onAction:()=>{p.setSelectedKey(S.key),p.close()}}));return y.jsxs("div",{className:"proton-Select","aria-label":t||e,"aria-disabled":n,children:[t?y.jsx("div",{...E,className:"proton-Select__label","data-testid":"select-label",children:t}):y.jsx("div",{...E}),y.jsx(ov,{isDisabled:n,state:p,triggerRef:h,label:t||e,name:e,"data-testid":"hidden-select-container"}),y.jsxs(lh,{...x,isOpen:p.isOpen,ref:h,disabled:n,"data-testid":f,children:[y.jsx("div",{...C,className:"proton-Select__value",children:p.selectedItem?p.selectedItem.rendered:"Select an option"}),y.jsx("div",{className:j.csx("proton-Select__trigger_icon",p.isOpen&&"proton-Select__trigger_icon--flipped"),"aria-hidden":"true",children:y.jsxs("svg",{id:"caret-down",viewBox:"0 0 512 512",children:[y.jsx("title",{children:p.isOpen?"caret down":"caret up"}),y.jsx("path",{fill:"currentColor",d:"M233.4 406.6c12.5 12.5 32.8 12.5 45.3 0l192-192c12.5-12.5 12.5-32.8 0-45.3s-32.8-12.5-45.3 0L256 338.7L86.6 169.4c-12.5-12.5-32.8-12.5-45.3 0s-12.5 32.8 0 45.3l192 192z"})]})})]}),p.isOpen&&y.jsx(y.Fragment,{children:v?y.jsx(al,{isOpen:p.isOpen,onClose:()=>p.close(),actions:T,selectedKeys:[p.selectedKey.toString()],disabledKeys:r}):y.jsx("div",{className:"proton-Select__popover",children:y.jsx(Nc,{state:p,triggerRef:h,popoverRef:g,placement:"bottom start","data-testid":"select-popover",children:y.jsx(nh,{...w,state:p})})})})]})}function ih(t){let e={...t,isSelected:t.isOn,"data-testid":void 0},n=a.useRef(null),r=ep(e),{inputProps:l}=iv(e,r,n);return y.jsxs("label",{className:j.csx("proton-Switch",t.isDisabled&&"proton-Switch--disabled",r.isSelected&&"proton-Switch--on"),"data-on":r.isSelected||void 0,"data-disabled":t.isDisabled||void 0,"data-testid":t["data-testid"]||void 0,"aria-label":t.label||void 0,children:[y.jsx(Qr,{children:y.jsx("input",{...l,ref:n})}),t.label&&y.jsx("div",{className:"proton-Switch__label",children:t.label}),y.jsxs("div",{className:"proton-Switch__wrapper",children:[y.jsx("div",{className:"proton-Switch__toggle",children:y.jsx("div",{className:"proton-Switch__slider"})}),t.children&&y.jsx("div",{className:"proton-Switch__description",children:t.children})]})]})}function uh({item:t,state:e,children:n}){let r=a.useRef(),{rowProps:l}=hv({node:t},e);return y.jsx("tr",{className:j.csx("proton-Table__headerRow"),...l,ref:r,children:n})}function sh({column:t,state:e}){var s,c;let n=a.useRef(),{columnHeaderProps:r}=pv({node:t},e,n);const{align:l="left"}=t.props;let{isFocusVisible:o,focusProps:i}=Wn(),u=((s=e.sortDescriptor)==null?void 0:s.direction)==="ascending"?"▲":"▼";return y.jsxs("th",{...V(r,i),colSpan:t.colspan,className:j.csx("proton-Table__header",`proton-Table__header--${l}`,o?"proton-Table__header--focused":null),ref:n,children:[t.rendered,t.props.allowsSorting&&y.jsx("span",{"aria-hidden":"true",className:j.csx("proton-Table__headerSortIcon"),style:{visibility:((c=e.sortDescriptor)==null?void 0:c.column)===t.key?"visible":"hidden"},children:u})]})}function To({type:t,children:e,isHidden:n=!1}){let{rowGroupProps:r}=mv();return y.jsx(t,{...r,className:j.csx("proton-Table__rowGroup",t==="thead"?"proton-Table__rowGroup--header":"proton-Table__rowGroup--body"),style:n?{display:"none"}:void 0,children:e})}function ah({item:t,children:e,state:n,backgroundColor:r,onClick:l,showLines:o=!0}){let i=a.useRef(),u=n.selectionManager.isSelected(t.key),{rowProps:s,isPressed:c}=vv({node:t},n,i),{isFocusVisible:f,focusProps:d}=Wn();return y.jsx("tr",{className:j.csx("proton-Table__row",u?"proton-Table__row--selected":null,c?"proton-Table__row--pressed":null,f?"proton-Table__row--focused":null,o&&"proton-Table__row--showLines",l&&"proton-Table--clickable"),style:r?{backgroundColor:r}:void 0,...V(s,d),ref:i,onClick:l?()=>l(t.key):void 0,children:e})}function ch({cell:t,state:e,width:n,onClick:r}){let l=a.useRef(),{gridCellProps:o}=bv({node:t},e,l),{isFocusVisible:i,focusProps:u}=Wn();const{align:s="left"}=t.props;return y.jsx("td",{...V(o,u),className:j.csx("proton-Table__cell",i?"proton-Table__cell--focused":null,`proton-Table__cell--${s}`,r&&"proton-Table--clickable"),style:n?{width:n}:void 0,ref:l,onClick:r?()=>r(t.key):void 0,children:t.rendered})}const dh=_v,fh=Ov,ph=Lv,vh=Fv;function hh(t){var o;let e=Nv({...t}),n=a.useRef(),{collection:r}=e,{gridProps:l}=dv({...t,"aria-label":t["aria-label"]||"Table"},e,n);return y.jsxs("table",{...l,ref:n,className:j.csx("proton-Table"),children:[y.jsx(To,{type:"thead",isHidden:(o=t.headerProps)==null?void 0:o.isHidden,children:r.headerRows.map(i=>y.jsx(uh,{item:i,state:e,children:Array.from(r.getChildren(i.key)).map(u=>y.jsx(sh,{column:u,state:e},u.key))},i.key))}),y.jsx(To,{type:"tbody",children:Array.from(r.body.childNodes).map(i=>y.jsx(ah,{item:i,state:e,backgroundColor:i.props.backgroundColor,showLines:r.body.props.showLines,onClick:i.props.onClick,children:Array.from(r.getChildren(i.key)).map(u=>y.jsx(ch,{cell:u,state:e,width:u.props.width,onClick:u.props.onClick},u.key))},i.key))})]})}const bh=({children:t,maxWidth:e,singleLine:n=!0,lines:r=1,title:l,"data-testid":o})=>y.jsx("div",{className:j.csx("proton-TextEllipsis",n||r===1?"proton-TextEllipsis--single-line":r>1?"proton-TextEllipsis--multi-line":""),style:{maxWidth:e,WebkitLineClamp:r},title:l,"data-testid":o,children:t});function Ic({children:t,arrow:e,...n}){const{style:r,className:l}=Ce();return y.jsxs(I0,{...n,className:j.csx("proton__Tooltip","proton-Dialog",l),style:r,children:[e&&y.jsx(P0,{className:j.csx("proton__TooltipArrow",l),children:y.jsx("svg",{width:8,height:8,viewBox:"0 0 8 8",children:y.jsx("path",{d:"M0 0 L4 4 L8 0"})})}),t]})}function Fc({children:t,delay:e=500,closeDelay:n=500,isDisabled:r,defaultOpen:l,onOpenChange:o,disableTriggerClick:i,content:u,...s}){const[c,f]=a.useState(!1),d=a.useRef(!1),p=a.useRef(!1);return u===""?null:y.jsxs(N0,{delay:e,closeDelay:n,isDisabled:r,isOpen:c,defaultOpen:l,onOpenChange:v=>{v&&!d.current&&(p.current=!0),o&&o(v),d.current||f(v),d.current=!1},children:[i?y.jsx("span",{className:"proton__TooltipTrigger","aria-label":"Show tooltip",children:t}):y.jsx($c,{className:"proton__TooltipTrigger","aria-label":"Show tooltip",onPress:()=>{i||r||p.current||(d.current=!0,f(!c))},children:t}),y.jsx(Ic,{...s,children:u})]})}const mh=({to:t,children:e,tooltipProps:n,"data-testid":r})=>{const{className:l}=Ce(),o=n?y.jsx(Fc,{delay:50,closeDelay:75,...n,children:e}):e;if(t){const i=j.isUrlExternal(t);return y.jsx("span",{className:j.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),children:y.jsx("a",{"data-testid":r,href:t,target:i?"_blank":void 0,rel:i?"noopener noreferrer":void 0,onClick:i?void 0:u=>j.handleInternalNavigation(u,t),children:o})})}return y.jsx("span",{className:j.csx("proton-TextEmphasis",n&&"proton-TextEmphasis--tooltip",l),"data-testid":r,children:o})},gh=({width:t="100%",height:e="1.5rem",borderRadius:n="4px"})=>{const{theme:r,palette:l}=Ce(),o={"--tombstone-custom-background":l.PRIMARY.PRIMARY_MEDIUM,"--tombstone-custom-primary":j.transparentize(l.PRIMARY.PRIMARY_DARK,.9),"--tombstone-custom-secondary":j.transparentize(l.SECONDARY.SECONDARY_DARK,.7)};return y.jsx("div",{className:`tombstone ${r}`,style:{...o,width:t,height:e,borderRadius:n}})};function yh({amplitude:t,isDisabled:e,isPlayed:n,isHovered:r,isVisible:l,hasAnimated:o,resolution:i,spacing:u,index:s}){const c=l?`${Math.max(t*100,4)}%`:"0%";return y.jsxs("div",{className:j.csx("proton-Waveform__bar-wrapper"),style:{width:`${i}px`,marginRight:`${u}px`},children:[y.jsx("div",{className:j.csx("proton-Waveform__bar","proton-Waveform__bar--upper",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",o&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":s}}),y.jsx("div",{className:j.csx("proton-Waveform__bar","proton-Waveform__bar--lower",e&&"proton-Waveform__bar--disabled",n&&"proton-Waveform__bar--played",l&&"proton-Waveform__bar--visible",o&&"proton-Waveform__bar--animated"),style:{"--target-height":`calc(${c} / 2)`,"--index":s}}),r&&!e&&!n&&y.jsx("div",{className:"proton-Waveform__bar--hover",style:{"--hover-height":c}})]})}const $h=wh(100);function xh({data:t,resolution:e=2,startDuration:n,endDuration:r,currentTime:l=0,showTimestamps:o=!1,totalDuration:i,disabled:u,disabledMessage:s,onClick:c,"data-testid":f}){var F;const{className:d}=Ce(),p=a.useRef(null),[v,h]=a.useState([]),[g,E]=a.useState(null),[x,C]=a.useState(!1),[w,T]=a.useState(!1),S=t||$h,P=e;a.useEffect(()=>{if(!p.current)return;const k=R=>{const D=Math.floor(R/(e+P)),O=Ch(S,D);h(O)},L=p.current.clientWidth;k(L);const b=new ResizeObserver(R=>{R&&R[0]&&k(R[0].contentRect.width)});return b.observe(p.current),()=>b.disconnect()},[S,e,P]),a.useEffect(()=>{const k=setTimeout(()=>C(!0),50),L=setTimeout(()=>T(!0),500);return()=>{clearTimeout(k),clearTimeout(L)}},[]);const I=k=>{if(!p.current)return;const L=p.current.getBoundingClientRect(),R=(k.clientX-L.left)/L.width*i;E(R)},N=()=>{E(null)},B=e+P,A=(k,L)=>{var D;const b=k/i*100;return(L==="start"?Math.floor(b/100*v.length):Math.ceil(b/100*v.length))*B/((D=p.current)==null?void 0:D.clientWidth)*100},m=(F=p.current)==null?void 0:F.clientWidth,K=a.useMemo(()=>u&&s?s:t?null:"Waveform Unavailable",[u,s,t]);return y.jsxs("div",{className:j.csx("proton-Waveform",d),"data-testid":f,children:[o&&y.jsx(Ao,{direction:"left",seconds:l}),y.jsxs("div",{ref:p,className:"proton-Waveform__container",onMouseMove:I,onMouseLeave:N,onClick:k=>{if(!p.current||u)return;const L=p.current.getBoundingClientRect(),R=(k.clientX-L.left)/L.width*i;c==null||c(R,k)},"data-disabled":u,"data-testid":"waveform-container",children:[n!==void 0&&r!==void 0&&y.jsx("div",{className:"proton-Waveform__active-region",style:{left:p.current?`calc(${A(n,"start")}%`:"0%",right:p.current?`calc(${100-A(r,"end")}% - 2px)`:"0%"}}),g!==null&&y.jsx("div",{className:"proton-Waveform__hover-line",style:{left:`${g/i*100}%`}}),v.map((k,L)=>{const b=L/v.length*i,R=n!==void 0&&r!==void 0&&(b<n||b>r),D=l===0?!1:b<=l,O=g!==null&&b<=g;return y.jsx(yh,{amplitude:k,isDisabled:u||R,isPlayed:D,isHovered:O,isVisible:x,hasAnimated:w,resolution:e,spacing:P,index:L},L)})]}),K&&y.jsx("div",{className:"proton-Waveform__bar-unavailable",style:{fontSize:m<325?"0.85rem":"1rem"},children:K}),o&&y.jsx(Ao,{direction:"right",seconds:i})]})}function Ao({direction:t,seconds:e}){return y.jsx("div",{className:j.csx("proton-Waveform__timestamp",`proton-Waveform__timestamp--${t}`),children:Eh(e)})}function Eh(t){const e=Math.floor(t/60),n=Math.floor(t%60);return`${e}:${n<10?"0":""}${n.toFixed(0)}`}function Ch(t,e){const n=t.length,r=n/e,l=new Array(e).fill(0).map((o,i)=>{const u=i*r,s=Math.floor(u),c=Math.min(s+1,n-1),f=u-s;return t[s]*(1-f)+t[c]*f});return Sh(l)}function Sh(t){const e=Math.min(...t),n=Math.max(...t);return t.map(r=>{const l=(r-e)/(n-e);return Math.max(l*.8+.1,.1)})}function wh(t){return Array.from({length:t},(e,n)=>{const l=n/(t-1)*6*2*Math.PI-Math.PI/2;return Math.sin(l)*.5+.5})}exports.ActionMenu=al;exports.Badge=Zv;exports.BadgeVariants=Xv;exports.Banner=Ze;exports.Button=It;exports.ButtonGroup=cc;exports.ButtonWithSelect=L0;exports.Cell=fh;exports.Column=dh;exports.CopyInput=G0;exports.Dialog=j0;exports.Elevation=z0;exports.Icon=V0;exports.ImageBackground=W0;exports.Input=Jn;exports.MenuTrigger=kc;exports.Modal=eh;exports.Popover=Nc;exports.Row=ph;exports.ScreenOverlay=Yn;exports.SearchInput=q0;exports.Section=Bp;exports.Select=oh;exports.Switch=ih;exports.Table=hh;exports.TableBody=vh;exports.TableHeader=Iv;exports.TextEllipsis=bh;exports.TextEmphasis=mh;exports.ThemeProvider=uc;exports.Tombstone=gh;exports.Tooltip=Ic;exports.TooltipTrigger=Fc;exports.Waveform=xh;exports.usePopoverTrigger=th;exports.useTheme=Ce;
47
47
  //# sourceMappingURL=index.cjs.js.map