@tap-payments/os-micro-frontend-shared 0.3.303 → 0.3.304

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.
Files changed (142) hide show
  1. package/build/_chunks/{chunk-PEOYN7GO.js → chunk-2CKUGHE2.js} +1 -1
  2. package/build/_chunks/{chunk-IM4LTXAH.js → chunk-2EZIQKEM.js} +1 -1
  3. package/build/_chunks/{chunk-P4S7PQWK.js → chunk-36VZZ5EB.js} +1 -1
  4. package/build/_chunks/{chunk-7S2LHLZC.js → chunk-3S5EXDTX.js} +1 -1
  5. package/build/_chunks/{chunk-4NHNAJKD.js → chunk-55225K5C.js} +1 -1
  6. package/build/_chunks/{chunk-6LO7PI3V.js → chunk-5YGD7JMH.js} +1 -1
  7. package/build/_chunks/{chunk-QLASTW76.js → chunk-5ZRFLG6Y.js} +1 -1
  8. package/build/_chunks/{chunk-HXJSH3G2.js → chunk-6UG2XBA6.js} +1 -1
  9. package/build/_chunks/{chunk-DOK4RXSY.js → chunk-774JTTY4.js} +1 -1
  10. package/build/_chunks/{chunk-WXWRA4VU.js → chunk-77AHJF7T.js} +1 -1
  11. package/build/_chunks/{chunk-F537SQRQ.js → chunk-7LPJQYOB.js} +1 -1
  12. package/build/_chunks/{chunk-VBGXGFX5.js → chunk-7WBXW5Q3.js} +1 -1
  13. package/build/_chunks/{chunk-WE7OB4CG.js → chunk-AA74HALP.js} +1 -1
  14. package/build/_chunks/{chunk-VRGBJY4Q.js → chunk-ASZPO74G.js} +2 -2
  15. package/build/_chunks/{chunk-RXCJF7BB.js → chunk-BMQXBC22.js} +1 -1
  16. package/build/_chunks/{chunk-L2GLBT5H.js → chunk-BVEGSDO5.js} +1 -1
  17. package/build/_chunks/{chunk-BM6CKUSS.js → chunk-CALJPNIH.js} +1 -1
  18. package/build/_chunks/{chunk-SXXIPX35.js → chunk-CHYRCXUW.js} +1 -1
  19. package/build/_chunks/{chunk-4IQ3J4LF.js → chunk-CQ5DDXNH.js} +1 -1
  20. package/build/_chunks/{chunk-VYVRCIYJ.js → chunk-CQKZVRBJ.js} +1 -1
  21. package/build/_chunks/{chunk-25PY6EQI.js → chunk-D54XVTCB.js} +1 -1
  22. package/build/_chunks/{chunk-NR5II44J.js → chunk-D7362WJB.js} +1 -1
  23. package/build/_chunks/{chunk-JY4U45C5.js → chunk-D7EP7AJW.js} +1 -1
  24. package/build/_chunks/{chunk-BFBJOTG2.js → chunk-EKTZ6Q4P.js} +1 -1
  25. package/build/_chunks/{chunk-DFN7XD7P.js → chunk-F7OBXENW.js} +1 -1
  26. package/build/_chunks/{chunk-CFZR2VK2.js → chunk-HFZZP3SE.js} +1 -1
  27. package/build/_chunks/{chunk-IHXFOGTQ.js → chunk-HHI47DWR.js} +1 -1
  28. package/build/_chunks/{chunk-6ZPNLCMN.js → chunk-HR4BT24K.js} +1 -1
  29. package/build/_chunks/{chunk-HIGHKQAD.js → chunk-I33G4TM7.js} +1 -1
  30. package/build/_chunks/{chunk-WYH4IUDI.js → chunk-IFG5ESIX.js} +1 -1
  31. package/build/_chunks/{chunk-26OK5BYP.js → chunk-IT5SCXJU.js} +1 -1
  32. package/build/_chunks/{chunk-TZZV6XFT.js → chunk-IUXW2N5T.js} +1 -1
  33. package/build/_chunks/{chunk-LJWTINBT.js → chunk-JYNXJIVE.js} +1 -1
  34. package/build/_chunks/{chunk-WM3AFXCW.js → chunk-K5NDIDS2.js} +1 -1
  35. package/build/_chunks/{chunk-XFEWBGH5.js → chunk-KBJFFXZH.js} +1 -1
  36. package/build/_chunks/{chunk-ZGVTCYRV.js → chunk-KD3LVJ3G.js} +1 -1
  37. package/build/_chunks/{chunk-6UMTGWFW.js → chunk-KDI46MD5.js} +1 -1
  38. package/build/_chunks/{chunk-N57Z6DIM.js → chunk-KRH6HCFC.js} +1 -1
  39. package/build/_chunks/{chunk-OHT5KJVT.js → chunk-LM7H7P3K.js} +1 -1
  40. package/build/_chunks/{chunk-GFEQDSYL.js → chunk-LOAX7R5C.js} +1 -1
  41. package/build/_chunks/{chunk-UF4J7JEY.js → chunk-M27LLU5M.js} +1 -1
  42. package/build/_chunks/{chunk-JSTCL624.js → chunk-M6J56JSE.js} +1 -1
  43. package/build/_chunks/{chunk-OBELDQWE.js → chunk-MSX235Y5.js} +1 -1
  44. package/build/_chunks/{chunk-SHUOO4XL.js → chunk-MTZ7W457.js} +1 -1
  45. package/build/_chunks/{chunk-VJSBADTP.js → chunk-N3W2IUZT.js} +1 -1
  46. package/build/_chunks/{chunk-THSE46VC.js → chunk-NH56G5JX.js} +1 -1
  47. package/build/_chunks/{chunk-K6633DSY.js → chunk-NQJLFBFK.js} +1 -1
  48. package/build/_chunks/{chunk-I3FJZTZ5.js → chunk-ORUY6OZP.js} +1 -1
  49. package/build/_chunks/{chunk-OJS6C6S6.js → chunk-P5AN3IJH.js} +1 -1
  50. package/build/_chunks/{chunk-GDIPXZTC.js → chunk-PVMELMUW.js} +1 -1
  51. package/build/_chunks/{chunk-AN56DE5R.js → chunk-QHGVMOCN.js} +1 -1
  52. package/build/_chunks/{chunk-76GQ37UR.js → chunk-QMS5RPGY.js} +1 -1
  53. package/build/_chunks/{chunk-LZKPVI6B.js → chunk-R3JWOWGR.js} +1 -1
  54. package/build/_chunks/{chunk-W77B5KVI.js → chunk-REM2S7IJ.js} +1 -1
  55. package/build/_chunks/{chunk-NOLYKMU3.js → chunk-RK62D52W.js} +1 -1
  56. package/build/_chunks/{chunk-53X3U5WT.js → chunk-RKLFUVFU.js} +1 -1
  57. package/build/_chunks/{chunk-5OC2QXZL.js → chunk-RYRN5KCF.js} +1 -1
  58. package/build/_chunks/{chunk-4EOSR5FI.js → chunk-SZ2NN5ZU.js} +1 -1
  59. package/build/_chunks/{chunk-RL2HFGDQ.js → chunk-T6YRJOHS.js} +1 -1
  60. package/build/_chunks/{chunk-S3EORDGB.js → chunk-UT4J5TOZ.js} +1 -1
  61. package/build/_chunks/{chunk-RD4DGYOQ.js → chunk-V3NXFJEQ.js} +1 -1
  62. package/build/_chunks/{chunk-PNLHCTCW.js → chunk-VC62IVBT.js} +1 -1
  63. package/build/_chunks/{chunk-57D57K75.js → chunk-VMB2PTMO.js} +1 -1
  64. package/build/_chunks/{chunk-MMXWSV6V.js → chunk-WCH7VAS5.js} +1 -1
  65. package/build/_chunks/{chunk-PPO3PSE7.js → chunk-XXIL5GPD.js} +1 -1
  66. package/build/_chunks/{chunk-LVK5VG43.js → chunk-YFMZVIBE.js} +1 -1
  67. package/build/components/ActionsDropdownMenu/index.js +1 -1
  68. package/build/components/Alert/index.js +1 -1
  69. package/build/components/AreaChart/index.js +1 -1
  70. package/build/components/Autocomplete/index.js +1 -1
  71. package/build/components/AvatarStack/index.js +1 -1
  72. package/build/components/Calender/index.js +1 -1
  73. package/build/components/Card/index.js +1 -1
  74. package/build/components/CardList/index.js +1 -1
  75. package/build/components/ColorPicker/index.js +1 -1
  76. package/build/components/ColumnViews/index.js +1 -1
  77. package/build/components/ConfirmDialog/index.js +1 -1
  78. package/build/components/CountryFlag/index.js +1 -1
  79. package/build/components/CurrenciesMenu/index.js +1 -1
  80. package/build/components/CurrencyAmount/index.js +1 -1
  81. package/build/components/CurrencyAmountInput/index.js +1 -1
  82. package/build/components/CurrencySymbol/index.js +1 -1
  83. package/build/components/DateFilter/index.js +1 -1
  84. package/build/components/DateInput/index.js +1 -1
  85. package/build/components/DeviceIcon/index.js +1 -1
  86. package/build/components/EmptyState/index.js +1 -1
  87. package/build/components/ErrorToast/index.js +1 -1
  88. package/build/components/ExpandableChip/index.js +1 -1
  89. package/build/components/ExportReportButton/index.js +1 -1
  90. package/build/components/FileDropbox/index.js +1 -1
  91. package/build/components/FilePreview/index.js +1 -1
  92. package/build/components/FileUploader/index.js +1 -1
  93. package/build/components/FilterBar/index.js +1 -1
  94. package/build/components/FilterButton/index.js +1 -1
  95. package/build/components/FilterChip/index.js +1 -1
  96. package/build/components/FilterPopover/index.js +1 -1
  97. package/build/components/FlipCard/index.js +1 -1
  98. package/build/components/GroupedSelect/index.js +1 -1
  99. package/build/components/HeatMap/index.js +1 -1
  100. package/build/components/ListHeader/index.js +1 -1
  101. package/build/components/Loader/index.js +1 -1
  102. package/build/components/Logo/index.js +1 -1
  103. package/build/components/MaskedText/index.js +1 -1
  104. package/build/components/MultiLevelMenu/index.js +1 -1
  105. package/build/components/MultiLevelSelect/index.js +1 -1
  106. package/build/components/PhoneInput/index.js +1 -1
  107. package/build/components/ProgressRing/index.js +1 -1
  108. package/build/components/RadioGroup/index.js +1 -1
  109. package/build/components/RangeCalender/index.js +1 -1
  110. package/build/components/RatingCount/index.js +1 -1
  111. package/build/components/SearchButton/index.js +1 -1
  112. package/build/components/SearchInput/index.js +1 -1
  113. package/build/components/Select/index.js +1 -1
  114. package/build/components/SheetViewChip/index.js +1 -1
  115. package/build/components/Sidebar/index.js +1 -1
  116. package/build/components/StatusIcons/index.js +1 -1
  117. package/build/components/TableCells/index.js +1 -1
  118. package/build/components/TableViewToggleButton/index.js +1 -1
  119. package/build/components/TextInput/index.js +1 -1
  120. package/build/components/Timeline/index.js +1 -1
  121. package/build/components/Timepicker/index.js +1 -1
  122. package/build/components/VerificationIcon/index.js +1 -1
  123. package/build/components/VirtualTables/index.js +1 -1
  124. package/build/components/Window/index.js +1 -1
  125. package/build/components/WindowServices/index.js +1 -1
  126. package/build/components/WindowToolbar/index.js +1 -1
  127. package/build/components/index.js +1 -1
  128. package/build/components/modules/JSONViewWindow/index.js +1 -1
  129. package/build/components/modules/RangeCalender/index.js +1 -1
  130. package/build/components/modules/VirtualTables/index.js +1 -1
  131. package/build/components/modules/WindowShell/index.js +1 -1
  132. package/build/components/modules/index.js +1 -1
  133. package/build/components/primitives/index.js +1 -1
  134. package/build/constants/index.d.ts +1 -0
  135. package/build/constants/index.js +1 -1
  136. package/build/constants/roles.d.ts +10 -0
  137. package/build/datetime/components/index.js +1 -1
  138. package/build/hooks/core/index.js +1 -1
  139. package/build/hooks/index.js +1 -1
  140. package/build/index.js +1 -1
  141. package/build/utils/index.js +1 -1
  142. package/package.json +1 -1
@@ -1 +1 @@
1
- import {p}from'./chunk-6ZPNLCMN.js';import {qa,Vb,ya as ya$1}from'./chunk-MMXWSV6V.js';import {Tk,ya,xa,wa,Qj}from'./chunk-VRGBJY4Q.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:qa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Tk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=Vb(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${ya$1((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Qj:Qj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
1
+ import {p}from'./chunk-HR4BT24K.js';import {qa,Vb,ya as ya$1}from'./chunk-WCH7VAS5.js';import {Tk,ya,xa,wa,Qj}from'./chunk-ASZPO74G.js';import {memo,useId}from'react';import C from'@mui/material/Box';import O from'lodash/capitalize';import {useTranslation}from'react-i18next';import {styled}from'@mui/material/styles';import {jsx}from'react/jsx-runtime';var D=styled(C,{shouldForwardProp:o=>o!=="tableMode"})(({theme:o,tableMode:t})=>({fontSize:"11px",display:"flex",alignItems:"center",justifyContent:"center",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",padding:"4px 8px",borderRadius:"24px",border:`1px solid ${o.palette.divider}`,color:o.palette.text.primary,height:qa(t)?"18px":"24px"}));var e={DESKTOP:wa,PHONE:xa,TABLET:ya,TERMINAL:Tk};var i=o=>!!e[o];function S({type:o,isTextShown:t,tableMode:T,...E}){let p$1=Vb(useId(),"device-icon"),{t:v}=useTranslation(),m=i(o)?e[o]:null;return jsx(p,{title:m?`Device - ${ya$1((o??"").toLowerCase())}`:v("unKnown"),children:t?jsx(D,{id:p$1,"data-testid":"DeviceIcon",tableMode:T,children:o?O(o):"Unknown"}):jsx(C,{...E,id:p$1,"data-testid":"DeviceIcon",component:"img",src:o?m||Qj:Qj,alt:o})})}var b=memo(S);var X=b;export{e as a,i as b,X as c};
@@ -1 +1 @@
1
- import {v}from'./chunk-6ZPNLCMN.js';import {Hb,X as X$1,Y as Y$1}from'./chunk-MMXWSV6V.js';import {Gb,Yc}from'./chunk-VRGBJY4Q.js';import {forwardRef,useState,useRef,useCallback,memo,useEffect,useMemo}from'react';import H from'@mui/material/Box';import ko from'@mui/material/ClickAwayListener';import Po from'@mui/material/Popper';import go from'@mui/material/Stack';import ro from'@mui/material/Typography';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import eo from'@mui/material/MenuItem';import {styled,alpha}from'@mui/material/styles';import K from'@mui/material/Button';import Co from'@mui/material/TextField';import ho from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import v$1 from'color';import no from'@mui/material/InputAdornment';var m="os-shared-ColorPicker",n={root:`${m}-root`,controls:`${m}-controls`,swatch:`${m}-swatch`,actions:`${m}-actions`,valueLabel:`${m}-valueLabel`,editButton:`${m}-editButton`,resetButton:`${m}-resetButton`,panel:`${m}-panel`,panelFields:`${m}-panelFields`,panelFooter:`${m}-panelFooter`,panelCancel:`${m}-panelCancel`,panelConfirm:`${m}-panelConfirm`,schemeTrigger:`${m}-schemeTrigger`,schemeList:`${m}-schemeList`,channelInput:`${m}-channelInput`},F={hideReset:false,disableAlpha:false},I={cancel:"Cancel",confirm:"Okay"},w="Edit";var V=styled(go)(({theme:o})=>({backgroundColor:o.palette.grey[400],borderRadius:"4px",padding:o.spacing(.5),paddingRight:o.spacing(1.5)})),X=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),Z=styled(H)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:o.palette.common.white,padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),j=styled(H)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),q=styled("button")(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,fontFamily:"inherit","&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none",cursor:"not-allowed"},"&:hover:not(:disabled)":{textDecoration:"none"}})),J=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),Q=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Y=styled("button",{shouldForwardProp:o=>o!=="active"})(({theme:o,active:a})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...a&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),oo=styled(ho)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),b=styled(Co)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var yo=({scheme:o,setScheme:a})=>{let[l,t]=useState(null),u=!!l,i=useCallback(c=>{t(l?null:c.currentTarget);},[l]),s=useCallback(()=>{t(null);},[]),d=useCallback(c=>{s(),a(c);},[s,a]);return jsxs(Fragment,{children:[jsxs(Y,{type:"button",active:u,onClick:i,className:n.schemeTrigger,children:[o,jsx(H,{component:"img",sx:{transform:u?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Yc,alt:""})]}),jsx(Po,{anchorEl:l,open:u,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(ko,{onClickAway:c=>{l?.contains(c.target)||s();},children:jsxs(oo,{className:n.schemeList,children:[jsx(eo,{onClick:()=>d("RGB"),children:"RGB"}),jsx(eo,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},to=yo;function B(o,a){return Number.isNaN(o)||o<0?0:o>a?a:o}var Ao=({value:o,onChange:a,disableAlpha:l=false})=>{let t=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[u,i]=useState(t),s=Math.round(o.a*100);useEffect(()=>{let e=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");i(e);},[o.r,o.g,o.b]);let d=e=>{let r=e.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();r.length>6&&(r=r.slice(0,6)),i(r);},c=()=>{let e=u;if(e.length===3&&(e=e.split("").map(r=>r+r).join(""),i(e)),e.length===6)try{let r=v$1(`#${e}`).alpha(o.a);a({r:r.red(),g:r.green(),b:r.blue(),a:r.alpha()});}catch{i(t);}else i(t);},C=e=>{let r=B(parseInt(e.target.value,10),100);a({...o,a:r/100});},f=n.channelInput;return jsxs(go,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(b,{className:f,value:u,onChange:d,onBlur:c,placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(no,{position:"start",sx:{m:0},children:jsx(ro,{component:"span",color:e=>alpha(e.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!l&&jsx(b,{className:f,type:"number",value:s,onChange:C,inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},ao=Ao;var _o=({value:o,onChange:a,disableAlpha:l=false})=>{let[t,u]=useState(o),{r:i,g:s,b:d,a:c}=t;useEffect(()=>{u(o);},[o]);let C=useCallback((r,x)=>p=>{u({...t,[r]:B(+p.target.value,x)});},[t]),f=useCallback((r,x)=>{a({...t,[r]:B(t[r],x)});},[a,t]),e=n.channelInput;return jsxs(go,{direction:"row",spacing:1,...l&&{flex:1},children:[jsx(b,{className:e,type:"number",value:i,onBlur:()=>f("r",255),onChange:C("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:s,onBlur:()=>f("g",255),onChange:C("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:d,onBlur:()=>f("b",255),onChange:C("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),!l&&jsx(b,{className:e,type:"number",value:c,onBlur:()=>f("a",100),onChange:C("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},io=_o;var zo=({initialValue:o="#ffffff",onCancel:a,onConfirm:l,disableAlpha:t=false})=>{let[u,i]=useState("RGB"),[s,d]=useState(()=>{let{alpha:p,...k}=X$1(o).value;return {...k,a:p}}),c=useCallback(()=>{let{alpha:p,...k}=X$1(o).value;d({...k,a:p}),a();},[o,a]),C=useCallback(()=>{let{a:p,...k}=s;l(Y$1({...k,alpha:t?1:p}));},[s,l,t]),f=useCallback(p=>{d(t?{...p,a:1}:p);},[t]),e=useCallback(p=>{d({...p,a:p.a/100});},[]),r=useCallback(p=>{d({...p,a:p.a});},[]),x=t?RgbColorPicker:RgbaColorPicker;return jsxs(Z,{className:n.panel,children:[jsx(x,{color:s,onChange:f}),jsxs(go,{mt:2,spacing:1,direction:"row",className:n.panelFields,children:[jsx(to,{scheme:u,setScheme:i}),u==="RGB"?jsx(io,{value:{...s,a:Math.round(s.a*100)},onChange:e,disableAlpha:t}):jsx(ao,{value:{...s,a:s.a},onChange:r,disableAlpha:t})]}),jsx(v,{sx:{my:"12px"}}),jsxs(j,{className:n.panelFooter,children:[jsx(Q,{className:n.panelCancel,onClick:c,children:I.cancel}),jsx(J,{className:n.panelConfirm,onClick:C,children:I.confirm})]})]})},po=zo;var co=forwardRef(({value:o="#ffffff",onChange:a,onReset:l,sx:t,options:u,disabled:i=false,id:s,className:d},c)=>{let[C,f]=useState(null),{disableAlpha:e,hideReset:r}={...F,...u},x=useRef(null),p=useCallback(y=>{x.current=y,typeof c=="function"?c(y):c&&(c.current=y);},[c]),k=useCallback(()=>{i||f(x.current);},[i]),mo=useCallback(()=>{i||f(null);},[i]),uo=useCallback(y=>{a(e?y.substring(0,7):y),f(null);},[a,e]);return jsx(ko,{onClickAway:()=>f(null),children:jsxs(V,{ref:p,id:s,"data-testid":s??"ColorPicker",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:Hb(n.root,d),sx:t,children:[jsxs(go,{direction:"row",spacing:1,alignItems:"center",className:n.controls,children:[jsx(H,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:n.swatch}),jsxs(H,{className:n.actions,children:[jsx(ro,{className:n.valueLabel,fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(q,{className:n.editButton,type:"button",onClick:k,disabled:i,children:w})]})]}),r?jsx("div",{}):jsx(X,{className:n.resetButton,type:"button",disabled:i,onClick:l,children:jsx(H,{component:"img",src:Gb,width:10,height:10,alt:""})}),jsx(Po,{anchorEl:C,open:!!C,placement:"top",children:jsx(po,{initialValue:o,onCancel:mo,onConfirm:uo,disableAlpha:e})})]})})});co.displayName="ColorPicker";var qo=memo(co);export{m as a,n as b,F as c,I as d,w as e,qo as f};
1
+ import {v}from'./chunk-HR4BT24K.js';import {Hb,X as X$1,Y as Y$1}from'./chunk-WCH7VAS5.js';import {Gb,Yc}from'./chunk-ASZPO74G.js';import {forwardRef,useState,useRef,useCallback,memo,useEffect,useMemo}from'react';import H from'@mui/material/Box';import ko from'@mui/material/ClickAwayListener';import Po from'@mui/material/Popper';import go from'@mui/material/Stack';import ro from'@mui/material/Typography';import {RgbColorPicker,RgbaColorPicker}from'react-colorful';import eo from'@mui/material/MenuItem';import {styled,alpha}from'@mui/material/styles';import K from'@mui/material/Button';import Co from'@mui/material/TextField';import ho from'@mui/material/MenuList';import {jsx,jsxs,Fragment}from'react/jsx-runtime';import v$1 from'color';import no from'@mui/material/InputAdornment';var m="os-shared-ColorPicker",n={root:`${m}-root`,controls:`${m}-controls`,swatch:`${m}-swatch`,actions:`${m}-actions`,valueLabel:`${m}-valueLabel`,editButton:`${m}-editButton`,resetButton:`${m}-resetButton`,panel:`${m}-panel`,panelFields:`${m}-panelFields`,panelFooter:`${m}-panelFooter`,panelCancel:`${m}-panelCancel`,panelConfirm:`${m}-panelConfirm`,schemeTrigger:`${m}-schemeTrigger`,schemeList:`${m}-schemeList`,channelInput:`${m}-channelInput`},F={hideReset:false,disableAlpha:false},I={cancel:"Cancel",confirm:"Okay"},w="Edit";var V=styled(go)(({theme:o})=>({backgroundColor:o.palette.grey[400],borderRadius:"4px",padding:o.spacing(.5),paddingRight:o.spacing(1.5)})),X=styled("button")({background:"transparent",border:"none",padding:0,margin:0,cursor:"pointer",width:10,height:10,display:"flex",justifyContent:"center",alignItems:"center","&:disabled, &.Mui-disabled":{opacity:.5,cursor:"not-allowed"}}),Z=styled(H)(({theme:o})=>({boxShadow:"0px 8px 30px rgba(0, 0, 0, 0.16)",width:264,backgroundColor:o.palette.common.white,padding:"12px",borderRadius:o.spacing(1),"& .react-colorful":{width:"100%","&__saturation":{minHeight:152,borderRadius:"4px",marginBottom:o.spacing(2),border:0,"&-pointer":{width:13,height:13}},"&__hue":{borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}},"&__alpha":{marginTop:o.spacing(2),marginBottom:0,border:0,borderRadius:"4px",height:"8px","&-pointer":{width:10,height:10}}}})),j=styled(H)(()=>({display:"flex",gap:"8px",justifyContent:"flex-end"})),q=styled("button")(({theme:o})=>({fontWeight:500,fontSize:"9px",color:o.palette.info.dark,textDecoration:"underline",cursor:"pointer",background:"transparent",border:"none",padding:0,margin:0,fontFamily:"inherit","&:disabled, &.Mui-disabled":{color:alpha(o.palette.info.dark,.5),textDecoration:"none",cursor:"not-allowed"},"&:hover:not(:disabled)":{textDecoration:"none"}})),J=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.info.dark}`,backgroundColor:o.palette.info.dark,fontWeight:700,fontSize:"11px",color:o.palette.common.white,"&:hover":{backgroundColor:o.palette.info.dark}})),Q=styled(K)(({theme:o})=>({textTransform:"capitalize",minWidth:"auto",width:74,borderRadius:"4px",border:`1px solid ${o.palette.divider}`,backgroundColor:o.palette.common.white,fontWeight:500,fontSize:"11px",color:o.palette.text.primary,"&:hover":{background:"transparent"}})),Y=styled("button",{shouldForwardProp:o=>o!=="active"})(({theme:o,active:a})=>({display:"flex",justifyContent:"space-between",alignItems:"center",color:o.palette.text.primary,border:"1px solid #F2F2F2",fontSize:12,fontWeight:500,backgroundColor:"transparent",padding:"4px 8px",borderRadius:"4px",minWidth:70,cursor:"pointer",...a&&{border:"1px solid #1F88D0",boxShadow:"0px 0px 4px 0px #1F88D080"}})),oo=styled(ho)({backgroundColor:"#ffffff",borderRadius:"4px",boxShadow:"0px 8px 30px 0px #00000029",minWidth:70,"& .MuiMenuItem-root":{fontSize:12,fontWeight:500,padding:"4px 8px"}}),b=styled(Co)(({theme:o})=>({"& .MuiOutlinedInput-root":{fontSize:"12px",fontWeight:500,borderRadius:"4px","& input":{padding:"4px","&::-webkit-outer-spin-button, &::-webkit-inner-spin-button":{WebkitAppearance:"none",margin:0},"&[type=number]":{MozAppearance:"textfield"}},"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"},"&:hover, &.Mui-focused":{"& .MuiOutlinedInput-notchedOutline":{borderColor:o.palette.divider,borderWidth:"1px"}}}}));var yo=({scheme:o,setScheme:a})=>{let[l,t]=useState(null),u=!!l,i=useCallback(c=>{t(l?null:c.currentTarget);},[l]),s=useCallback(()=>{t(null);},[]),d=useCallback(c=>{s(),a(c);},[s,a]);return jsxs(Fragment,{children:[jsxs(Y,{type:"button",active:u,onClick:i,className:n.schemeTrigger,children:[o,jsx(H,{component:"img",sx:{transform:u?"rotateZ(180deg)":"rotateZ(0)",transition:"200ms transform ease-out"},src:Yc,alt:""})]}),jsx(Po,{anchorEl:l,open:u,placement:"bottom",disablePortal:true,keepMounted:true,modifiers:[{name:"offset",options:{offset:[0,4]}}],children:jsx(ko,{onClickAway:c=>{l?.contains(c.target)||s();},children:jsxs(oo,{className:n.schemeList,children:[jsx(eo,{onClick:()=>d("RGB"),children:"RGB"}),jsx(eo,{onClick:()=>d("HEX"),children:"HEX"})]})})})]})},to=yo;function B(o,a){return Number.isNaN(o)||o<0?0:o>a?a:o}var Ao=({value:o,onChange:a,disableAlpha:l=false})=>{let t=useMemo(()=>v$1.rgb(o.r,o.g,o.b,o.a).hex().replace("#",""),[o]),[u,i]=useState(t),s=Math.round(o.a*100);useEffect(()=>{let e=v$1.rgb(o.r,o.g,o.b).hex().replace("#","");i(e);},[o.r,o.g,o.b]);let d=e=>{let r=e.target.value.replace(/[^0-9a-fA-F]/g,"").toUpperCase();r.length>6&&(r=r.slice(0,6)),i(r);},c=()=>{let e=u;if(e.length===3&&(e=e.split("").map(r=>r+r).join(""),i(e)),e.length===6)try{let r=v$1(`#${e}`).alpha(o.a);a({r:r.red(),g:r.green(),b:r.blue(),a:r.alpha()});}catch{i(t);}else i(t);},C=e=>{let r=B(parseInt(e.target.value,10),100);a({...o,a:r/100});},f=n.channelInput;return jsxs(go,{direction:"row",spacing:1,alignItems:"flex-start",children:[jsx(b,{className:f,value:u,onChange:d,onBlur:c,placeholder:"FFFFFF",sx:{flex:1.4,"& .MuiOutlinedInput-root":{pl:1}},InputProps:{startAdornment:jsx(no,{position:"start",sx:{m:0},children:jsx(ro,{component:"span",color:e=>alpha(e.palette.text.primary,.5),display:"inline-block",fontSize:12,fontWeight:500,children:"#"})})}}),!l&&jsx(b,{className:f,type:"number",value:s,onChange:C,inputProps:{min:0,max:100},sx:{flex:.8,"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",color:"text.primary",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})}})]})},ao=Ao;var _o=({value:o,onChange:a,disableAlpha:l=false})=>{let[t,u]=useState(o),{r:i,g:s,b:d,a:c}=t;useEffect(()=>{u(o);},[o]);let C=useCallback((r,x)=>p=>{u({...t,[r]:B(+p.target.value,x)});},[t]),f=useCallback((r,x)=>{a({...t,[r]:B(t[r],x)});},[a,t]),e=n.channelInput;return jsxs(go,{direction:"row",spacing:1,...l&&{flex:1},children:[jsx(b,{className:e,type:"number",value:i,onBlur:()=>f("r",255),onChange:C("r",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:s,onBlur:()=>f("g",255),onChange:C("g",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),jsx(b,{className:e,type:"number",value:d,onBlur:()=>f("b",255),onChange:C("b",255),inputProps:{min:0,max:255,style:{textAlign:"center"}},variant:"outlined",size:"small",...l&&{sx:{flex:1}}}),!l&&jsx(b,{className:e,type:"number",value:c,onBlur:()=>f("a",100),onChange:C("a",100),inputProps:{min:0,max:100,style:{textAlign:"center"}},variant:"outlined",sx:{"& .MuiOutlinedInput-root":{pr:1}},InputProps:{endAdornment:jsx(no,{position:"end",sx:{m:0},children:jsx(ro,{component:"span",display:"inline-block",fontSize:12,fontWeight:500,children:"%"})})},size:"small"})]})},io=_o;var zo=({initialValue:o="#ffffff",onCancel:a,onConfirm:l,disableAlpha:t=false})=>{let[u,i]=useState("RGB"),[s,d]=useState(()=>{let{alpha:p,...k}=X$1(o).value;return {...k,a:p}}),c=useCallback(()=>{let{alpha:p,...k}=X$1(o).value;d({...k,a:p}),a();},[o,a]),C=useCallback(()=>{let{a:p,...k}=s;l(Y$1({...k,alpha:t?1:p}));},[s,l,t]),f=useCallback(p=>{d(t?{...p,a:1}:p);},[t]),e=useCallback(p=>{d({...p,a:p.a/100});},[]),r=useCallback(p=>{d({...p,a:p.a});},[]),x=t?RgbColorPicker:RgbaColorPicker;return jsxs(Z,{className:n.panel,children:[jsx(x,{color:s,onChange:f}),jsxs(go,{mt:2,spacing:1,direction:"row",className:n.panelFields,children:[jsx(to,{scheme:u,setScheme:i}),u==="RGB"?jsx(io,{value:{...s,a:Math.round(s.a*100)},onChange:e,disableAlpha:t}):jsx(ao,{value:{...s,a:s.a},onChange:r,disableAlpha:t})]}),jsx(v,{sx:{my:"12px"}}),jsxs(j,{className:n.panelFooter,children:[jsx(Q,{className:n.panelCancel,onClick:c,children:I.cancel}),jsx(J,{className:n.panelConfirm,onClick:C,children:I.confirm})]})]})},po=zo;var co=forwardRef(({value:o="#ffffff",onChange:a,onReset:l,sx:t,options:u,disabled:i=false,id:s,className:d},c)=>{let[C,f]=useState(null),{disableAlpha:e,hideReset:r}={...F,...u},x=useRef(null),p=useCallback(y=>{x.current=y,typeof c=="function"?c(y):c&&(c.current=y);},[c]),k=useCallback(()=>{i||f(x.current);},[i]),mo=useCallback(()=>{i||f(null);},[i]),uo=useCallback(y=>{a(e?y.substring(0,7):y),f(null);},[a,e]);return jsx(ko,{onClickAway:()=>f(null),children:jsxs(V,{ref:p,id:s,"data-testid":s??"ColorPicker",direction:"row",justifyContent:"space-between",spacing:1,alignItems:"center",className:Hb(n.root,d),sx:t,children:[jsxs(go,{direction:"row",spacing:1,alignItems:"center",className:n.controls,children:[jsx(H,{borderRadius:"5px",width:32,height:32,sx:{backgroundColor:o},className:n.swatch}),jsxs(H,{className:n.actions,children:[jsx(ro,{className:n.valueLabel,fontWeight:500,fontSize:9,color:"text.primary",textTransform:"uppercase",children:o}),jsx(q,{className:n.editButton,type:"button",onClick:k,disabled:i,children:w})]})]}),r?jsx("div",{}):jsx(X,{className:n.resetButton,type:"button",disabled:i,onClick:l,children:jsx(H,{component:"img",src:Gb,width:10,height:10,alt:""})}),jsx(Po,{anchorEl:C,open:!!C,placement:"top",children:jsx(po,{initialValue:o,onCancel:mo,onConfirm:uo,disableAlpha:e})})]})})});co.displayName="ColorPicker";var qo=memo(co);export{m as a,n as b,F as c,I as d,w as e,qo as f};
@@ -1 +1 @@
1
- import {c,b,k,j,a,d,e,f,g,i}from'./chunk-ISC5KT5E.js';import {a as a$1}from'./chunk-VJSBADTP.js';import {T as T$1,Hb,Gb}from'./chunk-MMXWSV6V.js';import'./chunk-VRGBJY4Q.js';import {createContext,forwardRef,useRef,useContext,useMemo,useState,useLayoutEffect,useCallback,memo,Children,isValidElement,useEffect}from'react';import {createPortal}from'react-dom';import {Resizable}from're-resizable';import mt from'react-draggable';import oe from'@mui/material/Box';import {styled,Dialog}from'@mui/material';import {jsx}from'react/jsx-runtime';var it={isExpanded:false,setExpanded:()=>{},toggle:()=>{}},ot={isExpanded:false,setExpanded:()=>{},toggle:()=>{}},O=createContext({isOpen:true,onClose:()=>{},position:{x:0,y:0},setPosition:()=>{},size:{width:0,height:0},setSize:()=>{},defaultSize:{width:b,height:c},minSize:void 0,maxSize:void 0,container:{width:0,height:0},viewport:{width:0,height:0},isMaximized:false,setIsMaximized:()=>{},isResized:false,setIsResized:()=>{},isResizing:false,setIsResizing:()=>{},containerRef:{current:null},resizableRef:{current:null},zIndex:10,sidebar:it,panel:ot});function nt(){return useContext(O)}var Ee=styled(Dialog,{shouldForwardProp:e=>e!=="$zIndex"&&e!=="$isMinimized"&&e!=="$isBodyContainer"&&e!=="$isMaximized"&&e!=="$isSafari"&&e!=="$windowWidth"&&e!=="$defaultHeight"})(({$zIndex:e,$isMinimized:o=false,$isBodyContainer:t=false,$isMaximized:i=false,$isSafari:n=false,$windowWidth:a,$defaultHeight:r})=>({backgroundColor:"transparent",pointerEvents:"none",zIndex:e,...o&&{display:"none"},...!t&&!i&&{position:"absolute"},...!i&&{width:n?a:"fit-content",height:n?r:"fit-content"},...i&&{transform:"none !important"},overflow:"visible","& .MuiDialog-container":{overflow:"visible"}}));function Fe({isMaximized:e,isResized:o,currentWindowWidth:t,maxWidth:i,maxHeight:n,minWidth:a,minHeight:r}){return {margin:0,maxHeight:n??"100%",maxWidth:i??"none",...a!=null&&{minWidth:a},...r!=null&&{minHeight:r},background:"transparent",backdropFilter:"blur(32px)",borderRadius:"12px",pointerEvents:"auto",width:o?"fit-content":t,height:o?"fit-content":"100%",...e&&{width:"100%",height:"100%"},position:"relative"}}function ke({sizeHeight:e,isMaximized:o}){return {background:"transparent",borderRadius:"12px",height:e,overflow:"visible",...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}}}var Le=styled(oe)(()=>({display:"flex",flexDirection:"column",height:"100%",overflow:"visible",background:"transparent",borderRadius:"12px"})),$e=styled(oe)(()=>({display:"flex",flexDirection:"column",flex:1,minHeight:0,background:"transparent",overflow:"hidden"})),Ae=styled(oe)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",flexShrink:0,gap:e.v2.spacing(8),height:e.v2.spacing(35),paddingInline:e.v2.spacing(16),background:j,backdropFilter:k,borderBottomLeftRadius:e.v2.radius(12),borderBottomRightRadius:e.v2.radius(12),overflow:"visible",position:"relative",zIndex:3,"&:empty":{display:"none"},"&:has(> :only-child:empty)":{display:"none"}})),Be=styled(oe)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:e.v2.spacing(8),backgroundColor:e.palette.background.paper,padding:e.v2.spacing(6),transform:"translateY(-50%)",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:e.v2.radius(4),height:e.v2.spacing(36),transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),"&:empty":{display:"none"}}));function _e(e,o){return o.toLowerCase().includes(e)}function ge(e,o,t){let i=_e("top",o),n=_e("left",o);return !i&&!n?null:{x:e.x-(n?t.width:0),y:e.y-(i?t.height:0)}}function dt(e,o,t){let n=e.replace(/calc\(/gi,"(").replace(/(-?\d*\.?\d+)\s*(px|%|vw|vh)/gi,(a,r,d)=>{let s=parseFloat(r);if(!Number.isFinite(s))return "NaN";let f=d.toLowerCase();return String(f==="px"?s:f==="%"?s/100*o:f==="vw"?s/100*t.viewportWidth:s/100*t.viewportHeight)});if(!(!/^[\d\s+\-*/().]+$/.test(n)||!/\d/.test(n)))try{let a=new Function(`return (${n})`)();return typeof a=="number"&&Number.isFinite(a)?a:void 0}catch{return}}function T(e,o,t){if(e==null)return;if(typeof e=="number")return Number.isFinite(e)?e:void 0;let i=e.trim();if(!i)return;let n=o==="width"?t.containerWidth:t.containerHeight;if(i.toLowerCase().startsWith("calc(")&&i.endsWith(")")){let d=i.slice(i.indexOf("(")+1,i.lastIndexOf(")"));return d.trim()?dt(d,n,t):void 0}let r=i.match(/^(-?\d*\.?\d+)\s*(px|%|vw|vh)?$/i);if(r){let d=parseFloat(r[1]);if(!Number.isFinite(d))return;let s=(r[2]??"").toLowerCase();return !s||s==="px"?d:s==="%"?d/100*n:s==="vw"?d/100*t.viewportWidth:d/100*t.viewportHeight}}function ne(e,o){if(!e)return {};let t=T(e.width,"width",o),i=T(e.height,"height",o);return {...t!==void 0&&{width:t},...i!==void 0&&{height:i}}}function We(e){let{viewportWidth:o,viewportHeight:t,defaultWidth:i,defaultHeight:n,defaultPosition:a,isMaximized:r,containerRef:d}=e,s=!r&&d?.current&&d.current!==document.body?d.current:null,f=s?.getBoundingClientRect(),h=f?.left??0,w=f?.top??0,v=s?.clientWidth||o,S=s?.clientHeight||t,H=a?.x??v/2-i/2+h,g=a?.y??S/2-n/2+w;return {x:H-h,y:g-w}}var Ve=forwardRef(function({children:o,order:t,isMinimized:i$1,id:n,className:a$1,sx:r,onResize:d$1,onDragStart:s,onMouseDown:f$1,onClick:h,disablePortal:w,"data-testid":v,"data-id":S},H){let g$1=useRef(null),{size:b,setSize:m,position:y,resizableRef:z,isMaximized:l,isOpen:$,defaultSize:N,zIndex:Z,setPosition:E,viewport:F,setIsMaximized:le,setIsResized:k,setIsResizing:I,isResized:fe,minSize:R,maxSize:q,containerRef:V}=useContext(O),j=N.width,A=N.height,Y=F.width,J=F.height,W=useMemo(()=>document.createElement("div"),[]),[Q,ue]=useState(null);useLayoutEffect(()=>{ue(V?.current??document.body);},[V]);let pe=l?document.body:Q,u=w!==true,p=u?pe:null;useLayoutEffect(()=>{if(!u||!p)return;let D=p===document.body;return W.style.position=D?"":"absolute",W.style.inset=D?"":"0",W.style.pointerEvents="none",W.style.overflow="visible",p.appendChild(W),()=>{W.parentNode===p&&p.removeChild(W);}},[u,p,W]);let B=useRef({x:0,y:0}),he=T$1(),me=useCallback((D,C,c,_)=>{k(true),I(true),m({width:c.offsetWidth,height:c.offsetHeight}),d$1?.({width:c.offsetWidth,height:c.offsetHeight},c);let M=ge(B.current,C,_);M&&E(M);},[m,k,I,E,d$1]),Ye=useCallback(()=>{B.current=y,I(true);},[y,I]),Je=useCallback((D,C,c,_)=>{m({width:c.offsetWidth,height:c.offsetHeight}),d$1?.({width:c.offsetWidth,height:c.offsetHeight},c);let M=ge(B.current,C,_);M&&E(M),I(false);},[m,E,I,d$1]),ce=b.width||j,Qe=useCallback(D=>{let C=D.target,c=g$1.current;if(C&&c&&typeof C.closest=="function"){let _=c.querySelector(`.${a.paper}`),M=C.closest(`.${a.paper}`);if(M&&_&&M!==_)return false}s?.();},[s]),K=q?.width??Math.max(Y,j),be=q?.height??Math.max(J-40,A),X=l?"100vw":R?.width??d,ye=l?"100vh":R?.height??e,ze=typeof K=="number"||typeof X=="number"?Math.min(Math.max(ce,typeof X=="number"?X:0),typeof K=="number"?K:1/0):ce;if(u&&!p)return null;let Se=jsx(mt,{nodeRef:g$1,disabled:l,handle:`#${f}, .${g}`,onStart:Qe,cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",position:y,onStop:(D,C)=>{E({x:C.x,y:C.y});},...p===document.body&&{bounds:{top:10}},children:jsx(Ee,{ref:g$1,className:a.dialog,$zIndex:Number(t||0)+Z+(l?1:0),$isMinimized:i$1,$isBodyContainer:p===document.body,$isMaximized:l,$isSafari:he,$windowWidth:ze,$defaultHeight:A,PaperProps:{className:Hb(a.paper,a$1),sx:Gb({overflow:"hidden",boxShadow:i},r),...l?{"data-window-maximized":"true"}:null,...(S??n)!=null?{"data-id":S??n}:null,...f$1&&{onMouseDown:()=>f$1()},...h&&{onClick:()=>h()},style:Fe({isMaximized:l,isResized:fe,currentWindowWidth:ze,maxWidth:K,maxHeight:be,minWidth:X,minHeight:ye})},onClose:()=>{le(false);},open:$,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:W,fullScreen:l,"aria-labelledby":f,disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",className:Hb(a.resizable),enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{top:{zIndex:1001},right:{zIndex:1001},bottom:{zIndex:1001},left:{zIndex:1001},topRight:{zIndex:1001},bottomRight:{zIndex:1001},bottomLeft:{zIndex:1001},topLeft:{zIndex:1001}},size:{width:b.width,height:b.height},maxHeight:be,maxWidth:K,minWidth:X,minHeight:ye,ref:D=>{z.current=D;},onResizeStart:Ye,onResize:me,onResizeStop:Je,defaultSize:{width:ce,height:A},style:ke({sizeHeight:b.height,isMaximized:l}),children:jsx(Le,{ref:H,id:n,"data-testid":v??n??"Window",...(S??n)!=null?{"data-id":S??n}:null,children:o})})})});return u?createPortal(Se,W):Se});Ve.displayName="WindowDialog";var je=memo(Ve);function xe({children:e,isOpen:o,onClose:t,defaultSize:i,minSize:n,maxSize:a,defaultPosition:r,containerRef:d,isMaximized:s}){let{height:f,width:h}=a$1(),[w,v]=useState(s??false),S=useRef(s);useEffect(()=>{s!==void 0&&S.current!==s&&(S.current=s,v(s));},[s]);let H=w?null:d?.current,g=H?.clientWidth||h,b$1=H?.clientHeight||f,m=useMemo(()=>({containerWidth:g,containerHeight:b$1,viewportWidth:h,viewportHeight:f}),[g,b$1,h,f]),y=useMemo(()=>({width:T(i?.width,"width",m)??b,height:T(i?.height,"height",m)??c}),[i?.width,i?.height,m]),z=useMemo(()=>ne(n,m),[n,m]),l=useMemo(()=>ne(a,m),[a,m]),[$,N]=useState(()=>We({viewportWidth:h,viewportHeight:f,defaultWidth:y.width,defaultHeight:y.height,defaultPosition:r,isMaximized:w,containerRef:d})),Z=useRef(false),E=useCallback(u=>{Z.current=true,N(u);},[]),[F,le]=useState(false),[k,I]=useState(false),fe=useRef(),[R,q]=useState(()=>({width:Math.min(Math.max(y.width,z.width??0),l.width??1/0),height:Math.min(Math.max(y.height,z.height??0),l.height??1/0)})),V=useCallback(u=>{q(p=>{let B=typeof u=="function"?u(p):u,he=B.width??p.width,me=B.height??p.height;return {width:Math.min(Math.max(he,z.width??0),l.width??1/0),height:Math.min(Math.max(me,z.height??0),l.height??1/0)}});},[z.width,z.height,l.width,l.height]);useEffect(()=>{if(Z.current||k||F)return;let u=We({viewportWidth:h,viewportHeight:f,defaultWidth:R.width,defaultHeight:R.height,defaultPosition:r,isMaximized:w,containerRef:d});N(p=>p.x===u.x&&p.y===u.y?p:u);},[h,f,R.width,R.height,r?.x,r?.y,g,b$1,w,k,F]);let[j,A]=useState(false),[Y,J]=useState(false),W=useCallback(()=>{A(u=>!u);},[]),Q=useCallback(()=>{J(u=>!u);},[]),ue=useRef(null),pe=useMemo(()=>({isOpen:o,onClose:t,position:$,setPosition:E,size:R,setSize:V,defaultSize:y,minSize:z,maxSize:l,container:{width:g,height:b$1},viewport:{width:h,height:f},isMaximized:w,setIsMaximized:v,isResized:F,setIsResized:le,isResizing:k,setIsResizing:I,sidebar:{isExpanded:j,setExpanded:A,toggle:W},panel:{isExpanded:Y,setExpanded:J,toggle:Q},containerRef:d??ue,resizableRef:fe,zIndex:10}),[o,t,$,R,V,y,z,l,g,b$1,h,f,w,F,k,j,Y,W,Q,d]);return jsx(O.Provider,{value:pe,children:e})}var Ge=forwardRef(function({children:o,isOpen:t,onClose:i,defaultSize:n,minSize:a$1,maxSize:r,defaultPosition:d,containerRef:s,isMaximized:f,order:h,isMinimized:w,id:v,className:S,sx:H,onResize:g,disablePortal:b,onDragStart:m,onMouseDown:y,onClick:z,"data-testid":l,"data-id":$},N){return t?jsx(xe,{isOpen:t,onClose:i,defaultSize:n,minSize:a$1,maxSize:r,defaultPosition:d,containerRef:s,isMaximized:f,children:jsx(je,{ref:N,order:h,isMinimized:w,id:v,className:Hb(a.paper,S),sx:H,onResize:g,onDragStart:m,onMouseDown:y,onClick:z,disablePortal:b,"data-testid":l??v,"data-id":$??v,children:o})}):null});Ge.displayName="Window";var Wt=memo(Ge);var Ue=forwardRef(function({children:o,id:t,className:i,sx:n,"data-testid":a$1,"data-id":r},d){return jsx($e,{ref:d,id:t,"data-testid":a$1??t??"WindowContent",...(r??t)!=null?{"data-id":r??t}:null,className:Hb(a.content,i),sx:n,children:o})});Ue.displayName="WindowContent";var yt=memo(Ue);var Ze=forwardRef(function({children:o,id:t,className:i,sx:n,"data-testid":a$1,"data-id":r},d){return jsx(Ae,{ref:d,id:t,"data-testid":a$1??t??"WindowFooter",...(r??t)!=null?{"data-id":r??t}:null,className:Hb(a.footer,i),sx:n,children:o})});Ze.displayName="WindowFooter";var Ct=memo(Ze);var qe=forwardRef(function({children:o,className:t,...i},n){return Children.toArray(o).some(r=>typeof r=="string"||typeof r=="number"?String(r).trim()!=="":isValidElement(r))?jsx(Be,{ref:n,className:t,...i,children:o}):null});qe.displayName="WindowFooterActions";var Mt=memo(qe);export{O as a,nt as b,T as c,ne as d,xe as e,Wt as f,yt as g,Ct as h,Mt as i};
1
+ import {c,b,k,j,a,d,e,f,g,i}from'./chunk-ISC5KT5E.js';import {a as a$1}from'./chunk-N3W2IUZT.js';import {T as T$1,Hb,Gb}from'./chunk-WCH7VAS5.js';import'./chunk-ASZPO74G.js';import {createContext,forwardRef,useRef,useContext,useMemo,useState,useLayoutEffect,useCallback,memo,Children,isValidElement,useEffect}from'react';import {createPortal}from'react-dom';import {Resizable}from're-resizable';import mt from'react-draggable';import oe from'@mui/material/Box';import {styled,Dialog}from'@mui/material';import {jsx}from'react/jsx-runtime';var it={isExpanded:false,setExpanded:()=>{},toggle:()=>{}},ot={isExpanded:false,setExpanded:()=>{},toggle:()=>{}},O=createContext({isOpen:true,onClose:()=>{},position:{x:0,y:0},setPosition:()=>{},size:{width:0,height:0},setSize:()=>{},defaultSize:{width:b,height:c},minSize:void 0,maxSize:void 0,container:{width:0,height:0},viewport:{width:0,height:0},isMaximized:false,setIsMaximized:()=>{},isResized:false,setIsResized:()=>{},isResizing:false,setIsResizing:()=>{},containerRef:{current:null},resizableRef:{current:null},zIndex:10,sidebar:it,panel:ot});function nt(){return useContext(O)}var Ee=styled(Dialog,{shouldForwardProp:e=>e!=="$zIndex"&&e!=="$isMinimized"&&e!=="$isBodyContainer"&&e!=="$isMaximized"&&e!=="$isSafari"&&e!=="$windowWidth"&&e!=="$defaultHeight"})(({$zIndex:e,$isMinimized:o=false,$isBodyContainer:t=false,$isMaximized:i=false,$isSafari:n=false,$windowWidth:a,$defaultHeight:r})=>({backgroundColor:"transparent",pointerEvents:"none",zIndex:e,...o&&{display:"none"},...!t&&!i&&{position:"absolute"},...!i&&{width:n?a:"fit-content",height:n?r:"fit-content"},...i&&{transform:"none !important"},overflow:"visible","& .MuiDialog-container":{overflow:"visible"}}));function Fe({isMaximized:e,isResized:o,currentWindowWidth:t,maxWidth:i,maxHeight:n,minWidth:a,minHeight:r}){return {margin:0,maxHeight:n??"100%",maxWidth:i??"none",...a!=null&&{minWidth:a},...r!=null&&{minHeight:r},background:"transparent",backdropFilter:"blur(32px)",borderRadius:"12px",pointerEvents:"auto",width:o?"fit-content":t,height:o?"fit-content":"100%",...e&&{width:"100%",height:"100%"},position:"relative"}}function ke({sizeHeight:e,isMaximized:o}){return {background:"transparent",borderRadius:"12px",height:e,overflow:"visible",...o&&{height:"100% !important",width:"100% !important",flex:1},...o&&{position:"relative"}}}var Le=styled(oe)(()=>({display:"flex",flexDirection:"column",height:"100%",overflow:"visible",background:"transparent",borderRadius:"12px"})),$e=styled(oe)(()=>({display:"flex",flexDirection:"column",flex:1,minHeight:0,background:"transparent",overflow:"hidden"})),Ae=styled(oe)(({theme:e})=>({display:"flex",alignItems:"center",justifyContent:"flex-end",flexShrink:0,gap:e.v2.spacing(8),height:e.v2.spacing(35),paddingInline:e.v2.spacing(16),background:j,backdropFilter:k,borderBottomLeftRadius:e.v2.radius(12),borderBottomRightRadius:e.v2.radius(12),overflow:"visible",position:"relative",zIndex:3,"&:empty":{display:"none"},"&:has(> :only-child:empty)":{display:"none"}})),Be=styled(oe)(({theme:e})=>({display:"flex",justifyContent:"flex-end",alignItems:"center",gap:e.v2.spacing(8),backgroundColor:e.palette.background.paper,padding:e.v2.spacing(6),transform:"translateY(-50%)",boxShadow:"0px 4px 40px 0px rgba(0, 0, 0, 0.19)",borderRadius:e.v2.radius(4),height:e.v2.spacing(36),transition:e.transitions.create(["width"],{easing:e.transitions.easing.sharp,duration:e.transitions.duration.complex}),"&:empty":{display:"none"}}));function _e(e,o){return o.toLowerCase().includes(e)}function ge(e,o,t){let i=_e("top",o),n=_e("left",o);return !i&&!n?null:{x:e.x-(n?t.width:0),y:e.y-(i?t.height:0)}}function dt(e,o,t){let n=e.replace(/calc\(/gi,"(").replace(/(-?\d*\.?\d+)\s*(px|%|vw|vh)/gi,(a,r,d)=>{let s=parseFloat(r);if(!Number.isFinite(s))return "NaN";let f=d.toLowerCase();return String(f==="px"?s:f==="%"?s/100*o:f==="vw"?s/100*t.viewportWidth:s/100*t.viewportHeight)});if(!(!/^[\d\s+\-*/().]+$/.test(n)||!/\d/.test(n)))try{let a=new Function(`return (${n})`)();return typeof a=="number"&&Number.isFinite(a)?a:void 0}catch{return}}function T(e,o,t){if(e==null)return;if(typeof e=="number")return Number.isFinite(e)?e:void 0;let i=e.trim();if(!i)return;let n=o==="width"?t.containerWidth:t.containerHeight;if(i.toLowerCase().startsWith("calc(")&&i.endsWith(")")){let d=i.slice(i.indexOf("(")+1,i.lastIndexOf(")"));return d.trim()?dt(d,n,t):void 0}let r=i.match(/^(-?\d*\.?\d+)\s*(px|%|vw|vh)?$/i);if(r){let d=parseFloat(r[1]);if(!Number.isFinite(d))return;let s=(r[2]??"").toLowerCase();return !s||s==="px"?d:s==="%"?d/100*n:s==="vw"?d/100*t.viewportWidth:d/100*t.viewportHeight}}function ne(e,o){if(!e)return {};let t=T(e.width,"width",o),i=T(e.height,"height",o);return {...t!==void 0&&{width:t},...i!==void 0&&{height:i}}}function We(e){let{viewportWidth:o,viewportHeight:t,defaultWidth:i,defaultHeight:n,defaultPosition:a,isMaximized:r,containerRef:d}=e,s=!r&&d?.current&&d.current!==document.body?d.current:null,f=s?.getBoundingClientRect(),h=f?.left??0,w=f?.top??0,v=s?.clientWidth||o,S=s?.clientHeight||t,H=a?.x??v/2-i/2+h,g=a?.y??S/2-n/2+w;return {x:H-h,y:g-w}}var Ve=forwardRef(function({children:o,order:t,isMinimized:i$1,id:n,className:a$1,sx:r,onResize:d$1,onDragStart:s,onMouseDown:f$1,onClick:h,disablePortal:w,"data-testid":v,"data-id":S},H){let g$1=useRef(null),{size:b,setSize:m,position:y,resizableRef:z,isMaximized:l,isOpen:$,defaultSize:N,zIndex:Z,setPosition:E,viewport:F,setIsMaximized:le,setIsResized:k,setIsResizing:I,isResized:fe,minSize:R,maxSize:q,containerRef:V}=useContext(O),j=N.width,A=N.height,Y=F.width,J=F.height,W=useMemo(()=>document.createElement("div"),[]),[Q,ue]=useState(null);useLayoutEffect(()=>{ue(V?.current??document.body);},[V]);let pe=l?document.body:Q,u=w!==true,p=u?pe:null;useLayoutEffect(()=>{if(!u||!p)return;let D=p===document.body;return W.style.position=D?"":"absolute",W.style.inset=D?"":"0",W.style.pointerEvents="none",W.style.overflow="visible",p.appendChild(W),()=>{W.parentNode===p&&p.removeChild(W);}},[u,p,W]);let B=useRef({x:0,y:0}),he=T$1(),me=useCallback((D,C,c,_)=>{k(true),I(true),m({width:c.offsetWidth,height:c.offsetHeight}),d$1?.({width:c.offsetWidth,height:c.offsetHeight},c);let M=ge(B.current,C,_);M&&E(M);},[m,k,I,E,d$1]),Ye=useCallback(()=>{B.current=y,I(true);},[y,I]),Je=useCallback((D,C,c,_)=>{m({width:c.offsetWidth,height:c.offsetHeight}),d$1?.({width:c.offsetWidth,height:c.offsetHeight},c);let M=ge(B.current,C,_);M&&E(M),I(false);},[m,E,I,d$1]),ce=b.width||j,Qe=useCallback(D=>{let C=D.target,c=g$1.current;if(C&&c&&typeof C.closest=="function"){let _=c.querySelector(`.${a.paper}`),M=C.closest(`.${a.paper}`);if(M&&_&&M!==_)return false}s?.();},[s]),K=q?.width??Math.max(Y,j),be=q?.height??Math.max(J-40,A),X=l?"100vw":R?.width??d,ye=l?"100vh":R?.height??e,ze=typeof K=="number"||typeof X=="number"?Math.min(Math.max(ce,typeof X=="number"?X:0),typeof K=="number"?K:1/0):ce;if(u&&!p)return null;let Se=jsx(mt,{nodeRef:g$1,disabled:l,handle:`#${f}, .${g}`,onStart:Qe,cancel:'[class*="MuiDialogContent-root"]',defaultClassName:"draggable-lead-dialog",position:y,onStop:(D,C)=>{E({x:C.x,y:C.y});},...p===document.body&&{bounds:{top:10}},children:jsx(Ee,{ref:g$1,className:a.dialog,$zIndex:Number(t||0)+Z+(l?1:0),$isMinimized:i$1,$isBodyContainer:p===document.body,$isMaximized:l,$isSafari:he,$windowWidth:ze,$defaultHeight:A,PaperProps:{className:Hb(a.paper,a$1),sx:Gb({overflow:"hidden",boxShadow:i},r),...l?{"data-window-maximized":"true"}:null,...(S??n)!=null?{"data-id":S??n}:null,...f$1&&{onMouseDown:()=>f$1()},...h&&{onClick:()=>h()},style:Fe({isMaximized:l,isResized:fe,currentWindowWidth:ze,maxWidth:K,maxHeight:be,minWidth:X,minHeight:ye})},onClose:()=>{le(false);},open:$,hideBackdrop:true,disableEnforceFocus:true,disableScrollLock:true,container:W,fullScreen:l,"aria-labelledby":f,disablePortal:true,children:jsx(Resizable,{"data-testid":"Resizable",className:Hb(a.resizable),enable:{topLeft:true,topRight:true,bottomLeft:true,bottomRight:true,left:true,right:true,bottom:true,top:true},handleStyles:{top:{zIndex:1001},right:{zIndex:1001},bottom:{zIndex:1001},left:{zIndex:1001},topRight:{zIndex:1001},bottomRight:{zIndex:1001},bottomLeft:{zIndex:1001},topLeft:{zIndex:1001}},size:{width:b.width,height:b.height},maxHeight:be,maxWidth:K,minWidth:X,minHeight:ye,ref:D=>{z.current=D;},onResizeStart:Ye,onResize:me,onResizeStop:Je,defaultSize:{width:ce,height:A},style:ke({sizeHeight:b.height,isMaximized:l}),children:jsx(Le,{ref:H,id:n,"data-testid":v??n??"Window",...(S??n)!=null?{"data-id":S??n}:null,children:o})})})});return u?createPortal(Se,W):Se});Ve.displayName="WindowDialog";var je=memo(Ve);function xe({children:e,isOpen:o,onClose:t,defaultSize:i,minSize:n,maxSize:a,defaultPosition:r,containerRef:d,isMaximized:s}){let{height:f,width:h}=a$1(),[w,v]=useState(s??false),S=useRef(s);useEffect(()=>{s!==void 0&&S.current!==s&&(S.current=s,v(s));},[s]);let H=w?null:d?.current,g=H?.clientWidth||h,b$1=H?.clientHeight||f,m=useMemo(()=>({containerWidth:g,containerHeight:b$1,viewportWidth:h,viewportHeight:f}),[g,b$1,h,f]),y=useMemo(()=>({width:T(i?.width,"width",m)??b,height:T(i?.height,"height",m)??c}),[i?.width,i?.height,m]),z=useMemo(()=>ne(n,m),[n,m]),l=useMemo(()=>ne(a,m),[a,m]),[$,N]=useState(()=>We({viewportWidth:h,viewportHeight:f,defaultWidth:y.width,defaultHeight:y.height,defaultPosition:r,isMaximized:w,containerRef:d})),Z=useRef(false),E=useCallback(u=>{Z.current=true,N(u);},[]),[F,le]=useState(false),[k,I]=useState(false),fe=useRef(),[R,q]=useState(()=>({width:Math.min(Math.max(y.width,z.width??0),l.width??1/0),height:Math.min(Math.max(y.height,z.height??0),l.height??1/0)})),V=useCallback(u=>{q(p=>{let B=typeof u=="function"?u(p):u,he=B.width??p.width,me=B.height??p.height;return {width:Math.min(Math.max(he,z.width??0),l.width??1/0),height:Math.min(Math.max(me,z.height??0),l.height??1/0)}});},[z.width,z.height,l.width,l.height]);useEffect(()=>{if(Z.current||k||F)return;let u=We({viewportWidth:h,viewportHeight:f,defaultWidth:R.width,defaultHeight:R.height,defaultPosition:r,isMaximized:w,containerRef:d});N(p=>p.x===u.x&&p.y===u.y?p:u);},[h,f,R.width,R.height,r?.x,r?.y,g,b$1,w,k,F]);let[j,A]=useState(false),[Y,J]=useState(false),W=useCallback(()=>{A(u=>!u);},[]),Q=useCallback(()=>{J(u=>!u);},[]),ue=useRef(null),pe=useMemo(()=>({isOpen:o,onClose:t,position:$,setPosition:E,size:R,setSize:V,defaultSize:y,minSize:z,maxSize:l,container:{width:g,height:b$1},viewport:{width:h,height:f},isMaximized:w,setIsMaximized:v,isResized:F,setIsResized:le,isResizing:k,setIsResizing:I,sidebar:{isExpanded:j,setExpanded:A,toggle:W},panel:{isExpanded:Y,setExpanded:J,toggle:Q},containerRef:d??ue,resizableRef:fe,zIndex:10}),[o,t,$,R,V,y,z,l,g,b$1,h,f,w,F,k,j,Y,W,Q,d]);return jsx(O.Provider,{value:pe,children:e})}var Ge=forwardRef(function({children:o,isOpen:t,onClose:i,defaultSize:n,minSize:a$1,maxSize:r,defaultPosition:d,containerRef:s,isMaximized:f,order:h,isMinimized:w,id:v,className:S,sx:H,onResize:g,disablePortal:b,onDragStart:m,onMouseDown:y,onClick:z,"data-testid":l,"data-id":$},N){return t?jsx(xe,{isOpen:t,onClose:i,defaultSize:n,minSize:a$1,maxSize:r,defaultPosition:d,containerRef:s,isMaximized:f,children:jsx(je,{ref:N,order:h,isMinimized:w,id:v,className:Hb(a.paper,S),sx:H,onResize:g,onDragStart:m,onMouseDown:y,onClick:z,disablePortal:b,"data-testid":l??v,"data-id":$??v,children:o})}):null});Ge.displayName="Window";var Wt=memo(Ge);var Ue=forwardRef(function({children:o,id:t,className:i,sx:n,"data-testid":a$1,"data-id":r},d){return jsx($e,{ref:d,id:t,"data-testid":a$1??t??"WindowContent",...(r??t)!=null?{"data-id":r??t}:null,className:Hb(a.content,i),sx:n,children:o})});Ue.displayName="WindowContent";var yt=memo(Ue);var Ze=forwardRef(function({children:o,id:t,className:i,sx:n,"data-testid":a$1,"data-id":r},d){return jsx(Ae,{ref:d,id:t,"data-testid":a$1??t??"WindowFooter",...(r??t)!=null?{"data-id":r??t}:null,className:Hb(a.footer,i),sx:n,children:o})});Ze.displayName="WindowFooter";var Ct=memo(Ze);var qe=forwardRef(function({children:o,className:t,...i},n){return Children.toArray(o).some(r=>typeof r=="string"||typeof r=="number"?String(r).trim()!=="":isValidElement(r))?jsx(Be,{ref:n,className:t,...i,children:o}):null});qe.displayName="WindowFooterActions";var Mt=memo(qe);export{O as a,nt as b,T as c,ne as d,xe as e,Wt as f,yt as g,Ct as h,Mt as i};
@@ -1 +1 @@
1
- import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-FlipCard",t={root:`${o}-root`,container:`${o}-container`,inner:`${o}-inner`,front:`${o}-front`,back:`${o}-back`,faceContent:`${o}-faceContent`},h=.3;var D=styled(m,{shouldForwardProp:e=>e!=="$interactive"})(({$interactive:e})=>({width:"100%",height:"100%",cursor:e?"pointer":void 0})),I=styled(m)(()=>({width:"inherit",height:"inherit",perspective:"1000px"})),b=styled(motion.div)(()=>({width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"})),u=styled(m,{shouldForwardProp:e=>e!=="$side"&&e!=="$direction"})(({$side:e,$direction:y})=>({position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",...e==="back"&&{transform:y==="vertical"?"rotateX(180deg)":"rotateY(180deg)"}})),v=styled(m)(()=>({width:"100%",height:"100%"}));var T=forwardRef(function({front:y,back:w,isFlipped:S,defaultFlipped:L=false,onFlip:N,direction:s="horizontal",trigger:P,duration:A=h,disabled:a=false,id:k,className:R,sx:l,"data-testid":M,...c},U){let p=S!==void 0,r=P??(p?void 0:"click"),[_,K]=useState(L),C=p?S:_,f=useCallback(i=>{a||(p||K(i),N?.(i));},[a,p,N]),$=useCallback(()=>{f(!C);},[C,f]),O=()=>{r==="click"&&$();},H=()=>{r==="hover"&&f(true);},X=()=>{r==="hover"&&f(false);},F=!a&&r==="click",Y=i=>{F&&(i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),$()));},g=C?180:0,j=s==="vertical"?{rotateX:g}:{rotateY:g},z=!a&&(r==="click"||r==="hover"),B=a?[{pointerEvents:"none",opacity:.6},...Array.isArray(l)?l:l?[l]:[]]:l;return jsx(D,{...c,ref:U,id:k,"data-testid":M??k??"FlipCard","data-direction":s,className:Hb(t.root,R),$interactive:z,role:F?"button":c.role,tabIndex:F?a?-1:0:c.tabIndex,"aria-pressed":F?C:c["aria-pressed"],onClick:O,onKeyDown:Y,onMouseEnter:r==="hover"?H:void 0,onMouseLeave:r==="hover"?X:void 0,sx:B,children:jsx(I,{className:t.container,children:jsxs(b,{className:t.inner,animate:j,transition:{duration:A},children:[jsx(u,{className:t.front,$side:"front",$direction:s,children:jsx(v,{className:t.faceContent,children:y})}),jsx(u,{className:t.back,$side:"back",$direction:s,children:jsx(v,{className:t.faceContent,children:w})})]})})})});T.displayName="FlipCard";var Q=memo(T);export{o as a,t as b,h as c,Q as d};
1
+ import {Hb}from'./chunk-WCH7VAS5.js';import {forwardRef,useState,useCallback,memo}from'react';import m from'@mui/material/Box';import {styled}from'@mui/material/styles';import {motion}from'framer-motion';import {jsx,jsxs}from'react/jsx-runtime';var o="os-shared-FlipCard",t={root:`${o}-root`,container:`${o}-container`,inner:`${o}-inner`,front:`${o}-front`,back:`${o}-back`,faceContent:`${o}-faceContent`},h=.3;var D=styled(m,{shouldForwardProp:e=>e!=="$interactive"})(({$interactive:e})=>({width:"100%",height:"100%",cursor:e?"pointer":void 0})),I=styled(m)(()=>({width:"inherit",height:"inherit",perspective:"1000px"})),b=styled(motion.div)(()=>({width:"100%",height:"100%",position:"relative",transformStyle:"preserve-3d"})),u=styled(m,{shouldForwardProp:e=>e!=="$side"&&e!=="$direction"})(({$side:e,$direction:y})=>({position:"absolute",backfaceVisibility:"hidden",width:"100%",height:"100%",display:"flex",justifyContent:"center",alignItems:"center",...e==="back"&&{transform:y==="vertical"?"rotateX(180deg)":"rotateY(180deg)"}})),v=styled(m)(()=>({width:"100%",height:"100%"}));var T=forwardRef(function({front:y,back:w,isFlipped:S,defaultFlipped:L=false,onFlip:N,direction:s="horizontal",trigger:P,duration:A=h,disabled:a=false,id:k,className:R,sx:l,"data-testid":M,...c},U){let p=S!==void 0,r=P??(p?void 0:"click"),[_,K]=useState(L),C=p?S:_,f=useCallback(i=>{a||(p||K(i),N?.(i));},[a,p,N]),$=useCallback(()=>{f(!C);},[C,f]),O=()=>{r==="click"&&$();},H=()=>{r==="hover"&&f(true);},X=()=>{r==="hover"&&f(false);},F=!a&&r==="click",Y=i=>{F&&(i.key!=="Enter"&&i.key!==" "||(i.preventDefault(),$()));},g=C?180:0,j=s==="vertical"?{rotateX:g}:{rotateY:g},z=!a&&(r==="click"||r==="hover"),B=a?[{pointerEvents:"none",opacity:.6},...Array.isArray(l)?l:l?[l]:[]]:l;return jsx(D,{...c,ref:U,id:k,"data-testid":M??k??"FlipCard","data-direction":s,className:Hb(t.root,R),$interactive:z,role:F?"button":c.role,tabIndex:F?a?-1:0:c.tabIndex,"aria-pressed":F?C:c["aria-pressed"],onClick:O,onKeyDown:Y,onMouseEnter:r==="hover"?H:void 0,onMouseLeave:r==="hover"?X:void 0,sx:B,children:jsx(I,{className:t.container,children:jsxs(b,{className:t.inner,animate:j,transition:{duration:A},children:[jsx(u,{className:t.front,$side:"front",$direction:s,children:jsx(v,{className:t.faceContent,children:y})}),jsx(u,{className:t.back,$side:"back",$direction:s,children:jsx(v,{className:t.faceContent,children:w})})]})})})});T.displayName="FlipCard";var Q=memo(T);export{o as a,t as b,h as c,Q as d};
@@ -1 +1 @@
1
- import {L as L$1}from'./chunk-6ZPNLCMN.js';import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import v from'@mui/material/IconButton';import z from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"#8D8D94"})]});var M=styled(z)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),E=17,B={width:E,height:E,padding:0,borderRadius:"50%",flexShrink:0},x=styled(v)(()=>({...B,"&.Mui-disabled":{opacity:.5}})),N=styled(v)(()=>({...B}));var T=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:H,endAdornment:A,id:s="SearchInput",className:k,onKeyDown:m,inputProps:R,onClick:D,...$},c)=>{let h=useRef(null),[K,C]=useState(()=>String(a??d??"").length>0),O=n&&K&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let Z=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),_=e=>{C(e.target.value.length>0),H?.(e);},F=e=>{e.stopPropagation(),D?.(e);},U=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),V=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},W=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},j=jsxs(Fragment,{children:[jsx(M,{position:"end",className:t.searchAdornment,children:O?jsx(N,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:V,children:jsx(g,{className:t.clearIcon})}):jsx(x,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(L,{className:t.searchIcon})})}),A]});return jsx(L$1,{...$,ref:Z,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:_,onKeyDown:U,onClick:F,inputProps:{autoComplete:"off",...R},endAdornment:j,className:Hb(t.root,k),"data-testid":"SearchInput"})});T.displayName="SearchInput";var w=memo(T);export{t as a,w as b};
1
+ import {L as L$1}from'./chunk-HR4BT24K.js';import {Hb}from'./chunk-WCH7VAS5.js';import {forwardRef,useRef,useState,useEffect,useCallback,memo}from'react';import y from'@mui/material/SvgIcon';import {jsxs,Fragment,jsx}from'react/jsx-runtime';import v from'@mui/material/IconButton';import z from'@mui/material/InputAdornment';import {styled}from'@mui/material/styles';var o="os-shared-SearchInput",t={root:`${o}-root`,searchAdornment:`${o}-searchAdornment`,searchButton:`${o}-searchButton`,clearButton:`${o}-clearButton`,searchIcon:`${o}-searchIcon`,clearIcon:`${o}-clearIcon`};var L=n=>jsx(y,{viewBox:"0 0 12 12",sx:{width:12,height:12},...n,children:jsx("path",{d:"M7.68817 8.21429L7.6463 8.17242L7.60036 8.20978C6.88378 8.79249 5.97154 9.14299 4.97917 9.14299C2.68489 9.14299 0.815625 7.27372 0.815625 4.97943C0.815625 2.68514 2.68489 0.815869 4.97917 0.815869C7.27345 0.815869 9.14271 2.68514 9.14271 4.97943C9.14271 5.9718 8.79221 6.88405 8.2095 7.60064L8.17215 7.64657L8.21401 7.68844L11.0754 10.5499L11.0754 10.5499L11.0764 10.5508C11.1121 10.5851 11.1406 10.6261 11.1602 10.6715C11.1798 10.7169 11.1902 10.7658 11.1907 10.8153C11.1912 10.8648 11.1818 10.9139 11.1631 10.9597C11.1444 11.0055 11.1168 11.0471 11.0818 11.0821C11.0468 11.1171 11.0052 11.1447 10.9594 11.1634C10.9136 11.1821 10.8645 11.1915 10.815 11.191C10.7655 11.1905 10.7167 11.1801 10.6712 11.1605C10.6258 11.1409 10.5848 11.1124 10.5505 11.0767L10.5496 11.0757L7.68817 8.21429ZM7.43625 7.35711L7.43682 7.35789L7.44469 7.34971C8.03496 6.73571 8.39896 5.90202 8.39896 4.97943C8.39896 3.08554 6.87305 1.55962 4.97917 1.55962C3.08528 1.55962 1.55937 3.08554 1.55937 4.97943C1.55937 6.87332 3.08528 8.39924 4.97917 8.39924C5.90175 8.39924 6.73544 8.03524 7.34944 7.44496L7.35011 7.44566L7.35683 7.43652C7.37913 7.40618 7.40591 7.37941 7.43625 7.35711Z",fill:"#20232B",stroke:"white",strokeWidth:.13125})}),g=n=>jsxs(y,{viewBox:"0 0 13 13",sx:{width:13,height:13},...n,children:[jsx("rect",{width:"13",height:"13",rx:"6.5",fill:"#F2F2F2"}),jsx("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M8.69808 4.16259C8.78018 4.16065 8.86095 4.18356 8.92981 4.22833C8.99866 4.27309 9.05239 4.33762 9.08393 4.41344C9.11548 4.48927 9.12338 4.57286 9.10659 4.65325C9.08981 4.73365 9.04911 4.80708 8.98986 4.86395L7.07755 6.77626L8.98839 8.68713L8.98986 8.68854C9.02896 8.72608 9.06018 8.77105 9.08169 8.82081C9.1032 8.87057 9.11456 8.92413 9.11511 8.97833C9.11566 9.03254 9.10539 9.08631 9.0849 9.1365C9.06441 9.18669 9.03411 9.23229 8.99578 9.27062C8.95745 9.30895 8.91185 9.33925 8.86166 9.35974C8.81147 9.38023 8.7577 9.3905 8.70349 9.38995C8.64928 9.3894 8.59573 9.37804 8.54597 9.35653C8.49621 9.33502 8.45125 9.30379 8.41371 9.26469L6.50141 7.35239L4.59054 9.26323L4.58913 9.2647C4.55159 9.30381 4.50662 9.33502 4.45685 9.35653C4.40709 9.37804 4.35354 9.3894 4.29933 9.38995C4.24513 9.3905 4.19135 9.38023 4.14116 9.35974C4.09098 9.33925 4.04538 9.30895 4.00705 9.27062C3.96872 9.23229 3.93842 9.18669 3.91793 9.1365C3.89744 9.08631 3.88717 9.03254 3.88772 8.97833C3.88827 8.92413 3.89963 8.87057 3.92114 8.82081C3.94264 8.77105 3.97388 8.7261 4.01298 8.68855L5.92528 6.77626L4.01443 4.86539L4.01339 4.86438C3.95522 4.80788 3.91524 4.73531 3.89855 4.65596C3.88186 4.5766 3.88923 4.49407 3.91971 4.41893C3.95019 4.34379 4.00239 4.27945 4.06964 4.23414C4.13689 4.18884 4.21615 4.16462 4.29722 4.1646C4.30093 4.1646 4.30464 4.16465 4.30835 4.16475C4.35906 4.16614 4.4091 4.17699 4.45589 4.19678C4.5061 4.21801 4.55154 4.24911 4.58952 4.28822L6.50141 6.20012L8.41228 4.28928L8.4137 4.2878C8.43812 4.26236 8.4655 4.24043 8.49507 4.22235C8.55578 4.18521 8.62571 4.1643 8.69808 4.16259Z",fill:"#8D8D94"})]});var M=styled(z)(({theme:n})=>({display:"flex",alignItems:"center",gap:n.v2.spacing(4),flexShrink:0,paddingTop:1})),E=17,B={width:E,height:E,padding:0,borderRadius:"50%",flexShrink:0},x=styled(v)(()=>({...B,"&.Mui-disabled":{opacity:.5}})),N=styled(v)(()=>({...B}));var T=forwardRef(({clearable:n=true,onClear:P,disabled:p=false,value:a,defaultValue:d,onChange:H,endAdornment:A,id:s="SearchInput",className:k,onKeyDown:m,inputProps:R,onClick:D,...$},c)=>{let h=useRef(null),[K,C]=useState(()=>String(a??d??"").length>0),O=n&&K&&!p;useEffect(()=>{a!==void 0&&C(String(a??"").length>0);},[a]);let Z=useCallback(e=>{h.current=e,typeof c=="function"?c(e):c&&(c.current=e);},[c]),_=e=>{C(e.target.value.length>0),H?.(e);},F=e=>{e.stopPropagation(),D?.(e);},U=useCallback(e=>{e.stopPropagation(),m?.(e);},[m]),V=e=>{e.stopPropagation();let l=h.current;l&&(Object.getOwnPropertyDescriptor(HTMLInputElement.prototype,"value")?.set?.call(l,""),l.dispatchEvent(new Event("input",{bubbles:true})),l.focus()),C(false),P?.();},W=e=>{e.stopPropagation(),h.current?.focus();},I=e=>{e.preventDefault();},j=jsxs(Fragment,{children:[jsx(M,{position:"end",className:t.searchAdornment,children:O?jsx(N,{className:t.clearButton,id:s?`${s}-clear-button`:void 0,type:"button","aria-label":"Clear search",disabled:p,disableRipple:true,onMouseDown:I,onClick:V,children:jsx(g,{className:t.clearIcon})}):jsx(x,{className:t.searchButton,id:s?`${s}-search-button`:void 0,type:"button","aria-label":"Search",disabled:p,disableRipple:true,onMouseDown:I,onClick:W,children:jsx(L,{className:t.searchIcon})})}),A]});return jsx(L$1,{...$,ref:Z,id:s,type:"text",disabled:p,value:a,defaultValue:d,onChange:_,onKeyDown:U,onClick:F,inputProps:{autoComplete:"off",...R},endAdornment:j,className:Hb(t.root,k),"data-testid":"SearchInput"})});T.displayName="SearchInput";var w=memo(T);export{t as a,w as b};
@@ -1 +1 @@
1
- import {Gb,Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,useCallback,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';var u="os-shared-FilterChip",a={root:`${u}-root`,label:`${u}-label`,dismissButton:`${u}-dismissButton`,dismissIcon:`${u}-dismissIcon`},C=",",g="Dismiss filter";function L({className:t}){return jsxs("svg",{className:t,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":"true",children:[jsx("path",{d:"M1.79488 1.73941L6.31572 6.26024",stroke:"currentColor",strokeWidth:"0.875",strokeMiterlimit:"10",strokeLinecap:"round"}),jsx("path",{d:"M6.31572 1.73941L1.79488 6.26024",stroke:"currentColor",strokeWidth:"0.875",strokeMiterlimit:"10",strokeLinecap:"round"})]})}var k=styled("div",{shouldForwardProp:t=>!["$disabled","$isActive"].includes(t)})(({theme:t,$disabled:e,$isActive:r=true})=>{let{base:o,grey:s,foreground:n}=t.v2.palette,p=t.v2.spacing(1),i=t.palette.background.gradient.shadedBlue;return {display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",gap:t.v2.spacing(8),height:t.v2.spacing(32),minWidth:"135.11px",maxWidth:"16rem",boxSizing:"border-box",borderStyle:"solid",borderRadius:t.v2.radius(48),...t.v2.typography.textVariants.body.small.regular,whiteSpace:"nowrap",overflow:"hidden",cursor:"default",opacity:e?.6:1,...r?{borderWidth:0,paddingInline:`calc(${t.v2.spacing(16)} + ${p})`,background:i,color:o.white}:{borderWidth:p,borderColor:s[100],paddingInline:t.v2.spacing(16),backgroundColor:o.white,color:n.primary}}}),E=styled("span")(({theme:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"1 1 auto",textAlign:"center",fontWeight:t.v2.typography.fontWeightRegular})),_=styled("button",{shouldForwardProp:t=>t!=="$disabled"&&t!=="$isActive"})(({theme:t,$disabled:e,$isActive:r=true})=>{let{base:o,foreground:s}=t.v2.palette;return {display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:0,width:"16px",height:"16px",padding:0,border:"none",borderRadius:"50%",backgroundColor:alpha(o.black,.1),color:r?o.white:s.secondary,cursor:e?"not-allowed":"pointer",opacity:e?.6:1,transition:"opacity 150ms ease, background-color 150ms ease","&:hover":e?void 0:{backgroundColor:alpha(o.black,.2)},"&:focus-visible":{outline:`2px solid ${r?o.white:s.secondary}`,outlineOffset:"1px"},"& svg":{display:"block"}}});var A=forwardRef(({label:t,value:e,separator:r=C,visible:o=true,dismissible:s=true,onDismiss:n,dismissLabel:p=g,disabled:i=false,isActive:x=true,children:F,id:S,sx:R,className:w,slotProps:P,"data-testid":T},$)=>{let{label:h,dismissButton:l}=P??{},B=useCallback(f=>{f.stopPropagation(),!i&&(l?.onClick?.(f),n?.(f));},[i,l,n]);if(!o)return null;let m=t??(typeof e=="string"?e:e&&e.length>0?e.join(r):void 0);if(!m&&!F)return null;let N=s&&n!=null;return jsxs(k,{ref:$,id:S,"data-testid":T??S??"FilterChip",className:Hb(a.root,w),sx:Gb({},R),$disabled:i,$isActive:x,role:"status",children:[m?jsx(E,{...h,className:Hb(a.label,h?.className),sx:Gb({},h?.sx),children:m}):F,N&&jsx(_,{...l,type:"button","aria-label":l?.["aria-label"]??p,disabled:i,onClick:B,className:Hb(a.dismissButton,l?.className),sx:Gb({},l?.sx),$disabled:i,$isActive:x,children:jsx(L,{className:a.dismissIcon})})]})});A.displayName="FilterChip";var U=memo(A);export{a,C as b,g as c,U as d};
1
+ import {Gb,Hb}from'./chunk-WCH7VAS5.js';import {forwardRef,useCallback,memo}from'react';import {jsxs,jsx}from'react/jsx-runtime';import {styled,alpha}from'@mui/material/styles';var u="os-shared-FilterChip",a={root:`${u}-root`,label:`${u}-label`,dismissButton:`${u}-dismissButton`,dismissIcon:`${u}-dismissIcon`},C=",",g="Dismiss filter";function L({className:t}){return jsxs("svg",{className:t,width:"8",height:"8",viewBox:"0 0 8 8",fill:"none","aria-hidden":"true",children:[jsx("path",{d:"M1.79488 1.73941L6.31572 6.26024",stroke:"currentColor",strokeWidth:"0.875",strokeMiterlimit:"10",strokeLinecap:"round"}),jsx("path",{d:"M6.31572 1.73941L1.79488 6.26024",stroke:"currentColor",strokeWidth:"0.875",strokeMiterlimit:"10",strokeLinecap:"round"})]})}var k=styled("div",{shouldForwardProp:t=>!["$disabled","$isActive"].includes(t)})(({theme:t,$disabled:e,$isActive:r=true})=>{let{base:o,grey:s,foreground:n}=t.v2.palette,p=t.v2.spacing(1),i=t.palette.background.gradient.shadedBlue;return {display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",gap:t.v2.spacing(8),height:t.v2.spacing(32),minWidth:"135.11px",maxWidth:"16rem",boxSizing:"border-box",borderStyle:"solid",borderRadius:t.v2.radius(48),...t.v2.typography.textVariants.body.small.regular,whiteSpace:"nowrap",overflow:"hidden",cursor:"default",opacity:e?.6:1,...r?{borderWidth:0,paddingInline:`calc(${t.v2.spacing(16)} + ${p})`,background:i,color:o.white}:{borderWidth:p,borderColor:s[100],paddingInline:t.v2.spacing(16),backgroundColor:o.white,color:n.primary}}}),E=styled("span")(({theme:t})=>({overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap",minWidth:0,flex:"1 1 auto",textAlign:"center",fontWeight:t.v2.typography.fontWeightRegular})),_=styled("button",{shouldForwardProp:t=>t!=="$disabled"&&t!=="$isActive"})(({theme:t,$disabled:e,$isActive:r=true})=>{let{base:o,foreground:s}=t.v2.palette;return {display:"inline-flex",position:"relative",alignItems:"center",justifyContent:"center",flexShrink:0,width:"16px",height:"16px",padding:0,border:"none",borderRadius:"50%",backgroundColor:alpha(o.black,.1),color:r?o.white:s.secondary,cursor:e?"not-allowed":"pointer",opacity:e?.6:1,transition:"opacity 150ms ease, background-color 150ms ease","&:hover":e?void 0:{backgroundColor:alpha(o.black,.2)},"&:focus-visible":{outline:`2px solid ${r?o.white:s.secondary}`,outlineOffset:"1px"},"& svg":{display:"block"}}});var A=forwardRef(({label:t,value:e,separator:r=C,visible:o=true,dismissible:s=true,onDismiss:n,dismissLabel:p=g,disabled:i=false,isActive:x=true,children:F,id:S,sx:R,className:w,slotProps:P,"data-testid":T},$)=>{let{label:h,dismissButton:l}=P??{},B=useCallback(f=>{f.stopPropagation(),!i&&(l?.onClick?.(f),n?.(f));},[i,l,n]);if(!o)return null;let m=t??(typeof e=="string"?e:e&&e.length>0?e.join(r):void 0);if(!m&&!F)return null;let N=s&&n!=null;return jsxs(k,{ref:$,id:S,"data-testid":T??S??"FilterChip",className:Hb(a.root,w),sx:Gb({},R),$disabled:i,$isActive:x,role:"status",children:[m?jsx(E,{...h,className:Hb(a.label,h?.className),sx:Gb({},h?.sx),children:m}):F,N&&jsx(_,{...l,type:"button","aria-label":l?.["aria-label"]??p,disabled:i,onClick:B,className:Hb(a.dismissButton,l?.className),sx:Gb({},l?.sx),$disabled:i,$isActive:x,children:jsx(L,{className:a.dismissIcon})})]})});A.displayName="FilterChip";var U=memo(A);export{a,C as b,g as c,U as d};
@@ -1 +1 @@
1
- import {d,r}from'./chunk-6ZPNLCMN.js';import {Gb,Hb}from'./chunk-MMXWSV6V.js';import {Ud,Ze}from'./chunk-VRGBJY4Q.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var S="os-shared-Logo",n={root:`${S}-root`,skeleton:`${S}-skeleton`},C="logo";var R=styled(d)(({theme:s})=>({borderRadius:"50%",backgroundColor:s.palette.common.white}));var I=forwardRef(({className:s,sx:f,id:a,src:o,width:g=24,height:d=24,isError:E,isLoading:P,fallback:e,onError:u,alt:U=C},v)=>{let[w,H]=useState(),m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),t=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),r$1=E||!!t&&w===t,M=useMemo(()=>r$1||!o?typeof e=="string"&&e?e:Ud:m?Ze:t,[o,e,r$1,m,t]),h=useCallback(j=>{H(t),u?.(j);},[t,u]);return P?jsx(r,{variant:"circular",className:n.skeleton,sx:Gb({width:g,height:d,flexShrink:0},f),"data-testid":a??"Logo"}):(r$1||!o)&&e!==void 0&&typeof e!="string"?jsx(Fragment,{children:e}):jsx(R,{ref:v,id:a,"data-testid":a??"Logo",alt:U,src:M,onError:h,className:Hb(n.root,s),sx:Gb({width:g,height:d,objectFit:m&&o&&!r$1?"none":"contain"},f)})});I.displayName="Logo";var $=memo(I);export{n as a,$ as b};
1
+ import {d,r}from'./chunk-HR4BT24K.js';import {Gb,Hb}from'./chunk-WCH7VAS5.js';import {Ud,Ze}from'./chunk-ASZPO74G.js';import {forwardRef,useState,useMemo,useCallback,memo}from'react';import {styled}from'@mui/material/styles';import {jsx,Fragment}from'react/jsx-runtime';var S="os-shared-Logo",n={root:`${S}-root`,skeleton:`${S}-skeleton`},C="logo";var R=styled(d)(({theme:s})=>({borderRadius:"50%",backgroundColor:s.palette.common.white}));var I=forwardRef(({className:s,sx:f,id:a,src:o,width:g=24,height:d=24,isError:E,isLoading:P,fallback:e,onError:u,alt:U=C},v)=>{let[w,H]=useState(),m=useMemo(()=>typeof o!="string"&&!!o?.type?.includes("application/pdf"),[o]),t=useMemo(()=>o?typeof o=="string"?o:(window.URL?URL:webkitURL).createObjectURL(o):"",[o]),r$1=E||!!t&&w===t,M=useMemo(()=>r$1||!o?typeof e=="string"&&e?e:Ud:m?Ze:t,[o,e,r$1,m,t]),h=useCallback(j=>{H(t),u?.(j);},[t,u]);return P?jsx(r,{variant:"circular",className:n.skeleton,sx:Gb({width:g,height:d,flexShrink:0},f),"data-testid":a??"Logo"}):(r$1||!o)&&e!==void 0&&typeof e!="string"?jsx(Fragment,{children:e}):jsx(R,{ref:v,id:a,"data-testid":a??"Logo",alt:U,src:M,onError:h,className:Hb(n.root,s),sx:Gb({width:g,height:d,objectFit:m&&o&&!r$1?"none":"contain"},f)})});I.displayName="Logo";var $=memo(I);export{n as a,$ as b};
@@ -1 +1 @@
1
- import {r,p as p$1}from'./chunk-6ZPNLCMN.js';import {Vb}from'./chunk-MMXWSV6V.js';import {useId,Fragment}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),L=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function x({xAxis:e,yAxis:t,series:n,isLoading:s,tooltip:l}){let c=Vb(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:c,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx(L,{}),d.map((r,i)=>jsx(g,{children:e.render?e.render(r):r},`x-${i}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,i)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${i}-${r$1}`),d.map((m,h)=>{if(s)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${m}-${h}`);let f=n?.[m]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,m,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${m}-${h}`)})]},`y-${i}-${r$1}`))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let s=n-t,l=(e-t)/s,c=Math.floor(l*10);return H[Math.max(0,Math.min(10,c))]}var j=x;export{D as a,j as b};
1
+ import {r,p as p$1}from'./chunk-HR4BT24K.js';import {Vb}from'./chunk-WCH7VAS5.js';import {useId,Fragment}from'react';import p from'@mui/material/Box';import {styled,alpha}from'@mui/material/styles';import {jsxs,jsx}from'react/jsx-runtime';var u=styled(p)(({rows:e,columns:t})=>({display:"grid",gridTemplateColumns:`auto repeat(${t}, 1fr)`,gridTemplateRows:`auto repeat(${e}, 1fr)`,gap:"6px"})),L=styled(p)(()=>({width:24,position:"sticky",top:0,left:0,zIndex:3})),g=styled(p)(({theme:e})=>({display:"flex",justifyContent:"center",alignItems:"center",textAlign:"center",fontSize:"10px",fontWeight:500,color:e.palette.grey[700],lineHeight:"100%",letterSpacing:"0",position:"sticky",top:0,zIndex:2,backgroundColor:"#fbfbfb"})),M=styled(p)(({theme:e,percentage:t=0})=>({width:"24px",height:"8px",borderRadius:"1px",backgroundColor:t===0?alpha(e.palette.grey[700],.1):alpha(e.palette.info.dark,t)})),O=styled(g)(()=>({fontSize:"9px",top:"auto",left:0,zIndex:1})),w=styled(p)(()=>({padding:"22px 12px",overflow:"auto",maxHeight:"480px"}));function x({xAxis:e,yAxis:t,series:n,isLoading:s,tooltip:l}){let c=Vb(useId(),"heat-map"),d=e.labels,y=t.labels;return jsxs(w,{id:c,"data-testid":"HeatMap",children:[jsxs(u,{className:"x-labels",rows:1,columns:d.length,children:[jsx(L,{}),d.map((r,i)=>jsx(g,{children:e.render?e.render(r):r},`x-${i}-${r}`))]}),jsx(u,{className:"y-labels",rows:y.length,columns:d.length,children:y.map((r$1,i)=>jsxs(Fragment,{children:[jsx(O,{sx:{minWidth:"25px"},children:t.render?t.render(r$1):r$1},`y-${i}-${r$1}`),d.map((m,h)=>{if(s)return jsx(r,{variant:"rectangular",width:"24px",height:"8px"},`${m}-${h}`);let f=n?.[m]?.[r$1]??{};return jsx(p$1,{title:l?.render&&f?.value?l.render(f,m,r$1):null,children:jsx(M,{percentage:f?.colorOpacityDegree})},`${m}-${h}`)})]},`y-${i}-${r$1}`))})]})}var H=[.06,.1,.2,.3,.4,.5,.6,.7,.8,.9,1];function D(e,t,n){if(t===n)return 0;let s=n-t,l=(e-t)/s,c=Math.floor(l*10);return H[Math.max(0,Math.min(10,c))]}var j=x;export{D as a,j as b};
@@ -1 +1 @@
1
- import {f,g,h as h$2,i as i$1,b}from'./chunk-P4S7PQWK.js';import {d,c as c$1}from'./chunk-TZZV6XFT.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-NR5II44J.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Gb,Hb}from'./chunk-MMXWSV6V.js';import'./chunk-VRGBJY4Q.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:Hb(d,o.className),"data-testid":i,...l,sx:Gb({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:Hb(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:Hb(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:Gb({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:Hb(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:Gb({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?Gb(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
1
+ import {d,c as c$1}from'./chunk-IUXW2N5T.js';import {f,g,h as h$2,i as i$1,b}from'./chunk-36VZZ5EB.js';import {h as h$1,i,b as b$1,c as c$2,f as f$2,e,d as d$1,j as j$1}from'./chunk-D7362WJB.js';import {h,c,f as f$1}from'./chunk-ISC5KT5E.js';import {Gb,Hb}from'./chunk-WCH7VAS5.js';import'./chunk-ASZPO74G.js';import {memo,forwardRef,useState,useEffect,useRef}from'react';import {createPortal}from'react-dom';import oo from'@mui/material/Backdrop';import {styled,alpha}from'@mui/material/styles';import v from'@mui/material/Box';import {motion,animate}from'framer-motion';import {jsx,jsxs,Fragment}from'react/jsx-runtime';var H="os-shared-WindowShell",x={root:`${H}-root`,sidebar:`${H}-sidebar`,body:`${H}-body`,panel:`${H}-panel`};var we=styled(v)(()=>({display:"flex",flexDirection:"row",flex:1,minHeight:0,height:"100%",backgroundColor:"transparent"})),xe=styled(v)(()=>({flexShrink:0,overflow:"hidden auto",backgroundColor:"transparent",transition:"none"})),be=styled(v)(({theme:e})=>({flexShrink:0,overflow:"hidden auto",borderLeft:`1px solid ${e.palette.divider}`,backgroundColor:"transparent",transition:"none"})),ye=styled(v)(()=>({display:"flex",flexDirection:"column",flex:1,minWidth:0,minHeight:0})),ze=styled(v,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative",width:e})),Ne=styled(motion.div)(()=>({flexShrink:0,overflow:"hidden",display:"flex",alignItems:"stretch",position:"relative"})),Ce=styled(motion.div,{shouldForwardProp:e=>e!=="$slotWidth"})(({$slotWidth:e})=>({width:e,minWidth:e,minHeight:"100%",height:"100%",overflow:"hidden"})),Ie=styled(v,{shouldForwardProp:e=>e!=="$visible"&&e!=="$duration"})(({$visible:e=true,$duration:o=h})=>({display:"flex",alignItems:"center",overflow:"hidden",whiteSpace:"nowrap",flexShrink:0,maxWidth:e?160:0,opacity:e?1:0,pointerEvents:e?"auto":"none",transition:o>0?`max-width ${.3*o}s ease-in-out, opacity ${.24*o}s ease-in-out`:"none"})),Te=styled(h$1,{shouldForwardProp:e=>e!=="$width"})(({$width:e})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e}:null})),Pe=styled(i,{shouldForwardProp:e=>e!=="$width"&&e!=="$justifyContent"})(({$width:e,$justifyContent:o="flex-start"})=>({...e!=null?{flex:`0 0 ${e}px`,maxWidth:e,justifyContent:o}:null}));var Ue=220;function ge(e,o,a){return Math.min(Math.max(e,o??0),a??1/0)}function Ae(e,o,a,n){if(Math.abs(e-o)<=1)return;let r=animate(0,1,{duration:a,onUpdate:t=>{n(s=>({...s,width:e+(o-e)*t}));}});return ()=>r.stop()}function G(e,o){if(e===false)return {duration:0,resize:o};let a=typeof e=="object"?e:void 0,n=a?.duration;return {duration:typeof n=="number"&&Number.isFinite(n)?Math.max(0,n):h,resize:a?.resize??o}}function j(e){return e?.children==null||e.expand?.isExpanded===false?false:e.expand?.isExpanded===true}function F(e,o=Ue){let a=Array.isArray(e)?e.flat():[e];for(let n=a.length-1;n>=0;n--){let r=a[n];if(r!=null&&typeof r=="object"&&!Array.isArray(r)&&typeof r.width=="number")return r.width}return o}function Ee(e){let o=e["data-id"]??e.id;return o!=null?{"data-id":o}:{}}function Me({kind:e,slot:o,isOpen:a,fullWidth:n,wrapperWidth:r,animateWrapperWidth:t,animation:s}){let p=e==="sidebar"?xe:be,d=e==="sidebar"?x.sidebar:x.panel,m=o["data-testid"]?`${o["data-testid"]}Wrapper`:e==="sidebar"?"WindowShellSidebarWrapper":"WindowShellPanelWrapper",i=o["data-testid"]??o.id??(e==="sidebar"?"WindowShellSidebar":"WindowShellPanel"),l=Ee(o),u=jsx(p,{id:o.id,className:Hb(d,o.className),"data-testid":i,...l,sx:Gb({width:n,minWidth:0},o.sx),children:jsx(Ce,{$slotWidth:n,initial:false,animate:{x:a?0:-n},transition:{duration:s.duration},children:o.children})});return t?jsx(Ne,{"data-testid":m,...l,initial:false,animate:{width:r},transition:{duration:s.duration},children:u}):jsx(ze,{"data-testid":m,...l,$width:r,children:u})}Me.displayName="WindowShellSlotColumn";var J=memo(Me);function De({baseWindowWidth:e,sidebar:o,panel:a,content:n,bodyContent:r,sidebarOpen:t,showPanel:s,sidebarFullWidth:p,panelFullWidth:d,sidebarAnimation:m,panelAnimation:i}){let{size:l}=b(),u=i.resize==="window",W=typeof e=="number"?Math.max(0,e-(u?d:0)-(m.resize==="window"&&!t?p:0)):l.width,b$1=u?s?Math.min(d,Math.max(0,l.width-W)):0:s?d:0,y=t?p:0;return jsxs(we,{className:Hb(x.root),children:[o?.children?jsx(J,{kind:"sidebar",slot:o,isOpen:t,fullWidth:p,wrapperWidth:y,animateWrapperWidth:true,animation:m}):null,jsx(ye,{id:n?.id?`${n.id}Body`:void 0,className:Hb(x.body,n?.className),"data-testid":n?.["data-testid"]?`${n["data-testid"]}Body`:n?.id?`${n.id}Body`:"WindowShellBody",...(n?.["data-id"]??n?.id)!=null?{"data-id":n?.["data-id"]?`${n["data-id"]}Body`:`${n?.id}Body`}:null,sx:n?.sx,children:r}),a?.children?jsx(J,{kind:"panel",slot:a,isOpen:s,fullWidth:d,wrapperWidth:b$1,animateWrapperWidth:!u,animation:i}):null]})}De.displayName="WindowShellSlotsLayout";var Re=memo(De);function $e({sidebarOpen:e,showPanel:o,sidebarResize:a,panelResize:n,sidebarDuration:r,panelDuration:t}){let{size:s,setSize:p,defaultSize:d,minSize:m,maxSize:i}=b(),l=useRef(s);l.current=s;let u=useRef(d.width),W=useRef(e),b$1=useRef(o),y=useRef(d.width);return useEffect(()=>{let C=b$1.current!==o,w=W.current!==e,E=y.current!==d.width;b$1.current=o,W.current=e,y.current=d.width;let S;if(w&&a==="window"?S=r:(C&&n==="window"||E&&!C&&!w)&&(S=t),S==null)return;let h=ge(d.width,m?.width,i?.width);return u.current=h,Ae(l.current.width,h,S,p)},[d.width,o,e,a,n,r,t,m?.width,i?.width,p]),null}$e.displayName="WindowShellAnimator";var Oe=memo($e);function ve({toolbar:e$1,sidebar:o,panel:a,animationDuration:n=h}){let{title:r,titleIcon:t,onClose:s,onMinimize:p,onMaximize:d,startAdornment:m,endAdornment:i,id:l,className:u,"data-testid":W,"data-id":b$2,sx:y}=e$1??{},{isMaximized:C}=b(),w=typeof s=="function"?s:void 0,E=typeof p=="function"?p:void 0,S=typeof d=="function"?d:void 0,h=o?.expand,c=a?.expand,z=j(a),L=h?.isExpanded??true,M=h!=null&&o?.children!=null,D=c!=null&&a?.children!=null&&z,k=M&&D,V=F(a?.sx),_=o!=null?F(o.sx):0,I=Math.max(_,V),T=k&&L?I:void 0,Z=D?I:void 0,X=D;return jsxs(b$1,{id:l??f$1,className:u,"data-testid":W??l??"WindowToolbar","data-id":b$2??l,sx:y,children:[jsxs(Te,{$width:T,children:[w?jsx(c$2,{onClick:w}):null,E?jsx(f$2,{onClick:E}):null,S?jsx(e,{isMaximized:C,onClick:S}):null,M&&h?jsx(d$1,{direction:h.isExpanded??true?"left":"right",active:h.isExpanded??true,onClick:h.onExpand,children:h.label}):null,m]}),jsx(j$1,{title:r,icon:t}),jsxs(Pe,{$width:Z,$justifyContent:i?"space-between":"flex-start",children:[D?jsx(Ie,{$visible:X,$duration:n,children:jsx(d$1,{sx:{flexShrink:0},direction:c?.isExpanded??true?"left":"right",active:z,onClick:c?.onExpand,children:c?.label})}):null,i]})]})}ve.displayName="WindowShellToolbar";var Fe=memo(ve);var Be=forwardRef(function({isOpen:o,className:a,sx:n,toolbar:r,services:t,sidebar:s,panel:p,footer:d$1,content:m,window:i,backdrop:l},u){let W=t?.list??[],b=(t?.isLoading??false)||W.length>0,y=d$1!=null&&(d$1.isVisible??true),C=s?.children,w=F(s?.sx),E=p?.children,S=p!=null?F(p.sx):0,h=m?.children,c$2=s?.expand?.isExpanded??C!=null,z=j(p),L=!!(C||E),[M,D]=useState(w),[k,V]=useState(S);useEffect(()=>{c$2&&D(w),z&&V(S);},[c$2,w,z,S]);let _=r?.onClose??r?.onMinimize??(()=>{}),I=G(s?.animation,"in-place"),T=G(p?.animation,"in-place"),Z=(()=>{let P=i?.defaultSize;if(typeof P?.width!="number")return P;let oe=(I.resize==="window"&&!c$2?M:0)+(T.resize==="window"&&!z?k:0);return oe>0?{...P,width:Math.max(0,P.width-oe)}:P})(),X={height:i?.minSize?.height??i?.defaultSize?.height??c,...i?.minSize?.width!=null?{width:i.minSize.width}:null},Le=l!=null&&(l.isVisible??true)&&o&&!i?.isMinimized,_e=(i?.order??0)+10-1,ee=jsx(oo,{open:true,onClick:_,id:l?.id,className:l?.className,"data-testid":l?.["data-testid"]??l?.id??"WindowShellBackdrop",...(l?.["data-id"]??l?.id)!=null?{"data-id":l?.["data-id"]??l?.id}:null,sx:Gb({zIndex:_e,backgroundColor:P=>alpha(P.palette.common.black,.3)},l?.sx)});return jsxs(Fragment,{children:[Le&&(i?.disablePortal?ee:createPortal(ee,document.body)),jsxs(f,{ref:u,isOpen:o,onClose:_,defaultSize:Z,minSize:X,maxSize:i?.maxSize,defaultPosition:i?.defaultPosition,containerRef:i?.containerRef,order:i?.order,isMinimized:i?.isMinimized,isMaximized:i?.isMaximized,id:i?.id,className:Hb(x.root,i?.className,a),sx:n,onResize:i?.onResize,onDragStart:i?.onDragStart,onMouseDown:i?.onMouseDown,onClick:i?.onClick,disablePortal:i?.disablePortal,"data-testid":i?.["data-testid"]??i?.id,"data-id":i?.["data-id"]??i?.id,children:[jsx(Oe,{sidebarOpen:c$2,showPanel:z,sidebarWidth:M,panelWidth:k,sidebarResize:I.resize,panelResize:T.resize,sidebarDuration:I.duration,panelDuration:T.duration}),jsx(Fe,{toolbar:r,sidebar:s,panel:p,animationDuration:T.duration}),b?t?.isLoading?jsx(d,{appCode:t?.appCode,id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:Gb({height:"auto",flexShrink:0},t?.sx)}):jsx(c$1,{services:W,serviceCode:t?.activeCode??"",onOpenService:t?.onOpen,onOpenServiceInNewWindow:t?.onOpenInNewWindow,language:t?.language??"en",openInNewWindowLabel:t?.openInNewWindowLabel??"Open in new window",id:t?.id,className:t?.className,"data-testid":t?.["data-testid"]??t?.id,"data-id":t?.["data-id"]??t?.id,sx:t?.sx}):null,jsx(g,{id:m?.id,className:m?.className,"data-testid":m?.["data-testid"]??m?.id,"data-id":m?.["data-id"]??m?.id,sx:L?void 0:m?.sx,children:L?jsx(Re,{baseWindowWidth:typeof i?.defaultSize?.width=="number"?i.defaultSize.width:void 0,sidebar:s,panel:p,content:m,bodyContent:h,sidebarOpen:c$2,showPanel:z,sidebarFullWidth:M,panelFullWidth:k,sidebarAnimation:I,panelAnimation:T}):h}),y?jsxs(h$2,{id:d$1?.id,className:d$1?.className,"data-testid":d$1?.["data-testid"]??d$1?.id,"data-id":d$1?.["data-id"]??d$1?.id,sx:d$1?.isVisible===true?Gb(d$1?.sx??{},{"&:empty, &:has(> :only-child:empty)":{display:"flex"}}):d$1?.sx,children:[d$1?.children,d$1?.actions?jsx(i$1,{children:d$1.actions}):null]}):null]})]})});Be.displayName="WindowShell";var to=memo(Be);export{x as a,to as b};
@@ -1 +1 @@
1
- import {Hb}from'./chunk-MMXWSV6V.js';import {forwardRef,useRef,useState,useCallback,useLayoutEffect,memo}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var s="os-shared-CardList",e={root:`${s}-root`,item:`${s}-item`,itemContent:`${s}-itemContent`,itemStartAdornment:`${s}-itemStartAdornment`,itemText:`${s}-itemText`,itemEndAdornment:`${s}-itemEndAdornment`};var b=styled(g,{shouldForwardProp:t=>t!=="$showShadow"})(({theme:t,$showShadow:a})=>({borderRadius:"8px",overflow:"auto",flexGrow:1,height:"100%",listStyle:"none",margin:0,padding:0,boxSizing:"border-box",[`& .${e.item}:last-of-type`]:{borderBottom:"none"},"&::after":{content:'""',position:"sticky",bottom:0,display:"block",height:"32px",marginTop:"-32px",background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(251, 251, 251, 0.8) 100%)",borderRadius:"0 0 8px 8px",pointerEvents:"none",zIndex:1,transition:t.transitions.create("opacity",{duration:250}),opacity:a?1:0}})),N=styled(g)(({theme:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingInlineStart:"12px",paddingInlineEnd:"8px",borderBottom:`1px solid ${t.palette.divider}`,height:40,boxSizing:"border-box"})),E=styled("aside")({display:"flex",alignItems:"center",gap:"8px"}),T=styled("span")(({theme:t})=>({color:t.v2.palette.base.black,fontSize:"11px",fontWeight:500,lineHeight:"13.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),$=styled("aside")({display:"flex",alignItems:"center"}),A=styled("aside")({display:"flex",alignItems:"center",gap:"4px"});var v=forwardRef(({hasShadow:t=true,children:a,onScroll:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>{let L=useRef(null),[P,H]=useState(true),f=useCallback(()=>{let o=L.current;if(!o)return;let{scrollTop:S,scrollHeight:u,clientHeight:I}=o,h=u>I+1&&(S===0||I<u-S-1);H(w=>w===h?w:h);},[]);useLayoutEffect(()=>{f();});let z=useCallback(o=>{L.current=o,typeof r=="function"?r(o):r&&(r.current=o);},[r]),B=useCallback(o=>{f(),i?.(o);},[i,f]);return jsx(b,{...C,component:"ul",ref:z,id:d,"data-testid":c??d??"CardList",onScroll:B,className:Hb(e.root,l),sx:p,$showShadow:P&&t,children:a})});v.displayName="CardList";var G=memo(v);var k=forwardRef(({children:t,startAdornment:a,endAdornment:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>jsxs(N,{...C,component:"li",ref:r,id:d,"data-testid":c??d??"CardListItem",className:Hb(e.item,l),sx:p,children:[jsxs(E,{className:e.itemContent,children:[a&&jsx($,{className:e.itemStartAdornment,children:a}),jsx(T,{className:e.itemText,children:t})]}),i&&jsx(A,{className:e.itemEndAdornment,children:i})]}));k.displayName="CardListItem";var J=memo(k);export{e as a,G as b,J as c};
1
+ import {Hb}from'./chunk-WCH7VAS5.js';import {forwardRef,useRef,useState,useCallback,useLayoutEffect,memo}from'react';import g from'@mui/material/Box';import {styled}from'@mui/material/styles';import {jsx,jsxs}from'react/jsx-runtime';var s="os-shared-CardList",e={root:`${s}-root`,item:`${s}-item`,itemContent:`${s}-itemContent`,itemStartAdornment:`${s}-itemStartAdornment`,itemText:`${s}-itemText`,itemEndAdornment:`${s}-itemEndAdornment`};var b=styled(g,{shouldForwardProp:t=>t!=="$showShadow"})(({theme:t,$showShadow:a})=>({borderRadius:"8px",overflow:"auto",flexGrow:1,height:"100%",listStyle:"none",margin:0,padding:0,boxSizing:"border-box",[`& .${e.item}:last-of-type`]:{borderBottom:"none"},"&::after":{content:'""',position:"sticky",bottom:0,display:"block",height:"32px",marginTop:"-32px",background:"linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, rgba(251, 251, 251, 0.8) 100%)",borderRadius:"0 0 8px 8px",pointerEvents:"none",zIndex:1,transition:t.transitions.create("opacity",{duration:250}),opacity:a?1:0}})),N=styled(g)(({theme:t})=>({display:"flex",justifyContent:"space-between",alignItems:"center",paddingTop:"12px",paddingBottom:"12px",paddingInlineStart:"12px",paddingInlineEnd:"8px",borderBottom:`1px solid ${t.palette.divider}`,height:40,boxSizing:"border-box"})),E=styled("aside")({display:"flex",alignItems:"center",gap:"8px"}),T=styled("span")(({theme:t})=>({color:t.v2.palette.base.black,fontSize:"11px",fontWeight:500,lineHeight:"13.2px",overflow:"hidden",textOverflow:"ellipsis",whiteSpace:"nowrap"})),$=styled("aside")({display:"flex",alignItems:"center"}),A=styled("aside")({display:"flex",alignItems:"center",gap:"4px"});var v=forwardRef(({hasShadow:t=true,children:a,onScroll:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>{let L=useRef(null),[P,H]=useState(true),f=useCallback(()=>{let o=L.current;if(!o)return;let{scrollTop:S,scrollHeight:u,clientHeight:I}=o,h=u>I+1&&(S===0||I<u-S-1);H(w=>w===h?w:h);},[]);useLayoutEffect(()=>{f();});let z=useCallback(o=>{L.current=o,typeof r=="function"?r(o):r&&(r.current=o);},[r]),B=useCallback(o=>{f(),i?.(o);},[i,f]);return jsx(b,{...C,component:"ul",ref:z,id:d,"data-testid":c??d??"CardList",onScroll:B,className:Hb(e.root,l),sx:p,$showShadow:P&&t,children:a})});v.displayName="CardList";var G=memo(v);var k=forwardRef(({children:t,startAdornment:a,endAdornment:i,id:d,className:l,sx:p,"data-testid":c,...C},r)=>jsxs(N,{...C,component:"li",ref:r,id:d,"data-testid":c??d??"CardListItem",className:Hb(e.item,l),sx:p,children:[jsxs(E,{className:e.itemContent,children:[a&&jsx($,{className:e.itemStartAdornment,children:a}),jsx(T,{className:e.itemText,children:t})]}),i&&jsx(A,{className:e.itemEndAdornment,children:i})]}));k.displayName="CardListItem";var J=memo(k);export{e as a,G as b,J as c};