1import{Body as Tt,Button as Et,ButtonWithIcon as ht,Cell as _t,FocusTrap as Pt,Head as Mt,Heading as Dt,Icon as St,IconSelector as wt,LanguagePicker as Nt,Modal as Ot,ModalContext as kt,Nav as Ht,Option as Ft,OverlayMask as Bt,Picker as Vt,Provider as Kt,Row as zt,SidePanel as Ut,SidePanelWithDrilldown as Wt,Table as Gt,Text as jt,TextHighlight as Xt,TreeView as Yt,VerticalBar as $t,VerticalNav as qt,__EXPERIMENTAL_MENU as Jt,__NOT_PUBLIC_COLLECTION as ve,__NOT_PUBLIC_LIVE_ANNOUNCER as Ae,useModal as Qt,useProvider as Zt}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$core.js";import{Align as no,DropDown as ro,ClayDropDownWithItems as ao,ClayDropDownWithDrilldown as io}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$drop-down.js";import rt from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$drop-down.js";var P=rt;import{ClayCheckbox as mo,ClayInput as x,ClayDualListBox as po,ClayRadio as fo,ClayRadioGroup as Io,ClaySelect as go,ClaySelectBox as Co,ClaySelectWithOption as yo,ClayToggle as Lo}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$form.js";import so from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$form.js";import{}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$loading-indicator.js";import at from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$loading-indicator.js";var H=at;import{FocusScope as Re,Keys as C,LinkOrButton as To,MouseSafeArea as Eo,Overlay as Te,PanelResizer as ho,ClayPortal as _o,delegate as Po,doAlign as Mo,getEllipsisItems as Do,getLocatorValue as se,observeRect as So,isMac as wo,isIPhone as No,isIPad as Oo,isIOS as ko,isAppleDevice as Ee,setElementFullHeight as Ho,stack as Fo,sub as q,throttle as Bo,useControlledState as J,useDebounce as he,useFocusManagement as Vo,FOCUSABLE_ELEMENTS as Ko,useHover as _e,useId as Pe,useInteractionFocus as Me,useFocusVisible as zo,useIsFirstRender as De,useIsMobileDevice as Uo,useMousePosition as Wo,useNavigation as Se,isTypeahead as Go,getFocusableList as jo,useOverlayPosition as we,usePrevious as Xo}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$shared.js";import{}from"../../../frontend-js-react-web/__liferay__/exports/classnames.js";import it from"../../../frontend-js-react-web/__liferay__/exports/classnames.js";var Q=it;import{Children as en,Component as tn,Fragment as on,Profiler as nn,PureComponent as rn,StrictMode as an,Suspense as ln,__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED as sn,cloneElement as un,createContext as ue,createElement as cn,createFactory as mn,createRef as pn,forwardRef as fn,isValidElement as dn,lazy as In,memo as gn,startTransition as Cn,unstable_act as yn,useCallback as T,useContext as Ne,useDebugValue as Ln,useDeferredValue as xn,useEffect as N,useId as bn,useImperativeHandle as vn,useInsertionEffect as An,useLayoutEffect as Rn,useMemo as Oe,useReducer as Tn,useRef as A,useState as ke,useSyncExternalStore as En,useTransition as hn,version as _n}from"../../../frontend-js-react-web/__liferay__/exports/react.js";import lt from"../../../frontend-js-react-web/__liferay__/exports/react.js";var e=lt;var E=ue({});E.displayName="ClayAutocompleteLegacyContext";var ce=ue({});function me(){return Ne(ce)}import{simpleFilter as Nn,test as On,match as kn,filter as Hn}from"../../../frontend-js-dependencies-web/__liferay__/exports/fuzzy.js";import st from"../../../frontend-js-dependencies-web/__liferay__/exports/fuzzy.js";var pe=st;var He={post:"|}",pre:"}|"},ut=e.forwardRef(function({children:o,className:r,disabled:i,highlightMatch:s=!0,innerRef:l,keyValue:a,match:m="",textValue:f,value:u,...L},d){let{activeDescendant:I,onActiveDescendant:B,selectedKeys:M}=me(),{isFocusVisible:Z}=Me(),O=Z(),V=(a&&M?.includes(a))??!1,ee=_e({disabled:i,onHover:T(()=>!O&&a&&B(a),[a,O])}),W=f??u??String(o),K=pe.match(m,W,He);return e.createElement(P.Item,{...L,...ee,...V?{active:V}:{},...V?{symbolLeft:"check-small"}:{},className:Q(r,{focus:I===a&&O,hover:I===a&&!O}),id:String(a),innerRef:l,ref:d,tabIndex:-1},s&&m&&K&&typeof o=="string"?K.rendered.split("|").map((b,te)=>{let G=b.includes("}")?"span":"strong",v=b.replace(/\}/g,"");return v?e.createElement(G,{className:b.includes("}")?void 0:"mark",key:te},v):null}
1).filter(Boolean):o??W)}),ct=e.forwardRef(function({children:o,innerRef:r,match:i="",value:s,...l},a){let m=s??String(o),f=pe.match(i,m,He);return e.createElement(P.Item,{...l,innerRef:r,ref:a},i&&f?f.rendered.split("|").map((u,L)=>{let d=u.includes("}")?"span":"strong",I=u.replace(/\}/g,"");return I?e.createElement(d,{key:L},I):null}).filter(Boolean):m)}),Fe=e.forwardRef(({children:n,match:o="",...r},i)=>{let{onActiveDescendant:s}=me();return e.createElement(s?ut:ct,{match:o,...r,ref:i},n)});Fe.displayName="Item";var F=Fe;import{DataProvider as $n,FetchPolicy as qn,NetworkStatus as fe,useResource as Jn}from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$data-provider.js";import jn from"../../../frontend-js-clay-web/__liferay__/exports/@clayui$data-provider.js";function Be({active:n,announcer:o,collection:r,loadingState:i=fe.Unused,messages:s,onLoadMore:l}){let a=r.getSize(),m=!!l,f=i<fe.Unused,u=A(m),L=A(null);return N(()=>{if(n){if(f)o.current?.announce(s.infiniteScrollOnLoad),L.current=null;else if(L.current!==a){let I=u.current?s.infiniteScrollInitialLoad:s.infiniteScrollOnLoaded,B=u.current?s.infiniteScrollInitialLoadPlural:s.infiniteScrollOnLoadedPlural,M=q(a===1?I:B,[a]);o.current?.announce(M),L.current=a,u.current=!1}}else u.current=m},[n,f,a]),T(()=>m&&f?e.createElement(H,{className:"my-2",size:"sm"}):null,[m,f])}var{Collection:mt,useCollection:pt,useVirtual:ft}=ve,{LiveAnnouncer:dt}=Ae,It=e.forwardRef(function({children:o,...r},i){return e.createElement("ul",{...r,className:"list-unstyled",ref:i},o)});function Ve(n,o,r){return n.find(i=>se({item:i,locator:r})===o)}var gt=/[.*+?^${}()|[\]\\]/g,Ct={infiniteScrollInitialLoad:"{0} item loaded. Reach the last item to load more.",infiniteScrollInitialLoadPlural:"{0} items loaded. Reach the last item to load more.",infiniteScrollOnLoad:"Loading more items.",infiniteScrollOnLoaded:"{0} item loaded.",infiniteScrollOnLoadedPlural:"{0} items loaded.",listCount:"{0} option available.",listCountPlural:"{0} options available.",loading:"Loading...",notFound:"No results found"};function yt({UNSAFE_loadingShrink:n,active:o,alignmentByViewport:r,allowsCustomValue:i,as:s=x,children:l,containerElementRef:a,defaultActive:m,defaultItems:f,defaultValue:u,direction:L="bottom",estimateSize:d,filterKey:I,items:B,loadingState:M,menuTrigger:Z="input",messages:O,onActiveChange:V,onChange:ee,onItemsChange:W,onLoadMore:K,primaryAction:b,value:te,selectedKeys:G,...v},$e){let k={...Ct,...O??{}},[p,,oe]=J({defaultName:"defaultItems",defaultValue:f,handleName:"onItemsChange",name:"items",onChange:W,value:B}),[g="",z,qe]=J({defaultName:"defaultValue",defaultValue:u,handleName:"onChange",name:"value",onChange:ee,value:te}),[c,h]=J({defaultName:"defaultActive",defaultValue:m,handleName:"onActiveChange",name:"active",onChange:V,value:o}),Je=A(null),_=A(null),ne=A(!1),j=$e||Je,X=M!==void 0&&M===1,re=he(X,500),D=A(""),de=Pe(),Y=A(null),Qe=De(),ae=T(t=>t.match(new RegExp(g.replace(gt,"\\$&"),"i"))!==null,[g]);N(()=>{!i&&!D.current&&g&&p&&(Ve(p,g,I)&&(D.current=g),!I&&p.length&&typeof p[0]=="object"&&console.warn(`<Autocomplete />: the component is trying to validate that the initial value exists in the items, but it doesn't know which key to use for comparison. Define the key in 'filterKey' ('<Autocomplete filterKey="value" />').`))},[p]),N(()=>{if(!(Qe||i||!g)&&c===!1&&D.current!==g){if(!qe&&p&&Ve(p,g,I)){D.current=g;return}z(D.current)}},[c]);let Ie=Oe(()=>re?[]:oe?p?p?.filter(t=>!I&&typeof t=="object"?(console.warn(`<Autocomplete />: the component is trying to filter the list but it doesn't know which key to use for comparison. Define the key in 'filterKey' ('<Autocomplete filterKey="value" />'). option=`,t),!0):ae(se({item:t,locator:I})||t.toString())):[]:p??[],[re,oe,p,ae]),ge=l instanceof Function,Ce=b&&ge?["__PRIMARY_ACTION__",...Ie]:Ie,Ze=ft({estimateSize:d??37,items:Ce,parentRef:_}),ie=e.createElement(F,{...b,className:"text-primary","data-collection-no-filter":!0,highlightMatch:!1,key:"__PRIMARY_ACTION__",onClick:t=>{t.preventDefault(),b?.onClick&&b.onClick()}},b?.label),$=l;b&&(ge?$=(t,...R)=>t==="__PRIMARY_ACTION__"?ie:l(t,...R):Array.isArray(l)?$=[ie,...l]:$=[ie,l]);let S=pt({children:$,filter:oe?ae:void 0,filterKey:"value",itemContainer:T(({children:t,keyValue:R})=>{let xe=t.props.textValue??t.props.value??t.props.children;return e.cloneElement(t,{keyValue:R,match:String(g),onClick:be=>{t.props.onClick&&t.props.onClick(be),!be.defaultPrevented&&(h(!1),D.current=xe,z(xe),ne.current=!0,j.current?.focus())},roleItem:"option"})},[g]),items:Ce,notFound:e.createElement(P.Item,{"aria-disabled":"true",className:"disabled",roleItem:"option"},k.notFound),suppressTextValueWarning:!1,virtualizer:p?Ze:void 0}),[y,w]=ke("");we({alignmentByViewport:!0,alignmentPosition:L==="bottom"?5:7,autoBestAlign:!0,isOpen:c,ref:_,triggerRef:a},[c,l]);let{navigationProps:ye}=Se({activation:"manual",active:y,collection:S,containerRef:_,loop:!0,onNavigate:t=>w(t),orientation:"vertical",visible:c});N(()=>{!c&&y&&w("")},[c]);let le=S.getItems().length,Le=A(le),et=Be({active:c,announcer:Y,collection:S,loadingState:M,messages:k,onLoadMore:K});N(()=>
1{if(Y.current&&c&&(!y||Ee()||le!==Le.current)){let t=S.getItems().length;Y.current.announce(q(t===1?k.listCount:k.listCountPlural,[t]))}Le.current=le},[c,g]);let tt=T(()=>h(!1),[]),ot=T(()=>{if(_.current&&y){let t=document.getElementById(String(y));t&&t.click()}},[y]),nt=n?x.GroupItem:x.GroupInsetItem;return e.createElement(e.Fragment,null,e.createElement(dt,{ref:Y}),e.createElement(s,{...v,"aria-activedescendant":c?String(y):void 0,"aria-autocomplete":"list","aria-controls":de,"aria-expanded":c,autoComplete:"off",autoCorrect:"off",insetAfter:X,onChange:t=>{let{value:R}=t.target;R||(D.current=R),p!==null&&h(!0),z(R),y&&w("")},onFocus:t=>{if(v.onFocus&&v.onFocus(t),Z==="focus"&&p!==null){if(ne.current){ne.current=!1;return}h(!0)}},onKeyDown:t=>{switch(v.onKeyDown&&v.onKeyDown(t),t.key){case C.Tab:case C.Esc:{h(!1);break}case C.Enter:{h(!1),c&&y&&ot(),!c&&t.key===C.Esc&&z("");break}case C.Home:case C.End:{w("");break}case C.Left:case C.Right:{y&&w("");break}case C.Up:case C.Down:{if(t.preventDefault(),!c&&t.altKey&&t.key===C.Down&&p!==null){t.stopPropagation(),h(!0);return}if(!y){let R=t.key===C.Down?S.getFirstItem():S.getLastItem();w(R.key)}if(!c&&p!==null)return h(!0);ye.onKeyDown(t);break}default:ye.onKeyDown(t);break}},ref:j,role:"combobox",spellCheck:!1,value:g}),c&&e.createElement(Te,{isCloseOnInteractOutside:!0,isKeyboardDismiss:!0,isOpen:!0,menuRef:_,onClose:tt,portalRef:_,suppress:[_,j],triggerRef:j},e.createElement("div",{className:Q("dropdown-menu dropdown-menu-select show",{"dropdown-menu-indicator-start":!!G}),ref:_,role:"presentation",style:{maxWidth:"none",width:`${a.current?.clientWidth}px`}},e.createElement(ce.Provider,{value:{activeDescendant:y,onActiveDescendant:w,onClick:z,selectedKeys:G}},e.createElement(mt,{"aria-label":v["aria-label"],"aria-labelledby":v["aria-labelledby"],as:It,collection:S,id:de,isLoading:X,onLoadMore:K,role:"listbox"},re?e.createElement(P.Item,{"aria-disabled":"true",className:"disabled",roleItem:"option"},k.loading):l)),e.createElement(et,null))),X&&e.createElement(nt,{after:n?void 0:!0,"aria-label":k.loading,"aria-valuemax":100,"aria-valuemin":0,role:"progressbar",shrink:n},e.createElement("span",{className:"inline-item inline-item-middle"},e.createElement(H,{size:"sm"}))))}var U=e.forwardRef(yt);U.displayName="Autocomplete";function Ke({active:n=!1,alignElementRef:o,alignmentByViewport:r,children:i,closeOnClickOutside:s,onActiveChange:l,onSetActive:a}){let{containerElementRef:m}=e.useContext(E),f=e.useRef(null);o||(o=m);let u=o.current&&o.current.clientWidth;return e.createElement(P.Menu,{active:n,alignElementRef:o,alignmentByViewport:r,autoBestAlign:!!r,className:"autocomplete-dropdown-menu",closeOnClickOutside:s,onActiveChange:l??a,ref:f,style:{maxWidth:"none",width:`${u}px`},triggerRef:o},i)}Ke.displayName="ClayAutocompleteDropDown";var ze=Ke;var Ue=e.forwardRef((n,o)=>{let{loading:r}=e.useContext(E);return e.createElement(x,{...n,insetAfter:r,ref:o})});Ue.displayName="ClayAutocompleteInput";var We=Ue;function Lt({children:n,...o}){return e.createElement(x.GroupInsetItem,{...o,after:!0},e.createElement("span",{className:"inline-item inline-item-middle"},n))}function xt({className:n,component:o=Lt,...r}){let{onLoadingChange:i}=e.useContext(E);return e.useEffect(()=>(i(!0),()=>{i(!1)}),[]),e.createElement(o,{...r,className:n},e.createElement(H,{small:!0}))}var Ge=xt;var je=e.forwardRef(({children:n,...o},r)=>e.createElement(x.Group,{...o,ref:r},e.createElement(x.GroupItem,null,n)));je.displayName="ClayAutocompleteMarkup";function bt(n){return!n||typeof n=="function"?[]:(e.Children.map(n,r=>!!(e.isValidElement(r)&&r.type.displayName==="Item"))||[]).filter(Boolean)}var vt=e.forwardRef(function({children:o,className:r,component:i=je,...s},l){let a=e.useRef(null),[m,f]=e.useState(!1),u=bt(o).length>=1||o instanceof Function,L=u?e.Fragment:Re;return e.createElement(L,null,e.createElement(i,{...u?{}:s,className:r,ref:d=>{d&&(a.current=d,typeof l=="function"?l(d):l!==null&&(l.current=d))}},u?e.createElement(U,{containerElementRef:a,...s},o):e.createElement(E.Provider,{value:{containerElementRef:a,loading:m,onLoadingChange:d=>f(d)}},o)))}),Xe=Object.assign(vt,{DropDown:ze,Input:We,Item:F,LoadingIndicator:Ge});var Ye=Xe;var Wr=Ye;export{U as Autocomplete,F as Item,Wr as default}; 2//# sourceMappingURL=@clayui$autocomplete.(MDZ6TWSX).js.map
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.