1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[165],{3165:function(e,t,o){let n,r,a,i;o.d(t,{h:function(){return Z}});var l=o(7294),u=o(372),c=o(3285),s=o(3),d=o(4924),p=o(1378),b=o(5508),f=o(2196),v=o(961),m=o(1813),x=o(8961),R=o(4176),g=o(3580),O=o(8287),C=o(4480),T=o(8844),I=o(9732),S=o(8657),h=o(7524),P=o(4358),E=o(933),y=o(6451),M=o(7543),k=o(1592),z=o(7253),D=((n=D||{})[n.Open=0]="Open",n[n.Closed=1]="Closed",n),F=((r=F||{})[r.Single=0]="Single",r[r.Multi=1]="Multi",r),A=((a=A||{})[a.Pointer=0]="Pointer",a[a.Other=1]="Other",a),w=((i=w||{})[i.OpenCombobox=0]="OpenCombobox",i[i.CloseCombobox=1]="CloseCombobox",i[i.GoToOption=2]="GoToOption",i[i.RegisterOption=3]="RegisterOption",i[i.UnregisterOption=4]="UnregisterOption",i[i.RegisterLabel=5]="RegisterLabel",i);function L(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e,o=null!==e.activeOptionIndex?e.options[e.activeOptionIndex]:null,n=(0,S.z2)(t(e.options.slice()),e=>e.dataRef.current.domRef.current),r=o?n.indexOf(o):null;return -1===r&&(r=null),{options:n,activeOptionIndex:r}}let _={1(e){var t;return null!=(t=e.dataRef.current)&&t.disabled||1===e.comboboxState?e:{...e,activeOptionIndex:null,comboboxState:1}},0(e){var t;if(null!=(t=e.dataRef.current)&&t.disabled||0===e.comboboxState)return e;let o=e.activeOptionIndex;if(e.dataRef.current){let{isSelected:t}=e.dataRef.current,n=e.options.findIndex(e=>t(e.dataRef.current.value));-1!==n&&(o=n)}return{...e,comboboxState:0,activeOptionIndex:o}},2(e,t){var o,n,r,a;if(null!=(o=e.dataRef.current)&&o.disabled||null!=(n=e.dataRef.current)&&n.optionsRef.current&&!(null!=(r=e.dataRef.current)&&r.optionsPropsRef.current.static)&&1===e.comboboxState)return e;let i=L(e);if(null===i.activeOptionIndex){let e=i.options.findIndex(e=>!e.dataRef.current.disabled);-1!==e&&(i.activeOptionIndex=e)}let l=(0,R.d)(t,{resolveItems:()=>i.options,resolveActiveIndex:()=>i.activeOptionIndex,resolveId:e=>e.id,resolveDisabled:e=>e.dataRef.current.disabled});return{...e,...i,activeOptionIndex:l,activationTrigger:null!=(a=t.trigger)?a:1}},3:(e,t)=>{var o,n;let r={id:t.id,dataRef:t.dataRef},a=L(e,e=>[...e,r]);null===e.activeOptionIndex&&null!=(o=e.dataRef.current)&&o.isSelected(t.dataRef.current.value)&&(a.activeOptionIndex=a.options.indexOf(r));let i={...e,...a,activationTrigger:1};return null!=(n=e.dataRef.current)&&n.__demoMode&&void 0===e.dataRef.current.value&&(i.activeOptionIndex=0),i},4:(e,t)=>{let o=L(e,e=>{let o=e.findIndex(e=>e.id===t.id);return -1!==o&&e.splice(o,1),e});return{...e,...o,activationTrigger:1}},5:(e,t)=>({...e,labelId:t.id})},N=(0,l.createContext)(null);function V(e){let t=(0,l.useContext)(N);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Combobox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,V),t}return t}N.displayName="ComboboxActionsContext";let q=(0,l.createContext)(null);function B(e){let t=(0,l.useContext)(q);if(null===t){let t=Error("<".concat(e," /> is missing a parent <Combobox /> component."));throw Error.captureStackTrace&&Error.captureStackTrace(t,B),t}return t}function Y(e,t){return(0,T.E)(t.type,_,e,t)}q.displayName="ComboboxDataContext";let G=l.Fragment,K=O.AN.RenderStrategy|O.AN.Static,U=(0,O.yV)(function(e,t){let{value:o,defaultValue:n,onChange:r,form:a,name:i,by:u=(e,t)=>e===t,disabled:d=!1,__demoMode:b=!1,nullable:v=!1,multiple:m=!1,...x}=e,[g=m?[]:void 0,C]=(0,y.q)(o,r,n),[S,E]=(0,l.useReducer)(Y,{dataRef:(0,l.createRef)(),comboboxState:b?0:1,options:[],activeOptionIndex:null,activationTrigger:1,labelId:null}),M=(0,l.useRef)(!1),k=(0,l.useRef)({static:!1,hold:!1}),z=(0,l.useRef)(null),D=(0,l.useRef)(null),F=(0,l.useRef)(null),A=(0,l.useRef)(null),w=(0,s.z)("string"==typeof u?(e,t)=>(null==e?void 0:e[u])===(null==t?void 0:t[u]):u),L=(0,l.useCallback)(e=>(0,T.E)(_.mode,{1:()=>g.some(t=>w(t,e)),0:()=>w(g,e)}),[g]),_=(0,l.useMemo)(()=>({...S,optionsPropsRef:k,labelRef:z,inputRef:D,buttonRef:F,optionsRef:A,value:g,defaultValue:n,disabled:d,mode:m?1:0,get activeOptionIndex(){if(M.current&&null===S.activeOptionIndex&&S.options.length>0){let e=S.options.findIndex(e=>!e.dataRef.current.disabled);if(-1!==e)return e}return S.activeOptionIndex},compare:w,isSelected:L,nullable:v,__demoMode:b}),[g,n,d,m,v,b,S]),V=(0,l.useRef)(null!==_.activeOptionIndex?_.options[_.activeOptionIndex]:null);(0,l.useEffect)(()=>{let e=null!==_.activeOptionIndex?_.options[_.activeOptionIndex]:null;V.current!==e&&(V.current=e)}),(0,p.e)(()=>{S.dataRef.current=_},[_]),(0,f.O)([_.buttonRef,_.inputRef,_.optionsRef],()=>X.closeCombobox(),0===_.comboboxState);let B=(0,l.useMemo)(()=>({open:0===_.comboboxState,disabled:d,activeIndex:_.activeOptionIndex,activeOption:null===_.activeOptionIndex?null:_.options[_.activeOptionIndex].dataRef.current.value,value:g}),[_,d,g]),K=(0,s.z)(e=>{let t=_.options.find(t=>
1t.id===e);t&&Q(t.dataRef.current.value)}),U=(0,s.z)(()=>{if(null!==_.activeOptionIndex){let{dataRef:e,id:t}=_.options[_.activeOptionIndex];Q(e.current.value),X.goToOption(R.T.Specific,t)}}),j=(0,s.z)(()=>{E({type:0}),M.current=!0}),Z=(0,s.z)(()=>{E({type:1}),M.current=!1}),H=(0,s.z)((e,t,o)=>(M.current=!1,e===R.T.Specific?E({type:2,focus:R.T.Specific,id:t,trigger:o}):E({type:2,focus:e,trigger:o}))),J=(0,s.z)((e,t)=>(E({type:3,id:e,dataRef:t}),()=>{var t;(null==(t=V.current)?void 0:t.id)===e&&(M.current=!0),E({type:4,id:e})})),W=(0,s.z)(e=>(E({type:5,id:e}),()=>E({type:5,id:null}))),Q=(0,s.z)(e=>(0,T.E)(_.mode,{0:()=>null==C?void 0:C(e),1(){let t=_.value.slice(),o=t.findIndex(t=>w(t,e));return -1===o?t.push(e):t.splice(o,1),null==C?void 0:C(t)}})),X=(0,l.useMemo)(()=>({onChange:Q,registerOption:J,registerLabel:W,goToOption:H,closeCombobox:Z,openCombobox:j,selectActiveOption:U,selectOption:K}),[]),$=(0,l.useRef)(null),ee=(0,c.G)();return(0,l.useEffect)(()=>{$.current&&void 0!==n&&ee.addEventListener($.current,"reset",()=>{Q(n)})},[$,Q]),l.createElement(N.Provider,{value:X},l.createElement(q.Provider,{value:_},l.createElement(P.up,{value:(0,T.E)(_.comboboxState,{0:P.ZM.Open,1:P.ZM.Closed})},null!=i&&null!=g&&(0,I.t)({[i]:g}).map((e,t)=>{let[o,n]=e;return l.createElement(h._,{features:h.A.Hidden,ref:0===t?e=>{var t;$.current=null!=(t=null==e?void 0:e.closest("form"))?t:null}:void 0,...(0,O.oA)({key:o,as:"input",type:"hidden",hidden:!0,readOnly:!0,form:a,name:o,value:n})})}),(0,O.sY)({ourProps:null===t?{}:{ref:t},theirProps:x,slot:B,defaultTag:G,name:"Combobox"}))))}),j=(0,O.yV)(function(e,t){var o;let n=B("Combobox.Button"),r=V("Combobox.Button"),a=(0,m.T)(n.buttonRef,t),i=(0,d.M)(),{id:p="headlessui-combobox-button-".concat(i),...b}=e,f=(0,c.G)(),x=(0,s.z)(e=>{switch(e.key){case E.R.ArrowDown:return e.preventDefault(),e.stopPropagation(),1===n.comboboxState&&r.openCombobox(),f.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})});case E.R.ArrowUp:return e.preventDefault(),e.stopPropagation(),1===n.comboboxState&&(r.openCombobox(),f.nextFrame(()=>{n.value||r.goToOption(R.T.Last)})),f.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})});case E.R.Escape:return 0!==n.comboboxState?void 0:(e.preventDefault(),n.optionsRef.current&&!n.optionsPropsRef.current.static&&e.stopPropagation(),r.closeCombobox(),f.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})}
1));default:return}}),g=(0,s.z)(e=>{if((0,C.P)(e.currentTarget))return e.preventDefault();0===n.comboboxState?r.closeCombobox():(e.preventDefault(),r.openCombobox()),f.nextFrame(()=>{var e;return null==(e=n.inputRef.current)?void 0:e.focus({preventScroll:!0})})}),T=(0,u.v)(()=>{if(n.labelId)return[n.labelId,p].join(" ")},[n.labelId,p]),I=(0,l.useMemo)(()=>({open:0===n.comboboxState,disabled:n.disabled,value:n.value}),[n]),S={ref:a,id:p,type:(0,v.f)(e,n.buttonRef),tabIndex:-1,"aria-haspopup":"listbox","aria-controls":null==(o=n.optionsRef.current)?void 0:o.id,"aria-expanded":0===n.comboboxState,"aria-labelledby":T,disabled:n.disabled,onClick:g,onKeyDown:x};return(0,O.sY)({ourProps:S,theirProps:b,slot:I,defaultTag:"button",name:"Combobox.Button"})}),Z=Object.assign(U,{Input:(0,O.yV)(function(e,t){var o,n,r,a,i;let p=(0,d.M)(),{id:b="headlessui-combobox-input-".concat(p),onChange:f,displayValue:v,type:x="text",...g}=e,C=B("Combobox.Input"),I=V("Combobox.Input"),S=(0,m.T)(C.inputRef,t),h=(0,l.useRef)(!1),P=(0,c.G)(),y="function"==typeof v&&void 0!==C.value?null!=(i=v(C.value))?i:"":"string"==typeof C.value?C.value:"";(0,M.q)((e,t)=>{let[o,n]=e,[r,a]=t;if(h.current)return;let i=C.inputRef.current;i&&((0===a&&1===n||o!==r)&&(i.value=o),requestAnimationFrame(()=>{if(h.current||!i)return;let{selectionStart:e,selectionEnd:t}=i;0===Math.abs((null!=t?t:0)-(null!=e?e:0))&&0===e&&i.setSelectionRange(i.value.length,i.value.length)}))},[y,C.comboboxState]),(0,M.q)((e,t)=>{let[o]=e,[n]=t;if(0===o&&1===n){if(h.current)return;let e=C.inputRef.current;if(!e)return;let t=e.value,{selectionStart:o,selectionEnd:n,selectionDirection:r}=e;e.value="",e.value=t,null!==r?e.setSelectionRange(o,n,r):e.setSelectionRange(o,n)}},[C.comboboxState]);let k=(0,l.useRef)(!1),z=(0,s.z)(()=>{k.current=!0}),D=(0,s.z)(()=>{P.nextFrame(()=>{k.current=!1})}),F=(0,s.z)(e=>{switch(h.current=!0,e.key){case E.R.Backspace:case E.R.Delete:if(0!==C.mode||!C.nullable)return;let t=e.currentTarget;P.requestAnimationFrame(()=>{""===t.value&&(I.onChange(null),C.optionsRef.current&&(C.optionsRef.current.scrollTop=0),I.goToOption(R.T.Nothing))});break;case E.R.Enter:if(h.current=!1,0!==C.comboboxState||k.current)return;if(e.preventDefault(),e.stopPropagation(),null===C.activeOptionIndex){I.closeCombobox();return}I.selectActiveOption(),0===C.mode&&I.closeCombobox();break;case E.R.ArrowDown:return h.current=!1,e.preventDefault(),e.stopPropagation(),(0,T.E)(C.comboboxState,{0:()=>{I.goToOption(R.T.Next)},1:()=>{I.openCombobox()}});case E.R.ArrowUp:return h.current=!1,e.preventDefault(),e.stopPropagation(),(0,T.E)(C.comboboxState,{0:()=>{I.goToOption(R.T.Previous)},1:()=>{I.openCombobox(),P.nextFrame(()=>{C.value||I.goToOption(R.T.Last)})}});case E.R.Home:if(e.shiftKey)break;return h.current=!1,e.preventDefault(),e.stopPropagation(),I.goToOption(R.T.First);case E.R.PageUp:return h.current=!1,e.preventDefault(),e.stopPropagation(),I.goToOption(R.T.First);case E.R.End:if(e.shiftKey)break;return h.current=!1,e.preventDefault(),e.stopPropagation(),I.goToOption(R.T.Last);case E.R.PageDown:return h.current=!1,e.preventDefault(),e.stopPropagation(),I.goToOption(R.T.Last);case E.R.Escape:return h.current=!1,0!==C.comboboxState?void 0:(e.preventDefault(),C.optionsRef.current&&!C.optionsPropsRef.current.static&&e.stopPropagation(),I.closeCombobox());case E.R.Tab:if(h.current=!1,0!==C.comboboxState)return;0===C.mode&&I.selectActiveOption(),I.closeCombobox()}}),A=(0,s.z)(e=>{null==f||f(e),I.openCombobox()}),w=(0,s.z)(()=>{h.current=!1}),L=(0,u.v)(()=>{if(C.labelId)return[C.labelId].join(" ")},[C.labelId]),_=(0,l.useMemo)(()=>({open:0===C.comboboxState,disabled:C.disabled}),[C]),N={ref:S,id:b,role:"combobox",type:x,"aria-controls":null==(o=C.optionsRef.current)?void 0:o.id,"aria-expanded":0===C.comboboxState,"aria-activedescendant":null===C.activeOptionIndex||null==(n=C.options[C.activeOptionIndex])?void 0:n.id,"aria-labelledby":L,"aria-autocomplete":"list",defaultValue:null!=(a=null!=(r=e.defaultValue)?r:void 0!==C.defaultValue?null==v?void 0:v(C.defaultValue):null)?a:C.defaultValue,disabled:C.disabled,onCompositionStart:z,onCompositionEnd:D,onKeyDown:F,onChange:A,onBlur:w};return(0,O.sY)({ourProps:N,theirProps:g,slot:_,defaultTag:"input",name:"Combobox.Input"})}),Button:j,Label:(0,O.yV)(function(e,t){let o=(0,d.M)(),{id:n="headlessui-combobox-label-".concat(o),...r}=e,a=B("Combobox.Label"),i=V("Combobox.Label"),u=(0,m.T)(a.labelRef,t);(0,p.e)(()=>i.registerLabel(n),[n]);let c=(0,s.z)(()=>{var e;return null==(e=a.inputRef.current)?void 0:e.focus({preventScroll:!0})}),b=(0,l.useMemo)(()=>({open:0===a.comboboxState,disabled:a.disabled}),[a]);return(0,O.sY)({ourProps:{ref:u,id:n,onClick:c},theirProps:r,slot:b,defaultTag:"label",name:"Combobox.Label"})}),Options:(0,O.yV)(function(e,t){let o=(0,d.M)(),{id:n="headlessui-combobox-options-".concat(o),hold:r=!1,...a}=e,i=B("Combobox.Options"),c=(0,m.T)(i.optionsRef,t),s=(0,P.oJ)(),b=null!==s?(s&P.ZM.Open)===P.ZM.Open:0===i.comboboxState;(0,p.e)(()=>{var t;i.optionsPropsRef.current.static=null!=(t=e.static)&&t},[i.optionsPropsRef,e.static]),(0,p.e)(()=>{i.optionsPropsRef.current.hold=r}
1,[i.optionsPropsRef,r]),function(e){let{container:t,accept:o,walk:n,enabled:r=!0}=e,a=(0,l.useRef)(o),i=(0,l.useRef)(n);(0,l.useEffect)(()=>{a.current=o,i.current=n},[o,n]),(0,p.e)(()=>{if(!t||!r)return;let e=(0,x.r)(t);if(!e)return;let o=a.current,n=i.current,l=Object.assign(e=>o(e),{acceptNode:o}),u=e.createTreeWalker(t,NodeFilter.SHOW_ELEMENT,l,!1);for(;u.nextNode();)n(u.currentNode)},[t,r,a,i])}({container:i.optionsRef.current,enabled:0===i.comboboxState,accept:e=>"option"===e.getAttribute("role")?NodeFilter.FILTER_REJECT:e.hasAttribute("role")?NodeFilter.FILTER_SKIP:NodeFilter.FILTER_ACCEPT,walk(e){e.setAttribute("role","none")}});let f=(0,u.v)(()=>{var e,t;return null!=(t=i.labelId)?t:null==(e=i.buttonRef.current)?void 0:e.id},[i.labelId,i.buttonRef.current]),v=(0,l.useMemo)(()=>({open:0===i.comboboxState}),[i]),R={"aria-labelledby":f,role:"listbox","aria-multiselectable":1===i.mode||void 0,id:n,ref:c};return(0,O.sY)({ourProps:R,theirProps:a,slot:v,defaultTag:"ul",features:K,visible:b,name:"Combobox.Options"})}),Option:(0,O.yV)(function(e,t){var o,n;let r=(0,d.M)(),{id:a="headlessui-combobox-option-".concat(r),disabled:i=!1,value:u,...c}=e,f=B("Combobox.Option"),v=V("Combobox.Option"),x=null!==f.activeOptionIndex&&f.options[f.activeOptionIndex].id===a,C=f.isSelected(u),T=(0,l.useRef)(null),I=(0,b.E)({disabled:i,value:u,domRef:T,textValue:null==(n=null==(o=T.current)?void 0:o.textContent)?void 0:n.toLowerCase()}),S=(0,m.T)(t,T),h=(0,s.z)(()=>v.selectOption(a));(0,p.e)(()=>v.registerOption(a,I),[I,a]);let P=(0,l.useRef)(!f.__demoMode);(0,p.e)(()=>{if(!f.__demoMode)return;let e=(0,g.k)();return e.requestAnimationFrame(()=>{P.current=!0}),e.dispose},[]),(0,p.e)(()=>{if(0!==f.comboboxState||!x||!P.current||0===f.activationTrigger)return;let e=(0,g.k)();return e.requestAnimationFrame(()=>{var e,t;null==(t=null==(e=T.current)?void 0:e.scrollIntoView)||t.call(e,{block:"nearest"})}),e.dispose},[T,x,f.comboboxState,f.activationTrigger,f.activeOptionIndex]);let E=(0,s.z)(e=>{if(i)return e.preventDefault();h(),0===f.mode&&v.closeCombobox(),(0,z.tq)()||requestAnimationFrame(()=>{var e;return null==(e=f.inputRef.current)?void 0:e.focus()})}),y=(0,s.z)(()=>{if(i)return v.goToOption(R.T.Nothing);v.goToOption(R.T.Specific,a)}),M=(0,k.g)(),D=(0,s.z)(e=>M.update(e)),F=(0,s.z)(e=>{M.wasMoved(e)&&(i||x||v.goToOption(R.T.Specific,a,0))}),A=(0,s.z)(e=>{M.wasMoved(e)&&(i||x&&(f.optionsPropsRef.current.hold||v.goToOption(R.T.Nothing)))}),w=(0,l.useMemo)(()=>({active:x,selected:C,disabled:i}),[x,C,i]);return(0,O.sY)({ourProps:{id:a,ref:S,role:"option",tabIndex:!0===i?void 0:-1,"aria-disabled":!0===i||void 0,"aria-selected":C,disabled:void 0,onClick:E,onFocus:y,onPointerEnter:D,onMouseEnter:D,onPointerMove:F,onMouseMove:F,onPointerLeave:A,onMouseLeave:A},theirProps:c,slot:w,defaultTag:"li",name:"Combobox.Option"})})})}}]);
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.