1"use strict";(self.webpackChunk_N_E=self.webpackChunk_N_E||[]).push([[206],{44206:(e,r,n)=>{n.r(r),n.d(r,{RosenTreeDropdown:()=>C});var l=n(37876),t=n(14232),u=n(65400),o=n(74134),c=n.n(o),s=n(41946),a=n.n(s),i=n(80782),d=n.n(i),h=n(29832),p=n(29102);let f=(e,r)=>e.reduce((e,n)=>(n.value===r&&(n.checked=!0),[...e,{...n,...n.children&&n.children.length>0?{children:f(n.children,r)}:{}}]),[]),k=t.memo(function(e){let r,{options:n,value:t,onChange:u,onBlur:o,onFocus:s,onNodeToggle:a}=e,i=(r=[...n],t.forEach(e=>{r=f(n,e)}),r);return(0,l.jsx)(c(),{className:"rosen-dropdown",data:i,onChange:u,onFocus:s,onBlur:o,onNodeToggle:a})},(e,r)=>a()(e.options,r.options)&&a()(e.value,r.value)),C=t.forwardRef(function(e,r){let{options:n,value:o,onSelect:c,onReset:s}=e,[a,i]=(0,t.useState)(0),[f,C]=(0,t.useState)(!1),[b,v]=(0,t.useState)(o),g=(0,t.useRef)(null),w=(0,t.useRef)(!1),m=(0,t.useRef)([]),y=(0,t.useCallback)(d()(()=>{C(!1),w.current||c(m.current),w.current=!1},500,{trailing:!1}),[c]),N=(0,t.useCallback)(()=>{setTimeout(()=>{if(g.current){let e=g.current.querySelector(".dropdown-content");if(e){let{height:r}=(0,h.eD)(g.current),{height:n}=(0,h.eD)(e);i(r+n)}}},0)},[]),j=(0,t.useCallback)(()=>{C(!0),N()},[N]),x=(0,t.useCallback)((e,r)=>{m.current=r},[]),R=(0,t.useCallback)(()=>{w.current=!0,m.current=[],v([]),s()},[s]),S=(0,t.useCallback)(d()(()=>{w.current=!0,c(m.current)},500,{trailing:!1}),[c]);return(0,p.h)(()=>{v(o)},[o]),(0,l.jsxs)("div",{className:"rosen-dropdown-wrapper",ref:e=>{g.current=e,"function"==typeof r?r(e):null!==r&&(r.current=e)},children:[(0,l.jsx)(k,{options:n,value:b,onChange:x,onBlur:y,onFocus:j,onNodeToggle:N}),f&&(0,l.jsxs)("div",{className:"rosen-dropdown-buttons",style:{to
1p:a,visibility:a?"visible":"hidden"},children:[(0,l.jsx)(u.A,{onClick:R,variant:"tertiary",children:"Clear"}),(0,l.jsx)(u.A,{onClick:S,variant:"primary",children:"Apply"})]})]})})}}]);
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.