PageSourceSearch

https://www.arduino.cc/_next/static/chunks/3797.611290ded5f959bd.js

js arduino.cc collected 2026-09-24 07:18:21 UTC 72,269 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[3797],{29774:(e,t,n)=>{n.d(t,{Z:()=>l});var r=n(80263);let l=(0,n(53239).forwardRef)((e,t)=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 32 32",ref:t,...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"m20.71 15.71-4 4a1 1 0 0 1-1.42 0l-4-4a1 1 0 0 1-.21-1.09A1 1 0 0 1 12 14h8a1 1 0 0 1 .92.62 1 1 0 0 1-.21 1.09"})}))},33797:(e,t,n)=>{n.r(t),n.d(t,{default:()=>tQ});var r=n(80263),l=n(39932),i=n(85433),o=n(8051),u=n(53239),a=n(37034),s=n(41588),c=n(27169),d=n(81040);let p=u.createContext(void 0),f=u.createContext(void 0),h=u.createContext(void 0),m=u.createContext("");function v(){let e=u.useContext(p);if(!e)throw Error((0,d.A)(22));return e}function g(){let e=u.useContext(f);if(!e)throw Error((0,d.A)(23));return e}function x(){let e=u.useContext(h);if(!e)throw Error((0,d.A)(24));return e}function _(){return u.useContext(m)}let y=u.createContext({register:()=>{},unregister:()=>{},subscribeMapChange:()=>()=>{},elementsRef:{current:[]},nextIndexRef:{current:0}}),b=function(e){return e[e.None=0]="None",e[e.GuessFromOrder=1]="GuessFromOrder",e}({});function I(e={}){let{label:t,metadata:n,textRef:r,indexGuessBehavior:l,index:i}=e,{register:o,unregister:a,subscribeMapChange:s,elementsRef:d,labelsRef:p,nextIndexRef:f}=u.useContext(y),h=u.useRef(-1),[m,v]=u.useState(i??(l===b.GuessFromOrder?()=>{if(-1===h.current){let e=f.current;f.current+=1,h.current=e}return h.current}:-1)),g=u.useRef(null),x=u.useCallback(e=>{if(g.current=e,-1!==m&&null!==e&&(d.current[m]=e,p)){let n=void 0!==t;p.current[m]=n?t:r?.current?.textContent??e.textContent}},[m,d,p,t,r]);return(0,c.g)(()=>{if(null!=i)return;let e=g.current;if(e)return o(e,n),()=>{a(e)}},[i,o,a,n]),(0,c.g)(()=>{if(null==i)return s(e=>{let t=g.current?e.get(g.current)?.index:null;null!=t&&v(t)})},[i,s,v]),u.useMemo(()=>({ref:x,index:m}),[m,x])}var R=n(83820);let k=u.createContext(void 0);var P=n(99421);let j=(e,t)=>Object.is(e,t);function C(e,t,n){return null==e||null==t?Object.is(e,t):n(e,t)}function M(e,t,n){return!!e&&0!==e.length&&e.some(e=>void 0!==e&&C(e,t,n))}function S(e,t,n){return e&&0!==e.length?e.findIndex(e=>void 0!==e&&C(e,t,n)):-1}function w(e){if(null==e)return"";if("string"==typeof e)return e;try{return JSON.stringify(e)}catch{return String(e)}}function E(e){return null!=e&&e.length>0&&"object"==typeof e[0]&&null!=e[0]&&"items"in e[0]}function A(e,t){if(t&&null!=e)return t(e)??"";if(e&&"object"==typeof e){if("label"in e&&null!=e.label)return String(e.label);if("value"in e)return String(e.value)}return w(e)}function O(e,t){return t&&null!=e?t(e)??"":e&&"object"==typeof e&&"value"in e&&"label"in e?w(e.value):w(e)}function V(e,t,n){if(n&&null!=e)return n(e);if(e&&"object"==typeof e&&"label"in e&&null!=e.label)return e.label;if(t&&!Array.isArray(t))return t[e]??A(e,n);if(Array.isArray(t)){let r=E(t)?t.flatMap(e=>e.items):t;if(null==e||"object"!=typeof e){let t=r.find(t=>t.value===e);return t&&null!=t.label?t.label:A(e,n)}if("value"in e){let t=r.find(t=>t&&t.value===e.value);if(t&&null!=t.label)return t.label}}return A(e,n)}let q={id:(0,P.M)(e=>e.id),query:(0,P.M)(e=>e.query),items:(0,P.M)(e=>e.items),selectedValue:(0,P.M)(e=>e.selectedValue),hasSelectionChips:(0,P.M)(e=>{let t=e.selectedValue;return Array.isArray(t)&&t.length>0}),hasSelectedValue:(0,P.M)(e=>{let{selectedValue:t,selectionMode:n}=e;return null!=t&&(!("multiple"===n&&Array.isArray(t))||t.length>0)}),hasNullItemLabel:(0,P.M)((e,t)=>!!t&&function(e){if(!Array.isArray(e))return null!=e&&!("null"in e);if(E(e)){for(let t of e)for(let e of t.items)if(e&&null==e.value&&null!=e.label)return!0;return!1}for(let t of e)if(t&&null==t.value&&null!=t.label)return!0;return!1}(e.items)),open:(0,P.M)(e=>e.open),mounted:(0,P.M)(e=>e.mounted),forceMounted:(0,P.M)(e=>e.forceMounted),inline:(0,P.M)(e=>e.inline),activeIndex:(0,P.M)(e=>e.activeIndex),selectedIndex:(0,P.M)(e=>e.selectedIndex),isActive:(0,P.M)((e,t)=>e.activeIndex===t),isSelected:(0,P.M)((e,t)=>{let n=e.isItemEqualToValue,r=e.selectedValue;return Array.isArray(r)?r.some(e=>C(e,t,n)):C(r,t,n)}),transitionStatus:(0,P.M)(e=>e.transitionStatus),popupProps:(0,P.M)(e=>e.popupProps),inputProps:(0,P.M)(e=>e.inputProps),triggerProps:(0,P.M)(e=>e.triggerProps),getItemProps:(0,P.M)(e=>e.getItemProps),positionerElement:(0,P.M)(e=>e.positionerElement),listElement:(0,P.M)(e=>e.listElement),triggerElement:(0,P.M)(e=>e.triggerElement),inputElement:(0,P.M)(e=>e.inputElement),popupSide:(0,P.M)(e=>e.popupSide),openMethod:(0,P.M)(e=>e.openMethod),inputInsidePopup:(0,P.M)(e=>e.inputInsidePopup),selectionMode:(0,P.M)(e=>e.selectionMode),listRef:(0,P.M)(e=>e.listRef),labelsRef:(0,P.M)(e=>e.labelsRef),popupRef:(0,P.M)(e=>e.popupRef),emptyRef:(0,P.M)(e=>e.emptyRef),inputRef:(0,P.M)(e=>e.inputRef),keyboardActiveRef:(0,P.M)(e=>e.keyboardActiveRef),chipsContainerRef:(0,P.M)(e=>e.chipsContainerRef),clearRef:(0,P.M)(e=>e.clearRef),valuesRef:(0,P.M)(e=>e.valuesRef),allValuesRef:(0,P.M)(e=>e.allValuesRef),name:(0,P.M)(e=>e.name),disabled:(0,P.M)(e=>e.disabled),readOnly:(0,P.M)(e=>e.readOnly),required:(0,P.M)(e=>e.required),grid:(0,P.M)(e=>e.grid),isGrouped:(0,P.M)(e=>e.isGrouped),virtualized:(0,P.M)(e=>e.virtualized),onOpenChangeComplete:(0,P.M)(e=>e.onOpenChangeComplete),openOnInputClick:(0,P.M)(e=>e.openOnInputClick),itemToStringLabel:(0,P.M)(e=>e.itemToStringLabel),isItemEqualToValue:(0,P.M)(e=>e.isItemEqualToValue),modal:(0,P.M)(e=>e.modal),autoHighlight:(0,P.M)(e=>e.autoHighlight),submitOnItemClick:(0,P.M)(e=>e.submitOnItemClick)};var N=n(19983);let D=u.createContext(!1),B=u.memo(u.forwardRef(function(e,t){let{render:n,className:l,value:i=null,index:o,disabled:d=!1,nativeButton:p=!1,...f}=e,h=u.useRef(!1),m=u.useRef(null),g=I({index:o,textRef:m,indexGuessBehavior:b.GuessFromOrder}),_=v(),y=u.useContext(D),{flatFilteredItems:P}=x(),j=(0,s.P)(_,q.open),M=(0,s.P)(_,q.selectionMode),w=(0,s.P)(_,q.readOnly),E=(0,s.P)(_,q.virtualized),A=(0,s.P)(_,q.isItemEqualToValue),O="none"!==M,V=o??(E?S(P,i,A):g.index),B=-1!==g.index,T=(0,s.P)(_,q.id),K=(0,s.P)(_,q.isActive,V),F=(0,s.P)(_,q.isSelected,i),z=(0,s.P)(_,q.items),L=(0,s.P)(_,q.getItemProps),H=u.useRef(null),W=null!=T&&B?`${T}-${V}`:void 0,J=F&&O;(0,c.g)(()=>
1{if(!(B&&(E||null!=o)))return;let e=_.state.listRef.current;return e[V]=H.current,()=>{delete e[V]}},[B,E,V,o,_]),(0,c.g)(()=>{if(!B||z)return;let e=_.state.valuesRef.current;return e[V]=i,"none"!==M&&_.state.allValuesRef.current.push(i),()=>{delete e[V]}},[B,z,V,i,_,M]),(0,c.g)(()=>{if(!j){h.current=!1;return}if(!B||z)return;let e=_.state.selectedValue;C(Array.isArray(e)?e[e.length-1]:e,i,A)&&_.set("selectedIndex",V)},[B,z,j,_,V,i,A]);let G=u.useMemo(()=>({disabled:d,selected:J,highlighted:K}),[d,J,K]),U=L({active:K,selected:J});U.id=void 0,U.onFocus=void 0;let{getButtonProps:$,buttonRef:Y}=(0,N.s)({disabled:d,focusableWhenDisabled:!0,native:p});function X(e){function t(){_.state.handleSelection(e,i)}_.state.submitOnItemClick?(a.flushSync(t),_.state.requestSubmit()):t()}let Z=(0,R.o)("div",e,{ref:[Y,t,g.ref,H],state:G,props:[U,{id:W,role:y?"gridcell":"option","aria-selected":O?J:void 0,tabIndex:void 0,onPointerDownCapture(e){h.current=!0,e.preventDefault()},onClick(e){d||w||X(e.nativeEvent)},onMouseUp(e){let t=h.current;h.current=!1,d||w||0!==e.button||t||!K||X(e.nativeEvent)}},f,$]}),Q=u.useMemo(()=>({selected:J,textRef:m}),[J,m]);return(0,r.jsx)(k.Provider,{value:Q,children:Z})}));var T=n(68525),K=n(27859),F=n(17671),z=n(66661),L=n(97540);let H={...z.jL,...L.d,popupSide:e=>e?{"data-popup-side":e}:null,listEmpty:e=>e?{"data-list-empty":""}:null};var W=n(40329),J=n(62408);let G=u.createContext(void 0);function U(){return u.useContext(G)}var $=n(79676);let Y=u.createContext(void 0);function X(e){let t=u.useContext(Y);if(void 0===t&&!e)throw Error((0,d.A)(21));return t}var Z=n(20159),Q=n(79585),ee=n(29582);let et=u.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,id:i,...o}=e,{state:a,disabled:c,setTouched:d,setFocused:p,validationMode:f,validation:h}=(0,W.V)(),{labelId:m}=(0,J.H)(),g=U(),y=!!X(!0),b=v(),{filteredItems:I}=x(),k=_(),P=(0,s.P)(b,q.required),j=(0,ee.j)(),C=(0,s.P)(b,q.disabled),M=(0,s.P)(b,q.readOnly),S=(0,s.P)(b,q.name),w=(0,s.P)(b,q.selectionMode),E=(0,s.P)(b,q.autoHighlight),A=(0,s.P)(b,q.inputProps),O=(0,s.P)(b,q.triggerProps),V=(0,s.P)(b,q.open),N=(0,s.P)(b,q.mounted),D=(0,s.P)(b,q.selectedValue),B=(0,s.P)(b,q.popupSide),z=(0,s.P)(b,q.positionerElement),L=(0,s.P)(b,q.id),G=(0,s.P)(b,q.inline),Y=!!E,et=N&&z?B:null,en=c||C||l,er=0===I.length,el=y||G,ei=(0,F.e)(i??(el?void 0:L)),[eo,eu]=u.useState(null),ea=u.useRef(!1),es=(0,T.K)(e=>{let t=y||b.state.inline;t&&!b.state.hasInputValue&&b.state.setInputValue("",(0,Z.d)(Q.dv)),b.update({inputElement:e,inputInsidePopup:t})}),ec=u.useMemo(()=>({...a,open:V,disabled:en,readOnly:M,popupSide:et,listEmpty:er}),[a,V,en,M,et,er]);return(0,R.o)("input",e,{state:ec,ref:[t,b.state.inputRef,es],props:[A,O,{type:"text",value:e.value??eo??k,"aria-readonly":M||void 0,"aria-required":P||void 0,"aria-labelledby":m,disabled:en,readOnly:M,required:"none"===w?P:void 0,..."none"===w&&S&&{name:S},id:ei,onFocus(){p(!0)},onBlur(){if(d(!0),p(!1),"onBlur"===f){let e="none"===w?k:D;h.commit(e)}},onCompositionStart(e){K.m0||(ea.current=!0,eu(e.currentTarget.value))},onCompositionEnd(e){ea.current=!1;let t=e.currentTarget.value;eu(null),b.state.setInputValue(t,(0,Z.d)(Q.pf,e.nativeEvent))},onChange(e){if(ea.current){let t=e.currentTarget.value;eu(t),""!==t||b.state.openOnInputClick||b.state.inputInsidePopup||b.state.setOpen(!1,(0,Z.d)(Q.qs,e.nativeEvent));let n=t.trim();M||en||""===n||(b.state.setOpen(!0,(0,Z.d)(Q.pf,e.nativeEvent)),Y||b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"})),V&&null!==b.state.activeIndex&&!(Y&&""!==n)&&b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"});return}b.state.setInputValue(e.currentTarget.value,(0,Z.d)(Q.pf,e.nativeEvent));let t=""===e.currentTarget.value,n=(0,Z.d)(Q.qs,e.nativeEvent);t&&!b.state.inputInsidePopup&&("single"===w&&b.state.setSelectedValue(null,n),b.state.openOnInputClick||b.state.setOpen(!1,n));let r=e.currentTarget.value.trim();M||en||""===r||(b.state.setOpen(!0,(0,Z.d)(Q.pf,e.nativeEvent)),Y||b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"})),V&&null!==b.state.activeIndex&&!Y&&b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"})},onKeyDown(e){if(en||M||e.ctrlKey||e.shiftKey||e.altKey||e.metaKey)return;b.state.keyboardActiveRef.current=!0;let t=e.currentTarget,n=t.scrollWidth-t.clientWidth,r="rtl"===j;if("Home"===e.key){(0,$.jo)(e);let n=K.gm&&r?t.value.length:0;t.setSelectionRange(n,n),t.scrollLeft=0;return}if("End"===e.key){(0,$.jo)(e);let l=K.gm&&r?0:t.value.length;t.setSelectionRange(l,l),t.scrollLeft=r?-n:n;return}if(!N&&"Escape"===e.key){let t="multiple"===w&&Array.isArray(D)?0===D.length:null===D,n=(0,Z.d)(Q.jv,e.nativeEvent);b.state.setInputValue("",n),b.state.setSelectedValue("multiple"===w?[]:null,n),t||b.state.inline||n.isPropagationAllowed||e.stopPropagation();return}if(g&&"Backspace"===e.key&&""===t.value&&void 0===g.highlightedChipIndex&&Array.isArray(D)&&D.length>0){let t=D.slice(0,-1);b.state.setIndices({activeIndex:null,selectedIndex:null,type:b.state.keyboardActiveRef.current?"keyboard":"pointer"}),b.state.setSelectedValue(t,(0,Z.d)(Q.dv,e.nativeEvent));return}let l=function(e){let t;if(!g)return;let{highlightedChipIndex:n}=g;
1if(void 0!==n){if("ArrowLeft"===e.key)e.preventDefault(),t=n>0?n-1:void 0;else if("ArrowRight"===e.key)e.preventDefault(),t=n<D.length-1?n+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){e.preventDefault();let r=n>=D.length-1?D.length-2:n;t=r>=0?r:void 0,b.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"})}return t}return"ArrowLeft"===e.key&&(e.currentTarget.selectionStart??0)===0&&D.length>0?(e.preventDefault(),t=Math.max(D.length-1,0)):"Backspace"===e.key&&""===e.currentTarget.value&&D.length>0&&(b.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),e.preventDefault()),t}(e);if(g?.setHighlightedChipIndex(l),void 0!==l?g?.chipsRef.current[l]?.focus():b.state.inputRef.current?.focus(),229!==e.which&&"Enter"===e.key&&V){let t=b.state.activeIndex,n=e.nativeEvent;if(null===t)return void b.state.setOpen(!1,(0,Z.d)(Q.dv,n));(0,$.jo)(e);let r=b.state.listRef.current[t];r&&(b.state.selectionEventRef.current=n,r.click(),b.state.selectionEventRef.current=null)}},onPointerMove(){b.state.keyboardActiveRef.current=!1},onPointerDown(){b.state.keyboardActiveRef.current=!1}},h?h.getValidationProps(o):o],stateAttributesMapping:H})});var en=n(80144),er=n(13308),el=n(32386);let ei={...er.G,...z.qV},eo=u.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,nativeButton:i=!0,keepMounted:o=!1,...a}=e,{disabled:c}=(0,W.V)(),d=v(),p=(0,s.P)(d,q.selectionMode),f=(0,s.P)(d,q.disabled),h=(0,s.P)(d,q.readOnly),m=(0,s.P)(d,q.open),g=(0,s.P)(d,q.selectedValue),x=(0,s.P)(d,q.hasSelectionChips),y=_(),b=!1;b="none"===p?""!==y:"single"===p?null!=g:x;let I=c||f||l,{buttonRef:k,getButtonProps:P}=(0,N.s)({native:i,disabled:I}),{mounted:j,transitionStatus:C,setMounted:M}=(0,en.$)(b),S=u.useMemo(()=>({disabled:I,open:m,transitionStatus:C}),[I,m,C]);(0,el.v)({open:b,ref:d.state.clearRef,onComplete(){b||M(!1)}});let w=(0,R.o)("button",e,{state:S,ref:[t,k,d.state.clearRef],props:[{tabIndex:-1,children:"x","aria-readonly":h||void 0,onMouseDown(e){e.preventDefault()},onClick(e){if(I||h)return;let t=d.state.keyboardActiveRef;d.state.setInputValue("",(0,Z.d)(Q.R0,e.nativeEvent)),"none"!==p?(d.state.setSelectedValue(Array.isArray(g)?[]:null,(0,Z.d)(Q.R0,e.nativeEvent)),d.state.setIndices({activeIndex:null,selectedIndex:null,type:t.current?"keyboard":"pointer"})):d.state.setIndices({activeIndex:null,type:t.current?"keyboard":"pointer"}),d.state.inputRef.current?.focus()}},a,P],stateAttributesMapping:ei});return o||j?w:null});var eu=n(26868);function ea(e){let{children:t,elementsRef:n,labelsRef:l,onMapChange:i}=e,o=(0,T.K)(i),a=u.useRef(0),s=(0,eu.j)(ec).current,d=(0,eu.j)(es).current,[p,f]=u.useState(0),h=u.useRef(p),m=(0,T.K)((e,t)=>{d.set(e,t??null),h.current+=1,f(h.current)}),v=(0,T.K)(e=>{d.delete(e),h.current+=1,f(h.current)}),g=u.useMemo(()=>{let e=new Map;return Array.from(d.keys()).filter(e=>
1e.isConnected).sort(ed).forEach((t,n)=>{let r=d.get(t)??{};e.set(t,{...r,index:n})}),e},[d,p]);(0,c.g)(()=>{if("function"!=typeof MutationObserver||0===g.size)return;let e=new MutationObserver(e=>{let t=new Set,n=e=>t.has(e)?t.delete(e):t.add(e);e.forEach(e=>{e.removedNodes.forEach(n),e.addedNodes.forEach(n)}),0===t.size&&(h.current+=1,f(h.current))});return g.forEach((t,n)=>{n.parentElement&&e.observe(n.parentElement,{childList:!0})}),()=>{e.disconnect()}},[g]),(0,c.g)(()=>{h.current===p&&(n.current.length!==g.size&&(n.current.length=g.size),l&&l.current.length!==g.size&&(l.current.length=g.size),a.current=g.size),o(g)},[o,g,n,l,p]),(0,c.g)(()=>()=>{n.current=[]},[n]),(0,c.g)(()=>()=>{l&&(l.current=[])},[l]);let x=(0,T.K)(e=>(s.add(e),()=>{s.delete(e)}));(0,c.g)(()=>{s.forEach(e=>e(g))},[s,g]);let _=u.useMemo(()=>({register:m,unregister:v,subscribeMapChange:x,elementsRef:n,labelsRef:l,nextIndexRef:a}),[m,v,x,n,l,a]);return(0,r.jsx)(y.Provider,{value:_,children:t})}function es(){return new Map}function ec(){return new Set}function ed(e,t){let n=e.compareDocumentPosition(t);return n&Node.DOCUMENT_POSITION_FOLLOWING||n&Node.DOCUMENT_POSITION_CONTAINED_BY?-1:n&Node.DOCUMENT_POSITION_PRECEDING||n&Node.DOCUMENT_POSITION_CONTAINS?1:0}var ep=n(60527);let ef=u.forwardRef(function(e,t){let{render:n,className:l,...i}=e,o=v(),a=(0,s.P)(o,q.open),c=(0,s.P)(o,q.hasSelectionChips),[d,p]=u.useState(void 0);a&&void 0!==d&&p(void 0);let f=u.useRef([]),h=(0,R.o)("div",e,{ref:[t,o.state.chipsContainerRef],props:[c?{role:"toolbar"}:ep.t0,i]}),m=u.useMemo(()=>({highlightedChipIndex:d,setHighlightedChipIndex:p,chipsRef:f}),[d,p,f]);return(0,r.jsx)(G.Provider,{value:m,children:(0,r.jsx)(ea,{elementsRef:f,children:h})})});function eh(e){let{children:t,placeholder:n}=e,l=v(),i=(0,s.P)(l,q.itemToStringLabel),o=(0,s.P)(l,q.selectedValue),a=(0,s.P)(l,q.items),c="multiple"===(0,s.P)(l,q.selectionMode),d=(0,s.P)(l,q.hasSelectedValue),p=(0,s.P)(l,q.hasNullItemLabel,!d&&null!=n&&null==t),f=null;if("function"==typeof t)f=t(o);else if(null!=t)f=t;else if(d||null==n||p)if(c&&Array.isArray(o))f=o.reduce((e,t,n)=>(n>0&&e.push(", "),e.push((0,r.jsx)(u.Fragment,{children:V(t,a,i)},n)),e),[]);else f=V(o,a,i);else f=n;return(0,r.jsx)(u.Fragment,{children:f})}var em=n(45052),ev=n(75813),eg=n(86312),ex=n(33858),e_=n(88796);function ey(e={}){let{id:t,implicit:n=!1,controlRef:r}=e,{controlId:l,setControlId:i}=(0,J.H)(),o=(0,F.e)(t);return(0,c.g)(()=>{if((n||t)&&i!==ep.tE){if(n){let e=r?.current;(0,e_.vq)(e)&&null!=e.closest("label")?i(t??null):i(l??o)}else t&&i(t);return()=>{t&&i(void 0)}}},[t,r,l,i,n,o]),l??o}let eb=u.forwardRef(function(e,t){let{render:n,className:r,nativeButton:l=!0,disabled:i=!1,id:o,...a}=e,{state:d,disabled:p,setTouched:f,setFocused:h,validationMode:m,validation:y}=(0,W.V)(),{labelId:b}=(0,J.H)(),I=v(),{filteredItems:k}=x(),P=(0,s.P)(I,q.selectionMode),j=(0,s.P)(I,q.disabled),C=(0,s.P)(I,q.readOnly),M=(0,s.P)(I,q.required),S=(0,s.P)(I,q.mounted),w=(0,s.P)(I,q.popupSide),E=(0,s.P)(I,q.positionerElement),A=(0,s.P)(I,q.listElement),O=(0,s.P)(I,q.triggerProps),V=(0,s.P)(I,q.triggerElement),D=(0,s.P)(I,q.inputInsidePopup),B=(0,s.P)(I,q.id),K=(0,s.P)(I,q.open),F=(0,s.P)(I,q.selectedValue),z=(0,s.P)(I,q.activeIndex),L=(0,s.P)(I,q.selectedIndex),G=(0,s.P)(I,q.hasSelectedValue),U=g(),Y=_(),X=(0,em.Z)(),ee=p||j||i,et=0===k.length,en=S&&E?w:null;ey({id:D?o:void 0});let er=D?o??B:o,el=u.useRef("");function ei(e){el.current=e.pointerType}let eo=U.select("domReferenceElement");u.useEffect(()=>{D&&V&&V!==eo&&U.set("domReferenceElement",V)},[V,eo,U,D]);let{reference:eu}=function(e,t){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),l=n.context.dataRef,{listRef:i,activeIndex:o,onMatch:a,onTypingChange:s,enabled:d=!0,findMatch:p=null,resetMs:f=750,ignoreKeys:h=ep.Ml,selectedIndex:m=null}=t,v=(0,em.Z)(),g=u.useRef(""),x=u.useRef(m??o??-1),_=u.useRef(null);(0,c.g)(()=>{r&&(v.clear(),_.current=null,g.current="")},[r,v]),(0,c.g)(()=>{r&&""===g.current&&(x.current=m??o??-1)},[r,m,o]);let y=(0,T.K)(e=>{e?l.current.typing||(l.current.typing=e,s?.(e)):l.current.typing&&(l.current.typing=e,s?.(e))}),b=(0,T.K)(e=>{function t(e,t,n){let r=p?p(t,n):t.find(e=>e?.toLocaleLowerCase().indexOf(n.toLocaleLowerCase())===0);return r?e.indexOf(r):-1}let n=i.current;if(g.current.length>0&&" "!==g.current[0]&&(-1===t(n,n,g.current)?y(!1):" "===e.key&&(0,$.jo)(e)),null==n||h.includes(e.ke
1y)||1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey)return;r&&" "!==e.key&&((0,$.jo)(e),y(!0)),n.every(e=>!e||e[0]?.toLocaleLowerCase()!==e[1]?.toLocaleLowerCase())&&g.current===e.key&&(g.current="",x.current=_.current),g.current+=e.key,v.start(f,()=>{g.current="",x.current=_.current,y(!1)});let l=x.current,o=t(n,[...n.slice((l||0)+1),...n.slice(0,(l||0)+1)],g.current);-1!==o?(a?.(o),_.current=o):" "!==e.key&&(g.current="",y(!1))}),I=u.useMemo(()=>({onKeyDown:b}),[b]),R=u.useMemo(()=>({onKeyDown:b,onKeyUp(e){" "===e.key&&y(!1)}}),[b,y]);return u.useMemo(()=>d?{reference:I,floating:R}:{},[d,I,R])}(U,{enabled:!K&&!C&&!j&&"single"===P,listRef:I.state.labelsRef,activeIndex:z,selectedIndex:L,onMatch(e){let t=I.state.valuesRef.current[e];void 0!==t&&I.state.setSelectedValue(t,(0,Z.d)("none"))}}),{reference:ea}=(0,ex.k)(U,{enabled:!C&&!j,event:"mousedown"}),{buttonRef:es,getButtonProps:ec}=(0,N.s)({native:l,disabled:ee}),ed=u.useMemo(()=>({...d,open:K,disabled:ee,popupSide:en,listEmpty:et,placeholder:!G}),[d,K,ee,en,et,G]),ef=(0,T.K)(e=>{I.set("triggerElement",e)});return(0,R.o)("button",e,{ref:[t,es,ef],state:ed,props:[O,ea,eu,{id:er,tabIndex:D?0:-1,role:D?"combobox":void 0,"aria-expanded":K?"true":"false","aria-haspopup":D?"dialog":"listbox","aria-controls":K?A?.id:void 0,"aria-readonly":C||void 0,"aria-required":D&&M||void 0,"aria-labelledby":b,onPointerDown:ei,onPointerEnter:ei,onFocus(){h(!0),ee||C||X.start(0,I.state.forceMount)},onBlur(e){(0,eg.gR)(E,e.relatedTarget)||(f(!0),h(!1),"onBlur"===m&&y.commit("none"===P?Y:F))},onMouseDown(e){if(ee||C||(D||U.set("domReferenceElement",e.currentTarget),I.state.forceMount(),"touch"!==el.current&&(I.state.inputRef.current?.focus(),D||e.preventDefault()),K))return;let t=(0,ev.R)(e.currentTarget);D&&t.addEventListener("mouseup",function(e){if(!V)return;let t=(0,eg.EW)(e),n=I.state.positionerElement,r=I.state.listElement;if((0,eg.gR)(V,t)||(0,eg.gR)(n,t)||(0,eg.gR)(r,t)||t===V)return;let l=function(e){let t=e.getBoundingClientRect(),n=window.getComputedStyle(e,"::before"),r=window.getComputedStyle(e,"::after");if("none"===n.content&&"none"===r.content)return t;let l=parseFloat(n.width)||0,i=parseFloat(n.height)||0,o=parseFloat(r.width)||0,u=parseFloat(r.height)||0,a=Math.max(t.width,l,o),s=Math.max(t.height,i,u),c=a-t.width,d=s-t.height;return{left:t.left-c/2,right:t.right+c/2,top:t.top-d/2,bottom:t.bottom+d/2}}(V),i=e.clientX>=l.left-2&&e.clientX<=l.right+2,o=e.clientY>=l.top-2&&e.clientY<=l.bottom+2;i&&o||I.state.setOpen(!1,(0,Z.d)("cancel-open",e))},{once:!0})},onKeyDown(e){ee||C||("ArrowDown"===e.key||"ArrowUp"===e.key)&&((0,$.jo)(e),I.state.setOpen(!0,(0,Z.d)(Q.Dq,e.nativeEvent)),I.state.inputRef.current?.focus())}},y?y.getValidationProps(a):a,ec],stateAttributesMapping:H})}),eI=u.forwardRef(function(e,t){let{render:n,className:r,children:l,...i}=e,{filteredItems:o}=x(),u=v(),a=0===o.length?l:null;return(0,R.o)("div",e,{ref:[t,u.state.emptyRef],props:[{children:a,role:"status","aria-live":"polite","aria-atomic":!0},i]})}),eR=u.createContext(null);function ek(e){let{children:t,items:n}=e,l=u.useMemo(()=>({items:n}),[n]);return(0,r.jsx)(eR.Provider,{value:l,children:t})}function eP(e){let{children:t}=e,{filteredItems:n}=x(),l=u.useContext(eR),i=l?l.items:n;return i?(0,r.jsx)(u.Fragment,{children:i.map(t)}):null}let ej=u.forwardRef(function(e,t){var n;let{render:l,className:i,children:o,...a}=e,c=v(),d=g(),p=!!X(!0),{filteredItems:f}=x(),h=(0,s.P)(c,q.items),m=(0,s.P)(c,q.labelsRef),_=(0,s.P)(c,q.listRef),y=(0,s.P)(c,q.selectionMode),b=(0,s.P)(c,q.grid),I=(0,s.P)(c,q.popupProps),k=(0,s.P)(c,q.disabled),P=(0,s.P)(c,q.readOnly),j=(0,s.P)(c,q.virtualized),C=0===f.length,M=(0,T.K)(e=>{c.set("positionerElement",e)}),S=(0,T.K)(e=>{c.set("listElement",e)}),w=u.useMemo(()=>"function"==typeof o?n||(n=(0,r.jsx)(eP,{children:o})):o,[o]),E=u.useMemo(()=>({empty:C}),[C]),A=d.useState("floatingId"),O=(0,R.o)("div",e,{state:E,ref:[t,S,p?null:M],props:[I,{children:w,tabIndex:-1,id:A,role:b?"grid":"listbox","aria-multiselectable":"multiple"===y?"true":void 0,onKeyDown(e){if(!k&&!P&&"Enter"===e.key){let t=c.state.activeIndex;if(null==t)return;(0,$.jo)(e);let n=e.nativeEvent,r=c.state.listRef.current[t];r&&(c.state.selectionEventRef.current=n,r.click(),c.state.selectionEventRef.current=null)}},onKeyDownCapture(){c.state.keyboardActiveRef.current=!0},onPointerMoveCapture(){c.state.keyboardActiveRef.current=!1}},a]});return j?O:(0,r.jsx)(ea,{elementsRef:_,labelsRef:h?void 0:m,children:O})}),eC=u.createContext(void 0),eM=u.forwardRef(function(e,t){let{render:n,className:l,items:i,...o}=e,[a,s]=u.useState(),c=u.useMemo(()=>({labelId:a,setLabelId:s,items:i}),[a,s,i]),d=(0,R.o)("div",e,{ref:t,props:[{role:"group","aria-labelledby":a},o]}),p=(0,r.jsx)(eC.Provider,{value:c,children:d});return i?(0,r.jsx)(ek,{items:i,children:p}):p}),eS=u.forwardRef(function(e,t){let{render:n,className:r,id:l,...i}=e,{setLabelId:o}=function(){let e=u.useContext(eC);if(void 0===e)throw Error((0,d.A)(18));return e}(),a=(0,F.e)(l);return(0,c.g)(()=>(o(a),()=>{o(void 0)}),[a,o]),(0,R.o)("div",e,{ref:t,props:[{id:a},i]})});var ew=n(91271);let eE=u.createContext(void 0),eA=u.forwardRef(function(e,t){let{keepMounted:n=!1,...l}=e,i=v(),o=(0,s.P)(i,q.mounted),u=(0,s.P)(i,q.forceMounted);return o||n||u?(0,r.jsx)(eE.Provider,{value:n,children:(0,r.jsx)(ew.XF,{ref:t,...l})}):null});var eO=n(69007),eV=n(37315),eq=n(35324),eN=n(59815),eD=n(58317);let eB=u.forwardRef(function(e,t){let{render:n,className:l,anchor:i,positionMethod:o="absolute",side:a="bottom",align:p="center",sideOffset:f=0,alignOffset:h=0,collisionBoundary:m="clipping-ancestors",collisionPadding:_=5,arrowPadding:y=5,sticky:b=!1,disableAnchorTracking:I=!1,collisionAvoidance:k=eN.uD,...P}=e,j=v(),{filteredItems:C}=x(),M=g(),S=function(){let e=u.useContext(eE);if(void 0===e)throw Error((0,d.A)(20));return e}(),w=(0,s.P)(j,q.modal),E=(0,s.P)(j,q.open),A=(0,s.P)(j,q.mounted),O=(0,s.P)(j,q.openMethod),V=(0,s.P)(j,q.triggerElement),N=(0,s.P)(j,q.inputElement),D=(0,s.P)(j,q.inputInsidePopup),B=0===C.length,K=i??(D?V:N),F=(0,eq.s)({anchor:K,floatingRootContext:M,positionMethod:o,mounted:A,side:a,sideOffset:f,align:p,alignOffset:h,arrowPadding:y,collisionBoundary:m,collisionPadding:_,sticky:b,disableAnchorTracking:I,keepMounted:S,collisionAvoidance:k,lazyFlip:!0});(0,eV.K)(E&&w&&"touch"!==O,V);let L=u.useMemo(()=>{let e={...F.positionerStyles};return E||(e.pointerEvents="none"),{role:"presentation",hidden:!A,style:e}},[E,A,F.positionerStyles]),H=u.useMemo(()=>({open:E,side:F.side,align:F.align,anchorHidden:F.anchorHidden,empty:B}),[E,F.side,F.align,F.anchorHidden,B]);(0,c.g)(()=>{j.set("popupSide",F.side)},[j,F.side]);let W=u.useMemo(()=>({side:F.side,align:F.align,arrowRef:F.arrowRef,arrowUncentered:F.arrowUncentered,arrowStyles:F.arrowStyles,anchorHidden:F.anchorHidden,isPositioned:F.isPositioned}),[F.side,F.align,F.arrowRef,F.arrowUncentered,F.arrowStyles,F.anchorHidden,F.isPositioned]),J=(0,T.K)(e=>{j.set("positionerElement",e)}),G=(0,R.o)("div",e,{state:H,ref:[t,J],props:[L,P],stateAttributesMapping:z.GW});return(0,r.jsxs)(Y.Provider,{value:W,children:[A&&w&&(0,r.jsx)(eD.W,{inert:(0,eO.Y)(!E),cutout:N??V}),G]})});var eT=n(32808),eK=n(56610);let eF={...z.GW,...er.G},ez=u.forwardRef(function(e,t){let n,{render:l,className:i,initialFocus:o,finalFocus:a,...c}=e,d=v(),p=X(),f=g(),{filteredItems:h}=x(),m=(0,s.P)(d,q.mounted),_=(0,s.P)(d,q.open),y=(0,s.P)(d,q.openMethod),b=(0,s.P)(d,q.transitionStatus),I=(0,s.P)(d,q.inputInsidePopup),k=(0,s.P)(d,q.inputElement),P=(0,s.P)(d,q.modal),j=0===h.length;(0,el.v)({open:_,ref:d.state.popupRef,onComplete(){_&&d.state.onOpenChangeComplete(!0)}});let C=u.useMemo(()=>({open:_,side:p.side,align:p.align,anchorHidden:p.anchorHidden,transitionStatus:b,empty:j}
1),[_,p.side,p.align,p.anchorHidden,b,j]),M=(0,R.o)("div",e,{state:C,ref:[t,d.state.popupRef],props:[{role:I?"dialog":"presentation",tabIndex:-1,onFocus(e){let t=(0,eg.EW)(e.nativeEvent);"touch"!==y&&((0,eg.gR)(d.state.listElement,t)||t===e.currentTarget)&&d.state.inputRef.current?.focus()}},(0,eK.d)(b),c],stateAttributesMapping:eF}),S=!!I&&(e=>"touch"===e?d.state.popupRef.current:k);return n=null!=a?a:!!I&&void 0,(0,r.jsx)(eT.s,{context:f,disabled:!m,modal:!!I&&P,openInteractionType:y,initialFocus:void 0===o?S:o,returnFocus:n,children:M})});var eL=n(23351),eH=n(96487),eW=n(29785),eJ=n(63289),eG=n(55851),eU=n(8119),e$=n(7910),eY=n(16926),eX=n(99841);function eZ(e,t,n){return Math.floor(e/t)!==n}function eQ(e,t){return t<0||t>=e.current.length}function e0(e,t){return e2(e,{disabledIndices:t})}function e1(e,t){return e2(e,{decrement:!0,startingIndex:e.current.length,disabledIndices:t})}function e2(e,{startingIndex:t=-1,decrement:n=!1,disabledIndices:r,amount:l=1}={}){let i=t;do i+=n?-l:l;while(i>=0&&i<=e.current.length-1&&e3(e,i,r));return i}function e3(e,t,n){if("function"==typeof n)return n(t);if(n)return n.includes(t);let r=e.current[t];return!!r&&(r.hasAttribute("disabled")||"true"===r.getAttribute("aria-disabled"))}var e5=n(7973),e4=n(37466);function e9(e,t,n){switch(e){case"vertical":return t;case"horizontal":return n;default:return t||n}}function e8(e,t){return e9(t,e===eX.il||e===eX.Jd,e===eX.eR||e===eX.RJ)}function e6(e,t,n){return e9(t,e===eX.Jd,n?e===eX.eR:e===eX.RJ)||"Enter"===e||" "===e||""===e}var e7=n(9987),te=n(59121),tt=n(67476);let tn=new Map,tr=function(e={}){let t={usage:"search",sensitivity:"base",ignorePunctuation:!0,...e},n=`${function e(t){return Array.isArray(t)?t.map(t=>e(t)).join(","):null==t?"":String(t)}(e.locale)}|${JSON.stringify(t)}`,r=tn.get(n);if(r)return r;let l=new Intl.Collator(e.locale,t),i={contains(e,t,n){if(!t)return!0;let r=A(e,n);for(let e=0;e<=r.length-t.length;e+=1)if(0===l.compare(r.slice(e,e+t.length),t))return!0;return!1},startsWith(e,t,n){if(!t)return!0;let r=A(e,n);return 0===l.compare(r.slice(0,t.length),t)},endsWith(e,t,n){if(!t)return!0;let r=A(e,n),i=t.length;return r.length>=i&&0===l.compare(r.slice(r.length-i),t)}};return tn.set(n,i),i};var tl=n(74588),ti=n(53814);let to=Symbol("none"),tu={value:to,index:-1};function ta(e){let t,n,l,{id:i,onOpenChangeComplete:o,defaultSelectedValue:a=null,selectedValue:d,onSelectedValueChange:v,defaultInputValue:g,inputValue:x,selectionMode:_="none",onItemHighlighted:y,name:b,disabled:I=!1,readOnly:R=!1,required:k=!1,inputRef:P,grid:w=!1,items:V,filteredItems:N,filter:D,openOnInputClick:B=!0,autoHighlight:K=!1,keepHighlight:F=!1,highlightItemOnHover:z=!0,loopFocus:L=!0,itemToStringLabel:H,itemToStringValue:J,isItemEqualToValue:G=j,virtualized:U=!1,inline:Y=!1,fillInputOnItemPress:X=!0,modal:ee=!1,limit:et=-1,autoComplete:er="list",locale:ei,submitOnItemClick:eo=!1}=e,{clearErrors:ea}=(0,tt.x)(),{setDirty:es,validityData:ec,shouldValidateOnChange:ed,setFilled:ef,name:eh,disabled:em,setTouched:ev,setFocused:eb,validationMode:eI,validation:eR}=(0,W.V)(),ek=ey({id:i}),eP=tr({locale:ei}),[ej,eC]=u.useState(!1),[eM,eS]=u.useState(null),ew=u.useRef([]),eE=u.useRef([]),eA=u.useRef(null),eO=u.useRef(null),eV=u.useRef(null),eq=u.useRef(!0),eN=u.useRef(!1),eD=u.useRef(null),eB=u.useRef(null),eT=u.useRef(null),eK=u.useRef(tu),eF=u.useRef(null),ez=u.useRef([]),tn=u.useRef([]),ta=em||I,ts=eh??b,tc="multiple"===_,td="single"===_,tp=void 0!==x||void 0!==g,tf=void 0!==V,th=void 0!==N;t="always"===K?"always":!!K&&"input-change";let[tm,tv]=(0,eL.q)({controlled:d,default:tc?a??ep.Ml:a,name:"Combobox",state:"selectedValue"}),tg=u.useMemo(()=>null===D?()=>!0:void 0!==D?D:td&&!ej?(e,t)=>{if(null==e)return!1;if(!t)return!0;let n=A(e,H),r=null!=tm?A(tm,H):"";return!!(r&&eP.contains(r,t))&&r.length===t.length||eP.contains(n,t)}:(e,t)=>{if(null==e)return!1;let n=A(e,H);return eP.contains(n,t)},[D,td,tm,ej,eP,H]),tx=(0,eu.j)(()=>tp?g??"":td?A(tm,H):"").current,[t_,ty]=(0,eL.q)({controlled:x,default:tx,name:"Combobox",state:"inputValue"}),[tb,tI]=(0,eL.q)({controlled:e.open,default:e.defaultOpen,name:"Combobox",state:"open"}
1),tR=E(V),tk=eM??(""===t_?"":String(t_).trim()),tP=td?A(tm,H):"",tj=td&&!ej&&""!==tk&&""!==tP&&tP.length===tk.length&&eP.contains(tP,tk),tC=tj?"":tk,tM=tf&&th&&tj,tS=u.useMemo(()=>V?tR?V.flatMap(e=>e.items):V:ep.Ml,[V,tR]),tw=u.useMemo(()=>{if(N&&!tM)return N;if(!V)return ep.Ml;if(tR){let e=[],t=0;for(let n of V){if(et>-1&&t>=et)break;let r=""===tC?n.items:n.items.filter(e=>tg(e,tC,H));if(0===r.length)continue;let l=et>-1?et-t:1/0,i=r.slice(0,l);if(i.length>0){let r={...n,items:i};e.push(r),t+=i.length}}return e}if(""===tC)return et>-1?tS.slice(0,et):tS;let e=[];for(let t of tS){if(et>-1&&e.length>=et)break;tg(t,tC,H)&&e.push(t)}return e},[N,tM,V,tR,tC,et,tg,H,tS]),tE=u.useMemo(()=>tR?tw.flatMap(e=>e.items):tw,[tw,tR]),tA=(0,eu.j)(()=>new eJ.i({id:ek,selectedValue:tm,open:tb,filter:tg,query:tk,items:V,selectionMode:_,listRef:ew,labelsRef:eE,popupRef:eA,emptyRef:eV,inputRef:eO,keyboardActiveRef:eq,chipsContainerRef:eD,clearRef:eB,valuesRef:ez,allValuesRef:tn,selectionEventRef:eT,name:ts,disabled:ta,readOnly:R,required:k,grid:w,isGrouped:tR,virtualized:U,openOnInputClick:B,itemToStringLabel:H,isItemEqualToValue:G,modal:ee,autoHighlight:t,submitOnItemClick:eo,hasInputValue:tp,mounted:!1,forceMounted:!1,transitionStatus:"idle",inline:Y,activeIndex:null,selectedIndex:null,popupProps:{},inputProps:{},triggerProps:{},positionerElement:null,listElement:null,triggerElement:null,inputElement:null,popupSide:null,openMethod:null,inputInsidePopup:!0,onOpenChangeComplete:o||ep.tE,setOpen:ep.tE,setInputValue:ep.tE,setSelectedValue:ep.tE,setIndices:ep.tE,onItemHighlighted:ep.tE,handleSelection:ep.tE,getItemProps:()=>ep.t0,forceMount:ep.tE,requestSubmit:ep.tE})).current,tO="none"===_?t_:tm,tV=u.useMemo(()=>"none"===_?tO:Array.isArray(tm)?tm.map(e=>O(e,J)):O(tm,J),[tO,J,_,tm]),tq=(0,T.K)(y),tN=(0,T.K)(o),tD=(0,s.P)(tA,q.activeIndex),tB=(0,s.P)(tA,q.selectedIndex),tT=(0,s.P)(tA,q.positionerElement),tK=(0,s.P)(tA,q.listElement),tF=(0,s.P)(tA,q.triggerElement),tz=(0,s.P)(tA,q.inputElement),tL=(0,s.P)(tA,q.inline),tH=(0,s.P)(tA,q.inputInsidePopup),tW=(0,eG.u)(tF),{mounted:tJ,setMounted:tG,transitionStatus:tU}=(0,en.$)(tb),{openMethod:t$,triggerProps:tY,reset:tX}=(0,tl.G)(tb);(0,te.M)({id:ek,name:ts,commit:eR.commit,value:tO,controlRef:tH?tW:eO,getValue:()=>tV});let tZ=(0,T.K)(()=>{V?eE.current=tE.map(e=>A(e,H)):tA.set("forceMounted",!0)}),tQ=u.useRef(tm);(0,c.g)(()=>{tm!==tQ.current&&tZ()},[tZ,tm]);let t0=(0,T.K)(e=>{tA.update(e);let t=e.type||"none";if(void 0!==e.activeIndex)if(null===e.activeIndex)eK.current!==tu&&(eK.current=tu,tq(void 0,(0,Z.M)(t,void 0,{index:-1})));else{let n=ez.current[e.activeIndex];eK.current={value:n,index:e.activeIndex},tq(n,(0,Z.M)(t,void 0,{index:e.activeIndex}))}}),t1=(0,T.K)((n,r)=>{if(eN.current=r.reason===Q.qs,e.onInputValueChange?.(n,r),!r.isCanceled){if(r.reason===Q.pf){let e=""!==n.trim();e&&eC(!0),eF.current={hasQuery:e},e&&t&&null==tA.state.activeIndex&&tA.set("activeIndex",0)}ty(n)}}),t2=(0,T.K)((t,n)=>{if(tb!==t&&("escape-key"===n.reason&&tf&&0===tE.length&&!tA.state.emptyRef.current&&n.allowPropagation(),e.onOpenChange?.(t,n),!n.isCanceled&&(!t&&ej&&(td?(eS(tk),""===tk&&eC(!1)):tc&&(tL||tH?t0({activeIndex:null}):eS(tk),t1("",(0,Z.d)(Q.qs,n.event)))),tI(t),!t&&tH&&(n.reason===Q.Xn||n.reason===Q.Np))&&(ev(!0),eb(!1),"onBlur"===eI))){let e="none"===_?t_:tm;eR.commit(e)}}),t3=(0,T.K)((e,t)=>{v?.(e,t),!t.isCanceled&&(tv(e),("none"===_&&eA.current&&X||td&&!tA.state.inputInsidePopup)&&t1(A(e,H),(0,Z.d)(t.reason,t.event)),td&&null!=e&&t.reason!==Q.pf&&ej&&eS(tk))}),t5=(0,T.K)((e,t)=>{let n=t;if(void 0===n){if(null===tD)return;n=ez.current[tD]}let r=(0,eg.EW)(e),l=eT.current??e;eT.current=null;let i=(0,Z.d)(Q.Bo,l),o=r?.closest("a")?.getAttribute("href");if(o){o.startsWith("#")&&t2(!1,i);return}if(tc){var u,a;let e=Array.isArray(tm)?tm:[];if(t3(M(e,n,tA.state.isItemEqualToValue)?(u=n,a=tA.state.isItemEqualToValue,e.filter(e=>!C(e,u,a))):[...e,n],i),!(eO.current&&""!==eO.current.value.trim()))return;tA.state.inputInsidePopup?t1("",(0,Z.d)(Q.qs,i.event)):t2(!1,i)}else t3(n,i),t2(!1,i)}),t4=(0,T.K)(()=>{if(!tA.state.submitOnItemClick)return;let e=tA.state.inputElement?.form;e&&"function"==typeof e.requestSubmit&&e.requestSubmit()}),t9=(0,T.K)(()=>
1{if(tG(!1),tN?.(!1),eC(!1),tX(),eS(null),"none"===_?t0({activeIndex:null,selectedIndex:null}):t0({activeIndex:null}),tc&&eO.current&&""!==eO.current.value&&!eN.current&&t1("",(0,Z.d)(Q.qs)),td)if(tA.state.inputInsidePopup)eO.current&&""!==eO.current.value&&t1("",(0,Z.d)(Q.qs));else{let e=A(tm,H);if(eO.current&&eO.current.value!==e){let t=""===e?Q.qs:Q.dv;t1(e,(0,Z.d)(t))}}}),t8=u.useMemo(()=>tL&&tT?{current:tT.closest('[role="dialog"]')}:eA,[tL,tT]);(0,el.v)({enabled:!e.actionsRef,open:tb,ref:t8,onComplete(){tb||t9()}}),u.useImperativeHandle(e.actionsRef,()=>({unmount:t9}),[t9]),(0,c.g)(function(){if(tb||"none"===_)return;let e=V?tS:tn.current;if(tc){let t=Array.isArray(tm)?tm:[],n=S(e,t[t.length-1],G);t0({selectedIndex:-1===n?null:n})}else{let t=S(e,tm,G);t0({selectedIndex:-1===t?null:t})}},[tb,tm,V,_,tS,tc,G,t0]),(0,c.g)(()=>{V&&(ez.current=tE,ew.current.length=tE.length)},[V,tE]),(0,c.g)(()=>{let e=eF.current;if(e&&(e.hasQuery?t&&tA.set("activeIndex",0):"always"===t&&tA.set("activeIndex",0),eF.current=null),!tb&&!tL)return;let n=tf||th?tE:ez.current,r=tA.state.activeIndex;if(null==r)return"always"===t&&n.length>0?void tA.set("activeIndex",0):void(eK.current!==tu&&(eK.current=tu,tA.state.onItemHighlighted(void 0,(0,Z.M)(Q.dv,void 0,{index:-1}))));if(r>=n.length){eK.current!==tu&&(eK.current=tu,tA.state.onItemHighlighted(void 0,(0,Z.M)(Q.dv,void 0,{index:-1}))),tA.set("activeIndex",null);return}let l=n[r],i=eK.current.value,o=i!==to&&tA.state.isItemEqualToValue(l,i);eK.current.index===r&&o||(eK.current={value:l,index:r},tA.state.onItemHighlighted(l,(0,Z.M)(Q.dv,void 0,{index:r})))},[tD,t,th,tf,tE,tL,tb,tA]),(0,c.g)(()=>{if(!V||"none"===_)return;if(tc){let e=Array.isArray(tm)?tm:ep.Ml,t=e.filter(e=>M(tS,e,tA.state.isItemEqualToValue));t.length!==e.length&&t3(t,(0,Z.d)(Q.dv));return}if(null==tm||M(tS,tm,tA.state.isItemEqualToValue))return;let e=null;null!=a&&M(tS,a,tA.state.isItemEqualToValue)&&(e=a),t3(e,(0,Z.d)(Q.dv))},[V,tS,tc,_,tm,a,tA,t3]),(0,c.g)(()=>{if("none"===_)return void ef(""!==String(t_));ef(tc?Array.isArray(tm)&&tm.length>0:null!=tm)},[ef,_,t_,tm,tc]),u.useEffect(()=>{tf&&t&&0===tE.length&&t0({activeIndex:null})},[tf,t,tE.length,t0]),(0,ti.x)(tk,()=>{tb&&""!==tk&&tk!==String(tx)&&eC(!0)}),(0,ti.x)(tm,()=>{if("none"!==_&&(ea(ts),es(tm!==ec.initialValue),ed()?eR.commit(tm):eR.commit(tm,!0),tc&&null!==tA.state.selectedIndex&&(!Array.isArray(tm)||0===tm.length)&&t0({activeIndex:null,selectedIndex:null}),td&&!tp&&!tH)){let e=A(tm,H);t_!==e&&t1(e,(0,Z.d)(Q.dv))}}),(0,ti.x)(t_,()=>{"none"===_&&(ea(ts),es(t_!==ec.initialValue),ed()?eR.commit(t_):eR.commit(t_,!0))}),(0,ti.x)(V,()=>{if(!td||tp||tH||ej)return;let e=A(tm,H);t_!==e&&t1(e,(0,Z.d)(Q.dv))});let t6=(0,eU.P)({open:!!tL||tb,onOpenChange:t2,elements:{reference:tH?tF:tz,floating:tT}});tL||(n=w?"grid":"listbox",l=tb?"true":"false");let t7=u.useMemo(()=>{let e=tz?.tagName==="INPUT",t=e||tb,r=e?{autoComplete:"off",spellCheck:"false",autoCorrect:"off",autoCapitalize:"none"}:{};return t&&(r.role="combobox",r["aria-expanded"]=l,r["aria-haspopup"]=n,r["aria-controls"]=tb?tK?.id:void 0,r["aria-autocomplete"]=er),{reference:r,floating:{role:"presentation"}}},[tz,tb,l,n,tK?.id,er]),ne=(0,ex.k)(t6,{enabled:!R&&!ta&&B,event:"mousedown-only",toggle:!1,touchOpenDelay:50*!tH}),nt=(0,e$.s)(t6,{enabled:!R&&!ta&&!tL,outsidePressEvent:{mouse:"sloppy",touch:"intentional"},bubbles:!!tL||void 0,outsidePress(e){let t=(0,eg.EW)(e);return!(0,eg.gR)(tF,t)&&!(0,eg.gR)(eB.current,t)&&!(0,eg.gR)(eD.current,t)}}),nn=function(e,t){let n="rootStore"in e?e.rootStore:e,r=n.useState("open"),l=n.useState("floatingElement"),i=n.useState("domReferenceElement"),o=n.context.dataRef,{listRef:a,activeIndex:s,onNavigate:d=()=>{},enabled:p=!0,selectedIndex:f=null,allowEscape:h=!1,loopFocus:m=!1,nested:v=!1,rtl:g=!1,virtual:x=!1,focusItemOnOpen:_="auto",focusItemOnHover:y=!0,openOnArrowKeyDown:b=!0,disabledIndices:I,orientation:R="vertical",parentOrientation:k,cols:P=1,scrollItemIntoView:j=!0,itemSizes:C,dense:M=!1,id:S,resetOnPointerLeave:w=!0,externalTree:E}=t,A=(0,eg.nd)(l),O=(0,eG.u)(A),V=(0,e5.R1)(),q=(0,e5.cq)(E);(0,c.g)(()=>{o.current.orientation=R},[o,R]);let N=(0,eg.WZ)(i),D=u.useRef(_),B=u.useRef(f??-1),K=u.useRef(null),F=u.useRef(!0),z=(0,T.K)(e=>
1{d(-1===B.current?null:B.current,e)}),L=u.useRef(z),H=u.useRef(!!l),W=u.useRef(r),J=u.useRef(!1),G=u.useRef(!1),U=(0,eG.u)(I),Y=(0,eG.u)(r),X=(0,eG.u)(j),ee=(0,eG.u)(f),et=(0,eG.u)(w),en=(0,T.K)(()=>{function e(e){x?q?.events.emit("virtualfocus",e):(0,e4.p)(e,{sync:J.current,preventScroll:!0})}let t=a.current[B.current],n=G.current;t&&e(t),(J.current?e=>e():requestAnimationFrame)(()=>{let r=a.current[B.current]||t;if(!r)return;t||e(r);let l=X.current;l&&el&&(n||!F.current)&&r.scrollIntoView?.("boolean"==typeof l?{block:"nearest",inline:"nearest"}:l)})});(0,c.g)(()=>{p&&(r&&l?(B.current=f??-1,D.current&&null!=f&&(G.current=!0,z())):H.current&&(B.current=-1,L.current()))},[p,r,l,f,z]),(0,c.g)(()=>{if(p){if(!r){J.current=!1;return}if(l)if(null==s){if(J.current=!1,null!=ee.current)return;if(H.current&&(B.current=-1,en()),(!W.current||!H.current)&&D.current&&(null!=K.current||!0===D.current&&null==K.current)){let e=0,t=()=>{null==a.current[0]?(e<2&&(e?requestAnimationFrame:queueMicrotask)(t),e+=1):(B.current=null==K.current||e6(K.current,R,g)||v?e0(a):e1(a),K.current=null,z())};t()}}else eQ(a,s)||(B.current=s,en(),G.current=!1)}},[p,r,l,s,ee,v,a,R,g,z,en,U]),(0,c.g)(()=>{if(!p||l||!q||x||!H.current)return;let e=q.nodesRef.current,t=e.find(e=>e.id===V)?.context?.elements.floating,n=(0,eg.RS)((0,eg.YE)(l)),r=e.some(e=>e.context&&(0,eg.gR)(e.context.elements.floating,n));t&&!r&&F.current&&t.focus({preventScroll:!0})},[p,l,q,V,x]),(0,c.g)(()=>{L.current=z,W.current=r,H.current=!!l}),(0,c.g)(()=>{r||(K.current=null,D.current=_)},[r,_]);let er=null!=s,el=u.useMemo(()=>{function e(e){if(!Y.current)return;let t=a.current.indexOf(e.currentTarget);-1!==t&&B.current!==t&&(B.current=t,z(e))}return{onFocus(t){J.current=!0,e(t)},onClick:({currentTarget:e})=>e.focus({preventScroll:!0}),onMouseMove(t){J.current=!0,G.current=!1,y&&e(t)},onPointerLeave(e){if(!Y.current||!F.current||"touch"===e.pointerType)return;J.current=!0;let t=e.relatedTarget;!(!y||a.current.includes(t))&&et.current&&(B.current=-1,z(e),x||O.current?.focus({preventScroll:!0}))}}},[Y,O,y,a,z,et,x]),ei=u.useCallback(()=>k??q?.nodesRef.current.find(e=>e.id===V)?.context?.dataRef?.current.orientation,[V,q,k]),eo=(0,T.K)(e=>{if(F.current=!1,J.current=!0,229===e.which||!Y.current&&e.currentTarget===O.current)return;if(v&&function(e,t,n,r){let l=n?e===eX.RJ:e===eX.eR,i=e===eX.il;return"both"===t||"horizontal"===t&&r&&r>1?"Escape"===e:e9(t,l,i)}(e.key,R,g,P)){e8(e.key,ei())||(0,$.jo)(e),n.setOpen(!1,(0,Z.d)(Q.Dq,e.nativeEvent)),(0,e_.sb)(i)&&(x?q?.events.emit("virtualfocus",i):i.focus());return}let t=B.current,l=e0(a,I),o=e1(a,I);if(N||("Home"===e.key&&((0,$.jo)(e),B.current=l,z(e)),"End"===e.key&&((0,$.jo)(e),B.current=o,z(e))),P>1){var u;let t=C||Array.from({length:a.current.length},()=>({width:1,height:1})),n=function(e,t,n){let r=[],l=0;return e.forEach(({width:e,height:i},o)=>{let u=!1;for(n&&(l=0);!u;){let n=[];for(let r=0;r<e;r+=1)for(let e=0;e<i;e+=1)n.push(l+r+e*t);l%t+e<=t&&n.every(e=>null==r[e])?(n.forEach(e=>{r[e]=o}),u=!0):l+=1}}),[...r]}(t,P,M),r=n.findIndex(e=>null!=e&&!e3(a,e,I)),i=n.reduce((e,t,n)=>null==t||e3(a,t,I)?e:n,-1),s=n[function(e,{event:t,orientation:n,loopFocus:r,rtl:l,cols:i,disabledIndices:o,minIndex:u,maxIndex:a,prevIndex:s,stopEvent:c=!1}){let d=s,p=[],f={},h=!1;{let t=null,n=-1;e.current.forEach((e,r)=>{if(null==e)return;let l=e.closest('[role="row"]');l&&(h=!0),(l!==t||-1===n)&&(t=l,p[n+=1]=[]),p[n].push(r),f[r]=n})}let m=h&&p.length>0&&p.some(e=>e.length!==i);function v(t){if(!m||-1===s)return;let n=f[s];if(null==n)return;let l=p[n].indexOf(s),i="up"===t?n-1:n+1;r&&(i<0?i=p.length-1:i>=p.length&&(i=0));let u=new Set;for(;i>=0&&i<p.length&&!u.has(i);){u.add(i);let n=p[i];if(0===n.length){i="up"===t?i-1:i+1;continue}let a=Math.min(l,n.length-1);for(let t=a;t>=0;t-=1){let r=n[t];if(!e3(e,r,o))return r}i="up"===t?i-1:i+1,r&&(i<0?i=p.length-1:i>=p.length&&(i=0))}}if(t.key===eX.il){let n=v("up");if(void 0!==n)c&&(0,$.jo)(t),d=n;else{if(c&&(0,$.jo)(t),-1===s)d=a;else if(d=e2(e,{startingIndex:d,amount:i,decrement:!0,disabledIndices:o}),r&&(s-i<u||d<0)){let e=s%i,t=a%i,n=a-(t-e);d=t===e?a:t>e?n:n-i}eQ(e,d)&&(d=s)}}if(t.key===eX.Jd){let n=v("down");void 0!==n?(c&&(0,$.jo)(t),d=n):(c&&(0,$.jo)(t),-1===s?d=u:(d=e2(e,{startingIndex:s,amount:i,disabledIndices:o}),r&&s+i>a&&(d=e2(e,{startingIndex:s%i-i,amount:i,disabledIndices:o}))),eQ(e,d)&&(d=s))}if("both"===n){let n=(0,eY.RI)(s/i);t.key===(l?eX.eR:eX.RJ)&&(c&&(0,$.jo)(t),s%i!=i-1?(d=e2(e,{startingIndex:s,disabledIndices:o}),r&&eZ(d,i,n)&&(d=e2(e,{startingIndex:s-s%i-1,disabledIndices:o}))):r&&(d=e2(e,{startingIndex:s-s%i-1,disabledIndices:o})),eZ(d,i,n)&&(d=s)),t.key===(l?eX.RJ:eX.eR)&&(c&&(0,$.jo)(t),s%i!=0?(d=e2(e,{startingIndex:s,decrement:!0,disabledIndices:o}),r&&eZ(d,i,n)&&(d=e2(e,{startingIndex:s+(i-s%i),decrement:!0,disabledIndices:o}))):r&&(d=e2(e,{startingIndex:s+(i-s%i),decrement:!0,disabledIndices:o})),eZ(d,i,n)&&(d=s));let u=(0,eY.RI)(a/i)===n;eQ(e,d)&&(d=r&&u?t.key===(l?eX.RJ:eX.eR)?a:e2(e,{startingIndex:s-s%i-1,disabledIndices:o}):s)}return d}({current:n.map(e=>null!=e?a.current[e]:null)},{event:e,orientation:R,loopFocus:m,rtl:g,cols:P,disabledIndices:(u=[...("function"!=typeof I?I:null)||a.current.map((e,t)=>
1e3(a,t,I)?t:void 0),void 0],n.flatMap((e,t)=>u.includes(e)?[t]:[])),minIndex:r,maxIndex:i,prevIndex:function(e,t,n,r,l){if(-1===e)return -1;let i=n.indexOf(e),o=t[e];switch(l){case"tl":return i;case"tr":if(!o)return i;return i+o.width-1;case"bl":if(!o)return i;return i+(o.height-1)*r;case"br":return n.lastIndexOf(e);default:return -1}}(B.current>o?l:B.current,t,n,P,e.key===eX.Jd?"bl":e.key===(g?eX.eR:eX.RJ)?"tr":"tl"),stopEvent:!0})];if(null!=s&&(B.current=s,z(e)),"both"===R)return}if(e8(e.key,R)){if((0,$.jo)(e),r&&!x&&(0,eg.RS)(e.currentTarget.ownerDocument)===e.currentTarget){B.current=e6(e.key,R,g)?l:o,z(e);return}e6(e.key,R,g)?m?t>=o?h&&t!==a.current.length?B.current=-1:(J.current=!1,B.current=l):B.current=e2(a,{startingIndex:t,disabledIndices:I}):B.current=Math.min(o,e2(a,{startingIndex:t,disabledIndices:I})):m?t<=l?h&&-1!==t?B.current=a.current.length:(J.current=!1,B.current=o):B.current=e2(a,{startingIndex:t,decrement:!0,disabledIndices:I}):B.current=Math.max(l,e2(a,{startingIndex:t,decrement:!0,disabledIndices:I})),eQ(a,B.current)&&(B.current=-1),z(e)}}),eu=u.useMemo(()=>x&&r&&er&&{"aria-activedescendant":`${S}-${s}`},[x,r,er,S,s]),ea=u.useMemo(()=>({"aria-orientation":"both"===R?void 0:R,...!N?eu:{},onKeyDown(e){if("Tab"===e.key&&e.shiftKey&&r&&!x){let t=(0,eg.EW)(e.nativeEvent);if(t&&!(0,eg.gR)(O.current,t))return;(0,$.jo)(e),n.setOpen(!1,(0,Z.d)(Q.Xn,e.nativeEvent)),(0,e_.sb)(i)&&i.focus();return}eo(e)},onPointerMove(){F.current=!0}}),[eu,eo,O,R,N,n,r,x,i]),es=u.useMemo(()=>{function e(e){"auto"===_&&(0,$.YF)(e.nativeEvent)&&(D.current=!x)}function t(e){D.current=_,"auto"===_&&(0,$.Pg)(e.nativeEvent)&&(D.current=!0)}return{onKeyDown(e){var t,r;let l=n.select("open");F.current=!1;let i=e.key.startsWith("Arrow"),o=(t=e.key,r=ei(),e9(r,g?t===eX.eR:t===eX.RJ,t===eX.Jd)),u=e8(e.key,R),s=(v?o:u)||"Enter"===e.key||""===e.key.trim();if(x&&l)return eo(e);if(l||b||!i){if(s){let t=e8(e.key,ei());K.current=v&&t?null:e.key}if(v){o&&((0,$.jo)(e),l?(B.current=e0(a,U.current),z(e)):n.setOpen(!0,(0,Z.d)(Q.Dq,e.nativeEvent,e.currentTarget)));return}u&&(null!=ee.current&&(B.current=ee.current),(0,$.jo)(e),!l&&b?n.setOpen(!0,(0,Z.d)(Q.Dq,e.nativeEvent,e.currentTarget)):eo(e),l&&z(e))}},onFocus(e){n.select("open")&&!x&&(B.current=-1,z(e))},onPointerDown:t,onPointerEnter:t,onMouseDown:e,onClick:e}},[eo,U,_,a,v,z,n,b,R,ei,g,ee,x]),ec=u.useMemo(()=>({...eu,...es}),[eu,es]);return u.useMemo(()=>p?{reference:ec,floating:ea,item:el,trigger:es}:{},[p,ec,ea,es,el])}(t6,{enabled:!R&&!ta,id:ek,listRef:ew,activeIndex:tD,selectedIndex:tB,virtual:!0,loopFocus:L,allowEscape:L&&!t,focusItemOnOpen:!ej&&("none"!==_||!!t)&&"auto",focusItemOnHover:z,resetOnPointerLeave:!F,cols:w?2:1,orientation:w?"horizontal":void 0,disabledIndices:ep.Ml,onNavigate(e,t){(t||tb)&&"ending"!==tU&&(t?t0({activeIndex:e,type:eq.current?"keyboard":"pointer"}):t0({activeIndex:e}))}}),{getReferenceProps:nr,getFloatingProps:nl,getItemProps:ni}=(0,e7.b)([t7,ne,nt,nn]),no=u.useRef(!0);no.current&&(no.current=!1,tA.update({inline:Y,popupProps:nl(),inputProps:nr(),triggerProps:tY,getItemProps:ni,setOpen:t2,setInputValue:t1,setSelectedValue:t3,setIndices:t0,onItemHighlighted:tq,handleSelection:t5,forceMount:tZ,requestSubmit:t4})),(0,c.g)(()=>{tA.update({id:ek,selectedValue:tm,open:tb,mounted:tJ,transitionStatus:tU,items:V,inl
1ine:Y,popupProps:nl(),inputProps:nr(),triggerProps:tY,openMethod:t$,getItemProps:ni,selectionMode:_,name:ts,disabled:ta,readOnly:R,required:k,grid:w,isGrouped:tR,virtualized:U,onOpenChangeComplete:tN,openOnInputClick:B,itemToStringLabel:H,modal:ee,autoHighlight:t,isItemEqualToValue:G,submitOnItemClick:eo,hasInputValue:tp,requestSubmit:t4})},[tA,ek,tm,tb,tJ,tU,V,nl,nr,ni,t$,tY,_,ts,ta,R,k,eR,w,tR,U,tN,B,H,ee,G,eo,tp,Y,t4,t]);let nu=(0,eH.a)(P,eR.inputRef),na=u.useMemo(()=>({query:tk,filteredItems:tw,flatFilteredItems:tE}),[tk,tw,tE]),ns=u.useMemo(()=>Array.isArray(tO)?"":O(tO,J),[tO,J]),nc=tc&&Array.isArray(tm)&&tm.length>0,nd=u.useMemo(()=>tc&&Array.isArray(tm)&&ts?tm.map(e=>{let t=O(e,J);return(0,r.jsx)("input",{type:"hidden",name:ts,value:t},t)}):null,[tc,tm,ts,J]),np=(0,r.jsxs)(u.Fragment,{children:[e.children,(0,r.jsx)("input",{...eR.getInputValidationProps({onFocus(){if(tH)return void tF?.focus();(eO.current||tF)?.focus()},onChange(e){if(e.nativeEvent.defaultPrevented)return;let t=e.target.value,n=(0,Z.d)(Q.pf,e.nativeEvent);function r(){if(tc)return;if("none"===_){es(t!==ec.initialValue),t1(t,n),ed()&&eR.commit(t);return}let e=ez.current.find(e=>O(e,J).toLowerCase()===t.toLowerCase());null!=e&&(es(e!==ec.initialValue),t3?.(e,n),ed()&&eR.commit(e))}V?r():(tZ(),queueMicrotask(r))}}),name:tc||"none"===_?void 0:ts,disabled:ta,required:k&&!nc,readOnly:R,value:ns,ref:nu,style:ts?eW.a:eW.Q,tabIndex:-1,"aria-hidden":!0}),nd]});return(0,r.jsx)(p.Provider,{value:tA,children:(0,r.jsx)(f.Provider,{value:t6,children:(0,r.jsx)(h.Provider,{value:na,children:(0,r.jsx)(m.Provider,{value:t_,children:np})})})})}function ts(e){let{multiple:t=!1,defaultValue:n,value:l,onValueChange:i,...o}=e;return(0,r.jsx)(ta,{...o,selectionMode:t?"multiple":"single",selectedValue:l,defaultSelectedValue:n,onSelectedValueChange:i})}let tc=u.createContext(void 0),td=u.forwardRef(function(e,t){let{render:n,className:r,disabled:l=!1,nativeButton:i=!0,...o}=e,a=v(),{index:c}=function(){let e=u.useContext(tc);if(!e)throw Error((0,d.A)(17));return e}(),p=(0,s.P)(a,q.disabled),f=(0,s.P)(a,q.readOnly),h=(0,s.P)(a,q.selectedValue),m=(0,s.P)(a,q.isItemEqualToValue),g=p||l,{buttonRef:x,getButtonProps:_}=(0,N.s)({native:i,disabled:g||f,focusableWhenDisabled:!0}),y=u.useMemo(()=>({disabled:g}),[g]);return(0,R.o)("button",e,{ref:[t,x],state:y,props:[{tabIndex:-1,"aria-readonly":f||void 0,onClick(e){if(g||f)return;let t=(0,Z.d)(Q.ux,e.nativeEvent),n=a.state.activeIndex,r=h[c],l=S(a.state.valuesRef.current,r,m);-1!==l&&n===l&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"pointer":"keyboard"}),a.state.setSelectedValue(h.filter((e,t)=>t!==c),t),t.isPropagationAllowed||e.stopPropagation(),a.state.inputRef.current?.focus()},onKeyDown(e){if(g||f)return;let t=(0,Z.d)(Q.ux,e.nativeEvent);if("Enter"===e.key||" "===e.key){let n=a.state.activeIndex,r=h[c],l=S(a.state.valuesRef.current,r,m);-1!==l&&n===l&&a.state.setIndices({activeIndex:null,type:a.state.keyboardActiveRef.current?"pointer":"keyboard"}),a.state.setSelectedValue(h.filter((e,t)=>t!==c),t),t.isPropagationAllowed||(0,$.jo)(e),a.state.inputRef.current?.focus()}}},o,_]})}),tp=u.forwardRef(function(e,t){let{render:n,className:l,...i}=e,o=v(),{setHighlightedChipIndex:c,chipsRef:d}=U(),p=(0,s.P)(o,q.disabled),f=(0,s.P)(o,q.readOnly),h=(0,s.P)(o,q.selectedValue),{ref:m,index:g}=I(),x=u.useMemo(()=>({disabled:p}),[p]),_=(0,R.o)("div",e,{ref:[t,m],state:x,props:[{tabIndex:-1,"aria-disabled":p||void 0,"aria-readonly":f||void 0,onKeyDown(e){if(p||f)return;let t=function(e){let t=g;if("ArrowLeft"===e.key)e.preventDefault(),t=g>0?g-1:void 0;else if("ArrowRight"===e.key)e.preventDefault(),t=g<h.length-1?g+1:void 0;else if("Backspace"===e.key||"Delete"===e.key){let n=g>=h.length-1?h.length-2:g;t=n>=0?n:void 0,(0,$.jo)(e),o.state.setIndices({activeIndex:null,selectedIndex:null,type:"keyboard"}),o.state.setSelectedValue(h.filter((e,t)=>t!==g),(0,Z.d)(Q.dv,e.nativeEvent))}else"Enter"===e.key||" "===e.key?((0,$.jo)(e),t=void 0):"ArrowDown"===e.key||"ArrowUp"===e.key?((0,$.jo)(e),o.state.setOpen(!0,(0,Z.d)(Q.Dq,e.nativeEvent)),t=void 0):1!==e.key.length||e.ctrlKey||e.metaKey||e.altKey||(t=void 0);return t}(e);a.flushSync(()=>{c(t)}),void 0===t?o.state.inputRef.current?.focus():d.current[t]?.focus()},onMouseDown(e){p||f||(e.preventDefault(),o.state.inputRef.current?.focus())}},i]}),y=u.useMemo(()=>({index:g}),[g]);return(0,r.jsx)(tc.Provider,{value:y,children:_})}),tf=(0,u.forwardRef)((e,t)=>(0,r.jsx)("svg",{xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 32 32",ref:t,...e,children:(0,r.jsx)("path",{fill:"currentColor",d:"M16 2a14 14 0 1 0 0 28 14 14 0 0 0 0-28m6.71 19.29a1.002 1.002 0 0 1-.325 1.639 1 1 0 0 1-1.095-.219L16 17.42l-5.29 5.29a1.002 1.002 0 0 1-1.639-.325 1 1 0 0 1 .219-1.
1095L14.58 16l-5.29-5.29a1.004 1.004 0 1 1 1.42-1.42L16 14.58l5.29-5.29a1.004 1.004 0 0 1 1.42 1.42L17.42 16z"})}));var th=n(29774),tm=n(90279),tv=n(44314),tg=n(61130),tx=n(39790),t_=n(5502),ty=n(44905),tb=n(88983);let tI={Chip:"_Chip_1gva3_1","Chip--sm":"_Chip--sm_1gva3_26","Chip--md":"_Chip--md_1gva3_29",Chip_icon:"_Chip_icon_1gva3_32","Chip--close":"_Chip--close_1gva3_51"},tR=(0,tm.Fj)({base:tI.Chip,variants:{size:{sm:tI["Chip--sm"],md:tI["Chip--md"]}},defaultVariants:{size:"md"}}),tk={sm:"xxx-small",md:"xx-small"},tP=(0,tb.R)(function(e,t){let n,l,i,u,a,s,c,d,p,f,h,m,v,g,x=(0,o.c)(32);x[0]!==e?({children:n,onClose:u,icon:i,className:l,size:c,render:a,...s}=e,x[0]=e,x[1]=n,x[2]=l,x[3]=i,x[4]=u,x[5]=a,x[6]=s,x[7]=c):(n=x[1],l=x[2],i=x[3],u=x[4],a=x[5],s=x[6],c=x[7]);let _=void 0===c?"md":c;x[8]!==l||x[9]!==_?(d=tR({size:_,className:l}),x[8]=l,x[9]=_,x[10]=d):d=x[10],x[11]!==i||x[12]!==s?(p=i?(0,r.jsx)("span",{className:tI.Chip_icon,"data-disabled":s.disabled,children:i}):null,x[11]=i,x[12]=s,x[13]=p):p=x[13];let y=tk[_];return x[14]!==n||x[15]!==y?(f=(0,r.jsx)(ty.o,{size:y,weight:"semibold",truncate:!0,children:n}),x[14]=n,x[15]=y,x[16]=f):f=x[16],x[17]!==u||x[18]!==e.disabled?(h=u?(0,r.jsx)("div",{role:"button",tabIndex:e.disabled?-1:0,onKeyDown:e=>{e.stopPropagation();let t=e.key;("Enter"===t||["Spacebar"," "].indexOf(t)>=0)&&(e.preventDefault(),null==u||u())},"data-disabled":e.disabled,className:(0,tm.cx)(tI.Chip_icon,tI["Chip--close"]),onClick:e=>{e.stopPropagation(),u()},children:(0,r.jsx)(tf,{})}):null,x[17]=u,x[18]=e.disabled,x[19]=h):h=x[19],x[20]!==p||x[21]!==f||x[22]!==h?(m=(0,r.jsxs)(r.Fragment,{children:[p,f,h]}),x[20]=p,x[21]=f,x[22]=h,x[23]=m):m=x[23],x[24]!==s||x[25]!==d||x[26]!==m?(v={className:d,...s,children:m},x[24]=s,x[25]=d,x[26]=m,x[27]=v):v=x[27],x[28]!==t||x[29]!==a||x[30]!==v?(g={defaultTagName:"div",render:a,ref:t,props:v},x[28]=t,x[29]=a,x[30]=v,x[31]=g):g=x[31],(0,t_.C)(g)}),tj={Chip:"_Chip_oxz4v_1"},tC={default:void 0,warning:(0,r.jsx)(tg.r,{}),error:(0,r.jsx)(tx.D,{})},tM=(0,tb.R)(function(e,t){let n,l,i,u,a,s,c,d=(0,o.c)(15);d[0]!==e?({children:n,className:l,feedback:a,icon:i,...u}=e,d[0]=e,d[1]=n,d[2]=l,d[3]=i,d[4]=u,d[5]=a):(n=d[1],l=d[2],i=d[3],u=d[4],a=d[5]);let p=void 0===a?"default":a;d[6]!==l?(s=(0,tm.cx)(tj.Chip,l),d[6]=l,d[7]=s):s=d[7];let f=tC[p]||i;return d[8]!==n||d[9]!==p||d[10]!==t||d[11]!==u||d[12]!==s||d[13]!==f?(c=(0,r.jsx)(tP,{className:s,icon:f,...u,"data-feedback":p,ref:t,children:n}),d[8]=n,d[9]=p,d[10]=t,d[11]=u,d[12]=s,d[13]=f,d[14]=c):c=d[14],c});var tS=n(10729),tw=n(9943),tE=n(36791),tA=n(56350);let tO={InputBox:"_InputBox_1tygu_6",InputBox__wrapper:"_InputBox__wrapper_1tygu_18","InputBox__wrapper--medium":"_InputBox__wrapper--medium_1tygu_43","InputBox__wrapper--small":"_InputBox__wrapper--small_1tygu_48","InputBox__wrapper--x-small":"_InputBox__wrapper--x-small_1tygu_53","InputBox__wrapper--rounded":"_InputBox__wrapper--rounded_1tygu_58","InputBox__wrapper--filled":"_InputBox__wrapper--filled_1tygu_61","InputBox__wrapper--embedded":"_InputBox__wrapper--embedded_1tygu_66",InputBox__input:"_InputBox__input_1tygu_95",InputBox__label:"_InputBox__label_1tygu_101",InputBox__message:"_InputBox__message_1tygu_109","InputBox__message--error":"_InputBox__message--error_1tygu_119","InputBox__message--success":"_InputBox__message--success_1tygu_123","InputBox--Icons":"_InputBox--Icons_1tygu_162"},tV=(0,tm.Fj)({base:tO.InputBox__wrapper,variants:{variant:{default:"",filled:tO["InputBox__wrapper--filled"],embedded:tO["InputBox__wrapper--embedded"]},rounded:{true:tO["InputBox__wrapper--rounded"],false:""},size:{"x-small":tO["InputBox__wrapper--x-small"],small:tO["InputBox__wrapper--small"],medium:tO["InputBox__wrapper--medium"],large:""}},defaultVariants:{size:"large"}}),tq={"x-small":"xx-small",small:"xx-small",medium:"xx-small",large:"x-small"},tN={"x-small":!1,small:!1,medium:!0,large:!0},tD=(0,tb.R)(function(e,t){let n,l,i,u,a,s,c,d,p,f,h,m,v,g,x,_,y,b,I,R,k,P,j,C,M,S,w=(0,o.c)(64);w[0]!==e?({size:v,variant:g,rounded:x,info:s,error:u,success:m,label:c,shiftLabel:h,icon:a,rightIcon:f,required:d,className:l,children:n,disabled:i,...p}
1=e,w[0]=e,w[1]=n,w[2]=l,w[3]=i,w[4]=u,w[5]=a,w[6]=s,w[7]=c,w[8]=d,w[9]=p,w[10]=f,w[11]=h,w[12]=m,w[13]=v,w[14]=g,w[15]=x):(n=w[1],l=w[2],i=w[3],u=w[4],a=w[5],s=w[6],c=w[7],d=w[8],p=w[9],f=w[10],h=w[11],m=w[12],v=w[13],g=w[14],x=w[15]);let E=void 0===v?"large":v,A=void 0===g?"default":g,O=void 0!==x&&x,V=tN[E]&&c;w[16]!==l||w[17]!==O||w[18]!==E||w[19]!==A?(_=(0,tm.cx)(tV({size:E,variant:A,rounded:O}),l),w[16]=l,w[17]=O,w[18]=E,w[19]=A,w[20]=_):_=w[20];let q=i?"":void 0,N=u?"true":"false",D=!!u,B=m?"true":"false",T=V?"true":"false",K=V&&h?"true":"false",F=tq[E];return w[21]!==F?(y=(0,tA.D)({size:F}),w[21]=F,w[22]=y):y=w[22],w[23]!==a?(b=a?(0,r.jsx)("div",{className:tO["InputBox--Icons"],children:a||null}):null,w[23]=a,w[24]=b):b=w[24],w[25]!==i||w[26]!==V||w[27]!==d||w[28]!==p?(I=V?(0,r.jsx)(ty.o,{size:"x-small",weight:"semibold",className:tO.InputBox__label,children:(0,r.jsx)(tE.J,{id:p.id,disabled:i,required:d,label:V})}):null,w[25]=i,w[26]=V,w[27]=d,w[28]=p,w[29]=I):I=w[29],w[30]!==n||w[31]!==I?(R=(0,r.jsxs)("div",{className:tO.InputBox__input,children:[I,n]}),w[30]=n,w[31]=I,w[32]=R):R=w[32],w[33]!==f?(k=f?(0,r.jsx)("div",{className:tO["InputBox--Icons"],children:f||null}):null,w[33]=f,w[34]=k):k=w[34],w[35]!==i||w[36]!==t||w[37]!==p||w[38]!==K||w[39]!==y||w[40]!==b||w[41]!==R||w[42]!==k||w[43]!==_||w[44]!==q||w[45]!==N||w[46]!==D||w[47]!==B||w[48]!==T?(P=(0,r.jsxs)("div",{className:_,"aria-disabled":i,"data-disabled":q,"data-errored":N,"aria-invalid":D,"data-success":B,"data-labeled":T,"data-shiftlabel":K,...p,...y,ref:t,children:[b,R,k]}),w[35]=i,w[36]=t,w[37]=p,w[38]=K,w[39]=y,w[40]=b,w[41]=R,w[42]=k,w[43]=_,w[44]=q,w[45]=N,w[46]=D,w[47]=B,w[48]=T,w[49]=P):P=w[49],w[50]!==u?(j=u?(0,r.jsxs)(ty.o,{size:"xx-small",weight:"semibold",className:(0,tm.cx)(tO.InputBox__message,tO["InputBox__message--error"]),children:[(0,r.jsx)(tx.D,{}),u]}):null,w[50]=u,w[51]=j):j=w[51],w[52]!==u||w[53]!==s||w[54]!==m?(C=!s||u||m?null:(0,r.jsx)(ty.o,{size:"xx-small",weight:"semibold",className:tO.InputBox__message,children:s}),w[52]=u,w[53]=s,w[54]=m,w[55]=C):C=w[55],w[56]!==u||w[57]!==m?(M=m&&!u?(0,r.jsxs)(ty.o,{size:"x-small",weight:"semibold",className:(0,tm.cx)(tO.InputBox__message,tO["InputBox__message--success"]),children:[(0,r.jsx)(tw.q,{}),m]}):null,w[56]=u,w[57]=m,w[58]=M):M=w[58],w[59]!==P||w[60]!==j||w[61]!==C||w[62]!==M?(S=(0,r.jsxs)("div",{className:tO.InputBox,children:[P,j,C,M]}),w[59]=P,w[60]=j,w[61]=C,w[62]=M,w[63]=S):S=w[63],S}),tB=(e,t)=>e===t&&(0!==e||1/e==1/t)||e!=e&&t!=t;function tT(e,t,n){let{debug:r=!1,ignore:l=new Set}=n||{};if(tB(e,t))return!0;if("string"==typeof e||"string"==typeof t)return e===t;if(Array.isArray(e)&&Array.isArray(t)){if(e.length!==t.length)return r&&console.debug("%c\uD83D\uDED1 [shallowEqual]: Uneven array length","color: #da5b4a;"),!1;for(let n=0;n<e.length;n++)if(!l.has(n)&&!tB(e[n],t[n]))return r&&console.debug(`%c🛑 [shallowEqual]: Different value at index ${n}`,"color: #da5b4a;"),!1;return!0}if("object"!=typeof e||null===e||"object"!=typeof t||null===t)return r&&console.debug("%c\uD83D\uDED1 [shallowEqual]: Uneven object","color: #da5b4a;"),!1;let i=Object.keys(e),o=Object.keys(t);if(i.length!==o.length)return r&&console.debug("%c\uD83D\uDED1 [shallowEqual]: Uneven object keys length","color: #da5b4a;"),!1;for(let n of i)if(!l.has(n)&&(!Object.prototype.hasOwnProperty.call(t,n)||!tB(e[n],t[n])))return r&&console.debug(`%c🛑 [shallowEqual]: Different ${String(n)} key`,"color: #da5b4a;"),!1;return!0}let tK={Select:"_Select_ok8qh_6","Select__icon-chevron":"_Select__icon-chevron_ok8qh_9","Select-input":"_Select-input_ok8qh_12","Select-chips":"_Select-chips_ok8qh_19","Select-popover":"_Select-popover_ok8qh_26","Select-popover-menu":"_Select-popover-menu_ok8qh_59","Select-popover-item":"_Select-popover-item_ok8qh_65","Select-popover-item-description":"_Select-popover-item-description_ok8qh_72",Select__icon:"_Select__icon_ok8qh_9",Select__empty:"_Select__empty_ok8qh_93",Select__clear:"_Select__clear_ok8qh_98"};var tF=n(23642);let tz=(0,tb.R)(function(e,t){let n,l,i,a,s,c,d,p,f,h,m,v,g,x,_,y,b,I,R,k,P,j,C,M,S,w,E,A,O,V,q,N,D,T,K,F,z,L,H,W,J,G,U,$,Y,X,Z=(0,o.c)(102);Z[0]!==e?({open:g,onOpenChange:m,modal:R,items:f,value:C,onValueChange:v,defaultValue:i,autoHighlight:k,label:h,inputProps:p,info:d,icon:c,rightIcon:y,error:s,success:I,required:x,size:P,variant:M,rounded:b,disabled:a,clearable:n,contentProps:l,combobox:j,..._}=e,Z[0]=e,Z[1]=n,Z[2]=l,Z[3]=i,Z[4]=a,Z[5]=s,Z[6]=c,Z[7]=d,Z[8]=
1p,Z[9]=f,Z[10]=h,Z[11]=m,Z[12]=v,Z[13]=g,Z[14]=x,Z[15]=_,Z[16]=y,Z[17]=b,Z[18]=I,Z[19]=R,Z[20]=k,Z[21]=P,Z[22]=j,Z[23]=C,Z[24]=M):(n=Z[1],l=Z[2],i=Z[3],a=Z[4],s=Z[5],c=Z[6],d=Z[7],p=Z[8],f=Z[9],h=Z[10],m=Z[11],v=Z[12],g=Z[13],x=Z[14],_=Z[15],y=Z[16],b=Z[17],I=Z[18],R=Z[19],k=Z[20],P=Z[21],j=Z[22],C=Z[23],M=Z[24]);let Q=void 0!==R&&R,ee=void 0===k||k,en=void 0===P?"medium":P,er=void 0!==j&&j,el=(0,u.useRef)(null);if(Z[25]!==f){var ei;S=(ei=f).length>0&&"items"in ei[0],Z[25]=f,Z[26]=S}else S=Z[26];let eu=S;Z[27]!==i||Z[28]!==v||Z[29]!==C?(w={defaultProp:i,onChange:v,prop:C},Z[27]=i,Z[28]=v,Z[29]=C,Z[30]=w):w=Z[30];let[ea,es]=(0,tv.i)(w);Z[31]!==m||Z[32]!==g?(E={defaultProp:!1,prop:g,onChange:m},Z[31]=m,Z[32]=g,Z[33]=E):E=Z[33];let[ec,ed]=(0,tv.i)(E);Z[34]!==ea?(A=e=>Array.isArray(ea)?ea.some(t=>tT(t,e.value)):tT(ea,e.value),Z[34]=ea,Z[35]=A):A=Z[35];let ep=A;Z[36]!==eu||Z[37]!==f?(O=e=>{if(eu)for(let t of f){let n=t.items.find(t=>tT(t.value,e));if(n)return n}else{let t=f.find(t=>tT(t.value,e));if(t)return t}},Z[36]=eu,Z[37]=f,Z[38]=O):O=Z[38];let em=O;Z[39]!==ep?(V=e=>{let t=ep(e);return(0,r.jsx)(B,{value:e.value,render:(0,r.jsx)(tF.hN,{className:tK["Select-popover-item"],icon:e.icon,isChecked:t}),children:(0,r.jsxs)("div",{...(0,tA.D)({weight:t?"semibold":"regular"}),children:[(0,r.jsx)(ty.o,{children:e.label}),e.description?(0,r.jsx)(ty.o,{size:"xxx-small",className:tK["Select-popover-item-description"],children:e.description}):null]})})},Z[39]=ep,Z[40]=V):V=Z[40];let ev=V;Z[41]!==er||Z[42]!==em||Z[43]!==p||Z[44]!==ea?(q=()=>{let e=Array.isArray(ea)?ea.map(e=>em(e)):em(ea),t=Array.isArray(e)?e.length>0:!!e;return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(et,{className:tK["Select-input"],readOnly:!er,hidden:t?!er:void 0,...p,placeholder:t||null==p?void 0:p.placeholder}),!e||Array.isArray(e)||er?null:(0,r.jsx)(ty.o,{truncate:!0,children:null==e?void 0:e.label})]})},Z[41]=er,Z[42]=em,Z[43]=p,Z[44]=ea,Z[45]=q):q=Z[45];let eg=q;Z[46]!==es?(N=(e,t)=>{"input-clear"!==t.reason&&es(e,t)},Z[46]=es,Z[47]=N):N=Z[47],Z[48]!==ed?(D=(e,t)=>{"clear-press"!==t.reason&&"chip-remove-press"!==t.reason&&ed(e,t)},Z[48]=ed,Z[49]=D):D=Z[49],Z[50]!==em?(T=e=>{var t;return e&&"object"==typeof e&&"label"in e?e.label:(null==(t=em(e))?void 0:t.label)||""},Z[50]=em,Z[51]=T):T=Z[51];let ex=!!(ea||ec);return Z[52]!==n||Z[53]!==ea?(K=n?(0,r.jsx)(eo,{"data-value":!!ea,className:tK.Select__clear,onMouseDown:tG,children:(0,r.jsx)(tf,{})}):null,Z[52]=n,Z[53]=ea,Z[54]=K):K=Z[54],Z[55]===Symbol.for("react.memo_cache_sentinel")?(F=(0,r.jsx)("div",{className:(0,tm.cx)(tK.Select__icon,tK["Select__icon-chevron"]),children:(0,r.jsx)(th.Z,{})}),Z[55]=F):F=Z[55],Z[56]!==y||Z[57]!==K?(z=(0,r.jsxs)(r.Fragment,{children:[y,K,F]}),Z[56]=y,Z[57]=K,Z[58]=z):z=Z[58],Z[59]!==a||Z[60]!==s||Z[61]!==c||Z[62]!==d||Z[63]!==h||Z[64]!==x||Z[65]!==b||Z[66]!==en||Z[67]!==I||Z[68]!==ex||Z[69]!==z||Z[70]!==M?(L=(0,r.jsx)(tD,{size:en,info:d,error:s,success:I,required:x,label:h,disabled:a,variant:M,rounded:b,shiftLabel:ex,className:tK.Select,icon:c,rightIcon:z,ref:el}),Z[59]=a,Z[60]=s,Z[61]=c,Z[62]=d,Z[63]=h,Z[64]=x,Z[65]=b,Z[66]=en,Z[67]=I,Z[68]=ex,Z[69]=z,Z[70]=M,Z[71]=L):L=Z[71],Z[72]!==em||Z[73]!==eg||Z[74]!==en?(H=(0,r.jsx)(ef,{className:tK["Select-chips"],children:(0,r.jsx)(eh,{children:e=>{if(Array.isArray(e))return(0,r.jsxs)(r.Fragment,{children:[e.map(em).filter(Boolean).map((e,t)=>(0,r.jsx)(tH,{item:e,size:en},`select-chip-${t}`)),eg()]});let t=em(e);return(0,r.jsxs)(r.Fragment,{children:[(null==t?void 0:t.icon)?(0,r.jsx)("span",{className:tK.Select__icon,children:t.icon}):null,eg()]})}})}),Z[72]=em,Z[73]=eg,Z[74]=en,Z[75]=H):H=Z[75],Z[76]!==t||Z[77]!==L||Z[78]!==H?(W=(0,r.jsx)(eb,{render:L,ref:t,children:H}),Z[76]=t,Z[77]=L,Z[78]=H,Z[79]=W):W=Z[79],Z[80]===Symbol.for("react.memo_cache_sentinel")?(J=(0,r.jsx)(tF.bL,{className:tK["Select-popover"]}),Z[80]=J):J=Z[80],Z[81]===Symbol.for("react.memo_cache_sentinel")?(G=(0,r.jsx)(eI,{className:tK["Select-popover-menu"],children:(0,r.jsx)("div",{className:tK.Select__empty,children:(0,r.jsx)(ty.o,{size:"x-small",children:"No results"})})}),Z[81]=G):G=Z[81],Z[82]===Symbol.for("react.memo_cache_sentinel")?(U=(0,r.jsx)(tS.y,{className:tK["Select-popover-menu"]}
1),Z[82]=U):U=Z[82],Z[83]!==eu||Z[84]!==ev?($=(0,r.jsx)(ej,{render:U,children:eu?e=>(0,r.jsxs)(eM,{items:e.items,children:[e.title?(0,r.jsx)(eS,{render:(0,r.jsx)(tF.q7,{className:tK["Select-popover-item"],style:{pointerEvents:"none"}}),children:(0,r.jsx)(ty.o,{size:"xx-small",weight:"semibold",children:e.title})}):null,(0,r.jsx)(eP,{children:e=>ev(e)})]}):e=>ev(e)}),Z[83]=eu,Z[84]=ev,Z[85]=$):$=Z[85],Z[86]!==l||Z[87]!==$?(Y=(0,r.jsx)(eA,{children:(0,r.jsx)(eB,{align:"start",side:"bottom",sideOffset:5,anchor:el,children:(0,r.jsxs)(ez,{render:J,...l,children:[G,$]})})}),Z[86]=l,Z[87]=$,Z[88]=Y):Y=Z[88],Z[89]!==ee||Z[90]!==a||Z[91]!==ec||Z[92]!==f||Z[93]!==Q||Z[94]!==_||Z[95]!==ea||Z[96]!==N||Z[97]!==D||Z[98]!==T||Z[99]!==W||Z[100]!==Y?(X=(0,r.jsxs)(ts,{items:f,modal:Q,autoHighlight:ee,value:ea,onValueChange:N,open:ec,onOpenChange:D,itemToStringLabel:T,isItemEqualToValue:tJ,disabled:a,..._,children:[W,Y]}),Z[89]=ee,Z[90]=a,Z[91]=ec,Z[92]=f,Z[93]=Q,Z[94]=_,Z[95]=ea,Z[96]=N,Z[97]=D,Z[98]=T,Z[99]=W,Z[100]=Y,Z[101]=X):X=Z[101],X}),tL={"x-small":"sm",small:"sm",medium:"md",large:"md"};function tH(e){let t,n,l,i,a=(0,o.c)(8),{item:s,size:c}=e,d=(0,u.useRef)(null),p=tL[c];return a[0]===Symbol.for("react.memo_cache_sentinel")?(t=()=>{var e;return null==(e=d.current)?void 0:e.click()},a[0]=t):t=a[0],a[1]!==s.icon||a[2]!==p?(n=(0,r.jsx)(tM,{size:p,icon:s.icon,onClose:t}),a[1]=s.icon,a[2]=p,a[3]=n):n=a[3],a[4]===Symbol.for("react.memo_cache_sentinel")?(l=(0,r.jsx)(td,{hidden:!0,ref:d}),a[4]=l):l=a[4],a[5]!==s.label||a[6]!==n?(i=(0,r.jsxs)(tp,{onMouseDown:tW,render:n,children:[s.label,l]}),a[5]=s.label,a[6]=n,a[7]=i):i=a[7],i}function tW(e){return e.stopPropagation()}function tJ(e,t){return e&&"object"==typeof e&&"value"in e?tT(e.value,t):tT(e,t)}function tG(e){return e.stopPropagation()}var tU=n(4823),t$=n(36930),tY=n(80083),tX=n(77639);let tZ={checkboxes:"_checkboxes_1tkjf_1",survey:"_survey_1tkjf_11"};function tQ({next:e}){let{environment:t}=(0,tY.A)(),{data:n}=(0,t$.u)("countries",()=>(0,tX.b)(`https://api2.${"prd"===t?"arduino":"oniudra"}.cc/countries/v1`),{cacheTime:1/0}),[o,a]=(0,u.useState)({profession_designer_artist:!1,profession_teacher:!1,profession_student:!1,profession_entrepreneur:!1,profession_engineer_developer:!1,profession_maker:!1,profession_other:!1,interest_sustainability_social_innovation:!1,interest_gaming:!1,interest_healthcare_fitness:!1,interest_ai:!1,interest_robotics:!1,interest_fashion_wearables:!1,interest_pro_industrial:!1,interest_agriculture_gardening:!1,interest_education:!1,interest_art_music_design:!1,interest_home_automation:!1}),[s,c]=(0,u.useState)();return(0,r.jsxs)(r.Fragment,{children:[(0,r.jsx)(l.Y9,{children:"Arduino Survey"}),(0,r.jsxs)(l.nB,{children:[(0,r.jsx)(ty.o,{children:"We'd like to get to know you little better. Please help us improve by answering this super short optional survey."}),(0,r.jsxs)("div",{className:tZ.survey,children:[(0,r.jsx)(ty.o,{children:"What is your profession?"}),(0,r.jsxs)("div",{className:tZ.checkboxes,children:[(0,r.jsx)(i.S,{label:"Designer / Artist",checked:o.profession_designer_artist,onCheckedChange:e=>a({...o,profession_designer_artist:!!e})}),(0,r.jsx)(i.S,{label:"Teacher",checked:o.profession_teacher,onCheckedChange:e=>a({...o,profession_teacher:!!e})}),(0,r.jsx)(i.S,{label:"Student",checked:o.profession_student,onCheckedChange:e=>a({...o,profession_student:!!e})}),(0,r.jsx)(i.S,{label:"Enterpreneur",checked:o.profession_entrepreneur,onCheckedChange:e=>a({...o,profession_entrepreneur:!!e})}),(0,r.jsx)(i.S,{label:"Engineer / Developer",checked:o.profession_engineer_developer,onCheckedChange:e=>a({...o,profession_engineer_developer:!!e})}),(0,r.jsx)(i.S,{label:"Maker",checked:o.profession_maker,onCheckedChange:e=>a({...o,profession_maker:!!e})}),(0,r.jsx)(i.S,{label:"Other",checked:o.profession_other,onCheckedChange:e=>a({...o,profession_other:!!e})})]})]}),(0,r.jsxs)("div",{className:tZ.survey,children:[(0,r.jsx)(ty.o,{children:"Which categories best describe your interests?"}),(0,r.jsxs)("div",{className:tZ.checkboxes,children:[(0,r.jsx)(i.S,{label:"Sustainability, Social Innovation",checked:o.interest_sustainability_social_innovation,onCheckedChange:e=>a({...o,interest_sustainability_social_innovation:!!e})}),(0,r.jsx)(i.S,{label:"Gaming",checked:o.interest_gaming,onCheckedChange:e=>a({...o,interest_gaming:!!e})}),(0,r.jsx)(i.S,{label:"Healthcare and Fitness",checked:o.interest_healthcare_fitness,onCheckedChange:e=>a({...o,interest_healthcare_fitness:!!e})}),(0,r.jsx)(i.S,{label:"AI",checked:o.interest_ai,onCheckedChange:e=>a({...o,interest_ai:!!e})}),(0,r.jsx)(i.S,{label:"Robotics",checked:o.interest_robotics,onCheckedChange:e=>a({...o,interest_robotics:!!e})}),(0,r.jsx)(i.S,{label:"Fashion and Wearables",checked:o.interest_fashion_
1wearables,onCheckedChange:e=>a({...o,interest_fashion_wearables:!!e})}),(0,r.jsx)(i.S,{label:"PRO / Industrial",checked:o.interest_pro_industrial,onCheckedChange:e=>a({...o,interest_pro_industrial:!!e})}),(0,r.jsx)(i.S,{label:"Agriculture and gardening",checked:o.interest_agriculture_gardening,onCheckedChange:e=>a({...o,interest_agriculture_gardening:!!e})}),(0,r.jsx)(i.S,{label:"Education",checked:o.interest_education,onCheckedChange:e=>a({...o,interest_education:!!e})}),(0,r.jsx)(i.S,{label:"Art, Music and Design",checked:o.interest_art_music_design,onCheckedChange:e=>a({...o,interest_art_music_design:!!e})}),(0,r.jsx)(i.S,{label:"Home Automation",checked:o.interest_home_automation,onCheckedChange:e=>a({...o,interest_home_automation:!!e})})]})]}),(0,r.jsx)(tz,{items:(n||[]).map(({name:e})=>({value:e,label:e})),value:null!=s?s:null,onValueChange:e=>c(null!=e?e:void 0),size:"small",inputProps:{placeholder:"Select your country (optional)"}})]}),(0,r.jsxs)(l.wi,{children:[(0,r.jsx)(tU.$,{variant:"secondary",onClick:()=>e({survey:{},country:""}),children:"Skip survey"}),(0,r.jsx)(tU.$,{onClick:()=>e({survey:o,country:s}),children:"Subscribe"})]})]})}},36930:(e,t,n)=>{n.d(t,{u:()=>o});var r=n(53239);let l={enabled:!0,cacheTime:0,initialData:void 0},i=new Map,o=(e,t,n)=>{let o=(0,r.useRef)(),[u,a]=(0,r.useState)("stale"),[s,c]=(0,r.useState)(null==n?void 0:n.initialData),d=(0,r.useMemo)(()=>"string"==typeof e?e:e.join("/"),[e]),{enabled:p,cacheTime:f}={...l,...n};return o.current=t,(0,r.useEffect)(()=>{var e;p&&(f===1/0&&i.has(d)?c(i.get(d)):(a("loading"),null==(e=o.current)||e.call(o).then(e=>{c(e),a("done"),i.set(d,e)}).catch(()=>a("error"))))},[d,p,f]),{loading:"loading"===u,error:"error"===u,data:s}}},56610:(e,t,n)=>{n.d(t,{d:()=>i});var r=n(59815),l=n(60527);function i(e){return"starting"===e?r.K2:l.t0}}}]);

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.