1(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,191238,259402,e=>{"use strict";var t=e.i(843476),n=e.i(271645),r=e.i(458607),i=e.i(268283),l=e.i(511181),o=e.i(792908),s=e.i(768834),a=e.i(579473);let u=e=>{let t={},n={};return e.forEach(e=>{e._id&&e.name&&(t[e.name]=e._id,n[e._id]=e.name)}),{nameToId:t,idToName:n}},c=(0,s.create)()((0,a.persist)((e,t)=>({filterCache:{},brandMapping:{},availableBrands:[],availableSizes:[],isLoading:!1,activeSizeType:"RU",currentContextKey:null,setCurrentContext:(n,r)=>{let i=t(),l=r?`category:${r}`:`search:${n}`;if(i.currentContextKey===l)return;let o=i.filterCache[l];o&&e({availableBrands:o.brands,availableSizes:o.sizes,currentContextKey:l,isLoading:!1})},loadFilterData:async(n,r)=>{let i=t(),l=r?`category:${r}`:`search:${n}`;if(i.isLoading)return;let o=i.filterCache[l];if(o&&Date.now()-o.timestamp<3e5){let t=i.brandMapping[l]||u(o.brands);e({availableBrands:o.brands,availableSizes:o.sizes,currentContextKey:l,brandMapping:{...i.brandMapping,[l]:t},isLoading:!1});return}e({isLoading:!0,currentContextKey:l});try{let t="/api/home/filter-details";r&&(t+=`?categoryId=${r}`);let n=await fetch(t);if(!n.ok)throw Error(`HTTP ${n.status}`);let o=await n.json(),s=o?.data||{},a=new Map;(s.brands||[]).forEach(e=>{let t=a.get(e._id);t?t.productCount+=e.productCount:a.set(e._id,{...e})});let c=Array.from(a.values()).sort((e,t)=>t.productCount-e.productCount),d=(s.sizes||[]).map(e=>({...e,values:Array.from(new Set(e.values)).filter(e=>e&&""!==e.trim()).sort((e,t)=>{let n=parseFloat(e.replace(",",".")),r=parseFloat(t.replace(",","."));return isNaN(n)||isNaN(r)?e.localeCompare(t,void 0,{numeric:!0}):n-r})})),f={brands:c,sizes:d,timestamp:Date.now()},p=u(c),m={...i.filterCache,[l]:f},h=Object.entries(m);if(h.length>50){let e=h.sort((e,t)=>e[1].timestamp-t[1].timestamp)[0][0];delete m[e]}e({filterCache:m,brandMapping:{...i.brandMapping,[l]:p},availableBrands:f.brands,availableSizes:f.sizes,currentContextKey:l,isLoading:!1})}catch(t){if(console.error("ÐÑибка загÑÑзки ÑилÑÑÑов:",t),o){let t=i.brandMapping[l]||u(o.brands);e({availableBrands:o.brands,availableSizes:o.sizes,currentContextKey:l,brandMapping:{...i.brandMapping,[l]:t},isLoading:!1})}else e({isLoading:!1,availableBrands:[],availableSizes:[]})}},setActiveSizeType:t=>{e({activeSizeType:t})},clearCache:()=>{e({filterCache:{},brandMapping:{},availableBrands:[],availableSizes:[],currentContextKey:null})},getCurrentSizes:()=>{let{availableSizes:e,activeSizeType:n}=t(),r=e.find(e=>e.type===n);return r?.values||[]},getPreviewBrands:(e,n=8)=>{let{availableBrands:r}=t();if(0===r.length)return[];let i=r.filter(t=>e.includes(t.name)).sort((e,t)=>t.productCount-e.productCount),l=r.filter(t=>!e.includes(t.name)).sort((e,t)=>t.productCount-e.productCount).slice(0,Math.max(0,n-i.length));return[...i,...l]},getPreviewSizes:(e,n=8)=>{let{getCurrentSizes:r}=t(),i=r();if(0===i.length)return[];let l=e.filter(e=>i.includes(e)),o=i.filter(e=>!l.includes(e)).slice(0,Math.max(0,n-l.length));return[...l,...o]},getCachedData:e=>t().filterCache[e],isDataLoadedForContext:(e,n)=>{let r=t(),i=n?`category:${n}`:`search:${e}`,l=r.filterCache[i];return!!(l&&Date.now()-l.timestamp<3e5)},convertBrandNamesToIds:(e,n)=>{let r=t().brandMapping[n];if(!r)return console.warn(`Brand mapping not found for context: ${n}`),[];let i=[];return e.forEach(e=>{let t=r.nameToId[e];t?i.push(t):console.warn(`Brand ID not found for name: ${e} in context: ${n}`)}),i},convertBrandIdsToNames:(e,n)=>{let r=t().brandMapping[n];if(!r)return console.warn(`Brand mapping not found for context: ${n}`),[];let i=[];return e.forEach(e=>{let t=r.idToName[e];t?i.push(t):console.warn(`Brand name not found for ID: ${e} in context: ${n}`)}),i},getBrandNameById:(e,n)=>{let r=t().brandMapping[n];return r?.idToName[e]},getBrandIdByName:(e,n)=>{let r=t().brandMapping[n];return r?.nameToId[e]}}),{name:"filter-data-store",partialize:e=>({filterCache:e.filterCache,brandMapping:e.brandMapping,activeSizeType:e.activeSizeType}),onRehydrateStorage:()=>e=>{if(e&&e.currentContextKey&&e.filterCache[e.currentContextKey]){let t=e.filterCache[e.currentContextKey];e.availableBrands=t.brands,e.availableSizes=t.sizes,e.brandMapping[e.currentContextKey]||(e.brandMapping[e.currentContextKey]=u(t.brands))}},storage:{getItem:e=>{let t=localStorage.getItem(e);return t?JSON.parse(t):null},setItem:(e,t)=>
1{localStorage.setItem(e,JSON.stringify(t))},removeItem:e=>{localStorage.removeItem(e)}}}));e.s(["useFilterDataStore",0,c],259402);var d=e.i(618566),f=e.i(864608),p=e.i(199172),m=e.i(343198);let h=({sizes:e,selectedSizes:n,onToggleSize:r,className:i=""})=>(0,t.jsx)("div",{className:`flex flex-wrap gap-2 justify-start ${i}`,children:e.map(e=>{let i=(e=>{if(!e)return null;let t=e.replace(/[ï¼(][^)ï¼]*[\u4e00-\u9fff]+[^)ï¼]*[)ï¼]/g,"").replace(/[\u4e00-\u9fff]+/g,"").replace(/\s+/g," ").trim().replace(/^[\s/]+|[\s/]+$/g,"");return t&&/[0-9a-zA-Zа-ÑÐ-Я]/.test(t)?t:null})(e);return i?(0,t.jsx)(m.default,{size:i,onClick:()=>r(e),className:` 2 min-w-10 aspect-square rounded-full! 3 ${n.includes(e)?"bg-black-600 text-white-600":"nav-glass shadow-[0_1px_4px_rgba(0,0,0,0.05)]! text-black-600"}`},e):null})});var g=e.i(560741);let v=({className:e,minPrice:n,maxPrice:r,setPriceRange:i})=>(0,t.jsxs)("div",{className:`${e} flex flex-col w-full`,children:[(0,t.jsx)("span",{className:"text-mobile-text-medium text-black-600 tablet:text-desktop-20-medium",children:"ЦÐÐÐ"}),(0,t.jsxs)("div",{className:"flex flex-row flex-wrap gap-3 mt-2",children:[(0,t.jsx)("label",{className:"nav-glass flex-1 min-w-[140px] px-4 py-3 rounded-full",children:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-mobile-text-small tablet:text-desktop-14-medium text-black-500 whitespace-nowrap",children:"оÑ"}),(0,t.jsx)("input",{type:"number",placeholder:"100",value:n||"",onChange:e=>{var t;i(""===(t=e.target.value)?null:parseInt(t),r)},className:"flex-1 text-black-600 outline-none text-mobile-text-medium tablet:text-desktop-16-medium w-full min-w-0",min:"0"})]})}),(0,t.jsx)("label",{className:"nav-glass flex-1 min-w-[140px] px-4 py-3 rounded-full",children:(0,t.jsxs)("div",{className:"flex items-center gap-1",children:[(0,t.jsx)("span",{className:"text-mobile-text-small tablet:text-desktop-14-medium text-black-500 whitespace-nowrap",children:"до"}),(0,t.jsx)("input",{type:"number",placeholder:"100 000",value:r||"",onChange:e=>{var t;i(n,""===(t=e.target.value)?null:parseInt(t))},className:"flex-1 text-black-600 outline-none text-mobile-text-medium tablet:text-desktop-16-medium w-full min-w-0",min:"0"})]})})]})]}),b=({className:e,title:n,isActive:r,onClick:i})=>(0,t.jsx)("button",{onClick:i,className:`${e} py-1 text-black-600 text-mobile-text-medium border-b ${r?"border-black-600":"border-transparent"}`,children:n});var x=e.i(962023);let y=["RU","EU","US","UK","FR","IT"],w=({tempFilters:e,onTempFilterChange:r,onOpenSizeModal:l,onOpenBrandModal:o,isLoading:s})=>{let a=(0,i.useIsTablet)(),[u,d]=(0,n.useState)(""),{availableBrands:f,availableSizes:m,activeSizeType:w,setActiveSizeType:S,getPreviewBrands:E,getPreviewSizes:R,getCurrentSizes:C}=c(),O=(0,n.useMemo)(()=>C(),[m,w,C]),T=(0,n.useMemo)(()=>R(e.sizes,8).filter(e=>O.includes(e)),[e.sizes,R,O]),M=(0,n.useMemo)(()=>E(e.brands,8),[e.brands,E]),k=(0,n.useMemo)(()=>f.filter(e=>e.name.toLowerCase().includes(u.toLowerCase())),[f,u]),L=a&&u?k:M,N=(0,n.useCallback)(t=>{r({...e,brands:e.brands.includes(t)?e.brands.filter(e=>e!==t):[...e.brands,t]})},[e,r]),P=(0,n.useCallback)(t=>{r({...e,sizes:e.sizes.includes(t)?e.sizes.filter(e=>e!==t):[...e.sizes,t]})},[e,r]),I=(0,n.useCallback)((t,n)=>{r({...e,priceStart:t,priceEnd:n})},[e,r]);return(0,t.jsxs)("div",{className:"flex flex-col gap-6 tablet:gap-4",children:[(0,t.jsxs)("div",{className:"tablet:mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)("span",{className:"text-mobile-text-medium text-black-600 tablet:text-desktop-20-medium",children:"Ð ÐÐÐÐÐ "}),(0,t.jsxs)("button",{className:"text-mobile-text-small tablet:text-desktop-16-regular text-black-600 inline-flex items-center gap-1",onClick:l,children:["ÐÑе",(0,t.jsx)(x.ArrowRightIcon,{className:"text-black-400"})]})]}),(0,t.jsxs)("div",{className:"inline-flex gap-2 mb-4 relative w-full",children:[[...m.map(e=>e.type)].sort((e,t)=>{let n=y.indexOf(e),r=y.indexOf(t);return -1!==n&&-1!==r?n-r:-1!==n?-1:-1!==r?1:e.localeCompare(t)}).map(e=>(0,t.jsx)(b,{onClick:()=>S(e),isActive:w===e,title:e,className:"px-2"},e)),(0,t.jsx)("hr",{className:"absolute w-full bottom-0 border-t border-black-300"})]}),(0,t.jsx)(h,{sizes:T,selectedSizes:e.sizes,onToggleSize:P}),0===T.length&&!s&&(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2",children:"ÐÐµÑ Ð´Ð¾ÑÑÑпнÑÑ ÑазмеÑов"})]}),(0,t.jsx)(v,{minPrice:e.priceStart,maxPrice:e.priceEnd,setPriceRange:I,className:"tablet:mt-2"}),(0,t.jsxs)("div",{className:"tablet:mt-2",children:[(0,t.jsxs)("div",{className:"flex justify-between items-center mb-2",children:[(0,t.jsx)("span",{className:"text-mobile-text-medium text-black-600 tablet:text-desktop-20-medium",children:"ÐÐ ÐÐÐ"}),(0,t.jsxs)("button",{onClick:o,className:"text-mobile-text-small tablet:text-desktop-16-regular text-black-600 inline-flex items-center gap-1",children:["ÐÑе",(0,t.jsx)(x.ArrowRightIcon,{className:"text-black-400"})]})]}),a&&(0,t.jsx)(p.SearchInput,{className:"mb-3 !py-3",query:u,handleChange:e=>d(e.target.value),placeholder:"ÐоиÑк бÑендов"}),(0,t.jsx)(g.BrandSelector,{brands:L,selectedBrands:e.brands,onToggleBrand:N,showProductCount:a}),0===M.length&&!s&&(0,t.jsx)("p",{className:"text-gray-500 text-sm mt-2",children:"ÐÐµÑ Ð´Ð¾ÑÑÑпнÑÑ Ð±Ñендов"})]})]})},S=["RU","EU","US","UK","FR","IT"],E=({isOpen:e,onClose:r,selectedSizes:i,onToggleSize:l})=>
3{let[o,s]=(0,n.useState)(i),{availableSizes:a,activeSizeType:u,setActiveSizeType:d,getCurrentSizes:p}=c();(0,n.useEffect)(()=>{e&&s(i)},[i,e]);let m=(0,n.useMemo)(()=>p(),[a,u,p]),g=(0,n.useMemo)(()=>o.filter(e=>m.includes(e)),[o,m]);return(0,t.jsxs)(f.default,{isOpen:e,onClose:e=>{e&&e.stopPropagation(),r()},title:"РазмеÑ",variant:"sheet",buttonTitle:`ÐÑимениÑÑ (${g.length})`,noButton:!1,className:"px-4! pb-4! gap-5 max-h-[88vh] sm:max-w-[26rem]",onSubmit:()=>{i.forEach(e=>{o.includes(e)||l(e)}),o.forEach(e=>{i.includes(e)||l(e)}),r()},children:[(0,t.jsx)("h2",{className:"shrink-0 font-jetbrains text-[1.25rem] leading-6 text-black-600",children:"РазмеÑ"}),(0,t.jsxs)("div",{className:"inline-flex gap-2 relative",children:[[...a.map(e=>e.type)].sort((e,t)=>{let n=S.indexOf(e),r=S.indexOf(t);return -1!==n&&-1!==r?n-r:-1!==n?-1:-1!==r?1:e.localeCompare(t)}).map(e=>(0,t.jsx)(b,{onClick:()=>d(e),isActive:u===e,title:e,className:"px-2"},e)),(0,t.jsx)("hr",{className:"absolute w-full bottom-0 border-t border-black-300"})]}),(0,t.jsx)("div",{className:"max-h-[40vh] overflow-y-auto",children:(0,t.jsx)(h,{sizes:m,selectedSizes:g,onToggleSize:e=>{s(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])}})})]})},R=({isOpen:e,onClose:r,selectedBrands:i,onToggleBrand:l,brands:o})=>{let[s,a]=(0,n.useState)(""),[u,c]=(0,n.useState)(i);(0,n.useEffect)(()=>{c(i)},[i,e]);let d=(0,n.useMemo)(()=>o.filter(e=>e.name.toLowerCase().includes(s.toLowerCase())),[o,s]),m=(0,n.useMemo)(()=>[...d].sort((e,t)=>{let n=u.includes(e._id),r=u.includes(t._id);return n&&!r?-1:!n&&r?1:t.productCount-e.productCount}),[d,u]);return(0,t.jsxs)(f.default,{isOpen:e,onClose:e=>{e&&e.stopPropagation(),r()},title:"ÐÑенд",variant:"sheet",buttonTitle:`ÐÑимениÑÑ (${u.length})`,noButton:!1,className:"px-4! pb-4! gap-5 max-h-[88vh] sm:max-w-[26rem]",onSubmit:()=>{i.forEach(e=>{u.includes(e)||l(e)}),u.forEach(e=>{i.includes(e)||l(e)}),r()},children:[(0,t.jsx)("h2",{className:"shrink-0 font-jetbrains text-[1.25rem] leading-6 text-black-600",children:"ÐÑенд"}),(0,t.jsx)(p.SearchInput,{searchShape:!0,className:"shrink-0",query:s,handleChange:e=>a(e.target.value),placeholder:"ÐоиÑк бÑендов"}),(0,t.jsx)("div",{className:"max-h-[40vh] overflow-y-auto",children:(0,t.jsx)(g.BrandSelector,{brands:m,selectedBrands:u,onToggleBrand:e=>{c(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},showProductCount:!0})})]})};e.s(["default",0,({className:e,disabled:s=!1,contextId:a,categoryId:u=null})=>{(0,i.useIsTablet)();let p=(0,n.useRef)(!1),[m,h]=(0,n.useState)(!1),[g,v]=(0,n.useState)(!1),[b,x]=(0,n.useState)(!1),[y,S]=(0,n.useState)({sizes:[],brands:[],priceStart:null,priceEnd:null}),{filters:C,updateFilters:O,resetFilters:T}=(0,o.useFilters)(),{loadFilterData:M,isLoading:k,isDataLoadedForContext:L,setCurrentContext:N,availableBrands:P}=c(),{isSynced:I}=(()=>{let e=(0,d.useSearchParams)(),t=(0,d.usePathname)(),r=(0,d.useRouter)(),{filters:i,updateFilters:l}=(0,o.useFilters)(),s=(0,n.useRef)(!1),a=(0,n.useRef)(null),u=(0,n.useCallback)(()=>{let t={sizes:e.getAll("sizes"),brands:e.getAll("brands"),priceStart:e.get("priceStart")?Number(e.get("priceStart")):null,priceEnd:e.get("priceEnd")?Number(e.get("priceEnd")):null};JSON.stringify(a.current)!==JSON.stringify(t)&&null!==a.current&&(console.log("URL изменилÑÑ, ÑинÑ
ÑонизиÑÑем ÑоÑÑоÑние...",{previous:a.current,current:t}),l(t)),a.current=t},[e,l]),c=(0,n.useCallback)(()=>{let n=e.getAll("sizes"),l=e.getAll("brands"),o=e.get("priceStart")?Number(e.get("priceStart")):null,s=e.get("priceEnd")?Number(e.get("priceEnd")):null,a=[];if(n.length!==i.sizes.length?a.push(`sizes count mismatch: URL(${n.length}) vs State(${i.sizes.length})`):n.some(e=>!i.sizes.includes(e))&&a.push("sizes values mismatch"),l.length!==i.brands.length?a.push(`brands count mismatch: URL(${l.length}) vs State(${i.brands.length})`):l.some(e=>!i.brands.includes(e))&&a.push("brands values mismatch"),o!==i.priceStart&&a.push(`priceStart mismatch: URL(${o}) vs State(${i.priceStart})`),s!==i.priceEnd&&a.push(`priceEnd mismatch: URL(${s}) vs State(${i.priceEnd})`),a.length>0&&(console.warn("ÐбнаÑÑÐ¶ÐµÐ½Ñ ÑаÑÑ
Ð¾Ð¶Ð´ÐµÐ½Ð¸Ñ Ð¼ÐµÐ¶Ð´Ñ URL и ÑоÑÑоÑнием ÑилÑÑÑов:",a),a.some(e=>e.includes("mismatch")))){console.log("ÐвÑомаÑиÑеÑÐºÐ°Ñ ÑинÑ
ÑонизаÑиÑ...");let a={sizes:Array.from(new Set([...i.sizes,...n])),brands:Array.from(new Set([...i.brands,...l])),priceStart:i.priceStart??o,priceEnd:i.priceEnd??s},u=new URLSearchParams(e.toString());
3u.delete("sizes"),a.sizes.forEach(e=>u.append("sizes",e)),u.delete("brands"),a.brands.forEach(e=>u.append("brands",e)),null!==a.priceStart?u.set("priceStart",a.priceStart.toString()):u.delete("priceStart"),null!==a.priceEnd?u.set("priceEnd",a.priceEnd.toString()):u.delete("priceEnd"),r.replace(`${t}?${u.toString()}`,{scroll:!1})}},[e,i,t,r]);return(0,n.useEffect)(()=>{s.current?c():(u(),s.current=!0)},[e,u,c]),(0,n.useEffect)(()=>{s.current&&a.current&&JSON.stringify(a.current)!==JSON.stringify(i)&&(console.log("СоÑÑоÑние ÑилÑÑÑов изменилоÑÑ, пÑовеÑÑем ÑинÑ
ÑонизаÑиÑ..."),c(),a.current=i)},[i,c]),{isSynced:!a.current||JSON.stringify(a.current)===JSON.stringify(i)}})();(0,n.useEffect)(()=>{m&&S(C)},[C,m]),(0,n.useMemo)(()=>u?`category:${u}`:`search:${a}`,[a,u]),(0,n.useEffect)(()=>{I||console.warn("ФилÑÑÑÑ Ð½Ðµ ÑинÑ
ÑонизиÑÐ¾Ð²Ð°Ð½Ñ Ñ URL")},[I]),(0,n.useEffect)(()=>{if(a&&!p.current){if(N(a,u),L(a,u)){p.current=!0;return}return(async()=>{try{await M(a,u)}catch(e){console.error("Ð¤Ð¾Ð½Ð¾Ð²Ð°Ñ Ð·Ð°Ð³ÑÑзка ÑилÑÑÑов не ÑдалаÑÑ:",e)}})(),p.current=!0,()=>{p.current=!1}}},[a,u,M,L,N]);let F=(0,n.useMemo)(()=>y.sizes.length+y.brands.length+ +(null!==y.priceStart)+ +(null!==y.priceEnd),[y]);return(0,t.jsxs)(t.Fragment,{children:[(0,t.jsxs)(l.Button,{disabled:s||k||!I,onClick:()=>h(!0),variant:"secondary-l",className:`${e} nav-glass flex-1 w-full !py-3 justify-between relative`,children:[(0,t.jsx)("span",{className:"flex items-center gap-2",children:"ФилÑÑÑÑ"}),(0,t.jsx)(r.FilterIcon,{className:"text-black-500"})]}),(0,t.jsxs)(f.default,{isOpen:m,onClose:e=>{e&&e.stopPropagation(),h(!1)},title:"ФилÑÑÑÑ",variant:"sheet",buttonTitle:`ÐÑимениÑÑ ${F>0?`(${F})`:""}`,noButton:!1,className:"px-4! pb-4! gap-5 max-h-[88vh] sm:max-w-[26rem]",onSubmit:()=>{console.log("ÐÑименÑем ÑилÑÑÑÑ:",y),O(y),h(!1)},isLoading:k,classNameSubmitButton:"mt-auto shrink-0",children:[(0,t.jsx)("h2",{className:"shrink-0 font-jetbrains text-[1.25rem] leading-6 text-black-600",children:"ФилÑÑÑÑ"}),(0,t.jsx)("div",{className:"min-h-0 flex-1 overflow-y-auto overflow-x-hidden -mx-1 px-1",children:(0,t.jsx)(w,{tempFilters:y,onTempFilterChange:S,onOpenSizeModal:()=>{v(!0)},onOpenBrandModal:()=>{x(!0)},isLoading:k})})]}),(0,t.jsx)(E,{isOpen:g,onClose:()=>{v(!1)},selectedSizes:y.sizes,onToggleSize:e=>{S(t=>({...t,sizes:t.sizes.includes(e)?t.sizes.filter(t=>t!==e):[...t.sizes,e]}))}}),(0,t.jsx)(R,{isOpen:b,onClose:()=>{x(!1)},selectedBrands:y.brands,onToggleBrand:e=>{S(t=>({...t,brands:t.brands.includes(e)?t.brands.filter(t=>t!==e):[...t.brands,e]}))},brands:P})]})}],191238)},83609,e=>{"use strict";let t,n,r,i,l,o,s;var a=e.i(843476),u=e.i(429427),c=e.i(371330),d=e.i(271645),f=e.i(174080),p=e.i(402155),m=e.i(746725),h=e.i(914189),g=e.i(544508),v=e.i(835696);function b(e){if(null===e)return{width:0,height:0};let{width:t,height:n}=e.getBoundingClientRect();return{width:t,height:n}}var x=((t=x||{})[t.Left=0]="Left",t[t.Right=2]="Right",t),y=e.i(813581);function w(e){let t=e.parentElement,n=null;for(;t&&!y.isHTMLFieldSetElement(t);)y.isHTMLLegendElement(t)&&(n=t),t=t.parentElement;let r=(null==t?void 0:t.getAttribute("disabled"))==="";return!(r&&function(e){if(!e)return!1;let t=e.previousElementSibling;for(;null!==t;){if(y.isHTMLLegendElement(t))return!1;t=t.previousElementSibling}return!0}(n))&&r}var S=e.i(684653),E=e.i(941444),R=e.i(877891),C=e.i(952744),O=e.i(605083),T=e.i(22357),M=((n=M||{})[n.Ignore=0]="Ignore",n[n.Select=1]="Select",n[n.Close=2]="Close",n);let k={kind:0},L={kind:2};var N=e.i(101852),P=e.i(255743),I=e.i(294316);let F=/([\u2700-\u27BF]|[\uE000-\uF8FF]|\uD83C[\uDC00-\uDFFF]|\uD83D[\uDC00-\uDFFF]|[\u2011-\u26FF]|\uD83E[\uDD10-\uDDFF])/g;function j(e){var t,n;let r=null!=(t=e.innerText)?t:"",i=e.cloneNode(!0);if(!y.isHTMLElement(i))return r;let l=!1;for(let e of i.querySelectorAll('[hidden],[aria-hidden],[role="img"]'))e.remove(),l=!0;let o=l?null!=(n=i.innerText)?n:"":r;return F.test(o)&&(o=o.replace(F,"")),o}function D(e){return[e.screenX,e.screenY]}var A=e.i(83733),z=e.i(601893);let B=Math.min,$=Math.max,H=Math.round,K=Math.floor,_=e=>({x:e,y:e}
3),U={left:"right",right:"left",bottom:"top",top:"bottom"},V={start:"end",end:"start"};function W(e,t){return"function"==typeof e?e(t):e}function q(e){return e.split("-")[0]}function J(e){return e.split("-")[1]}function Q(e){return"x"===e?"y":"x"}function Y(e){return"y"===e?"height":"width"}let X=new Set(["top","bottom"]);function G(e){return X.has(q(e))?"y":"x"}function Z(e){return e.replace(/start|end/g,e=>V[e])}let ee=["left","right"],et=["right","left"],en=["top","bottom"],er=["bottom","top"];function ei(e){return e.replace(/left|right|bottom|top/g,e=>U[e])}function el(e){let{x:t,y:n,width:r,height:i}=e;return{width:r,height:i,top:n,left:t,right:t+r,bottom:n+i,x:t,y:n}}function eo(e,t,n){let r,{reference:i,floating:l}=e,o=G(t),s=Q(G(t)),a=Y(s),u=q(t),c="y"===o,d=i.x+i.width/2-l.width/2,f=i.y+i.height/2-l.height/2,p=i[a]/2-l[a]/2;switch(u){case"top":r={x:d,y:i.y-l.height};break;case"bottom":r={x:d,y:i.y+i.height};break;case"right":r={x:i.x+i.width,y:f};break;case"left":r={x:i.x-l.width,y:f};break;default:r={x:i.x,y:i.y}}switch(J(t)){case"start":r[s]-=p*(n&&c?-1:1);break;case"end":r[s]+=p*(n&&c?-1:1)}return r}let es=async(e,t,n)=>{let{placement:r="bottom",strategy:i="absolute",middleware:l=[],platform:o}=n,s=l.filter(Boolean),a=await (null==o.isRTL?void 0:o.isRTL(t)),u=await o.getElementRects({reference:e,floating:t,strategy:i}),{x:c,y:d}=eo(u,r,a),f=r,p={},m=0;for(let n=0;n<s.length;n++){let{name:l,fn:h}=s[n],{x:g,y:v,data:b,reset:x}=await h({x:c,y:d,initialPlacement:r,placement:f,strategy:i,middlewareData:p,rects:u,platform:o,elements:{reference:e,floating:t}});c=null!=g?g:c,d=null!=v?v:d,p={...p,[l]:{...p[l],...b}},x&&m<=50&&(m++,"object"==typeof x&&(x.placement&&(f=x.placement),x.rects&&(u=!0===x.rects?await o.getElementRects({reference:e,floating:t,strategy:i}):x.rects),{x:c,y:d}=eo(u,f,a)),n=-1)}return{x:c,y:d,placement:f,strategy:i,middlewareData:p}};async function ea(e,t){var n,r;void 0===t&&(t={});let{x:i,y:l,platform:o,rects:s,elements:a,strategy:u}=e,{boundary:c="clippingAncestors",rootBoundary:d="viewport",elementContext:f="floating",altBoundary:p=!1,padding:m=0}=W(t,e),h="number"!=typeof(r=m)?{top:0,right:0,bottom:0,left:0,...r}:{top:r,right:r,bottom:r,left:r},g=a[p?"floating"===f?"reference":"floating":f],v=el(await o.getClippingRect({element:null==(n=await (null==o.isElement?void 0:o.isElement(g)))||n?g:g.contextElement||await (null==o.getDocumentElement?void 0:o.getDocumentElement(a.floating)),boundary:c,rootBoundary:d,strategy:u})),b="floating"===f?{x:i,y:l,width:s.floating.width,height:s.floating.height}:s.reference,x=await (null==o.getOffsetParent?void 0:o.getOffsetParent(a.floating)),y=await (null==o.isElement?void 0:o.isElement(x))&&await (null==o.getScale?void 0:o.getScale(x))||{x:1,y:1},w=el(o.convertOffsetParentRelativeRectToViewportRelativeRect?await o.convertOffsetParentRelativeRectToViewportRelativeRect({elements:a,rect:b,offsetParent:x,strategy:u}):b);return{top:(v.top-w.top+h.top)/y.y,bottom:(w.bottom-v.bottom+h.bottom)/y.y,left:(v.left-w.left+h.left)/y.x,right:(w.right-v.right+h.right)/y.x}}let eu=new Set(["left","top"]);async function ec(e,t){let{placement:n,platform:r,elements:i}=e,l=await (null==r.isRTL?void 0:r.isRTL(i.floating)),o=q(n),s=J(n),a="y"===G(n),u=eu.has(o)?-1:1,c=l&&a?-1:1,d=W(t,e),{mainAxis:f,crossAxis:p,alignmentAxis:m}="number"==typeof d?{mainAxis:d,crossAxis:0,alignmentAxis:null}:{mainAxis:d.mainAxis||0,crossAxis:d.crossAxis||0,alignmentAxis:d.alignmentAxis};return s&&"number"==typeof m&&(p="end"===s?-1*m:m),a?{x:p*c,y:f*u}:{x:f*u,y:p*c}}function ed(){return"undefined"!=typeof window}function ef(e){return eh(e)?(e.nodeName||"").toLowerCase():"#document"}function ep(e){var t;return(null==e||null==(t=e.ownerDocument)?void 0:t.defaultView)||window}function em(e){var t;return null==(t=(eh(e)?e.ownerDocument:e.document)||window.document)?void 0:t.documentElement}function eh(e){return!!ed()&&(e instanceof Node||e instanceof ep(e).Node)}function eg(e){return!!ed()&&(e instanceof Element||e instanceof ep(e).Element)}function ev(e){return!!ed()&&(e instanceof HTMLElement||e instanceof ep(e).HTMLElement)}function eb(e){return!!ed()&&"undefined"!=typeof ShadowRoot&&(e instanceof ShadowRoot||e instanceof ep(e).ShadowRoot)}let ex=new Set(["inline","contents"]);function ey(e){let{overflow:t,overflowX:n,overflowY:r,display:i}=eN(e);
3return/auto|scroll|overlay|hidden|clip/.test(t+r+n)&&!ex.has(i)}let ew=new Set(["table","td","th"]),eS=[":popover-open",":modal"];function eE(e){return eS.some(t=>{try{return e.matches(t)}catch(e){return!1}})}let eR=["transform","translate","scale","rotate","perspective"],eC=["transform","translate","scale","rotate","perspective","filter"],eO=["paint","layout","strict","content"];function eT(e){let t=eM(),n=eg(e)?eN(e):e;return eR.some(e=>!!n[e]&&"none"!==n[e])||!!n.containerType&&"normal"!==n.containerType||!t&&!!n.backdropFilter&&"none"!==n.backdropFilter||!t&&!!n.filter&&"none"!==n.filter||eC.some(e=>(n.willChange||"").includes(e))||eO.some(e=>(n.contain||"").includes(e))}function eM(){return"undefined"!=typeof CSS&&!!CSS.supports&&CSS.supports("-webkit-backdrop-filter","none")}let ek=new Set(["html","body","#document"]);function eL(e){return ek.has(ef(e))}function eN(e){return ep(e).getComputedStyle(e)}function eP(e){return eg(e)?{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}:{scrollLeft:e.scrollX,scrollTop:e.scrollY}}function eI(e){if("html"===ef(e))return e;let t=e.assignedSlot||e.parentNode||eb(e)&&e.host||em(e);return eb(t)?t.host:t}function eF(e,t,n){var r;void 0===t&&(t=[]),void 0===n&&(n=!0);let i=function e(t){let n=eI(t);return eL(n)?t.ownerDocument?t.ownerDocument.body:t.body:ev(n)&&ey(n)?n:e(n)}(e),l=i===(null==(r=e.ownerDocument)?void 0:r.body),o=ep(i);if(l){let e=ej(o);return t.concat(o,o.visualViewport||[],ey(i)?i:[],e&&n?eF(e):[])}return t.concat(i,eF(i,[],n))}function ej(e){return e.parent&&Object.getPrototypeOf(e.parent)?e.frameElement:null}function eD(e){let t=eN(e),n=parseFloat(t.width)||0,r=parseFloat(t.height)||0,i=ev(e),l=i?e.offsetWidth:n,o=i?e.offsetHeight:r,s=H(n)!==l||H(r)!==o;return s&&(n=l,r=o),{width:n,height:r,$:s}}function eA(e){return eg(e)?e:e.contextElement}function ez(e){let t=eA(e);if(!ev(t))return _(1);let n=t.getBoundingClientRect(),{width:r,height:i,$:l}=eD(t),o=(l?H(n.width):n.width)/r,s=(l?H(n.height):n.height)/i;return o&&Number.isFinite(o)||(o=1),s&&Number.isFinite(s)||(s=1),{x:o,y:s}}let eB=_(0);function e$(e){let t=ep(e);return eM()&&t.visualViewport?{x:t.visualViewport.offsetLeft,y:t.visualViewport.offsetTop}:eB}function eH(e,t,n,r){var i;void 0===t&&(t=!1),void 0===n&&(n=!1);let l=e.getBoundingClientRect(),o=eA(e),s=_(1);t&&(r?eg(r)&&(s=ez(r)):s=ez(e));let a=(void 0===(i=n)&&(i=!1),r&&(!i||r===ep(o))&&i)?e$(o):_(0),u=(l.left+a.x)/s.x,c=(l.top+a.y)/s.y,d=l.width/s.x,f=l.height/s.y;if(o){let e=ep(o),t=r&&eg(r)?ep(r):r,n=e,i=ej(n);for(;i&&r&&t!==n;){let e=ez(i),t=i.getBoundingClientRect(),r=eN(i),l=t.left+(i.clientLeft+parseFloat(r.paddingLeft))*e.x,o=t.top+(i.clientTop+parseFloat(r.paddingTop))*e.y;u*=e.x,c*=e.y,d*=e.x,f*=e.y,u+=l,c+=o,i=ej(n=ep(i))}}return el({width:d,height:f,x:u,y:c})}function eK(e,t){let n=eP(e).scrollLeft;return t?t.left+n:eH(em(e)).left+n}function e_(e,t){let n=e.getBoundingClientRect();return{x:n.left+t.scrollLeft-eK(e,n),y:n.top+t.scrollTop}}let eU=new Set(["absolute","fixed"]);function eV(e,t,n){var r;let i;if("viewport"===t)i=function(e,t){let n=ep(e),r=em(e),i=n.visualViewport,l=r.clientWidth,o=r.clientHeight,s=0,a=0;if(i){l=i.width,o=i.height;let e=eM();(!e||e&&"fixed"===t)&&(s=i.offsetLeft,a=i.offsetTop)}let u=eK(r);if(u<=0){let e=r.ownerDocument,t=e.body,n=getComputedStyle(t),i="CSS1Compat"===e.compatMode&&parseFloat(n.marginLeft)+parseFloat(n.marginRight)||0,o=Math.abs(r.clientWidth-t.clientWidth-i);o<=25&&(l-=o)}else u<=25&&(l+=u);return{width:l,height:o,x:s,y:a}}(e,n);else if("document"===t){let t,n,l,o,s,a,u;r=em(e),t=em(r),n=eP(r),l=r.ownerDocument.body,o=$(t.scrollWidth,t.clientWidth,l.scrollWidth,l.clientWidth),s=$(t.scrollHeight,t.clientHeight,l.scrollHeight,l.clientHeight),a=-n.scrollLeft+eK(r),u=-n.scrollTop,"rtl"===eN(l).direction&&(a+=$(t.clientWidth,l.clientWidth)-o),i={width:o,height:s,x:a,y:u}}else if(eg(t)){let e,r,l,o,s,a;r=(e=eH(t,!0,"fixed"===n)).top+t.clientTop,l=e.left+t.clientLeft,o=ev(t)?ez(t):_(1),s=t.clientWidth*o.x,a=t.clientHeight*o.y,i={width:s,height:a,x:l*o.x,y:r*o.y}}else{let n=e$(e);i={x:t.x-n.x,y:t.y-n.y,width:t.width,height:t.height}}return el(i)}function eW(e){return"static"===eN(e).position}function eq(e,t){if(!ev(e)||"fixed"===eN(e).position)return null;if(t)return t(e);let n=e.offsetParent;return em(e)===n&&(n=n.ownerDocument.body),n}function eJ(e,t){var n;let r=ep(e);if(eE(e))return r;if(!ev(e)){let t=eI(e);for(;t&&!eL(t);){if(eg(t)&&!eW(t))return t;t=eI(t)}return r}let i=eq(e,t);for(;i&&(n=i,ew.has(ef(n)))&&eW(i);)i=eq(i,t);return i&&eL(i)&&eW(i)&&!eT(i)?r:i||function(e){let t=eI(e);for(;ev(t)&&!eL(t);){if(eT(t))return t;if(eE(t))break;t=eI(t)}return null}(e)||r}
3let eQ=async function(e){let t=this.getOffsetParent||eJ,n=this.getDimensions,r=await n(e.floating);return{reference:function(e,t,n){let r=ev(t),i=em(t),l="fixed"===n,o=eH(e,!0,l,t),s={scrollLeft:0,scrollTop:0},a=_(0);if(r||!r&&!l)if(("body"!==ef(t)||ey(i))&&(s=eP(t)),r){let e=eH(t,!0,l,t);a.x=e.x+t.clientLeft,a.y=e.y+t.clientTop}else i&&(a.x=eK(i));l&&!r&&i&&(a.x=eK(i));let u=!i||r||l?_(0):e_(i,s);return{x:o.left+s.scrollLeft-a.x-u.x,y:o.top+s.scrollTop-a.y-u.y,width:o.width,height:o.height}}(e.reference,await t(e.floating),e.strategy),floating:{x:0,y:0,width:r.width,height:r.height}}},eY={convertOffsetParentRelativeRectToViewportRelativeRect:function(e){let{elements:t,rect:n,offsetParent:r,strategy:i}=e,l="fixed"===i,o=em(r),s=!!t&&eE(t.floating);if(r===o||s&&l)return n;let a={scrollLeft:0,scrollTop:0},u=_(1),c=_(0),d=ev(r);if((d||!d&&!l)&&(("body"!==ef(r)||ey(o))&&(a=eP(r)),ev(r))){let e=eH(r);u=ez(r),c.x=e.x+r.clientLeft,c.y=e.y+r.clientTop}let f=!o||d||l?_(0):e_(o,a);return{width:n.width*u.x,height:n.height*u.y,x:n.x*u.x-a.scrollLeft*u.x+c.x+f.x,y:n.y*u.y-a.scrollTop*u.y+c.y+f.y}},getDocumentElement:em,getClippingRect:function(e){let{element:t,boundary:n,rootBoundary:r,strategy:i}=e,l=[..."clippingAncestors"===n?eE(t)?[]:function(e,t){let n=t.get(e);if(n)return n;let r=eF(e,[],!1).filter(e=>eg(e)&&"body"!==ef(e)),i=null,l="fixed"===eN(e).position,o=l?eI(e):e;for(;eg(o)&&!eL(o);){let t=eN(o),n=eT(o);n||"fixed"!==t.position||(i=null),(l?!n&&!i:!n&&"static"===t.position&&!!i&&eU.has(i.position)||ey(o)&&!n&&function e(t,n){let r=eI(t);return!(r===n||!eg(r)||eL(r))&&("fixed"===eN(r).position||e(r,n))}(e,o))?r=r.filter(e=>e!==o):i=t,o=eI(o)}return t.set(e,r),r}(t,this._c):[].concat(n),r],o=l[0],s=l.reduce((e,n)=>{let r=eV(t,n,i);return e.top=$(r.top,e.top),e.right=B(r.right,e.right),e.bottom=B(r.bottom,e.bottom),e.left=$(r.left,e.left),e},eV(t,o,i));return{width:s.right-s.left,height:s.bottom-s.top,x:s.left,y:s.top}},getOffsetParent:eJ,getElementRects:eQ,getClientRects:function(e){return Array.from(e.getClientRects())},getDimensions:function(e){let{width:t,height:n}=eD(e);return{width:t,height:n}},getScale:ez,isElement:eg,isRTL:function(e){return"rtl"===eN(e).direction}};function eX(e,t){return e.x===t.x&&e.y===t.y&&e.width===t.width&&e.height===t.height}function eG(e,t,n,r){let i;void 0===r&&(r={});let{ancestorScroll:l=!0,ancestorResize:o=!0,elementResize:s="function"==typeof ResizeObserver,layoutShift:a="function"==typeof IntersectionObserver,animationFrame:u=!1}=r,c=eA(e),d=l||o?[...c?eF(c):[],...eF(t)]:[];d.forEach(e=>{l&&e.addEventListener("scroll",n,{passive:!0}),o&&e.addEventListener("resize",n)});let f=c&&a?function(e,t){let n,r=null,i=em(e);function l(){var e;clearTimeout(n),null==(e=r)||e.disconnect(),r=null}return!function o(s,a){void 0===s&&(s=!1),void 0===a&&(a=1),l();let u=e.getBoundingClientRect(),{left:c,top:d,width:f,height:p}=u;if(s||t(),!f||!p)return;let m={rootMargin:-K(d)+"px "+-K(i.clientWidth-(c+f))+"px "+-K(i.clientHeight-(d+p))+"px "+-K(c)+"px",threshold:$(0,B(1,a))||1},h=!0;function g(t){let r=t[0].intersectionRatio;if(r!==a){if(!h)return o();r?o(!1,r):n=setTimeout(()=>{o(!1,1e-7)},1e3)}1!==r||eX(u,e.getBoundingClientRect())||o(),h=!1}try{r=new IntersectionObserver(g,{...m,root:i.ownerDocument})}catch(e){r=new IntersectionObserver(g,m)}r.observe(e)}(!0),l}(c,n):null,p=-1,m=null;s&&(m=new ResizeObserver(e=>{let[r]=e;r&&r.target===c&&m&&(m.unobserve(t),cancelAnimationFrame(p),p=requestAnimationFrame(()=>{var e;null==(e=m)||e.observe(t)})),n()}),c&&!u&&m.observe(c),m.observe(t));let h=u?eH(e):null;return u&&function t(){let r=eH(e);h&&!eX(h,r)&&n(),h=r,i=requestAnimationFrame(t)}(),n(),()=>{var e;d.forEach(e=>{l&&e.removeEventListener("scroll",n),o&&e.removeEventListener("resize",n)}),null==f||f(),null==(e=m)||e.disconnect(),m=null,u&&cancelAnimationFrame(i)}}var eZ="undefined"!=typeof document?d.useLayoutEffect:function(){};function e0(e,t){let n,r,i;if(e===t)return!0;if(typeof e!=typeof t)return!1;if("function"==typeof e&&e.toString()===t.toString())return!0;if(e&&t&&"object"==typeof e){if(Array.isArray(e)){if((n=e.length)!==t.length)return!1;for(r=n;0!=r--;)if(!e0(e[r],t[r]))return!1;return!0}if((n=(i=Object.keys(e)).length)!==Object.keys(t).length)return!1;for(r=n;0!=r--;)if(!({}).hasOwnProperty.call(t,i[r]))return!1;for(r=n;0!=r--;){let n=i[r];if(("_owner"!==n||!e.$$typeof)&&!e0(e[n],t[n]))return!1}return!0}return e!=e&&t!=t}function e1(e){return"undefined"==typeof window?1:(e.ownerDocument.defaultView||window).devicePixelRatio||1}function e2(e,t){let n=e1(e);return Math.round(t*n)/n}function e4(e){let t=d.useRef(e);return eZ(()=>{t.current=e}),t}let e5=(e,t)=>{var n;return{...(void 0===(n=e)&&(n=0),{name:"offset",options:n,async fn(e){var t,r;let{x:i,y:l,placement:o,middlewareData:s}=e,a=await ec(e,n);return o===(null==(t=s.offset)?void 0:t.placement)&&null!=(r=s.arrow)&&r.alignmentOffset?{}:{x:i+a.x,y:l+a.y,data:{...a,placement:o}}}}),options:[e,t]}};e.i(247167);var e6="undefined"==typeof Element;e6||Element.prototype.matches||Element.prototype.msMatchesSelector||Element.prototype.webkitMatchesSelector,e6||Element.prototype.getRootNode;let e3={...d},e8=e3.useInsertionEffect||(e=>e());function e7(e){let t=d.useRef(()=>{});return e8(()=>{t.current=e}),d.useCallback(function(){for(var e=arguments.length,n=Array(e),r=0;r<e;r++)n[r]=arguments[r];return null==t.current?void 0:t.current(...n)},[])}var e9="undefined"!=typeof document?d.useLayoutEffect:d.useEffect;let te=!1,tt=0,tn=()=>"floating-ui-"+Math.random().toString(36).slice(2,6)+tt++,tr=e3.useId||function(){let[e,t]=d.useState(()=>te?tn():void 0);return e9(()=>{null==e&&t(tn())},[]),d.useEffect(()=>{te=!0},[]),e},ti=d.createContext(null),tl=d.createContext(null),to="active",ts="selected";function ta(e,t,n){let r=new Map,i="item"===n,l=e;if(i&&e){let{[to]:t,[ts]:n,...r}=e;l=r}return{..."floating"===n&&{tabIndex:-1,"data-floating-ui-focusable":""},...l,...t.map(t=>{let r=t?t[n]:null;return"function"==typeof r?e?r(e):null:r}).concat(e).reduce((e,t)=>
3(t&&Object.entries(t).forEach(t=>{let[n,l]=t;if(!(i&&[to,ts].includes(n)))if(0===n.indexOf("on")){if(r.has(n)||r.set(n,[]),"function"==typeof l){var o;null==(o=r.get(n))||o.push(l),e[n]=function(){for(var e,t=arguments.length,i=Array(t),l=0;l<t;l++)i[l]=arguments[l];return null==(e=r.get(n))?void 0:e.map(e=>e(...i)).find(e=>void 0!==e)}}}else e[n]=l}),e),{})}}function tu(e,t){return{...e,rects:{...e.rects,floating:{...e.rects.floating,height:t}}}}let tc=(0,d.createContext)({styles:void 0,setReference:()=>{},setFloating:()=>{},getReferenceProps:()=>({}),getFloatingProps:()=>({}),slot:{}});tc.displayName="FloatingContext";let td=(0,d.createContext)(null);function tf({children:e,enabled:t=!0}){var n,r,i,l,o,s,a,u,c,p,m,g,b,x,w,S;let E,R,C,O,T,M,k,L,N,P,[I,F]=(0,d.useState)(null),[j,D]=(0,d.useState)(0),A=(0,d.useRef)(null),[z,K]=(0,d.useState)(null);m=z,(0,v.useIsoMorphicEffect)(()=>{if(!m)return;let e=new MutationObserver(()=>{let e=window.getComputedStyle(m).maxHeight,t=parseFloat(e);if(isNaN(t))return;let n=parseInt(e);isNaN(n)||t!==n&&(m.style.maxHeight=`${Math.ceil(t)}px`)});return e.observe(m,{attributes:!0,attributeFilter:["style"]}),()=>{e.disconnect()}},[m]);let _=t&&null!==I&&null!==z,{to:U="bottom",gap:V=0,offset:X=0,padding:el=0,inner:eo}=(g=I,b=z,E=tp(null!=(x=null==g?void 0:g.gap)?x:"var(--anchor-gap, 0)",b),R=tp(null!=(w=null==g?void 0:g.offset)?w:"var(--anchor-offset, 0)",b),C=tp(null!=(S=null==g?void 0:g.padding)?S:"var(--anchor-padding, 0)",b),{...g,gap:E,offset:R,padding:C}),[eu,ec="center"]=U.split(" ");(0,v.useIsoMorphicEffect)(()=>{_&&D(0)},[_]);let{refs:ed,floatingStyles:ef,context:ep}=function(e){void 0===e&&(e={});let{nodeId:t}=e,n=function(e){var t;let{open:n=!1,onOpenChange:r,elements:i}=e,l=tr(),o=d.useRef({}),[s]=d.useState(()=>{let e;return e=new Map,{emit(t,n){var r;null==(r=e.get(t))||r.forEach(e=>e(n))},on(t,n){e.set(t,[...e.get(t)||[],n])},off(t,n){var r;e.set(t,(null==(r=e.get(t))?void 0:r.filter(e=>e!==n))||[])}}}),a=null!=((null==(t=d.useContext(ti))?void 0:t.id)||null),[u,c]=d.useState(i.reference),f=e7((e,t,n)=>{o.current.openEvent=e?t:void 0,s.emit("openchange",{open:e,event:t,reason:n,nested:a}),null==r||r(e,t,n)}),p=d.useMemo(()=>({setPositionReference:c}),[]),m=d.useMemo(()=>({reference:u||i.reference||null,floating:i.floating||null,domReference:i.reference}),[u,i.reference,i.floating]);return d.useMemo(()=>({dataRef:o,open:n,onOpenChange:f,elements:m,events:s,floatingId:l,refs:p}),[n,f,m,s,l,p])}({...e,elements:{reference:null,floating:null,...e.elements}}),r=e.rootContext||n,i=r.elements,[l,o]=d.useState(null),[s,a]=d.useState(null),u=(null==i?void 0:i.domReference)||l,c=d.useRef(null),p=d.useContext(tl);e9(()=>{u&&(c.current=u)},[u]);let m=function(e){void 0===e&&(e={});let{placement:t="bottom",strategy:n="absolute",middleware:r=[],platform:i,elements:{reference:l,floating:o}={},transform:s=!0,whileElementsMounted:a,open:u}=e,[c,p]=d.useState({x:0,y:0,strategy:n,placement:t,middlewareData:{},isPositioned:!1}),[m,h]=d.useState(r);e0(m,r)||h(r);let[g,v]=d.useState(null),[b,x]=d.useState(null),y=d.useCallback(e=>{e!==R.current&&(R.current=e,v(e))},[]),w=d.useCallback(e=>{e!==C.current&&(C.current=e,x(e))},[]),S=l||g,E=o||b,R=d.useRef(null),C=d.useRef(null),O=d.useRef(c),T=null!=a,M=e4(a),k=e4(i),L=e4(u),N=d.useCallback(()=>{var e,r;let i,l,o;if(!R.current||!C.current)return;let s={placement:t,strategy:n,middleware:m};k.current&&(s.platform=k.current),(e=R.current,r=C.current,i=new Map,o={...(l={platform:eY,...s}).platform,_c:i},es(e,r,{...l,platform:o})).then(e=>{let t={...e,isPositioned:!1!==L.current};P.current&&!e0(O.current,t)&&(O.current=t,f.flushSync(()=>{p(t)}))})},[m,t,n,k,L]);eZ(()=>{!1===u&&O.current.isPositioned&&(O.current.isPositioned=!1,p(e=>({...e,isPositioned:!1})))},[u]);let P=d.useRef(!1);eZ(()=>(P.current=!0,()=>{P.current=!1}),[]),eZ(()=>
3{if(S&&(R.current=S),E&&(C.current=E),S&&E){if(M.current)return M.current(S,E,N);N()}},[S,E,N,M,T]);let I=d.useMemo(()=>({reference:R,floating:C,setReference:y,setFloating:w}),[y,w]),F=d.useMemo(()=>({reference:S,floating:E}),[S,E]),j=d.useMemo(()=>{let e={position:n,left:0,top:0};if(!F.floating)return e;let t=e2(F.floating,c.x),r=e2(F.floating,c.y);return s?{...e,transform:"translate("+t+"px, "+r+"px)",...e1(F.floating)>=1.5&&{willChange:"transform"}}:{position:n,left:t,top:r}},[n,s,F.floating,c.x,c.y]);return d.useMemo(()=>({...c,update:N,refs:I,elements:F,floatingStyles:j}),[c,N,I,F,j])}({...e,elements:{...i,...s&&{reference:s}}}),h=d.useCallback(e=>{let t=eg(e)?{getBoundingClientRect:()=>e.getBoundingClientRect(),contextElement:e}:e;a(t),m.refs.setReference(t)},[m.refs]),g=d.useCallback(e=>{(eg(e)||null===e)&&(c.current=e,o(e)),(eg(m.refs.reference.current)||null===m.refs.reference.current||null!==e&&!eg(e))&&m.refs.setReference(e)},[m.refs]),v=d.useMemo(()=>({...m.refs,setReference:g,setPositionReference:h,domReference:c}),[m.refs,g,h]),b=d.useMemo(()=>({...m.elements,domReference:u}),[m.elements,u]),x=d.useMemo(()=>({...m,...r,refs:v,elements:b,nodeId:t}),[m,v,b,t,r]);return e9(()=>{r.dataRef.current.floatingContext=x;let e=null==p?void 0:p.nodesRef.current.find(e=>e.id===t);e&&(e.context=x)}),d.useMemo(()=>({...m,context:x,refs:v,elements:b}),[m,v,b,x])}({open:_,placement:"selection"===eu?"center"===ec?"bottom":`bottom-${ec}`:"center"===ec?`${eu}`:`${eu}-${ec}`,strategy:"absolute",transform:!1,middleware:[e5({mainAxis:"selection"===eu?0:V,crossAxis:X}),{...{name:"shift",options:i=n={padding:el},async fn(e){let{x:t,y:n,placement:r}=e,{mainAxis:l=!0,crossAxis:o=!1,limiter:s={fn:e=>{let{x:t,y:n}=e;return{x:t,y:n}}},...a}=W(i,e),u={x:t,y:n},c=await ea(e,a),d=G(q(r)),f=Q(d),p=u[f],m=u[d];if(l){let e="y"===f?"top":"left",t="y"===f?"bottom":"right",n=p+c[e],r=p-c[t];p=$(n,B(p,r))}if(o){let e="y"===d?"top":"left",t="y"===d?"bottom":"right",n=m+c[e],r=m-c[t];m=$(n,B(m,r))}let h=s.fn({...e,[f]:p,[d]:m});return{...h,data:{x:h.x-t,y:h.y-n,enabled:{[f]:l,[d]:o}}}}},options:[n,r]},"selection"!==eu&&{...{name:"flip",options:s=l={padding:el},async fn(e){var t,n,r,i,l,o,a,u;let c,d,f,{placement:p,middlewareData:m,rects:h,initialPlacement:g,platform:v,elements:b}=e,{mainAxis:x=!0,crossAxis:y=!0,fallbackPlacements:w,fallbackStrategy:S="bestFit",fallbackAxisSideDirection:E="none",flipAlignment:R=!0,...C}=W(s,e);if(null!=(t=m.arrow)&&t.alignmentOffset)return{};let O=q(p),T=G(g),M=q(g)===g,k=await (null==v.isRTL?void 0:v.isRTL(b.floating)),L=w||(M||!R?[ei(g)]:(c=ei(g),[Z(g),c,Z(c)])),N="none"!==E;!w&&N&&L.push(...(d=J(g),f=function(e,t,n){switch(e){case"top":case"bottom":if(n)return t?et:ee;return t?ee:et;case"left":case"right":return t?en:er;default:return[]}}(q(g),"start"===E,k),d&&(f=f.map(e=>e+"-"+d),R&&(f=f.concat(f.map(Z)))),f));let P=[g,...L],I=await ea(e,C),F=[],j=(null==(n=m.flip)?void 0:n.overflows)||[];if(x&&F.push(I[O]),y){let e,t,n,r,i=(o=p,a=h,void 0===(u=k)&&(u=!1),e=J(o),n=Y(t=Q(G(o))),r="x"===t?e===(u?"end":"start")?"right":"left":"start"===e?"bottom":"top",a.reference[n]>a.floating[n]&&(r=ei(r)),[r,ei(r)]);F.push(I[i[0]],I[i[1]])}if(j=[...j,{placement:p,overflows:F}],!F.every(e=>e<=0)){let e=((null==(r=m.flip)?void 0:r.index)||0)+1,t=P[e];if(t&&("alignment"!==y||T===G(t)||j.every(e=>G(e.placement)!==T||e.overflows[0]>0)))return{data:{index:e,overflows:j},reset:{placement:t}};let n=null==(i=j.filter(e=>e.overflows[0]<=0).sort((e,t)=>e.overflows[1]-t.overflows[1])[0])?void 0:i.placement;if(!n)switch(S){case"bestFit":{let e=null==(l=j.filter(e=>{if(N){let t=G(e.placement);return t===T||"y"===t}return!0}).map(e=>[e.placement,e.overflows.filter(e=>e>0).reduce((e,t)=>e+t,0)]).sort((e,t)=>e[1]-t[1])[0])?void 0:l[0];e&&(n=e);break}case"initialPlacement":n=g}if(p!==n)return{reset:{placement:n}}}return{}}},options:[l,o]},"selection"===eu&&eo?{name:"inner",options:O={...eo,padding:el,overflowRef:A,offset:j,minItemsVisible:4,referenceOverflowThreshold:el,onFallbackChange(e){var t,n;if(!e)return;let r=ep.elements.floating;if(!r)return;
3let i=parseFloat(getComputedStyle(r).scrollPaddingBottom)||0,l=Math.min(4,r.childElementCount),o=0,s=0;for(let e of null!=(n=null==(t=ep.elements.floating)?void 0:t.childNodes)?n:[])if(y.isHTMLElement(e)){let t=e.offsetTop,n=t+e.clientHeight+i,a=r.scrollTop,u=a+r.clientHeight;if(t>=a&&n<=u)l--;else{s=Math.max(0,Math.min(n,u)-Math.max(t,a)),o=e.clientHeight;break}}l>=1&&D(e=>{let t=o*l-s+i;return e>=t?e:t})}},async fn(e){let{listRef:t,overflowRef:n,onFallbackChange:r,offset:i=0,index:l=0,minItemsVisible:o=4,referenceOverflowThreshold:s=0,scrollRef:a,...u}=W(O,e),{rects:c,elements:{floating:d}}=e,p=t.current[l],m=(null==a?void 0:a.current)||d,h=d.clientTop||m.clientTop,g=0!==d.clientTop,v=0!==m.clientTop,b=d===m;if(!p)return{};let x={...e,...await e5(-p.offsetTop-d.clientTop-c.reference.height/2-p.offsetHeight/2-i).fn(e)},y=await ea(tu(x,m.scrollHeight+h+d.clientTop),u),w=await ea(x,{...u,elementContext:"reference"}),S=$(0,y.top),E=x.y+S,R=(m.scrollHeight>m.clientHeight?e=>e:H)($(0,m.scrollHeight+(g&&b||v?2*h:0)-S-$(0,y.bottom)));if(m.style.maxHeight=R+"px",m.scrollTop=S,r){let e=m.offsetHeight<p.offsetHeight*B(o,t.current.length)-1||w.top>=-s||w.bottom>=-s;f.flushSync(()=>r(e))}return n&&(n.current=await ea(tu({...x,y:E},m.offsetHeight+h+d.clientTop),u)),{y:E}}}:null,{...{name:"size",options:c=a={padding:el,apply({availableWidth:e,availableHeight:t,elements:n}){Object.assign(n.floating.style,{overflow:"auto",maxWidth:`${e}px`,maxHeight:`min(var(--anchor-max-height, 100vh), ${t}px)`})}},async fn(e){var t,n;let r,i,{placement:l,rects:o,platform:s,elements:a}=e,{apply:u=()=>{},...d}=W(c,e),f=await ea(e,d),p=q(l),m=J(l),h="y"===G(l),{width:g,height:v}=o.floating;"top"===p||"bottom"===p?(r=p,i=m===(await (null==s.isRTL?void 0:s.isRTL(a.floating))?"start":"end")?"left":"right"):(i=p,r="end"===m?"top":"bottom");let b=v-f.top-f.bottom,x=g-f.left-f.right,y=B(v-f[r],b),w=B(g-f[i],x),S=!e.middlewareData.shift,E=y,R=w;if(null!=(t=e.middlewareData.shift)&&t.enabled.x&&(R=x),null!=(n=e.middlewareData.shift)&&n.enabled.y&&(E=b),S&&!m){let e=$(f.left,0),t=$(f.right,0),n=$(f.top,0),r=$(f.bottom,0);h?R=g-2*(0!==e||0!==t?e+t:$(f.left,f.right)):E=v-2*(0!==n||0!==r?n+r:$(f.top,f.bottom))}await u({...e,availableWidth:R,availableHeight:E});let C=await s.getDimensions(a.floating);return g!==C.width||v!==C.height?{reset:{rects:!0}}:{}}},options:[a,u]}].filter(Boolean),whileElementsMounted:eG}),[em=eu,eh=ec]=ep.placement.split("-");"selection"===eu&&(em="selection");let ev=(0,d.useMemo)(()=>({anchor:[em,eh].filter(Boolean).join(" ")}),[em,eh]),{getReferenceProps:eb,getFloatingProps:ex}=(T=(p=[function(e,t){let{open:n,elements:r}=e,{enabled:i=!0,overflowRef:l,scrollRef:o,onChange:s}=t,a=e7(s),u=d.useRef(!1),c=d.useRef(null),p=d.useRef(null);d.useEffect(()=>{if(!i)return;function e(e){if(e.ctrlKey||!t||null==l.current)return;let n=e.deltaY,r=l.current.top>=-.5,i=l.current.bottom>=-.5,o=t.scrollHeight-t.clientHeight,s=n<0?-1:1,u=n<0?"max":"min";if(!(t.scrollHeight<=t.clientHeight))if(!r&&n>0||!i&&n<0)e.preventDefault(),f.flushSync(()=>{a(e=>e+Math[u](n,o*s))});else{let e;/firefox/i.test((e=navigator.userAgentData)&&Array.isArray(e.brands)?e.brands.map(e=>{let{brand:t,version:n}=e;return t+"/"+n}).join(" "):navigator.userAgent)&&(t.scrollTop+=n)}}let t=(null==o?void 0:o.current)||r.floating;if(n&&t)return t.addEventListener("wheel",e),requestAnimationFrame(()=>{c.current=t.scrollTop,null!=l.current&&(p.current={...l.current})}),()=>{c.current=null,p.current=null,t.removeEventListener("wheel",e)}},[i,n,r.floating,l,o,a]);let m=d.useMemo(()=>({onKeyDown(){u.current=!0},onWheel(){u.current=!1},onPointerMove(){u.current=!1},onScroll(){let e=(null==o?void 0:o.current)||r.floating;if(l.current&&e&&u.current){if(null!==c.current){let t=e.scrollTop-c.current;(l.current.bottom<-.5&&t<-1||l.current.top<-.5&&t>1)&&f.flushSync(()=>a(e=>e+t))}requestAnimationFrame(()=>{c.current=e.scrollTop})}}}),[r.floating,a,l,o]);return d.useMemo(()=>i?{floating:m}:{},[i,m])}(ep,{overflowRef:A,onChange:D})]).map(e=>null==e?void 0:e.reference),M=p.map(e=>null==e?void 0:e.floating),k=p.map(e=>null==e?void 0:e.item),L=d.useCallback(e=>ta(e,p,"reference"),T),N=d.useCallback(e=>ta(e,p,"floating"),M),P=d.useCallback(e=>ta(e,p,"item"),k),d.useMemo(()=>({getReferenceProps:L,getFloatingProps:N,getItemProps:P}),[L,N,P])),ey=(0,h.useEvent)(e=>{K(e),ed.setFloating(e)});return d.createElement(td.Provider,{value:F},d.createElement(tc.Provider,{value:{setFloating:ey,setReference:ed.setReference,styles:ef,getReferenceProps:eb,getFloatingProps:ex,slot:ev}},e))}function tp(e,t,n){let r=(0,m.useDisposables)(),i=(0,h.useEvent)((e,t)=>{if(null==e)return[n,null];if("number"==typeof e)return[e,null];if("string"==typeof e){if(!t)return[n,null];let i=tm(e,t);return[i,n=>{let l=function e(t){let n=/var\((.*)\)/.exec(t);if(n){let t=n[1].indexOf(",");if(-1===t)return[n[1]];let r=n[1].slice(0,t).trim(),i=n[1].slice(t+1).trim();return i?[r,...e(i)]:[r]}return[]}(e);{let o=l.map(e=>window.getComputedStyle(t).getPropertyValue(e));r.requestAnimationFrame(function s(){r.nextFrame(s);let a=!1;for(let[e,n]of l.entries()){let r=window.getComputedStyle(t).getPropertyValue(n);if(o[e]!==r){o[e]=r,a=!0;break}}if(!a)return;let u=tm(e,t);i!==u&&(n(u),i=u)})}return r.dispose}]}return[n,null]}),l=(0,d.useMemo)(()=>i(e,t)[0],[e,t]),[o=l,s]=(0,d.useState)();return(0,v.useIsoMorphicEffect)(()=>{let[n,r]=i(e,t);if(s(n),r)return r(s)},[e,t]),o}function tm(e,t){let n=document.createElement("div");t.appendChild(n),n.style.setProperty("margin-top","0px","important"),n.style.setProperty("margin-top",e,"important");let r=parseFloat(window.getComputedStyle(n).marginTop)||0;return t.removeChild(n),r}td.displayName="PlacementContext";var th=e.i(140721);function tg(e,t){let[n,r]=(0,d.useState)(t);return e||n===t||r(t),e?n:t}d.default.forwardRef(function({children:e,freeze:t},n){let r=tg(t,e);return(0,d.isValidElement)(r)?(0,d.cloneElement)(r,{ref:n}):d.default.createElement(d.default.Fragment,null,r)});var tv=e.i(942803),tb=e.i(233137),tx=e.i(341650),ty=e.i(140407),tw=((r=tw||{})[r.First=0]="First",r[r.Previous=1]="Previous",r[r.Next=2]="Next",r[r.Last=3]="Last",r[r.Specific=4]="Specific",r[r.Nothing=5]="Nothing",r);function tS(e,t){let n=t.resolveItems();if(n.length<=0)return null;let r=t.resolveActiveIndex(),i=null!=r?r:-1;switch(e.focus){case 0:for(let e=0;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 1:-1===i&&(i=n.length);for(let e=i-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 2:for(let e=i+1;e<n.length;++e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 3:for(let e=n.length-1;e>=0;--e)if(!t.resolveDisabled(n[e],e,n))return e;return r;case 4:for(let r=0;r<n.length;++r)if(t.resolveId(n[r],r,n)===e.id)return r;return r;case 5:return null;default:throw Error("Unexpected object: "+e)}}var tE=e.i(652265),tR=e.i(694421),tC=e.i(397701),tO=e.i(700020),tT=e.i(35889),tM=e.i(998348),tk=e.i(722678),tL=e.i(635307),tN=e.i(825720);let tP={kind:"Idle"},tI={kind:"Moved"};function tF(e){let t=e.getBoundingClientRect();return`${t.x},${t.y}`}var tj=Object.defineProperty,tD=(e,t,n)=>{let r;return(r="symbol"!=typeof t?t+"":t)in e?tj(e,r,{enumerable:!0,configurable:!0,writable:!0,value:n}):e[r]=n,n},tA=((i=tA||{})[i.Open=0]="Open",i[i.Closed=1]="Closed",i),tz=((l=tz||{})[l.Single=0]="Single",l[l.Multi=1]="Multi",l),tB=((o=tB||{})[o.Pointer=0]="Pointer",o[o.Other=1]="Other",o),t$=((s=t$||{})[s.OpenListbox=0]="OpenListbox",s[s.CloseListbox=1]="CloseListbox",s[s.GoToOption=2]="GoToOption",s[s.Search=3]="Search",s[s.ClearSearch=4]="ClearSearch",s[s.SelectOption=5]="SelectOption",s[s.RegisterOptions=6]="RegisterOptions",s[s.UnregisterOptions=7]="UnregisterOptions",s[s.SetButtonElement=8]="SetButtonElement",s[s.SetOptionsElement=9]="SetOptionsElement",s[s.SortOptions=10]="SortOptions",s[s.MarkButtonAsMoved=11]="MarkButtonAsMoved",s);function tH(e,t=e=>e){let n=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,r=(0,tE.sortByDomNode)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),i=n?r.indexOf(n):null;return -1===i&&(i=null),{options:r,activeOptionIndex:i}}let tK={1(e){if(e.dataRef.current.disabled||1===e.listboxState)return e;let t=e.buttonElement?{kind:"Tracked",position:tF(e.buttonElement)}:e.buttonPositionState;return{...e,activeOptionIndex:null,pendingFocus:{focus:tw.Nothing},listboxState:1,__demoMode:!1,buttonPositionState:t}},0(e,t){if(e.dataRef.current.disabled||0===e.listboxState)return e;let n=e.activeOptionIndex,{isSelected:r}=e.dataRef.current,i=e.options.findIndex(e=>r(e.dataRef.current.value));return -1!==i&&(n=i),{...e,frozenValue:!1,pendingFocus:t.focus,listboxState:0,activeOptionIndex:n,__demoMode:!1,buttonPositionState:tP}},2(e,t){var n,r,i,l,o;if(e.dataRef.current.disabled||1===e.listboxState)return e;let s={...e,searchQuery:"",activationTrigger:null!=(n=t.trigger)?n:1,__demoMode:!1};if(t.focus===tw.Nothing)return{...s,activeOptionIndex:null};if(t.focus===tw.Specific)return{...s,activeOptionIndex:e.options.findIndex(e=>e.id===t.id)};if(t.focus===tw.Previous){let n=e.activeOptionIndex;if(null!==n){let l=e.options[n].dataRef.current.domRef,o=tS(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==o){let t=e.options[o].dataRef.current.domRef;if((null==(r=l.current)?void 0:r.previousElementSibling)===t.current||(null==(i=t.current)?void 0:i.previousElementSibling)===null)return{...s,activeOptionIndex:o}}}}else if(t.focus===tw.Next){let n=e.activeOptionIndex;if(null!==n){let r=e.options[n].dataRef.current.domRef,i=tS(t,{resolveItems:()=>e.options,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});if(null!==i){let t=e.options[i].dataRef.current.domRef;if((null==(l=r.current)?void 0:l.nextElementSibling)===t.current||(null==(o=t.current)?void 0:o.nextElementSibling)===null)return{...s,activeOptionIndex:i}}}}let a=tH(e),u=tS(t,{resolveItems:()=>a.options,resolveActiveIndex:()=>a.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...s,...a,activeOptionIndex:u}},3:(e,t)=>
3{if(e.dataRef.current.disabled||1===e.listboxState)return e;let n=+(""===e.searchQuery),r=e.searchQuery+t.value.toLowerCase(),i=(null!==e.activeOptionIndex?e.options.slice(e.activeOptionIndex+n).concat(e.options.slice(0,e.activeOptionIndex+n)):e.options).find(e=>{var t;return!e.dataRef.current.disabled&&(null==(t=e.dataRef.current.textValue)?void 0:t.startsWith(r))}),l=i?e.options.indexOf(i):-1;return -1===l||l===e.activeOptionIndex?{...e,searchQuery:r}:{...e,searchQuery:r,activeOptionIndex:l,activationTrigger:1}},4:e=>e.dataRef.current.disabled||1===e.listboxState||""===e.searchQuery?e:{...e,searchQuery:""},5:e=>0===e.dataRef.current.mode?{...e,frozenValue:!0}:{...e},6:(e,t)=>{let n=e.options.concat(t.options),r=e.activeOptionIndex;if(e.pendingFocus.focus!==tw.Nothing&&(r=tS(e.pendingFocus,{resolveItems:()=>n,resolveActiveIndex:()=>e.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled})),null===e.activeOptionIndex){let{isSelected:t}=e.dataRef.current;if(t){let e=n.findIndex(e=>null==t?void 0:t(e.dataRef.current.value));-1!==e&&(r=e)}}return{...e,options:n,activeOptionIndex:r,pendingFocus:{focus:tw.Nothing},pendingShouldSort:!0}},7:(e,t)=>{let n=e.options,r=[],i=new Set(t.options);for(let[e,t]of n.entries())if(i.has(t.id)&&(r.push(e),i.delete(t.id),0===i.size))break;if(r.length>0)for(let e of(n=n.slice(),r.reverse()))n.splice(e,1);return{...e,options:n,activationTrigger:1}},8:(e,t)=>e.buttonElement===t.element?e:{...e,buttonElement:t.element},9:(e,t)=>e.optionsElement===t.element?e:{...e,optionsElement:t.element},10:e=>e.pendingShouldSort?{...e,...tH(e),pendingShouldSort:!1}:e,11:e=>"Tracked"!==e.buttonPositionState.kind?e:{...e,buttonPositionState:tI}};class t_ extends tN.Machine{constructor(e){super(e),tD(this,"actions",{onChange:e=>{let{onChange:t,compare:n,mode:r,value:i}=this.state.dataRef.current;return(0,tC.match)(r,{0:()=>null==t?void 0:t(e),1:()=>{let r=i.slice(),l=r.findIndex(t=>n(t,e));return -1===l?r.push(e):r.splice(l,1),null==t?void 0:t(r)}})},registerOption:(0,tN.batch)(()=>{let e=[],t=new Set;return[(n,r)=>{t.has(r)||(t.add(r),e.push({id:n,dataRef:r}))},()=>(t.clear(),this.send({type:6,options:e.splice(0)}))]}),unregisterOption:(0,tN.batch)(()=>{let e=[];return[t=>e.push(t),()=>{this.send({type:7,options:e.splice(0)})}]}),goToOption:(0,tN.batch)(()=>{let e=null;return[(t,n)=>{e={type:2,...t,trigger:n}},()=>e&&this.send(e)]}),closeListbox:()=>{this.send({type:1})},openListbox:e=>{this.send({type:0,focus:e})},selectActiveOption:()=>{var e;if(null!==this.state.activeOptionIndex){let{dataRef:e}=this.state.options[this.state.activeOptionIndex];this.actions.selectOption(e.current.value)}else 0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(e=this.state.buttonElement)||e.focus({preventScroll:!0}))},selectOption:e=>{this.send({type:5,value:e})},search:e=>{this.send({type:3,value:e})},clearSearch:()=>{this.send({type:4})},setButtonElement:e=>{this.send({type:8,element:e})},setOptionsElement:e=>{this.send({type:9,element:e})}}),tD(this,"selectors",{activeDescendantId(e){var t;let n=e.activeOptionIndex,r=e.options;return null===n||null==(t=r[n])?void 0:t.id},isActive(e,t){var n;let r=e.activeOptionIndex,i=e.options;return null!==r&&(null==(n=i[r])?void 0:n.id)===t},hasFrozenValue:e=>e.frozenValue,shouldScrollIntoView(e,t){return!e.__demoMode&&0===e.listboxState&&0!==e.activationTrigger&&this.isActive(e,t)},didButtonMove:e=>"Moved"===e.buttonPositionState.kind}),this.on(6,()=>{requestAnimationFrame(()=>{this.send({type:10})})});{let e=this.state.id,t=tx.stackMachines.get(null);this.disposables.add(t.on(tx.ActionTypes.Push,n=>{t.selectors.isTop(n,e)||0!==this.state.listboxState||this.actions.closeListbox()})),this.on(0,()=>t.actions.push(e)),this.on(1,()=>t.actions.pop(e))}this.disposables.group(e=>{this.on(1,t=>{t.buttonElement&&(e.dispose(),e.add(function(e,t,n){let r=(0,g.disposables)();if("Tracked"===t.kind){let i=function(){l!==tF(e)&&(r.dispose(),n())},{position:l}=t,o=new ResizeObserver(i);o.observe(e),r.add(()=>o.disconnect()),r.addEventListener(window,"scroll",i,{passive:!0}),r.addEventListener(window,"resize",i)}return()=>r.dispose()}(t.buttonElement,t.buttonPositionState,()=>{this.send({type:11})})))})}),this.on(5,(e,t)=>{var n;this.actions.onChange(t.value),0===this.state.dataRef.current.mode&&(this.actions.closeListbox(),null==(n=this.state.buttonElement)||n.focus({preventScroll:!0}))})}static new({id:e,__demoMode:t=!1}){return new t_({id:e,dataRef:{current:{}},listboxState:+!t,options:[],searchQuery:"",activeOptionIndex:null,activationTrigger:1,buttonElement:null,optionsElement:null,pendingShouldSort:!1,pendingFocus:{focus:tw.Nothing},frozenValue:!1,__demoMode:t,buttonPositionState:tP})}reduce(e,t){return(0,tC.match)(t.type,tK,e,t)}}var tU=e.i(526599);let tV=(0,d.createContext)(null);function tW(e){let t=(0,d.useContext)(tV);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,tq),t}return t}function tq({id:e,__demoMode:t=!1}){let n=(0,d.useMemo)(()=>t_.new({id:e,__demoMode:t}),[]);return(0,tU.useOnUnmount)(()=>n.dispose()),n}let tJ=(0,d.createContext)(null);function tQ(e){let t=(0,d.useContext)(tJ);if(null===t){let t=Error(`<${e} /> is missing a parent <Listbox /> component.`);throw Error.captureStackTrace&&Error.captureStackTrace(t,tQ),t}return t}tJ.displayName="ListboxDataContext";let tY=d.Fragment,tX=(0,d.createContext)(!1),tG=tO.RenderFeatures.RenderStrategy|tO.RenderFeatures.Static,tZ=d.Fragment,t0=(0,tO.forwardRefWithAs)(function(e,t){let n=(0,d.useId)(),r=(0,z.useDisabled)(),{value:i,defaultValue:l,form:o,name:s,onChange:a,by:u,invalid:c=!1,disabled:p=r||!1,horizontal:m=!1,multiple:g=!1,__demoMode:b=!1,...x}=e,y=(0,I.useSyncRefs)(t),w=function(e){let[t]=(0,d.useState)(e);return t}(l),[S=g?[]:void 0,E]=function(e,t,n){let[r,i]=(0,d.useState)(n),l=void 0!==e,o=(0,d.useRef)(l),s=(0,d.useRef)(!1),a=(0,d.useRef)(!1);return!l||o.current||s.current?l||!o.current||a.current||(a.current=!0,o.current=l,console.error("A component is changing from controlled to uncontrolled. This may be caused by the value changing from a defined value to undefined, which should not happen.")):(s.current=!0,o.current=l,console.error("A component is changing from uncontrolled to controlled. This may be caused by the value changing from undefined to a defined value, which should not happen.")),[l?e:r,(0,h.useEvent)(e=>(l||(0,f.flushSync)(()=>i(e)),null==t?void 0:t(e)))]}(i,a,w),R=tq({id:n,__demoMode:b}),O=(0,d.useRef)({static:!1,hold:!1}),T=(0,d.useRef)(new Map),M=function(e=function(e,t){return null!==e&&null!==t&&"object"==typeof e&&"object"==typeof t&&"id"in e&&"id"in t?e.id===t.id:e===t}){return(0,d.useCallback)((t,n)=>"string"==typeof e?(null==t?void 0:t[e])===(null==n?void 0:n[e]):e(t,n),[e])}(u),k=(0,d.useCallback)(e=>(0,tC.match)(L.mode,{[tz.Multi]:()=>S.some(t=>M(t,e)),[tz.Single]:()=>M(S,e)}),[S]),L=(0,P.useSlot)({value:S,disabled:p,invalid:c,mode:g?tz.Multi:tz.Single,orientation:m?"horizontal":"vertical",onChange:E,compare:M,isSelected:k,optionsPropsRef:O,listRef:T});(0,v.useIsoMorphicEffect)(()=>{R.state.dataRef.current=L},[L]);let N=(0,ty.useSlice)(R,e=>e.listboxState),F=tx.stackMachines.get(null),j=(0,ty.useSlice)(F,(0,d.useCallback)(e=>F.selectors.isTop(e,n),[F,n])),[D,A]=(0,ty.useSlice)(R,e=>[e.buttonElement,e.optionsElement]);(0,C.useOutsideClick)(j,[D,A],(e,t)=>{R.send({type:t$.CloseListbox}),(0,tE.isFocusableElement)(t,tE.FocusableMode.Loose)||(e.preventDefault(),null==D||D.focus())});let B=(0,P.useSlot)({open:N===tA.Open,disabled:p,invalid:c,value:S}),[$,H]=(0,tk.useLabels)({inherit:!0}),K=(0,d.useCallback)(()=>
3{if(void 0!==w)return null==E?void 0:E(w)},[E,w]),_=(0,tO.useRender)();return d.default.createElement(H,{value:$,props:{htmlFor:null==D?void 0:D.id},slot:{open:N===tA.Open,disabled:p}},d.default.createElement(tf,null,d.default.createElement(tV.Provider,{value:R},d.default.createElement(tJ.Provider,{value:L},d.default.createElement(tb.OpenClosedProvider,{value:(0,tC.match)(N,{[tA.Open]:tb.State.Open,[tA.Closed]:tb.State.Closed})},null!=s&&null!=S&&d.default.createElement(th.FormFields,{disabled:p,data:{[s]:S},form:o,onReset:K}),_({ourProps:{ref:y},theirProps:x,slot:B,defaultTag:tY,name:"Listbox"}))))))}),t1=(0,tO.forwardRefWithAs)(function(e,t){var n;let r,i=(0,d.useId)(),l=(0,tv.useProvidedId)(),o=tQ("Listbox.Button"),s=tW("Listbox.Button"),{id:a=l||`headlessui-listbox-button-${i}`,disabled:g=o.disabled||!1,autoFocus:v=!1,...b}=e,S=(0,I.useSyncRefs)(t,(0,d.useContext)(tc).setReference,s.actions.setButtonElement),E=(0,d.useContext)(tc).getReferenceProps,[R,C,O]=(0,ty.useSlice)(s,e=>[e.listboxState,e.buttonElement,e.optionsElement]);!function(e,{trigger:t,action:n,close:r,select:i}){let l=(0,d.useRef)(null),o=(0,d.useRef)(null),s=(0,d.useRef)(null);(0,T.useDocumentEvent)(e&&null!==t,"pointerdown",e=>{y.isNode(null==e?void 0:e.target)&&null!=t&&t.contains(e.target)&&(o.current=e.x,s.current=e.y,l.current=e.timeStamp)}),(0,T.useDocumentEvent)(e&&null!==t,"pointerup",e=>{var t,a;let u=l.current;if(null===u||(l.current=null,!y.isHTMLorSVGElement(e.target))||5>Math.abs(e.x-(null!=(t=o.current)?t:e.x))&&5>Math.abs(e.y-(null!=(a=s.current)?a:e.y)))return;let c=n(e);switch(c.kind){case 0:return;case 1:e.timeStamp-u>200&&(i(c.target),r());break;case 2:r()}},{capture:!0})}(R===tA.Open,{trigger:C,action:(0,d.useCallback)(e=>{if(null!=C&&C.contains(e.target))return k;let t=e.target.closest('[role="option"]:not([data-disabled])');return y.isHTMLElement(t)?{kind:1,target:t}:null!=O&&O.contains(e.target)?k:L},[C,O]),close:s.actions.closeListbox,select:s.actions.selectActiveOption});let M=(0,h.useEvent)(e=>{switch(e.key){case tM.Keys.Enter:(0,tR.attemptSubmit)(e.currentTarget);break;case tM.Keys.Space:case tM.Keys.ArrowDown:e.preventDefault(),s.actions.openListbox({focus:o.value?tw.Nothing:tw.First});break;case tM.Keys.ArrowUp:e.preventDefault(),s.actions.openListbox({focus:o.value?tw.Nothing:tw.Last})}}),N=(0,h.useEvent)(e=>{e.key===tM.Keys.Space&&e.preventDefault()}),F=(n=e=>{var t;s.state.listboxState===tA.Open?((0,f.flushSync)(()=>s.actions.closeListbox()),null==(t=s.state.buttonElement)||t.focus({preventScroll:!0})):(e.preventDefault(),s.actions.openListbox({focus:tw.Nothing}))},r=(0,d.useRef)(null),{onPointerDown:(0,h.useEvent)(e=>{r.current=e.pointerType,w(e.currentTarget)||"mouse"!==e.pointerType||e.button!==x.Left||(e.preventDefault(),n(e))}),onClick:(0,h.useEvent)(e=>{"mouse"!==r.current&&(w(e.currentTarget)||n(e))})}),j=(0,h.useEvent)(e=>e.preventDefault()),D=(0,tk.useLabelledBy)([a]),A=(0,tT.useDescribedBy)(),{isFocusVisible:z,focusProps:B}=(0,u.useFocusRing)({autoFocus:v}),{isHovered:$,hoverProps:H}=(0,c.useHover)({isDisabled:g}),{pressed:K,pressProps:_}=function({disabled:e=!1}={}){let t=(0,d.useRef)(null),[n,r]=(0,d.useState)(!1),i=(0,m.useDisposables)(),l=(0,h.useEvent)(()=>{t.current=null,r(!1),i.dispose()}),o=(0,h.useEvent)(e=>{if(i.dispose(),null===t.current){t.current=e.currentTarget,r(!0);{let n=(0,p.getOwnerDocument)(e.currentTarget);i.addEventListener(n,"pointerup",l,!1),i.addEventListener(n,"pointermove",e=>{if(t.current){var n,i;let l,o;r((l=e.width/2,o=e.height/2,n={top:e.clientY-o,right:e.clientX+l,bottom:e.clientY+o,left:e.clientX-l},i=t.current.getBoundingClientRect(),!(!n||!i||n.right<i.left||n.left>i.right||n.bottom<i.top||n.top>i.bottom)))}},!1),i.addEventListener(n,"pointercancel",l,!1)}}});return{pressed:n,pressProps:e?{}:{onPointerDown:o,onPointerUp:l,onClick:l}}}({disabled:g}),U=(0,P.useSlot)({open:R===tA.Open,active:K||R===tA.Open,disabled:g,invalid:o.invalid,value:o.value,hover:$,focus:z,autofocus:v}),V=(0,ty.useSlice)(s,e=>e.listboxState===tA.Open),W=(0,tO.mergeProps)(E(),{ref:S,id:a,type:(0,d.useMemo)(()=>{var t;if(e.type)return e.type;let n=null!=(t=e.as)?t:"button";if("string"==typeof n&&"button"===n.toLowerCase()||(null==C?void 0:C.tagName)==="BUTTON"&&!C.hasAttribute("type"))return"button"},[e.type,e.as,C]),"aria-haspopup":"listbox","aria-controls":null==O?void 0:O.id,"aria-expanded":V,"aria-labelledby":D,"aria-describedby":A,disabled:g||void 0,autoFocus:v,onKeyDown:M,onKeyUp:N,onKeyPress:j},F,B,H,_);return(0,tO.useRender)()({ourProps:W,theirProps:b,slot:U,defaultTag:"button",name:"Listbox.Button"})}),t2=tk.Label,t4=(0,tO.forwardRefWithAs)(function(e,t){let n=(0,d.useId)(),{id:r=`headlessui-listbox-options-${n}`,anchor:i,portal:l=!1,modal:o=!0,transition:s=!1,...a}=e,u=(0,d.useMemo)(()=>i?"string"==typeof i?{to:i}:i:null,[i]),[c,x]=(0,d.useState)(null);u&&(l=!0);let y=tQ("Listbox.Options"),w=tW("Listbox.Options"),[E,C,T,M]=(0,ty.useSlice)(w,e=>[e.listboxState,e.buttonElement,e.optionsElement,e.__demoMode]),k=(0,O.useOwnerDocument)(C),L=(0,O.useOwnerDocument)(T),F=(0,tb.useOpenClosed)(),[j,D]=(0,A.useTransition)(s,c,null!==F?(F&tb.State.Open)===tb.State.Open:E===tA.Open);(0,R.useOnDisappear)(j,C,w.actions.closeListbox);let z=!M&&o&&E===tA.Open;(0,N.useScrollLock)(z,L);let B=!M&&o&&E===tA.Open;(0,S.useInertOthers)(B,{allowed:(0,d.useCallback)(()=>[C,T],[C,T])});let $=!(0,ty.useSlice)(w,w.selectors.didButtonMove)&&j,H=tg((0,ty.useSlice)(w,w.selectors.hasFrozenValue)&&!e.static,y.value),K=(0,d.useCallback)(e=>y.compare(H,e),[y.compare,H]),_=(0,ty.useSlice)(w,e=>{var t;if(null==u||!(null!=(t=null==u?void 0:u.to)&&t.includes("selection")))return null;let n=e.options.findIndex(e=>K(e.dataRef.current.value));return -1===n&&(n=0),n}),[U,V]=function(e=null){!1===e&&(e=null),"string"==typeof e&&(e={to:e});let t=(0,d.useContext)(td),n=(0,d.useMemo)(()=>e,[JSON.stringify(e,(e,t)=>{var n;return null!=(n=null==t?void 0:t.outerHTML)?n:t})]);(0,v.useIsoMorphicEffect)(()=>{null==t||t(null!=n?n:null)},[t,n]);let r=(0,d.useContext)(tc);return(0,d.useMemo)(()=>[r.setFloating,e?r.styles:{}],[r.setFloating,e,r.styles])}((()=>
3{if(null==u)return;if(null===_)return{...u,inner:void 0};let e=Array.from(y.listRef.current.values());return{...u,inner:{listRef:{current:e},index:_}}})()),W=function(){let{getFloatingProps:e,slot:t}=(0,d.useContext)(tc);return(0,d.useCallback)((...n)=>Object.assign({},e(...n),{"data-anchor":t.anchor}),[e,t])}(),q=(0,I.useSyncRefs)(t,u?U:null,w.actions.setOptionsElement,x),J=(0,m.useDisposables)();(0,d.useEffect)(()=>{T&&E===tA.Open&&((0,p.isActiveElement)(T)||null==T||T.focus({preventScroll:!0}))},[E,T]);let Q=(0,h.useEvent)(e=>{var t;switch(J.dispose(),e.key){case tM.Keys.Space:if(""!==w.state.searchQuery)return e.preventDefault(),e.stopPropagation(),w.actions.search(e.key);case tM.Keys.Enter:e.preventDefault(),e.stopPropagation(),w.actions.selectActiveOption();break;case(0,tC.match)(y.orientation,{vertical:tM.Keys.ArrowDown,horizontal:tM.Keys.ArrowRight}):return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:tw.Next});case(0,tC.match)(y.orientation,{vertical:tM.Keys.ArrowUp,horizontal:tM.Keys.ArrowLeft}):return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:tw.Previous});case tM.Keys.Home:case tM.Keys.PageUp:return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:tw.First});case tM.Keys.End:case tM.Keys.PageDown:return e.preventDefault(),e.stopPropagation(),w.actions.goToOption({focus:tw.Last});case tM.Keys.Escape:e.preventDefault(),e.stopPropagation(),(0,f.flushSync)(()=>w.actions.closeListbox()),null==(t=w.state.buttonElement)||t.focus({preventScroll:!0});return;case tM.Keys.Tab:e.preventDefault(),e.stopPropagation(),(0,f.flushSync)(()=>w.actions.closeListbox()),(0,tE.focusFrom)(w.state.buttonElement,e.shiftKey?tE.Focus.Previous:tE.Focus.Next);break;default:1===e.key.length&&(w.actions.search(e.key),J.setTimeout(()=>w.actions.clearSearch(),350))}}),Y=(0,ty.useSlice)(w,e=>{var t;return null==(t=e.buttonElement)?void 0:t.id}),X=(0,P.useSlot)({open:E===tA.Open}),G=(0,tO.mergeProps)(u?W():{},{id:r,ref:q,"aria-activedescendant":(0,ty.useSlice)(w,w.selectors.activeDescendantId),"aria-multiselectable":y.mode===tz.Multi||void 0,"aria-labelledby":Y,"aria-orientation":y.orientation,onKeyDown:Q,role:"listbox",tabIndex:E===tA.Open?0:void 0,style:{...a.style,...V,"--button-width":function(e,t,n=!1){let[r,i]=(0,d.useState)(()=>b(t));return(0,v.useIsoMorphicEffect)(()=>{if(!t||!e)return;let n=(0,g.disposables)();return n.requestAnimationFrame(function e(){n.requestAnimationFrame(e),i(e=>{let n=b(t);return n.width===e.width&&n.height===e.height?e:n})}),()=>{n.dispose()}},[t,e]),n?{width:`${r.width}px`,height:`${r.height}px`}:r}(j,C,!0).width},...(0,A.transitionDataAttributes)(D)}),Z=(0,tO.useRender)(),ee=(0,d.useMemo)(()=>y.mode===tz.Multi?y:{...y,isSelected:K},[y,K]);return d.default.createElement(tL.Portal,{enabled:!!l&&(e.static||j),ownerDocument:k},d.default.createElement(tJ.Provider,{value:ee},Z({ourProps:G,theirProps:a,slot:X,defaultTag:"div",features:tG,visible:$,name:"Listbox.Options"}
3)))}),t5=(0,tO.forwardRefWithAs)(function(e,t){let n,r,i,l=(0,d.useId)(),{id:o=`headlessui-listbox-option-${l}`,disabled:s=!1,value:a,...u}=e,c=!0===(0,d.useContext)(tX),f=tQ("Listbox.Option"),p=tW("Listbox.Option"),m=(0,ty.useSlice)(p,e=>p.selectors.isActive(e,o)),b=f.isSelected(a),x=(0,d.useRef)(null),y=(n=(0,d.useRef)(""),r=(0,d.useRef)(""),(0,h.useEvent)(()=>{let e=x.current;if(!e)return"";let t=e.innerText;if(n.current===t)return r.current;let i=(function(e){let t=e.getAttribute("aria-label");if("string"==typeof t)return t.trim();let n=e.getAttribute("aria-labelledby");if(n){let e=n.split(" ").map(e=>{let t=document.getElementById(e);if(t){let e=t.getAttribute("aria-label");return"string"==typeof e?e.trim():j(t).trim()}return null}).filter(Boolean);if(e.length>0)return e.join(", ")}return j(e).trim()})(e).trim().toLowerCase();return n.current=t,r.current=i,i})),w=(0,E.useLatestValue)({disabled:s,value:a,domRef:x,get textValue(){return y()}}),S=(0,I.useSyncRefs)(t,x,e=>{e?f.listRef.current.set(o,e):f.listRef.current.delete(o)}),R=(0,ty.useSlice)(p,e=>p.selectors.shouldScrollIntoView(e,o));(0,v.useIsoMorphicEffect)(()=>{if(R)return(0,g.disposables)().requestAnimationFrame(()=>{var e,t;null==(t=null==(e=x.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})})},[R,x]),(0,v.useIsoMorphicEffect)(()=>{if(!c)return p.actions.registerOption(o,w),()=>p.actions.unregisterOption(o)},[w,o,c]);let C=(0,h.useEvent)(e=>{if(s)return e.preventDefault();p.actions.selectOption(a)}),O=(0,h.useEvent)(()=>{if(s)return p.actions.goToOption({focus:tw.Nothing});p.actions.goToOption({focus:tw.Specific,id:o})}),T=(i=(0,d.useRef)([-1,-1]),{wasMoved(e){let t=D(e);return(i.current[0]!==t[0]||i.current[1]!==t[1])&&(i.current=t,!0)},update(e){i.current=D(e)}}),M=(0,h.useEvent)(e=>T.update(e)),k=(0,h.useEvent)(e=>{T.wasMoved(e)&&(s||m&&p.state.activationTrigger===tB.Pointer||p.actions.goToOption({focus:tw.Specific,id:o},tB.Pointer))}),L=(0,h.useEvent)(e=>{T.wasMoved(e)&&(s||m&&p.state.activationTrigger===tB.Pointer&&p.actions.goToOption({focus:tw.Nothing}))}),N=(0,P.useSlot)({active:m,focus:m,selected:b,disabled:s,selectedOption:b&&c}),F=c?{}:{id:o,ref:S,role:"option",tabIndex:!0===s?void 0:-1,"aria-disabled":!0===s||void 0,"aria-selected":b,disabled:void 0,onClick:C,onFocus:O,onPointerEnter:M,onMouseEnter:M,onPointerMove:k,onMouseMove:k,onPointerLeave:L,onMouseLeave:L},A=(0,tO.useRender)();return!b&&c?null:A({ourProps:F,theirProps:u,slot:N,defaultTag:"div",name:"Listbox.Option"})}),t6=Object.assign(t0,{Button:t1,Label:t2,Options:t4,Option:t5,SelectedOption:(0,tO.forwardRefWithAs)(function(e,t){let{options:n,placeholder:r,...i}=e,l={ref:(0,I.useSyncRefs)(t)},o=tQ("ListboxSelectedOption"),s=(0,P.useSlot)({}),a=void 0===o.value||null===o.value||o.mode===tz.Multi&&Array.isArray(o.value)&&0===o.value.length,u=(0,tO.useRender)();return d.default.createElement(tX.Provider,{value:!0},u({ourProps:l,theirProps:{...i,children:d.default.createElement(d.default.Fragment,null,r&&a?r:n)},slot:s,defaultTag:tZ,name:"ListboxSelectedOption"}))})});var t3=e.i(854056),t8=e.i(962023),t7=e.i(140349);e.s(["default",0,({options:e,selected:t,onChange:n,className:r="",icon:i,tabletTextSize:l="tablet:text-desktop-20-regular"})=>(0,a.jsx)("div",{className:`relative w-full text-black-600 ${r}`,children:(0,a.jsx)(t6,{value:t,onChange:n,children:({open:n})=>(0,a.jsxs)("div",{className:` ${n?"rounded-b-none rounded-t-xl":"!rounded-xl"}`,children:[(0,a.jsxs)(t1,{className:`leading-4 flex-nowrap outline-0 inline-flex w-full gap-1 items-center justify-between py-3 px-4 text-left ${n?"rounded-b-none":"rounded-xl"} cursor-pointer text-mobile-text-medium ${l}`,children:[(0,a.jsx)("span",{className:"truncate flex-1",children:t.label}),n?i||(0,a.jsx)(t7.CheckIcon,{className:"text-black-600 transition-transform w-5"}):i||(0,a.jsx)(t8.ArrowRightIcon,{className:"text-black-500 transition-transform rotate-90 w-5"})]}),(0,a.jsx)(t3.Transition,{as:d.Fragment,show:n,enter:"transition ease-out duration-100",enterFrom:"opacity-0 -translate-y-1",enterTo:"opacity-100 translate-y-0",leave:"transition ease-in duration-75",leaveFrom:"opacity-100 translate-y-0",leaveTo:"opacity-0 -translate-y-1",children:(0,a.jsx)(t4,{className:"nav-glass bg-white/85! absolute! top-full left-0 z-[120] w-full rounded-b-xl overflow-hidden focu
3s:outline-none",children:e.filter(e=>e.value!==t.value).map(e=>(0,a.jsx)(t5,{value:e,className:({active:e})=>`relative px-4 py-2 w-full transition-colors duration-150 ease-in-out cursor-pointer text-now text-xs leading-4 ${l} ${e?"bg-black-600/10":"bg-transparent"}`,children:(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)("hr",{className:"absolute top-0 left-0 right-0 border-t border-black-400 w-full"}),e.label]})},e.value))})})]})})})],83609)}]);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.