@mailstep/design-system 0.7.6-beta.4 → 0.7.6-beta.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json
CHANGED
|
@@ -5,6 +5,7 @@ type Props = {
|
|
|
5
5
|
options?: ColumnDefinition['filterOptions'];
|
|
6
6
|
value?: string | string[];
|
|
7
7
|
checkAllButton?: boolean;
|
|
8
|
+
isClearable?: boolean;
|
|
8
9
|
};
|
|
9
|
-
declare const SelectFilter: ({ onChange, isMulti, value, options, checkAllButton }: Props) => JSX.Element;
|
|
10
|
+
declare const SelectFilter: ({ onChange, isMulti, value, options, checkAllButton, isClearable }: Props) => JSX.Element;
|
|
10
11
|
export default SelectFilter;
|
|
@@ -5,7 +5,7 @@ import SingleSelect from '../../../../../Elements/SingleSelect';
|
|
|
5
5
|
import isArray from 'lodash/isArray';
|
|
6
6
|
var emptyValue = [];
|
|
7
7
|
var SelectFilter = function (_a) {
|
|
8
|
-
var onChange = _a.onChange, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton;
|
|
8
|
+
var onChange = _a.onChange, isMulti = _a.isMulti, value = _a.value, options = _a.options, checkAllButton = _a.checkAllButton, isClearable = _a.isClearable;
|
|
9
9
|
var handleOnMultiChange = useCallback(function (options) {
|
|
10
10
|
onChange === null || onChange === void 0 ? void 0 : onChange(!isArray(options) || !(options === null || options === void 0 ? void 0 : options.length) ? null : options.map(function (option) { return option.value; }));
|
|
11
11
|
}, [onChange]);
|
|
@@ -13,7 +13,7 @@ var SelectFilter = function (_a) {
|
|
|
13
13
|
return (_jsx(MultiSelect, { maxMenuHeight: 250, onChange: handleOnMultiChange, value: value || emptyValue, options: options, checkAllButton: checkAllButton, style: "gridFilter" }));
|
|
14
14
|
}
|
|
15
15
|
else {
|
|
16
|
-
return _jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter" });
|
|
16
|
+
return _jsx(SingleSelect, { maxMenuHeight: 250, onChange: onChange, value: value, options: options, style: "gridFilter", isClearable: isClearable });
|
|
17
17
|
}
|
|
18
18
|
};
|
|
19
19
|
export default SelectFilter;
|
package/ui/index.es.js
CHANGED
|
@@ -29363,12 +29363,13 @@ const Rve = /* @__PURE__ */ Qr(Nve), b3 = `_create_${Ive()}_`, Bve = iF(), jve =
|
|
|
29363
29363
|
isMulti: t,
|
|
29364
29364
|
value: r,
|
|
29365
29365
|
options: n,
|
|
29366
|
-
checkAllButton: i
|
|
29366
|
+
checkAllButton: i,
|
|
29367
|
+
isClearable: a
|
|
29367
29368
|
}) => {
|
|
29368
|
-
const
|
|
29369
|
-
e == null || e(!dQ(
|
|
29369
|
+
const o = pe((s) => {
|
|
29370
|
+
e == null || e(!dQ(s) || !(s != null && s.length) ? null : s.map((c) => c.value));
|
|
29370
29371
|
}, [e]);
|
|
29371
|
-
return t ? /* @__PURE__ */ p.jsx(Eve, { maxMenuHeight: 250, onChange:
|
|
29372
|
+
return t ? /* @__PURE__ */ p.jsx(Eve, { maxMenuHeight: 250, onChange: o, value: r || Fve, options: n, checkAllButton: i, style: "gridFilter" }) : /* @__PURE__ */ p.jsx(gP, { maxMenuHeight: 250, onChange: e, value: r, options: n, style: "gridFilter", isClearable: a });
|
|
29372
29373
|
}, Wve = () => [{
|
|
29373
29374
|
value: "",
|
|
29374
29375
|
label: Qe._({
|
package/ui/index.umd.js
CHANGED
|
@@ -2225,7 +2225,7 @@ In order to be iterable, non-array objects must have a [Symbol.iterator]() metho
|
|
|
2225
2225
|
`,Xfe=e=>{var n,i;const t=e.selectProps.value;return!e.selectProps.inputValue&&((n=e.data)==null?void 0:n.value)==((i=t[0])==null?void 0:i.value)?p.jsxs(p.Fragment,{children:[p.jsx(_r.components.MultiValue,{...e,children:e.children}),t.length>1?p.jsxs(Jfe,{children:["+",t.length-1]}):null]}):null},_fe=e=>{const{theme:t,isSelected:r,selectOption:n,children:i,data:a}=e,o=t.optionVariant=="checkbox",s=t.optionVariant=="toggle";return p.jsxs(_r.components.Option,{...e,children:[(o||s)&&p.jsxs(sE,{children:[o&&p.jsx(Dc,{checked:r,size:2,readOnly:!0}),s&&p.jsx(Lc,{name:"",onChange:n,checked:r,spaceAround:!1,variant:"grid"})]}),p.jsx("span",{className:"label","data-cy":`dropdownModalOption${a.index}`,children:i})]})},Qfe=G.div`
|
|
2226
2226
|
align-self: center;
|
|
2227
2227
|
display: flex;
|
|
2228
|
-
`,Kfe=e=>{const{menuIsOpen:t,name:r}=e.selectProps;return p.jsx(_r.components.DropdownIndicator,{...e,children:p.jsx(Qfe,{className:"chevron","data-cy":`${r}ChevronBtn`,children:t?p.jsx(T7,{width:"16px"}):p.jsx(P7,{width:"16px"})})})},qfe=e=>{const{name:t}=e.selectProps,r=t?`${t}Inp`:e.id;return p.jsx(_r.components.Input,{...e,"data-cy":r})},$fe={control:(e,{selectProps:t,theme:r,isFocused:n,isDisabled:i})=>{const a=r.colors;return{...e,borderColor:t.isInvalid?a.primary:n?a.inputTextColor:a.inputBorderColor,backgroundColor:i?a.menuHoverBackgroundColor:a.whiteBackgroundColor,boxShadow:r.focusBoxShadow,borderRadius:r.borderRadius,"& input":{fontWeight:r.textWeightNormal,fontFamily:r.font},"&:hover":{...e["&:hover"]??{},borderColor:a.inputBorderHoverColor},fontSize:"14px",minWidth:"min-content",".inputIcon":{color:i?a.defaultControlColor:t.value?a.inputTextColor:a.defaultControlColor}}},valueContainer:(e,{theme:t})=>({...e,width:"50px",flexWrap:t.flexWrap}),singleValue:(e,{selectProps:t,theme:r,isDisabled:n})=>({...e,position:"absolute",top:"50%",transform:"translateY(-50%)",color:t.isInvalid?r.colors.primary:n?r.colors.disabledTextColor:r.colors.inputTextColor,fontSize:"14px",fontWeight:r.textWeightNormal}),multiValue:(e,t)=>{const{theme:r}=t;return{...e,color:r.colors.inputTextColor,fontWeight:r.textWeightNormal,backgroundColor:"#E7EBEF",borderRadius:"4px","& svg":{color:r.colors.inputTextColor}," > div":{fontSize:"12px"}}},multiValueLabel:e=>({...e,fontSize:"unset",padding:"5px"}),multiValueRemove:(e,{theme:t})=>({...e,color:t.colors.inputBorderColor}),placeholder:(e,t)=>{const{theme:r,selectProps:n}=t;return{...e,fontSize:"14px",fontWeight:r.textWeightNormal,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"calc(100% - 8px)",color:n.isDarkPlaceholderText?r.colors.inputTextColor:r.colors.placeholderTextColor}},loadingMessage:(e,{theme:t})=>({...e,color:t.colors.optionTextColor}),noOptionsMessage:(e,{theme:t})=>({...e,color:t.colors.optionTextColor}),input:(e,{theme:t})=>({...e,color:t.colors.inputTextColor}),option:(e,{isSelected:t,theme:r,isDisabled:n,selectProps:i})=>{const a=r.colors.optionTextColor;return{color:t?r.colors.primary:a,backgroundColor:t?r.colors.activeOptionBackground:void 0,fontWeight:r.textWeightNormal,fontSize:"14px",cursor:n?"default":"pointer",display:"flex",flexDirection:"row",alignItems:"center",padding:"7px 10px",minHeight:"36px",marginRight:"4px",marginBottom:"2px",lineHeight:"22px",borderRadius:R.radius("ml")({theme:i==null?void 0:i.systemTheme}),"&:hover":{backgroundColor:t?r.colors.hoverToActiveOptionBackground:n?void 0:r.colors.menuHoverBackgroundColor}}},menu:(e,t)=>{const{theme:r}=t;return{...e,boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.10);",marginTop:"4px",paddingTop:"0",borderRadius:"10px",zIndex:3,minWidth:"max-content",backgroundColor:r.colors.whiteBackgroundColor}},menuList:(e,{theme:t})=>({...e,margin:"8px 4px 8px 8px","::-webkit-scrollbar-thumb":{border:"none",borderRadius:"4px",height:"47px",backgroundColor:t.colors.defaultControlColor,"&:hover":{backgroundColor:t.colors.dropdownIndicatorColor}},"::-webkit-scrollbar":{width:"10px"},"::-webkit-scrollbar-track":{backgroundColor:t.colors.menuHoverBackgroundColor,borderRadius:"6px"}}),dropdownIndicator:(e,t)=>{const{theme:r,isDisabled:n}=t;return{...e,justifyContent:"center",alignItems:"center","& svg":{stroke:n?r.colors.dropdownIndicatorColor:r.colors.inputTextColor},padding:"0px 5px 0px 0px","@media (min-width: 1024px)":{padding:"0px 10px 0px 1px"}}},clearIndicator:(e,t)=>{const{theme:r}=t;return{...e,justifyContent:"center",alignItems:"center",padding:r.narrowIndicators?"0px 0px 0px 2px":"0px 4px",color:r.colors.dropdownIndicatorColor}}},eAe=(e,t,r)=>{const n=R.color("blue2")({theme:e}),i={primary:R.color("red1")({theme:e}),inputTextColor:n,whiteBackgroundColor:R.color("white")({theme:e}),optionTextColor:R.color("blue2")({theme:e}),menuHoverBackgroundColor:R.color("bgLightGray1")({theme:e}),inputDisabledColor:R.color("lightGray1")({theme:e}),inputBorderColor:R.color("lightGray3")({theme:e}),placeholderTextColor:R.color("lightGray3")({theme:e}),defaultControlColor:R.color("lightGray5")({theme:e}),disabledTextColor:R.color("lightGray6")({theme:e}),dropdownIndicatorColor:R.color("gray1")({theme:e}),inputBorderHoverColor:R.color("gray5")({theme:e}),activeOptionBackground:R.color("red20")({theme:e}),hoverToActiveOptionBackground:R.color("red30")({theme:e})};return a=>({...a,colors:i,focusBoxShadow:null,height:"38px",flexWrap:r?"nowrap":"wrap",textWeightNormal:R.fontWeight("normal")({theme:e}),optionVariant:t,borderRadius:R.radius("lg")({theme:e}),font:R.font("primary")({theme:e}),narrowIndicators:!!r})},tAe=(e="form",t="default",r="default",n="default",i,a,o)=>{const s=at();return x.useMemo(()=>{const c={ValueContainer:Ufe};r==="count"&&(c.MultiValue=Xfe),n==="search"&&(c.DropdownIndicator=null),(o||a)&&(c.MenuList=zfe),c.Input=qfe;const u=eAe(s,t,e=="gridFilter"),f=$fe;return c.Option=_fe,c.DropdownIndicator=Kfe,i&&(c.Option=Yfe),[c,u,f]},[r,n,o,a,e,i,s,t])},lE=[],rAe=()=>Ye._({id:"select.noOptions",message:"no options"}),nAe=()=>Ye._({id:"components.dropdown.loading",message:"Loading..."}),g2=({label:e,name:t,value:r="",options:n=lE,defaultOptions:i,loadOptions:a,onChange:o,onBlur:s,error:c,isInvalid:u,isLoading:f,isDarkPlaceholderText:A,spaceAround:h=!1,disabled:g,onInputChange:m,isSearchable:b,isMulti:w,className:y,useSimplifiedOptions:S=!1,showSelectAllButton:k=!1,showResetGridButton:I=!1,style:P,optionVariant:M,multiLabelVariant:D,containerVariant:j,placeholder:V,placeholderIcon:W,innerRef:T,maxMenuHeight:B,getOptionValue:N,resetGrid:_,...X})=>{const Y=!!a;k&&(a||!w)&&console.error("CheckboxSelect incompatible props");const le=x.useCallback(()=>{o==null||o(n||[])},[o,n]),fe=x.useCallback(()=>{typeof o=="function"&&(o==null||o(lE))},[o]),se=j==="search"?"search":W||void 0,H=I&&k&&B?B-30:B,[J,re,ne]=tAe(P,M,D,j,S,k,I),ce=Y?kfe:Ife;let te;const Z=x.useMemo(()=>N||(ue=>ue==null?void 0:ue.value),[N]);Array.isArray(r)?(te=(i||n).filter(ue=>r.includes(Z(ue))),te=te!=null&&te.length?te:null):r!==void 0&&(te=(i||n).find(ue=>Z(ue)===r)||null);const ee=at(),oe=x.useMemo(()=>a?ue=>a(ue):void 0,[a]);return p.jsxs(Io,{spaceAround:h,className:y,children:[p.jsxs(Efe,{children:[e&&p.jsx(ic,{htmlFor:t,children:e}),p.jsx(ce,{id:t,name:t,options:n,loadOptions:oe,defaultOptions:i,value:te,onChange:o,onBlur:s,isDisabled:g||f,isLoading:f,isInvalid:u!==void 0?u:!!c,isDarkPlaceholderText:A,placeholder:V||Ye._({id:"components.dropdown.placeholder",message:"Select..."}),styles:ne,theme:re,icon:se,hideSelectedOptions:!!(w&&D!="count"),onInputChange:m,isSearchable:Y||b,isMulti:w,classNamePrefix:"react-select",components:J,closeMenuOnSelect:w?!1:void 0,...X,ref:T,tabIndex:null,systemTheme:ee,resetGrid:_,onCustomSelectAll:le,onCustomDeselectAll:fe,selectAllButton:k,resetGridButton:I,maxMenuHeight:H,getOptionValue:N,noOptionsMessage:rAe,loadingMessage:nAe})]}),c&&p.jsx(i0,{children:c})]})},cE=({checkAllButton:e,...t})=>p.jsx(g2,{...t,optionVariant:"checkbox",multiLabelVariant:"count",isMulti:!0,showSelectAllButton:e});let iAe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");var D3,uE;function aAe(){if(uE)return D3;uE=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return D3=e,D3}var L3,dE;function oAe(){if(dE)return L3;dE=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return L3=e,L3}var N3,fE;function sAe(){if(fE)return N3;fE=1;var e=UA(),t=oAe();function r(n,i){return i.length<2?n:e(n,t(i,0,-1))}return N3=r,N3}var B3,AE;function lAe(){if(AE)return B3;AE=1;var e=Ld(),t=aAe(),r=sAe(),n=Cs;function i(a,o){return o=e(o,a),a=r(a,o),a==null||delete a[n(t(o))]}return B3=i,B3}var j3,pE;function cAe(){if(pE)return j3;pE=1;var e=Py;function t(r){return e(r)?void 0:r}return j3=t,j3}var R3,hE;function uAe(){if(hE)return R3;hE=1;var e=HA,t=Mp,r=lAe(),n=Ld(),i=rc,a=cAe(),o=Ny,s=gy,c=1,u=2,f=4,A=o(function(h,g){var m={};if(h==null)return m;var b=!1;g=e(g,function(y){return y=n(y,h),b||(b=y.length>1),y}),i(h,s(h),m),b&&(m=t(m,c|u|f,a));for(var w=g.length;w--;)r(m,g[w]);return m});return R3=A,R3}var dAe=Lp,gE=dAe("omit",uAe());gE.placeholder=Ud();var fAe=gE;const AAe=Wr(fAe),V3=`_create_${iAe()}_`,pAe=_r.createFilter(),hAe=(e,t)=>(e==null?void 0:e.value)==V3?!0:pAe(e,t),F3=e=>e===null?null:Array.isArray(e)?e.map(t=>t.value):e.value,gAe=()=>Ye._({id:"components.dropdown.loading",message:"Loading..."}),W3=e=>{const{name:t,onChange:r,onBlur:n,onValueChange:i,loadOptions:a,asyncLoadMinChars:o=0,isLocked:s,lockedText:c=Ye._({id:"components.dropdown.notReact",message:"Select related values first..."}),disabled:u,placeholder:f=Ye._({id:"components.dropdown.placeholder",message:"Select..."}),preload:A,initialOptions:h,onCreateOption:g,options:m,filterOption:b,shouldReloadOptions:w=!1}=e,[y,S]=x.useState(!1),k=!!a||!!g,I=x.useCallback(Y=>a&&Y.length<o?Ye._({id:"components.dropdown.writeMoreChars",message:"Write at least ${asyncLoadMinChars} characters."}):Ye._({id:"components.dropdown.noOptions",message:"No options"}),[a,o]),P=x.useCallback(Y=>g?Y.trim()?Promise.resolve([...m||[],{value:V3,label:`${Y} (${Ye._({id:"components.dropdown.newOption",message:"new value"})})`,inputValue:Y}]):Promise.resolve(m||[]):!a||Y.length<o?Promise.resolve([]):a(Y,!1),[g,a,o,m]),[M,D]=x.useState(m||[]);x.useEffect(()=>{a&&A&&!e.value&&a("",!1).then(D)},[a]);const[j,V]=x.useState(null);x.useEffect(()=>{if(h&&h.length){const Y=h.find(le=>le.value==e.value)||null;V(Y)}a&&!h&&e.value&&a(String(e.value),!0).then(Y=>V((Y==null?void 0:Y[0])||null))},[h,V]),x.useEffect(()=>{w&&D(m||[])},[m]);const W=x.useCallback(async Y=>{var fe,se,H;let le;if(g&&(Y==null?void 0:Y.value)==V3)if(Y!=null&&Y.inputValue&&((se=(fe=Y==null?void 0:Y.inputValue)==null?void 0:fe.trim())==null?void 0:se.length)<2){e==null||e.form.setFieldTouched(t,!0,!0),e==null||e.form.setFieldError(t,Ye._({id:"form.general.min2Chars",message:"Minimal length is 2 characters."}));return}else{S(!0);const J=await g(((H=Y==null?void 0:Y.inputValue)==null?void 0:H.trim())??"");le=F3(J),S(!1)}else le=F3(Y),a&&V(Y);r&&r({target:{name:t??"",type:"change",value:le}}),i&&i(le)},[g,a,r,i,e==null?void 0:e.form,t]),T=x.useCallback(Y=>{n&&n({target:{name:t,type:"blur",value:F3(Y)}})},[t,n]),B=["onValueChange","placeholder","options","loadOptions","asyncLoadMinChars"],_=s&&!u?c:f,X=x.useMemo(()=>{if(!k)return;const Y=g?m:M;return j?Y?[...Y,j]:[j]:Y||void 0},[k,M,g,m,j]);return p.jsx(g2,{...AAe(B,e),filterOption:b||hAe,disabled:u||s,onChange:W,onBlur:T,placeholder:_,loadingMessage:gAe,noOptionsMessage:I,loadOptions:k?P:void 0,containerVariant:k?"search":void 0,defaultOptions:X,options:k?void 0:m,isLoading:y||e.isLoading})},vAe=[],vE=({onChange:e,isMulti:t,value:r,options:n,checkAllButton:i})=>{const a=x.useCallback(o=>{e==null||e(!JG(o)||!(o!=null&&o.length)?null:o.map(s=>s.value))},[e]);return t?p.jsx(cE,{maxMenuHeight:250,onChange:a,value:r||vAe,options:n,checkAllButton:i,style:"gridFilter"}):p.jsx(W3,{maxMenuHeight:250,onChange:e,value:r,options:n,style:"gridFilter"})},mAe=()=>[{value:"",label:Ye._({id:"dataGrid.columnActive.filterOptions.all",message:"All"})},{value:"1",label:Ye._({id:"dataGrid.columnActive.filterOptions.yes",message:"Yes"})},{value:"0",label:Ye._({id:"dataGrid.columnActive.filterOptions.no",message:"No"})}],bAe=({...e})=>{const t=x.useMemo(()=>mAe(),[]);return p.jsx(vE,{options:t,...e})},mE=e=>typeof e<"u",Nc=e=>({flexBasis:e.flexBasis,flexGrow:0,flexShrink:0}),qs=(e,t)=>{if(!e)return{};const{fixedSize:r,flexGrow:n,flexShrink:i,sticky:a}=e;return{flexBasis:t,flexGrow:r?0:mE(n)?n:1,flexShrink:mE(i)?i:1,maxWidth:a?t:"auto"}},yAe=e=>e.systemName||e.name,bE=e=>e.systemFilter||e.systemName||e.name,CAe=(e,t)=>{var n;if(e.alwaysOn)return!0;const r=(n=t==null?void 0:t[e.name])==null?void 0:n.isHidden;return typeof r=="boolean"?!r:e.defaultHidden&&(t!=null&&t[e.name])?!0:!e.defaultHidden},H3=e=>e.filterOptions?"options":e.filteringType||"text",wAe=e=>e.map((t,r)=>{let n=r>0&&e[r-1].group;return{name:t.group,start:!!(t.group&&(!n||n&&n!==t.group)),end:!!(t.group&&(!e[r+1]||e[r+1].group!==t.group))}}),v2=e=>`${e!=null&&e.start?"group-start":""} ${e!=null&&e.end?"group-end":""}`,Bc=(e,t)=>e?`${t?` sticky sticky-${t}`:" sticky sticky-left"}`:"",xAe=6,SAe=40,EAe=e=>{const t={number:{CellComponent:Pie},text:{CellComponent:jie},date:{CellComponent:vde},flag:{CellComponent:bAe},options:{CellComponent:vE}};return e&&(t.text.defaultExtraProps={defaultComparator:"eq"}),t},IAe=(e,t)=>{const r=t.filter(i=>i.sticky===!0&&i.stickTo==="right"),n=t.filter(i=>i.sticky===!0&&i.stickTo!=="right");(n.length>1||r.length>1)&&console.error("Grid can have only sticky column on each side."),n.length&&e.indexOf(n[0].name)!==0&&console.error("The left sticky column should be the first one in a row"),r.length&&e.indexOf(r[0].name)!==e.length-1&&console.error("The Right sticky column should be the last one in a row")},z3=e=>x.useCallback((t,r)=>{if(e){const n={type:H3(r),filterExtraProps:r.filterExtraProps||{},computedValue:r.getFilterCriteria?r.getFilterCriteria(t):null};e(bE(r),t,n)}},[e]),kAe=(...e)=>null,OAe=({gridActions:e,gridSelectors:t,quickFilter:r,displayColumnsDefinitions:n,filters:i})=>{var V,W;const{resetFilters:a,addFilter:o=kAe}=e,{filter:s}=t,{isMobile:c}=sie(),[u,f]=x.useState(""),[A,h]=x.useState(!1),g=z3(o),m=r?(V=s==null?void 0:s[r])==null?void 0:V.value:void 0,b=(n==null?void 0:n.find(T=>T.name===r))||null,w=H3(b||{}),y=((W=i==null?void 0:i[w].defaultExtraProps)==null?void 0:W.defaultComparator)||"eq",S=m&&m.comparator||y,k=c&&A;x.useEffect(()=>{f(m?m.value:"")},[m,r,f]),x.useEffect(()=>{h(!c)},[c]);const I=x.useCallback(T=>{f(T.target.value);const B={comparator:S,value:T.target.value};b&&g(B,b)},[f,S,g,b]),P=x.useCallback(()=>{f(""),I({target:{value:""}}),h(!c)},[f,c,I,h]),M=x.useCallback(()=>{h(!0)},[]),D=x.useCallback(()=>{a==null||a(),f==null||f("")},[a,f]),j=tC(b);return{searchedValue:u,translatedValue:j,onChangeInputValue:I,onResetFilters:D,onDisplayInput:M,displayInput:A,onClear:P,isMobileInputView:k,isMobile:c,filter:s}},G3=Symbol();var U3=(e=>(e.Left="left",e.Right="right",e))(U3||{}),m2=(e=>(e.TopLeft="top-left",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomRight="bottom-right",e))(m2||{});const PAe=Object.freeze(Object.defineProperty({__proto__:null,EditReadPosition:U3,ExtraControlButtonPosition:m2,rowClassSymbol:G3},Symbol.toStringTag,{value:"Module"}));var TAe=Ie.createContext();Ie.createContext();var MAe=function(t){return Array.isArray(t)?t[0]:t},DAe=function(t){if(typeof t=="function"){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t.apply(void 0,n)}},LAe=function(t,r){if(typeof t=="function")return DAe(t,r);t!=null&&(t.current=r)},yE=function(t){return t.reduce(function(r,n){var i=n[0],a=n[1];return r[i]=a,r},{})},CE=typeof window<"u"&&window.document&&window.document.createElement?Ie.useLayoutEffect:Ie.useEffect,tn="top",Un="bottom",Zn="right",rn="left",Z3="auto",jc=[tn,Un,Zn,rn],$s="start",Rc="end",NAe="clippingParents",wE="viewport",Vc="popper",BAe="reference",xE=jc.reduce(function(e,t){return e.concat([t+"-"+$s,t+"-"+Rc])},[]),SE=[].concat(jc,[Z3]).reduce(function(e,t){return e.concat([t,t+"-"+$s,t+"-"+Rc])},[]),jAe="beforeRead",RAe="read",VAe="afterRead",FAe="beforeMain",WAe="main",HAe="afterMain",zAe="beforeWrite",GAe="write",UAe="afterWrite",ZAe=[jAe,RAe,VAe,FAe,WAe,HAe,zAe,GAe,UAe];function Hi(e){return e?(e.nodeName||"").toLowerCase():null}function yn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ro(e){var t=yn(e).Element;return e instanceof t||e instanceof Element}function Yn(e){var t=yn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Y3(e){if(typeof ShadowRoot>"u")return!1;var t=yn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function YAe(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!Yn(a)||!Hi(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function JAe(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(c,u){return c[u]="",c},{});!Yn(i)||!Hi(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const XAe={name:"applyStyles",enabled:!0,phase:"write",fn:YAe,effect:JAe,requires:["computeStyles"]};function zi(e){return e.split("-")[0]}var Vo=Math.max,b2=Math.min,el=Math.round;function J3(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function EE(){return!/^((?!chrome|android).)*safari/i.test(J3())}function tl(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,a=1;t&&Yn(e)&&(i=e.offsetWidth>0&&el(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&el(n.height)/e.offsetHeight||1);var o=Ro(e)?yn(e):window,s=o.visualViewport,c=!EE()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/i,f=(n.top+(c&&s?s.offsetTop:0))/a,A=n.width/i,h=n.height/a;return{width:A,height:h,top:f,right:u+A,bottom:f+h,left:u,x:u,y:f}}function X3(e){var t=tl(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function IE(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Y3(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fa(e){return yn(e).getComputedStyle(e)}function _Ae(e){return["table","td","th"].indexOf(Hi(e))>=0}function _a(e){return((Ro(e)?e.ownerDocument:e.document)||window.document).documentElement}function y2(e){return Hi(e)==="html"?e:e.assignedSlot||e.parentNode||(Y3(e)?e.host:null)||_a(e)}function kE(e){return!Yn(e)||fa(e).position==="fixed"?null:e.offsetParent}function QAe(e){var t=/firefox/i.test(J3()),r=/Trident/i.test(J3());if(r&&Yn(e)){var n=fa(e);if(n.position==="fixed")return null}var i=y2(e);for(Y3(i)&&(i=i.host);Yn(i)&&["html","body"].indexOf(Hi(i))<0;){var a=fa(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Fc(e){for(var t=yn(e),r=kE(e);r&&_Ae(r)&&fa(r).position==="static";)r=kE(r);return r&&(Hi(r)==="html"||Hi(r)==="body"&&fa(r).position==="static")?t:r||QAe(e)||t}function _3(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wc(e,t,r){return Vo(e,b2(t,r))}function KAe(e,t,r){var n=Wc(e,t,r);return n>r?r:n}function OE(){return{top:0,right:0,bottom:0,left:0}}function PE(e){return Object.assign({},OE(),e)}function TE(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var qAe=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,PE(typeof t!="number"?t:TE(t,jc))};function $Ae(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=zi(r.placement),c=_3(s),u=[rn,Zn].indexOf(s)>=0,f=u?"height":"width";if(!(!a||!o)){var A=qAe(i.padding,r),h=X3(a),g=c==="y"?tn:rn,m=c==="y"?Un:Zn,b=r.rects.reference[f]+r.rects.reference[c]-o[c]-r.rects.popper[f],w=o[c]-r.rects.reference[c],y=Fc(a),S=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,k=b/2-w/2,I=A[g],P=S-h[f]-A[m],M=S/2-h[f]/2+k,D=Wc(I,M,P),j=c;r.modifiersData[n]=(t={},t[j]=D,t.centerOffset=D-M,t)}}function epe(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||IE(t.elements.popper,i)&&(t.elements.arrow=i))}const tpe={name:"arrow",enabled:!0,phase:"main",fn:$Ae,effect:epe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rl(e){return e.split("-")[1]}var rpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function npe(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:el(r*i)/i||0,y:el(n*i)/i||0}}function ME(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,A=e.isFixed,h=o.x,g=h===void 0?0:h,m=o.y,b=m===void 0?0:m,w=typeof f=="function"?f({x:g,y:b}):{x:g,y:b};g=w.x,b=w.y;var y=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),k=rn,I=tn,P=window;if(u){var M=Fc(r),D="clientHeight",j="clientWidth";if(M===yn(r)&&(M=_a(r),fa(M).position!=="static"&&s==="absolute"&&(D="scrollHeight",j="scrollWidth")),M=M,i===tn||(i===rn||i===Zn)&&a===Rc){I=Un;var V=A&&M===P&&P.visualViewport?P.visualViewport.height:M[D];b-=V-n.height,b*=c?1:-1}if(i===rn||(i===tn||i===Un)&&a===Rc){k=Zn;var W=A&&M===P&&P.visualViewport?P.visualViewport.width:M[j];g-=W-n.width,g*=c?1:-1}}var T=Object.assign({position:s},u&&rpe),B=f===!0?npe({x:g,y:b},yn(r)):{x:g,y:b};if(g=B.x,b=B.y,c){var N;return Object.assign({},T,(N={},N[I]=S?"0":"",N[k]=y?"0":"",N.transform=(P.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",N))}return Object.assign({},T,(t={},t[I]=S?b+"px":"",t[k]=y?g+"px":"",t.transform="",t))}function ipe(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:zi(t.placement),variation:rl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ME(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ME(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ape={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ipe,data:{}};var C2={passive:!0};function ope(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,c=yn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",r.update,C2)}),s&&c.addEventListener("resize",r.update,C2),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",r.update,C2)}),s&&c.removeEventListener("resize",r.update,C2)}}const spe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ope,data:{}};var lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function w2(e){return e.replace(/left|right|bottom|top/g,function(t){return lpe[t]})}var cpe={start:"end",end:"start"};function DE(e){return e.replace(/start|end/g,function(t){return cpe[t]})}function Q3(e){var t=yn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function K3(e){return tl(_a(e)).left+Q3(e).scrollLeft}function upe(e,t){var r=yn(e),n=_a(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var u=EE();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+K3(e),y:c}}function dpe(e){var t,r=_a(e),n=Q3(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Vo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Vo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+K3(e),c=-n.scrollTop;return fa(i||r).direction==="rtl"&&(s+=Vo(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function q3(e){var t=fa(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function LE(e){return["html","body","#document"].indexOf(Hi(e))>=0?e.ownerDocument.body:Yn(e)&&q3(e)?e:LE(y2(e))}function Hc(e,t){var r;t===void 0&&(t=[]);var n=LE(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=yn(n),o=i?[a].concat(a.visualViewport||[],q3(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(Hc(y2(o)))}function $3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fpe(e,t){var r=tl(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function NE(e,t,r){return t===wE?$3(upe(e,r)):Ro(t)?fpe(t,r):$3(dpe(_a(e)))}function Ape(e){var t=Hc(y2(e)),r=["absolute","fixed"].indexOf(fa(e).position)>=0,n=r&&Yn(e)?Fc(e):e;return Ro(n)?t.filter(function(i){return Ro(i)&&IE(i,n)&&Hi(i)!=="body"}):[]}function ppe(e,t,r,n){var i=t==="clippingParents"?Ape(e):[].concat(t),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(c,u){var f=NE(e,u,n);return c.top=Vo(f.top,c.top),c.right=b2(f.right,c.right),c.bottom=b2(f.bottom,c.bottom),c.left=Vo(f.left,c.left),c},NE(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function BE(e){var t=e.reference,r=e.element,n=e.placement,i=n?zi(n):null,a=n?rl(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case tn:c={x:o,y:t.y-r.height};break;case Un:c={x:o,y:t.y+t.height};break;case Zn:c={x:t.x+t.width,y:s};break;case rn:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?_3(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case $s:c[u]=c[u]-(t[f]/2-r[f]/2);break;case Rc:c[u]=c[u]+(t[f]/2-r[f]/2);break}}return c}function zc(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.strategy,o=a===void 0?e.strategy:a,s=r.boundary,c=s===void 0?NAe:s,u=r.rootBoundary,f=u===void 0?wE:u,A=r.elementContext,h=A===void 0?Vc:A,g=r.altBoundary,m=g===void 0?!1:g,b=r.padding,w=b===void 0?0:b,y=PE(typeof w!="number"?w:TE(w,jc)),S=h===Vc?BAe:Vc,k=e.rects.popper,I=e.elements[m?S:h],P=ppe(Ro(I)?I:I.contextElement||_a(e.elements.popper),c,f,o),M=tl(e.elements.reference),D=BE({reference:M,element:k,strategy:"absolute",placement:i}),j=$3(Object.assign({},k,D)),V=h===Vc?j:M,W={top:P.top-V.top+y.top,bottom:V.bottom-P.bottom+y.bottom,left:P.left-V.left+y.left,right:V.right-P.right+y.right},T=e.modifiersData.offset;if(h===Vc&&T){var B=T[i];Object.keys(W).forEach(function(N){var _=[Zn,Un].indexOf(N)>=0?1:-1,X=[tn,Un].indexOf(N)>=0?"y":"x";W[N]+=B[X]*_})}return W}function hpe(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?SE:c,f=rl(n),A=f?s?xE:xE.filter(function(m){return rl(m)===f}):jc,h=A.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=A);var g=h.reduce(function(m,b){return m[b]=zc(e,{placement:b,boundary:i,rootBoundary:a,padding:o})[zi(b)],m},{});return Object.keys(g).sort(function(m,b){return g[m]-g[b]})}function gpe(e){if(zi(e)===Z3)return[];var t=w2(e);return[DE(e),t,DE(t)]}function vpe(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,c=r.fallbackPlacements,u=r.padding,f=r.boundary,A=r.rootBoundary,h=r.altBoundary,g=r.flipVariations,m=g===void 0?!0:g,b=r.allowedAutoPlacements,w=t.options.placement,y=zi(w),S=y===w,k=c||(S||!m?[w2(w)]:gpe(w)),I=[w].concat(k).reduce(function(ce,te){return ce.concat(zi(te)===Z3?hpe(t,{placement:te,boundary:f,rootBoundary:A,padding:u,flipVariations:m,allowedAutoPlacements:b}):te)},[]),P=t.rects.reference,M=t.rects.popper,D=new Map,j=!0,V=I[0],W=0;W<I.length;W++){var T=I[W],B=zi(T),N=rl(T)===$s,_=[tn,Un].indexOf(B)>=0,X=_?"width":"height",Y=zc(t,{placement:T,boundary:f,rootBoundary:A,altBoundary:h,padding:u}),le=_?N?Zn:rn:N?Un:tn;P[X]>M[X]&&(le=w2(le));var fe=w2(le),se=[];if(a&&se.push(Y[B]<=0),s&&se.push(Y[le]<=0,Y[fe]<=0),se.every(function(ce){return ce})){V=T,j=!1;break}D.set(T,se)}if(j)for(var H=m?3:1,J=function(te){var Z=I.find(function(ee){var oe=D.get(ee);if(oe)return oe.slice(0,te).every(function(ue){return ue})});if(Z)return V=Z,"break"},re=H;re>0;re--){var ne=J(re);if(ne==="break")break}t.placement!==V&&(t.modifiersData[n]._skip=!0,t.placement=V,t.reset=!0)}}const mpe={name:"flip",enabled:!0,phase:"main",fn:vpe,requiresIfExists:["offset"],data:{_skip:!1}};function jE(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function RE(e){return[tn,Zn,Un,rn].some(function(t){return e[t]>=0})}function bpe(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=zc(t,{elementContext:"reference"}),s=zc(t,{altBoundary:!0}),c=jE(o,n),u=jE(s,i,a),f=RE(c),A=RE(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:A},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":A})}const ype={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bpe};function Cpe(e,t,r){var n=zi(e),i=[rn,tn].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[rn,Zn].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function wpe(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=SE.reduce(function(f,A){return f[A]=Cpe(A,t.rects,a),f},{}),s=o[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}const xpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wpe};function Spe(e){var t=e.state,r=e.name;t.modifiersData[r]=BE({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Epe={name:"popperOffsets",enabled:!0,phase:"read",fn:Spe,data:{}};function Ipe(e){return e==="x"?"y":"x"}function kpe(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,c=r.boundary,u=r.rootBoundary,f=r.altBoundary,A=r.padding,h=r.tether,g=h===void 0?!0:h,m=r.tetherOffset,b=m===void 0?0:m,w=zc(t,{boundary:c,rootBoundary:u,padding:A,altBoundary:f}),y=zi(t.placement),S=rl(t.placement),k=!S,I=_3(y),P=Ipe(I),M=t.modifiersData.popperOffsets,D=t.rects.reference,j=t.rects.popper,V=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,W=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(M){if(a){var N,_=I==="y"?tn:rn,X=I==="y"?Un:Zn,Y=I==="y"?"height":"width",le=M[I],fe=le+w[_],se=le-w[X],H=g?-j[Y]/2:0,J=S===$s?D[Y]:j[Y],re=S===$s?-j[Y]:-D[Y],ne=t.elements.arrow,ce=g&&ne?X3(ne):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:OE(),Z=te[_],ee=te[X],oe=Wc(0,D[Y],ce[Y]),ue=k?D[Y]/2-H-oe-Z-W.mainAxis:J-oe-Z-W.mainAxis,ye=k?-D[Y]/2+H+oe+ee+W.mainAxis:re+oe+ee+W.mainAxis,ve=t.elements.arrow&&Fc(t.elements.arrow),pe=ve?I==="y"?ve.clientTop||0:ve.clientLeft||0:0,ze=(N=T==null?void 0:T[I])!=null?N:0,st=le+ue-ze-pe,$t=le+ye-ze,an=Wc(g?b2(fe,st):fe,le,g?Vo(se,$t):se);M[I]=an,B[I]=an-le}if(s){var Pn,Er=I==="x"?tn:rn,F=I==="x"?Un:Zn,Et=M[P],jr=P==="y"?"height":"width",on=Et+w[Er],Jt=Et-w[F],Ii=[tn,rn].indexOf(y)!==-1,ga=(Pn=T==null?void 0:T[P])!=null?Pn:0,Jo=Ii?on:Et-D[jr]-j[jr]-ga+W.altAxis,Tn=Ii?Et+D[jr]+j[jr]-ga-W.altAxis:Jt,Mn=g&&Ii?KAe(Jo,Et,Tn):Wc(g?Jo:on,Et,g?Tn:Jt);M[P]=Mn,B[P]=Mn-Et}t.modifiersData[n]=B}}const Ope={name:"preventOverflow",enabled:!0,phase:"main",fn:kpe,requiresIfExists:["offset"]};function Ppe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Tpe(e){return e===yn(e)||!Yn(e)?Q3(e):Ppe(e)}function Mpe(e){var t=e.getBoundingClientRect(),r=el(t.width)/e.offsetWidth||1,n=el(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Dpe(e,t,r){r===void 0&&(r=!1);var n=Yn(t),i=Yn(t)&&Mpe(t),a=_a(t),o=tl(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Hi(t)!=="body"||q3(a))&&(s=Tpe(t)),Yn(t)?(c=tl(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=K3(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Lpe(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&i(c)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function Npe(e){var t=Lpe(e);return ZAe.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Bpe(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function jpe(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var VE={placement:"bottom",modifiers:[],strategy:"absolute"};function FE(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Rpe(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?VE:i;return function(s,c,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},VE,a),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},A=[],h=!1,g={state:f,setOptions:function(y){var S=typeof y=="function"?y(f.options):y;b(),f.options=Object.assign({},a,f.options,S),f.scrollParents={reference:Ro(s)?Hc(s):s.contextElement?Hc(s.contextElement):[],popper:Hc(c)};var k=Npe(jpe([].concat(n,f.options.modifiers)));return f.orderedModifiers=k.filter(function(I){return I.enabled}),m(),g.update()},forceUpdate:function(){if(!h){var y=f.elements,S=y.reference,k=y.popper;if(FE(S,k)){f.rects={reference:Dpe(S,Fc(k),f.options.strategy==="fixed"),popper:X3(k)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(W){return f.modifiersData[W.name]=Object.assign({},W.data)});for(var I=0;I<f.orderedModifiers.length;I++){if(f.reset===!0){f.reset=!1,I=-1;continue}var P=f.orderedModifiers[I],M=P.fn,D=P.options,j=D===void 0?{}:D,V=P.name;typeof M=="function"&&(f=M({state:f,options:j,name:V,instance:g})||f)}}}},update:Bpe(function(){return new Promise(function(w){g.forceUpdate(),w(f)})}),destroy:function(){b(),h=!0}};if(!FE(s,c))return g;g.setOptions(u).then(function(w){!h&&u.onFirstUpdate&&u.onFirstUpdate(w)});function m(){f.orderedModifiers.forEach(function(w){var y=w.name,S=w.options,k=S===void 0?{}:S,I=w.effect;if(typeof I=="function"){var P=I({state:f,name:y,instance:g,options:k}),M=function(){};A.push(P||M)}})}function b(){A.forEach(function(w){return w()}),A=[]}return g}}var Vpe=[spe,Epe,ape,XAe,xpe,mpe,Ope,tpe,ype],Fpe=Rpe({defaultModifiers:Vpe}),Wpe=typeof Element<"u",Hpe=typeof Map=="function",zpe=typeof Set=="function",Gpe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function x2(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!x2(e[n],t[n]))return!1;return!0}var a;if(Hpe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!x2(n.value[1],t.get(n.value[0])))return!1;return!0}if(zpe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(Gpe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(Wpe&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&e.$$typeof)&&!x2(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}var Upe=function(t,r){try{return x2(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Zpe=Wr(Upe);var Ype=[],Jpe=function(t,r,n){n===void 0&&(n={});var i=Ie.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Ype},o=Ie.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],c=o[1],u=Ie.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(g){var m=g.state,b=Object.keys(m.elements);qM.flushSync(function(){c({styles:yE(b.map(function(w){return[w,m.styles[w]||{}]})),attributes:yE(b.map(function(w){return[w,m.attributes[w]]}))})})},requires:["computeStyles"]}},[]),f=Ie.useMemo(function(){var h={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return Zpe(i.current,h)?i.current||h:(i.current=h,h)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),A=Ie.useRef();return CE(function(){A.current&&A.current.setOptions(f)},[f]),CE(function(){if(!(t==null||r==null)){var h=n.createPopper||Fpe,g=h(t,r,f);return A.current=g,function(){g.destroy(),A.current=null}}},[t,r,n.createPopper]),{state:A.current?A.current.state:null,styles:s.styles,attributes:s.attributes,update:A.current?A.current.update:null,forceUpdate:A.current?A.current.forceUpdate:null}},Xpe=function(){},_pe=function(){return Promise.resolve(null)},Qpe=[];function WE(e){var t=e.placement,r=t===void 0?"bottom":t,n=e.strategy,i=n===void 0?"absolute":n,a=e.modifiers,o=a===void 0?Qpe:a,s=e.referenceElement,c=e.onFirstUpdate,u=e.innerRef,f=e.children,A=Ie.useContext(TAe),h=Ie.useState(null),g=h[0],m=h[1],b=Ie.useState(null),w=b[0],y=b[1];Ie.useEffect(function(){LAe(u,g)},[u,g]);var S=Ie.useMemo(function(){return{placement:r,strategy:i,onFirstUpdate:c,modifiers:[].concat(o,[{name:"arrow",enabled:w!=null,options:{element:w}}])}},[r,i,c,o,w]),k=Jpe(s||A,g,S),I=k.state,P=k.styles,M=k.forceUpdate,D=k.update,j=Ie.useMemo(function(){return{ref:m,style:P.popper,placement:I?I.placement:r,hasPopperEscaped:I&&I.modifiersData.hide?I.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:I&&I.modifiersData.hide?I.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:P.arrow,ref:y},forceUpdate:M||Xpe,update:D||_pe}},[m,y,r,I,P,D,M]);return MAe(f)(j)}const Gc=({children:e})=>{const[t]=x.useState(()=>document.createElement("div"));return x.useEffect(()=>{try{document.body.appendChild(t)}catch(r){console.log(r)}return()=>{try{document.body.removeChild(t)}catch(r){console.log(r)}}},[]),is.createPortal(e,t)},Kpe=G.div`
|
|
2228
|
+
`,Kfe=e=>{const{menuIsOpen:t,name:r}=e.selectProps;return p.jsx(_r.components.DropdownIndicator,{...e,children:p.jsx(Qfe,{className:"chevron","data-cy":`${r}ChevronBtn`,children:t?p.jsx(T7,{width:"16px"}):p.jsx(P7,{width:"16px"})})})},qfe=e=>{const{name:t}=e.selectProps,r=t?`${t}Inp`:e.id;return p.jsx(_r.components.Input,{...e,"data-cy":r})},$fe={control:(e,{selectProps:t,theme:r,isFocused:n,isDisabled:i})=>{const a=r.colors;return{...e,borderColor:t.isInvalid?a.primary:n?a.inputTextColor:a.inputBorderColor,backgroundColor:i?a.menuHoverBackgroundColor:a.whiteBackgroundColor,boxShadow:r.focusBoxShadow,borderRadius:r.borderRadius,"& input":{fontWeight:r.textWeightNormal,fontFamily:r.font},"&:hover":{...e["&:hover"]??{},borderColor:a.inputBorderHoverColor},fontSize:"14px",minWidth:"min-content",".inputIcon":{color:i?a.defaultControlColor:t.value?a.inputTextColor:a.defaultControlColor}}},valueContainer:(e,{theme:t})=>({...e,width:"50px",flexWrap:t.flexWrap}),singleValue:(e,{selectProps:t,theme:r,isDisabled:n})=>({...e,position:"absolute",top:"50%",transform:"translateY(-50%)",color:t.isInvalid?r.colors.primary:n?r.colors.disabledTextColor:r.colors.inputTextColor,fontSize:"14px",fontWeight:r.textWeightNormal}),multiValue:(e,t)=>{const{theme:r}=t;return{...e,color:r.colors.inputTextColor,fontWeight:r.textWeightNormal,backgroundColor:"#E7EBEF",borderRadius:"4px","& svg":{color:r.colors.inputTextColor}," > div":{fontSize:"12px"}}},multiValueLabel:e=>({...e,fontSize:"unset",padding:"5px"}),multiValueRemove:(e,{theme:t})=>({...e,color:t.colors.inputBorderColor}),placeholder:(e,t)=>{const{theme:r,selectProps:n}=t;return{...e,fontSize:"14px",fontWeight:r.textWeightNormal,textOverflow:"ellipsis",whiteSpace:"nowrap",overflow:"hidden",maxWidth:"calc(100% - 8px)",color:n.isDarkPlaceholderText?r.colors.inputTextColor:r.colors.placeholderTextColor}},loadingMessage:(e,{theme:t})=>({...e,color:t.colors.optionTextColor}),noOptionsMessage:(e,{theme:t})=>({...e,color:t.colors.optionTextColor}),input:(e,{theme:t})=>({...e,color:t.colors.inputTextColor}),option:(e,{isSelected:t,theme:r,isDisabled:n,selectProps:i})=>{const a=r.colors.optionTextColor;return{color:t?r.colors.primary:a,backgroundColor:t?r.colors.activeOptionBackground:void 0,fontWeight:r.textWeightNormal,fontSize:"14px",cursor:n?"default":"pointer",display:"flex",flexDirection:"row",alignItems:"center",padding:"7px 10px",minHeight:"36px",marginRight:"4px",marginBottom:"2px",lineHeight:"22px",borderRadius:R.radius("ml")({theme:i==null?void 0:i.systemTheme}),"&:hover":{backgroundColor:t?r.colors.hoverToActiveOptionBackground:n?void 0:r.colors.menuHoverBackgroundColor}}},menu:(e,t)=>{const{theme:r}=t;return{...e,boxShadow:"0 2px 20px 0 rgba(0, 0, 0, 0.10);",marginTop:"4px",paddingTop:"0",borderRadius:"10px",zIndex:3,minWidth:"max-content",backgroundColor:r.colors.whiteBackgroundColor}},menuList:(e,{theme:t})=>({...e,margin:"8px 4px 8px 8px","::-webkit-scrollbar-thumb":{border:"none",borderRadius:"4px",height:"47px",backgroundColor:t.colors.defaultControlColor,"&:hover":{backgroundColor:t.colors.dropdownIndicatorColor}},"::-webkit-scrollbar":{width:"10px"},"::-webkit-scrollbar-track":{backgroundColor:t.colors.menuHoverBackgroundColor,borderRadius:"6px"}}),dropdownIndicator:(e,t)=>{const{theme:r,isDisabled:n}=t;return{...e,justifyContent:"center",alignItems:"center","& svg":{stroke:n?r.colors.dropdownIndicatorColor:r.colors.inputTextColor},padding:"0px 5px 0px 0px","@media (min-width: 1024px)":{padding:"0px 10px 0px 1px"}}},clearIndicator:(e,t)=>{const{theme:r}=t;return{...e,justifyContent:"center",alignItems:"center",padding:r.narrowIndicators?"0px 0px 0px 2px":"0px 4px",color:r.colors.dropdownIndicatorColor}}},eAe=(e,t,r)=>{const n=R.color("blue2")({theme:e}),i={primary:R.color("red1")({theme:e}),inputTextColor:n,whiteBackgroundColor:R.color("white")({theme:e}),optionTextColor:R.color("blue2")({theme:e}),menuHoverBackgroundColor:R.color("bgLightGray1")({theme:e}),inputDisabledColor:R.color("lightGray1")({theme:e}),inputBorderColor:R.color("lightGray3")({theme:e}),placeholderTextColor:R.color("lightGray3")({theme:e}),defaultControlColor:R.color("lightGray5")({theme:e}),disabledTextColor:R.color("lightGray6")({theme:e}),dropdownIndicatorColor:R.color("gray1")({theme:e}),inputBorderHoverColor:R.color("gray5")({theme:e}),activeOptionBackground:R.color("red20")({theme:e}),hoverToActiveOptionBackground:R.color("red30")({theme:e})};return a=>({...a,colors:i,focusBoxShadow:null,height:"38px",flexWrap:r?"nowrap":"wrap",textWeightNormal:R.fontWeight("normal")({theme:e}),optionVariant:t,borderRadius:R.radius("lg")({theme:e}),font:R.font("primary")({theme:e}),narrowIndicators:!!r})},tAe=(e="form",t="default",r="default",n="default",i,a,o)=>{const s=at();return x.useMemo(()=>{const c={ValueContainer:Ufe};r==="count"&&(c.MultiValue=Xfe),n==="search"&&(c.DropdownIndicator=null),(o||a)&&(c.MenuList=zfe),c.Input=qfe;const u=eAe(s,t,e=="gridFilter"),f=$fe;return c.Option=_fe,c.DropdownIndicator=Kfe,i&&(c.Option=Yfe),[c,u,f]},[r,n,o,a,e,i,s,t])},lE=[],rAe=()=>Ye._({id:"select.noOptions",message:"no options"}),nAe=()=>Ye._({id:"components.dropdown.loading",message:"Loading..."}),g2=({label:e,name:t,value:r="",options:n=lE,defaultOptions:i,loadOptions:a,onChange:o,onBlur:s,error:c,isInvalid:u,isLoading:f,isDarkPlaceholderText:A,spaceAround:h=!1,disabled:g,onInputChange:m,isSearchable:b,isMulti:w,className:y,useSimplifiedOptions:S=!1,showSelectAllButton:k=!1,showResetGridButton:I=!1,style:P,optionVariant:M,multiLabelVariant:D,containerVariant:j,placeholder:V,placeholderIcon:W,innerRef:T,maxMenuHeight:B,getOptionValue:N,resetGrid:_,...X})=>{const Y=!!a;k&&(a||!w)&&console.error("CheckboxSelect incompatible props");const le=x.useCallback(()=>{o==null||o(n||[])},[o,n]),fe=x.useCallback(()=>{typeof o=="function"&&(o==null||o(lE))},[o]),se=j==="search"?"search":W||void 0,H=I&&k&&B?B-30:B,[J,re,ne]=tAe(P,M,D,j,S,k,I),ce=Y?kfe:Ife;let te;const Z=x.useMemo(()=>N||(ue=>ue==null?void 0:ue.value),[N]);Array.isArray(r)?(te=(i||n).filter(ue=>r.includes(Z(ue))),te=te!=null&&te.length?te:null):r!==void 0&&(te=(i||n).find(ue=>Z(ue)===r)||null);const ee=at(),oe=x.useMemo(()=>a?ue=>a(ue):void 0,[a]);return p.jsxs(Io,{spaceAround:h,className:y,children:[p.jsxs(Efe,{children:[e&&p.jsx(ic,{htmlFor:t,children:e}),p.jsx(ce,{id:t,name:t,options:n,loadOptions:oe,defaultOptions:i,value:te,onChange:o,onBlur:s,isDisabled:g||f,isLoading:f,isInvalid:u!==void 0?u:!!c,isDarkPlaceholderText:A,placeholder:V||Ye._({id:"components.dropdown.placeholder",message:"Select..."}),styles:ne,theme:re,icon:se,hideSelectedOptions:!!(w&&D!="count"),onInputChange:m,isSearchable:Y||b,isMulti:w,classNamePrefix:"react-select",components:J,closeMenuOnSelect:w?!1:void 0,...X,ref:T,tabIndex:null,systemTheme:ee,resetGrid:_,onCustomSelectAll:le,onCustomDeselectAll:fe,selectAllButton:k,resetGridButton:I,maxMenuHeight:H,getOptionValue:N,noOptionsMessage:rAe,loadingMessage:nAe})]}),c&&p.jsx(i0,{children:c})]})},cE=({checkAllButton:e,...t})=>p.jsx(g2,{...t,optionVariant:"checkbox",multiLabelVariant:"count",isMulti:!0,showSelectAllButton:e});let iAe=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce((t,r)=>(r&=63,r<36?t+=r.toString(36):r<62?t+=(r-26).toString(36).toUpperCase():r>62?t+="-":t+="_",t),"");var D3,uE;function aAe(){if(uE)return D3;uE=1;function e(t){var r=t==null?0:t.length;return r?t[r-1]:void 0}return D3=e,D3}var L3,dE;function oAe(){if(dE)return L3;dE=1;function e(t,r,n){var i=-1,a=t.length;r<0&&(r=-r>a?0:a+r),n=n>a?a:n,n<0&&(n+=a),a=r>n?0:n-r>>>0,r>>>=0;for(var o=Array(a);++i<a;)o[i]=t[i+r];return o}return L3=e,L3}var N3,fE;function sAe(){if(fE)return N3;fE=1;var e=UA(),t=oAe();function r(n,i){return i.length<2?n:e(n,t(i,0,-1))}return N3=r,N3}var B3,AE;function lAe(){if(AE)return B3;AE=1;var e=Ld(),t=aAe(),r=sAe(),n=Cs;function i(a,o){return o=e(o,a),a=r(a,o),a==null||delete a[n(t(o))]}return B3=i,B3}var j3,pE;function cAe(){if(pE)return j3;pE=1;var e=Py;function t(r){return e(r)?void 0:r}return j3=t,j3}var R3,hE;function uAe(){if(hE)return R3;hE=1;var e=HA,t=Mp,r=lAe(),n=Ld(),i=rc,a=cAe(),o=Ny,s=gy,c=1,u=2,f=4,A=o(function(h,g){var m={};if(h==null)return m;var b=!1;g=e(g,function(y){return y=n(y,h),b||(b=y.length>1),y}),i(h,s(h),m),b&&(m=t(m,c|u|f,a));for(var w=g.length;w--;)r(m,g[w]);return m});return R3=A,R3}var dAe=Lp,gE=dAe("omit",uAe());gE.placeholder=Ud();var fAe=gE;const AAe=Wr(fAe),V3=`_create_${iAe()}_`,pAe=_r.createFilter(),hAe=(e,t)=>(e==null?void 0:e.value)==V3?!0:pAe(e,t),F3=e=>e===null?null:Array.isArray(e)?e.map(t=>t.value):e.value,gAe=()=>Ye._({id:"components.dropdown.loading",message:"Loading..."}),W3=e=>{const{name:t,onChange:r,onBlur:n,onValueChange:i,loadOptions:a,asyncLoadMinChars:o=0,isLocked:s,lockedText:c=Ye._({id:"components.dropdown.notReact",message:"Select related values first..."}),disabled:u,placeholder:f=Ye._({id:"components.dropdown.placeholder",message:"Select..."}),preload:A,initialOptions:h,onCreateOption:g,options:m,filterOption:b,shouldReloadOptions:w=!1}=e,[y,S]=x.useState(!1),k=!!a||!!g,I=x.useCallback(Y=>a&&Y.length<o?Ye._({id:"components.dropdown.writeMoreChars",message:"Write at least ${asyncLoadMinChars} characters."}):Ye._({id:"components.dropdown.noOptions",message:"No options"}),[a,o]),P=x.useCallback(Y=>g?Y.trim()?Promise.resolve([...m||[],{value:V3,label:`${Y} (${Ye._({id:"components.dropdown.newOption",message:"new value"})})`,inputValue:Y}]):Promise.resolve(m||[]):!a||Y.length<o?Promise.resolve([]):a(Y,!1),[g,a,o,m]),[M,D]=x.useState(m||[]);x.useEffect(()=>{a&&A&&!e.value&&a("",!1).then(D)},[a]);const[j,V]=x.useState(null);x.useEffect(()=>{if(h&&h.length){const Y=h.find(le=>le.value==e.value)||null;V(Y)}a&&!h&&e.value&&a(String(e.value),!0).then(Y=>V((Y==null?void 0:Y[0])||null))},[h,V]),x.useEffect(()=>{w&&D(m||[])},[m]);const W=x.useCallback(async Y=>{var fe,se,H;let le;if(g&&(Y==null?void 0:Y.value)==V3)if(Y!=null&&Y.inputValue&&((se=(fe=Y==null?void 0:Y.inputValue)==null?void 0:fe.trim())==null?void 0:se.length)<2){e==null||e.form.setFieldTouched(t,!0,!0),e==null||e.form.setFieldError(t,Ye._({id:"form.general.min2Chars",message:"Minimal length is 2 characters."}));return}else{S(!0);const J=await g(((H=Y==null?void 0:Y.inputValue)==null?void 0:H.trim())??"");le=F3(J),S(!1)}else le=F3(Y),a&&V(Y);r&&r({target:{name:t??"",type:"change",value:le}}),i&&i(le)},[g,a,r,i,e==null?void 0:e.form,t]),T=x.useCallback(Y=>{n&&n({target:{name:t,type:"blur",value:F3(Y)}})},[t,n]),B=["onValueChange","placeholder","options","loadOptions","asyncLoadMinChars"],_=s&&!u?c:f,X=x.useMemo(()=>{if(!k)return;const Y=g?m:M;return j?Y?[...Y,j]:[j]:Y||void 0},[k,M,g,m,j]);return p.jsx(g2,{...AAe(B,e),filterOption:b||hAe,disabled:u||s,onChange:W,onBlur:T,placeholder:_,loadingMessage:gAe,noOptionsMessage:I,loadOptions:k?P:void 0,containerVariant:k?"search":void 0,defaultOptions:X,options:k?void 0:m,isLoading:y||e.isLoading})},vAe=[],vE=({onChange:e,isMulti:t,value:r,options:n,checkAllButton:i,isClearable:a})=>{const o=x.useCallback(s=>{e==null||e(!JG(s)||!(s!=null&&s.length)?null:s.map(c=>c.value))},[e]);return t?p.jsx(cE,{maxMenuHeight:250,onChange:o,value:r||vAe,options:n,checkAllButton:i,style:"gridFilter"}):p.jsx(W3,{maxMenuHeight:250,onChange:e,value:r,options:n,style:"gridFilter",isClearable:a})},mAe=()=>[{value:"",label:Ye._({id:"dataGrid.columnActive.filterOptions.all",message:"All"})},{value:"1",label:Ye._({id:"dataGrid.columnActive.filterOptions.yes",message:"Yes"})},{value:"0",label:Ye._({id:"dataGrid.columnActive.filterOptions.no",message:"No"})}],bAe=({...e})=>{const t=x.useMemo(()=>mAe(),[]);return p.jsx(vE,{options:t,...e})},mE=e=>typeof e<"u",Nc=e=>({flexBasis:e.flexBasis,flexGrow:0,flexShrink:0}),qs=(e,t)=>{if(!e)return{};const{fixedSize:r,flexGrow:n,flexShrink:i,sticky:a}=e;return{flexBasis:t,flexGrow:r?0:mE(n)?n:1,flexShrink:mE(i)?i:1,maxWidth:a?t:"auto"}},yAe=e=>e.systemName||e.name,bE=e=>e.systemFilter||e.systemName||e.name,CAe=(e,t)=>{var n;if(e.alwaysOn)return!0;const r=(n=t==null?void 0:t[e.name])==null?void 0:n.isHidden;return typeof r=="boolean"?!r:e.defaultHidden&&(t!=null&&t[e.name])?!0:!e.defaultHidden},H3=e=>e.filterOptions?"options":e.filteringType||"text",wAe=e=>e.map((t,r)=>{let n=r>0&&e[r-1].group;return{name:t.group,start:!!(t.group&&(!n||n&&n!==t.group)),end:!!(t.group&&(!e[r+1]||e[r+1].group!==t.group))}}),v2=e=>`${e!=null&&e.start?"group-start":""} ${e!=null&&e.end?"group-end":""}`,Bc=(e,t)=>e?`${t?` sticky sticky-${t}`:" sticky sticky-left"}`:"",xAe=6,SAe=40,EAe=e=>{const t={number:{CellComponent:Pie},text:{CellComponent:jie},date:{CellComponent:vde},flag:{CellComponent:bAe},options:{CellComponent:vE}};return e&&(t.text.defaultExtraProps={defaultComparator:"eq"}),t},IAe=(e,t)=>{const r=t.filter(i=>i.sticky===!0&&i.stickTo==="right"),n=t.filter(i=>i.sticky===!0&&i.stickTo!=="right");(n.length>1||r.length>1)&&console.error("Grid can have only sticky column on each side."),n.length&&e.indexOf(n[0].name)!==0&&console.error("The left sticky column should be the first one in a row"),r.length&&e.indexOf(r[0].name)!==e.length-1&&console.error("The Right sticky column should be the last one in a row")},z3=e=>x.useCallback((t,r)=>{if(e){const n={type:H3(r),filterExtraProps:r.filterExtraProps||{},computedValue:r.getFilterCriteria?r.getFilterCriteria(t):null};e(bE(r),t,n)}},[e]),kAe=(...e)=>null,OAe=({gridActions:e,gridSelectors:t,quickFilter:r,displayColumnsDefinitions:n,filters:i})=>{var V,W;const{resetFilters:a,addFilter:o=kAe}=e,{filter:s}=t,{isMobile:c}=sie(),[u,f]=x.useState(""),[A,h]=x.useState(!1),g=z3(o),m=r?(V=s==null?void 0:s[r])==null?void 0:V.value:void 0,b=(n==null?void 0:n.find(T=>T.name===r))||null,w=H3(b||{}),y=((W=i==null?void 0:i[w].defaultExtraProps)==null?void 0:W.defaultComparator)||"eq",S=m&&m.comparator||y,k=c&&A;x.useEffect(()=>{f(m?m.value:"")},[m,r,f]),x.useEffect(()=>{h(!c)},[c]);const I=x.useCallback(T=>{f(T.target.value);const B={comparator:S,value:T.target.value};b&&g(B,b)},[f,S,g,b]),P=x.useCallback(()=>{f(""),I({target:{value:""}}),h(!c)},[f,c,I,h]),M=x.useCallback(()=>{h(!0)},[]),D=x.useCallback(()=>{a==null||a(),f==null||f("")},[a,f]),j=tC(b);return{searchedValue:u,translatedValue:j,onChangeInputValue:I,onResetFilters:D,onDisplayInput:M,displayInput:A,onClear:P,isMobileInputView:k,isMobile:c,filter:s}},G3=Symbol();var U3=(e=>(e.Left="left",e.Right="right",e))(U3||{}),m2=(e=>(e.TopLeft="top-left",e.TopRight="top-right",e.BottomLeft="bottom-left",e.BottomRight="bottom-right",e))(m2||{});const PAe=Object.freeze(Object.defineProperty({__proto__:null,EditReadPosition:U3,ExtraControlButtonPosition:m2,rowClassSymbol:G3},Symbol.toStringTag,{value:"Module"}));var TAe=Ie.createContext();Ie.createContext();var MAe=function(t){return Array.isArray(t)?t[0]:t},DAe=function(t){if(typeof t=="function"){for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i<r;i++)n[i-1]=arguments[i];return t.apply(void 0,n)}},LAe=function(t,r){if(typeof t=="function")return DAe(t,r);t!=null&&(t.current=r)},yE=function(t){return t.reduce(function(r,n){var i=n[0],a=n[1];return r[i]=a,r},{})},CE=typeof window<"u"&&window.document&&window.document.createElement?Ie.useLayoutEffect:Ie.useEffect,tn="top",Un="bottom",Zn="right",rn="left",Z3="auto",jc=[tn,Un,Zn,rn],$s="start",Rc="end",NAe="clippingParents",wE="viewport",Vc="popper",BAe="reference",xE=jc.reduce(function(e,t){return e.concat([t+"-"+$s,t+"-"+Rc])},[]),SE=[].concat(jc,[Z3]).reduce(function(e,t){return e.concat([t,t+"-"+$s,t+"-"+Rc])},[]),jAe="beforeRead",RAe="read",VAe="afterRead",FAe="beforeMain",WAe="main",HAe="afterMain",zAe="beforeWrite",GAe="write",UAe="afterWrite",ZAe=[jAe,RAe,VAe,FAe,WAe,HAe,zAe,GAe,UAe];function Hi(e){return e?(e.nodeName||"").toLowerCase():null}function yn(e){if(e==null)return window;if(e.toString()!=="[object Window]"){var t=e.ownerDocument;return t&&t.defaultView||window}return e}function Ro(e){var t=yn(e).Element;return e instanceof t||e instanceof Element}function Yn(e){var t=yn(e).HTMLElement;return e instanceof t||e instanceof HTMLElement}function Y3(e){if(typeof ShadowRoot>"u")return!1;var t=yn(e).ShadowRoot;return e instanceof t||e instanceof ShadowRoot}function YAe(e){var t=e.state;Object.keys(t.elements).forEach(function(r){var n=t.styles[r]||{},i=t.attributes[r]||{},a=t.elements[r];!Yn(a)||!Hi(a)||(Object.assign(a.style,n),Object.keys(i).forEach(function(o){var s=i[o];s===!1?a.removeAttribute(o):a.setAttribute(o,s===!0?"":s)}))})}function JAe(e){var t=e.state,r={popper:{position:t.options.strategy,left:"0",top:"0",margin:"0"},arrow:{position:"absolute"},reference:{}};return Object.assign(t.elements.popper.style,r.popper),t.styles=r,t.elements.arrow&&Object.assign(t.elements.arrow.style,r.arrow),function(){Object.keys(t.elements).forEach(function(n){var i=t.elements[n],a=t.attributes[n]||{},o=Object.keys(t.styles.hasOwnProperty(n)?t.styles[n]:r[n]),s=o.reduce(function(c,u){return c[u]="",c},{});!Yn(i)||!Hi(i)||(Object.assign(i.style,s),Object.keys(a).forEach(function(c){i.removeAttribute(c)}))})}}const XAe={name:"applyStyles",enabled:!0,phase:"write",fn:YAe,effect:JAe,requires:["computeStyles"]};function zi(e){return e.split("-")[0]}var Vo=Math.max,b2=Math.min,el=Math.round;function J3(){var e=navigator.userAgentData;return e!=null&&e.brands&&Array.isArray(e.brands)?e.brands.map(function(t){return t.brand+"/"+t.version}).join(" "):navigator.userAgent}function EE(){return!/^((?!chrome|android).)*safari/i.test(J3())}function tl(e,t,r){t===void 0&&(t=!1),r===void 0&&(r=!1);var n=e.getBoundingClientRect(),i=1,a=1;t&&Yn(e)&&(i=e.offsetWidth>0&&el(n.width)/e.offsetWidth||1,a=e.offsetHeight>0&&el(n.height)/e.offsetHeight||1);var o=Ro(e)?yn(e):window,s=o.visualViewport,c=!EE()&&r,u=(n.left+(c&&s?s.offsetLeft:0))/i,f=(n.top+(c&&s?s.offsetTop:0))/a,A=n.width/i,h=n.height/a;return{width:A,height:h,top:f,right:u+A,bottom:f+h,left:u,x:u,y:f}}function X3(e){var t=tl(e),r=e.offsetWidth,n=e.offsetHeight;return Math.abs(t.width-r)<=1&&(r=t.width),Math.abs(t.height-n)<=1&&(n=t.height),{x:e.offsetLeft,y:e.offsetTop,width:r,height:n}}function IE(e,t){var r=t.getRootNode&&t.getRootNode();if(e.contains(t))return!0;if(r&&Y3(r)){var n=t;do{if(n&&e.isSameNode(n))return!0;n=n.parentNode||n.host}while(n)}return!1}function fa(e){return yn(e).getComputedStyle(e)}function _Ae(e){return["table","td","th"].indexOf(Hi(e))>=0}function _a(e){return((Ro(e)?e.ownerDocument:e.document)||window.document).documentElement}function y2(e){return Hi(e)==="html"?e:e.assignedSlot||e.parentNode||(Y3(e)?e.host:null)||_a(e)}function kE(e){return!Yn(e)||fa(e).position==="fixed"?null:e.offsetParent}function QAe(e){var t=/firefox/i.test(J3()),r=/Trident/i.test(J3());if(r&&Yn(e)){var n=fa(e);if(n.position==="fixed")return null}var i=y2(e);for(Y3(i)&&(i=i.host);Yn(i)&&["html","body"].indexOf(Hi(i))<0;){var a=fa(i);if(a.transform!=="none"||a.perspective!=="none"||a.contain==="paint"||["transform","perspective"].indexOf(a.willChange)!==-1||t&&a.willChange==="filter"||t&&a.filter&&a.filter!=="none")return i;i=i.parentNode}return null}function Fc(e){for(var t=yn(e),r=kE(e);r&&_Ae(r)&&fa(r).position==="static";)r=kE(r);return r&&(Hi(r)==="html"||Hi(r)==="body"&&fa(r).position==="static")?t:r||QAe(e)||t}function _3(e){return["top","bottom"].indexOf(e)>=0?"x":"y"}function Wc(e,t,r){return Vo(e,b2(t,r))}function KAe(e,t,r){var n=Wc(e,t,r);return n>r?r:n}function OE(){return{top:0,right:0,bottom:0,left:0}}function PE(e){return Object.assign({},OE(),e)}function TE(e,t){return t.reduce(function(r,n){return r[n]=e,r},{})}var qAe=function(t,r){return t=typeof t=="function"?t(Object.assign({},r.rects,{placement:r.placement})):t,PE(typeof t!="number"?t:TE(t,jc))};function $Ae(e){var t,r=e.state,n=e.name,i=e.options,a=r.elements.arrow,o=r.modifiersData.popperOffsets,s=zi(r.placement),c=_3(s),u=[rn,Zn].indexOf(s)>=0,f=u?"height":"width";if(!(!a||!o)){var A=qAe(i.padding,r),h=X3(a),g=c==="y"?tn:rn,m=c==="y"?Un:Zn,b=r.rects.reference[f]+r.rects.reference[c]-o[c]-r.rects.popper[f],w=o[c]-r.rects.reference[c],y=Fc(a),S=y?c==="y"?y.clientHeight||0:y.clientWidth||0:0,k=b/2-w/2,I=A[g],P=S-h[f]-A[m],M=S/2-h[f]/2+k,D=Wc(I,M,P),j=c;r.modifiersData[n]=(t={},t[j]=D,t.centerOffset=D-M,t)}}function epe(e){var t=e.state,r=e.options,n=r.element,i=n===void 0?"[data-popper-arrow]":n;i!=null&&(typeof i=="string"&&(i=t.elements.popper.querySelector(i),!i)||IE(t.elements.popper,i)&&(t.elements.arrow=i))}const tpe={name:"arrow",enabled:!0,phase:"main",fn:$Ae,effect:epe,requires:["popperOffsets"],requiresIfExists:["preventOverflow"]};function rl(e){return e.split("-")[1]}var rpe={top:"auto",right:"auto",bottom:"auto",left:"auto"};function npe(e,t){var r=e.x,n=e.y,i=t.devicePixelRatio||1;return{x:el(r*i)/i||0,y:el(n*i)/i||0}}function ME(e){var t,r=e.popper,n=e.popperRect,i=e.placement,a=e.variation,o=e.offsets,s=e.position,c=e.gpuAcceleration,u=e.adaptive,f=e.roundOffsets,A=e.isFixed,h=o.x,g=h===void 0?0:h,m=o.y,b=m===void 0?0:m,w=typeof f=="function"?f({x:g,y:b}):{x:g,y:b};g=w.x,b=w.y;var y=o.hasOwnProperty("x"),S=o.hasOwnProperty("y"),k=rn,I=tn,P=window;if(u){var M=Fc(r),D="clientHeight",j="clientWidth";if(M===yn(r)&&(M=_a(r),fa(M).position!=="static"&&s==="absolute"&&(D="scrollHeight",j="scrollWidth")),M=M,i===tn||(i===rn||i===Zn)&&a===Rc){I=Un;var V=A&&M===P&&P.visualViewport?P.visualViewport.height:M[D];b-=V-n.height,b*=c?1:-1}if(i===rn||(i===tn||i===Un)&&a===Rc){k=Zn;var W=A&&M===P&&P.visualViewport?P.visualViewport.width:M[j];g-=W-n.width,g*=c?1:-1}}var T=Object.assign({position:s},u&&rpe),B=f===!0?npe({x:g,y:b},yn(r)):{x:g,y:b};if(g=B.x,b=B.y,c){var N;return Object.assign({},T,(N={},N[I]=S?"0":"",N[k]=y?"0":"",N.transform=(P.devicePixelRatio||1)<=1?"translate("+g+"px, "+b+"px)":"translate3d("+g+"px, "+b+"px, 0)",N))}return Object.assign({},T,(t={},t[I]=S?b+"px":"",t[k]=y?g+"px":"",t.transform="",t))}function ipe(e){var t=e.state,r=e.options,n=r.gpuAcceleration,i=n===void 0?!0:n,a=r.adaptive,o=a===void 0?!0:a,s=r.roundOffsets,c=s===void 0?!0:s,u={placement:zi(t.placement),variation:rl(t.placement),popper:t.elements.popper,popperRect:t.rects.popper,gpuAcceleration:i,isFixed:t.options.strategy==="fixed"};t.modifiersData.popperOffsets!=null&&(t.styles.popper=Object.assign({},t.styles.popper,ME(Object.assign({},u,{offsets:t.modifiersData.popperOffsets,position:t.options.strategy,adaptive:o,roundOffsets:c})))),t.modifiersData.arrow!=null&&(t.styles.arrow=Object.assign({},t.styles.arrow,ME(Object.assign({},u,{offsets:t.modifiersData.arrow,position:"absolute",adaptive:!1,roundOffsets:c})))),t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-placement":t.placement})}const ape={name:"computeStyles",enabled:!0,phase:"beforeWrite",fn:ipe,data:{}};var C2={passive:!0};function ope(e){var t=e.state,r=e.instance,n=e.options,i=n.scroll,a=i===void 0?!0:i,o=n.resize,s=o===void 0?!0:o,c=yn(t.elements.popper),u=[].concat(t.scrollParents.reference,t.scrollParents.popper);return a&&u.forEach(function(f){f.addEventListener("scroll",r.update,C2)}),s&&c.addEventListener("resize",r.update,C2),function(){a&&u.forEach(function(f){f.removeEventListener("scroll",r.update,C2)}),s&&c.removeEventListener("resize",r.update,C2)}}const spe={name:"eventListeners",enabled:!0,phase:"write",fn:function(){},effect:ope,data:{}};var lpe={left:"right",right:"left",bottom:"top",top:"bottom"};function w2(e){return e.replace(/left|right|bottom|top/g,function(t){return lpe[t]})}var cpe={start:"end",end:"start"};function DE(e){return e.replace(/start|end/g,function(t){return cpe[t]})}function Q3(e){var t=yn(e),r=t.pageXOffset,n=t.pageYOffset;return{scrollLeft:r,scrollTop:n}}function K3(e){return tl(_a(e)).left+Q3(e).scrollLeft}function upe(e,t){var r=yn(e),n=_a(e),i=r.visualViewport,a=n.clientWidth,o=n.clientHeight,s=0,c=0;if(i){a=i.width,o=i.height;var u=EE();(u||!u&&t==="fixed")&&(s=i.offsetLeft,c=i.offsetTop)}return{width:a,height:o,x:s+K3(e),y:c}}function dpe(e){var t,r=_a(e),n=Q3(e),i=(t=e.ownerDocument)==null?void 0:t.body,a=Vo(r.scrollWidth,r.clientWidth,i?i.scrollWidth:0,i?i.clientWidth:0),o=Vo(r.scrollHeight,r.clientHeight,i?i.scrollHeight:0,i?i.clientHeight:0),s=-n.scrollLeft+K3(e),c=-n.scrollTop;return fa(i||r).direction==="rtl"&&(s+=Vo(r.clientWidth,i?i.clientWidth:0)-a),{width:a,height:o,x:s,y:c}}function q3(e){var t=fa(e),r=t.overflow,n=t.overflowX,i=t.overflowY;return/auto|scroll|overlay|hidden/.test(r+i+n)}function LE(e){return["html","body","#document"].indexOf(Hi(e))>=0?e.ownerDocument.body:Yn(e)&&q3(e)?e:LE(y2(e))}function Hc(e,t){var r;t===void 0&&(t=[]);var n=LE(e),i=n===((r=e.ownerDocument)==null?void 0:r.body),a=yn(n),o=i?[a].concat(a.visualViewport||[],q3(n)?n:[]):n,s=t.concat(o);return i?s:s.concat(Hc(y2(o)))}function $3(e){return Object.assign({},e,{left:e.x,top:e.y,right:e.x+e.width,bottom:e.y+e.height})}function fpe(e,t){var r=tl(e,!1,t==="fixed");return r.top=r.top+e.clientTop,r.left=r.left+e.clientLeft,r.bottom=r.top+e.clientHeight,r.right=r.left+e.clientWidth,r.width=e.clientWidth,r.height=e.clientHeight,r.x=r.left,r.y=r.top,r}function NE(e,t,r){return t===wE?$3(upe(e,r)):Ro(t)?fpe(t,r):$3(dpe(_a(e)))}function Ape(e){var t=Hc(y2(e)),r=["absolute","fixed"].indexOf(fa(e).position)>=0,n=r&&Yn(e)?Fc(e):e;return Ro(n)?t.filter(function(i){return Ro(i)&&IE(i,n)&&Hi(i)!=="body"}):[]}function ppe(e,t,r,n){var i=t==="clippingParents"?Ape(e):[].concat(t),a=[].concat(i,[r]),o=a[0],s=a.reduce(function(c,u){var f=NE(e,u,n);return c.top=Vo(f.top,c.top),c.right=b2(f.right,c.right),c.bottom=b2(f.bottom,c.bottom),c.left=Vo(f.left,c.left),c},NE(e,o,n));return s.width=s.right-s.left,s.height=s.bottom-s.top,s.x=s.left,s.y=s.top,s}function BE(e){var t=e.reference,r=e.element,n=e.placement,i=n?zi(n):null,a=n?rl(n):null,o=t.x+t.width/2-r.width/2,s=t.y+t.height/2-r.height/2,c;switch(i){case tn:c={x:o,y:t.y-r.height};break;case Un:c={x:o,y:t.y+t.height};break;case Zn:c={x:t.x+t.width,y:s};break;case rn:c={x:t.x-r.width,y:s};break;default:c={x:t.x,y:t.y}}var u=i?_3(i):null;if(u!=null){var f=u==="y"?"height":"width";switch(a){case $s:c[u]=c[u]-(t[f]/2-r[f]/2);break;case Rc:c[u]=c[u]+(t[f]/2-r[f]/2);break}}return c}function zc(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=n===void 0?e.placement:n,a=r.strategy,o=a===void 0?e.strategy:a,s=r.boundary,c=s===void 0?NAe:s,u=r.rootBoundary,f=u===void 0?wE:u,A=r.elementContext,h=A===void 0?Vc:A,g=r.altBoundary,m=g===void 0?!1:g,b=r.padding,w=b===void 0?0:b,y=PE(typeof w!="number"?w:TE(w,jc)),S=h===Vc?BAe:Vc,k=e.rects.popper,I=e.elements[m?S:h],P=ppe(Ro(I)?I:I.contextElement||_a(e.elements.popper),c,f,o),M=tl(e.elements.reference),D=BE({reference:M,element:k,strategy:"absolute",placement:i}),j=$3(Object.assign({},k,D)),V=h===Vc?j:M,W={top:P.top-V.top+y.top,bottom:V.bottom-P.bottom+y.bottom,left:P.left-V.left+y.left,right:V.right-P.right+y.right},T=e.modifiersData.offset;if(h===Vc&&T){var B=T[i];Object.keys(W).forEach(function(N){var _=[Zn,Un].indexOf(N)>=0?1:-1,X=[tn,Un].indexOf(N)>=0?"y":"x";W[N]+=B[X]*_})}return W}function hpe(e,t){t===void 0&&(t={});var r=t,n=r.placement,i=r.boundary,a=r.rootBoundary,o=r.padding,s=r.flipVariations,c=r.allowedAutoPlacements,u=c===void 0?SE:c,f=rl(n),A=f?s?xE:xE.filter(function(m){return rl(m)===f}):jc,h=A.filter(function(m){return u.indexOf(m)>=0});h.length===0&&(h=A);var g=h.reduce(function(m,b){return m[b]=zc(e,{placement:b,boundary:i,rootBoundary:a,padding:o})[zi(b)],m},{});return Object.keys(g).sort(function(m,b){return g[m]-g[b]})}function gpe(e){if(zi(e)===Z3)return[];var t=w2(e);return[DE(e),t,DE(t)]}function vpe(e){var t=e.state,r=e.options,n=e.name;if(!t.modifiersData[n]._skip){for(var i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!0:o,c=r.fallbackPlacements,u=r.padding,f=r.boundary,A=r.rootBoundary,h=r.altBoundary,g=r.flipVariations,m=g===void 0?!0:g,b=r.allowedAutoPlacements,w=t.options.placement,y=zi(w),S=y===w,k=c||(S||!m?[w2(w)]:gpe(w)),I=[w].concat(k).reduce(function(ce,te){return ce.concat(zi(te)===Z3?hpe(t,{placement:te,boundary:f,rootBoundary:A,padding:u,flipVariations:m,allowedAutoPlacements:b}):te)},[]),P=t.rects.reference,M=t.rects.popper,D=new Map,j=!0,V=I[0],W=0;W<I.length;W++){var T=I[W],B=zi(T),N=rl(T)===$s,_=[tn,Un].indexOf(B)>=0,X=_?"width":"height",Y=zc(t,{placement:T,boundary:f,rootBoundary:A,altBoundary:h,padding:u}),le=_?N?Zn:rn:N?Un:tn;P[X]>M[X]&&(le=w2(le));var fe=w2(le),se=[];if(a&&se.push(Y[B]<=0),s&&se.push(Y[le]<=0,Y[fe]<=0),se.every(function(ce){return ce})){V=T,j=!1;break}D.set(T,se)}if(j)for(var H=m?3:1,J=function(te){var Z=I.find(function(ee){var oe=D.get(ee);if(oe)return oe.slice(0,te).every(function(ue){return ue})});if(Z)return V=Z,"break"},re=H;re>0;re--){var ne=J(re);if(ne==="break")break}t.placement!==V&&(t.modifiersData[n]._skip=!0,t.placement=V,t.reset=!0)}}const mpe={name:"flip",enabled:!0,phase:"main",fn:vpe,requiresIfExists:["offset"],data:{_skip:!1}};function jE(e,t,r){return r===void 0&&(r={x:0,y:0}),{top:e.top-t.height-r.y,right:e.right-t.width+r.x,bottom:e.bottom-t.height+r.y,left:e.left-t.width-r.x}}function RE(e){return[tn,Zn,Un,rn].some(function(t){return e[t]>=0})}function bpe(e){var t=e.state,r=e.name,n=t.rects.reference,i=t.rects.popper,a=t.modifiersData.preventOverflow,o=zc(t,{elementContext:"reference"}),s=zc(t,{altBoundary:!0}),c=jE(o,n),u=jE(s,i,a),f=RE(c),A=RE(u);t.modifiersData[r]={referenceClippingOffsets:c,popperEscapeOffsets:u,isReferenceHidden:f,hasPopperEscaped:A},t.attributes.popper=Object.assign({},t.attributes.popper,{"data-popper-reference-hidden":f,"data-popper-escaped":A})}const ype={name:"hide",enabled:!0,phase:"main",requiresIfExists:["preventOverflow"],fn:bpe};function Cpe(e,t,r){var n=zi(e),i=[rn,tn].indexOf(n)>=0?-1:1,a=typeof r=="function"?r(Object.assign({},t,{placement:e})):r,o=a[0],s=a[1];return o=o||0,s=(s||0)*i,[rn,Zn].indexOf(n)>=0?{x:s,y:o}:{x:o,y:s}}function wpe(e){var t=e.state,r=e.options,n=e.name,i=r.offset,a=i===void 0?[0,0]:i,o=SE.reduce(function(f,A){return f[A]=Cpe(A,t.rects,a),f},{}),s=o[t.placement],c=s.x,u=s.y;t.modifiersData.popperOffsets!=null&&(t.modifiersData.popperOffsets.x+=c,t.modifiersData.popperOffsets.y+=u),t.modifiersData[n]=o}const xpe={name:"offset",enabled:!0,phase:"main",requires:["popperOffsets"],fn:wpe};function Spe(e){var t=e.state,r=e.name;t.modifiersData[r]=BE({reference:t.rects.reference,element:t.rects.popper,strategy:"absolute",placement:t.placement})}const Epe={name:"popperOffsets",enabled:!0,phase:"read",fn:Spe,data:{}};function Ipe(e){return e==="x"?"y":"x"}function kpe(e){var t=e.state,r=e.options,n=e.name,i=r.mainAxis,a=i===void 0?!0:i,o=r.altAxis,s=o===void 0?!1:o,c=r.boundary,u=r.rootBoundary,f=r.altBoundary,A=r.padding,h=r.tether,g=h===void 0?!0:h,m=r.tetherOffset,b=m===void 0?0:m,w=zc(t,{boundary:c,rootBoundary:u,padding:A,altBoundary:f}),y=zi(t.placement),S=rl(t.placement),k=!S,I=_3(y),P=Ipe(I),M=t.modifiersData.popperOffsets,D=t.rects.reference,j=t.rects.popper,V=typeof b=="function"?b(Object.assign({},t.rects,{placement:t.placement})):b,W=typeof V=="number"?{mainAxis:V,altAxis:V}:Object.assign({mainAxis:0,altAxis:0},V),T=t.modifiersData.offset?t.modifiersData.offset[t.placement]:null,B={x:0,y:0};if(M){if(a){var N,_=I==="y"?tn:rn,X=I==="y"?Un:Zn,Y=I==="y"?"height":"width",le=M[I],fe=le+w[_],se=le-w[X],H=g?-j[Y]/2:0,J=S===$s?D[Y]:j[Y],re=S===$s?-j[Y]:-D[Y],ne=t.elements.arrow,ce=g&&ne?X3(ne):{width:0,height:0},te=t.modifiersData["arrow#persistent"]?t.modifiersData["arrow#persistent"].padding:OE(),Z=te[_],ee=te[X],oe=Wc(0,D[Y],ce[Y]),ue=k?D[Y]/2-H-oe-Z-W.mainAxis:J-oe-Z-W.mainAxis,ye=k?-D[Y]/2+H+oe+ee+W.mainAxis:re+oe+ee+W.mainAxis,ve=t.elements.arrow&&Fc(t.elements.arrow),pe=ve?I==="y"?ve.clientTop||0:ve.clientLeft||0:0,ze=(N=T==null?void 0:T[I])!=null?N:0,st=le+ue-ze-pe,$t=le+ye-ze,an=Wc(g?b2(fe,st):fe,le,g?Vo(se,$t):se);M[I]=an,B[I]=an-le}if(s){var Pn,Er=I==="x"?tn:rn,F=I==="x"?Un:Zn,Et=M[P],jr=P==="y"?"height":"width",on=Et+w[Er],Jt=Et-w[F],Ii=[tn,rn].indexOf(y)!==-1,ga=(Pn=T==null?void 0:T[P])!=null?Pn:0,Jo=Ii?on:Et-D[jr]-j[jr]-ga+W.altAxis,Tn=Ii?Et+D[jr]+j[jr]-ga-W.altAxis:Jt,Mn=g&&Ii?KAe(Jo,Et,Tn):Wc(g?Jo:on,Et,g?Tn:Jt);M[P]=Mn,B[P]=Mn-Et}t.modifiersData[n]=B}}const Ope={name:"preventOverflow",enabled:!0,phase:"main",fn:kpe,requiresIfExists:["offset"]};function Ppe(e){return{scrollLeft:e.scrollLeft,scrollTop:e.scrollTop}}function Tpe(e){return e===yn(e)||!Yn(e)?Q3(e):Ppe(e)}function Mpe(e){var t=e.getBoundingClientRect(),r=el(t.width)/e.offsetWidth||1,n=el(t.height)/e.offsetHeight||1;return r!==1||n!==1}function Dpe(e,t,r){r===void 0&&(r=!1);var n=Yn(t),i=Yn(t)&&Mpe(t),a=_a(t),o=tl(e,i,r),s={scrollLeft:0,scrollTop:0},c={x:0,y:0};return(n||!n&&!r)&&((Hi(t)!=="body"||q3(a))&&(s=Tpe(t)),Yn(t)?(c=tl(t,!0),c.x+=t.clientLeft,c.y+=t.clientTop):a&&(c.x=K3(a))),{x:o.left+s.scrollLeft-c.x,y:o.top+s.scrollTop-c.y,width:o.width,height:o.height}}function Lpe(e){var t=new Map,r=new Set,n=[];e.forEach(function(a){t.set(a.name,a)});function i(a){r.add(a.name);var o=[].concat(a.requires||[],a.requiresIfExists||[]);o.forEach(function(s){if(!r.has(s)){var c=t.get(s);c&&i(c)}}),n.push(a)}return e.forEach(function(a){r.has(a.name)||i(a)}),n}function Npe(e){var t=Lpe(e);return ZAe.reduce(function(r,n){return r.concat(t.filter(function(i){return i.phase===n}))},[])}function Bpe(e){var t;return function(){return t||(t=new Promise(function(r){Promise.resolve().then(function(){t=void 0,r(e())})})),t}}function jpe(e){var t=e.reduce(function(r,n){var i=r[n.name];return r[n.name]=i?Object.assign({},i,n,{options:Object.assign({},i.options,n.options),data:Object.assign({},i.data,n.data)}):n,r},{});return Object.keys(t).map(function(r){return t[r]})}var VE={placement:"bottom",modifiers:[],strategy:"absolute"};function FE(){for(var e=arguments.length,t=new Array(e),r=0;r<e;r++)t[r]=arguments[r];return!t.some(function(n){return!(n&&typeof n.getBoundingClientRect=="function")})}function Rpe(e){e===void 0&&(e={});var t=e,r=t.defaultModifiers,n=r===void 0?[]:r,i=t.defaultOptions,a=i===void 0?VE:i;return function(s,c,u){u===void 0&&(u=a);var f={placement:"bottom",orderedModifiers:[],options:Object.assign({},VE,a),modifiersData:{},elements:{reference:s,popper:c},attributes:{},styles:{}},A=[],h=!1,g={state:f,setOptions:function(y){var S=typeof y=="function"?y(f.options):y;b(),f.options=Object.assign({},a,f.options,S),f.scrollParents={reference:Ro(s)?Hc(s):s.contextElement?Hc(s.contextElement):[],popper:Hc(c)};var k=Npe(jpe([].concat(n,f.options.modifiers)));return f.orderedModifiers=k.filter(function(I){return I.enabled}),m(),g.update()},forceUpdate:function(){if(!h){var y=f.elements,S=y.reference,k=y.popper;if(FE(S,k)){f.rects={reference:Dpe(S,Fc(k),f.options.strategy==="fixed"),popper:X3(k)},f.reset=!1,f.placement=f.options.placement,f.orderedModifiers.forEach(function(W){return f.modifiersData[W.name]=Object.assign({},W.data)});for(var I=0;I<f.orderedModifiers.length;I++){if(f.reset===!0){f.reset=!1,I=-1;continue}var P=f.orderedModifiers[I],M=P.fn,D=P.options,j=D===void 0?{}:D,V=P.name;typeof M=="function"&&(f=M({state:f,options:j,name:V,instance:g})||f)}}}},update:Bpe(function(){return new Promise(function(w){g.forceUpdate(),w(f)})}),destroy:function(){b(),h=!0}};if(!FE(s,c))return g;g.setOptions(u).then(function(w){!h&&u.onFirstUpdate&&u.onFirstUpdate(w)});function m(){f.orderedModifiers.forEach(function(w){var y=w.name,S=w.options,k=S===void 0?{}:S,I=w.effect;if(typeof I=="function"){var P=I({state:f,name:y,instance:g,options:k}),M=function(){};A.push(P||M)}})}function b(){A.forEach(function(w){return w()}),A=[]}return g}}var Vpe=[spe,Epe,ape,XAe,xpe,mpe,Ope,tpe,ype],Fpe=Rpe({defaultModifiers:Vpe}),Wpe=typeof Element<"u",Hpe=typeof Map=="function",zpe=typeof Set=="function",Gpe=typeof ArrayBuffer=="function"&&!!ArrayBuffer.isView;function x2(e,t){if(e===t)return!0;if(e&&t&&typeof e=="object"&&typeof t=="object"){if(e.constructor!==t.constructor)return!1;var r,n,i;if(Array.isArray(e)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(!x2(e[n],t[n]))return!1;return!0}var a;if(Hpe&&e instanceof Map&&t instanceof Map){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;for(a=e.entries();!(n=a.next()).done;)if(!x2(n.value[1],t.get(n.value[0])))return!1;return!0}if(zpe&&e instanceof Set&&t instanceof Set){if(e.size!==t.size)return!1;for(a=e.entries();!(n=a.next()).done;)if(!t.has(n.value[0]))return!1;return!0}if(Gpe&&ArrayBuffer.isView(e)&&ArrayBuffer.isView(t)){if(r=e.length,r!=t.length)return!1;for(n=r;n--!==0;)if(e[n]!==t[n])return!1;return!0}if(e.constructor===RegExp)return e.source===t.source&&e.flags===t.flags;if(e.valueOf!==Object.prototype.valueOf&&typeof e.valueOf=="function"&&typeof t.valueOf=="function")return e.valueOf()===t.valueOf();if(e.toString!==Object.prototype.toString&&typeof e.toString=="function"&&typeof t.toString=="function")return e.toString()===t.toString();if(i=Object.keys(e),r=i.length,r!==Object.keys(t).length)return!1;for(n=r;n--!==0;)if(!Object.prototype.hasOwnProperty.call(t,i[n]))return!1;if(Wpe&&e instanceof Element)return!1;for(n=r;n--!==0;)if(!((i[n]==="_owner"||i[n]==="__v"||i[n]==="__o")&&e.$$typeof)&&!x2(e[i[n]],t[i[n]]))return!1;return!0}return e!==e&&t!==t}var Upe=function(t,r){try{return x2(t,r)}catch(n){if((n.message||"").match(/stack|recursion/i))return console.warn("react-fast-compare cannot handle circular refs"),!1;throw n}};const Zpe=Wr(Upe);var Ype=[],Jpe=function(t,r,n){n===void 0&&(n={});var i=Ie.useRef(null),a={onFirstUpdate:n.onFirstUpdate,placement:n.placement||"bottom",strategy:n.strategy||"absolute",modifiers:n.modifiers||Ype},o=Ie.useState({styles:{popper:{position:a.strategy,left:"0",top:"0"},arrow:{position:"absolute"}},attributes:{}}),s=o[0],c=o[1],u=Ie.useMemo(function(){return{name:"updateState",enabled:!0,phase:"write",fn:function(g){var m=g.state,b=Object.keys(m.elements);qM.flushSync(function(){c({styles:yE(b.map(function(w){return[w,m.styles[w]||{}]})),attributes:yE(b.map(function(w){return[w,m.attributes[w]]}))})})},requires:["computeStyles"]}},[]),f=Ie.useMemo(function(){var h={onFirstUpdate:a.onFirstUpdate,placement:a.placement,strategy:a.strategy,modifiers:[].concat(a.modifiers,[u,{name:"applyStyles",enabled:!1}])};return Zpe(i.current,h)?i.current||h:(i.current=h,h)},[a.onFirstUpdate,a.placement,a.strategy,a.modifiers,u]),A=Ie.useRef();return CE(function(){A.current&&A.current.setOptions(f)},[f]),CE(function(){if(!(t==null||r==null)){var h=n.createPopper||Fpe,g=h(t,r,f);return A.current=g,function(){g.destroy(),A.current=null}}},[t,r,n.createPopper]),{state:A.current?A.current.state:null,styles:s.styles,attributes:s.attributes,update:A.current?A.current.update:null,forceUpdate:A.current?A.current.forceUpdate:null}},Xpe=function(){},_pe=function(){return Promise.resolve(null)},Qpe=[];function WE(e){var t=e.placement,r=t===void 0?"bottom":t,n=e.strategy,i=n===void 0?"absolute":n,a=e.modifiers,o=a===void 0?Qpe:a,s=e.referenceElement,c=e.onFirstUpdate,u=e.innerRef,f=e.children,A=Ie.useContext(TAe),h=Ie.useState(null),g=h[0],m=h[1],b=Ie.useState(null),w=b[0],y=b[1];Ie.useEffect(function(){LAe(u,g)},[u,g]);var S=Ie.useMemo(function(){return{placement:r,strategy:i,onFirstUpdate:c,modifiers:[].concat(o,[{name:"arrow",enabled:w!=null,options:{element:w}}])}},[r,i,c,o,w]),k=Jpe(s||A,g,S),I=k.state,P=k.styles,M=k.forceUpdate,D=k.update,j=Ie.useMemo(function(){return{ref:m,style:P.popper,placement:I?I.placement:r,hasPopperEscaped:I&&I.modifiersData.hide?I.modifiersData.hide.hasPopperEscaped:null,isReferenceHidden:I&&I.modifiersData.hide?I.modifiersData.hide.isReferenceHidden:null,arrowProps:{style:P.arrow,ref:y},forceUpdate:M||Xpe,update:D||_pe}},[m,y,r,I,P,D,M]);return MAe(f)(j)}const Gc=({children:e})=>{const[t]=x.useState(()=>document.createElement("div"));return x.useEffect(()=>{try{document.body.appendChild(t)}catch(r){console.log(r)}return()=>{try{document.body.removeChild(t)}catch(r){console.log(r)}}},[]),is.createPortal(e,t)},Kpe=G.div`
|
|
2229
2229
|
z-index: 5;
|
|
2230
2230
|
`,eg=({placement:e,wrapper:t,children:r,onClose:n,parentRef:i})=>{const a=ta({onClose:n,parentRef:i}),o=t||Kpe;return p.jsx(Gc,{children:p.jsx("div",{ref:a,children:p.jsx(WE,{innerRef:a,referenceElement:i.current,placement:e,children:({ref:s,style:c})=>p.jsx(o,{ref:s,style:c,children:r})})})})},qpe=G(ct)`
|
|
2231
2231
|
flex-shrink: 0;
|