@kosdev-code/base-ui-components 0.1.0-dev.5382 → 0.1.0-dev.5385
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/index.cjs +135 -130
- package/index.cjs.map +1 -1
- package/index.js +796 -791
- package/index.js.map +1 -1
- package/package.json +3 -3
package/index.cjs
CHANGED
|
@@ -1403,8 +1403,10 @@
|
|
|
1403
1403
|
flex-direction: column;
|
|
1404
1404
|
border: ${Bo("border-size")} solid ${Bo("border-color")};
|
|
1405
1405
|
box-shadow: 0px 0px 4px 0px rgba(0, 0, 0, 0.25);
|
|
1406
|
+
background-color: ${c("color-white")};
|
|
1406
1407
|
outline: 0;
|
|
1407
1408
|
z-index: 2;
|
|
1409
|
+
overflow: auto;
|
|
1408
1410
|
`,Bd=g.div`
|
|
1409
1411
|
display: flex;
|
|
1410
1412
|
align-items: center;
|
|
@@ -1426,6 +1428,7 @@
|
|
|
1426
1428
|
text-align: left;
|
|
1427
1429
|
overflow: hidden;
|
|
1428
1430
|
outline: 0;
|
|
1431
|
+
flex-shrink: 0;
|
|
1429
1432
|
column-gap: ${Oe("column-gap")};
|
|
1430
1433
|
${yr.map(e=>`&[data-color="${e}"] {
|
|
1431
1434
|
color: ${Un(`color-${e}`)};
|
|
@@ -2035,24 +2038,26 @@
|
|
|
2035
2038
|
display: flex;
|
|
2036
2039
|
align-items: center;
|
|
2037
2040
|
justify-content: flex-start;
|
|
2038
|
-
`,yf=({name:e,disabled:t,label:o,placeholder:n,className:r,handleError:s,autoFocus:a,wrap:l,readOnly:u,...f},p)=>{const{control:h}=K.useFormContext(),{field:{ref:m,...x},fieldState:{error:b}}=K.useController({name:e,control:h,rules:f,disabled:t}),y=d.useId(),k=z.useMergeRefs([m,p]);return i.jsx(M.ClassNames,{children:({cx:w})=>i.jsxs(Ke,{children:[i.jsxs(ws,{className:w({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:y,isValid:!b,required:!!f.required,children:o}),i.jsx(fn,{...x,id:y,placeholder:n,ref:k,autoComplete:"off",className:w(r,"form-text-area"),"aria-invalid":!!b,autoFocus:a,readOnly:u,wrap:l})]}),!!s&&i.jsx(Le,{handleError:s,name:e,hasLabel:!!o})]})})},kf=gt(yf),vf=({onSubmit:e,enabledIfClean:t,disabled:o,...n},r)=>{const{handleSubmit:s,setError:a,formState:{isValid:l,isSubmitting:u,dirtyFields:f}}=K.useFormContext(),p=d.useCallback(async x=>{await e(x,a)},[a,e]),h=Object.keys(f).length>0,m=!l||u||!t&&!h||o;return i.jsx(Ae,{type:"submit",...n,ref:r,disabled:m,onClick:s(p)})},mn=gt(vf),Cs=({disabled:e,isSmall:t,children:o,value:n,id:r,placeholder:s,prefixIcon:a,prefixIconColor:l,className:u,getLabel:f,getIcon:p,onSelect:h,onKeyDown:m})=>{var T,j;const x=d.useRef(n);d.useEffect(()=>{x.current=n},[n]);const b=d.useCallback(D=>{let W=p==null?void 0:p(D),V=f==null?void 0:f(D),R;return D&&d.Children.forEach(o,N=>{d.isValidElement(N)&&N.props.optionKey&&N.props.optionKey===D&&(R=N)}),R!==void 0&&d.isValidElement(R)&&R.props.label&&(V=V??R.props.label,W=W??R.props.prefixIconId),{label:V??"",iconId:W}},[o,p,f]),y=d.useCallback((D,W)=>{let V=null;return d.Children.forEach(D,(R,N)=>{d.isValidElement(R)&&R.props.optionKey&&R.props.optionKey===W&&(V=N)}),V},[]),[k,w]=d.useState(y(o,n));d.useEffect(()=>{w(y(o,x.current))},[o,y]);const[$,v]=d.useState((T=b(n))==null?void 0:T.label),[S,C]=d.useState((j=b(n))==null?void 0:j.iconId);return d.useEffect(()=>{const D=b(n);v(D==null?void 0:D.label),C(D==null?void 0:D.iconId)},[n,b]),i.jsx(M.ClassNames,{children:({cx:D})=>i.jsx(
|
|
2041
|
+
`,yf=({name:e,disabled:t,label:o,placeholder:n,className:r,handleError:s,autoFocus:a,wrap:l,readOnly:u,...f},p)=>{const{control:h}=K.useFormContext(),{field:{ref:m,...x},fieldState:{error:b}}=K.useController({name:e,control:h,rules:f,disabled:t}),y=d.useId(),k=z.useMergeRefs([m,p]);return i.jsx(M.ClassNames,{children:({cx:w})=>i.jsxs(Ke,{children:[i.jsxs(ws,{className:w({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:y,isValid:!b,required:!!f.required,children:o}),i.jsx(fn,{...x,id:y,placeholder:n,ref:k,autoComplete:"off",className:w(r,"form-text-area"),"aria-invalid":!!b,autoFocus:a,readOnly:u,wrap:l})]}),!!s&&i.jsx(Le,{handleError:s,name:e,hasLabel:!!o})]})})},kf=gt(yf),vf=({onSubmit:e,enabledIfClean:t,disabled:o,...n},r)=>{const{handleSubmit:s,setError:a,formState:{isValid:l,isSubmitting:u,dirtyFields:f}}=K.useFormContext(),p=d.useCallback(async x=>{await e(x,a)},[a,e]),h=Object.keys(f).length>0,m=!l||u||!t&&!h||o;return i.jsx(Ae,{type:"submit",...n,ref:r,disabled:m,onClick:s(p)})},mn=gt(vf),Cs=({disabled:e,isSmall:t,children:o,value:n,id:r,placeholder:s,prefixIcon:a,prefixIconColor:l,className:u,getLabel:f,getIcon:p,onSelect:h,onKeyDown:m})=>{var T,j;const x=d.useRef(n);d.useEffect(()=>{x.current=n},[n]);const b=d.useCallback(D=>{let W=p==null?void 0:p(D),V=f==null?void 0:f(D),R;return D&&d.Children.forEach(o,N=>{d.isValidElement(N)&&N.props.optionKey&&N.props.optionKey===D&&(R=N)}),R!==void 0&&d.isValidElement(R)&&R.props.label&&(V=V??R.props.label,W=W??R.props.prefixIconId),{label:V??"",iconId:W}},[o,p,f]),y=d.useCallback((D,W)=>{let V=null;return d.Children.forEach(D,(R,N)=>{d.isValidElement(R)&&R.props.optionKey&&R.props.optionKey===W&&(V=N)}),V},[]),[k,w]=d.useState(y(o,n));d.useEffect(()=>{w(y(o,x.current))},[o,y]);const[$,v]=d.useState((T=b(n))==null?void 0:T.label),[S,C]=d.useState((j=b(n))==null?void 0:j.iconId);return d.useEffect(()=>{const D=b(n);v(D==null?void 0:D.label),C(D==null?void 0:D.iconId)},[n,b]),i.jsx(M.ClassNames,{children:({cx:D})=>i.jsx(Cf,{onSelect:h,disabled:e,matchReferenceWidth:!0,selectedIndex:k,onSelectedIndexChange:w,Reference:i.jsx(wf,{value:$??"",disabled:e,onChange:_e,id:r,onKeyDown:m,isSmall:t,prefixIconId:a||S,prefixIconColor:l,type:"text",placeholder:s,autoComplete:"off",className:D(u,"form-input"),suffixIconId:"Down",suffixIconColor:e?"grey":"black"}),children:o})})},wf=g(xt)`
|
|
2039
2042
|
caret-color: transparent;
|
|
2040
2043
|
user-select: none;
|
|
2041
2044
|
-webkit-user-select: none;
|
|
2042
|
-
`,Cf=(
|
|
2045
|
+
`,Cf=g(yt)`
|
|
2046
|
+
max-height: 300px;
|
|
2047
|
+
`,$f=({name:e,disabled:t,label:o,handleError:n,children:r,placeholder:s,prefixIcon:a,prefixIconColor:l,className:u,readOnly:f,onSelectionChange:p,...h})=>{const{control:m}=K.useFormContext(),{field:{ref:x,...b},fieldState:{error:y}}=K.useController({name:e,control:m,rules:h,disabled:t}),k=d.useId(),{onChange:w}=b,$=d.useCallback(v=>{w(v),p&&p(v)},[w,p]);return i.jsx(M.ClassNames,{children:({cx:v})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:v({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:k,isValid:!y,required:!!h.required,children:o}),i.jsx(Cs,{disabled:t||f,onSelect:$,className:u,id:k,value:b.value,children:r})]}),!!n&&i.jsx(Le,{handleError:n,name:e,hasLabel:!!o}),i.jsx(gn,{ref:x,...b})]})})},Sf=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:a,prefixIconId:l,prefixIconColor:u,suffixIconColor:f,suffixIconId:p,autoFocus:h,readOnly:m,bold:x,...b},y)=>{const{control:k}=K.useFormContext(),{field:{ref:w,...$},fieldState:{error:v}}=K.useController({name:e,control:k,rules:b,disabled:t}),S=d.useId(),C=z.useMergeRefs([w,y]);return i.jsx(M.ClassNames,{children:({cx:T})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:T({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:S,isValid:!v,required:!!b.required,children:o}),m?i.jsx(jf,{children:i.jsx(E,{variant:"body",color:"dark",bold:x,children:$.value||n||""})}):i.jsx(xt,{...$,onChange:j=>{b.autoTrim?$.onChange(j.target.value.trim()):$.onChange(j.target.value)},id:S,type:r,autoFocus:h,placeholder:n,ref:C,autoComplete:"off",prefixIconColor:u,prefixIconId:l,suffixIconId:p,suffixIconColor:f,className:T(s,"form-input"),"aria-invalid":!!v})]}),!!a&&i.jsx(Le,{handleError:a,name:e,hasLabel:!!o})]})})},bn=gt(Sf),jf=g.div`
|
|
2043
2048
|
width: 100%;
|
|
2044
2049
|
min-height: 40px;
|
|
2045
2050
|
display: flex;
|
|
2046
2051
|
align-items: center;
|
|
2047
2052
|
padding: 8px 0;
|
|
2048
|
-
`,
|
|
2053
|
+
`,Tf=({areaField:e,name:t,disabled:o,readOnly:n,label:r,handleError:s,children:a,className:l,...u})=>{const{control:f}=K.useFormContext(),{field:p,fieldState:{error:h,...m}}=K.useController({name:t,control:f,rules:u,disabled:o}),x=d.useId(),b=e?ws:We;return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(Ke,{className:l,children:[i.jsxs(b,{className:y("form-input-wrapper",{hasLabel:!!r}),children:[r&&i.jsx(ke,{formItemId:x,isValid:!h,required:!!u.required,children:r}),a(p,{error:h,readOnly:n,...m})]}),!!s&&i.jsx(Le,{handleError:s,name:t,hasLabel:!!r})]})})},Df=({name:e,disabled:t,label:o,className:n,handleError:r,readOnly:s,...a},l)=>{const{control:u}=K.useFormContext(),{field:{ref:f,...p},fieldState:{error:h}}=K.useController({name:e,control:u,rules:a,disabled:t}),m=d.useId(),x=z.useMergeRefs([f,l]),b=d.useCallback(y=>{y.target.blur(),p.onChange(y)},[p]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:y({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:m,isValid:!h,required:!!a.required,children:o}),i.jsx(bt,{checked:!!p.value,disabled:p.disabled||s,onChange:b,id:m,ref:x,className:y(n,"form-checkbox"),"aria-invalid":!!h})]}),!!r&&i.jsx(Le,{handleError:r,name:e,hasLabel:!!o})]})})},Mf=gt(Df),[Rt]=O(["form"]),Zn=({control:e,name:t,t:o,readOnly:n})=>{const{field:{onChange:r,value:s,disabled:a}}=K.useController({name:t,control:e,rules:{},disabled:!1}),l=d.useId();return i.jsxs(Ef,{children:[i.jsx(zf,{isValid:!0,formItemId:l,children:(o==null?void 0:o(`access.${t==="locked"?"lock":"hide"}Label`))??t==="locked"?"Lock":"Hide"}),i.jsx(io,{checked:s,readOnly:a||n,onChange:r,id:l})]})},Ef=g.div`
|
|
2049
2054
|
display: flex;
|
|
2050
2055
|
align-items: center;
|
|
2051
2056
|
justify-content: flex-start;
|
|
2052
2057
|
column-gap: ${Rt("access-toggle-gap")};
|
|
2053
|
-
`,
|
|
2058
|
+
`,zf=g(ke)`
|
|
2054
2059
|
width: auto;
|
|
2055
|
-
`,
|
|
2060
|
+
`,Of=({className:e,t,isAdmin:o,hideHide:n,hideLock:r})=>{const{control:s}=K.useFormContext(),a=K.useWatch();return o?i.jsxs(If,{className:e,children:[i.jsx(E,{textAlign:"right",variant:"body",color:"dark",children:(t==null?void 0:t("access.label"))??"Access:"}),i.jsxs(Rf,{children:[!n&&i.jsx(Zn,{name:"hidden",readOnly:!!a.locked,control:s}),!r&&i.jsx(Zn,{name:"locked",control:s})]})]}):null},If=g.div`
|
|
2056
2061
|
width: 100%;
|
|
2057
2062
|
display: grid;
|
|
2058
2063
|
align-items: center;
|
|
@@ -2061,30 +2066,30 @@
|
|
|
2061
2066
|
grid-template-columns: ${Rt("label-width")} 1fr;
|
|
2062
2067
|
height: ${Rt("access-toggle-height")};
|
|
2063
2068
|
column-gap: ${Rt("label-column-gap")};
|
|
2064
|
-
`,
|
|
2069
|
+
`,Rf=g.div`
|
|
2065
2070
|
width: 100%;
|
|
2066
2071
|
height: 100%;
|
|
2067
2072
|
display: flex;
|
|
2068
2073
|
align-items: center;
|
|
2069
2074
|
justify-content: flex-start;
|
|
2070
2075
|
column-gap: ${Rt("label-column-gap")};
|
|
2071
|
-
`,
|
|
2076
|
+
`,Nf=d.memo(({nameBlackList:e,maxLength:t,t:o,...n})=>{const r=d.useCallback(s=>Br.test(s)?t&&s.length>t?(o==null?void 0:o("form.tooLongName"))??`Cannot be longer than ${t}.`:e&&e.includes(s)?(o==null?void 0:o("form.duplicateName"))??"This name is already taken":!0:(o==null?void 0:o("form.noLeadingOrTrailingSpacesName"))??"Cannot have leading or trailing spaces.",[t,e,o]);return i.jsx(bn,{validate:r,handleError:"message",name:"name",...n})}),Ff=({name:e,disabled:t,label:o,placeholder:n,type:r,className:s,handleError:a,prefixIconId:l,prefixIconColor:u,suffixIconColor:f,suffixIconId:p,autoFocus:h,readOnly:m,options:x,useLabelAsValue:b,...y})=>{const{control:k}=K.useFormContext(),{field:{ref:w,...$},fieldState:{error:v}}=K.useController({name:e,control:k,rules:y,disabled:t}),S=d.useId(),C=d.useCallback((j,D)=>{$.onChange(D??"")},[$]),T=d.useMemo(()=>{if($.value)return{id:$.value,name:$.value}},[$.value]);return i.jsx(M.ClassNames,{children:({cx:j})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:j({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:S,isValid:!v,required:!!y.required,children:o}),i.jsx(bs,{options:x,selected:T,onSelectionChange:C,children:i.jsxs(Af,{children:[i.jsx(no,{variant:"body",color:"dark",children:$.value}),i.jsx(_f,{children:i.jsx(_,{iconId:"Down",size:"sm",color:"black"})})]})})]}),!!a&&i.jsx(Le,{handleError:a,name:e,hasLabel:!!o}),i.jsx(gn,{ref:w,...$})]})})},Af=g(xs)`
|
|
2072
2077
|
height: 29px;
|
|
2073
2078
|
width: 100%;
|
|
2074
|
-
`,
|
|
2079
|
+
`,_f=g.div`
|
|
2075
2080
|
width: 100%;
|
|
2076
2081
|
height: 100%;
|
|
2077
2082
|
display: flex;
|
|
2078
2083
|
align-items: center;
|
|
2079
2084
|
justify-content: center;
|
|
2080
|
-
`,
|
|
2085
|
+
`,Lf=({name:e,disabled:t,label:o,handleError:n,readOnly:r,placeholder:s,...a})=>{const{control:l}=K.useFormContext(),u=d.useRef(null),{field:{ref:f,value:p,onChange:h,...m},fieldState:{error:x}}=K.useController({name:e,control:l,rules:a,disabled:t}),b=d.useId(),y=z.useMergeRefs([f,u]),k=d.useCallback(()=>{u.current&&u.current.click()},[]),w=d.useCallback(S=>{S.preventDefault()},[]),$=d.useCallback(S=>{S.preventDefault();let C=!1;if(S.dataTransfer.items.length)for(let T=0;T<S.dataTransfer.items.length&&!C;T++){const j=S.dataTransfer.items[T];if(j.kind==="file"){const D=j.getAsFile();D&&(C=!0,h(D))}}},[h]),v=d.useCallback(()=>{h(void 0)},[h]);return i.jsx(M.ClassNames,{children:({cx:S})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:S({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:b,isValid:!x,required:!!a.required,children:o}),p?i.jsxs(Pf,{children:[i.jsx(_,{iconId:"File",size:"sm",color:"black"}),i.jsx(E,{variant:"body",color:"dark",children:p.name}),i.jsx(Hf,{onClick:v,iconId:"Close",size:"sm",color:"black"})]}):i.jsxs(Wf,{onDrop:$,onClick:k,onDragOver:w,children:[i.jsx(_,{iconId:"File",size:"med",color:"black"}),i.jsx(E,{variant:"body",color:"dark",children:s})]}),i.jsx(Bf,{value:p==null?void 0:p.fileName,...m,id:b,onChange:C=>{C.target.files&&h(C.target.files[0])},type:"file",ref:y})]}),!!n&&i.jsx(Le,{handleError:n,name:e,hasLabel:!!o})]})})},$s=g.div`
|
|
2081
2086
|
width: 100%;
|
|
2082
2087
|
padding: ${c("spacing-12")};
|
|
2083
2088
|
display: flex;
|
|
2084
2089
|
border: 1px solid ${c("color-grey30")};
|
|
2085
2090
|
background-color: ${c("color-grey10")};
|
|
2086
2091
|
border-radius: ${c("spacing-6")};
|
|
2087
|
-
`,
|
|
2092
|
+
`,Wf=g($s)`
|
|
2088
2093
|
align-items: center;
|
|
2089
2094
|
justify-content: center;
|
|
2090
2095
|
flex-direction: column;
|
|
@@ -2094,31 +2099,31 @@
|
|
|
2094
2099
|
:hover {
|
|
2095
2100
|
border-color: ${c("color-grey50")};
|
|
2096
2101
|
}
|
|
2097
|
-
`,
|
|
2102
|
+
`,Bf=g.input`
|
|
2098
2103
|
display: none;
|
|
2099
|
-
`,
|
|
2104
|
+
`,Pf=g($s)`
|
|
2100
2105
|
align-items: flex-start;
|
|
2101
2106
|
justify-content: flex-start;
|
|
2102
2107
|
column-gap: ${c("spacing-4")};
|
|
2103
|
-
`,
|
|
2108
|
+
`,Hf=g(ne)`
|
|
2104
2109
|
margin-left: auto;
|
|
2105
|
-
`,
|
|
2110
|
+
`,Vf=({name:e,disabled:t,label:o,handleError:n,options:r,selectAllHidden:s,SelectAllItemTemplate:a,ListItemTemplate:l,SelectedItemTemplate:u,className:f,readOnly:p,closeOnSelect:h,...m})=>{const{control:x}=K.useFormContext(),{field:{value:b,onChange:y},fieldState:{error:k}}=K.useController({name:e,control:x,rules:m,disabled:t}),w=d.useId(),$=d.useCallback(v=>{y(v)},[y]);return i.jsx(M.ClassNames,{children:({cx:v})=>i.jsxs(Ke,{children:[i.jsxs(We,{className:v({hasLabel:!!o}),children:[o&&i.jsx(ke,{formItemId:w,isValid:!k,required:!!m.required,children:o}),i.jsx(ms,{disabled:t||p,options:r,closeOnSelect:h,onChange:$,selected:b,className:f,SelectAllItemTemplate:a,ListItemTemplate:l,SelectedItemTemplate:u})]}),!!n&&i.jsx(Le,{handleError:n,name:e,hasLabel:!!o})]})})},Lt=(e,t)=>{const[o,n]=d.useState(!1);return d.useEffect(()=>{async function r(){var s;e!=null&&e.init&&(await((s=e.init)==null?void 0:s.call(e)),t==null||t()),n(!0)}return r(),()=>{var s;(s=e==null?void 0:e.dispose)==null||s.call(e)}},[t,e]),o},Wt=d.createContext({isSelected:()=>!1,selected:[],toggleSelection:_e,isDisabled:!1}),et=()=>{const e=d.useContext(Wt);return e||{isSelected:()=>!1,selected:[],toggleSelection:_e,isDisabled:!1}};function Ho(e){return e.context!==void 0}const xn=d.createContext(null),yn=({children:e,dataProvider:t,onListItemAction:o})=>{const[n,r]=d.useState(),s=d.useMemo(()=>t?{action:o,data:n}:{data:new Map,action:o},[t,n,o]);return d.useEffect(()=>{var l;const a=u=>{r(u)};if(t&&Ho(t)){const u=t.context;(l=t.addContextChangeListener)==null||l.call(t,a),u&&r(u)}return()=>{var u;t&&Ho(t)&&((u=t==null?void 0:t.removeContextChangeListener)==null||u.call(t,a))}},[t]),i.jsx(xn.Provider,{value:s,children:e})},Gf=()=>{const e=d.useContext(xn);return e||L.KosLog.info("useListDataContext must be used within a DataProviderContextProvider"),e},Uf=e=>t=>o=>()=>o.call(e,t);class kn{constructor(t,o,n,r){G(this,"parent");G(this,"_itemMap");G(this,"disposer");G(this,"_items");G(this,"listeners",[]);G(this,"context");G(this,"resolvedItems");G(this,"resolver");G(this,"version");G(this,"initialized");this.parent=t,this.context=P.observable.map(new Map(Object.entries(r||{}))),this.version=0,this._itemMap=n,this.initialized=!1,this._items=P.observable.map(new Map),this.resolvedItems=[],this.resolver=o.bind(t),this.listeners=[],P.makeObservable(this,{items:P.computed,initialized:P.observable,version:P.observable,refresh:P.action,resolvedItems:P.observable,context:P.observable})}filterByInputItem(t,o){return!!t}sortByInputItem(t,o){var n;return t.name?(n=t.name)==null?void 0:n.localeCompare(o.name):-1}filterItem(t,o){return!0}sortItem(t,o){return 0}refresh(){this.version=this.version+1}get items(){if(!this.initialized||this.version<0)return[];const t=this.resolvedItems,o=[...new Set(t)],n=f=>this._itemMap(f,this.context),r=f=>this.filterByInputItem(f,this.context),s=o.filter(r.bind(this)).sort(this.sortByInputItem.bind(this)).map(n),a=f=>this.filterItem(f,this.context),l=s.filter(a.bind(this)).sort(this.sortItem.bind(this));return Array.from(this._items.keys()).filter(f=>!l.find(p=>p.id===f)).forEach(f=>{L.kosAction(()=>{this._items.delete(f)})}),l.reduce((f,p)=>{if(!f.has(p.id))L.kosAction(()=>{f.set(p.id,p)});else{const h=f.get(p.id);h&&L.kosAction(()=>{const m=Object.assign(h,p);f.set(p.id,m)})}return f},this._items),l.map(f=>this._items.get(f.id))}async init(){if(!this.initialized){if(L.isKosDataModel(this.parent)&&await L.whenReady(this.parent),this.resolver){const t=Uf(this.parent)(this.context)(this.resolver);this.disposer=P.reaction(t,o=>{this.resolvedItems=o,this.refresh()},{fireImmediately:!0})}L.kosAction(()=>{this.initialized=!0})}}whenReady(){return new Promise(t=>{const o=L.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}updateContextValue(t,o){L.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}dispose(){this.disposer&&this.disposer(),L.kosAction(()=>{this.initialized=!1})}}const Yf=e=>e.data!==void 0,Ss=e=>t=>()=>{const o=[];return(Array.isArray(t)?t:[t]).forEach(r=>{const s=e[r];Yf(s)?o.push(...s.data):Array.isArray(s)&&o.push(...s)}),o};class vn extends kn{constructor(o,n,r,s){super(o,Ss(o)(n),r,s);G(this,"_key");this._key=Array.isArray(n)?n:[n]}}class Kf extends vn{constructor(t,o,n,r){super(t,o,n,r),P.makeObservable(this,{groups:P.computed,itemsByGroup:P.computed})}get itemsByGroup(){return this.items.reduce((t,o)=>{const n=o.group.groupId;return t[n]||(t[n]=[]),t[n].push(o),t},{})}get groups(){return this.items.map(t=>t.group).sort(this.sortGroup.bind(this))}getGroupItems(t){return this.itemsByGroup[t]||[]}sortGroup(t,o){return t.name.localeCompare(o.name)}}class qf{constructor(t,o=[]){G(this,"items");G(this,"parent");this.parent=t,this.items=o.map(n=>({id:`${this.parent.id}-${n.name.toString()}`,name:n.key||n.name.toString(),data:n,value:this.parent[n.name]}))}}class Zf{constructor(t,o,n,r,s){G(this,"parent");G(this,"_itemMap");G(this,"rootResolver");G(this,"childResolver");G(this,"rootDisposer");G(this,"childDisposers");G(this,"loadingStates");G(this,"loadedChildren");G(this,"rootItems");G(this,"context");G(this,"_itemCache");G(this,"_branchCache");G(this,"_originalItems");G(this,"version");G(this,"initialized");this.parent=t,this.context=P.observable.map(new Map(Object.entries(s||{}))),this.loadingStates=P.observable.map(new Map),this.loadedChildren=P.observable.map(new Map),this.rootItems=P.observable.array([]),this._itemCache=P.observable.map(new Map),this._branchCache=P.observable.map(new Map),this._originalItems=new Map,this.childDisposers=new Map,this.version=0,this.initialized=!1,this._itemMap=r,this.rootResolver=o.bind(t),this.childResolver=n.bind(t),P.makeObservable(this,{rootItems:P.observable.shallow,loadingStates:P.observable.shallow,loadedChildren:P.observable.shallow,context:P.observable,version:P.observable,initialized:P.observable,tree:P.computed,originalItems:P.computed,expandBranch:P.action,collapseBranch:P.action,clearCache:P.action,refresh:P.action})}filterByInputItem(t,o){return!0}sortByInputItem(t,o){return 0}filterItem(t,o){return!0}sortItem(t,o){return 0}async getRootItems(){return await this.rootResolver.call(this.parent,this.context)}async getChildren(t,o){return await this.childResolver.call(this.parent,t,o)}itemMap(t,o){return this._itemMap(t,o)}refresh(){this.version=this.version+1}updateContextValue(t,o){L.kosAction(()=>{this.context.set(t,o),this.refresh()})}removeContextValue(t){this.context.delete(t),this.refresh()}get tree(){return this.version,this.buildAsyncTree(this.rootItems)}get originalItems(){return this._originalItems}buildAsyncTree(t,o){return[...[...t.filter(u=>this.filterByInputItem(u,this.context))].sort(this.sortByInputItem.bind(this)).map(u=>{const f=this.getItemId(u);this._originalItems.set(f,u);let p=this._itemCache.get(f);return p?Object.assign(p,this._itemMap(u,this.context)):(p=this._itemMap(u,this.context),this._itemCache.set(f,p)),p}).filter(u=>this.filterItem(u,this.context))].sort(this.sortItem.bind(this)).map(u=>{const f=u.id,p=this._originalItems.get(f),h=this.loadedChildren.get(f),m=this.loadingStates.get(f)||{status:"idle"};let x=this._branchCache.get(f);return x?L.kosAction(()=>{x&&(Object.assign(x,u),x.loadingState=m,x.hasChildren=this.hasChildren(p),x.isLeaf=this.hasChildren(p)===!1)}):(x={...u,branches:[],loadingState:m,hasChildren:this.hasChildren(p),isLeaf:this.hasChildren(p)===!1},this._branchCache.set(f,x)),L.kosAction(()=>{x&&(x.branches=h?this.buildAsyncTree(h,f):[])}),x})}async expandBranch(t,o){const n=this.loadingStates.get(t);if(!((n==null?void 0:n.status)==="loading"||(n==null?void 0:n.status)==="loaded")){L.kosAction(()=>{this.loadingStates.set(t,{status:"loading",timestamp:Date.now()})});try{const r=()=>this.childResolver.call(this.parent,o,this.context),s=P.reaction(r,async a=>{try{const l=await a;L.kosAction(()=>{this.loadedChildren.set(t,l),this.loadingStates.set(t,{status:"loaded",timestamp:Date.now()})})}catch(l){L.kosAction(()=>{this.loadingStates.set(t,{status:"error",error:l,timestamp:Date.now()})})}},{fireImmediately:!0});this.childDisposers.set(t,s)}catch(r){L.kosAction(()=>{this.loadingStates.set(t,{status:"error",error:r,timestamp:Date.now()})})}}}collapseBranch(t){const o=this.childDisposers.get(t);o&&(o(),this.childDisposers.delete(t)),L.kosAction(()=>{this.loadedChildren.delete(t),this.loadingStates.set(t,{status:"idle"}),this._branchCache.delete(t)})}clearCache(t){if(t){const o=this.childDisposers.get(t);o&&(o(),this.childDisposers.delete(t))}else this.childDisposers.forEach(o=>o()),this.childDisposers.clear();L.kosAction(()=>{t?(this.loadedChildren.delete(t),this.loadingStates.delete(t),this._branchCache.delete(t),this._itemCache.delete(t),this._originalItems.delete(t)):(this.loadedChildren.clear(),this.loadingStates.clear(),this._branchCache.clear(),this._itemCache.clear(),this._originalItems.clear())})}async init(){if(this.initialized)return;L.isKosDataModel(this.parent)&&await L.whenReady(this.parent);const t=()=>this.rootResolver.call(this.parent,this.context);this.rootDisposer=P.reaction(t,async o=>{try{const n=await o;L.kosAction(()=>{this.rootItems.replace(n)})}catch(n){console.error("Failed to load root items:",n)}},{fireImmediately:!0}),L.kosAction(()=>{this.initialized=!0})}whenReady(){return new Promise(t=>{const o=L.kosAutoEffect(()=>{this.initialized&&(t(),o())})})}dispose(){this.rootDisposer&&this.rootDisposer(),this.childDisposers.forEach(t=>t()),this.childDisposers.clear(),L.kosAction(()=>{this.loadedChildren.clear(),this.loadingStates.clear(),this._branchCache.clear(),this._itemCache.clear(),this._originalItems.clear(),this.rootItems.replace([]),this.initialized=!1})}}function Ft(e){return e.build!==void 0}const Xf=g.div`
|
|
2106
2111
|
width: 100%;
|
|
2107
|
-
`,
|
|
2112
|
+
`,Jf=(e,t,o)=>e.items.map(n=>{const r=Ft(t)?t.build(n):t;return i.jsx(r,{"data-key":n.id,...n,onListItemAction:o},n.id)}),wn=L.kosComponent(({dataProvider:e,firstChild:t,ItemTemplate:o,lastChild:n,onListItemAction:r,onInit:s,emptyState:a,className:l,itemListRenderer:u=Jf})=>{const f=Lt(e,s),p=f&&e?u(e,o,r):[];return i.jsx(yn,{dataProvider:e||void 0,onListItemAction:r,children:i.jsxs(Xf,{className:l,children:[t,f?p.length===0&&a?a:p:null,n]})})}),co=L.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:a,...l})=>{const[u,f]=d.useState(o??[]),p=d.useRef(u??[]);d.useLayoutEffect(()=>{p.current=u},[u]),d.useEffect(()=>{f(o??[])},[o]);const h=d.useCallback(b=>{t(b,p.current.includes(b)?"unselected":"selected"),f(y=>e?[b]:y.includes(b)?y.filter(k=>k!==b):[...y,b])},[e,t]),m=d.useCallback(b=>p.current.includes(b),[]),x=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:h,isDisabled:!!n}),[m,u,h,n]);return d.useEffect(()=>{var b,y;if(r&&(s!=null&&s.items)&&p.current.length===0){let k;a?k=(b=a(s.items))==null?void 0:b.id:k=(y=s.items[0])==null?void 0:y.id,k&&h(k)}},[r,s==null?void 0:s.items,a,h]),i.jsx(Wt.Provider,{value:x,children:i.jsx(wn,{dataProvider:s,...l})})});function js(e){return e.build!==void 0}const Qf=e=>(t,o,n)=>t.groups.reduce((s,a)=>s.find(l=>l.groupId===a.groupId)?s:[...s,a],[]).map(s=>{const a=js(e)?e.build(s):e,u=t.getGroupItems(s.groupId).map(f=>{const p=Ft(o)?o.build(f):o;return i.jsx(p,{"data-key":f.id,...f,onListItemAction:n},f.id)});return i.jsx(a,{groupId:s.groupId,name:s.name,children:u},s.groupId)}),Cn=d.createContext({openedGroups:[],toggleGroup:_e});function ep(e){const t=e.supportMultipleOpen??!0,[o,n]=d.useState(e.openedGroups??[]),r=d.useCallback(a=>{var l;(l=e.onGroupOpen)==null||l.call(e,a,o.includes(a)?"closed":"opened"),n(u=>t?u.includes(a)?u.filter(f=>f!==a):[...u,a]:[a])},[o,e,t]);d.useEffect(()=>{n(e.openedGroups??[])},[e.openedGroups]);const s=d.useMemo(()=>({openedGroups:o,toggleGroup:r}),[o,r]);return i.jsx(Cn.Provider,{value:s,children:i.jsx(co,{...e,itemListRenderer:Qf(e.GroupTemplate)})})}const Ts=()=>{const e=d.useContext(Cn);return e||{openedGroups:[],toggleGroup:_e}},tp=({children:e,name:t,groupId:o,className:n})=>{const{openedGroups:r,toggleGroup:s}=Ts(),a=r.includes(o),l=d.useCallback(()=>{s(o)},[o,s]);return i.jsxs(Ds,{className:n,children:[i.jsxs(np,{"data-open":a,onClick:l,children:[a?i.jsx(_,{iconId:"CaretDown",size:"xsm"}):i.jsx(_,{iconId:"CaretRight",size:"xsm"}),i.jsx(E,{variant:"body",bold:!0,children:t})]}),i.jsx(rp,{children:a?i.jsx(sp,{className:"list-container",children:e}):null})]},o)},op=({children:e,groupId:t,className:o})=>i.jsx(Ds,{className:o,children:e},t),Ds=g.div`
|
|
2108
2113
|
display: flex;
|
|
2109
2114
|
flex-direction: column;
|
|
2110
2115
|
padding-bottom: 8px;
|
|
2111
|
-
`,
|
|
2116
|
+
`,np=g.div`
|
|
2112
2117
|
display: flex;
|
|
2113
2118
|
flex: 0;
|
|
2114
2119
|
cursor: pointer;
|
|
2115
2120
|
gap: 4px;
|
|
2116
2121
|
padding-inline: 12px 12px;
|
|
2117
2122
|
align-items: center;
|
|
2118
|
-
`,
|
|
2123
|
+
`,rp=g.div`
|
|
2119
2124
|
display: flex;
|
|
2120
2125
|
flex-direction: column;
|
|
2121
|
-
`,
|
|
2126
|
+
`,sp=g.div`
|
|
2122
2127
|
padding-inline-start: 16px;
|
|
2123
2128
|
align-items: center;
|
|
2124
2129
|
gap: 6px;
|
|
@@ -2157,7 +2162,7 @@
|
|
|
2157
2162
|
`,Os=g(fo)`
|
|
2158
2163
|
height: initial;
|
|
2159
2164
|
padding: 0;
|
|
2160
|
-
`,Is=d.memo(({className:e,disabled:t,id:o,label:n,mode:r="standard",name:s,showDivider:a=!0})=>{const{selected:l,toggleSelection:u,isDisabled:f}=et(),p=d.useCallback(()=>{u(o)},[o,u]),h=r==="compact"?zs:uo,m=r==="compact"?Os:fo,x=a?r==="compact"?Es:Ms:r==="compact"?$n:Bt;return i.jsxs(x,{className:e,children:[i.jsx(h,{children:i.jsx(bt,{disabled:f||t,checked:l.includes(o),onChange:p})}),i.jsxs(m,{children:[i.jsx(E,{variant:"body",children:s}),!!n&&i.jsx(E,{color:"grey",variant:"body",children:n})]})]})}),
|
|
2165
|
+
`,Is=d.memo(({className:e,disabled:t,id:o,label:n,mode:r="standard",name:s,showDivider:a=!0})=>{const{selected:l,toggleSelection:u,isDisabled:f}=et(),p=d.useCallback(()=>{u(o)},[o,u]),h=r==="compact"?zs:uo,m=r==="compact"?Os:fo,x=a?r==="compact"?Es:Ms:r==="compact"?$n:Bt;return i.jsxs(x,{className:e,children:[i.jsx(h,{children:i.jsx(bt,{disabled:f||t,checked:l.includes(o),onChange:p})}),i.jsxs(m,{children:[i.jsx(E,{variant:"body",children:s}),!!n&&i.jsx(E,{color:"grey",variant:"body",children:n})]})]})}),ip=g.div`
|
|
2161
2166
|
display: flex;
|
|
2162
2167
|
padding: 4px 12px 4px 4px;
|
|
2163
2168
|
align-items: center;
|
|
@@ -2165,14 +2170,14 @@
|
|
|
2165
2170
|
align-self: stretch;
|
|
2166
2171
|
border-bottom: 0.5px solid var(--Grey-20, #dfdfdf);
|
|
2167
2172
|
background: var(--Grey-White, #fff);
|
|
2168
|
-
`,
|
|
2173
|
+
`,ap=g.div`
|
|
2169
2174
|
display: flex;
|
|
2170
2175
|
height: 30px;
|
|
2171
2176
|
padding: 8px;
|
|
2172
2177
|
justify-content: center;
|
|
2173
2178
|
align-items: center;
|
|
2174
2179
|
gap: 16px;
|
|
2175
|
-
`,
|
|
2180
|
+
`,lp=g.div`
|
|
2176
2181
|
flex: 1 1 auto;
|
|
2177
2182
|
display: flex;
|
|
2178
2183
|
align-items: center;
|
|
@@ -2181,7 +2186,7 @@
|
|
|
2181
2186
|
padding: 8px 8px 8px 4px;
|
|
2182
2187
|
gap: 4px;
|
|
2183
2188
|
align-self: stretch;
|
|
2184
|
-
`,
|
|
2189
|
+
`,cp=e=>{const{selected:t,toggleSelection:o,isDisabled:n}=et(),r=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsxs(ip,{children:[i.jsx(ap,{children:i.jsx("input",{onChange:r,type:"checkbox",checked:t.includes(e.id),disabled:n})}),i.jsx(lp,{children:i.jsx(E,{variant:"body",children:e.name})})]})},[Re]=O(["named-list-item"]),dp=d.memo(({id:e,iconId:t,iconColor:o,suffixIcons:n,name:r,className:s,subText:a,subTextColor:l})=>{const{selected:u,toggleSelection:f,isDisabled:p}=et(),h=d.useCallback(()=>{p||f(e)},[e,f,p]),m=u.includes(e);return i.jsx(M.ClassNames,{children:({cx:x})=>i.jsxs(up,{className:x(s,{isSelected:m,isDisabled:p}),onClick:h,children:[i.jsxs(fp,{children:[t&&i.jsx(_,{size:"sm",iconId:t,color:o}),i.jsx(E,{className:"named-list-item-text",variant:"body",children:r}),!!n&&i.jsx(hp,{children:n.map(({iconId:b,iconColor:y})=>i.jsx(_,{size:"xsm",iconId:b,color:m?"white":y},b))})]}),!!a&&i.jsx(pp,{className:x({hasIcon:!!t}),children:i.jsx(gp,{color:l??"dark",variant:"body",children:a})})]})})}),up=g.div`
|
|
2185
2190
|
display: flex;
|
|
2186
2191
|
padding-top: ${Re("padding-y")};
|
|
2187
2192
|
padding-right: ${Re("padding-right")};
|
|
@@ -2201,13 +2206,13 @@
|
|
|
2201
2206
|
color: ${Re("color-selected")};
|
|
2202
2207
|
background-color: ${Re("background-color-selected")};
|
|
2203
2208
|
}
|
|
2204
|
-
`,
|
|
2209
|
+
`,fp=g.div`
|
|
2205
2210
|
width: 100%;
|
|
2206
2211
|
display: flex;
|
|
2207
2212
|
align-items: center;
|
|
2208
2213
|
justify-content: flex-start;
|
|
2209
2214
|
gap: ${Re("column-gap")};
|
|
2210
|
-
`,
|
|
2215
|
+
`,pp=g.div`
|
|
2211
2216
|
width: 100%;
|
|
2212
2217
|
display: flex;
|
|
2213
2218
|
align-items: center;
|
|
@@ -2215,20 +2220,20 @@
|
|
|
2215
2220
|
&.hasIcon {
|
|
2216
2221
|
padding-left: ${Re("subtext-padding-with-icon")};
|
|
2217
2222
|
}
|
|
2218
|
-
`,
|
|
2223
|
+
`,hp=g.div`
|
|
2219
2224
|
display: flex;
|
|
2220
2225
|
align-items: center;
|
|
2221
2226
|
justify-content: flex-end;
|
|
2222
2227
|
margin-left: auto;
|
|
2223
2228
|
gap: ${Re("column-gap")};
|
|
2224
|
-
`,
|
|
2229
|
+
`,gp=g(E)`
|
|
2225
2230
|
-webkit-box-orient: vertical;
|
|
2226
2231
|
-webkit-line-clamp: 2;
|
|
2227
2232
|
display: -webkit-box;
|
|
2228
2233
|
overflow-wrap: anywhere;
|
|
2229
2234
|
overflow: hidden;
|
|
2230
2235
|
text-overflow: ellipsis;
|
|
2231
|
-
`,
|
|
2236
|
+
`,mp=g.div`
|
|
2232
2237
|
display: flex;
|
|
2233
2238
|
padding: ${c("spacing-8")} ${c("spacing-10")};
|
|
2234
2239
|
align-items: center;
|
|
@@ -2241,11 +2246,11 @@
|
|
|
2241
2246
|
color: ${c("color-white")};
|
|
2242
2247
|
background-color: ${c("color-primary")};
|
|
2243
2248
|
}
|
|
2244
|
-
`,
|
|
2249
|
+
`,bp=e=>{const{selected:t,toggleSelection:o}=et(),n=d.useCallback(()=>{o(e.id)},[e,o]);return i.jsx(M.ClassNames,{children:({cx:r})=>i.jsxs(mp,{className:r({isSelected:t.includes(e.id)}),onClick:n,children:[e.iconId&&i.jsx(_,{size:"sm",iconId:e.iconId}),i.jsx(E,{variant:"body",children:e.name})]})})},xp=e=>{const[t,o]=d.useState(e);return{onGroupOpen:d.useCallback(async(r,s)=>{o((a=[])=>s==="opened"&&!(a!=null&&a.includes(r))?[...a,r]:s==="closed"&&a.includes(r)?a.filter(l=>l!==r):a)},[]),openedGroups:t}},yp=(e,t={})=>{const[o,n]=d.useState(t),r=d.useCallback((a,l)=>{var h;const u=(h=e==null?void 0:e.items.find(m=>m.id===a))==null?void 0:h.group.groupId;if(!u)return;const f=o[u]||[],p=l==="selected"?{...o,[u]:[...f,a]}:{...o,[u]:f.filter(m=>m!==a)};n(p)},[e==null?void 0:e.items,o]);return{clear:d.useCallback(()=>{n({})},[]),groupSelection:o,onSelect:r}},kp=(e=[],t=!0)=>{const[o,n]=d.useState(e),r=d.useCallback(a=>{n(l=>t?[a]:l.includes(a)?l.filter(u=>u!==a):[...l,a])},[t]);return{clear:d.useCallback(()=>{n([])},[]),onSelect:r,selected:o}};class vp extends kn{constructor(o,n,r,s,a){super(o,n,r,a);G(this,"parentIdKey");G(this,"idKey");this.parentIdKey=s.parentIdKey,this.idKey=s.idKey,P.makeObservable(this,{tree:P.computed,childBranchLookup:P.computed,itemsById:P.computed})}sortBranch(o,n){return o.name.localeCompare(n.name)}get itemsById(){return this.items.reduce((o,n)=>({...o,[n[this.idKey]]:n}),{})}get childBranchLookup(){return this.items.reduce((o,n)=>{let r=n[this.parentIdKey];return(!r||this.itemsById[r]===void 0)&&(r="ROOT"),r&&o[r]?(o[r].push(n),o):(o[r]=[n],o)},{ROOT:[]})}get tree(){const o=r=>{const s=[];for(const a in r){let l={...r[a],branches:[]};const u=this.childBranchLookup[l[this.idKey]];l&&(u&&(l={...l,branches:o(u)}),s.push(l))}return s},n=this.childBranchLookup.ROOT;return n?o(n):[]}}const Rs=d.createContext(null),wp=L.kosComponent(({children:e,singleBranchOnly:t,openedBranches:o,setOpenedBranches:n,dataProvider:r})=>{const[s,a]=d.useState([]),l=o??s,u=n??a,f=d.useRef(l);d.useLayoutEffect(()=>{f.current=l},[l]);const p=d.useCallback(m=>{if(!(r!=null&&r.tree))return;const x=m[r.idKey],b=f.current.includes(x),y=w=>w.branches.flatMap($=>{const v=$[r.idKey];return $.branches.length?[v,...y($)]:[]}),k=y(m);if(t){const w=[],$=v=>{const S=v[r.parentIdKey];if(S){const C=r.itemsById[S];C&&(w.push(S),$(C))}};$(m),u(b?w:[...w,x])}else{const w=b?f.current.filter($=>x!==$&&!k.includes($)):[...f.current,x];u(w)}},[r==null?void 0:r.idKey,r==null?void 0:r.itemsById,r==null?void 0:r.parentIdKey,r==null?void 0:r.tree,u,t]),h=d.useMemo(()=>({openedBranches:l,toggleBranch:p}),[l,p]);return i.jsx(Rs.Provider,{value:h,children:e})}),Ns=()=>{const e=d.useContext(Rs);if(e===null)throw new Error("TreeContext can only be used inside children of TreeContextProvider");return e};function Fs(e){return e.build!==void 0}const Cp=e=>(t,o,n)=>{const r=(s,a)=>{if(!s.branches.length&&s.isGroup)return null;if(s.branches.length){const l=Fs(e)?e.build(s):e,u=s.branches.map(f=>{if(f.branches.length)return r(f,!0);{const p=Ft(o)?o.build(f):o;return i.jsx(p,{"data-key":f.id,...f,onListItemAction:n},f.id)}});return i.jsx(M.ClassNames,{children:({cx:f})=>i.jsx(l,{className:f({isNotRoot:a},s.className),...s,children:u},s.id)},s.id)}else{const l=Ft(o)?o.build(s):o;return i.jsx(l,{"data-key":s.id,...s,onListItemAction:n},s.id)}};return t.tree.map(s=>r(s))},$p=L.kosComponent(({dataProvider:e,ItemTemplate:t,onSelect:o,BranchTemplate:n,openedBranches:r,setOpenedBranches:s,singleBranchOnly:a,className:l,autoSelectFirstItem:u,selected:f,emptyState:p,getFirstItem:h,onListItemAction:m})=>i.jsx(wp,{dataProvider:e,openedBranches:r,setOpenedBranches:s,singleBranchOnly:a,children:i.jsx(co,{onSelect:o,dataProvider:e,ItemTemplate:t,autoSelectFirstItem:u,emptyState:p,className:l,selected:f,onListItemAction:m,getFirstItem:h,itemListRenderer:Cp(n)})})),As=d.createContext(null),Sp=()=>{const e=d.useContext(As);if(e===null)throw new Error("useAsyncTreeContext can only be used inside AsyncTreeList");return e},_s=L.kosComponent(({branch:e,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:a,onBranchSelect:l,selectedBranchId:u,branchEmptyState:f=i.jsx("div",{style:{paddingLeft:"32px",color:"#999"},children:"No items"}),depth:p=0,nodeIconMap:h,nodeActions:m,nodeDecorators:x})=>{const b=Sp(),y=d.useMemo(()=>{if(!h)return;if(typeof h=="function")return h(e);const R=e.type;return R?h[R]:void 0},[h,e]),k=d.useMemo(()=>{if(!(m!=null&&m.length))return;const R=t.originalItems.get(e.id);if(R)return m.filter(N=>!N.visibleFor||N.visibleFor(e)).map(N=>({id:N.id,iconId:N.iconId,color:N.color,tooltip:N.tooltip,onClick:()=>N.onClick(e.id,R)}))},[m,e,t]),w=(()=>{if(x!=null&&x.length)return x.filter(R=>!R.visibleFor||R.visibleFor(e)).map(R=>({id:R.id,iconId:R.iconId,color:R.color,tooltip:R.tooltip}))})(),$=async()=>{if(b.openedBranches.includes(e.id))s==null||s(e.id);else if(e.loadingState.status==="idle"){const N=t.originalItems.get(e.id);N&&(await t.expandBranch(e.id,N),r==null||r(e.id,N))}b.toggleBranch(e.id)},v=()=>{const R=t.originalItems.get(e.id);R&&(l==null||l(e.id,R))};if(e.isLeaf)return i.jsx(n,{"data-key":e.id,...e,onListItemAction:a,"data-depth":p,iconId:y==null?void 0:y.iconId,iconColor:y==null?void 0:y.color,actions:k,decorators:w},e.id);const S=Fs(o)?o.build(e):o,C=b.openedBranches.includes(e.id),T=e.loadingState.status==="loading",j=e.loadingState.status==="error",D=e.loadingState.status==="loaded",W=u===e.id,V=C?e.branches.length>0?e.branches.map(R=>i.jsx(_s,{branch:R,provider:t,BranchTemplate:o,ItemTemplate:n,onBranchExpand:r,onBranchCollapse:s,onListItemAction:a,onBranchSelect:l,selectedBranchId:u,branchEmptyState:f,depth:p+1,nodeIconMap:h,nodeActions:m,nodeDecorators:x},R.id)):D&&f?[f]:[]:[];return i.jsx(fr.Observer,{children:()=>i.jsx("div",{style:{paddingLeft:p>0?`${p*12}px`:void 0},children:i.jsx(S,{className:e.className,...e,onClick:$,onSelect:v,"data-loading":T,"data-error":j,"data-open":C,"data-selected":W,iconId:y==null?void 0:y.iconId,iconColor:y==null?void 0:y.color,actions:k,decorators:w,children:V})},e.id)})}),Ls=L.kosComponent(({dataProvider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:a,selectedBranchId:l,emptyState:u,branchEmptyState:f,className:p,singleBranchOnly:h,openedBranches:m,setOpenedBranches:x,nodeIconMap:b,nodeActions:y,nodeDecorators:k})=>{const[w,$]=d.useState(!1),[v,S]=d.useState([]),C=m??v,T=x??S;d.useEffect(()=>e?((async()=>{await e.init(),$(!0)})(),()=>{e.dispose()}):void 0,[e]);const j=d.useCallback(W=>{const V=C.includes(W);T(h?V?[]:[W]:V?C.filter(R=>R!==W):[...C,W])},[C,T,h]),D=d.useMemo(()=>({openedBranches:C,toggleBranch:j}),[C,j]);return!w||!e?u||null:i.jsx(As.Provider,{value:D,children:i.jsx(fr.Observer,{children:()=>i.jsxs("div",{className:p,children:[e.tree.length===0&&u,e.tree.map(W=>i.jsx(_s,{branch:W,provider:e,BranchTemplate:t,ItemTemplate:o,onBranchExpand:n,onBranchCollapse:r,onListItemAction:s,onBranchSelect:a,selectedBranchId:l,branchEmptyState:f,nodeIconMap:b,nodeActions:y,nodeDecorators:k},W.id))]})})})}),jp=L.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,...a})=>{const[l,u]=d.useState(o??[]),f=d.useRef(l??[]);d.useLayoutEffect(()=>{f.current=l},[l]),d.useEffect(()=>{u(o??[])},[o]);const p=d.useCallback(x=>{t(x,f.current.includes(x)?"unselected":"selected"),u(b=>e?[x]:b.includes(x)?b.filter(y=>y!==x):[...b,x])},[e,t]),h=d.useCallback(x=>f.current.includes(x),[]),m=d.useMemo(()=>({isSelected:h,selected:l,toggleSelection:p,isDisabled:!!n}),[h,l,p,n]);return d.useEffect(()=>{var x;if(r&&(s!=null&&s.rootItems)&&f.current.length===0){const b=(x=s.rootItems[0])==null?void 0:x.id;b&&p(b)}},[r,s==null?void 0:s.rootItems,p]),i.jsx(Wt.Provider,{value:m,children:i.jsx(Ls,{dataProvider:s,...a})})}),Tp=({children:e,id:t,className:o})=>i.jsx(M.ClassNames,{children:({cx:n})=>i.jsx(Dp,{className:n("anonymous-branch",o),children:e},t)}),Dp=g.div`
|
|
2245
2250
|
display: flex;
|
|
2246
2251
|
flex-direction: column;
|
|
2247
2252
|
width: 100%;
|
|
2248
|
-
`,[Te]=O(["named-collapsible-branch"]),
|
|
2253
|
+
`,[Te]=O(["named-collapsible-branch"]),Mp=L.kosComponent(({children:e,className:t,onClick:o,onSelect:n,"data-loading":r,"data-open":s,iconId:a,iconColor:l,actions:u,decorators:f,...p})=>{const{isSelected:h,toggleSelection:m,selected:x}=et(),b=x.includes(p.id),y=w=>{w.stopPropagation(),o==null||o()},k=()=>{m(p.id),n==null||n()};return i.jsxs(Ip,{className:t,isOpen:s,children:[i.jsxs(Rp,{"data-loading":r,"data-selected":b,onClick:k,$isSelected:b,children:[i.jsx(Ep,{onClick:y,type:"button",children:i.jsx(zp,{iconId:"CaretRight",size:"xxsm",$isOpen:s})}),a&&i.jsx(_,{size:"sm",iconId:a,color:l}),i.jsxs(Op,{children:[i.jsx(E,{variant:"body",bold:!0,children:p.name}),r&&i.jsx(E,{variant:"body",children:"(Loading...)"})]}),f&&f.length>0&&i.jsx(Ap,{children:f.map(w=>i.jsx(_p,{size:"sm",iconId:w.iconId,color:b?"white":w.color,title:w.tooltip},w.id))}),u&&u.length>0&&i.jsx(Lp,{children:u.map(w=>i.jsx(Wp,{onClick:$=>{$.stopPropagation(),w.onClick()},title:w.tooltip,type:"button",children:i.jsx(_,{size:"sm",iconId:w.iconId,color:b?"white":w.color})},w.id))})]}),i.jsx(Np,{className:"inner-container",children:i.jsx(Fp,{className:"list-container",children:e})})]},p.id)}),Ep=g.button`
|
|
2249
2254
|
background: none;
|
|
2250
2255
|
border: none;
|
|
2251
2256
|
padding: 0;
|
|
@@ -2264,19 +2269,19 @@
|
|
|
2264
2269
|
&:active {
|
|
2265
2270
|
opacity: 0.5;
|
|
2266
2271
|
}
|
|
2267
|
-
`,
|
|
2272
|
+
`,zp=g(_)`
|
|
2268
2273
|
transition: transform 0.2s ease-in-out;
|
|
2269
2274
|
transform: ${({$isOpen:e})=>e?"rotate(90deg)":"rotate(0deg)"};
|
|
2270
|
-
`,
|
|
2275
|
+
`,Op=g.div`
|
|
2271
2276
|
display: flex;
|
|
2272
2277
|
align-items: center;
|
|
2273
2278
|
gap: ${Te("column-gap")};
|
|
2274
2279
|
flex: 1;
|
|
2275
|
-
`,
|
|
2280
|
+
`,Ip=g.div`
|
|
2276
2281
|
display: flex;
|
|
2277
2282
|
flex-direction: column;
|
|
2278
2283
|
${({isOpen:e})=>e?`gap: ${Te("padding-y")}`:""}
|
|
2279
|
-
`,
|
|
2284
|
+
`,Rp=g.div`
|
|
2280
2285
|
align-items: center;
|
|
2281
2286
|
gap: ${Te("column-gap")};
|
|
2282
2287
|
display: flex;
|
|
@@ -2299,27 +2304,27 @@
|
|
|
2299
2304
|
&:active {
|
|
2300
2305
|
background-color: ${Te("background-color-selected")};
|
|
2301
2306
|
}
|
|
2302
|
-
`,
|
|
2307
|
+
`,Np=g.div`
|
|
2303
2308
|
display: flex;
|
|
2304
2309
|
flex-direction: column;
|
|
2305
|
-
`,
|
|
2310
|
+
`,Fp=g.div`
|
|
2306
2311
|
display: flex;
|
|
2307
2312
|
flex-direction: column;
|
|
2308
2313
|
row-gap: 4px;
|
|
2309
|
-
`,
|
|
2314
|
+
`,Ap=g.div`
|
|
2310
2315
|
display: flex;
|
|
2311
2316
|
align-items: center;
|
|
2312
2317
|
gap: 4px;
|
|
2313
2318
|
padding-left: 8px;
|
|
2314
|
-
`,
|
|
2319
|
+
`,_p=g(_)`
|
|
2315
2320
|
opacity: 0.8;
|
|
2316
|
-
`,
|
|
2321
|
+
`,Lp=g.div`
|
|
2317
2322
|
display: flex;
|
|
2318
2323
|
align-items: center;
|
|
2319
2324
|
gap: 4px;
|
|
2320
2325
|
margin-left: auto;
|
|
2321
2326
|
padding-left: 8px;
|
|
2322
|
-
`,
|
|
2327
|
+
`,Wp=g.button`
|
|
2323
2328
|
background: none;
|
|
2324
2329
|
border: none;
|
|
2325
2330
|
padding: 4px;
|
|
@@ -2339,14 +2344,14 @@
|
|
|
2339
2344
|
&:active {
|
|
2340
2345
|
opacity: 0.5;
|
|
2341
2346
|
}
|
|
2342
|
-
`,
|
|
2347
|
+
`,Bp=L.kosComponent(({children:e,className:t,...o})=>{const{openedBranches:n,toggleBranch:r}=Ns(),s=n.includes(o.id),a=d.useCallback(()=>{r(o)},[o,r]);return i.jsxs(Pp,{className:t,children:[i.jsxs(Hp,{"data-open":s,onClick:a,children:[s?i.jsx(_,{iconId:"CaretDown",size:"xxsm"}):i.jsx(_,{iconId:"CaretRight",size:"xxsm"}),i.jsx(E,{variant:"body",bold:!0,children:o.name})]}),i.jsx(Vp,{className:"inner-container",children:s?i.jsx(Gp,{className:"list-container",children:e}):null})]},o.id)}),Pp=g.div`
|
|
2343
2348
|
display: flex;
|
|
2344
2349
|
flex-direction: column;
|
|
2345
2350
|
|
|
2346
2351
|
&.isNotRoot {
|
|
2347
2352
|
padding-left: 12px;
|
|
2348
2353
|
}
|
|
2349
|
-
`,
|
|
2354
|
+
`,Hp=g.div`
|
|
2350
2355
|
align-items: center;
|
|
2351
2356
|
column-gap: 4px;
|
|
2352
2357
|
cursor: pointer;
|
|
@@ -2354,26 +2359,26 @@
|
|
|
2354
2359
|
flex: 0;
|
|
2355
2360
|
min-height: 22px;
|
|
2356
2361
|
padding-right: 12px;
|
|
2357
|
-
`,
|
|
2362
|
+
`,Vp=g.div`
|
|
2358
2363
|
display: flex;
|
|
2359
2364
|
flex-direction: column;
|
|
2360
|
-
`,
|
|
2365
|
+
`,Gp=g.div`
|
|
2361
2366
|
display: flex;
|
|
2362
2367
|
flex-direction: column;
|
|
2363
2368
|
row-gap: 4px;
|
|
2364
|
-
`,Ws=d.memo(({autoScrollToBottom:e=!1,className:t,itemCount:o,itemHeight:n,onBottom:r,overscanAmount:s,renderRow:a})=>{const[l,u]=d.useState(0),[f,p]=d.useState(0),h=d.useRef(null),m=d.useRef(null),x=o*n,b=Math.ceil(f/n),y=Math.max(Math.floor(l/n-(s??0)),0),k=Math.min(o-1,y+b+(s??0)),w=v=>{u(v.currentTarget.scrollTop)};d.useLayoutEffect(()=>{const v=()=>{h.current&&p(h.current.clientHeight)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),d.useEffect(()=>{e&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[o,e]);const $=[];for(let v=y;v<=k;v++)$.push(a(v,{top:v*n,height:n,position:"absolute",width:"100%"}));return d.useEffect(()=>{const v=()=>{const C=m.current;if(!C)return;const T=C.scrollHeight-C.scrollTop<=C.clientHeight+n;!e&&T&&(r==null||r())},S=m.current;return S&&S.addEventListener("scroll",v),()=>{S&&S.removeEventListener("scroll",v)}},[e,n,r]),i.jsx(
|
|
2369
|
+
`,Ws=d.memo(({autoScrollToBottom:e=!1,className:t,itemCount:o,itemHeight:n,onBottom:r,overscanAmount:s,renderRow:a})=>{const[l,u]=d.useState(0),[f,p]=d.useState(0),h=d.useRef(null),m=d.useRef(null),x=o*n,b=Math.ceil(f/n),y=Math.max(Math.floor(l/n-(s??0)),0),k=Math.min(o-1,y+b+(s??0)),w=v=>{u(v.currentTarget.scrollTop)};d.useLayoutEffect(()=>{const v=()=>{h.current&&p(h.current.clientHeight)};return v(),window.addEventListener("resize",v),()=>window.removeEventListener("resize",v)},[]),d.useEffect(()=>{e&&m.current&&(m.current.scrollTop=m.current.scrollHeight)},[o,e]);const $=[];for(let v=y;v<=k;v++)$.push(a(v,{top:v*n,height:n,position:"absolute",width:"100%"}));return d.useEffect(()=>{const v=()=>{const C=m.current;if(!C)return;const T=C.scrollHeight-C.scrollTop<=C.clientHeight+n;!e&&T&&(r==null||r())},S=m.current;return S&&S.addEventListener("scroll",v),()=>{S&&S.removeEventListener("scroll",v)}},[e,n,r]),i.jsx(Up,{ref:h,children:i.jsx(Yp,{ref:m,style:{height:f},onScroll:w,className:t,children:i.jsx(Kp,{style:{height:x},children:$})})})}),Up=g.div`
|
|
2365
2370
|
height: 100%;
|
|
2366
2371
|
width: 100%;
|
|
2367
2372
|
overflow-y: hidden;
|
|
2368
2373
|
position: relative;
|
|
2369
|
-
`,
|
|
2374
|
+
`,Yp=g.div`
|
|
2370
2375
|
overflow-y: auto;
|
|
2371
2376
|
width: 100%;
|
|
2372
2377
|
position: relative;
|
|
2373
|
-
`,
|
|
2378
|
+
`,Kp=g.div`
|
|
2374
2379
|
position: relative;
|
|
2375
2380
|
width: 100%;
|
|
2376
|
-
`,Bs=L.kosComponent(({dataProvider:e,ItemTemplate:t,onListItemAction:o,onInit:n,emptyState:r,...s})=>{const a=Lt(e,n),l=d.useCallback((u,f)=>{const p=e==null?void 0:e.items.find((h,m)=>m===u);if(p){const h=Ft(t)?t.build(p):t;return i.jsx(h,{"data-key":p.id,style:f,...p,onListItemAction:o},p.id)}return null},[t,e==null?void 0:e.items,o]);return i.jsx(yn,{dataProvider:e||void 0,onListItemAction:o,children:a?(e==null?void 0:e.items.length)===0&&r?r:i.jsx(Ws,{itemCount:(e==null?void 0:e.items.length)??0,renderRow:l,...s}):null})}),
|
|
2381
|
+
`,Bs=L.kosComponent(({dataProvider:e,ItemTemplate:t,onListItemAction:o,onInit:n,emptyState:r,...s})=>{const a=Lt(e,n),l=d.useCallback((u,f)=>{const p=e==null?void 0:e.items.find((h,m)=>m===u);if(p){const h=Ft(t)?t.build(p):t;return i.jsx(h,{"data-key":p.id,style:f,...p,onListItemAction:o},p.id)}return null},[t,e==null?void 0:e.items,o]);return i.jsx(yn,{dataProvider:e||void 0,onListItemAction:o,children:a?(e==null?void 0:e.items.length)===0&&r?r:i.jsx(Ws,{itemCount:(e==null?void 0:e.items.length)??0,renderRow:l,...s}):null})}),qp=L.kosComponent(({isSingleSelect:e=!0,onSelect:t,selected:o,disabled:n,autoSelectFirstItem:r,dataProvider:s,getFirstItem:a,...l})=>{const[u,f]=d.useState(o??[]),p=d.useRef(u??[]);d.useLayoutEffect(()=>{p.current=u},[u]),d.useEffect(()=>{f(o??[])},[o]);const h=d.useCallback(b=>{t(b,p.current.includes(b)?"unselected":"selected"),f(y=>e?[b]:y.includes(b)?y.filter(k=>k!==b):[...y,b])},[e,t]),m=d.useCallback(b=>p.current.includes(b),[]),x=d.useMemo(()=>({isSelected:m,selected:u,toggleSelection:h,isDisabled:!!n}),[m,u,h,n]);return d.useEffect(()=>{var b,y;if(r&&(s!=null&&s.items)&&p.current.length===0){let k;a?k=(b=a(s.items))==null?void 0:b.id:k=(y=s.items[0])==null?void 0:y.id,k&&h(k)}},[r,s==null?void 0:s.items,a,h]),i.jsx(Wt.Provider,{value:x,children:i.jsx(Bs,{dataProvider:s,...l})})}),[xe]=O(["modal"]),Ps=g.div`
|
|
2377
2382
|
width: fit-content;
|
|
2378
2383
|
height: fit-content;
|
|
2379
2384
|
display: flex;
|
|
@@ -2399,26 +2404,26 @@
|
|
|
2399
2404
|
display: flex;
|
|
2400
2405
|
align-items: center;
|
|
2401
2406
|
justify-content: flex-end;
|
|
2402
|
-
`,
|
|
2407
|
+
`,Zp=g.div`
|
|
2403
2408
|
width: ${xe("base-content-width")};
|
|
2404
2409
|
display: flex;
|
|
2405
2410
|
align-items: flex-start;
|
|
2406
2411
|
justify-content: flex-start;
|
|
2407
2412
|
flex-direction: column;
|
|
2408
|
-
`,po=d.forwardRef(({header:e,footer:t,content:o,footerWrapper:n,headerWrapper:r,contentWrapper:s},a)=>{const l=r??Hs,u=s??Vs,f=n??Sn;return i.jsxs(Ps,{ref:a,children:[i.jsx(l,{children:e}),i.jsx(u,{children:o}),i.jsx(f,{children:t})]})}),
|
|
2409
|
-
column-gap: ${
|
|
2410
|
-
`,
|
|
2413
|
+
`,po=d.forwardRef(({header:e,footer:t,content:o,footerWrapper:n,headerWrapper:r,contentWrapper:s},a)=>{const l=r??Hs,u=s??Vs,f=n??Sn;return i.jsxs(Ps,{ref:a,children:[i.jsx(l,{children:e}),i.jsx(u,{children:o}),i.jsx(f,{children:t})]})}),Xp=d.forwardRef(({level:e,headerText:t,content:o,acceptButtonVariant:n,acceptButtonText:r,onAccept:s},a)=>{const l=d.useMemo(()=>{if(e==="error")return{iconId:"ExclamationCircle",color:"red"};if(e==="warn")return{iconId:"Warning",color:"orange"};if(e==="success")return{iconId:"CheckCircle",color:"green"};if(e==="info")return{iconId:"InfoCircle",color:"blue"}},[e]),{setOpen:u}=Ye(),f=d.useCallback(()=>{s&&s(),u(!1)},[u,s]);return i.jsx(po,{ref:a,header:i.jsxs(i.Fragment,{children:[!!l&&i.jsx(_,{iconId:l.iconId,color:l.color}),i.jsx(E,{variant:"h2",color:"dark",children:t})]}),content:o,footer:i.jsx(Ae,{onClick:f,variant:n??"primary",text:r??"Okay"})})}),[Jp]=O(["modal"]),Qp=d.forwardRef(({onConfirm:e,onCancel:t,headerText:o,confirmText:n,cancelText:r,content:s,confirmButtonVariant:a,cancelButtonVariant:l,confirmDisabled:u,headerIcon:f,headerIconColor:p,contentWrapper:h,cancelDisabled:m},x)=>{const{setOpen:b}=Ye(),y=d.useCallback(()=>{e(()=>b(!1))},[e,b]),k=d.useCallback(()=>{t&&t(),b(!1)},[t,b]);return i.jsx(po,{ref:x,header:i.jsxs(i.Fragment,{children:[!!f&&i.jsx(_,{iconId:f,color:p??"black"}),i.jsx(E,{variant:"h2",color:"dark",children:o})]}),contentWrapper:h,content:s,footerWrapper:eh,footer:i.jsxs(i.Fragment,{children:[i.jsx(Ae,{text:r??"Cancel",onClick:k,disabled:m,variant:l??"borderless"}),i.jsx(Ae,{onClick:y,variant:a??"primary",text:n??"Confirm",disabled:u})]})})}),eh=g(Sn)`
|
|
2414
|
+
column-gap: ${Jp("footerGap")};
|
|
2415
|
+
`,th=d.memo(({headerText:e})=>i.jsxs(i.Fragment,{children:[i.jsx(_,{iconId:"ExclamationCircle",color:"red",size:"lrg"}),i.jsx(E,{variant:"h2",color:"dark",children:e})]})),oh=d.memo(({contentText:e,compareText:t,errorText:o})=>{const n=d.useCallback(s=>s.message&&s.message!==""?s.message:o??"That does not match.",[o]),r=d.useCallback(s=>s===t,[t]);return i.jsxs(nh,{children:[i.jsx(E,{variant:"body",color:"dark",children:e}),i.jsx(bn,{name:"matchText",handleError:n,validate:r})]})}),nh=g.div`
|
|
2411
2416
|
width: 288px;
|
|
2412
2417
|
display: flex;
|
|
2413
2418
|
align-items: flex-start;
|
|
2414
2419
|
justify-content: flex-start;
|
|
2415
2420
|
flex-direction: column;
|
|
2416
2421
|
row-gap: 8px;
|
|
2417
|
-
`,
|
|
2422
|
+
`,rh=d.memo(({onSubmit:e})=>{const{setOpen:t}=Ye(),o=d.useCallback(()=>{t(!1)},[t]);return i.jsxs(i.Fragment,{children:[i.jsx(Ae,{type:"button",text:"Cancel",onClick:o,variant:"borderless"}),i.jsx(mn,{onSubmit:e,variant:"primary",text:"Delete"})]})}),sh={matchText:""},ih=d.forwardRef(({compareText:e,headerText:t,contentText:o,errorText:n,onConfirm:r},s)=>{const{setOpen:a}=Ye(),l=d.useCallback((u,f)=>{r(u,()=>a(!1),f)},[r,a]);return i.jsx(ah,{onSubmit:l,mode:"onChange",delayError:400,defaultValues:sh,children:i.jsx(po,{ref:s,header:i.jsx(th,{headerText:t}),content:i.jsx(oh,{compareText:e,contentText:o,errorText:n}),footer:i.jsx(rh,{onSubmit:l})})})}),ah=g(ys)`
|
|
2418
2423
|
height: fit-content;
|
|
2419
2424
|
width: fit-content;
|
|
2420
|
-
`,
|
|
2421
|
-
background: ${
|
|
2425
|
+
`,lh=({className:e,defaultValues:t,header:o,submitText:n,cancelText:r,onCancel:s,enabledIfClean:a,onSubmit:l,content:u,submitButtonVariant:f,cancelButtonVariant:p,variant:h="submit",ContentWrapper:m,disabled:x,...b},y)=>{const k=K.useForm({shouldUnregister:!0,defaultValues:t,disabled:x,...b,mode:h==="blur"?"onBlur":b.mode}),{setOpen:w}=Ye(),{setError:$,reset:v}=k,S=d.useCallback(D=>{l({data:D,closeModal:()=>w(!1),setError:$,resetForm:v})},[l,v,$,w]),C=d.useCallback(()=>{s==null||s(v),w(!1)},[s,v,w]),T=d.useCallback(D=>S(D),[S]),j=m??Vs;return i.jsx(K.FormProvider,{...k,children:i.jsxs(Ps,{ref:y,as:"form",className:e,onSubmit:h==="blur"?void 0:k.handleSubmit(S),onBlur:h==="blur"?k.handleSubmit(S):void 0,children:[i.jsx(Hs,{children:o}),i.jsx(j,{children:u}),i.jsxs(Sn,{children:[i.jsx(Ae,{text:r??"Cancel",onClick:C,type:"button",variant:p??"borderless"}),h!=="blur"&&i.jsx(mn,{onSubmit:T,variant:f??"primary",text:n??"Submit",enabledIfClean:a,disabled:x})]})]})})},ch=gt(lh),[dh]=O(["modal"]),uh={escapeKey:!0,outsidePress:!1,bubbles:!1};function fh(e){const{type:t,open:o,defaultOpen:n,onOpenChange:r,children:s,initialFocus:a,...l}=e,u=t==="confirm"?Qp:t==="status"?Xp:t==="confirm-delete"?ih:t==="form"?ch:po;return i.jsxs(Qo,{dismissOptions:uh,open:o,defaultOpen:n,onOpenChange:r,children:[i.jsx(tn,{initialFocus:a,OverlayStyles:Gs,trapFocus:!0,children:i.jsx(u,{...l})}),!!s&&s]})}const ph=({children:e})=>i.jsx(en,{children:e}),Gs=M.css`
|
|
2426
|
+
background: ${dh("overlay-background")};
|
|
2422
2427
|
display: grid;
|
|
2423
2428
|
place-items: center;
|
|
2424
2429
|
z-index: 2;
|
|
@@ -2433,7 +2438,7 @@
|
|
|
2433
2438
|
&.isCollapsed {
|
|
2434
2439
|
border-bottom-width: 0px;
|
|
2435
2440
|
}
|
|
2436
|
-
`,
|
|
2441
|
+
`,hh=d.memo(({children:e})=>{const{setOpen:t,open:o}=At(),n=d.useCallback(r=>{r.stopPropagation(),t(!o)},[o,t]);return i.jsxs(Us,{className:mt("header-wrapper",{isCollapsed:o}),children:[i.jsx(ne,{iconId:o?"CaretDown":"CaretUp",onClick:n,size:"xsm",color:"black"}),e]})}),[Pe]=O(["named-section"]),gh=e=>e.variant==="selectable",Ys=e=>{const{variant:t,className:o,children:n,header:r,isCollapsible:s}=e,a=d.useRef(null),[l,u,f]=gh(e)?[e.disabled,e.isSelected,e.onClick]:[e.disabled,!1,void 0],p=e.ContentWrapper??bh,h=d.useCallback(m=>{f&&a.current&&a.current.contains(m.target)&&f()},[f]);return i.jsx(M.ClassNames,{children:({cx:m})=>i.jsx(mh,{"data-variant":t,className:m(o,{disabled:l,isSelected:u}),onClick:h,ref:a,children:s?i.jsxs(to,{defaultOpen:!0,children:[i.jsx(hh,{children:r}),i.jsx(oo,{children:i.jsx(p,{children:n})})]}):i.jsxs(i.Fragment,{children:[i.jsx(Us,{className:"header-wrapper",children:r}),i.jsx(p,{children:n})]})})})},mh=g.div`
|
|
2437
2442
|
border-color: ${Pe("border-color")};
|
|
2438
2443
|
border-radius: ${Pe("border-radius")};
|
|
2439
2444
|
border-style: solid;
|
|
@@ -2469,10 +2474,10 @@
|
|
|
2469
2474
|
top: 0;
|
|
2470
2475
|
}
|
|
2471
2476
|
}
|
|
2472
|
-
`,
|
|
2477
|
+
`,bh=g.div`
|
|
2473
2478
|
display: flex;
|
|
2474
2479
|
width: 100%;
|
|
2475
|
-
`,[ho]=O(["named-section-header"]),
|
|
2480
|
+
`,[ho]=O(["named-section-header"]),xh=d.memo(({name:e,description:t,prefix:o,suffix:n,children:r,...s})=>i.jsxs(yh,{...s,className:t?"hasDesc":void 0,children:[i.jsxs(kh,{children:[i.jsxs(vh,{children:[o,i.jsx(E,{color:"dark",bold:!0,variant:"body",children:e}),n]}),!!t&&i.jsx(E,{color:"grey",variant:"small",children:t})]}),!!r&&i.jsx(wh,{children:r})]})),yh=g.div`
|
|
2476
2481
|
width: 100%;
|
|
2477
2482
|
display: flex;
|
|
2478
2483
|
align-items: center;
|
|
@@ -2481,41 +2486,41 @@
|
|
|
2481
2486
|
&.hasDesc {
|
|
2482
2487
|
align-items: flex-start;
|
|
2483
2488
|
}
|
|
2484
|
-
`,
|
|
2489
|
+
`,kh=g.div`
|
|
2485
2490
|
display: flex;
|
|
2486
2491
|
align-items: flex-start;
|
|
2487
2492
|
justify-content: center;
|
|
2488
2493
|
flex-direction: column;
|
|
2489
2494
|
row-gap: ${ho("row-gap")};
|
|
2490
|
-
`,
|
|
2495
|
+
`,vh=g.div`
|
|
2491
2496
|
display: flex;
|
|
2492
2497
|
align-items: center;
|
|
2493
2498
|
justify-content: flex-start;
|
|
2494
2499
|
column-gap: ${ho("row-gap")};
|
|
2495
|
-
`,
|
|
2500
|
+
`,wh=g.div`
|
|
2496
2501
|
display: flex;
|
|
2497
2502
|
align-items: center;
|
|
2498
2503
|
justify-content: flex-end;
|
|
2499
2504
|
row-gap: ${ho("row-gap")};
|
|
2500
|
-
`,[Zt]=O(["image-config-page-header"]),
|
|
2505
|
+
`,[Zt]=O(["image-config-page-header"]),Ch=e=>e?Array.isArray(e)?e.map(t=>i.jsx(eo,{color:"light",children:t},t)):i.jsx(eo,{color:"light",children:e}):null,$h=({action:e,description:t,title:o,titleTag:n,subTitle:r,...s})=>i.jsxs(Sh,{...s,children:[i.jsxs(Th,{children:[i.jsxs(jh,{children:[i.jsx(E,{variant:"h1",children:o}),Ch(n)]}),t&&i.jsx(E,{variant:"body",color:"grey",children:t}),r&&i.jsx(E,{variant:"body",color:"dark",children:r})]}),e]}),Sh=g.div`
|
|
2501
2506
|
align-items: center;
|
|
2502
2507
|
background: ${Zt("bg")};
|
|
2503
2508
|
display: flex;
|
|
2504
2509
|
gap: ${Zt("gap")};
|
|
2505
2510
|
padding: 0 0 ${Zt("padding-bottom")} 0;
|
|
2506
2511
|
width: 100%;
|
|
2507
|
-
`,
|
|
2512
|
+
`,jh=g.div`
|
|
2508
2513
|
width: 100%;
|
|
2509
2514
|
display: flex;
|
|
2510
2515
|
align-items: center;
|
|
2511
2516
|
column-gap: ${c("spacing-8")};
|
|
2512
2517
|
justify-content: flex-start;
|
|
2513
|
-
`,
|
|
2518
|
+
`,Th=g.div`
|
|
2514
2519
|
display: flex;
|
|
2515
2520
|
flex-direction: column;
|
|
2516
2521
|
flex: 1;
|
|
2517
2522
|
gap: ${Zt("title-gap")};
|
|
2518
|
-
`,Ks=d.createContext(null),
|
|
2523
|
+
`,Ks=d.createContext(null),Dh=()=>{const e=d.useContext(Ks);if(e===null)throw new Error("Unable to use SelectViewListContext outside of its provider.");return e},[Se]=O(["radio-button"]),Mh=d.forwardRef(({checked:e,onChange:t,...o},n)=>i.jsx(Eh,{onClick:t,ref:n,readOnly:!0,type:"radio",checked:!!e,...o})),Eh=g.input`
|
|
2519
2524
|
appearance: none;
|
|
2520
2525
|
-webkit-appearance: none;
|
|
2521
2526
|
margin: 0;
|
|
@@ -2549,7 +2554,7 @@
|
|
|
2549
2554
|
}
|
|
2550
2555
|
background-color: ${Se("background-color-disabled")};
|
|
2551
2556
|
}
|
|
2552
|
-
`;function
|
|
2557
|
+
`;function zh(e){if(e=typeof e=="number"?e:parseInt(e),e===0)return"0.00 B";const t=Math.floor(Math.log(e)/Math.log(1024));return(e/Math.pow(1024,t)).toFixed(2)+" "+" KMGTP".charAt(t)+"B"}const Vo=new IntersectionObserver(([e])=>{const t=e.boundingClientRect.top-e.intersectionRect.top<0,o=e.boundingClientRect.bottom-e.intersectionRect.bottom>0;e.target.classList.toggle("isStuckTop",t),e.target.classList.toggle("isStuckBottom",o)},{threshold:[1]}),Oh=(e,t)=>{if(e==="\\"||e==="/")return"/";if(e.length<=1)return e;const n=e.replace(/\\/g,"/").split(/[/\\]+/);return t!==!1&&n[n.length-1]===""&&n.pop(),n.join("/")},[ae]=O(["select-view-list"]),qs=d.memo(({id:e,name:t,icon:o,onListItemAction:n,isSelectDisabled:r})=>{const{selected:s,viewing:a}=Dh(),l=d.useRef(null),u=d.useRef(null),f=d.useRef(!1),p=s===e,h=a===e;d.useEffect(()=>{u.current&&(p?(Vo.observe(u.current),f.current=!0):f.current&&(f.current=!1,Vo.unobserve(u.current)))},[p]);const m=d.useCallback(()=>{n==null||n(e,"select")},[n,e]),x=d.useCallback(b=>{l.current&&l.current.contains(b.target)||n==null||n(e,"view")},[e,n]);return i.jsx(M.ClassNames,{children:({cx:b})=>i.jsx(Ih,{ref:u,className:b({isSelected:p}),onClick:x,children:i.jsxs(Rh,{className:b({isViewing:h}),children:[i.jsx(Mh,{ref:l,checked:p,disabled:r,onChange:m}),i.jsxs(Nh,{color:"dark",bold:p,variant:"body",children:[t,o]}),i.jsx(_,{iconId:"Right",color:"blue",size:"sm"})]})})})}),Ih=g.div`
|
|
2553
2558
|
width: 100%;
|
|
2554
2559
|
display: flex;
|
|
2555
2560
|
height: auto;
|
|
@@ -2581,7 +2586,7 @@
|
|
|
2581
2586
|
&.isStuckTop {
|
|
2582
2587
|
box-shadow: 0px 6px 5px 0px rgba(0, 0, 0, 0.04);
|
|
2583
2588
|
}
|
|
2584
|
-
`,
|
|
2589
|
+
`,Rh=g.div`
|
|
2585
2590
|
width: 100%;
|
|
2586
2591
|
display: flex;
|
|
2587
2592
|
flex-shrink: 0;
|
|
@@ -2595,7 +2600,7 @@
|
|
|
2595
2600
|
&.isViewing {
|
|
2596
2601
|
background-color: ${ae("background-color-viewing")};
|
|
2597
2602
|
}
|
|
2598
|
-
`,
|
|
2603
|
+
`,Nh=g(E)`
|
|
2599
2604
|
flex: 1;
|
|
2600
2605
|
overflow: hidden;
|
|
2601
2606
|
text-overflow: ellipsis;
|
|
@@ -2605,7 +2610,7 @@
|
|
|
2605
2610
|
gap: ${ae("gap")};
|
|
2606
2611
|
align-items: center;
|
|
2607
2612
|
display: flex;
|
|
2608
|
-
`,
|
|
2613
|
+
`,Fh=({className:e,dp:t,emptyState:o,firstChild:n,lastChild:r,onListItemAction:s,selected:a,viewing:l})=>{const u=d.useMemo(()=>({selected:a,viewing:l}),[a,l]);return i.jsx(Ks.Provider,{value:u,children:i.jsx(Ah,{className:e,dataProvider:t,emptyState:o,firstChild:n,ItemTemplate:qs,lastChild:r,onListItemAction:s})})},Ah=g(wn)`
|
|
2609
2614
|
height: 100%;
|
|
2610
2615
|
width: 100%;
|
|
2611
2616
|
align-items: flex-start;
|
|
@@ -2621,47 +2626,47 @@
|
|
|
2621
2626
|
::-webkit-scrollbar-thumb {
|
|
2622
2627
|
border-left: 3px solid transparent;
|
|
2623
2628
|
}
|
|
2624
|
-
`,Zs=d.createContext(!1),
|
|
2629
|
+
`,Zs=d.createContext(!1),_h=()=>d.useContext(Zs),Lh=d.memo(({title:e,disabled:t,onToggleShowSelected:o,t:n})=>i.jsxs(Wh,{children:[i.jsx(E,{variant:"h2",color:"dark",children:e}),i.jsxs(Bh,{children:[i.jsx(E,{variant:"small",color:"grey",children:(n==null?void 0:n("selectedOnly"))??"MISSING T FUNC"}),i.jsx(io,{disabled:t,onChange:o})]})]})),Wh=g.div`
|
|
2625
2630
|
display: flex;
|
|
2626
2631
|
align-items: center;
|
|
2627
2632
|
width: 100%;
|
|
2628
2633
|
justify-content: space-between;
|
|
2629
2634
|
gap: ${c("spacing-8")};
|
|
2630
|
-
`,
|
|
2635
|
+
`,Bh=g.div`
|
|
2631
2636
|
display: flex;
|
|
2632
2637
|
align-items: center;
|
|
2633
2638
|
gap: ${c("spacing-4")};
|
|
2634
|
-
`,
|
|
2639
|
+
`,Ph=d.memo(e=>{const{selected:t}=et(),o=_h(),n=t.includes(e.id);return o&&!n?null:i.jsx(Is,{...e})}),Hh=g(Ys)`
|
|
2635
2640
|
overflow: hidden;
|
|
2636
|
-
`,
|
|
2641
|
+
`,Vh=g.div`
|
|
2637
2642
|
overflow-x: hidden;
|
|
2638
2643
|
overflow-y: auto;
|
|
2639
|
-
`,
|
|
2644
|
+
`,Gh=L.kosComponent(({defaultShowSelected:e,disabled:t,title:o,selected:n,onSelect:r,emptyMessage:s,dataProvider:a,onSelectAll:l,t:u})=>{const[f,p]=d.useState(e??!1),h=d.useRef(null),m=d.useCallback(b=>{p(b)},[]);d.useEffect(()=>{const b=a;b&&b.updateContextValue&&(b==null||b.updateContextValue("isOnlySelectedVisible",f))},[a,f]),d.useEffect(()=>{const b=a;b&&b.updateContextValue&&(b==null||b.updateContextValue("selected",n))},[a,n]),d.useEffect(()=>{h.current&&n&&(n.length&&n.length!==(a==null?void 0:a.items.length)?h.current.indeterminate!==!0&&(a!=null&&a.items.length)&&(h.current.indeterminate=!0):h.current.indeterminate===!0&&(h.current.indeterminate=!1))},[a==null?void 0:a.items,n]);const x=d.useCallback(()=>{l&&l(n&&n.length>0?"deselect":"select")},[l,n]);return i.jsx(Zs.Provider,{value:f,children:i.jsx(Hh,{className:"",variant:"display",header:i.jsx(Lh,{title:o,disabled:t,t:u,onToggleShowSelected:m}),ContentWrapper:Vh,children:i.jsxs(Uh,{children:[!!l&&!!(a!=null&&a.items.length)&&i.jsxs(Bt,{children:[i.jsx(uo,{children:i.jsx(bt,{ref:h,disabled:t,checked:!!n&&!!n.length&&n.length===a.items.length,onChange:x})}),i.jsx(fo,{children:i.jsx(E,{bold:!0,variant:"body",children:(u==null?void 0:u("selectAll"))??"MISSING T FUNC"})})]}),i.jsx(co,{disabled:t,selected:n,isSingleSelect:!1,onSelect:r,emptyState:s?i.jsx(Yh,{children:i.jsx(E,{variant:"body",color:"grey",children:s})}):void 0,ItemTemplate:Ph,dataProvider:a})]})})})}),Uh=g.div`
|
|
2640
2645
|
width: 100%;
|
|
2641
2646
|
display: flex;
|
|
2642
2647
|
flex-direction: column;
|
|
2643
2648
|
align-items: flex-start;
|
|
2644
2649
|
justify-content: flex-start;
|
|
2645
|
-
`,
|
|
2650
|
+
`,Yh=g.div`
|
|
2646
2651
|
width: 100%;
|
|
2647
2652
|
display: flex;
|
|
2648
2653
|
align-items: center;
|
|
2649
2654
|
justify-content: center;
|
|
2650
2655
|
padding: ${c("spacing-12")} ${c("spacing-20")};
|
|
2651
|
-
`;class
|
|
2656
|
+
`;class Kh extends vn{constructor(o,n,r,s){super(o,n,r,{...s,isOnlySelectedVisible:(s==null?void 0:s.isOnlySelectedVisible)??!1,selected:(s==null?void 0:s.selected)??[]});G(this,"itemMapper");G(this,"observableItems");this.itemMapper=r,this.observableItems=P.observable.map(new Map)}get items(){if(!this.initialized||this.version<0)return[];const o=this.resolvedItems,n=[...new Set(o)],r=u=>this.itemMapper(u,this.context),s=u=>this.filterByInputItem(u,this.context),a=n.filter(s.bind(this)).filter(this.context.get("isOnlySelectedVisible")===!0?u=>(this.context.get("selected")??[]).includes(u.id):()=>!0).sort(this.sortByInputItem.bind(this)).map(r);return Array.from(this.observableItems.keys()).filter(u=>!a.find(f=>f.id===u)).forEach(u=>{L.kosAction(()=>{this.observableItems.delete(u)})}),a.reduce((u,f)=>{if(!u.has(f.id))L.kosAction(()=>{u.set(f.id,f)});else{const p=u.get(f.id);p&&L.kosAction(()=>{const h=Object.assign(p,f);u.set(f.id,h)})}return u},this.observableItems),a.map(u=>this.observableItems.get(u.id))}}const[Do,qh]=O(["option","select"]),Zh=({trigger:e,onSelection:t,children:o})=>i.jsx(Jh,{Reference:e,onSelect:t,menuPlacement:"bottom-start",children:o}),Xh=g(ft)`
|
|
2652
2657
|
${`${Do("bg-color",!0)}: ${c("color-black")}`};
|
|
2653
2658
|
${`${Do("color",!0)}: ${c("color-white")}`};
|
|
2654
2659
|
${`${Do("bg-color-active",!0)}: ${c("color-grey70")}`};
|
|
2655
2660
|
gap: 0px;
|
|
2656
2661
|
cursor: pointer;
|
|
2657
|
-
`,
|
|
2658
|
-
${`${
|
|
2662
|
+
`,Jh=g(yt)`
|
|
2663
|
+
${`${qh("border-color",!0)}: ${c("color-black")}`};
|
|
2659
2664
|
z-index: 15;
|
|
2660
|
-
`,
|
|
2665
|
+
`,Qh=g.div`
|
|
2661
2666
|
cursor: default;
|
|
2662
2667
|
border-bottom: 0.5px solid ${c("color-grey60")};
|
|
2663
2668
|
pointer-events: none;
|
|
2664
|
-
`,[Go]=O(["shell-menu"]),
|
|
2669
|
+
`,[Go]=O(["shell-menu"]),eg=({className:e,left:t,right:o})=>i.jsxs(tg,{className:e,children:[i.jsx(Xn,{children:t}),!!o&&i.jsx(Xn,{children:o})]}),tg=g.div`
|
|
2665
2670
|
align-items: center;
|
|
2666
2671
|
column-gap: ${Go("section-gap")};
|
|
2667
2672
|
display: flex;
|
|
@@ -2675,11 +2680,11 @@
|
|
|
2675
2680
|
display: flex;
|
|
2676
2681
|
height: 100%;
|
|
2677
2682
|
justify-content: flex-start;
|
|
2678
|
-
`,[Jn]=O(["shell-menu"]),
|
|
2683
|
+
`,[Jn]=O(["shell-menu"]),og=d.memo(({text:e,onClick:t,isActive:o})=>i.jsx(ng,{onClick:t,variant:"body",color:"light",bold:o,children:e})),ng=g(E)`
|
|
2679
2684
|
padding: ${Jn("link-padding-y")} ${Jn("link-padding-x")};
|
|
2680
2685
|
line-height: unset;
|
|
2681
2686
|
cursor: pointer;
|
|
2682
|
-
`,[He]=O(["ingredient-card"]),
|
|
2687
|
+
`,[He]=O(["ingredient-card"]),rg=d.memo(({id:e,name:t,trouble:o,ingredientName:n,assigned:r,onListItemAction:s,blocked:a,isSmall:l})=>{const{selected:u,toggleSelection:f}=et(),{t:p}=L.useKosTranslation("dispenser"),h=d.useMemo(()=>u.includes(e),[u,e]),m=d.useCallback(()=>{s&&s(e,"delete")},[e,s]),x=d.useCallback(y=>{s&&s(e,y)},[e,s]),b=d.useCallback(()=>{f(e)},[e,f]);return i.jsx(M.ClassNames,{children:({cx:y})=>i.jsxs(sg,{className:y("holder-list-item",{isSelected:h,isSmall:l}),onClick:b,children:[i.jsxs(ig,{children:[i.jsxs(ag,{children:[i.jsx(E,{variant:l?"small":"body",color:"dark",children:t}),!!o&&i.jsx(lo,{content:o,children:i.jsx(_,{iconId:"ExclamationCircle",color:"red",size:l?"xsm":"sm"})})]}),!!n&&i.jsxs(lg,{children:[i.jsx(ne,{iconId:"DeleteOutlined",color:"blue",size:l?"xsm":"sm",onClick:m,disabled:!r}),i.jsxs(yt,{Reference:i.jsx(ne,{iconId:"Ellipsis",color:"black",size:l?"xsm":"sm"}),onSelect:x,children:[i.jsx(ft,{optionKey:"remove",label:p("holder.removeOption"),disableSelectionStyle:!0,disabled:!r}),i.jsx(ft,{optionKey:"block",disableSelectionStyle:!0,disabled:!r,label:p(`holder.${a?"unblockOption":"blockOption"}`)})]})]})]}),i.jsx(cg,{className:y({isIngredientLess:n===void 0}),children:n?i.jsx(E,{color:"dark",variant:l?"small":"body",bold:!0,children:n}):i.jsx(Ae,{variant:l?"borderless-small":"borderless",text:p("holder.assignButton"),icon:"Plus"})})]})})}),sg=g.div`
|
|
2683
2688
|
width: 100%;
|
|
2684
2689
|
height: 100%;
|
|
2685
2690
|
border: ${He("border")} solid ${He("border-color")};
|
|
@@ -2697,23 +2702,23 @@
|
|
|
2697
2702
|
&.isSelected {
|
|
2698
2703
|
border-color: ${He("border-color-selected")};
|
|
2699
2704
|
}
|
|
2700
|
-
`,
|
|
2705
|
+
`,ig=g.div`
|
|
2701
2706
|
width: 100%;
|
|
2702
2707
|
display: flex;
|
|
2703
2708
|
align-items: center;
|
|
2704
2709
|
justify-content: flex-start;
|
|
2705
2710
|
column-gap: ${He("column-gap")};
|
|
2706
|
-
`,
|
|
2711
|
+
`,ag=g.div`
|
|
2707
2712
|
flex: 1;
|
|
2708
2713
|
display: flex;
|
|
2709
2714
|
align-items: center;
|
|
2710
2715
|
justify-content: flex-start;
|
|
2711
2716
|
column-gap: ${He("column-gap")};
|
|
2712
|
-
`,
|
|
2717
|
+
`,lg=g.div`
|
|
2713
2718
|
display: flex;
|
|
2714
2719
|
align-items: center;
|
|
2715
2720
|
column-gap: ${He("column-gap")};
|
|
2716
|
-
`,
|
|
2721
|
+
`,cg=g.div`
|
|
2717
2722
|
width: 100%;
|
|
2718
2723
|
display: flex;
|
|
2719
2724
|
align-items: center;
|
|
@@ -2722,25 +2727,25 @@
|
|
|
2722
2727
|
&.isIngredientLess {
|
|
2723
2728
|
justify-content: center;
|
|
2724
2729
|
}
|
|
2725
|
-
`,
|
|
2730
|
+
`,dg=["settings","devices","tools","performance"],ug=["viewBrowse","manage","configure","troubleshoot","store","main"],fg=dg.map(e=>ug.map(t=>({start:e,end:t}))).flatMap(e=>e),[ye,Xs]=O(["branded-header","icon"]),pg=g.div`
|
|
2726
2731
|
width: 100%;
|
|
2727
2732
|
display: flex;
|
|
2728
2733
|
flex-direction: column;
|
|
2729
2734
|
align-items: flex-start;
|
|
2730
2735
|
justify-content: flex-start;
|
|
2731
2736
|
border-bottom: ${ye("border-bottom-size")} solid ${ye("border-bottom-color")};
|
|
2732
|
-
`,
|
|
2737
|
+
`,hg=g.div`
|
|
2733
2738
|
width: 100%;
|
|
2734
2739
|
display: flex;
|
|
2735
2740
|
align-items: center;
|
|
2736
2741
|
justify-content: flex-start;
|
|
2737
2742
|
max-height: 52px;
|
|
2738
|
-
`;g.div``;const
|
|
2743
|
+
`;g.div``;const gg=g.div`
|
|
2739
2744
|
display: flex;
|
|
2740
2745
|
flex: 1;
|
|
2741
2746
|
gap: 16px;
|
|
2742
2747
|
padding: 12px 20px 12px 16px;
|
|
2743
|
-
`,
|
|
2748
|
+
`,mg=g.div`
|
|
2744
2749
|
flex: 1;
|
|
2745
2750
|
display: flex;
|
|
2746
2751
|
align-items: center;
|
|
@@ -2750,7 +2755,7 @@
|
|
|
2750
2755
|
/* &.hasDescription {
|
|
2751
2756
|
align-items: flex-start;
|
|
2752
2757
|
} */
|
|
2753
|
-
`,
|
|
2758
|
+
`,bg=g.div`
|
|
2754
2759
|
flex: 1;
|
|
2755
2760
|
overflow: hidden;
|
|
2756
2761
|
display: flex;
|
|
@@ -2761,14 +2766,14 @@
|
|
|
2761
2766
|
`;g.img`
|
|
2762
2767
|
height: 100%;
|
|
2763
2768
|
`;const Js=M.css`
|
|
2764
|
-
${
|
|
2769
|
+
${fg.map(({start:e,end:t})=>`&[data-gradient="${e}-${t}"] {
|
|
2765
2770
|
background: linear-gradient(
|
|
2766
2771
|
90deg,
|
|
2767
2772
|
${ye(`startColor-${e}`)} 0%,
|
|
2768
2773
|
${ye(`endColor-${t}`)} 100%
|
|
2769
2774
|
);
|
|
2770
2775
|
}`)}
|
|
2771
|
-
`,
|
|
2776
|
+
`,xg=g.div`
|
|
2772
2777
|
background-color: ${e=>e.color};
|
|
2773
2778
|
height: ${ye("badge-size")};
|
|
2774
2779
|
width: ${ye("badge-size")};
|
|
@@ -2782,7 +2787,7 @@
|
|
|
2782
2787
|
position: relative;
|
|
2783
2788
|
${`${Xs("size-xxlrg",!0)}: calc(100% - 2px)`};
|
|
2784
2789
|
${Js}
|
|
2785
|
-
`;const
|
|
2790
|
+
`;const yg=g.div`
|
|
2786
2791
|
width: 100%;
|
|
2787
2792
|
height: 100%;
|
|
2788
2793
|
position: absolute;
|
|
@@ -2801,7 +2806,7 @@
|
|
|
2801
2806
|
height: ${ye("line-height")};
|
|
2802
2807
|
overflow: hidden;
|
|
2803
2808
|
${Js}
|
|
2804
|
-
`;const
|
|
2809
|
+
`;const kg=g.div`
|
|
2805
2810
|
width: 100%;
|
|
2806
2811
|
height: 100%;
|
|
2807
2812
|
position: absolute;
|
|
@@ -2810,13 +2815,13 @@
|
|
|
2810
2815
|
z-index: 1;
|
|
2811
2816
|
background-color: ${c("color-grey60")};
|
|
2812
2817
|
opacity: 0.5;
|
|
2813
|
-
`,
|
|
2818
|
+
`,vg=g(E)`
|
|
2814
2819
|
display: -webkit-box;
|
|
2815
2820
|
-webkit-line-clamp: 2;
|
|
2816
2821
|
-webkit-box-orient: vertical;
|
|
2817
2822
|
overflow: hidden;
|
|
2818
2823
|
text-overflow: ellipsis;
|
|
2819
|
-
`,
|
|
2824
|
+
`,wg=e=>i.jsx(vg,{...e,variant:"body",color:"dark"}),Cg=d.memo(({color:e,title:t,description:o,icon:n,Action:r,isOffline:s})=>i.jsx(M.ClassNames,{children:({cx:a})=>i.jsx(pg,{children:i.jsxs(hg,{children:[i.jsxs(xg,{color:e,children:[i.jsx(yg,{children:n&&i.jsx(_,{iconId:n,size:"xxlrg",color:"white"})}),!!s&&i.jsx(kg,{})]}),i.jsxs(gg,{children:[i.jsx(mg,{className:a({hasDescription:!!o}),children:i.jsxs(bg,{children:[i.jsx(E,{variant:"h1",children:t}),!!o&&i.jsx(wg,{children:o})]})}),!!r&&i.jsx(r,{})]})]})})})),Qs=d.createContext(null),ei=L.kosComponent(({children:e,t,isSortable:o,onListItemAction:n})=>{const r=d.useMemo(()=>({t,isSortable:!!o,onListItemAction:n}),[o,t,n]);return i.jsx(Qs.Provider,{value:r,children:e})}),jn=()=>{const e=d.useContext(Qs);if(e===null)throw new Error("TableContext must be used within a TableContextProvider");return e},[Ze]=O(["table"]),go=g.td`
|
|
2820
2825
|
padding: ${Ze("cell-padding-y")} ${Ze("cell-padding-x")};
|
|
2821
2826
|
background-color: ${Ze("background-color")};
|
|
2822
2827
|
color: ${Ze("cell-color")};
|
|
@@ -2831,17 +2836,17 @@
|
|
|
2831
2836
|
`,Tn=d.memo(({cell:e})=>{const{isSortable:t}=jn();return i.jsx(go,{className:t&&e.column.getCanSort()?"isSortable":void 0,children:be.flexRender(e.column.columnDef.cell,e.getContext())},e.id)}),[Qn]=O(["table"]),pt=g.tr`
|
|
2832
2837
|
width: 100%;
|
|
2833
2838
|
border-bottom: ${Qn("row-border-bottom-size")} solid ${Qn("border-color")};
|
|
2834
|
-
|
|
2839
|
+
`,$g=d.memo(({row:e,TdComponent:t})=>{const o=t??Tn;return i.jsx(pt,{children:e.getVisibleCells().map(n=>i.jsx(o,{cell:n},n.id))})}),[Sg]=O(["table"]),jg=[],Tg=e=>e.id,Dg=L.kosComponent(({dataProvider:e,columns:t,getRowId:o,emptyState:n,isSortable:r,t:s,TdComponent:a,TrComponent:l,onListItemAction:u,renderEmptyAsStandalone:f,disabled:p,...h})=>{Lt(e);const[m,x]=d.useState([]),b=be.useReactTable({columns:t,meta:{disabled:p},data:e?e==null?void 0:e.items:jg,getCoreRowModel:be.getCoreRowModel(),getSortedRowModel:r?be.getSortedRowModel():void 0,getRowId:o??Tg,onSortingChange:r?x:void 0,state:{sorting:m}}),y=l??$g,k=!b.getRowModel().rows.length;return k&&f?n??null:i.jsx(ei,{onListItemAction:u,isSortable:r,t:s,children:i.jsxs(Mg,{...h,children:[i.jsx(Eg,{children:b.getHeaderGroups().map(w=>i.jsx(pt,{children:w.headers.map($=>i.jsx(d.Fragment,{children:be.flexRender($.column.columnDef.header,$.getContext())},$.id))},w.id))}),i.jsx(zg,{children:k?i.jsx(pt,{children:i.jsx(go,{colSpan:t.length,children:n??null})}):b.getRowModel().rows.map(w=>i.jsx(y,{row:w,TdComponent:a??Tn},w.id))})]})})}),Mg=g.table`
|
|
2835
2840
|
width: 100%;
|
|
2836
2841
|
overflow: auto;
|
|
2837
2842
|
border-collapse: collapse;
|
|
2838
|
-
font-family: ${
|
|
2843
|
+
font-family: ${Sg("font-family")};
|
|
2839
2844
|
table-layout: fixed;
|
|
2840
|
-
`,
|
|
2845
|
+
`,Eg=g.thead`
|
|
2841
2846
|
width: 100%;
|
|
2842
|
-
`,
|
|
2847
|
+
`,zg=g.tbody`
|
|
2843
2848
|
width: 100%;
|
|
2844
|
-
`,[je]=O(["table"]),
|
|
2849
|
+
`,[je]=O(["table"]),Og=(e,t)=>e?e==="desc"?(t==null?void 0:t("table.sort",{direction:t==null?void 0:t("table.ascending"),defaultValue:"Click to sort ascending"}))??"Click to sort ascending":(t==null?void 0:t("table.cancelSort",{defaultValue:"Cancel sort"}))??"Cancel sort":(t==null?void 0:t("table.sort",{direction:t==null?void 0:t("table.descending"),defaultValue:"Click to sort descending"}))??"Click to sort descending",Uo=d.memo(({width:e,isBlank:t,toggleSorting:o,id:n,alignment:r,sortValue:s,canSort:a,isVirtual:l})=>{const{isSortable:u,t:f}=jn(),p=d.useCallback(()=>{o()},[o]);return i.jsx(Ig,{className:mt({isSortable:u&&a,isSorted:s!==!1}),style:{width:e??"auto",display:l?"flex":"table-cell"},children:i.jsxs(Rg,{"data-alignment":r,children:[!t&&((f==null?void 0:f(`table.header.${n}`))??n),u&&a&&i.jsx(lo,{content:Og(s,f),children:i.jsx(ne,{iconId:s?s==="asc"?"SortAscending":"SortDescending":"Sort",size:"sm",onClick:p,color:"grey"})})]})})}),Ig=g.th`
|
|
2845
2850
|
padding: ${je("cell-padding-y")} ${je("cell-padding-x")};
|
|
2846
2851
|
background-color: ${je("header-background-color")};
|
|
2847
2852
|
color: ${je("head-color")};
|
|
@@ -2861,7 +2866,7 @@
|
|
|
2861
2866
|
&:first-of-type {
|
|
2862
2867
|
padding-left: ${je("cell-padding-left-first-in-row")};
|
|
2863
2868
|
}
|
|
2864
|
-
`,
|
|
2869
|
+
`,Rg=g.div`
|
|
2865
2870
|
display: flex;
|
|
2866
2871
|
align-items: center;
|
|
2867
2872
|
justify-content: space-between;
|
|
@@ -2875,29 +2880,29 @@
|
|
|
2875
2880
|
&[data-alignment="center"] {
|
|
2876
2881
|
justify-content: center;
|
|
2877
2882
|
}
|
|
2878
|
-
`,
|
|
2883
|
+
`,Ng=()=>{const e=be.createColumnHelper();return{displayColumn:r=>s=>e.display({header:({column:a,header:l})=>{var u,f,p;return i.jsx(Uo,{id:l.id,canSort:a.getCanSort(),width:(u=a.columnDef.meta)==null?void 0:u.width,alignment:(f=a.columnDef.meta)==null?void 0:f.headerAlign,isBlank:(p=a.columnDef.meta)==null?void 0:p.isBlank,toggleSorting:a.toggleSorting,sortValue:a.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},l.id)},...s,meta:{...s.meta,width:"auto",...r}}),accessorColumn:r=>(s,a)=>e.accessor(s,{header:({column:l,header:u})=>{var f,p,h;return i.jsx(Uo,{id:u.id,canSort:l.getCanSort(),width:(f=l.columnDef.meta)==null?void 0:f.width,alignment:(p=l.columnDef.meta)==null?void 0:p.headerAlign,isBlank:(h=l.columnDef.meta)==null?void 0:h.isBlank,toggleSorting:l.toggleSorting,sortValue:l.getIsSorted(),isVirtual:r==null?void 0:r.isVirtual},u.id)},...a,meta:{...a.meta,width:"auto",...r}}),groupColumn:r=>s=>e.group({...s,meta:{...s.meta,width:"auto",...r}})}};function ct(e,t,o){let n=o.initialDeps??[],r;function s(){var a,l,u,f;let p;o.key&&((a=o.debug)!=null&&a.call(o))&&(p=Date.now());const h=e();if(!(h.length!==n.length||h.some((b,y)=>n[y]!==b)))return r;n=h;let x;if(o.key&&((l=o.debug)!=null&&l.call(o))&&(x=Date.now()),r=t(...h),o.key&&((u=o.debug)!=null&&u.call(o))){const b=Math.round((Date.now()-p)*100)/100,y=Math.round((Date.now()-x)*100)/100,k=y/16,w=($,v)=>{for($=String($);$.length<v;)$=" "+$;return $};console.info(`%c⏱ ${w(y,5)} /${w(b,5)} ms`,`
|
|
2879
2884
|
font-size: .6rem;
|
|
2880
2885
|
font-weight: bold;
|
|
2881
|
-
color: hsl(${Math.max(0,Math.min(120-120*k,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(f=o==null?void 0:o.onChange)==null||f.call(o,r),r}return s.updateDeps=a=>{n=a},s}function er(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Ng=(e,t)=>Math.abs(e-t)<1.01,Fg=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},tr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},Ag=e=>e,_g=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=t;r<=o;r++)n.push(r);return n},Lg=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;const r=a=>{const{width:l,height:u}=a;t({width:Math.round(l),height:Math.round(u)})};if(r(tr(o)),!n.ResizeObserver)return()=>{};const s=new n.ResizeObserver(a=>{const l=()=>{const u=a[0];if(u!=null&&u.borderBoxSize){const f=u.borderBoxSize[0];if(f){r({width:f.inlineSize,height:f.blockSize});return}}r(tr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},or={passive:!0},nr=typeof window>"u"?!0:"onscrollend"in window,Wg=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&nr?()=>{}:Fg(n,()=>{t(r,!1)},e.options.isScrollingResetDelay),a=p=>()=>{const{horizontal:h,isRtl:m}=e.options;r=h?o.scrollLeft*(m&&-1||1):o.scrollTop,s(),t(r,p)},l=a(!0),u=a(!1);u(),o.addEventListener("scroll",l,or);const f=e.options.useScrollendEvent&&nr;return f&&o.addEventListener("scrollend",u,or),()=>{o.removeEventListener("scroll",l),f&&o.removeEventListener("scrollend",u)}},Bg=(e,t,o)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},Pg=(e,{adjustments:t=0,behavior:o},n)=>{var r,s;const a=e+t;(s=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||s.call(r,{[n.options.horizontal?"left":"top"]:a,behavior:o})};class Hg{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const n=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(r=>{r.forEach(s=>{const a=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),o=null},observe:r=>{var s;return(s=n())==null?void 0:s.observe(r,{box:"border-box"})},unobserve:r=>{var s;return(s=n())==null?void 0:s.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([n,r])=>{typeof r>"u"&&delete o[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:Ag,rangeExtractor:_g,onChange:()=>{},measureElement:Bg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,o)},this.maybeNotify=ct(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,n)=>{const r=new Map,s=new Map;for(let a=n-1;a>=0;a--){const l=o[a];if(r.has(l.lane))continue;const u=s.get(l.lane);if(u==null||l.end>u.end?s.set(l.lane,l):l.end<u.end&&r.set(l.lane,!0),r.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurementOptions=ct(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,n,r,s,a)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:a}),{key:!1}),this.getMeasurements=ct(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:a},l)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,u);for(let p=u;p<o;p++){const h=s(p),m=this.options.lanes===1?f[p-1]:this.getFurthestMeasurement(f,p),x=m?m.end+this.options.gap:n+r,b=l.get(h),y=typeof b=="number"?b:this.options.estimateSize(p),k=x+y,w=m?m.lane:p%this.options.lanes;f[p]={index:p,start:x,size:y,end:k,key:h,lane:w}}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ct(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?Vg({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ct(()=>{let o=null,n=null;const r=this.calculateRange();return r&&(o=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,n]},(o,n,r,s,a)=>s===null||a===null?[]:o({startIndex:s,endIndex:a,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const n=this.options.indexAttribute,r=o.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(o,n)=>{const r=this.indexFromElement(o),s=this.measurementsCache[r];if(!s)return;const a=s.key,l=this.elementsCache.get(a);l!==o&&(l&&this.observer.unobserve(l),this.observer.observe(o),this.elementsCache.set(a,o)),o.isConnected&&this.resizeItem(r,this.options.measureElement(o,n,this))},this.resizeItem=(o,n)=>{const r=this.measurementsCache[o];if(!r)return;const s=this.itemSizeCache.get(r.key)??r.size,a=n-s;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,a,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(o,void 0)},this.getVirtualItems=ct(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,n)=>{const r=[];for(let s=0,a=o.length;s<a;s++){const l=o[s],u=n[l];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const n=this.getMeasurements();if(n.length!==0)return er(n[ti(0,n.length-1,r=>er(n[r]).start,o)])},this.getOffsetForAlignment=(o,n,r=0)=>{const s=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=o>=a+s?"end":"start"),n==="center"?o+=(r-s)/2:n==="end"&&(o-=s);const l=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(l,o),0)},this.getOffsetForIndex=(o,n="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=this.measurementsCache[o];if(!r)return;const s=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(r.end>=a+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const l=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1));let s=0;const a=10,l=f=>{if(!this.targetWindow)return;const p=this.getOffsetForIndex(o,f);if(!p){console.warn("Failed to get offset for index:",o);return}const[h,m]=p;this._scrollToOffset(h,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const x=this.getScrollOffset(),b=this.getOffsetForIndex(o,m);if(!b){console.warn("Failed to get offset for index:",o);return}Ng(b[0],x)||u(m)})},u=f=>{this.targetWindow&&(s++,s<a?this.targetWindow.requestAnimationFrame(()=>l(f)):console.warn(`Failed to scroll to index ${o} after ${a} attempts.`))};l(n)},this.scrollBy=(o,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var o;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((o=n[n.length-1])==null?void 0:o.end)??0;else{const s=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&s.some(l=>l===null);){const l=n[a];s[l.lane]===null&&(s[l.lane]=l.end),a--}r=Math.max(...s.filter(l=>l!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:n,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ti=(e,t,o,n)=>{for(;e<=t;){const r=(e+t)/2|0,s=o(r);if(s<n)e=r+1;else if(s>n)t=r-1;else return r}return e>0?e-1:0};function Vg({measurements:e,outerSize:t,scrollOffset:o,lanes:n}){const r=e.length-1,s=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let a=ti(0,r,s,o),l=a;if(n===1)for(;l<r&&e[l].end<o+t;)l++;else if(n>1){const u=Array(n).fill(0);for(;l<r&&u.some(p=>p<o+t);){const p=e[l];u[p.lane]=p.end,l++}const f=Array(n).fill(o+t);for(;a>=0&&f.some(p=>p>=o);){const p=e[a];f[p.lane]=p.start,a--}a=Math.max(0,a-a%n),l=Math.min(r,l+(n-1-l%n))}return{startIndex:a,endIndex:l}}const rr=typeof document<"u"?Xt.useLayoutEffect:Xt.useEffect;function Gg(e){const t=Xt.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var a;s?ur.flushSync(t):t(),(a=e.onChange)==null||a.call(e,r,s)}},[n]=Xt.useState(()=>new Hg(o));return n.setOptions(o),rr(()=>n._didMount(),[]),rr(()=>n._willUpdate()),n}function Ug(e){return Gg({observeElementRect:Lg,observeElementOffset:Wg,scrollToFn:Pg,...e})}const[oi]=O(["table"]),Yg=[],Kg=e=>e.id,qg=L.kosComponent(({dataProvider:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:a,TdComponent:l,TrComponent:u,onListItemAction:f,renderEmptyAsStandalone:p,...h})=>{Lt(e);const m=d.useRef(null),[x,b]=d.useState([]),y=be.useReactTable({columns:t,data:e?e==null?void 0:e.items:Yg,getCoreRowModel:be.getCoreRowModel(),getSortedRowModel:s?be.getSortedRowModel():void 0,getRowId:n??Kg,onSortingChange:s?b:void 0,state:{sorting:x}}),k=!y.getRowModel().rows.length;return k&&p?r??null:i.jsx(ei,{onListItemAction:f,isSortable:s,t:a,children:i.jsx(Jg,{className:o,ref:m,children:i.jsxs(Qg,{...h,children:[i.jsx(em,{children:y.getHeaderGroups().map(w=>i.jsx(pt,{style:{display:"flex"},children:w.headers.map($=>i.jsx(d.Fragment,{children:be.flexRender($.column.columnDef.header,$.getContext())},$.id))},w.id))}),i.jsx(Zg,{isEmpty:k,numColumns:t.length,emptyState:r,table:y,tableContainerRef:m})]})})})}),Zg=L.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:a}=e.getRowModel(),l=Ug({count:a.length,estimateSize:()=>33,getScrollElement:()=>t.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?u=>u==null?void 0:u.getBoundingClientRect().height:void 0,overscan:5});return i.jsx(tm,{style:{position:"relative",height:`${l.getTotalSize()}px`},children:n?i.jsx(pt,{children:i.jsx(go,{colSpan:s,children:r??null})}):l.getVirtualItems().map(u=>{const f=a[u.index];return i.jsx(Xg,{trClassName:o,row:f,virtualRow:u,rowVirtualizer:l},f.id)})})}),Xg=L.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(pt,{"data-index":o.index,ref:r=>n.measureElement(r),className:e,style:{display:"flex",position:"absolute",transform:`translateY(${o.start}px)`,width:"100%"},children:t.getVisibleCells().map(r=>{var s;return i.jsx(go,{style:{display:"flex",width:((s=r.column.columnDef.meta)==null?void 0:s.width)??r.column.getSize()},children:be.flexRender(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)),Jg=g.div`
|
|
2886
|
+
color: hsl(${Math.max(0,Math.min(120-120*k,120))}deg 100% 31%);`,o==null?void 0:o.key)}return(f=o==null?void 0:o.onChange)==null||f.call(o,r),r}return s.updateDeps=a=>{n=a},s}function er(e,t){if(e===void 0)throw new Error("Unexpected undefined");return e}const Fg=(e,t)=>Math.abs(e-t)<1.01,Ag=(e,t,o)=>{let n;return function(...r){e.clearTimeout(n),n=e.setTimeout(()=>t.apply(this,r),o)}},tr=e=>{const{offsetWidth:t,offsetHeight:o}=e;return{width:t,height:o}},_g=e=>e,Lg=e=>{const t=Math.max(e.startIndex-e.overscan,0),o=Math.min(e.endIndex+e.overscan,e.count-1),n=[];for(let r=t;r<=o;r++)n.push(r);return n},Wg=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;const r=a=>{const{width:l,height:u}=a;t({width:Math.round(l),height:Math.round(u)})};if(r(tr(o)),!n.ResizeObserver)return()=>{};const s=new n.ResizeObserver(a=>{const l=()=>{const u=a[0];if(u!=null&&u.borderBoxSize){const f=u.borderBoxSize[0];if(f){r({width:f.inlineSize,height:f.blockSize});return}}r(tr(o))};e.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(l):l()});return s.observe(o,{box:"border-box"}),()=>{s.unobserve(o)}},or={passive:!0},nr=typeof window>"u"?!0:"onscrollend"in window,Bg=(e,t)=>{const o=e.scrollElement;if(!o)return;const n=e.targetWindow;if(!n)return;let r=0;const s=e.options.useScrollendEvent&&nr?()=>{}:Ag(n,()=>{t(r,!1)},e.options.isScrollingResetDelay),a=p=>()=>{const{horizontal:h,isRtl:m}=e.options;r=h?o.scrollLeft*(m&&-1||1):o.scrollTop,s(),t(r,p)},l=a(!0),u=a(!1);u(),o.addEventListener("scroll",l,or);const f=e.options.useScrollendEvent&&nr;return f&&o.addEventListener("scrollend",u,or),()=>{o.removeEventListener("scroll",l),f&&o.removeEventListener("scrollend",u)}},Pg=(e,t,o)=>{if(t!=null&&t.borderBoxSize){const n=t.borderBoxSize[0];if(n)return Math.round(n[o.options.horizontal?"inlineSize":"blockSize"])}return e[o.options.horizontal?"offsetWidth":"offsetHeight"]},Hg=(e,{adjustments:t=0,behavior:o},n)=>{var r,s;const a=e+t;(s=(r=n.scrollElement)==null?void 0:r.scrollTo)==null||s.call(r,{[n.options.horizontal?"left":"top"]:a,behavior:o})};class Vg{constructor(t){this.unsubs=[],this.scrollElement=null,this.targetWindow=null,this.isScrolling=!1,this.measurementsCache=[],this.itemSizeCache=new Map,this.pendingMeasuredCacheIndexes=[],this.scrollRect=null,this.scrollOffset=null,this.scrollDirection=null,this.scrollAdjustments=0,this.elementsCache=new Map,this.observer=(()=>{let o=null;const n=()=>o||(!this.targetWindow||!this.targetWindow.ResizeObserver?null:o=new this.targetWindow.ResizeObserver(r=>{r.forEach(s=>{const a=()=>{this._measureElement(s.target,s)};this.options.useAnimationFrameWithResizeObserver?requestAnimationFrame(a):a()})}));return{disconnect:()=>{var r;(r=n())==null||r.disconnect(),o=null},observe:r=>{var s;return(s=n())==null?void 0:s.observe(r,{box:"border-box"})},unobserve:r=>{var s;return(s=n())==null?void 0:s.unobserve(r)}}})(),this.range=null,this.setOptions=o=>{Object.entries(o).forEach(([n,r])=>{typeof r>"u"&&delete o[n]}),this.options={debug:!1,initialOffset:0,overscan:1,paddingStart:0,paddingEnd:0,scrollPaddingStart:0,scrollPaddingEnd:0,horizontal:!1,getItemKey:_g,rangeExtractor:Lg,onChange:()=>{},measureElement:Pg,initialRect:{width:0,height:0},scrollMargin:0,gap:0,indexAttribute:"data-index",initialMeasurementsCache:[],lanes:1,isScrollingResetDelay:150,enabled:!0,isRtl:!1,useScrollendEvent:!1,useAnimationFrameWithResizeObserver:!1,...o}},this.notify=o=>{var n,r;(r=(n=this.options).onChange)==null||r.call(n,this,o)},this.maybeNotify=ct(()=>(this.calculateRange(),[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]),o=>{this.notify(o)},{key:!1,debug:()=>this.options.debug,initialDeps:[this.isScrolling,this.range?this.range.startIndex:null,this.range?this.range.endIndex:null]}),this.cleanup=()=>{this.unsubs.filter(Boolean).forEach(o=>o()),this.unsubs=[],this.observer.disconnect(),this.scrollElement=null,this.targetWindow=null},this._didMount=()=>()=>{this.cleanup()},this._willUpdate=()=>{var o;const n=this.options.enabled?this.options.getScrollElement():null;if(this.scrollElement!==n){if(this.cleanup(),!n){this.maybeNotify();return}this.scrollElement=n,this.scrollElement&&"ownerDocument"in this.scrollElement?this.targetWindow=this.scrollElement.ownerDocument.defaultView:this.targetWindow=((o=this.scrollElement)==null?void 0:o.window)??null,this.elementsCache.forEach(r=>{this.observer.observe(r)}),this._scrollToOffset(this.getScrollOffset(),{adjustments:void 0,behavior:void 0}),this.unsubs.push(this.options.observeElementRect(this,r=>{this.scrollRect=r,this.maybeNotify()})),this.unsubs.push(this.options.observeElementOffset(this,(r,s)=>{this.scrollAdjustments=0,this.scrollDirection=s?this.getScrollOffset()<r?"forward":"backward":null,this.scrollOffset=r,this.isScrolling=s,this.maybeNotify()}))}},this.getSize=()=>this.options.enabled?(this.scrollRect=this.scrollRect??this.options.initialRect,this.scrollRect[this.options.horizontal?"width":"height"]):(this.scrollRect=null,0),this.getScrollOffset=()=>this.options.enabled?(this.scrollOffset=this.scrollOffset??(typeof this.options.initialOffset=="function"?this.options.initialOffset():this.options.initialOffset),this.scrollOffset):(this.scrollOffset=null,0),this.getFurthestMeasurement=(o,n)=>{const r=new Map,s=new Map;for(let a=n-1;a>=0;a--){const l=o[a];if(r.has(l.lane))continue;const u=s.get(l.lane);if(u==null||l.end>u.end?s.set(l.lane,l):l.end<u.end&&r.set(l.lane,!0),r.size===this.options.lanes)break}return s.size===this.options.lanes?Array.from(s.values()).sort((a,l)=>a.end===l.end?a.index-l.index:a.end-l.end)[0]:void 0},this.getMeasurementOptions=ct(()=>[this.options.count,this.options.paddingStart,this.options.scrollMargin,this.options.getItemKey,this.options.enabled],(o,n,r,s,a)=>(this.pendingMeasuredCacheIndexes=[],{count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:a}),{key:!1}),this.getMeasurements=ct(()=>[this.getMeasurementOptions(),this.itemSizeCache],({count:o,paddingStart:n,scrollMargin:r,getItemKey:s,enabled:a},l)=>{if(!a)return this.measurementsCache=[],this.itemSizeCache.clear(),[];this.measurementsCache.length===0&&(this.measurementsCache=this.options.initialMeasurementsCache,this.measurementsCache.forEach(p=>{this.itemSizeCache.set(p.key,p.size)}));const u=this.pendingMeasuredCacheIndexes.length>0?Math.min(...this.pendingMeasuredCacheIndexes):0;this.pendingMeasuredCacheIndexes=[];const f=this.measurementsCache.slice(0,u);for(let p=u;p<o;p++){const h=s(p),m=this.options.lanes===1?f[p-1]:this.getFurthestMeasurement(f,p),x=m?m.end+this.options.gap:n+r,b=l.get(h),y=typeof b=="number"?b:this.options.estimateSize(p),k=x+y,w=m?m.lane:p%this.options.lanes;f[p]={index:p,start:x,size:y,end:k,key:h,lane:w}}return this.measurementsCache=f,f},{key:!1,debug:()=>this.options.debug}),this.calculateRange=ct(()=>[this.getMeasurements(),this.getSize(),this.getScrollOffset(),this.options.lanes],(o,n,r,s)=>this.range=o.length>0&&n>0?Gg({measurements:o,outerSize:n,scrollOffset:r,lanes:s}):null,{key:!1,debug:()=>this.options.debug}),this.getVirtualIndexes=ct(()=>{let o=null,n=null;const r=this.calculateRange();return r&&(o=r.startIndex,n=r.endIndex),this.maybeNotify.updateDeps([this.isScrolling,o,n]),[this.options.rangeExtractor,this.options.overscan,this.options.count,o,n]},(o,n,r,s,a)=>s===null||a===null?[]:o({startIndex:s,endIndex:a,overscan:n,count:r}),{key:!1,debug:()=>this.options.debug}),this.indexFromElement=o=>{const n=this.options.indexAttribute,r=o.getAttribute(n);return r?parseInt(r,10):(console.warn(`Missing attribute name '${n}={index}' on measured element.`),-1)},this._measureElement=(o,n)=>{const r=this.indexFromElement(o),s=this.measurementsCache[r];if(!s)return;const a=s.key,l=this.elementsCache.get(a);l!==o&&(l&&this.observer.unobserve(l),this.observer.observe(o),this.elementsCache.set(a,o)),o.isConnected&&this.resizeItem(r,this.options.measureElement(o,n,this))},this.resizeItem=(o,n)=>{const r=this.measurementsCache[o];if(!r)return;const s=this.itemSizeCache.get(r.key)??r.size,a=n-s;a!==0&&((this.shouldAdjustScrollPositionOnItemSizeChange!==void 0?this.shouldAdjustScrollPositionOnItemSizeChange(r,a,this):r.start<this.getScrollOffset()+this.scrollAdjustments)&&this._scrollToOffset(this.getScrollOffset(),{adjustments:this.scrollAdjustments+=a,behavior:void 0}),this.pendingMeasuredCacheIndexes.push(r.index),this.itemSizeCache=new Map(this.itemSizeCache.set(r.key,n)),this.notify(!1))},this.measureElement=o=>{if(!o){this.elementsCache.forEach((n,r)=>{n.isConnected||(this.observer.unobserve(n),this.elementsCache.delete(r))});return}this._measureElement(o,void 0)},this.getVirtualItems=ct(()=>[this.getVirtualIndexes(),this.getMeasurements()],(o,n)=>{const r=[];for(let s=0,a=o.length;s<a;s++){const l=o[s],u=n[l];r.push(u)}return r},{key:!1,debug:()=>this.options.debug}),this.getVirtualItemForOffset=o=>{const n=this.getMeasurements();if(n.length!==0)return er(n[ti(0,n.length-1,r=>er(n[r]).start,o)])},this.getOffsetForAlignment=(o,n,r=0)=>{const s=this.getSize(),a=this.getScrollOffset();n==="auto"&&(n=o>=a+s?"end":"start"),n==="center"?o+=(r-s)/2:n==="end"&&(o-=s);const l=this.getTotalSize()+this.options.scrollMargin-s;return Math.max(Math.min(l,o),0)},this.getOffsetForIndex=(o,n="auto")=>{o=Math.max(0,Math.min(o,this.options.count-1));const r=this.measurementsCache[o];if(!r)return;const s=this.getSize(),a=this.getScrollOffset();if(n==="auto")if(r.end>=a+s-this.options.scrollPaddingEnd)n="end";else if(r.start<=a+this.options.scrollPaddingStart)n="start";else return[a,n];const l=n==="end"?r.end+this.options.scrollPaddingEnd:r.start-this.options.scrollPaddingStart;return[this.getOffsetForAlignment(l,n,r.size),n]},this.isDynamicMode=()=>this.elementsCache.size>0,this.scrollToOffset=(o,{align:n="start",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getOffsetForAlignment(o,n),{adjustments:void 0,behavior:r})},this.scrollToIndex=(o,{align:n="auto",behavior:r}={})=>{r==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),o=Math.max(0,Math.min(o,this.options.count-1));let s=0;const a=10,l=f=>{if(!this.targetWindow)return;const p=this.getOffsetForIndex(o,f);if(!p){console.warn("Failed to get offset for index:",o);return}const[h,m]=p;this._scrollToOffset(h,{adjustments:void 0,behavior:r}),this.targetWindow.requestAnimationFrame(()=>{const x=this.getScrollOffset(),b=this.getOffsetForIndex(o,m);if(!b){console.warn("Failed to get offset for index:",o);return}Fg(b[0],x)||u(m)})},u=f=>{this.targetWindow&&(s++,s<a?this.targetWindow.requestAnimationFrame(()=>l(f)):console.warn(`Failed to scroll to index ${o} after ${a} attempts.`))};l(n)},this.scrollBy=(o,{behavior:n}={})=>{n==="smooth"&&this.isDynamicMode()&&console.warn("The `smooth` scroll behavior is not fully supported with dynamic size."),this._scrollToOffset(this.getScrollOffset()+o,{adjustments:void 0,behavior:n})},this.getTotalSize=()=>{var o;const n=this.getMeasurements();let r;if(n.length===0)r=this.options.paddingStart;else if(this.options.lanes===1)r=((o=n[n.length-1])==null?void 0:o.end)??0;else{const s=Array(this.options.lanes).fill(null);let a=n.length-1;for(;a>=0&&s.some(l=>l===null);){const l=n[a];s[l.lane]===null&&(s[l.lane]=l.end),a--}r=Math.max(...s.filter(l=>l!==null))}return Math.max(r-this.options.scrollMargin+this.options.paddingEnd,0)},this._scrollToOffset=(o,{adjustments:n,behavior:r})=>{this.options.scrollToFn(o,{behavior:r,adjustments:n},this)},this.measure=()=>{this.itemSizeCache=new Map,this.notify(!1)},this.setOptions(t)}}const ti=(e,t,o,n)=>{for(;e<=t;){const r=(e+t)/2|0,s=o(r);if(s<n)e=r+1;else if(s>n)t=r-1;else return r}return e>0?e-1:0};function Gg({measurements:e,outerSize:t,scrollOffset:o,lanes:n}){const r=e.length-1,s=u=>e[u].start;if(e.length<=n)return{startIndex:0,endIndex:r};let a=ti(0,r,s,o),l=a;if(n===1)for(;l<r&&e[l].end<o+t;)l++;else if(n>1){const u=Array(n).fill(0);for(;l<r&&u.some(p=>p<o+t);){const p=e[l];u[p.lane]=p.end,l++}const f=Array(n).fill(o+t);for(;a>=0&&f.some(p=>p>=o);){const p=e[a];f[p.lane]=p.start,a--}a=Math.max(0,a-a%n),l=Math.min(r,l+(n-1-l%n))}return{startIndex:a,endIndex:l}}const rr=typeof document<"u"?Xt.useLayoutEffect:Xt.useEffect;function Ug(e){const t=Xt.useReducer(()=>({}),{})[1],o={...e,onChange:(r,s)=>{var a;s?ur.flushSync(t):t(),(a=e.onChange)==null||a.call(e,r,s)}},[n]=Xt.useState(()=>new Vg(o));return n.setOptions(o),rr(()=>n._didMount(),[]),rr(()=>n._willUpdate()),n}function Yg(e){return Ug({observeElementRect:Wg,observeElementOffset:Bg,scrollToFn:Hg,...e})}const[oi]=O(["table"]),Kg=[],qg=e=>e.id,Zg=L.kosComponent(({dataProvider:e,columns:t,className:o,getRowId:n,emptyState:r,isSortable:s,t:a,TdComponent:l,TrComponent:u,onListItemAction:f,renderEmptyAsStandalone:p,...h})=>{Lt(e);const m=d.useRef(null),[x,b]=d.useState([]),y=be.useReactTable({columns:t,data:e?e==null?void 0:e.items:Kg,getCoreRowModel:be.getCoreRowModel(),getSortedRowModel:s?be.getSortedRowModel():void 0,getRowId:n??qg,onSortingChange:s?b:void 0,state:{sorting:x}}),k=!y.getRowModel().rows.length;return k&&p?r??null:i.jsx(ei,{onListItemAction:f,isSortable:s,t:a,children:i.jsx(Qg,{className:o,ref:m,children:i.jsxs(em,{...h,children:[i.jsx(tm,{children:y.getHeaderGroups().map(w=>i.jsx(pt,{style:{display:"flex"},children:w.headers.map($=>i.jsx(d.Fragment,{children:be.flexRender($.column.columnDef.header,$.getContext())},$.id))},w.id))}),i.jsx(Xg,{isEmpty:k,numColumns:t.length,emptyState:r,table:y,tableContainerRef:m})]})})})}),Xg=L.kosComponent(({table:e,tableContainerRef:t,trClassName:o,isEmpty:n,emptyState:r,numColumns:s})=>{const{rows:a}=e.getRowModel(),l=Yg({count:a.length,estimateSize:()=>33,getScrollElement:()=>t.current,measureElement:typeof window<"u"&&navigator.userAgent.indexOf("Firefox")===-1?u=>u==null?void 0:u.getBoundingClientRect().height:void 0,overscan:5});return i.jsx(om,{style:{position:"relative",height:`${l.getTotalSize()}px`},children:n?i.jsx(pt,{children:i.jsx(go,{colSpan:s,children:r??null})}):l.getVirtualItems().map(u=>{const f=a[u.index];return i.jsx(Jg,{trClassName:o,row:f,virtualRow:u,rowVirtualizer:l},f.id)})})}),Jg=L.kosComponent(({trClassName:e,row:t,virtualRow:o,rowVirtualizer:n})=>i.jsx(pt,{"data-index":o.index,ref:r=>n.measureElement(r),className:e,style:{display:"flex",position:"absolute",transform:`translateY(${o.start}px)`,width:"100%"},children:t.getVisibleCells().map(r=>{var s;return i.jsx(go,{style:{display:"flex",width:((s=r.column.columnDef.meta)==null?void 0:s.width)??r.column.getSize()},children:be.flexRender(r.column.columnDef.cell,r.getContext())},r.id)})},t.id)),Qg=g.div`
|
|
2882
2887
|
width: 100%;
|
|
2883
2888
|
display: grid;
|
|
2884
2889
|
overflow: auto;
|
|
2885
|
-
`,
|
|
2890
|
+
`,em=g.table`
|
|
2886
2891
|
width: 100%;
|
|
2887
2892
|
border-collapse: collapse;
|
|
2888
2893
|
font-family: ${oi("font-family")};
|
|
2889
2894
|
table-layout: fixed;
|
|
2890
|
-
`,
|
|
2895
|
+
`,tm=g.thead`
|
|
2891
2896
|
width: 100%;
|
|
2892
2897
|
position: sticky;
|
|
2893
2898
|
background-color: ${oi("header-background-color")};
|
|
2894
2899
|
top: 0;
|
|
2895
2900
|
z-index: 1;
|
|
2896
|
-
`,
|
|
2901
|
+
`,om=g.tbody`
|
|
2897
2902
|
width: 100%;
|
|
2898
|
-
`,[dt]=O(["button"]),
|
|
2903
|
+
`,[dt]=O(["button"]),nm=d.memo(({onClick:e,open:t,buttonText:o,text:n})=>i.jsx(rm,{open:t,children:i.jsxs(sm,{children:[i.jsx(E,{variant:"h2",color:"light",children:n}),i.jsx(Ae,{variant:"borderless",text:o,onClick:e})]})})),rm=g(es)`
|
|
2899
2904
|
z-index: 5;
|
|
2900
|
-
`,
|
|
2905
|
+
`,sm=g.div`
|
|
2901
2906
|
display: flex;
|
|
2902
2907
|
align-items: center;
|
|
2903
2908
|
justify-content: center;
|
|
@@ -2909,9 +2914,9 @@
|
|
|
2909
2914
|
${`${dt("border-hover-borderless",!0)}: ${c("color-white")}`};
|
|
2910
2915
|
${`${dt("color-hover-borderless",!0)}: ${c("color-white")}`};
|
|
2911
2916
|
${`${dt("bg-hover-borderless",!0)}: transparent`};
|
|
2912
|
-
`;function sm(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Mo={},Mt={};function rt(e,t){try{const n=(Mo[e]||(Mo[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Mt?Mt[n]:sr(n,n.split(":"))}catch{if(e in Mt)return Mt[e];const o=e==null?void 0:e.match(im);return o?sr(e,o.slice(1)):NaN}}const im=/([+-]\d\d):?(\d\d)?/;function sr(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Mt[e]=o*60+n>0?o*60+n+r:o*60-n-r}class Fe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(rt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),ni(this),Yo(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new Fe(...o,t):new Fe(Date.now(),t)}withTimeZone(t){return new Fe(+this,t)}getTimezoneOffset(){const t=-rt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Yo(this),+this}[Symbol.for("constructDateFrom")](t){return new Fe(+new Date(t),this.timeZone)}}const ir=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ir.test(e))return;const t=e.replace(ir,"$1UTC");Fe.prototype[t]&&(e.startsWith("get")?Fe.prototype[e]=function(){return this.internal[t]()}:(Fe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),am(this),+this},Fe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Yo(this),+this}))});function Yo(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-rt(e.timeZone,e)*60))}function am(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ni(e)}function ni(e){const t=rt(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),a=r-s,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const u=r-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const f=new Date(+e);f.setUTCSeconds(0);const p=r>0?f.getSeconds():(f.getSeconds()-60)%60,h=Math.round(-(rt(e.timeZone,e)*60))%60;(h||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+h),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+h+p));const m=rt(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-x,k=x!==o,w=y-u;if(k&&w){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w);const $=rt(e.timeZone,e),v=$>0?Math.floor($):Math.ceil($),S=x-v;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class re extends Fe{static tz(t,...o){return o.length?new re(...o,t):new re(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),r=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,r]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${o} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,r]=this.tzComponents();return`${t} GMT${o}${n}${r} (${sm(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[o,n,r]}withTimeZone(t){return new re(+this,t)}[Symbol.for("constructDateFrom")](t){return new re(+new Date(t),this.timeZone)}}const lm={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},cm=(e,t,o)=>{let n;const r=lm[e];return typeof r=="string"?n=r:t===1?n=r.one:n=r.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+n:n+" ago":n};function Eo(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const dm={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},um={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},fm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},pm={date:Eo({formats:dm,defaultWidth:"full"}),time:Eo({formats:um,defaultWidth:"full"}),dateTime:Eo({formats:fm,defaultWidth:"full"})},hm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},gm=(e,t,o,n)=>hm[e];function Tt(e){return(t,o)=>{const n=o!=null&&o.context?String(o.context):"standalone";let r;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=o!=null&&o.width?String(o.width):a;r=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=o!=null&&o.width?String(o.width):e.defaultWidth;r=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const mm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},bm={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},xm={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},ym={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},km={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},vm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},wm=(e,t)=>{const o=Number(e),n=o%100;if(n>20||n<10)switch(n%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},Cm={ordinalNumber:wm,era:Tt({values:mm,defaultWidth:"wide"}),quarter:Tt({values:bm,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Tt({values:xm,defaultWidth:"wide"}),day:Tt({values:ym,defaultWidth:"wide"}),dayPeriod:Tt({values:km,defaultWidth:"wide",formattingValues:vm,defaultFormattingWidth:"wide"})};function Dt(e){return(t,o={})=>{const n=o.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const a=s[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?Sm(l,h=>h.test(a)):$m(l,h=>h.test(a));let f;f=e.valueCallback?e.valueCallback(u):u,f=o.valueCallback?o.valueCallback(f):f;const p=t.slice(a.length);return{value:f,rest:p}}}function $m(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function Sm(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function jm(e){return(t,o={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=o.valueCallback?o.valueCallback(a):a;const l=t.slice(r.length);return{value:a,rest:l}}}const Tm=/^(\d+)(th|st|nd|rd)?/i,Dm=/\d+/i,Mm={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},Em={any:[/^b/i,/^(a|c)/i]},zm={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Om={any:[/1/i,/2/i,/3/i,/4/i]},Im={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Rm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Nm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Fm={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},Am={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},_m={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Lm={ordinalNumber:jm({matchPattern:Tm,parsePattern:Dm,valueCallback:e=>parseInt(e,10)}),era:Dt({matchPatterns:Mm,defaultMatchWidth:"wide",parsePatterns:Em,defaultParseWidth:"any"}),quarter:Dt({matchPatterns:zm,defaultMatchWidth:"wide",parsePatterns:Om,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Dt({matchPatterns:Im,defaultMatchWidth:"wide",parsePatterns:Rm,defaultParseWidth:"any"}),day:Dt({matchPatterns:Nm,defaultMatchWidth:"wide",parsePatterns:Fm,defaultParseWidth:"any"}),dayPeriod:Dt({matchPatterns:Am,defaultMatchWidth:"any",parsePatterns:_m,defaultParseWidth:"any"})},ri={code:"en-US",formatDistance:cm,formatLong:pm,formatRelative:gm,localize:Cm,match:Lm,options:{weekStartsOn:0,firstWeekContainsDate:1}},ar=5,Wm=4;function Bm(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,ar*7-1);return t.getMonth(e)===t.getMonth(s)?ar:Wm}function si(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-1*6):t.addDays(o,-1*(n-1))}function Pm(e,t){const o=si(e,t),n=Bm(e,t);return t.addDays(o,n*7-1)}class qe{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?re.tz(this.options.timeZone):new this.Date},this.newDate=(n,r,s)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(n,r,s):this.options.timeZone?new re(n,r,s,this.options.timeZone):new Date(n,r,s)},this.addDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,r):Y.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):Y.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):Y.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):Y.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):Y.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):Y.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):Y.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):Pm(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):Y.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):Y.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):Y.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):Y.endOfYear(n)},this.format=(n,r,s)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(n,r,this.options):Y.format(n,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.getISOWeek?this.overrides.getISOWeek(n):Y.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):Y.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):Y.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):Y.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):Y.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):Y.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):Y.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):Y.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):Y.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):Y.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):Y.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):Y.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):Y.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):Y.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):si(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):Y.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):Y.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):Y.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):Y.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):Y.startOfYear(n)},this.options={locale:ri,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let r=0;r<10;r++)n[r.toString()]=o.format(r);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}}const Be=new qe;class ii{constructor(t,o,n=Be){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Hm{constructor(t,o){this.date=t,this.weeks=o}}class Vm{constructor(t,o){this.days=o,this.weekNumber=t}}function Gm(e){return d.createElement("button",{...e})}function Um(e){return d.createElement("span",{...e})}function Ym(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function Km(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function qm(e){const{day:t,modifiers:o,...n}=e,r=d.useRef(null);return d.useEffect(()=>{var s;o.focused&&((s=r.current)==null||s.focus())},[o.focused]),d.createElement("button",{ref:r,...n})}var A;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(A||(A={}));var Q;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Q||(Q={}));var Ee;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Ee||(Ee={}));var ue;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ue||(ue={}));function Zm(e){const{options:t,className:o,components:n,classNames:r,...s}=e,a=[r[A.Dropdown],o].join(" "),l=t==null?void 0:t.find(({value:u})=>u===s.value);return d.createElement("span",{"data-disabled":s.disabled,className:r[A.DropdownRoot]},d.createElement(n.Select,{className:a,...s},t==null?void 0:t.map(({value:u,label:f,disabled:p})=>d.createElement(n.Option,{key:u,value:u,disabled:p},f))),d.createElement("span",{className:r[A.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[A.Chevron]})))}function Xm(e){return d.createElement("div",{...e})}function Jm(e){return d.createElement("div",{...e})}function Qm(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function eb(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function tb(e){return d.createElement("table",{...e})}function ob(e){return d.createElement("div",{...e})}const ai=d.createContext(void 0);function Pt(){const e=d.useContext(ai);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function nb(e){const{components:t}=Pt();return d.createElement(t.Dropdown,{...e})}function rb(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:a,classNames:l,labels:{labelPrevious:u,labelNext:f}}=Pt(),p=d.useCallback(m=>{r&&(o==null||o(m))},[r,o]),h=d.useCallback(m=>{n&&(t==null||t(m))},[n,t]);return d.createElement("nav",{...s},d.createElement(a.PreviousMonthButton,{type:"button",className:l[A.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":u(n),onClick:h},d.createElement(a.Chevron,{disabled:n?void 0:!0,className:l[A.Chevron],orientation:"left"})),d.createElement(a.NextMonthButton,{type:"button",className:l[A.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":f(r),onClick:p},d.createElement(a.Chevron,{disabled:r?void 0:!0,orientation:"right",className:l[A.Chevron]})))}function sb(e){const{components:t}=Pt();return d.createElement(t.Button,{...e})}function ib(e){return d.createElement("option",{...e})}function ab(e){const{components:t}=Pt();return d.createElement(t.Button,{...e})}function lb(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function cb(e){return d.createElement("select",{...e})}function db(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function ub(e){return d.createElement("th",{...e})}function fb(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function pb(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function hb(e){return d.createElement("th",{...e})}function gb(e){return d.createElement("tbody",{...e})}function mb(e){const{components:t}=Pt();return d.createElement(t.Dropdown,{...e})}const bb=Object.freeze(Object.defineProperty({__proto__:null,Button:Gm,CaptionLabel:Um,Chevron:Ym,Day:Km,DayButton:qm,Dropdown:Zm,DropdownNav:Xm,Footer:Jm,Month:Qm,MonthCaption:eb,MonthGrid:tb,Months:ob,MonthsDropdown:nb,Nav:rb,NextMonthButton:sb,Option:ib,PreviousMonthButton:ab,Root:lb,Select:cb,Week:db,WeekNumber:pb,WeekNumberHeader:hb,Weekday:ub,Weekdays:fb,Weeks:gb,YearsDropdown:mb},Symbol.toStringTag,{value:"Module"}));function Ve(e,t,o=!1,n=Be){let{from:r,to:s}=e;const{differenceInCalendarDays:a,isSameDay:l}=n;return r&&s?(a(s,r)<0&&([r,s]=[s,r]),a(t,r)>=(o?1:0)&&a(s,t)>=(o?1:0)):!o&&s?l(s,t):!o&&r?l(r,t):!1}function li(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Dn(e){return!!(e&&typeof e=="object"&&"from"in e)}function ci(e){return!!(e&&typeof e=="object"&&"after"in e)}function di(e){return!!(e&&typeof e=="object"&&"before"in e)}function ui(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function fi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ge(e,t,o=Be){const n=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:s,isAfter:a}=o;return n.some(l=>{if(typeof l=="boolean")return l;if(o.isDate(l))return r(e,l);if(fi(l,o))return l.includes(e);if(Dn(l))return Ve(l,e,!1,o);if(ui(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(li(l)){const u=s(l.before,e),f=s(l.after,e),p=u>0,h=f<0;return a(l.before,l.after)?h&&p:p||h}return ci(l)?s(e,l.after)>0:di(l)?s(l.before,e)>0:typeof l=="function"?l(e):!1})}function xb(e,t,o,n,r){const{disabled:s,hidden:a,modifiers:l,showOutsideDays:u,broadcastCalendar:f,today:p}=t,{isSameDay:h,isSameMonth:m,startOfMonth:x,isBefore:b,endOfMonth:y,isAfter:k}=r,w=o&&x(o),$=n&&y(n),v={[Q.focused]:[],[Q.outside]:[],[Q.disabled]:[],[Q.hidden]:[],[Q.today]:[]},S={};for(const C of e){const{date:T,displayMonth:j}=C,D=!!(j&&!m(T,j)),W=!!(w&&b(T,w)),V=!!($&&k(T,$)),R=!!(s&&Ge(T,s,r)),N=!!(a&&Ge(T,a,r))||W||V||!f&&!u&&D||f&&u===!1&&D,q=h(T,p??r.today());D&&v.outside.push(C),R&&v.disabled.push(C),N&&v.hidden.push(C),q&&v.today.push(C),l&&Object.keys(l).forEach(oe=>{const te=l==null?void 0:l[oe];te&&Ge(T,te,r)&&(S[oe]?S[oe].push(C):S[oe]=[C])})}return C=>{const T={[Q.focused]:!1,[Q.disabled]:!1,[Q.hidden]:!1,[Q.outside]:!1,[Q.today]:!1},j={};for(const D in v){const W=v[D];T[D]=W.some(V=>V===C)}for(const D in S)j[D]=S[D].some(W=>W===C);return{...T,...j}}}function yb(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[Q[s]]?r.push(t[Q[s]]):t[Ee[s]]&&r.push(t[Ee[s]]),r),[t[A.Day]])}function kb(e){return{...bb,...e}}function vb(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function wb(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(const t in Ee)e[Ee[t]]=`rdp-${Ee[t]}`;for(const t in ue)e[ue[t]]=`rdp-${ue[t]}`;return e}function pi(e,t,o){return(o??new qe(t)).format(e,"LLLL y")}const Cb=pi;function $b(e,t,o){return(o??new qe(t)).format(e,"d")}function Sb(e,t=Be){return t.format(e,"LLLL")}function jb(e,t,o){return(o??new qe(t)).format(e,"cccccc")}function Tb(e,t=Be){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Db(){return""}function hi(e,t=Be){return t.format(e,"yyyy")}const Mb=hi,Eb=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:pi,formatDay:$b,formatMonthCaption:Cb,formatMonthDropdown:Sb,formatWeekNumber:Tb,formatWeekNumberHeader:Db,formatWeekdayName:jb,formatYearCaption:Mb,formatYearDropdown:hi},Symbol.toStringTag,{value:"Module"}));function zb(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...Eb,...e}}function Ob(e,t,o,n,r){const{startOfMonth:s,startOfYear:a,endOfYear:l,eachMonthOfInterval:u,getMonth:f}=r;return u({start:a(e),end:l(e)}).map(m=>{const x=n.formatMonthDropdown(m,r),b=f(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:b,label:x,disabled:y}})}function Ib(e,t={},o={}){let n={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function Rb(e,t,o){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),s=[];for(let a=0;a<7;a++){const l=e.addDays(r,a);s.push(l)}return s}function Nb(e,t,o,n,r=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,addYears:l,getYear:u,isBefore:f,isSameYear:p}=n,h=s(e),m=a(t),x=[];let b=h;for(;f(b,m)||p(b,m);)x.push(b),b=l(b,1);return r&&x.reverse(),x.map(y=>{const k=o.formatYearDropdown(y,n);return{value:u(y),label:k,disabled:!1}})}function gi(e,t,o,n){let r=(n??new qe(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const Fb=gi;function mi(e,t,o){return(o??new qe(t)).format(e,"LLLL y")}const Ab=mi;function _b(e,t,o,n){let r=(n??new qe(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function Lb(e){return"Choose the Month"}function Wb(){return""}function Bb(e){return"Go to the Next Month"}function Pb(e){return"Go to the Previous Month"}function Hb(e,t,o){return(o??new qe(t)).format(e,"cccc")}function Vb(e,t){return`Week ${e}`}function Gb(e){return"Week Number"}function Ub(e){return"Choose the Year"}const Yb=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:Ab,labelDay:Fb,labelDayButton:gi,labelGrid:mi,labelGridcell:_b,labelMonthDropdown:Lb,labelNav:Wb,labelNext:Bb,labelPrevious:Pb,labelWeekNumber:Vb,labelWeekNumberHeader:Gb,labelWeekday:Hb,labelYearDropdown:Ub},Symbol.toStringTag,{value:"Module"})),Ht=e=>e instanceof HTMLElement?e:null,zo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],Kb=e=>Ht(e.querySelector("[data-animated-month]")),Oo=e=>Ht(e.querySelector("[data-animated-caption]")),Io=e=>Ht(e.querySelector("[data-animated-weeks]")),qb=e=>Ht(e.querySelector("[data-animated-nav]")),Zb=e=>Ht(e.querySelector("[data-animated-weekdays]"));function Xb(e,t,{classNames:o,months:n,focused:r,dateLib:s}){const a=d.useRef(null),l=d.useRef(n),u=d.useRef(!1);d.useLayoutEffect(()=>{const f=l.current;if(l.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||f.length===0||n.length!==f.length)return;const p=s.isSameMonth(n[0].date,f[0].date),h=s.isAfter(n[0].date,f[0].date),m=h?o[ue.caption_after_enter]:o[ue.caption_before_enter],x=h?o[ue.weeks_after_enter]:o[ue.weeks_before_enter],b=a.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(zo(y).forEach(v=>{if(!(v instanceof HTMLElement))return;const S=Kb(v);S&&v.contains(S)&&v.removeChild(S);const C=Oo(v);C&&C.classList.remove(m);const T=Io(v);T&&T.classList.remove(x)}),a.current=y):a.current=null,u.current||p||r)return;const k=b instanceof HTMLElement?zo(b):[],w=zo(e.current);if(w!=null&&w.every($=>$ instanceof HTMLElement)&&k&&k.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=qb(e.current);$&&($.style.zIndex="1"),w.forEach((v,S)=>{const C=k[S];if(!C)return;v.style.position="relative",v.style.overflow="hidden";const T=Oo(v);T&&T.classList.add(m);const j=Io(v);j&&j.classList.add(x);const D=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),T&&T.classList.remove(m),j&&j.classList.remove(x),v.style.position="",v.style.overflow="",v.contains(C)&&v.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const W=Zb(C);W&&(W.style.opacity="0");const V=Oo(C);V&&(V.classList.add(h?o[ue.caption_before_exit]:o[ue.caption_after_exit]),V.addEventListener("animationend",D));const R=Io(C);R&&R.classList.add(h?o[ue.weeks_before_exit]:o[ue.weeks_after_exit]),v.insertBefore(C,v.firstChild)})}})}function Jb(e,t,o,n){const r=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:u}=o??{},{addDays:f,differenceInCalendarDays:p,differenceInCalendarMonths:h,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:b,endOfWeek:y,isAfter:k,startOfBroadcastWeek:w,startOfISOWeek:$,startOfWeek:v}=n,S=u?w(r,n):a?$(r):v(r),C=u?m(s):a?x(b(s)):y(b(s)),T=p(C,S),j=h(s,r)+1,D=[];for(let R=0;R<=T;R++){const N=f(S,R);if(t&&k(N,t))break;D.push(N)}const V=(u?35:42)*j;if(l&&D.length<V){const R=V-D.length;for(let N=0;N<R;N++){const q=f(D[D.length-1],1);D.push(q)}}return D}function Qb(e){const t=[];return e.reduce((o,n)=>{const r=n.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return o.concat(r.slice())},t.slice())}function ex(e,t,o,n){const{numberOfMonths:r=1}=o,s=[];for(let a=0;a<r;a++){const l=n.addMonths(e,a);if(t&&l>t)break;s.push(l)}return s}function lr(e,t,o,n){const{month:r,defaultMonth:s,today:a=n.today(),numberOfMonths:l=1}=e;let u=r||s||a;const{differenceInCalendarMonths:f,addMonths:p,startOfMonth:h}=n;if(o&&f(o,u)<l-1){const m=-1*(l-1);u=p(o,m)}return t&&f(u,t)<0&&(u=t),h(u)}function tx(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:l,endOfWeek:u,getISOWeek:f,getWeek:p,startOfBroadcastWeek:h,startOfISOWeek:m,startOfWeek:x}=n,b=e.reduce((y,k)=>{const w=o.broadcastCalendar?h(k,n):o.ISOWeek?m(k):x(k),$=o.broadcastCalendar?s(k):o.ISOWeek?a(l(k)):u(l(k)),v=t.filter(j=>j>=w&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&v.length<S){const j=t.filter(D=>{const W=S-v.length;return D>$&&D<=r($,W)});v.push(...j)}const C=v.reduce((j,D)=>{const W=o.ISOWeek?f(D):p(D),V=j.find(N=>N.weekNumber===W),R=new ii(D,k,n);return V?V.days.push(R):j.push(new Vm(W,[R])),j},[]),T=new Hm(k,C);return y.push(T),y},[]);return o.reverseMonths?b.reverse():b}function ox(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:r,startOfDay:s,startOfMonth:a,endOfMonth:l,addYears:u,endOfYear:f,newDate:p,today:h}=t,{fromYear:m,toYear:x,fromMonth:b,toMonth:y}=e;!o&&b&&(o=b),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&x&&(n=p(x,11,31));const k=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=a(o):m?o=p(m,0,1):!o&&k&&(o=r(u(e.today??h(),-100))),n?n=l(n):x?n=p(x,11,31):!n&&k&&(n=f(e.today??h())),[o&&s(o),n&&s(n)]}function nx(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s=1}=o,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:u}=n,f=r?s:1,p=a(e);if(!t)return l(p,f);if(!(u(t,e)<s))return l(p,f)}function rx(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s}=o,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:u}=n,f=r?s??1:1,p=a(e);if(!t)return l(p,-f);if(!(u(p,t)<=0))return l(p,-f)}function sx(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function mo(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function ix(e,t){const[o,n]=ox(e,t),{startOfMonth:r,endOfMonth:s}=t,a=lr(e,o,n,t),[l,u]=mo(a,e.month?a:void 0);d.useEffect(()=>{const T=lr(e,o,n,t);u(T)},[e.timeZone]);const f=ex(l,n,e,t),p=Jb(f,e.endMonth?s(e.endMonth):void 0,e,t),h=tx(f,p,e,t),m=sx(h),x=Qb(h),b=rx(l,o,e,t),y=nx(l,n,e,t),{disableNavigation:k,onMonthChange:w}=e,$=T=>m.some(j=>j.days.some(D=>D.isEqualTo(T))),v=T=>{if(k)return;let j=r(T);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),w==null||w(j)};return{months:h,weeks:m,days:x,navStart:o,navEnd:n,previousMonth:b,nextMonth:y,goToMonth:v,goToDay:T=>{$(T)||v(T.date)}}}var Ie;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ie||(Ie={}));function cr(e){return!e[Q.disabled]&&!e[Q.hidden]&&!e[Q.outside]}function ax(e,t,o,n){let r,s=-1;for(const a of e){const l=t(a);cr(l)&&(l[Q.focused]&&s<Ie.FocusedModifier?(r=a,s=Ie.FocusedModifier):n!=null&&n.isEqualTo(a)&&s<Ie.LastFocused?(r=a,s=Ie.LastFocused):o(a.date)&&s<Ie.Selected?(r=a,s=Ie.Selected):l[Q.today]&&s<Ie.Today&&(r=a,s=Ie.Today))}return r||(r=e.find(a=>cr(t(a)))),r}function lx(e,t,o,n,r,s,a){const{ISOWeek:l,broadcastCalendar:u}=s,{addDays:f,addMonths:p,addWeeks:h,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:y,max:k,min:w,startOfBroadcastWeek:$,startOfISOWeek:v,startOfWeek:S}=a;let T={day:f,week:h,month:p,year:m,startOfWeek:j=>u?$(j,a):l?v(j):S(j),endOfWeek:j=>u?x(j):l?b(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?T=k([n,T]):t==="after"&&r&&(T=w([r,T])),T}function bi(e,t,o,n,r,s,a,l=0){if(l>365)return;const u=lx(e,t,o.date,n,r,s,a),f=!!(s.disabled&&Ge(u,s.disabled,a)),p=!!(s.hidden&&Ge(u,s.hidden,a)),h=u,m=new ii(u,h,a);return!f&&!p?m:bi(e,t,m,n,r,s,a,l+1)}function cx(e,t,o,n,r){const{autoFocus:s}=e,[a,l]=d.useState(),u=ax(t.days,o,n||(()=>!1),a),[f,p]=d.useState(s?u:void 0);return{isFocusTarget:y=>!!(u!=null&&u.isEqualTo(y)),setFocused:p,focused:f,blur:()=>{l(f),p(void 0)},moveFocus:(y,k)=>{if(!f)return;const w=bi(y,k,f,t.navStart,t.navEnd,e,r);w&&(t.goToDay(w),p(w))}}}function dx(e,t){const{selected:o,required:n,onSelect:r}=e,[s,a]=mo(o,r?o:void 0),l=r?o:s,{isSameDay:u}=t,f=x=>(l==null?void 0:l.some(b=>u(b,x)))??!1,{min:p,max:h}=e;return{selected:l,select:(x,b,y)=>{let k=[...l??[]];if(f(x)){if((l==null?void 0:l.length)===p||n&&(l==null?void 0:l.length)===1)return;k=l==null?void 0:l.filter(w=>!u(w,x))}else(l==null?void 0:l.length)===h?k=[x]:k=[...k,x];return r||a(k),r==null||r(k,x,b,y),k},isSelected:f}}function ux(e,t,o=0,n=0,r=!1,s=Be){const{from:a,to:l}=t||{},{isSameDay:u,isAfter:f,isBefore:p}=s;let h;if(!a&&!l)h={from:e,to:o>0?void 0:e};else if(a&&!l)u(a,e)?o===0?h={from:a,to:e}:r?h={from:a,to:void 0}:h=void 0:p(e,a)?h={from:e,to:a}:h={from:a,to:e};else if(a&&l)if(u(a,e)&&u(l,e))r?h={from:a,to:l}:h=void 0;else if(u(a,e))h={from:a,to:o>0?void 0:e};else if(u(l,e))h={from:e,to:o>0?void 0:e};else if(p(e,a))h={from:e,to:l};else if(f(e,a))h={from:a,to:e};else if(f(e,l))h={from:a,to:e};else throw new Error("Invalid range");if(h!=null&&h.from&&(h!=null&&h.to)){const m=s.differenceInCalendarDays(h.to,h.from);n>0&&m>n?h={from:e,to:void 0}:o>1&&m<o&&(h={from:e,to:void 0})}return h}function fx(e,t,o=Be){const n=Array.isArray(t)?t:[t];let r=e.from;const s=o.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let l=0;l<=a;l++){if(n.includes(r.getDay()))return!0;r=o.addDays(r,1)}return!1}function dr(e,t,o=Be){return Ve(e,t.from,!1,o)||Ve(e,t.to,!1,o)||Ve(t,e.from,!1,o)||Ve(t,e.to,!1,o)}function px(e,t,o=Be){const n=Array.isArray(t)?t:[t];if(n.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:o.isDate(l)?Ve(e,l,!1,o):fi(l,o)?l.some(u=>Ve(e,u,!1,o)):Dn(l)?l.from&&l.to?dr(e,{from:l.from,to:l.to},o):!1:ui(l)?fx(e,l.dayOfWeek,o):li(l)?o.isAfter(l.before,l.after)?dr(e,{from:o.addDays(l.after,1),to:o.addDays(l.before,-1)},o):Ge(e.from,l,o)||Ge(e.to,l,o):ci(l)||di(l)?Ge(e.from,l,o)||Ge(e.to,l,o):!1))return!0;const a=n.filter(l=>typeof l=="function");if(a.length){let l=e.from;const u=o.differenceInCalendarDays(e.to,e.from);for(let f=0;f<=u;f++){if(a.some(p=>p(l)))return!0;l=o.addDays(l,1)}}return!1}function hx(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:a}=e,[l,u]=mo(r,a?r:void 0),f=a?r:l;return{selected:f,select:(m,x,b)=>{const{min:y,max:k}=e,w=m?ux(m,f,y,k,s,t):void 0;return n&&o&&(w!=null&&w.from)&&w.to&&px({from:w.from,to:w.to},o,t)&&(w.from=m,w.to=void 0),a||u(w),a==null||a(w,m,x,b),w},isSelected:m=>f&&Ve(f,m,!1,t)}}function gx(e,t){const{selected:o,required:n,onSelect:r}=e,[s,a]=mo(o,r?o:void 0),l=r?o:s,{isSameDay:u}=t;return{selected:l,select:(h,m,x)=>{let b=h;return!n&&l&&l&&u(h,l)&&(b=void 0),r||a(b),r==null||r(b,h,m,x),b},isSelected:h=>l?u(l,h):!1}}function mx(e,t){const o=gx(e,t),n=dx(e,t),r=hx(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function bx(e){var Rn;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new re(t.today,t.timeZone)),t.month&&(t.month=new re(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new re(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new re(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new re(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new re(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Rn=t.selected)==null?void 0:Rn.map(H=>new re(H,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new re(t.selected.from,t.timeZone):void 0,to:t.selected.to?new re(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:a,classNames:l}=d.useMemo(()=>{const H={...ri,...t.locale};return{dateLib:new qe({locale:H,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:kb(t.components),formatters:zb(t.formatters),labels:{...Yb,...t.labels},locale:H,classNames:{...wb(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:f,navLayout:p,numberOfMonths:h=1,onDayBlur:m,onDayClick:x,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:k,onDayMouseLeave:w,onNextClick:$,onPrevClick:v,showWeekNumber:S,styles:C}=t,{formatCaption:T,formatDay:j,formatMonthDropdown:D,formatWeekNumber:W,formatWeekNumberHeader:V,formatWeekdayName:R,formatYearDropdown:N}=n,q=ix(t,s),{days:oe,months:te,navStart:st,navEnd:kt,previousMonth:le,nextMonth:ce,goToMonth:ee}=q,it=xb(oe,t,st,kt,s),{isSelected:vt,select:wt,selected:Vt}=mx(t,s)??{},{blur:Mn,focused:Gt,isFocusTarget:yi,moveFocus:En,setFocused:Ut}=cx(t,q,it,vt??(()=>!1),s),{labelDayButton:ki,labelGridcell:vi,labelGrid:wi,labelMonthDropdown:Ci,labelNav:zn,labelPrevious:$i,labelNext:Si,labelWeekday:ji,labelWeekNumber:Ti,labelWeekNumberHeader:Di,labelYearDropdown:Mi}=r,Ei=d.useMemo(()=>Rb(s,t.ISOWeek),[s,t.ISOWeek]),On=f!==void 0||x!==void 0,bo=d.useCallback(()=>{le&&(ee(le),v==null||v(le))},[le,ee,v]),xo=d.useCallback(()=>{ce&&(ee(ce),$==null||$(ce))},[ee,ce,$]),zi=d.useCallback((H,Z)=>B=>{B.preventDefault(),B.stopPropagation(),Ut(H),wt==null||wt(H.date,Z,B),x==null||x(H.date,Z,B)},[wt,x,Ut]),Oi=d.useCallback((H,Z)=>B=>{Ut(H),b==null||b(H.date,Z,B)},[b,Ut]),Ii=d.useCallback((H,Z)=>B=>{Mn(),m==null||m(H.date,Z,B)},[Mn,m]),Ri=d.useCallback((H,Z)=>B=>{const X={ArrowLeft:[B.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[B.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[B.shiftKey?"year":"week","after"],ArrowUp:[B.shiftKey?"year":"week","before"],PageUp:[B.shiftKey?"year":"month","before"],PageDown:[B.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(X[B.key]){B.preventDefault(),B.stopPropagation();const[fe,U]=X[B.key];En(fe,U)}y==null||y(H.date,Z,B)},[En,y,t.dir]),Ni=d.useCallback((H,Z)=>B=>{k==null||k(H.date,Z,B)},[k]),Fi=d.useCallback((H,Z)=>B=>{w==null||w(H.date,Z,B)},[w]),Ai=d.useCallback(H=>Z=>{const B=Number(Z.target.value),X=s.setMonth(s.startOfMonth(H),B);ee(X)},[s,ee]),_i=d.useCallback(H=>Z=>{const B=Number(Z.target.value),X=s.setYear(s.startOfMonth(H),B);ee(X)},[s,ee]),{className:Li,style:Wi}=d.useMemo(()=>({className:[l[A.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[A.Root],...t.style}}),[l,t.className,t.style,C]),Bi=vb(t),In=d.useRef(null);Xb(In,!!t.animate,{classNames:l,months:te,focused:Gt,dateLib:s});const Pi={dayPickerProps:t,selected:Vt,select:wt,isSelected:vt,months:te,nextMonth:ce,previousMonth:le,goToMonth:ee,getModifiers:it,components:o,classNames:l,styles:C,labels:r,formatters:n};return d.createElement(ai.Provider,{value:Pi},d.createElement(o.Root,{rootRef:t.animate?In:void 0,className:Li,style:Wi,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Bi},d.createElement(o.Months,{className:l[A.Months],style:C==null?void 0:C[A.Months]},!t.hideNavigation&&!p&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":zn(),onPreviousClick:bo,onNextClick:xo,previousMonth:le,nextMonth:ce}),te.map((H,Z)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:l[A.Month],style:C==null?void 0:C[A.Month],key:Z,displayIndex:Z,calendarMonth:H},p==="around"&&!t.hideNavigation&&Z===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:l[A.PreviousMonthButton],tabIndex:le?void 0:-1,"aria-disabled":le?void 0:!0,"aria-label":$i(le),onClick:bo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:le?void 0:!0,className:l[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[A.MonthCaption],style:C==null?void 0:C[A.MonthCaption],calendarMonth:H,displayIndex:Z},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:l[A.Dropdowns],style:C==null?void 0:C[A.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:l[A.MonthsDropdown],"aria-label":Ci(),classNames:l,components:o,disabled:!!t.disableNavigation,onChange:Ai(H.date),options:Ob(H.date,st,kt,n,s),style:C==null?void 0:C[A.Dropdown],value:s.getMonth(H.date)}):d.createElement("span",null,D(H.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:l[A.YearsDropdown],"aria-label":Mi(s.options),classNames:l,components:o,disabled:!!t.disableNavigation,onChange:_i(H.date),options:Nb(st,kt,n,s,!!t.reverseYears),style:C==null?void 0:C[A.Dropdown],value:s.getYear(H.date)}):d.createElement("span",null,N(H.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},T(H.date,s.options,s))):d.createElement(o.CaptionLabel,{className:l[A.CaptionLabel],role:"status","aria-live":"polite"},T(H.date,s.options,s))),p==="around"&&!t.hideNavigation&&Z===h-1&&d.createElement(o.NextMonthButton,{type:"button",className:l[A.NextMonthButton],tabIndex:ce?void 0:-1,"aria-disabled":ce?void 0:!0,"aria-label":Si(ce),onClick:xo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ce?void 0:!0,className:l[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Z===h-1&&p==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":zn(),onPreviousClick:bo,onNextClick:xo,previousMonth:le,nextMonth:ce}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":wi(H.date,s.options,s)||void 0,className:l[A.MonthGrid],style:C==null?void 0:C[A.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[A.Weekdays],style:C==null?void 0:C[A.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":Di(s.options),className:l[A.WeekNumberHeader],style:C==null?void 0:C[A.WeekNumberHeader],scope:"col"},V()),Ei.map(B=>d.createElement(o.Weekday,{"aria-label":ji(B,s.options,s),className:l[A.Weekday],key:String(B),style:C==null?void 0:C[A.Weekday],scope:"col"},R(B,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[A.Weeks],style:C==null?void 0:C[A.Weeks]},H.weeks.map(B=>d.createElement(o.Week,{className:l[A.Week],key:B.weekNumber,style:C==null?void 0:C[A.Week],week:B},S&&d.createElement(o.WeekNumber,{week:B,style:C==null?void 0:C[A.WeekNumber],"aria-label":Ti(B.weekNumber,{locale:a}),className:l[A.WeekNumber],scope:"row",role:"rowheader"},W(B.weekNumber,s)),B.days.map(X=>{const{date:fe}=X,U=it(X);if(U[Q.focused]=!U.hidden&&!!(Gt!=null&&Gt.isEqualTo(X)),U[Ee.selected]=(vt==null?void 0:vt(fe))||U.selected,Dn(Vt)){const{from:yo,to:ko}=Vt;U[Ee.range_start]=!!(yo&&ko&&s.isSameDay(fe,yo)),U[Ee.range_end]=!!(yo&&ko&&s.isSameDay(fe,ko)),U[Ee.range_middle]=Ve(Vt,fe,!0,s)}const Hi=Ib(U,C,t.modifiersStyles),Vi=yb(U,l,t.modifiersClassNames),Gi=!On&&!U.hidden?vi(fe,U,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(fe,"yyyy-MM-dd")}_${s.format(X.displayMonth,"yyyy-MM")}`,day:X,modifiers:U,className:Vi.join(" "),style:Hi,role:"gridcell","aria-selected":U.selected||void 0,"aria-label":Gi,"data-day":s.format(fe,"yyyy-MM-dd"),"data-month":X.outside?s.format(fe,"yyyy-MM"):void 0,"data-selected":U.selected||void 0,"data-disabled":U.disabled||void 0,"data-hidden":U.hidden||void 0,"data-outside":X.outside||void 0,"data-focused":U.focused||void 0,"data-today":U.today||void 0},!U.hidden&&On?d.createElement(o.DayButton,{className:l[A.DayButton],style:C==null?void 0:C[A.DayButton],type:"button",day:X,modifiers:U,disabled:U.disabled||void 0,tabIndex:yi(X)?0:-1,"aria-label":ki(fe,U,s.options,s),onClick:zi(X,U),onBlur:Ii(X,U),onFocus:Oi(X,U),onKeyDown:Ri(X,U),onMouseEnter:Ni(X,U),onMouseLeave:Fi(X,U)},j(fe,s.options,s)):!U.hidden&&j(X.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:l[A.Footer],style:C==null?void 0:C[A.Footer],role:"status","aria-live":"polite"},t.footer)))}const xx=d.memo(({...e})=>i.jsx(yx,{mode:"single",...e})),yx=g(bx)`
|
|
2917
|
+
`;function im(e,t,o="long"){return new Intl.DateTimeFormat("en-US",{hour:"numeric",timeZone:e,timeZoneName:o}).format(t).split(/\s/g).slice(2).join(" ")}const Mo={},Mt={};function rt(e,t){try{const n=(Mo[e]||(Mo[e]=new Intl.DateTimeFormat("en-US",{timeZone:e,timeZoneName:"longOffset"}).format))(t).split("GMT")[1];return n in Mt?Mt[n]:sr(n,n.split(":"))}catch{if(e in Mt)return Mt[e];const o=e==null?void 0:e.match(am);return o?sr(e,o.slice(1)):NaN}}const am=/([+-]\d\d):?(\d\d)?/;function sr(e,t){const o=+(t[0]||0),n=+(t[1]||0),r=+(t[2]||0)/60;return Mt[e]=o*60+n>0?o*60+n+r:o*60-n-r}class Fe extends Date{constructor(...t){super(),t.length>1&&typeof t[t.length-1]=="string"&&(this.timeZone=t.pop()),this.internal=new Date,isNaN(rt(this.timeZone,this))?this.setTime(NaN):t.length?typeof t[0]=="number"&&(t.length===1||t.length===2&&typeof t[1]!="number")?this.setTime(t[0]):typeof t[0]=="string"?this.setTime(+new Date(t[0])):t[0]instanceof Date?this.setTime(+t[0]):(this.setTime(+new Date(...t)),ni(this),Yo(this)):this.setTime(Date.now())}static tz(t,...o){return o.length?new Fe(...o,t):new Fe(Date.now(),t)}withTimeZone(t){return new Fe(+this,t)}getTimezoneOffset(){const t=-rt(this.timeZone,this);return t>0?Math.floor(t):Math.ceil(t)}setTime(t){return Date.prototype.setTime.apply(this,arguments),Yo(this),+this}[Symbol.for("constructDateFrom")](t){return new Fe(+new Date(t),this.timeZone)}}const ir=/^(get|set)(?!UTC)/;Object.getOwnPropertyNames(Date.prototype).forEach(e=>{if(!ir.test(e))return;const t=e.replace(ir,"$1UTC");Fe.prototype[t]&&(e.startsWith("get")?Fe.prototype[e]=function(){return this.internal[t]()}:(Fe.prototype[e]=function(){return Date.prototype[t].apply(this.internal,arguments),lm(this),+this},Fe.prototype[t]=function(){return Date.prototype[t].apply(this,arguments),Yo(this),+this}))});function Yo(e){e.internal.setTime(+e),e.internal.setUTCSeconds(e.internal.getUTCSeconds()-Math.round(-rt(e.timeZone,e)*60))}function lm(e){Date.prototype.setFullYear.call(e,e.internal.getUTCFullYear(),e.internal.getUTCMonth(),e.internal.getUTCDate()),Date.prototype.setHours.call(e,e.internal.getUTCHours(),e.internal.getUTCMinutes(),e.internal.getUTCSeconds(),e.internal.getUTCMilliseconds()),ni(e)}function ni(e){const t=rt(e.timeZone,e),o=t>0?Math.floor(t):Math.ceil(t),n=new Date(+e);n.setUTCHours(n.getUTCHours()-1);const r=-new Date(+e).getTimezoneOffset(),s=-new Date(+n).getTimezoneOffset(),a=r-s,l=Date.prototype.getHours.apply(e)!==e.internal.getUTCHours();a&&l&&e.internal.setUTCMinutes(e.internal.getUTCMinutes()+a);const u=r-o;u&&Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+u);const f=new Date(+e);f.setUTCSeconds(0);const p=r>0?f.getSeconds():(f.getSeconds()-60)%60,h=Math.round(-(rt(e.timeZone,e)*60))%60;(h||p)&&(e.internal.setUTCSeconds(e.internal.getUTCSeconds()+h),Date.prototype.setUTCSeconds.call(e,Date.prototype.getUTCSeconds.call(e)+h+p));const m=rt(e.timeZone,e),x=m>0?Math.floor(m):Math.ceil(m),y=-new Date(+e).getTimezoneOffset()-x,k=x!==o,w=y-u;if(k&&w){Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+w);const $=rt(e.timeZone,e),v=$>0?Math.floor($):Math.ceil($),S=x-v;S&&(e.internal.setUTCMinutes(e.internal.getUTCMinutes()+S),Date.prototype.setUTCMinutes.call(e,Date.prototype.getUTCMinutes.call(e)+S))}}class re extends Fe{static tz(t,...o){return o.length?new re(...o,t):new re(Date.now(),t)}toISOString(){const[t,o,n]=this.tzComponents(),r=`${t}${o}:${n}`;return this.internal.toISOString().slice(0,-1)+r}toString(){return`${this.toDateString()} ${this.toTimeString()}`}toDateString(){const[t,o,n,r]=this.internal.toUTCString().split(" ");return`${t==null?void 0:t.slice(0,-1)} ${n} ${o} ${r}`}toTimeString(){const t=this.internal.toUTCString().split(" ")[4],[o,n,r]=this.tzComponents();return`${t} GMT${o}${n}${r} (${im(this.timeZone,this)})`}toLocaleString(t,o){return Date.prototype.toLocaleString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleDateString(t,o){return Date.prototype.toLocaleDateString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}toLocaleTimeString(t,o){return Date.prototype.toLocaleTimeString.call(this,t,{...o,timeZone:(o==null?void 0:o.timeZone)||this.timeZone})}tzComponents(){const t=this.getTimezoneOffset(),o=t>0?"-":"+",n=String(Math.floor(Math.abs(t)/60)).padStart(2,"0"),r=String(Math.abs(t)%60).padStart(2,"0");return[o,n,r]}withTimeZone(t){return new re(+this,t)}[Symbol.for("constructDateFrom")](t){return new re(+new Date(t),this.timeZone)}}const cm={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},dm=(e,t,o)=>{let n;const r=cm[e];return typeof r=="string"?n=r:t===1?n=r.one:n=r.other.replace("{{count}}",t.toString()),o!=null&&o.addSuffix?o.comparison&&o.comparison>0?"in "+n:n+" ago":n};function Eo(e){return(t={})=>{const o=t.width?String(t.width):e.defaultWidth;return e.formats[o]||e.formats[e.defaultWidth]}}const um={full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},fm={full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},pm={full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},hm={date:Eo({formats:um,defaultWidth:"full"}),time:Eo({formats:fm,defaultWidth:"full"}),dateTime:Eo({formats:pm,defaultWidth:"full"})},gm={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},mm=(e,t,o,n)=>gm[e];function Tt(e){return(t,o)=>{const n=o!=null&&o.context?String(o.context):"standalone";let r;if(n==="formatting"&&e.formattingValues){const a=e.defaultFormattingWidth||e.defaultWidth,l=o!=null&&o.width?String(o.width):a;r=e.formattingValues[l]||e.formattingValues[a]}else{const a=e.defaultWidth,l=o!=null&&o.width?String(o.width):e.defaultWidth;r=e.values[l]||e.values[a]}const s=e.argumentCallback?e.argumentCallback(t):t;return r[s]}}const bm={narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},xm={narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},ym={narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},km={narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},vm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},wm={narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},Cm=(e,t)=>{const o=Number(e),n=o%100;if(n>20||n<10)switch(n%10){case 1:return o+"st";case 2:return o+"nd";case 3:return o+"rd"}return o+"th"},$m={ordinalNumber:Cm,era:Tt({values:bm,defaultWidth:"wide"}),quarter:Tt({values:xm,defaultWidth:"wide",argumentCallback:e=>e-1}),month:Tt({values:ym,defaultWidth:"wide"}),day:Tt({values:km,defaultWidth:"wide"}),dayPeriod:Tt({values:vm,defaultWidth:"wide",formattingValues:wm,defaultFormattingWidth:"wide"})};function Dt(e){return(t,o={})=>{const n=o.width,r=n&&e.matchPatterns[n]||e.matchPatterns[e.defaultMatchWidth],s=t.match(r);if(!s)return null;const a=s[0],l=n&&e.parsePatterns[n]||e.parsePatterns[e.defaultParseWidth],u=Array.isArray(l)?jm(l,h=>h.test(a)):Sm(l,h=>h.test(a));let f;f=e.valueCallback?e.valueCallback(u):u,f=o.valueCallback?o.valueCallback(f):f;const p=t.slice(a.length);return{value:f,rest:p}}}function Sm(e,t){for(const o in e)if(Object.prototype.hasOwnProperty.call(e,o)&&t(e[o]))return o}function jm(e,t){for(let o=0;o<e.length;o++)if(t(e[o]))return o}function Tm(e){return(t,o={})=>{const n=t.match(e.matchPattern);if(!n)return null;const r=n[0],s=t.match(e.parsePattern);if(!s)return null;let a=e.valueCallback?e.valueCallback(s[0]):s[0];a=o.valueCallback?o.valueCallback(a):a;const l=t.slice(r.length);return{value:a,rest:l}}}const Dm=/^(\d+)(th|st|nd|rd)?/i,Mm=/\d+/i,Em={narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},zm={any:[/^b/i,/^(a|c)/i]},Om={narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},Im={any:[/1/i,/2/i,/3/i,/4/i]},Rm={narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},Nm={narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},Fm={narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},Am={narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},_m={narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},Lm={any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},Wm={ordinalNumber:Tm({matchPattern:Dm,parsePattern:Mm,valueCallback:e=>parseInt(e,10)}),era:Dt({matchPatterns:Em,defaultMatchWidth:"wide",parsePatterns:zm,defaultParseWidth:"any"}),quarter:Dt({matchPatterns:Om,defaultMatchWidth:"wide",parsePatterns:Im,defaultParseWidth:"any",valueCallback:e=>e+1}),month:Dt({matchPatterns:Rm,defaultMatchWidth:"wide",parsePatterns:Nm,defaultParseWidth:"any"}),day:Dt({matchPatterns:Fm,defaultMatchWidth:"wide",parsePatterns:Am,defaultParseWidth:"any"}),dayPeriod:Dt({matchPatterns:_m,defaultMatchWidth:"any",parsePatterns:Lm,defaultParseWidth:"any"})},ri={code:"en-US",formatDistance:dm,formatLong:hm,formatRelative:mm,localize:$m,match:Wm,options:{weekStartsOn:0,firstWeekContainsDate:1}},ar=5,Bm=4;function Pm(e,t){const o=t.startOfMonth(e),n=o.getDay()>0?o.getDay():7,r=t.addDays(e,-n+1),s=t.addDays(r,ar*7-1);return t.getMonth(e)===t.getMonth(s)?ar:Bm}function si(e,t){const o=t.startOfMonth(e),n=o.getDay();return n===1?o:n===0?t.addDays(o,-1*6):t.addDays(o,-1*(n-1))}function Hm(e,t){const o=si(e,t),n=Pm(e,t);return t.addDays(o,n*7-1)}class qe{constructor(t,o){this.Date=Date,this.today=()=>{var n;return(n=this.overrides)!=null&&n.today?this.overrides.today():this.options.timeZone?re.tz(this.options.timeZone):new this.Date},this.newDate=(n,r,s)=>{var a;return(a=this.overrides)!=null&&a.newDate?this.overrides.newDate(n,r,s):this.options.timeZone?new re(n,r,s,this.options.timeZone):new Date(n,r,s)},this.addDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addDays?this.overrides.addDays(n,r):Y.addDays(n,r)},this.addMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addMonths?this.overrides.addMonths(n,r):Y.addMonths(n,r)},this.addWeeks=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addWeeks?this.overrides.addWeeks(n,r):Y.addWeeks(n,r)},this.addYears=(n,r)=>{var s;return(s=this.overrides)!=null&&s.addYears?this.overrides.addYears(n,r):Y.addYears(n,r)},this.differenceInCalendarDays=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarDays?this.overrides.differenceInCalendarDays(n,r):Y.differenceInCalendarDays(n,r)},this.differenceInCalendarMonths=(n,r)=>{var s;return(s=this.overrides)!=null&&s.differenceInCalendarMonths?this.overrides.differenceInCalendarMonths(n,r):Y.differenceInCalendarMonths(n,r)},this.eachMonthOfInterval=n=>{var r;return(r=this.overrides)!=null&&r.eachMonthOfInterval?this.overrides.eachMonthOfInterval(n):Y.eachMonthOfInterval(n)},this.endOfBroadcastWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfBroadcastWeek?this.overrides.endOfBroadcastWeek(n):Hm(n,this)},this.endOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.endOfISOWeek?this.overrides.endOfISOWeek(n):Y.endOfISOWeek(n)},this.endOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.endOfMonth?this.overrides.endOfMonth(n):Y.endOfMonth(n)},this.endOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.endOfWeek?this.overrides.endOfWeek(n,r):Y.endOfWeek(n,this.options)},this.endOfYear=n=>{var r;return(r=this.overrides)!=null&&r.endOfYear?this.overrides.endOfYear(n):Y.endOfYear(n)},this.format=(n,r,s)=>{var l;const a=(l=this.overrides)!=null&&l.format?this.overrides.format(n,r,this.options):Y.format(n,r,this.options);return this.options.numerals&&this.options.numerals!=="latn"?this.replaceDigits(a):a},this.getISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.getISOWeek?this.overrides.getISOWeek(n):Y.getISOWeek(n)},this.getMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getMonth?this.overrides.getMonth(n,this.options):Y.getMonth(n,this.options)},this.getYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getYear?this.overrides.getYear(n,this.options):Y.getYear(n,this.options)},this.getWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.getWeek?this.overrides.getWeek(n,this.options):Y.getWeek(n,this.options)},this.isAfter=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isAfter?this.overrides.isAfter(n,r):Y.isAfter(n,r)},this.isBefore=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isBefore?this.overrides.isBefore(n,r):Y.isBefore(n,r)},this.isDate=n=>{var r;return(r=this.overrides)!=null&&r.isDate?this.overrides.isDate(n):Y.isDate(n)},this.isSameDay=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameDay?this.overrides.isSameDay(n,r):Y.isSameDay(n,r)},this.isSameMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameMonth?this.overrides.isSameMonth(n,r):Y.isSameMonth(n,r)},this.isSameYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.isSameYear?this.overrides.isSameYear(n,r):Y.isSameYear(n,r)},this.max=n=>{var r;return(r=this.overrides)!=null&&r.max?this.overrides.max(n):Y.max(n)},this.min=n=>{var r;return(r=this.overrides)!=null&&r.min?this.overrides.min(n):Y.min(n)},this.setMonth=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setMonth?this.overrides.setMonth(n,r):Y.setMonth(n,r)},this.setYear=(n,r)=>{var s;return(s=this.overrides)!=null&&s.setYear?this.overrides.setYear(n,r):Y.setYear(n,r)},this.startOfBroadcastWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfBroadcastWeek?this.overrides.startOfBroadcastWeek(n,this):si(n,this)},this.startOfDay=n=>{var r;return(r=this.overrides)!=null&&r.startOfDay?this.overrides.startOfDay(n):Y.startOfDay(n)},this.startOfISOWeek=n=>{var r;return(r=this.overrides)!=null&&r.startOfISOWeek?this.overrides.startOfISOWeek(n):Y.startOfISOWeek(n)},this.startOfMonth=n=>{var r;return(r=this.overrides)!=null&&r.startOfMonth?this.overrides.startOfMonth(n):Y.startOfMonth(n)},this.startOfWeek=(n,r)=>{var s;return(s=this.overrides)!=null&&s.startOfWeek?this.overrides.startOfWeek(n,this.options):Y.startOfWeek(n,this.options)},this.startOfYear=n=>{var r;return(r=this.overrides)!=null&&r.startOfYear?this.overrides.startOfYear(n):Y.startOfYear(n)},this.options={locale:ri,...t},this.overrides=o}getDigitMap(){const{numerals:t="latn"}=this.options,o=new Intl.NumberFormat("en-US",{numberingSystem:t}),n={};for(let r=0;r<10;r++)n[r.toString()]=o.format(r);return n}replaceDigits(t){const o=this.getDigitMap();return t.replace(/\d/g,n=>o[n]||n)}formatNumber(t){return this.replaceDigits(t.toString())}}const Be=new qe;class ii{constructor(t,o,n=Be){this.date=t,this.displayMonth=o,this.outside=!!(o&&!n.isSameMonth(t,o)),this.dateLib=n}isEqualTo(t){return this.dateLib.isSameDay(t.date,this.date)&&this.dateLib.isSameMonth(t.displayMonth,this.displayMonth)}}class Vm{constructor(t,o){this.date=t,this.weeks=o}}class Gm{constructor(t,o){this.days=o,this.weekNumber=t}}function Um(e){return d.createElement("button",{...e})}function Ym(e){return d.createElement("span",{...e})}function Km(e){const{size:t=24,orientation:o="left",className:n}=e;return d.createElement("svg",{className:n,width:t,height:t,viewBox:"0 0 24 24"},o==="up"&&d.createElement("polygon",{points:"6.77 17 12.5 11.43 18.24 17 20 15.28 12.5 8 5 15.28"}),o==="down"&&d.createElement("polygon",{points:"6.77 8 12.5 13.57 18.24 8 20 9.72 12.5 17 5 9.72"}),o==="left"&&d.createElement("polygon",{points:"16 18.112 9.81111111 12 16 5.87733333 14.0888889 4 6 12 14.0888889 20"}),o==="right"&&d.createElement("polygon",{points:"8 18.112 14.18888889 12 8 5.87733333 9.91111111 4 18 12 9.91111111 20"}))}function qm(e){const{day:t,modifiers:o,...n}=e;return d.createElement("td",{...n})}function Zm(e){const{day:t,modifiers:o,...n}=e,r=d.useRef(null);return d.useEffect(()=>{var s;o.focused&&((s=r.current)==null||s.focus())},[o.focused]),d.createElement("button",{ref:r,...n})}var A;(function(e){e.Root="root",e.Chevron="chevron",e.Day="day",e.DayButton="day_button",e.CaptionLabel="caption_label",e.Dropdowns="dropdowns",e.Dropdown="dropdown",e.DropdownRoot="dropdown_root",e.Footer="footer",e.MonthGrid="month_grid",e.MonthCaption="month_caption",e.MonthsDropdown="months_dropdown",e.Month="month",e.Months="months",e.Nav="nav",e.NextMonthButton="button_next",e.PreviousMonthButton="button_previous",e.Week="week",e.Weeks="weeks",e.Weekday="weekday",e.Weekdays="weekdays",e.WeekNumber="week_number",e.WeekNumberHeader="week_number_header",e.YearsDropdown="years_dropdown"})(A||(A={}));var Q;(function(e){e.disabled="disabled",e.hidden="hidden",e.outside="outside",e.focused="focused",e.today="today"})(Q||(Q={}));var Ee;(function(e){e.range_end="range_end",e.range_middle="range_middle",e.range_start="range_start",e.selected="selected"})(Ee||(Ee={}));var ue;(function(e){e.weeks_before_enter="weeks_before_enter",e.weeks_before_exit="weeks_before_exit",e.weeks_after_enter="weeks_after_enter",e.weeks_after_exit="weeks_after_exit",e.caption_after_enter="caption_after_enter",e.caption_after_exit="caption_after_exit",e.caption_before_enter="caption_before_enter",e.caption_before_exit="caption_before_exit"})(ue||(ue={}));function Xm(e){const{options:t,className:o,components:n,classNames:r,...s}=e,a=[r[A.Dropdown],o].join(" "),l=t==null?void 0:t.find(({value:u})=>u===s.value);return d.createElement("span",{"data-disabled":s.disabled,className:r[A.DropdownRoot]},d.createElement(n.Select,{className:a,...s},t==null?void 0:t.map(({value:u,label:f,disabled:p})=>d.createElement(n.Option,{key:u,value:u,disabled:p},f))),d.createElement("span",{className:r[A.CaptionLabel],"aria-hidden":!0},l==null?void 0:l.label,d.createElement(n.Chevron,{orientation:"down",size:18,className:r[A.Chevron]})))}function Jm(e){return d.createElement("div",{...e})}function Qm(e){return d.createElement("div",{...e})}function eb(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n},e.children)}function tb(e){const{calendarMonth:t,displayIndex:o,...n}=e;return d.createElement("div",{...n})}function ob(e){return d.createElement("table",{...e})}function nb(e){return d.createElement("div",{...e})}const ai=d.createContext(void 0);function Pt(){const e=d.useContext(ai);if(e===void 0)throw new Error("useDayPicker() must be used within a custom component.");return e}function rb(e){const{components:t}=Pt();return d.createElement(t.Dropdown,{...e})}function sb(e){const{onPreviousClick:t,onNextClick:o,previousMonth:n,nextMonth:r,...s}=e,{components:a,classNames:l,labels:{labelPrevious:u,labelNext:f}}=Pt(),p=d.useCallback(m=>{r&&(o==null||o(m))},[r,o]),h=d.useCallback(m=>{n&&(t==null||t(m))},[n,t]);return d.createElement("nav",{...s},d.createElement(a.PreviousMonthButton,{type:"button",className:l[A.PreviousMonthButton],tabIndex:n?void 0:-1,"aria-disabled":n?void 0:!0,"aria-label":u(n),onClick:h},d.createElement(a.Chevron,{disabled:n?void 0:!0,className:l[A.Chevron],orientation:"left"})),d.createElement(a.NextMonthButton,{type:"button",className:l[A.NextMonthButton],tabIndex:r?void 0:-1,"aria-disabled":r?void 0:!0,"aria-label":f(r),onClick:p},d.createElement(a.Chevron,{disabled:r?void 0:!0,orientation:"right",className:l[A.Chevron]})))}function ib(e){const{components:t}=Pt();return d.createElement(t.Button,{...e})}function ab(e){return d.createElement("option",{...e})}function lb(e){const{components:t}=Pt();return d.createElement(t.Button,{...e})}function cb(e){const{rootRef:t,...o}=e;return d.createElement("div",{...o,ref:t})}function db(e){return d.createElement("select",{...e})}function ub(e){const{week:t,...o}=e;return d.createElement("tr",{...o})}function fb(e){return d.createElement("th",{...e})}function pb(e){return d.createElement("thead",{"aria-hidden":!0},d.createElement("tr",{...e}))}function hb(e){const{week:t,...o}=e;return d.createElement("th",{...o})}function gb(e){return d.createElement("th",{...e})}function mb(e){return d.createElement("tbody",{...e})}function bb(e){const{components:t}=Pt();return d.createElement(t.Dropdown,{...e})}const xb=Object.freeze(Object.defineProperty({__proto__:null,Button:Um,CaptionLabel:Ym,Chevron:Km,Day:qm,DayButton:Zm,Dropdown:Xm,DropdownNav:Jm,Footer:Qm,Month:eb,MonthCaption:tb,MonthGrid:ob,Months:nb,MonthsDropdown:rb,Nav:sb,NextMonthButton:ib,Option:ab,PreviousMonthButton:lb,Root:cb,Select:db,Week:ub,WeekNumber:hb,WeekNumberHeader:gb,Weekday:fb,Weekdays:pb,Weeks:mb,YearsDropdown:bb},Symbol.toStringTag,{value:"Module"}));function Ve(e,t,o=!1,n=Be){let{from:r,to:s}=e;const{differenceInCalendarDays:a,isSameDay:l}=n;return r&&s?(a(s,r)<0&&([r,s]=[s,r]),a(t,r)>=(o?1:0)&&a(s,t)>=(o?1:0)):!o&&s?l(s,t):!o&&r?l(r,t):!1}function li(e){return!!(e&&typeof e=="object"&&"before"in e&&"after"in e)}function Dn(e){return!!(e&&typeof e=="object"&&"from"in e)}function ci(e){return!!(e&&typeof e=="object"&&"after"in e)}function di(e){return!!(e&&typeof e=="object"&&"before"in e)}function ui(e){return!!(e&&typeof e=="object"&&"dayOfWeek"in e)}function fi(e,t){return Array.isArray(e)&&e.every(t.isDate)}function Ge(e,t,o=Be){const n=Array.isArray(t)?t:[t],{isSameDay:r,differenceInCalendarDays:s,isAfter:a}=o;return n.some(l=>{if(typeof l=="boolean")return l;if(o.isDate(l))return r(e,l);if(fi(l,o))return l.includes(e);if(Dn(l))return Ve(l,e,!1,o);if(ui(l))return Array.isArray(l.dayOfWeek)?l.dayOfWeek.includes(e.getDay()):l.dayOfWeek===e.getDay();if(li(l)){const u=s(l.before,e),f=s(l.after,e),p=u>0,h=f<0;return a(l.before,l.after)?h&&p:p||h}return ci(l)?s(e,l.after)>0:di(l)?s(l.before,e)>0:typeof l=="function"?l(e):!1})}function yb(e,t,o,n,r){const{disabled:s,hidden:a,modifiers:l,showOutsideDays:u,broadcastCalendar:f,today:p}=t,{isSameDay:h,isSameMonth:m,startOfMonth:x,isBefore:b,endOfMonth:y,isAfter:k}=r,w=o&&x(o),$=n&&y(n),v={[Q.focused]:[],[Q.outside]:[],[Q.disabled]:[],[Q.hidden]:[],[Q.today]:[]},S={};for(const C of e){const{date:T,displayMonth:j}=C,D=!!(j&&!m(T,j)),W=!!(w&&b(T,w)),V=!!($&&k(T,$)),R=!!(s&&Ge(T,s,r)),N=!!(a&&Ge(T,a,r))||W||V||!f&&!u&&D||f&&u===!1&&D,q=h(T,p??r.today());D&&v.outside.push(C),R&&v.disabled.push(C),N&&v.hidden.push(C),q&&v.today.push(C),l&&Object.keys(l).forEach(oe=>{const te=l==null?void 0:l[oe];te&&Ge(T,te,r)&&(S[oe]?S[oe].push(C):S[oe]=[C])})}return C=>{const T={[Q.focused]:!1,[Q.disabled]:!1,[Q.hidden]:!1,[Q.outside]:!1,[Q.today]:!1},j={};for(const D in v){const W=v[D];T[D]=W.some(V=>V===C)}for(const D in S)j[D]=S[D].some(W=>W===C);return{...T,...j}}}function kb(e,t,o={}){return Object.entries(e).filter(([,r])=>r===!0).reduce((r,[s])=>(o[s]?r.push(o[s]):t[Q[s]]?r.push(t[Q[s]]):t[Ee[s]]&&r.push(t[Ee[s]]),r),[t[A.Day]])}function vb(e){return{...xb,...e}}function wb(e){const t={"data-mode":e.mode??void 0,"data-required":"required"in e?e.required:void 0,"data-multiple-months":e.numberOfMonths&&e.numberOfMonths>1||void 0,"data-week-numbers":e.showWeekNumber||void 0,"data-broadcast-calendar":e.broadcastCalendar||void 0,"data-nav-layout":e.navLayout||void 0};return Object.entries(e).forEach(([o,n])=>{o.startsWith("data-")&&(t[o]=n)}),t}function Cb(){const e={};for(const t in A)e[A[t]]=`rdp-${A[t]}`;for(const t in Q)e[Q[t]]=`rdp-${Q[t]}`;for(const t in Ee)e[Ee[t]]=`rdp-${Ee[t]}`;for(const t in ue)e[ue[t]]=`rdp-${ue[t]}`;return e}function pi(e,t,o){return(o??new qe(t)).format(e,"LLLL y")}const $b=pi;function Sb(e,t,o){return(o??new qe(t)).format(e,"d")}function jb(e,t=Be){return t.format(e,"LLLL")}function Tb(e,t,o){return(o??new qe(t)).format(e,"cccccc")}function Db(e,t=Be){return e<10?t.formatNumber(`0${e.toLocaleString()}`):t.formatNumber(`${e.toLocaleString()}`)}function Mb(){return""}function hi(e,t=Be){return t.format(e,"yyyy")}const Eb=hi,zb=Object.freeze(Object.defineProperty({__proto__:null,formatCaption:pi,formatDay:Sb,formatMonthCaption:$b,formatMonthDropdown:jb,formatWeekNumber:Db,formatWeekNumberHeader:Mb,formatWeekdayName:Tb,formatYearCaption:Eb,formatYearDropdown:hi},Symbol.toStringTag,{value:"Module"}));function Ob(e){return e!=null&&e.formatMonthCaption&&!e.formatCaption&&(e.formatCaption=e.formatMonthCaption),e!=null&&e.formatYearCaption&&!e.formatYearDropdown&&(e.formatYearDropdown=e.formatYearCaption),{...zb,...e}}function Ib(e,t,o,n,r){const{startOfMonth:s,startOfYear:a,endOfYear:l,eachMonthOfInterval:u,getMonth:f}=r;return u({start:a(e),end:l(e)}).map(m=>{const x=n.formatMonthDropdown(m,r),b=f(m),y=t&&m<s(t)||o&&m>s(o)||!1;return{value:b,label:x,disabled:y}})}function Rb(e,t={},o={}){let n={...t==null?void 0:t[A.Day]};return Object.entries(e).filter(([,r])=>r===!0).forEach(([r])=>{n={...n,...o==null?void 0:o[r]}}),n}function Nb(e,t,o){const n=e.today(),r=t?e.startOfISOWeek(n):e.startOfWeek(n),s=[];for(let a=0;a<7;a++){const l=e.addDays(r,a);s.push(l)}return s}function Fb(e,t,o,n,r=!1){if(!e||!t)return;const{startOfYear:s,endOfYear:a,addYears:l,getYear:u,isBefore:f,isSameYear:p}=n,h=s(e),m=a(t),x=[];let b=h;for(;f(b,m)||p(b,m);)x.push(b),b=l(b,1);return r&&x.reverse(),x.map(y=>{const k=o.formatYearDropdown(y,n);return{value:u(y),label:k,disabled:!1}})}function gi(e,t,o,n){let r=(n??new qe(o)).format(e,"PPPP");return t.today&&(r=`Today, ${r}`),t.selected&&(r=`${r}, selected`),r}const Ab=gi;function mi(e,t,o){return(o??new qe(t)).format(e,"LLLL y")}const _b=mi;function Lb(e,t,o,n){let r=(n??new qe(o)).format(e,"PPPP");return t!=null&&t.today&&(r=`Today, ${r}`),r}function Wb(e){return"Choose the Month"}function Bb(){return""}function Pb(e){return"Go to the Next Month"}function Hb(e){return"Go to the Previous Month"}function Vb(e,t,o){return(o??new qe(t)).format(e,"cccc")}function Gb(e,t){return`Week ${e}`}function Ub(e){return"Week Number"}function Yb(e){return"Choose the Year"}const Kb=Object.freeze(Object.defineProperty({__proto__:null,labelCaption:_b,labelDay:Ab,labelDayButton:gi,labelGrid:mi,labelGridcell:Lb,labelMonthDropdown:Wb,labelNav:Bb,labelNext:Pb,labelPrevious:Hb,labelWeekNumber:Gb,labelWeekNumberHeader:Ub,labelWeekday:Vb,labelYearDropdown:Yb},Symbol.toStringTag,{value:"Module"})),Ht=e=>e instanceof HTMLElement?e:null,zo=e=>[...e.querySelectorAll("[data-animated-month]")??[]],qb=e=>Ht(e.querySelector("[data-animated-month]")),Oo=e=>Ht(e.querySelector("[data-animated-caption]")),Io=e=>Ht(e.querySelector("[data-animated-weeks]")),Zb=e=>Ht(e.querySelector("[data-animated-nav]")),Xb=e=>Ht(e.querySelector("[data-animated-weekdays]"));function Jb(e,t,{classNames:o,months:n,focused:r,dateLib:s}){const a=d.useRef(null),l=d.useRef(n),u=d.useRef(!1);d.useLayoutEffect(()=>{const f=l.current;if(l.current=n,!t||!e.current||!(e.current instanceof HTMLElement)||n.length===0||f.length===0||n.length!==f.length)return;const p=s.isSameMonth(n[0].date,f[0].date),h=s.isAfter(n[0].date,f[0].date),m=h?o[ue.caption_after_enter]:o[ue.caption_before_enter],x=h?o[ue.weeks_after_enter]:o[ue.weeks_before_enter],b=a.current,y=e.current.cloneNode(!0);if(y instanceof HTMLElement?(zo(y).forEach(v=>{if(!(v instanceof HTMLElement))return;const S=qb(v);S&&v.contains(S)&&v.removeChild(S);const C=Oo(v);C&&C.classList.remove(m);const T=Io(v);T&&T.classList.remove(x)}),a.current=y):a.current=null,u.current||p||r)return;const k=b instanceof HTMLElement?zo(b):[],w=zo(e.current);if(w!=null&&w.every($=>$ instanceof HTMLElement)&&k&&k.every($=>$ instanceof HTMLElement)){u.current=!0,e.current.style.isolation="isolate";const $=Zb(e.current);$&&($.style.zIndex="1"),w.forEach((v,S)=>{const C=k[S];if(!C)return;v.style.position="relative",v.style.overflow="hidden";const T=Oo(v);T&&T.classList.add(m);const j=Io(v);j&&j.classList.add(x);const D=()=>{u.current=!1,e.current&&(e.current.style.isolation=""),$&&($.style.zIndex=""),T&&T.classList.remove(m),j&&j.classList.remove(x),v.style.position="",v.style.overflow="",v.contains(C)&&v.removeChild(C)};C.style.pointerEvents="none",C.style.position="absolute",C.style.overflow="hidden",C.setAttribute("aria-hidden","true");const W=Xb(C);W&&(W.style.opacity="0");const V=Oo(C);V&&(V.classList.add(h?o[ue.caption_before_exit]:o[ue.caption_after_exit]),V.addEventListener("animationend",D));const R=Io(C);R&&R.classList.add(h?o[ue.weeks_before_exit]:o[ue.weeks_after_exit]),v.insertBefore(C,v.firstChild)})}})}function Qb(e,t,o,n){const r=e[0],s=e[e.length-1],{ISOWeek:a,fixedWeeks:l,broadcastCalendar:u}=o??{},{addDays:f,differenceInCalendarDays:p,differenceInCalendarMonths:h,endOfBroadcastWeek:m,endOfISOWeek:x,endOfMonth:b,endOfWeek:y,isAfter:k,startOfBroadcastWeek:w,startOfISOWeek:$,startOfWeek:v}=n,S=u?w(r,n):a?$(r):v(r),C=u?m(s):a?x(b(s)):y(b(s)),T=p(C,S),j=h(s,r)+1,D=[];for(let R=0;R<=T;R++){const N=f(S,R);if(t&&k(N,t))break;D.push(N)}const V=(u?35:42)*j;if(l&&D.length<V){const R=V-D.length;for(let N=0;N<R;N++){const q=f(D[D.length-1],1);D.push(q)}}return D}function ex(e){const t=[];return e.reduce((o,n)=>{const r=n.weeks.reduce((s,a)=>s.concat(a.days.slice()),t.slice());return o.concat(r.slice())},t.slice())}function tx(e,t,o,n){const{numberOfMonths:r=1}=o,s=[];for(let a=0;a<r;a++){const l=n.addMonths(e,a);if(t&&l>t)break;s.push(l)}return s}function lr(e,t,o,n){const{month:r,defaultMonth:s,today:a=n.today(),numberOfMonths:l=1}=e;let u=r||s||a;const{differenceInCalendarMonths:f,addMonths:p,startOfMonth:h}=n;if(o&&f(o,u)<l-1){const m=-1*(l-1);u=p(o,m)}return t&&f(u,t)<0&&(u=t),h(u)}function ox(e,t,o,n){const{addDays:r,endOfBroadcastWeek:s,endOfISOWeek:a,endOfMonth:l,endOfWeek:u,getISOWeek:f,getWeek:p,startOfBroadcastWeek:h,startOfISOWeek:m,startOfWeek:x}=n,b=e.reduce((y,k)=>{const w=o.broadcastCalendar?h(k,n):o.ISOWeek?m(k):x(k),$=o.broadcastCalendar?s(k):o.ISOWeek?a(l(k)):u(l(k)),v=t.filter(j=>j>=w&&j<=$),S=o.broadcastCalendar?35:42;if(o.fixedWeeks&&v.length<S){const j=t.filter(D=>{const W=S-v.length;return D>$&&D<=r($,W)});v.push(...j)}const C=v.reduce((j,D)=>{const W=o.ISOWeek?f(D):p(D),V=j.find(N=>N.weekNumber===W),R=new ii(D,k,n);return V?V.days.push(R):j.push(new Gm(W,[R])),j},[]),T=new Vm(k,C);return y.push(T),y},[]);return o.reverseMonths?b.reverse():b}function nx(e,t){let{startMonth:o,endMonth:n}=e;const{startOfYear:r,startOfDay:s,startOfMonth:a,endOfMonth:l,addYears:u,endOfYear:f,newDate:p,today:h}=t,{fromYear:m,toYear:x,fromMonth:b,toMonth:y}=e;!o&&b&&(o=b),!o&&m&&(o=t.newDate(m,0,1)),!n&&y&&(n=y),!n&&x&&(n=p(x,11,31));const k=e.captionLayout==="dropdown"||e.captionLayout==="dropdown-years";return o?o=a(o):m?o=p(m,0,1):!o&&k&&(o=r(u(e.today??h(),-100))),n?n=l(n):x?n=p(x,11,31):!n&&k&&(n=f(e.today??h())),[o&&s(o),n&&s(n)]}function rx(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s=1}=o,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:u}=n,f=r?s:1,p=a(e);if(!t)return l(p,f);if(!(u(t,e)<s))return l(p,f)}function sx(e,t,o,n){if(o.disableNavigation)return;const{pagedNavigation:r,numberOfMonths:s}=o,{startOfMonth:a,addMonths:l,differenceInCalendarMonths:u}=n,f=r?s??1:1,p=a(e);if(!t)return l(p,-f);if(!(u(p,t)<=0))return l(p,-f)}function ix(e){const t=[];return e.reduce((o,n)=>o.concat(n.weeks.slice()),t.slice())}function mo(e,t){const[o,n]=d.useState(e);return[t===void 0?o:t,n]}function ax(e,t){const[o,n]=nx(e,t),{startOfMonth:r,endOfMonth:s}=t,a=lr(e,o,n,t),[l,u]=mo(a,e.month?a:void 0);d.useEffect(()=>{const T=lr(e,o,n,t);u(T)},[e.timeZone]);const f=tx(l,n,e,t),p=Qb(f,e.endMonth?s(e.endMonth):void 0,e,t),h=ox(f,p,e,t),m=ix(h),x=ex(h),b=sx(l,o,e,t),y=rx(l,n,e,t),{disableNavigation:k,onMonthChange:w}=e,$=T=>m.some(j=>j.days.some(D=>D.isEqualTo(T))),v=T=>{if(k)return;let j=r(T);o&&j<r(o)&&(j=r(o)),n&&j>r(n)&&(j=r(n)),u(j),w==null||w(j)};return{months:h,weeks:m,days:x,navStart:o,navEnd:n,previousMonth:b,nextMonth:y,goToMonth:v,goToDay:T=>{$(T)||v(T.date)}}}var Ie;(function(e){e[e.Today=0]="Today",e[e.Selected=1]="Selected",e[e.LastFocused=2]="LastFocused",e[e.FocusedModifier=3]="FocusedModifier"})(Ie||(Ie={}));function cr(e){return!e[Q.disabled]&&!e[Q.hidden]&&!e[Q.outside]}function lx(e,t,o,n){let r,s=-1;for(const a of e){const l=t(a);cr(l)&&(l[Q.focused]&&s<Ie.FocusedModifier?(r=a,s=Ie.FocusedModifier):n!=null&&n.isEqualTo(a)&&s<Ie.LastFocused?(r=a,s=Ie.LastFocused):o(a.date)&&s<Ie.Selected?(r=a,s=Ie.Selected):l[Q.today]&&s<Ie.Today&&(r=a,s=Ie.Today))}return r||(r=e.find(a=>cr(t(a)))),r}function cx(e,t,o,n,r,s,a){const{ISOWeek:l,broadcastCalendar:u}=s,{addDays:f,addMonths:p,addWeeks:h,addYears:m,endOfBroadcastWeek:x,endOfISOWeek:b,endOfWeek:y,max:k,min:w,startOfBroadcastWeek:$,startOfISOWeek:v,startOfWeek:S}=a;let T={day:f,week:h,month:p,year:m,startOfWeek:j=>u?$(j,a):l?v(j):S(j),endOfWeek:j=>u?x(j):l?b(j):y(j)}[e](o,t==="after"?1:-1);return t==="before"&&n?T=k([n,T]):t==="after"&&r&&(T=w([r,T])),T}function bi(e,t,o,n,r,s,a,l=0){if(l>365)return;const u=cx(e,t,o.date,n,r,s,a),f=!!(s.disabled&&Ge(u,s.disabled,a)),p=!!(s.hidden&&Ge(u,s.hidden,a)),h=u,m=new ii(u,h,a);return!f&&!p?m:bi(e,t,m,n,r,s,a,l+1)}function dx(e,t,o,n,r){const{autoFocus:s}=e,[a,l]=d.useState(),u=lx(t.days,o,n||(()=>!1),a),[f,p]=d.useState(s?u:void 0);return{isFocusTarget:y=>!!(u!=null&&u.isEqualTo(y)),setFocused:p,focused:f,blur:()=>{l(f),p(void 0)},moveFocus:(y,k)=>{if(!f)return;const w=bi(y,k,f,t.navStart,t.navEnd,e,r);w&&(t.goToDay(w),p(w))}}}function ux(e,t){const{selected:o,required:n,onSelect:r}=e,[s,a]=mo(o,r?o:void 0),l=r?o:s,{isSameDay:u}=t,f=x=>(l==null?void 0:l.some(b=>u(b,x)))??!1,{min:p,max:h}=e;return{selected:l,select:(x,b,y)=>{let k=[...l??[]];if(f(x)){if((l==null?void 0:l.length)===p||n&&(l==null?void 0:l.length)===1)return;k=l==null?void 0:l.filter(w=>!u(w,x))}else(l==null?void 0:l.length)===h?k=[x]:k=[...k,x];return r||a(k),r==null||r(k,x,b,y),k},isSelected:f}}function fx(e,t,o=0,n=0,r=!1,s=Be){const{from:a,to:l}=t||{},{isSameDay:u,isAfter:f,isBefore:p}=s;let h;if(!a&&!l)h={from:e,to:o>0?void 0:e};else if(a&&!l)u(a,e)?o===0?h={from:a,to:e}:r?h={from:a,to:void 0}:h=void 0:p(e,a)?h={from:e,to:a}:h={from:a,to:e};else if(a&&l)if(u(a,e)&&u(l,e))r?h={from:a,to:l}:h=void 0;else if(u(a,e))h={from:a,to:o>0?void 0:e};else if(u(l,e))h={from:e,to:o>0?void 0:e};else if(p(e,a))h={from:e,to:l};else if(f(e,a))h={from:a,to:e};else if(f(e,l))h={from:a,to:e};else throw new Error("Invalid range");if(h!=null&&h.from&&(h!=null&&h.to)){const m=s.differenceInCalendarDays(h.to,h.from);n>0&&m>n?h={from:e,to:void 0}:o>1&&m<o&&(h={from:e,to:void 0})}return h}function px(e,t,o=Be){const n=Array.isArray(t)?t:[t];let r=e.from;const s=o.differenceInCalendarDays(e.to,e.from),a=Math.min(s,6);for(let l=0;l<=a;l++){if(n.includes(r.getDay()))return!0;r=o.addDays(r,1)}return!1}function dr(e,t,o=Be){return Ve(e,t.from,!1,o)||Ve(e,t.to,!1,o)||Ve(t,e.from,!1,o)||Ve(t,e.to,!1,o)}function hx(e,t,o=Be){const n=Array.isArray(t)?t:[t];if(n.filter(l=>typeof l!="function").some(l=>typeof l=="boolean"?l:o.isDate(l)?Ve(e,l,!1,o):fi(l,o)?l.some(u=>Ve(e,u,!1,o)):Dn(l)?l.from&&l.to?dr(e,{from:l.from,to:l.to},o):!1:ui(l)?px(e,l.dayOfWeek,o):li(l)?o.isAfter(l.before,l.after)?dr(e,{from:o.addDays(l.after,1),to:o.addDays(l.before,-1)},o):Ge(e.from,l,o)||Ge(e.to,l,o):ci(l)||di(l)?Ge(e.from,l,o)||Ge(e.to,l,o):!1))return!0;const a=n.filter(l=>typeof l=="function");if(a.length){let l=e.from;const u=o.differenceInCalendarDays(e.to,e.from);for(let f=0;f<=u;f++){if(a.some(p=>p(l)))return!0;l=o.addDays(l,1)}}return!1}function gx(e,t){const{disabled:o,excludeDisabled:n,selected:r,required:s,onSelect:a}=e,[l,u]=mo(r,a?r:void 0),f=a?r:l;return{selected:f,select:(m,x,b)=>{const{min:y,max:k}=e,w=m?fx(m,f,y,k,s,t):void 0;return n&&o&&(w!=null&&w.from)&&w.to&&hx({from:w.from,to:w.to},o,t)&&(w.from=m,w.to=void 0),a||u(w),a==null||a(w,m,x,b),w},isSelected:m=>f&&Ve(f,m,!1,t)}}function mx(e,t){const{selected:o,required:n,onSelect:r}=e,[s,a]=mo(o,r?o:void 0),l=r?o:s,{isSameDay:u}=t;return{selected:l,select:(h,m,x)=>{let b=h;return!n&&l&&l&&u(h,l)&&(b=void 0),r||a(b),r==null||r(b,h,m,x),b},isSelected:h=>l?u(l,h):!1}}function bx(e,t){const o=mx(e,t),n=ux(e,t),r=gx(e,t);switch(e.mode){case"single":return o;case"multiple":return n;case"range":return r;default:return}}function xx(e){var Rn;let t=e;t.timeZone&&(t={...e},t.today&&(t.today=new re(t.today,t.timeZone)),t.month&&(t.month=new re(t.month,t.timeZone)),t.defaultMonth&&(t.defaultMonth=new re(t.defaultMonth,t.timeZone)),t.startMonth&&(t.startMonth=new re(t.startMonth,t.timeZone)),t.endMonth&&(t.endMonth=new re(t.endMonth,t.timeZone)),t.mode==="single"&&t.selected?t.selected=new re(t.selected,t.timeZone):t.mode==="multiple"&&t.selected?t.selected=(Rn=t.selected)==null?void 0:Rn.map(H=>new re(H,t.timeZone)):t.mode==="range"&&t.selected&&(t.selected={from:t.selected.from?new re(t.selected.from,t.timeZone):void 0,to:t.selected.to?new re(t.selected.to,t.timeZone):void 0}));const{components:o,formatters:n,labels:r,dateLib:s,locale:a,classNames:l}=d.useMemo(()=>{const H={...ri,...t.locale};return{dateLib:new qe({locale:H,weekStartsOn:t.broadcastCalendar?1:t.weekStartsOn,firstWeekContainsDate:t.firstWeekContainsDate,useAdditionalWeekYearTokens:t.useAdditionalWeekYearTokens,useAdditionalDayOfYearTokens:t.useAdditionalDayOfYearTokens,timeZone:t.timeZone,numerals:t.numerals},t.dateLib),components:vb(t.components),formatters:Ob(t.formatters),labels:{...Kb,...t.labels},locale:H,classNames:{...Cb(),...t.classNames}}},[t.locale,t.broadcastCalendar,t.weekStartsOn,t.firstWeekContainsDate,t.useAdditionalWeekYearTokens,t.useAdditionalDayOfYearTokens,t.timeZone,t.numerals,t.dateLib,t.components,t.formatters,t.labels,t.classNames]),{captionLayout:u,mode:f,navLayout:p,numberOfMonths:h=1,onDayBlur:m,onDayClick:x,onDayFocus:b,onDayKeyDown:y,onDayMouseEnter:k,onDayMouseLeave:w,onNextClick:$,onPrevClick:v,showWeekNumber:S,styles:C}=t,{formatCaption:T,formatDay:j,formatMonthDropdown:D,formatWeekNumber:W,formatWeekNumberHeader:V,formatWeekdayName:R,formatYearDropdown:N}=n,q=ax(t,s),{days:oe,months:te,navStart:st,navEnd:kt,previousMonth:le,nextMonth:ce,goToMonth:ee}=q,it=yb(oe,t,st,kt,s),{isSelected:vt,select:wt,selected:Vt}=bx(t,s)??{},{blur:Mn,focused:Gt,isFocusTarget:yi,moveFocus:En,setFocused:Ut}=dx(t,q,it,vt??(()=>!1),s),{labelDayButton:ki,labelGridcell:vi,labelGrid:wi,labelMonthDropdown:Ci,labelNav:zn,labelPrevious:$i,labelNext:Si,labelWeekday:ji,labelWeekNumber:Ti,labelWeekNumberHeader:Di,labelYearDropdown:Mi}=r,Ei=d.useMemo(()=>Nb(s,t.ISOWeek),[s,t.ISOWeek]),On=f!==void 0||x!==void 0,bo=d.useCallback(()=>{le&&(ee(le),v==null||v(le))},[le,ee,v]),xo=d.useCallback(()=>{ce&&(ee(ce),$==null||$(ce))},[ee,ce,$]),zi=d.useCallback((H,Z)=>B=>{B.preventDefault(),B.stopPropagation(),Ut(H),wt==null||wt(H.date,Z,B),x==null||x(H.date,Z,B)},[wt,x,Ut]),Oi=d.useCallback((H,Z)=>B=>{Ut(H),b==null||b(H.date,Z,B)},[b,Ut]),Ii=d.useCallback((H,Z)=>B=>{Mn(),m==null||m(H.date,Z,B)},[Mn,m]),Ri=d.useCallback((H,Z)=>B=>{const X={ArrowLeft:[B.shiftKey?"month":"day",t.dir==="rtl"?"after":"before"],ArrowRight:[B.shiftKey?"month":"day",t.dir==="rtl"?"before":"after"],ArrowDown:[B.shiftKey?"year":"week","after"],ArrowUp:[B.shiftKey?"year":"week","before"],PageUp:[B.shiftKey?"year":"month","before"],PageDown:[B.shiftKey?"year":"month","after"],Home:["startOfWeek","before"],End:["endOfWeek","after"]};if(X[B.key]){B.preventDefault(),B.stopPropagation();const[fe,U]=X[B.key];En(fe,U)}y==null||y(H.date,Z,B)},[En,y,t.dir]),Ni=d.useCallback((H,Z)=>B=>{k==null||k(H.date,Z,B)},[k]),Fi=d.useCallback((H,Z)=>B=>{w==null||w(H.date,Z,B)},[w]),Ai=d.useCallback(H=>Z=>{const B=Number(Z.target.value),X=s.setMonth(s.startOfMonth(H),B);ee(X)},[s,ee]),_i=d.useCallback(H=>Z=>{const B=Number(Z.target.value),X=s.setYear(s.startOfMonth(H),B);ee(X)},[s,ee]),{className:Li,style:Wi}=d.useMemo(()=>({className:[l[A.Root],t.className].filter(Boolean).join(" "),style:{...C==null?void 0:C[A.Root],...t.style}}),[l,t.className,t.style,C]),Bi=wb(t),In=d.useRef(null);Jb(In,!!t.animate,{classNames:l,months:te,focused:Gt,dateLib:s});const Pi={dayPickerProps:t,selected:Vt,select:wt,isSelected:vt,months:te,nextMonth:ce,previousMonth:le,goToMonth:ee,getModifiers:it,components:o,classNames:l,styles:C,labels:r,formatters:n};return d.createElement(ai.Provider,{value:Pi},d.createElement(o.Root,{rootRef:t.animate?In:void 0,className:Li,style:Wi,dir:t.dir,id:t.id,lang:t.lang,nonce:t.nonce,title:t.title,role:t.role,"aria-label":t["aria-label"],...Bi},d.createElement(o.Months,{className:l[A.Months],style:C==null?void 0:C[A.Months]},!t.hideNavigation&&!p&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":zn(),onPreviousClick:bo,onNextClick:xo,previousMonth:le,nextMonth:ce}),te.map((H,Z)=>d.createElement(o.Month,{"data-animated-month":t.animate?"true":void 0,className:l[A.Month],style:C==null?void 0:C[A.Month],key:Z,displayIndex:Z,calendarMonth:H},p==="around"&&!t.hideNavigation&&Z===0&&d.createElement(o.PreviousMonthButton,{type:"button",className:l[A.PreviousMonthButton],tabIndex:le?void 0:-1,"aria-disabled":le?void 0:!0,"aria-label":$i(le),onClick:bo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:le?void 0:!0,className:l[A.Chevron],orientation:t.dir==="rtl"?"right":"left"})),d.createElement(o.MonthCaption,{"data-animated-caption":t.animate?"true":void 0,className:l[A.MonthCaption],style:C==null?void 0:C[A.MonthCaption],calendarMonth:H,displayIndex:Z},u!=null&&u.startsWith("dropdown")?d.createElement(o.DropdownNav,{className:l[A.Dropdowns],style:C==null?void 0:C[A.Dropdowns]},u==="dropdown"||u==="dropdown-months"?d.createElement(o.MonthsDropdown,{className:l[A.MonthsDropdown],"aria-label":Ci(),classNames:l,components:o,disabled:!!t.disableNavigation,onChange:Ai(H.date),options:Ib(H.date,st,kt,n,s),style:C==null?void 0:C[A.Dropdown],value:s.getMonth(H.date)}):d.createElement("span",null,D(H.date,s)),u==="dropdown"||u==="dropdown-years"?d.createElement(o.YearsDropdown,{className:l[A.YearsDropdown],"aria-label":Mi(s.options),classNames:l,components:o,disabled:!!t.disableNavigation,onChange:_i(H.date),options:Fb(st,kt,n,s,!!t.reverseYears),style:C==null?void 0:C[A.Dropdown],value:s.getYear(H.date)}):d.createElement("span",null,N(H.date,s)),d.createElement("span",{role:"status","aria-live":"polite",style:{border:0,clip:"rect(0 0 0 0)",height:"1px",margin:"-1px",overflow:"hidden",padding:0,position:"absolute",width:"1px",whiteSpace:"nowrap",wordWrap:"normal"}},T(H.date,s.options,s))):d.createElement(o.CaptionLabel,{className:l[A.CaptionLabel],role:"status","aria-live":"polite"},T(H.date,s.options,s))),p==="around"&&!t.hideNavigation&&Z===h-1&&d.createElement(o.NextMonthButton,{type:"button",className:l[A.NextMonthButton],tabIndex:ce?void 0:-1,"aria-disabled":ce?void 0:!0,"aria-label":Si(ce),onClick:xo,"data-animated-button":t.animate?"true":void 0},d.createElement(o.Chevron,{disabled:ce?void 0:!0,className:l[A.Chevron],orientation:t.dir==="rtl"?"left":"right"})),Z===h-1&&p==="after"&&!t.hideNavigation&&d.createElement(o.Nav,{"data-animated-nav":t.animate?"true":void 0,className:l[A.Nav],style:C==null?void 0:C[A.Nav],"aria-label":zn(),onPreviousClick:bo,onNextClick:xo,previousMonth:le,nextMonth:ce}),d.createElement(o.MonthGrid,{role:"grid","aria-multiselectable":f==="multiple"||f==="range","aria-label":wi(H.date,s.options,s)||void 0,className:l[A.MonthGrid],style:C==null?void 0:C[A.MonthGrid]},!t.hideWeekdays&&d.createElement(o.Weekdays,{"data-animated-weekdays":t.animate?"true":void 0,className:l[A.Weekdays],style:C==null?void 0:C[A.Weekdays]},S&&d.createElement(o.WeekNumberHeader,{"aria-label":Di(s.options),className:l[A.WeekNumberHeader],style:C==null?void 0:C[A.WeekNumberHeader],scope:"col"},V()),Ei.map(B=>d.createElement(o.Weekday,{"aria-label":ji(B,s.options,s),className:l[A.Weekday],key:String(B),style:C==null?void 0:C[A.Weekday],scope:"col"},R(B,s.options,s)))),d.createElement(o.Weeks,{"data-animated-weeks":t.animate?"true":void 0,className:l[A.Weeks],style:C==null?void 0:C[A.Weeks]},H.weeks.map(B=>d.createElement(o.Week,{className:l[A.Week],key:B.weekNumber,style:C==null?void 0:C[A.Week],week:B},S&&d.createElement(o.WeekNumber,{week:B,style:C==null?void 0:C[A.WeekNumber],"aria-label":Ti(B.weekNumber,{locale:a}),className:l[A.WeekNumber],scope:"row",role:"rowheader"},W(B.weekNumber,s)),B.days.map(X=>{const{date:fe}=X,U=it(X);if(U[Q.focused]=!U.hidden&&!!(Gt!=null&&Gt.isEqualTo(X)),U[Ee.selected]=(vt==null?void 0:vt(fe))||U.selected,Dn(Vt)){const{from:yo,to:ko}=Vt;U[Ee.range_start]=!!(yo&&ko&&s.isSameDay(fe,yo)),U[Ee.range_end]=!!(yo&&ko&&s.isSameDay(fe,ko)),U[Ee.range_middle]=Ve(Vt,fe,!0,s)}const Hi=Rb(U,C,t.modifiersStyles),Vi=kb(U,l,t.modifiersClassNames),Gi=!On&&!U.hidden?vi(fe,U,s.options,s):void 0;return d.createElement(o.Day,{key:`${s.format(fe,"yyyy-MM-dd")}_${s.format(X.displayMonth,"yyyy-MM")}`,day:X,modifiers:U,className:Vi.join(" "),style:Hi,role:"gridcell","aria-selected":U.selected||void 0,"aria-label":Gi,"data-day":s.format(fe,"yyyy-MM-dd"),"data-month":X.outside?s.format(fe,"yyyy-MM"):void 0,"data-selected":U.selected||void 0,"data-disabled":U.disabled||void 0,"data-hidden":U.hidden||void 0,"data-outside":X.outside||void 0,"data-focused":U.focused||void 0,"data-today":U.today||void 0},!U.hidden&&On?d.createElement(o.DayButton,{className:l[A.DayButton],style:C==null?void 0:C[A.DayButton],type:"button",day:X,modifiers:U,disabled:U.disabled||void 0,tabIndex:yi(X)?0:-1,"aria-label":ki(fe,U,s.options,s),onClick:zi(X,U),onBlur:Ii(X,U),onFocus:Oi(X,U),onKeyDown:Ri(X,U),onMouseEnter:Ni(X,U),onMouseLeave:Fi(X,U)},j(fe,s.options,s)):!U.hidden&&j(X.date,s.options,s))})))))))),t.footer&&d.createElement(o.Footer,{className:l[A.Footer],style:C==null?void 0:C[A.Footer],role:"status","aria-live":"polite"},t.footer)))}const yx=d.memo(({...e})=>i.jsx(kx,{mode:"single",...e})),kx=g(xx)`
|
|
2913
2918
|
font-family: ${c("font-family-default")};
|
|
2914
|
-
`,
|
|
2919
|
+
`,vx=({rightMenu:e,leftMenu:t,className:o})=>i.jsxs(wx,{className:o,children:[t,i.jsx(Cx,{children:e})]}),wx=g.div`
|
|
2915
2920
|
align-items: center;
|
|
2916
2921
|
background-color: ${c("color-black")};
|
|
2917
2922
|
display: flex;
|
|
@@ -2920,10 +2925,10 @@
|
|
|
2920
2925
|
justify-content: space-between;
|
|
2921
2926
|
padding: 0px ${c("spacing-20")};
|
|
2922
2927
|
width: 100%;
|
|
2923
|
-
`,
|
|
2928
|
+
`,Cx=g.div`
|
|
2924
2929
|
display: flex;
|
|
2925
2930
|
align-items: center;
|
|
2926
|
-
|
|
2931
|
+
`,$x=d.memo(({title:e,message:t})=>i.jsxs(Sx,{children:[i.jsx(E,{variant:"body",bold:!0,children:e}),i.jsx(E,{variant:"body",color:"grey",children:t})]})),Sx=g.div`
|
|
2927
2932
|
display: flex;
|
|
2928
2933
|
padding: ${c("spacing-8")} ${c("spacing-10")}
|
|
2929
2934
|
${c("spacing-8")} ${c("spacing-20")};
|
|
@@ -2934,7 +2939,7 @@
|
|
|
2934
2939
|
max-width: 100%;
|
|
2935
2940
|
word-wrap: break-word;
|
|
2936
2941
|
overflow-wrap: break-word;
|
|
2937
|
-
`,
|
|
2942
|
+
`,jx=({groups:e,onSelectionChange:t,value:o,showSelectAll:n=!0,showClearAll:r=!0,placement:s="bottom-end",className:a,buttonContent:l,disabled:u=!1})=>{const[f,p]=d.useState(()=>{const N={};return e.forEach(q=>{N[q.id]=new Set}),N}),[h,m]=d.useState(!1),x=o??f,b=o!==void 0,y=d.useCallback(N=>{b||p(N),t(N)},[b,t]),{refs:k,floatingStyles:w,context:$}=z.useFloating({placement:s,open:h,onOpenChange:m,whileElementsMounted:z.autoUpdate,middleware:[z.offset(4),z.flip(),z.shift({padding:8})]}),v=z.useClick($,{enabled:!u}),S=z.useDismiss($),C=z.useRole($),{getReferenceProps:T,getFloatingProps:j}=z.useInteractions([v,S,C]),D=d.useCallback((N,q)=>{const oe={...x},te=new Set(x[N]);te.has(q)?te.delete(q):te.add(q),oe[N]=te,y(oe)},[x,y]),W=d.useCallback(N=>{const q=e.find(te=>te.id===N);if(!q)return;const oe={...x};oe[N]=new Set(q.options.map(te=>te.value)),y(oe)},[e,x,y]),V=d.useCallback(()=>{const N={};e.forEach(q=>{N[q.id]=new Set}),y(N)},[e,y]),R=d.useMemo(()=>Object.values(x).some(N=>N.size>0),[x]);return i.jsxs(i.Fragment,{children:[i.jsx(Tx,{ref:k.setReference,className:a,$isActive:R,$isDisabled:u,...T(),children:l||i.jsxs(i.Fragment,{children:[i.jsx(_,{iconId:"Filter",size:"sm",color:R?"blue":"grey"}),R&&i.jsx(Dx,{})]})}),h&&i.jsx(z.FloatingPortal,{children:i.jsx(z.FloatingFocusManager,{context:$,modal:!1,children:i.jsxs(Mx,{ref:k.setFloating,style:w,...j(),children:[i.jsxs(Ex,{children:[i.jsx(E,{variant:"body",bold:!0,children:"Filters"}),i.jsxs(zx,{children:[r&&R&&i.jsx(Ox,{onClick:V,children:i.jsx(E,{variant:"small",color:"blue",children:"Clear all"})}),i.jsx(Ix,{onClick:()=>m(!1),children:i.jsx(_,{iconId:"Close",size:"sm",color:"grey"})})]})]}),i.jsx(Rx,{children:e.map(N=>i.jsxs(Nx,{children:[i.jsxs(Fx,{children:[i.jsx(E,{variant:"small",bold:!0,children:N.label}),n&&i.jsx(Ax,{onClick:()=>W(N.id),children:i.jsx(E,{variant:"small",color:"blue",children:"Select all"})})]}),i.jsx(_x,{children:N.options.map(q=>{var te;const oe=((te=x[N.id])==null?void 0:te.has(q.value))||!1;return i.jsxs(Lx,{$isSelected:oe,onClick:()=>D(N.id,q.value),children:[i.jsx(Wx,{$isChecked:oe,children:oe&&i.jsx(_,{iconId:"Check",size:"xsm",color:"white"})}),i.jsx(E,{variant:"small",children:q.label})]},q.value)})})]},N.id))})]})})})]})},Tx=g.button`
|
|
2938
2943
|
display: flex;
|
|
2939
2944
|
align-items: center;
|
|
2940
2945
|
justify-content: center;
|
|
@@ -2953,7 +2958,7 @@
|
|
|
2953
2958
|
background-color: ${e=>e.$isActive?c("color-additional1"):c("color-grey10")};
|
|
2954
2959
|
border-color: ${e=>e.$isActive?c("color-blue"):c("color-grey40")};
|
|
2955
2960
|
}
|
|
2956
|
-
`,
|
|
2961
|
+
`,Dx=g.div`
|
|
2957
2962
|
position: absolute;
|
|
2958
2963
|
top: 4px;
|
|
2959
2964
|
right: 4px;
|
|
@@ -2961,7 +2966,7 @@
|
|
|
2961
2966
|
height: 6px;
|
|
2962
2967
|
background-color: ${c("color-blue")};
|
|
2963
2968
|
border-radius: 50%;
|
|
2964
|
-
`,
|
|
2969
|
+
`,Mx=g.div`
|
|
2965
2970
|
background-color: ${c("color-white")};
|
|
2966
2971
|
border: 1px solid ${c("color-grey30")};
|
|
2967
2972
|
border-radius: ${c("spacing-4")};
|
|
@@ -2969,17 +2974,17 @@
|
|
|
2969
2974
|
min-width: 280px;
|
|
2970
2975
|
max-width: 320px;
|
|
2971
2976
|
z-index: 1000;
|
|
2972
|
-
`,
|
|
2977
|
+
`,Ex=g.div`
|
|
2973
2978
|
display: flex;
|
|
2974
2979
|
align-items: center;
|
|
2975
2980
|
justify-content: space-between;
|
|
2976
2981
|
padding: ${c("spacing-12")} ${c("spacing-16")};
|
|
2977
2982
|
border-bottom: 1px solid ${c("color-grey20")};
|
|
2978
|
-
`,
|
|
2983
|
+
`,zx=g.div`
|
|
2979
2984
|
display: flex;
|
|
2980
2985
|
align-items: center;
|
|
2981
2986
|
gap: ${c("spacing-8")};
|
|
2982
|
-
`,
|
|
2987
|
+
`,Ox=g.button`
|
|
2983
2988
|
background: none;
|
|
2984
2989
|
border: none;
|
|
2985
2990
|
padding: 0;
|
|
@@ -2989,7 +2994,7 @@
|
|
|
2989
2994
|
&:hover {
|
|
2990
2995
|
text-decoration: underline;
|
|
2991
2996
|
}
|
|
2992
|
-
`,
|
|
2997
|
+
`,Ix=g.button`
|
|
2993
2998
|
background: none;
|
|
2994
2999
|
border: none;
|
|
2995
3000
|
padding: 0;
|
|
@@ -3004,20 +3009,20 @@
|
|
|
3004
3009
|
&:hover {
|
|
3005
3010
|
background-color: ${c("color-grey10")};
|
|
3006
3011
|
}
|
|
3007
|
-
`,
|
|
3012
|
+
`,Rx=g.div`
|
|
3008
3013
|
padding: ${c("spacing-12")};
|
|
3009
3014
|
max-height: 400px;
|
|
3010
3015
|
overflow-y: auto;
|
|
3011
|
-
`,
|
|
3016
|
+
`,Nx=g.div`
|
|
3012
3017
|
&:not(:last-child) {
|
|
3013
3018
|
margin-bottom: ${c("spacing-16")};
|
|
3014
3019
|
}
|
|
3015
|
-
`,
|
|
3020
|
+
`,Fx=g.div`
|
|
3016
3021
|
display: flex;
|
|
3017
3022
|
align-items: center;
|
|
3018
3023
|
justify-content: space-between;
|
|
3019
3024
|
margin-bottom: ${c("spacing-8")};
|
|
3020
|
-
`,
|
|
3025
|
+
`,Ax=g.button`
|
|
3021
3026
|
background: none;
|
|
3022
3027
|
border: none;
|
|
3023
3028
|
padding: 0;
|
|
@@ -3027,11 +3032,11 @@
|
|
|
3027
3032
|
&:hover {
|
|
3028
3033
|
text-decoration: underline;
|
|
3029
3034
|
}
|
|
3030
|
-
`,
|
|
3035
|
+
`,_x=g.div`
|
|
3031
3036
|
display: flex;
|
|
3032
3037
|
flex-direction: column;
|
|
3033
3038
|
gap: ${c("spacing-4")};
|
|
3034
|
-
`,
|
|
3039
|
+
`,Lx=g.div`
|
|
3035
3040
|
display: flex;
|
|
3036
3041
|
align-items: center;
|
|
3037
3042
|
gap: ${c("spacing-8")};
|
|
@@ -3043,7 +3048,7 @@
|
|
|
3043
3048
|
&:hover {
|
|
3044
3049
|
background-color: ${e=>e.$isSelected?c("color-additional1"):c("color-grey10")};
|
|
3045
3050
|
}
|
|
3046
|
-
`,
|
|
3051
|
+
`,Wx=g.div`
|
|
3047
3052
|
width: 16px;
|
|
3048
3053
|
height: 16px;
|
|
3049
3054
|
border: 1.5px solid
|
|
@@ -3054,7 +3059,7 @@
|
|
|
3054
3059
|
align-items: center;
|
|
3055
3060
|
justify-content: center;
|
|
3056
3061
|
flex-shrink: 0;
|
|
3057
|
-
`,
|
|
3062
|
+
`,Bx=d.memo(({listMaxSize:e,listMinSize:t,listCollapsedSize:o,disabled:n,List:r,Details:s,ListPanelComponent:a=an})=>i.jsx(Px,{style:{"--studio-c-table-cell-padding-y":c("spacing-8")},children:i.jsxs(Zr,{direction:"horizontal",children:[i.jsx(a,{minSize:t,maxSize:e,collapsedSize:o,children:i.jsx(xi,{children:i.jsx(r,{disabled:n})})}),i.jsx(Qr,{}),i.jsx(Xr,{children:i.jsx(Hx,{children:i.jsx(s,{})})})]})})),Px=g.div`
|
|
3058
3063
|
width: 100%;
|
|
3059
3064
|
height: 100%;
|
|
3060
3065
|
display: flex;
|
|
@@ -3067,7 +3072,7 @@
|
|
|
3067
3072
|
align-items: flex-start;
|
|
3068
3073
|
justify-content: flex-start;
|
|
3069
3074
|
flex-direction: column;
|
|
3070
|
-
`,
|
|
3075
|
+
`,Hx=g(xi)`
|
|
3071
3076
|
overflow: auto;
|
|
3072
|
-
`;let Ko=null;const
|
|
3077
|
+
`;let Ko=null;const Vx=()=>Ko,Gx=({ref:e,data:t,canDrag:o=!0,transformDragData:n=f=>f,onDrop:r,onDragStart:s,onDragEnd:a,onDragOver:l,onDragLeave:u})=>{const[f,p]=d.useState(!1),[h,m]=d.useState(!1),x=v=>{v.preventDefault(),v.stopPropagation()},b=d.useCallback(v=>{x(v),m(!0),v.dataTransfer&&(v.dataTransfer.dropEffect="move"),l==null||l(v)},[l]),y=d.useCallback(v=>{x(v),m(!1),u==null||u(v)},[u]),k=d.useCallback(v=>{x(v),p(!1),m(!1),Ko=null,a==null||a(v)},[a]),w=d.useCallback(v=>{var C;x(v),p(!1),m(!1);let S=null;try{S=JSON.parse(((C=v.dataTransfer)==null?void 0:C.getData("application/json"))??"null")}catch(T){console.error("Invalid drag data:",T)}S&&(r==null||r(S,v))},[r]),$=d.useCallback(v=>{var C;if(!o)return;v.stopPropagation(),p(!0),m(!1),v.dataTransfer&&(v.dataTransfer.effectAllowed="move");const S=n(t);Ko=S,(C=v.dataTransfer)==null||C.setData("application/json",JSON.stringify(S)),s==null||s(t,v)},[o,t,s,n]);return d.useEffect(()=>{const v=e.current,S={dragover:C=>b(C),dragenter:C=>b(C),dragleave:C=>y(C),drop:C=>w(C),dragstart:C=>$(C),dragend:C=>k(C)};return v&&Object.entries(S).forEach(([C,T])=>v.addEventListener(C,T)),()=>{Object.entries(S).forEach(([C,T])=>{v&&v.removeEventListener(C,T)})}},[e,b,y,w,$,k]),{dragging:f,over:h}};Object.defineProperty(exports,"useFormContext",{enumerable:!0,get:()=>K.useFormContext});Object.defineProperty(exports,"useFormController",{enumerable:!0,get:()=>K.useController});Object.defineProperty(exports,"useWatchForm",{enumerable:!0,get:()=>K.useWatch});Object.defineProperty(exports,"renderTableContents",{enumerable:!0,get:()=>be.flexRender});exports.ActionSelect=Vd;exports.ActionableBlurb=wl;exports.AlertTooltip=pn;exports.AlternatingStatus=Gl;exports.AnimatePresence=jr;exports.AnonymousBranch=Tp;exports.AnonymousGroup=op;exports.ArtifactVersion=Nu;exports.AsyncNamedCollapsibleBranch=Mp;exports.AsyncTreeList=Ls;exports.Badge=cu;exports.BaseAsyncTreeDataProvider=Zf;exports.BaseModalContent=Zp;exports.BaseObservableDataProvider=kn;exports.BaseUIComponentsContextProvider=yl;exports.BottomDialogDrawer=Dc;exports.BottomInlineDrawer=Rc;exports.BrandedHeader=Cg;exports.Button=Ae;exports.CheckBox=bt;exports.CheckListItemCheck=uo;exports.CheckListItemCheckCompact=zs;exports.CheckListItemContainer=Bt;exports.CheckListItemContainerCompact=$n;exports.CheckListItemContainerWithDivider=Ms;exports.CheckListItemContainerWithDividerCompact=Es;exports.CheckListItemName=fo;exports.CheckListItemNameCompact=Os;exports.CheckListItemTemplate=Is;exports.Collapsible=to;exports.CollapsibleArtifact=Il;exports.CollapsibleContent=oo;exports.CollapsibleList=Bu;exports.CollapsibleTrigger=Jo;exports.ComboBox=bs;exports.CopyableText=lc;exports.DarkTooltip=lo;exports.DarkTooltipStyle=ls;exports.DatePicker=yx;exports.DescriptionListItemTemplate=cp;exports.Dialog=Qo;exports.DialogContent=tn;exports.DialogTrigger=en;exports.Drawer=Fc;exports.DrawerContent=_c;exports.DrawerHeader=Lc;exports.DrawerTrigger=Ac;exports.Dropdown=Cs;exports.DropdownMenu=Zh;exports.EMAIL_PATTERN=Wr;exports.EmailRequirementKeys=Pr;exports.EmptyListMessage=$x;exports.EndOverlayStyle=mc;exports.ErrorTooltip=ds;exports.FIRST_CHAR_ALPHA=nd;exports.FakeInputReference=xs;exports.FilterPanel=jx;exports.FlexHandle=_t;exports.FlexResizablePanel=Xr;exports.Form=ys;exports.FormAccessToggles=Of;exports.FormCheckbox=Mf;exports.FormComboBox=Ff;exports.FormErrorMessage=Le;exports.FormField=Tf;exports.FormFileInput=Lf;exports.FormInput=bn;exports.FormInputWrapper=We;exports.FormLabel=ke;exports.FormMultiSelect=Vf;exports.FormNameInput=Nf;exports.FormSelect=$f;exports.FormSubmit=mn;exports.FormTextArea=kf;exports.FormToggle=bf;exports.GroupContext=Cn;exports.GroupList=ep;exports.GroupedObservableDataProvider=Kf;exports.HiddenFormInput=gn;exports.HolderListItemTemplate=rg;exports.HorizontalRule=Bc;exports.Icon=_;exports.IconButton=ne;exports.Input=xt;exports.InputSearch=Uc;exports.ItemSelectionList=Gh;exports.ItemSelectionListDataProvider=Kh;exports.KOSLogo=Ru;exports.Label=Lr;exports.LabelWithAction=Zc;exports.LabelWithContent=rn;exports.LabelWithContentLink=Qc;exports.LeftDialogDrawer=vc;exports.LeftInlineDrawer=zc;exports.LightTooltip=ao;exports.LightTooltipStyle=is;exports.Link=Xo;exports.List=wn;exports.ListContext=xn;exports.ListContextProvider=yn;exports.ListWithDetailsLayout=Bx;exports.LockedButton=El;exports.MenuWrapper=vx;exports.MiddleTruncateText=no;exports.Modal=fh;exports.ModalOverlayStyles=Gs;exports.ModalTrigger=ph;exports.MultiSelect=ms;exports.NO_LEADING_OR_TRAILING_SPACES_PATTERN=Br;exports.NO_SPACES_PATTERN=od;exports.NUMBERS_ONLY_PATTERN=td;exports.NamedCollapsibleBranch=Bp;exports.NamedCollapsibleGroup=tp;exports.NamedListItemTemplate=dp;exports.NamedSection=Ys;exports.NamedSectionHeader=xh;exports.ObservableDataProvider=vn;exports.Option=ft;exports.PASSWORD_MIN_LENGTH=sd;exports.PASSWORD_REQUIREMENTS=hn;exports.PASSWORD_REQUIREMENTS_TOO_SIMILAR=vs;exports.PageHeader=$h;exports.PaneSplitter=md;exports.PasswordRequirementKeys=Et;exports.PasswordRequirementsList=pf;exports.PropertyDataProvider=qf;exports.RequirementsList=ks;exports.ResizablePanel=an;exports.ResizablePanelGroup=Zr;exports.ResizablePanelGroupContextProvider=qr;exports.ResizablePanelHandle=Qr;exports.RightDialogDrawer=$c;exports.RightInlineDrawer=Oc;exports.ScreenOverlay=es;exports.ScreenOverlayWithAction=nm;exports.Select=yt;exports.SelectAsyncTreeList=jp;exports.SelectContext=dn;exports.SelectList=co;exports.SelectListContext=Wt;exports.SelectSeparator=Qh;exports.SelectViewList=Fh;exports.SelectViewListItem=qs;exports.SelectorTooltip=us;exports.ShellIconButton=qd;exports.ShellMenu=eg;exports.ShellMenuLink=og;exports.StartOverlayStyle=gc;exports.StickyObserver=Vo;exports.StyledSelectOption=Xh;exports.Tab=Zd;exports.TabPane=ou;exports.TabTrigger=Xd;exports.TabTriggerList=Qd;exports.Table=Dg;exports.TableHeader=Uo;exports.TableNamedListItemTemplate=bp;exports.TableTd=Tn;exports.Tag=eo;exports.TagWithRemove=au;exports.Text=E;exports.TextHighlight=lu;exports.Textarea=fn;exports.Toggle=io;exports.ToggleThumb=rs;exports.ToggleTrack=ns;exports.Tooltip=fs;exports.TopDialogDrawer=Tc;exports.TopInlineDrawer=Ic;exports.TreeDataProvider=vp;exports.TreeList=$p;exports.USERNAME_PATTERN=ed;exports.VirtualList=Ws;exports.VirtualTable=Zg;exports.VirtualizedList=Bs;exports.VirtualizedSelectList=qp;exports.baseComponentStyles=hr;exports.baseGenericStyles=No;exports.baseSemanticStyles=Fo;exports.componentStudioTokenCss=nl;exports.componentStyles=Ro;exports.createLocalComponentHelper=Qa;exports.createLocalComponentTokenCss=el;exports.createLocalTokenSystem=Ja;exports.createTableColumnHelper=Ng;exports.darkTooltipArrow=cs;exports.getByteString=zh;exports.getComponentTokenHelpers=O;exports.getCurrentDragData=Vx;exports.getEmailValidation=rd;exports.getErrorMessage=ad;exports.getGlobalToken=F;exports.getPasswordValidation=id;exports.getSemanticToken=c;exports.getStyles=ll;exports.globalStudioTokenCss=ol;exports.isContextAware=Ho;exports.isErrorWithMessage=Hr;exports.isGroupFactory=js;exports.keyResolver=Ss;exports.lightTooltipArrow=as;exports.noop=_e;exports.normalizePathDisplay=Oh;exports.rootStyles=Ao;exports.scrollbarStyle=fl;exports.semanticStudioTokenCss=tl;exports.stringComponentInsert=pr;exports.studioColors=gr;exports.studioDarkColors=br;exports.studioGenericColor=xr;exports.studioLightColors=mr;exports.studioTheme=pl;exports.transformLocalTokenObject=qo;exports.useBaseUIComponentsContext=vr;exports.useCollapsibleContext=At;exports.useContainerWidth=nn;exports.useDialogContext=Ye;exports.useDialogContextValue=Tr;exports.useDragDrop=Gx;exports.useDrawerContext=Qe;exports.useGroupSelection=yp;exports.useListContext=Gf;exports.useListGroupContext=Ts;exports.useLoadDataProvider=Lt;exports.useModalContext=Ye;exports.useMultiSelectContext=hs;exports.useOpenedGroups=xp;exports.useResizablePanelGroupContext=sn;exports.useResizeObserver=Vr;exports.useSelectContext=un;exports.useSelectListContext=et;exports.useSelection=kp;exports.useTabContext=so;exports.useTableContext=jn;exports.useTreeListContext=Ns;
|
|
3073
3078
|
//# sourceMappingURL=index.cjs.map
|