@fluidattacks/design 3.32.5-pr → 3.32.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (186) hide show
  1. package/dist/components/@core/index.js +1 -1
  2. package/dist/components/accordion/accordion-content/index.js +1 -1
  3. package/dist/components/accordion/index.js +1 -1
  4. package/dist/components/advanced-badge/index.js +1 -1
  5. package/dist/components/advisories-card/index.js +1 -1
  6. package/dist/components/alert/index.js +1 -1
  7. package/dist/components/avatar/index.js +1 -1
  8. package/dist/components/button/index.js +1 -1
  9. package/dist/components/card/card-header/index.js +1 -1
  10. package/dist/components/card/card-with-image/index.js +1 -1
  11. package/dist/components/card/card-with-input/index.js +1 -1
  12. package/dist/components/card/card-with-options/index.js +1 -1
  13. package/dist/components/card/card-with-selector/index.js +1 -1
  14. package/dist/components/card/card-with-switch/index.js +1 -1
  15. package/dist/components/card/index.js +1 -1
  16. package/dist/components/card/indicator-card/index.js +1 -1
  17. package/dist/components/card-container/index.js +1 -1
  18. package/dist/components/carousel/index.js +1 -1
  19. package/dist/components/checkbox/index.js +1 -1
  20. package/dist/components/cloud-image/index.js +1 -1
  21. package/dist/components/code-snippet/index.js +1 -1
  22. package/dist/components/code-snippet/location-code/index.js +1 -1
  23. package/dist/components/colors/index.js +1 -1
  24. package/dist/components/conditions-dialog/index.js +1 -1
  25. package/dist/components/confirm-dialog/index.js +1 -1
  26. package/dist/components/container/index.js +1 -1
  27. package/dist/components/copy-button/index.js +1 -1
  28. package/dist/components/divider/index.js +1 -1
  29. package/dist/components/dropdown/index.js +1 -1
  30. package/dist/components/empty-state/empty-button/index.js +1 -1
  31. package/dist/components/empty-state/index.js +1 -1
  32. package/dist/components/fa-tag/index.js +1 -1
  33. package/dist/components/file-preview/index.js +1 -1
  34. package/dist/components/filters/context/index.d.ts +5 -1
  35. package/dist/components/filters/context/index.js +1 -1
  36. package/dist/components/filters/context/types.d.ts +9 -7
  37. package/dist/components/filters/filters-menu/index.js +1 -1
  38. package/dist/components/filters/index.js +1 -1
  39. package/dist/components/filters/options-menu/index.js +1 -1
  40. package/dist/components/filters/options-menu/options/index.js +1 -1
  41. package/dist/components/form/index.js +1 -1
  42. package/dist/components/form/inner-form/index.js +1 -1
  43. package/dist/components/grid-container/index.js +1 -1
  44. package/dist/components/group-selector/index.js +1 -1
  45. package/dist/components/group-selector/option-container/index.js +1 -1
  46. package/dist/components/icon/index.js +1 -1
  47. package/dist/components/icon-button/index.js +1 -1
  48. package/dist/components/indicator-card-db/index.js +1 -1
  49. package/dist/components/info-sidebar/index.js +1 -1
  50. package/dist/components/inputs/fields/combobox/field/index.js +1 -1
  51. package/dist/components/inputs/fields/combobox/index.js +1 -1
  52. package/dist/components/inputs/fields/combobox/option/index.js +1 -1
  53. package/dist/components/inputs/fields/date/calendar/cell/index.js +1 -1
  54. package/dist/components/inputs/fields/date/calendar/grid/index.js +1 -1
  55. package/dist/components/inputs/fields/date/calendar/header/index.js +1 -1
  56. package/dist/components/inputs/fields/date/calendar/index.js +1 -1
  57. package/dist/components/inputs/fields/date/index.js +1 -1
  58. package/dist/components/inputs/fields/date-range/calendar/index.js +1 -1
  59. package/dist/components/inputs/fields/date-range/index.js +1 -1
  60. package/dist/components/inputs/fields/date-time/calendar/index.js +1 -1
  61. package/dist/components/inputs/fields/date-time/index.js +1 -1
  62. package/dist/components/inputs/fields/editable/index.js +1 -1
  63. package/dist/components/inputs/fields/input-array/field/index.js +1 -1
  64. package/dist/components/inputs/fields/input-array/index.js +1 -1
  65. package/dist/components/inputs/fields/input-file/index.js +1 -1
  66. package/dist/components/inputs/fields/input-section/index.js +1 -1
  67. package/dist/components/inputs/fields/input-tags/field/index.js +1 -1
  68. package/dist/components/inputs/fields/input-tags/index.js +1 -1
  69. package/dist/components/inputs/fields/number/index.js +1 -1
  70. package/dist/components/inputs/fields/number-range/index.js +1 -1
  71. package/dist/components/inputs/fields/phone/index.js +1 -1
  72. package/dist/components/inputs/fields/text-area/index.js +1 -1
  73. package/dist/components/inputs/fields/text-input/index.js +1 -1
  74. package/dist/components/inputs/index.js +1 -1
  75. package/dist/components/inputs/label/index.js +1 -1
  76. package/dist/components/inputs/outline-container/index.js +1 -1
  77. package/dist/components/inputs/utils/action-button/index.js +1 -1
  78. package/dist/components/inputs/utils/calendar-button/index.js +1 -1
  79. package/dist/components/inputs/utils/date-selector/index.js +1 -1
  80. package/dist/components/inputs/utils/date-time-field/index.js +1 -1
  81. package/dist/components/inputs/utils/dialog/index.js +1 -1
  82. package/dist/components/inputs/utils/number-field/index.js +1 -1
  83. package/dist/components/inputs/utils/popover/index.js +1 -1
  84. package/dist/components/item-card-db/index.js +1 -1
  85. package/dist/components/layout/categories/buttons/index.js +1 -1
  86. package/dist/components/layout/categories/column/index.js +1 -1
  87. package/dist/components/layout/categories/gap/index.js +1 -1
  88. package/dist/components/layout/categories/row/index.js +1 -1
  89. package/dist/components/layout/index.js +1 -1
  90. package/dist/components/link/index.js +1 -1
  91. package/dist/components/list-item/index.js +1 -1
  92. package/dist/components/little-flag/index.js +1 -1
  93. package/dist/components/loading/index.js +1 -1
  94. package/dist/components/logo/index.js +1 -1
  95. package/dist/components/lottie/index.js +1 -1
  96. package/dist/components/menu/index.js +1 -1
  97. package/dist/components/message-banner/index.js +1 -1
  98. package/dist/components/modal/columns-modal/index.js +1 -1
  99. package/dist/components/modal/columns-modal/preview-panel/index.js +1 -1
  100. package/dist/components/modal/columns-modal/search-panel/index.js +1 -1
  101. package/dist/components/modal/filters-modal/applied-filter/index.js +1 -1
  102. package/dist/components/modal/filters-modal/applied-filters/index.js +1 -1
  103. package/dist/components/modal/filters-modal/column-filters/index.js +1 -1
  104. package/dist/components/modal/filters-modal/filter-control/index.js +1 -1
  105. package/dist/components/modal/filters-modal/filter-form/form-content/index.js +1 -1
  106. package/dist/components/modal/filters-modal/filter-form/hooks/index.js +1 -1
  107. package/dist/components/modal/filters-modal/filter-form/index.js +1 -1
  108. package/dist/components/modal/filters-modal/filters-list/index.js +1 -1
  109. package/dist/components/modal/filters-modal/index.js +1 -1
  110. package/dist/components/modal/footer/index.js +1 -1
  111. package/dist/components/modal/header/index.js +1 -1
  112. package/dist/components/modal/index.js +1 -1
  113. package/dist/components/modal/modal-confirm/index.js +1 -1
  114. package/dist/components/notification/index.js +1 -1
  115. package/dist/components/notification-sign/index.js +1 -1
  116. package/dist/components/oauth-selector/index.js +1 -1
  117. package/dist/components/oauth-selector/option-container/index.js +1 -1
  118. package/dist/components/paginator-db/btn/index.js +1 -1
  119. package/dist/components/paginator-db/dropdown/index.js +1 -1
  120. package/dist/components/paginator-db/index.js +1 -1
  121. package/dist/components/pop-up/description/index.js +1 -1
  122. package/dist/components/pop-up/index.js +1 -1
  123. package/dist/components/premium-feature/index.js +1 -1
  124. package/dist/components/priority-cards/card/index.js +1 -1
  125. package/dist/components/priority-cards/index.js +1 -1
  126. package/dist/components/priority-score/index.js +1 -1
  127. package/dist/components/progress-bar/index.js +1 -1
  128. package/dist/components/progress-indicator/in-progress-icon/index.js +1 -1
  129. package/dist/components/progress-indicator/index.js +1 -1
  130. package/dist/components/progress-indicator/step/index.js +1 -1
  131. package/dist/components/radio-button/index.js +1 -1
  132. package/dist/components/rank-position/icon/index.js +1 -1
  133. package/dist/components/rank-position/index.js +1 -1
  134. package/dist/components/scroll-button/index.js +1 -1
  135. package/dist/components/search/index.js +1 -1
  136. package/dist/components/search-dropdown/index.js +1 -1
  137. package/dist/components/severity-badge/index.js +1 -1
  138. package/dist/components/severity-overview/badge/index.js +1 -1
  139. package/dist/components/severity-overview/index.js +1 -1
  140. package/dist/components/show-on-hover/index.js +1 -1
  141. package/dist/components/slide-out-menu/index.js +1 -1
  142. package/dist/components/slide-out-menu/menu-item/index.js +1 -1
  143. package/dist/components/slider/index.js +1 -1
  144. package/dist/components/slider/thumb/index.js +1 -1
  145. package/dist/components/step-lapse/index.js +1 -1
  146. package/dist/components/table/context/index.js +1 -1
  147. package/dist/components/table/export-csv/index.js +1 -1
  148. package/dist/components/table/index.js +1 -1
  149. package/dist/components/table/pagination/pagination-control/index.js +1 -1
  150. package/dist/components/table/pagination/pagination-dropdown/index.js +1 -1
  151. package/dist/components/table/pagination/pagination-size/index.js +1 -1
  152. package/dist/components/table/sort-icon/index.js +1 -1
  153. package/dist/components/table/table-body/index.js +1 -1
  154. package/dist/components/table/table-column-toggle/index.js +1 -1
  155. package/dist/components/table/table-content/head/index.js +1 -1
  156. package/dist/components/table/table-content/index.js +1 -1
  157. package/dist/components/table/table-footer/footer-content/index.js +1 -1
  158. package/dist/components/table/table-footer/index.js +1 -1
  159. package/dist/components/table/table-options/caption-content/index.js +1 -1
  160. package/dist/components/table/table-options/controls-content/index.js +1 -1
  161. package/dist/components/table/table-options/highlighted-content/index.js +1 -1
  162. package/dist/components/table/table-options/index.js +1 -1
  163. package/dist/components/table/wrapper/index.js +1 -1
  164. package/dist/components/table-button/index.js +1 -1
  165. package/dist/components/table-content/index.js +1 -1
  166. package/dist/components/table-content/item-content/index.js +1 -1
  167. package/dist/components/tabs/index.js +1 -1
  168. package/dist/components/tabs/tab/index.js +1 -1
  169. package/dist/components/tag/index.js +1 -1
  170. package/dist/components/timeline/card/index.js +1 -1
  171. package/dist/components/timeline/index.js +1 -1
  172. package/dist/components/toggle/index.js +1 -1
  173. package/dist/components/tooltip/index.js +1 -1
  174. package/dist/components/tour/index.js +1 -1
  175. package/dist/components/typography/heading/index.js +1 -1
  176. package/dist/components/typography/index.js +1 -1
  177. package/dist/components/typography/span/index.js +1 -1
  178. package/dist/components/typography/text/index.js +1 -1
  179. package/dist/components/weaknesses-card/index.js +1 -1
  180. package/dist/{components-Dfd9J-I1.mjs → components-Dlv627Xs.mjs} +1288 -1281
  181. package/dist/{components-S0J7NDko.js → components-ns0dRgF_.js} +45 -45
  182. package/dist/hooks/index.js +1 -1
  183. package/dist/index.js +1 -1
  184. package/dist/{vendor-SVxrF0CD.js → vendor-CBvWb1f3.js} +22 -22
  185. package/dist/{vendor-BHb31Lcp.mjs → vendor-DToqrEiN.mjs} +6 -4
  186. package/package.json +1 -1
@@ -1,11 +1,11 @@
1
- "use strict";const t=require("react/jsx-runtime"),u=require("react"),f=require("styled-components"),y=require("./vendor-SVxrF0CD.js"),xe=require("react-dom"),at=require("react-router-dom"),Wi=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Ke=Wi(u),ie=e=>({getVariant:(n,i)=>e(n)[i]}),rn=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],_i={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},Bi={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},Hi={25:"",50:"",100:"#f59dbe",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},Vi={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},Ui={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#f27100",700:"#b54708",800:"",900:""},Gi={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},Yi={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},Ki="linear-gradient(180deg, #BF0B1A 0%, #F32637 100%)",Xi={type:{primary:"Roboto, sans-serif",mono:"'Space Mono', monospace"},heading:{lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{lg:"16px",md:"14px",sm:"12px",xs:"10px"},weight:{bold:"700",regular:"400"}},Zi={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},qi={sm:"1024px",md:"1440px",lg:"1920px"},Ji={0:"0rem",.125:"0.125rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",.875:"0.875rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",4:"4rem",5:"5rem",6:"6rem"},Qi=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark","arrow-down","arrow-left","arrow-right","arrow-up","plus","minus","check","circle-question"],A={typography:Xi,shadows:Zi,breakpoints:qi,spacing:Ji,palette:{primary:Bi,complementary:Hi,error:Vi,info:Yi,warning:Ui,success:Gi,black:"#0c111d",gradient:Ki,white:"#ffffff",gray:_i}},eo=({children:e})=>t.jsx(f.ThemeProvider,{theme:A,children:e}),L=(e,n)=>n===void 0?"":`${e}: ${n};`,Ie=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,o=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[a,l,s,c]=e.padding;return`padding: ${A.spacing[a]} ${A.spacing[l]} ${A.spacing[s]} ${A.spacing[c]};`}return`padding: ${A.spacing[n]} ${A.spacing[i]} ${A.spacing[o]} ${A.spacing[r]};`},De=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,o=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[a,l,s,c]=e.margin;return`margin: ${A.spacing[a]} ${A.spacing[l]} ${A.spacing[s]} ${A.spacing[c]};`}return`margin: ${A.spacing[n]} ${A.spacing[i]} ${A.spacing[o]} ${A.spacing[r]};`},Fe=e=>{const n=L("position",e.position),i=L("top",e.top),o=L("right",e.right),r=L("bottom",e.bottom),a=L("left",e.left),l=L("z-index",e.zIndex);return`
1
+ "use strict";const t=require("react/jsx-runtime"),u=require("react"),f=require("styled-components"),y=require("./vendor-CBvWb1f3.js"),xe=require("react-dom"),at=require("react-router-dom"),Wi=e=>e&&typeof e=="object"&&"default"in e?e:{default:e},Ke=Wi(u),ie=e=>({getVariant:(n,i)=>e(n)[i]}),rn=["padding","px","py","pl","pr","pt","pb","margin","mx","my","ml","mr","mt","mb","zIndex","position","top","right","bottom","left","border","borderTop","borderRight","borderBottom","borderLeft","borderColor","borderRadius","scroll","visibility","display","height","width","maxHeight","maxWidth","minHeight","minWidth","shadow","bgColor","bgGradient","gap","flexDirection","flexGrow","justify","justifySelf","alignItems","alignSelf","wrap","color","fontFamily","fontSize","fontWeight","textAlign","whiteSpace","letterSpacing","lineSpacing","textDecoration","textOverflow","whiteSpace","wordBreak","wordWrap","cursor","transition","borderColorHover","bgColorHover","shadowHover"],_i={25:"#fcfcfd",50:"#f9fafb",100:"#f2f4f7",200:"#eaecf0",300:"#d0d5dd",400:"#98a2b3",500:"#667085",600:"#475467",700:"#2f394b",800:"#212a36",900:"#161b25"},Bi={25:"#fef2f3",50:"#fddfe2",100:"#fbbac0",200:"#f9959e",300:"#f65e6a",400:"#f32637",500:"#bf0b1a",600:"#ac0a17",700:"#9a0915",800:"#870812",900:"#750710"},Hi={25:"",50:"",100:"#f59dbe",200:"",300:"#b8075d",400:"",500:"#7f0540",600:"",700:"#59042d",800:"",900:"#460323"},Vi={25:"",50:"#fef3f2",100:"",200:"#fecdca",300:"",400:"",500:"#f04438",600:"",700:"#b42318",800:"",900:""},Ui={25:"",50:"#fffaeb",100:"",200:"#fef0c7",300:"",400:"#ffd562",500:"#fdb022",600:"#f27100",700:"#b54708",800:"",900:""},Gi={25:"",50:"#f6fef9",100:"",200:"#a6f4c5",300:"",400:"",500:"#12b76a",600:"",700:"#027a48",800:"",900:""},Yi={25:"",50:"#eff8ff",100:"",200:"#b2ddff",300:"",400:"",500:"#2e90fa",600:"",700:"#175cd3",800:"",900:""},Ki="linear-gradient(180deg, #BF0B1A 0%, #F32637 100%)",Xi={type:{primary:"Roboto, sans-serif",mono:"'Space Mono', monospace"},heading:{lg:"32px",md:"24px",sm:"20px",xs:"16px"},text:{lg:"16px",md:"14px",sm:"12px",xs:"10px"},weight:{bold:"700",regular:"400"}},Zi={none:"none",sm:"0px 1px 2px 0px rgba(16, 24, 40, 0.15)",md:"0px 4px 6px 0px rgba(16, 24, 40, 0.15)",lg:"0px 8px 24px 0px rgba(16, 24, 40, 0.15)"},qi={sm:"1024px",md:"1440px",lg:"1920px"},Ji={0:"0rem",.125:"0.125rem",.25:"0.25rem",.5:"0.5rem",.625:"0.625rem",.75:"0.75rem",.875:"0.875rem",1:"1rem",1.25:"1.25rem",1.5:"1.5rem",1.75:"1.75rem",2:"2rem",2.25:"2.25rem",2.5:"2.5rem",3:"3rem",4:"4rem",5:"5rem",6:"6rem"},Qi=["lock-keyhole","bars-sort","bolt","books","brain-circuit","briefcase","bug","buildings","bullseye-pointer","calendar-clock","calendar-xmark","chart-network","clipboard-check","comment","envelope","eye","file","flag","globe","hand-holding-dollar","hands-clapping","headset","hexagon-exclamation","light-emergency-on","magnifying-glass","pen-line","plane-departure","screwdriver-wrench","sensor-triangle-exclamation","shield-check","sidebar","skull","sliders","star-christmas","telescope","trash","unlock","user-group","user-hoodie","xmark","arrow-down","arrow-left","arrow-right","arrow-up","plus","minus","check","circle-question"],A={typography:Xi,shadows:Zi,breakpoints:qi,spacing:Ji,palette:{primary:Bi,complementary:Hi,error:Vi,info:Yi,warning:Ui,success:Gi,black:"#0c111d",gradient:Ki,white:"#ffffff",gray:_i}},eo=({children:e})=>t.jsx(f.ThemeProvider,{theme:A,children:e}),L=(e,n)=>n===void 0?"":`${e}: ${n};`,Ie=e=>{const n=e.py??e.pt??0,i=e.px??e.pr??0,o=e.py??e.pb??0,r=e.px??e.pl??0;if(e.padding){const[a,l,s,c]=e.padding;return`padding: ${A.spacing[a]} ${A.spacing[l]} ${A.spacing[s]} ${A.spacing[c]};`}return`padding: ${A.spacing[n]} ${A.spacing[i]} ${A.spacing[o]} ${A.spacing[r]};`},De=e=>{const n=e.my??e.mt??0,i=e.mx??e.mr??0,o=e.my??e.mb??0,r=e.mx??e.ml??0;if(e.margin){const[a,l,s,c]=e.margin;return`margin: ${A.spacing[a]} ${A.spacing[l]} ${A.spacing[s]} ${A.spacing[c]};`}return`margin: ${A.spacing[n]} ${A.spacing[i]} ${A.spacing[o]} ${A.spacing[r]};`},Ee=e=>{const n=L("position",e.position),i=L("top",e.top),o=L("right",e.right),r=L("bottom",e.bottom),a=L("left",e.left),l=L("z-index",e.zIndex);return`
2
2
  ${n}
3
3
  ${i}
4
4
  ${o}
5
5
  ${r}
6
6
  ${a}
7
7
  ${l}
8
- `},Ee=e=>{const n=L("border",e.border),i=L("border-top",e.borderTop),o=L("border-right",e.borderRight),r=L("border-bottom",e.borderBottom),a=L("border-left",e.borderLeft),l=L("border-color",e.borderColor),s=L("border-radius",e.borderRadius);return`
8
+ `},Fe=e=>{const n=L("border",e.border),i=L("border-top",e.borderTop),o=L("border-right",e.borderRight),r=L("border-bottom",e.borderBottom),a=L("border-left",e.borderLeft),l=L("border-color",e.borderColor),s=L("border-radius",e.borderRadius);return`
9
9
  ${n}
10
10
  ${i}
11
11
  ${o}
@@ -16,7 +16,7 @@
16
16
  `},to=e=>e.includes("x")?"overflow-x: auto;":"",no=e=>e.includes("y")?"overflow-y: auto;":"",Re=e=>{const n=e.scroll?`
17
17
  ${to(e.scroll)}
18
18
  ${no(e.scroll)}
19
- `:"",i=L("visibility",e.visibility),o=L("display",e.display),r=L("height",e.height),a=L("width",e.width),l=L("max-height",e.maxHeight),s=L("max-width",e.maxWidth),c=L("min-height",e.minHeight),d=L("min-width",e.minWidth),p=L("box-shadow",e.shadow?A.shadows[e.shadow]:void 0),g=L("gap",e.gap===void 0?void 0:A.spacing[e.gap]),x=L("background-color",e.bgColor),h=L("background",e.bgGradient),b=L("flex-direction",e.flexDirection),m=L("flex-grow",e.flexGrow),j=L("justify-content",e.justify),w=L("justify-self",e.justifySelf),C=L("align-items",e.alignItems),k=L("align-self",e.alignSelf),v=L("flex-wrap",e.wrap);return`
19
+ `:"",i=L("visibility",e.visibility),o=L("display",e.display),r=L("height",e.height),a=L("width",e.width),l=L("max-height",e.maxHeight),s=L("max-width",e.maxWidth),c=L("min-height",e.minHeight),d=L("min-width",e.minWidth),p=L("box-shadow",e.shadow?A.shadows[e.shadow]:void 0),g=L("gap",e.gap===void 0?void 0:A.spacing[e.gap]),x=L("background-color",e.bgColor),h=L("background",e.bgGradient),b=L("flex-direction",e.flexDirection),m=L("flex-grow",e.flexGrow),j=L("justify-content",e.justify),w=L("justify-self",e.justifySelf),C=L("align-items",e.alignItems),v=L("align-self",e.alignSelf),k=L("flex-wrap",e.wrap);return`
20
20
  ${n}
21
21
  ${i}
22
22
  ${o}
@@ -35,8 +35,8 @@
35
35
  ${j}
36
36
  ${w}
37
37
  ${C}
38
- ${k}
39
38
  ${v}
39
+ ${k}
40
40
  `},Ne=e=>{const n=L("color",e.color),i=L("font-family",e.fontFamily),o=L("font-size",e.fontSize),r=L("font-weight",e.fontWeight),a=L("line-spacing",e.letterSpacing),l=L("line-height",e.lineSpacing),s=L("text-align",e.textAlign),c=L("text-decoration",e.textDecoration),d=L("text-overflow",e.textOverflow),p=L("white-space",e.whiteSpace),g=L("word-break",e.wordBreak),x=L("word-wrap",e.wordWrap);return`
41
41
  ${n}
42
42
  ${i}
@@ -62,34 +62,34 @@
62
62
  `},Le={shouldForwardProp:e=>!rn.includes(e)},Pe=f.styled.div.withConfig(Le)`
63
63
  ${Ie}
64
64
  ${De}
65
- ${Fe}
65
+ ${Ee}
66
66
  ${Re}
67
67
  ${Ne}
68
- ${Ee}
68
+ ${Fe}
69
69
  ${Ae}
70
70
  `,ft=f.styled.button.withConfig(Le)`
71
71
  ${Ie}
72
72
  ${De}
73
- ${Fe}
73
+ ${Ee}
74
74
  ${Re}
75
75
  ${Ne}
76
- ${Ee}
76
+ ${Fe}
77
77
  ${Ae}
78
78
  `,yt=f.styled.p.withConfig(Le)`
79
79
  ${Ie}
80
80
  ${De}
81
- ${Fe}
81
+ ${Ee}
82
82
  ${Re}
83
83
  ${Ne}
84
- ${Ee}
84
+ ${Fe}
85
85
  ${Ae}
86
86
  `,bt=f.styled.span.withConfig(Le)`
87
87
  ${Ie}
88
88
  ${De}
89
- ${Fe}
89
+ ${Ee}
90
90
  ${Re}
91
91
  ${Ne}
92
- ${Ee}
92
+ ${Fe}
93
93
  ${Ae}
94
94
  `,io=f.styled(Pe)`
95
95
  ${({theme:e,$center:n=!1,$styleMd:i,$styleSm:o})=>`
@@ -172,7 +172,7 @@
172
172
 
173
173
  ${i===void 0?"":`&::after { content: "${i}"; }`}
174
174
  `}
175
- `,V=u.forwardRef(function({bgGradient:n,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,overflow:g,size:x,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:j,wordBreak:w,...C},k){return t.jsx(oo,{$bgGradient:n,$color:r,$display:a,$fontFamily:l,$fontWeight:s,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:j,$wordBreak:w,className:o,ref:k,...C,children:i})}),Ce=u.forwardRef(function({children:n,color:i,content:o,display:r,fontFamily:a,fontWeight:l,letterSpacing:s,lineSpacing:c,lineSpacingSm:d,size:p,sizeMd:g,sizeSm:x,...h},b){return t.jsx(ro,{$color:i,$content:o,$display:r,$fontFamily:a,$fontWeight:l,$letterSpacing:s,$lineSpacing:c,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,ref:b,...h,children:n})}),z=u.forwardRef(function({bgGradient:n,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,overflow:g,size:x,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:j,wordBreak:w,fontStyle:C,...k},v){return t.jsx(sn,{$bgGradient:n,$color:r,$display:a,$fontFamily:l,$fontStyle:C,$fontWeight:s,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:j,$wordBreak:w,className:o,ref:v,...k,children:i})}),ln=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(z,{mb:e.extraElement?.5:void 0,size:"md",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.875,.875,.875,.875],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},ot={xl:"24px",lg:"16px",md:"14px",sm:"12px",xs:"10px"},ao=e=>ot[e]?ot[e]:typeof e=="string"&&e.includes("px")?e:ot.md,so=f.styled(bt)`
175
+ `,V=u.forwardRef(function({bgGradient:n,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,overflow:g,size:x,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:j,wordBreak:w,...C},v){return t.jsx(oo,{$bgGradient:n,$color:r,$display:a,$fontFamily:l,$fontWeight:s,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:j,$wordBreak:w,className:o,ref:v,...C,children:i})}),Ce=u.forwardRef(function({children:n,color:i,content:o,display:r,fontFamily:a,fontWeight:l,letterSpacing:s,lineSpacing:c,lineSpacingSm:d,size:p,sizeMd:g,sizeSm:x,...h},b){return t.jsx(ro,{$color:i,$content:o,$display:r,$fontFamily:a,$fontWeight:l,$letterSpacing:s,$lineSpacing:c,$lineSpacingSm:d,$size:p,$sizeMd:g,$sizeSm:x,ref:b,...h,children:n})}),z=u.forwardRef(function({bgGradient:n,children:i,className:o,color:r,display:a,fontFamily:l,fontWeight:s,letterSpacing:c,lineSpacing:d,lineSpacingSm:p,overflow:g,size:x,sizeMd:h,sizeSm:b,textFill:m,whiteSpace:j,wordBreak:w,fontStyle:C,...v},k){return t.jsx(sn,{$bgGradient:n,$color:r,$display:a,$fontFamily:l,$fontStyle:C,$fontWeight:s,$letterSpacing:c,$lineSpacing:d,$lineSpacingSm:p,$overflow:g,$size:x,$sizeMd:h,$sizeSm:b,$textFill:m,$whiteSpace:j,$wordBreak:w,className:o,ref:k,...v,children:i})}),ln=({item:e})=>{const n=e.description&&typeof e.description=="string"?t.jsx(z,{mb:e.extraElement?.5:void 0,size:"md",children:e.description}):e.description??void 0;return t.jsxs($,{display:"block",id:`panel-${e.title}`,padding:[.875,.875,.875,.875],children:[n,e.extraElement?t.jsx($,{children:e.extraElement}):void 0]})},ot={xl:"24px",lg:"16px",md:"14px",sm:"12px",xs:"10px"},ao=e=>ot[e]?ot[e]:typeof e=="string"&&e.includes("px")?e:ot.md,so=f.styled(bt)`
176
176
  ${({$clickable:e,$color:n="inherit",$disabled:i=!1,$hoverColor:o,$rotation:r,$size:a,$secondaryColor:l})=>{const s=o?"":"brightness(50%)",c=o??"";return`
177
177
  color: ${n};
178
178
  cursor: ${e?"pointer":"inherit"};
@@ -472,7 +472,7 @@
472
472
  ${n?`color: ${e.palette.gray[300]};`:""}
473
473
  }
474
474
  `}
475
- `,Do=f.styled(Pe)``,Fo=f.styled.div`
475
+ `,Do=f.styled(Pe)``,Eo=f.styled.div`
476
476
  ${({theme:e,$maxWidth:n="320px"})=>`
477
477
  background-color: ${e.palette.gray[700]};
478
478
  border-radius: 8px;
@@ -484,7 +484,7 @@
484
484
  word-break: break-word;
485
485
  z-index: 999999;
486
486
  `}
487
- `,Eo=f.styled.div`
487
+ `,Fo=f.styled.div`
488
488
  position: absolute;
489
489
  width: 16px;
490
490
  height: 8px;
@@ -509,7 +509,7 @@
509
509
  left: 50%;
510
510
  transform: translateX(-50%) rotate(180deg);
511
511
  `}}}
512
- `,Y=({children:e,disabled:n=!1,display:i="inline-block",height:o,icon:r,iconColor:a,iconSize:l,id:s,maxWidth:c,nodeTip:d,place:p="bottom",tip:g="",title:x="",hide:h=g===""&&x===""&&d===void 0,width:b})=>{const m=f.useTheme(),[j,w]=u.useState(!1),{refs:C,floatingStyles:k,context:v,placement:S}=y.useFloating({middleware:[y.flip({fallbackAxisSideDirection:"start"}),y.offset({mainAxis:10}),y.shift()],onOpenChange:w,open:j,placement:p,whileElementsMounted:y.autoUpdate}),I=y.useHover(v,{delay:{close:0,open:500},move:!1}),R=y.useFocus(v),E=y.useRole(v,{role:r?"label":"tooltip"}),{getReferenceProps:F,getFloatingProps:T}=y.useInteractions([I,R,E]),N=u.useMemo(()=>S.startsWith("top")?"top":S.startsWith("bottom")?"bottom":S.startsWith("left")?"left":S.startsWith("right")?"right":"bottom",[S]);return n?t.jsx(u.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Do,{...F(),display:i,height:o,id:s,ref:C.setReference,width:b,children:r?t.jsx(D,{clickable:!0,disabled:n,icon:r,iconColor:a,iconSize:l??"sm",iconType:j?"fa-solid":"fa-light"}):e}),j&&!h&&xe.createPortal(t.jsxs(Fo,{...T(),$maxWidth:c,id:`floating-${s}`,ref:C.setFloating,style:k,children:[y.lodashExports.isEmpty(x)?void 0:t.jsx(z,{color:m.palette.white,fontWeight:"bold",mb:.25,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),y.lodashExports.isEmpty(g)?void 0:t.jsx(z,{color:m.palette.gray[100],size:"sm",textAlign:"start",whiteSpace:"normal",wordWrap:"break-word",children:g}),y.lodashExports.isEmpty(d)?void 0:d,t.jsx(Eo,{$placement:N,children:t.jsx("svg",{fill:"none",height:"8",viewBox:"0 0 16 8",width:"16",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16 0L0 0L6.58579 6.58579C7.36684 7.36684 8.63317 7.36684 9.41421 6.58579L16 0Z",fill:m.palette.gray[700]})})})]}),document.getElementById("root")??document.body)]})},_=u.forwardRef(function({borderRadius:n,disabled:i,icon:o,iconColor:r,iconSize:a="sm",iconTransform:l,iconType:s,id:c,justify:d="center",onClick:p,px:g,py:x,type:h="button",tooltip:b,tooltipPlace:m,value:j,variant:w="primary",...C},k){const v=t.jsx(Io,{$variant:w,"aria-disabled":i,"aria-label":c,borderRadius:n,disabled:i,id:c,justify:d,onClick:p,px:g,py:x,ref:k,type:h,value:j,...C,children:t.jsx(D,{clickable:!1,icon:o,iconColor:r,iconSize:a,iconTransform:l,iconType:s})}),I=(h+(w??"")+(c??o)).replace(/ /u,"_");return b===void 0?v:t.jsx(Y,{id:`${I}-tooltip`,place:m,tip:b,children:v})}),Ro=u.forwardRef(function({autoHide:n=!1,children:i,closable:o=!1,icon:r,iconEnabled:a=!0,iconPosition:l="center",onClose:s=void 0,onTimeOut:c,show:d=!0,time:p=8,title:g,variant:x="error",id:h,...b},m){const[j,w]=u.useState(d),C=u.useCallback(()=>{s==null||s(),w(!1)},[s]);return u.useEffect(()=>{const k=setTimeout(()=>{c==null||c(!0),n&&C()},p*1e3);return()=>{clearTimeout(k)}},[n,C,p,c]),u.useEffect(()=>{w(d)},[d,w]),t.jsx($,{display:j?"block":"none",ref:m,role:"alert",...b,children:t.jsxs(Co,{$iconPosition:l,$variant:x,id:h,children:[a?t.jsx(D,{clickable:!1,icon:r??vo(x),iconSize:"lg",iconType:"fa-light",mt:l==="top"?.25:0}):void 0,t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,style:{flex:1},children:[g?t.jsx(So,{children:g}):void 0,t.jsx(zo,{$hasTitle:!!g,children:i})]}),o?t.jsx(_,{height:"fit-content",icon:"close",iconSize:"lg",iconType:"fa-light",onClick:C,px:.125,py:.125,style:{alignSelf:"flex-start"},variant:"ghost"}):void 0]})})}),Wt=f.styled.div`
512
+ `,Y=({children:e,disabled:n=!1,display:i="inline-block",height:o,icon:r,iconColor:a,iconSize:l,id:s,maxWidth:c,nodeTip:d,place:p="bottom",tip:g="",title:x="",hide:h=g===""&&x===""&&d===void 0,width:b})=>{const m=f.useTheme(),[j,w]=u.useState(!1),{refs:C,floatingStyles:v,context:k,placement:S}=y.useFloating({middleware:[y.flip({fallbackAxisSideDirection:"start"}),y.offset({mainAxis:10}),y.shift()],onOpenChange:w,open:j,placement:p,whileElementsMounted:y.autoUpdate}),I=y.useHover(k,{delay:{close:0,open:500},move:!1}),R=y.useFocus(k),F=y.useRole(k,{role:r?"label":"tooltip"}),{getReferenceProps:E,getFloatingProps:T}=y.useInteractions([I,R,F]),N=u.useMemo(()=>S.startsWith("top")?"top":S.startsWith("bottom")?"bottom":S.startsWith("left")?"left":S.startsWith("right")?"right":"bottom",[S]);return n?t.jsx(u.StrictMode,{children:e}):t.jsxs(t.Fragment,{children:[t.jsx(Do,{...E(),display:i,height:o,id:s,ref:C.setReference,width:b,children:r?t.jsx(D,{clickable:!0,disabled:n,icon:r,iconColor:a,iconSize:l??"sm",iconType:j?"fa-solid":"fa-light"}):e}),j&&!h&&xe.createPortal(t.jsxs(Eo,{...T(),$maxWidth:c,id:`floating-${s}`,ref:C.setFloating,style:v,children:[y.lodashExports.isEmpty(x)?void 0:t.jsx(z,{color:m.palette.white,fontWeight:"bold",mb:.25,size:"sm",textAlign:"start",wordWrap:"break-word",children:x}),y.lodashExports.isEmpty(g)?void 0:t.jsx(z,{color:m.palette.gray[100],size:"sm",textAlign:"start",whiteSpace:"normal",wordWrap:"break-word",children:g}),y.lodashExports.isEmpty(d)?void 0:d,t.jsx(Fo,{$placement:N,children:t.jsx("svg",{fill:"none",height:"8",viewBox:"0 0 16 8",width:"16",xmlns:"http://www.w3.org/2000/svg",children:t.jsx("path",{d:"M16 0L0 0L6.58579 6.58579C7.36684 7.36684 8.63317 7.36684 9.41421 6.58579L16 0Z",fill:m.palette.gray[700]})})})]}),document.getElementById("root")??document.body)]})},_=u.forwardRef(function({borderRadius:n,disabled:i,icon:o,iconColor:r,iconSize:a="sm",iconTransform:l,iconType:s,id:c,justify:d="center",onClick:p,px:g,py:x,type:h="button",tooltip:b,tooltipPlace:m,value:j,variant:w="primary",...C},v){const k=t.jsx(Io,{$variant:w,"aria-disabled":i,"aria-label":c,borderRadius:n,disabled:i,id:c,justify:d,onClick:p,px:g,py:x,ref:v,type:h,value:j,...C,children:t.jsx(D,{clickable:!1,icon:o,iconColor:r,iconSize:a,iconTransform:l,iconType:s})}),I=(h+(w??"")+(c??o)).replace(/ /u,"_");return b===void 0?k:t.jsx(Y,{id:`${I}-tooltip`,place:m,tip:b,children:k})}),Ro=u.forwardRef(function({autoHide:n=!1,children:i,closable:o=!1,icon:r,iconEnabled:a=!0,iconPosition:l="center",onClose:s=void 0,onTimeOut:c,show:d=!0,time:p=8,title:g,variant:x="error",id:h,...b},m){const[j,w]=u.useState(d),C=u.useCallback(()=>{s==null||s(),w(!1)},[s]);return u.useEffect(()=>{const v=setTimeout(()=>{c==null||c(!0),n&&C()},p*1e3);return()=>{clearTimeout(v)}},[n,C,p,c]),u.useEffect(()=>{w(d)},[d,w]),t.jsx($,{display:j?"block":"none",ref:m,role:"alert",...b,children:t.jsxs(Co,{$iconPosition:l,$variant:x,id:h,children:[a?t.jsx(D,{clickable:!1,icon:r??vo(x),iconSize:"lg",iconType:"fa-light",mt:l==="top"?.25:0}):void 0,t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,style:{flex:1},children:[g?t.jsx(So,{children:g}):void 0,t.jsx(zo,{$hasTitle:!!g,children:i})]}),o?t.jsx(_,{height:"fit-content",icon:"close",iconSize:"lg",iconType:"fa-light",onClick:C,px:.125,py:.125,style:{alignSelf:"flex-start"},variant:"ghost"}):void 0]})})}),Wt=f.styled.div`
513
513
  ${({theme:e})=>`
514
514
  align-items: center;
515
515
  background-color: ${e.palette.gray[200]};
@@ -753,7 +753,7 @@
753
753
  ${hn}
754
754
  `,_o=f.styled(at.Link)`
755
755
  ${hn}
756
- `,oe=({children:e,color:n,download:i,href:o,iconPosition:r="right",onClick:a,target:l,variant:s="lowRelevance",wrap:c=!1})=>{const d=o.startsWith("https://"),p=t.jsx(D,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"sm",iconType:"fa-light",ml:.25,mr:.25});return d?t.jsxs(Wo,{$color:n,$variant:s,$wrap:c,download:i,href:o,onClick:a,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(_o,{$variant:s,$wrap:c,download:i,onClick:a,rel:"nofollow noopener noreferrer",target:l,to:o,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},J=({disabled:e,icon:n,iconColor:i="inherit",iconType:o="fa-light",id:r="close-tag",filterValues:a="",fontSize:l,href:s,linkLabel:c,onClose:d,priority:p="default",tagTitle:g="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&y.lodashExports.isEmpty(g+a),m=`${x.slice(0,25)}...`;return t.jsxs(Ce,{className:"gap-0.5",display:s===void 0?"initial":"flex",size:"md",children:[t.jsxs(Mo,{$fontSize:l,$variant:h,className:p,children:[n&&t.jsx(D,{icon:n,iconColor:i,iconSize:"sm",iconType:o}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:g}),t.jsx("span",{children:b?m:x}),t.jsx("strong",{className:"w-full",children:a})]}),d?t.jsx(_,{disabled:e,icon:"xmark",iconSize:"sm",iconType:"fa-light",id:r,onClick:d,px:.125,py:.125,variant:"ghost"}):void 0]}),s===void 0?void 0:t.jsx(oe,{href:s,children:c})]})},fn=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");y.lodashExports.isObject(i)&&(i.opener=null)},O=u.forwardRef(function({children:n,disabled:i=!1,external:o=!1,href:r,id:a,icon:l,iconColor:s,iconSize:c="lg",iconType:d,name:p,dotNotification:g,notification:x,onClick:h,rightIcon:b,tag:m,type:j="button",tooltip:w,tooltipPlace:C="bottom",underline:k=!1,value:v,variant:S="primary",width:I,...R},E){const F=w!==void 0,T=`${a}-tooltip`,N=u.useCallback(()=>{r&&fn(r,o)},[o,r]),M=t.jsxs(xn,{$variant:S,"aria-disabled":i,className:k?"underline":void 0,disabled:i,id:a,name:p,onClick:S==="link"?N:h,ref:E,type:j,value:v,width:I,...F?{"data-tooltip-id":T}:{},...R,children:[g&&S==="ghost"&&!i?t.jsx(Ue,{left:l!==void 0?"13%":"1%",show:!0,top:"20%",variant:"error"}):void 0,l!==void 0&&t.jsx(D,{icon:l,iconColor:s??void 0,iconSize:c,iconType:d??"fa-light"}),n,b||S==="link"?t.jsx(D,{icon:b??"arrow-right",iconSize:c,iconType:"fa-light"}):void 0,m===void 0||i?null:t.jsx(J,{tagLabel:m,variant:"default"}),x!==void 0&&S==="ghost"&&!i?t.jsx(Ue,{numberIndicator:x,show:!0,variant:"error"}):void 0]});return F?t.jsx(Y,{disabled:!F,id:T,place:C,tip:w,width:I,children:M}):M}),Bo=u.forwardRef(function({children:n,onClick:i,userName:o,showIcon:r=!1,showUsername:a=!1},l){const s=!!i,c=f.useTheme();return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[s?t.jsxs(O,{onClick:i,px:.5,py:.5,variant:"ghost",children:[t.jsx(Wt,{children:o[0].toUpperCase()}),a?t.jsx(z,{color:c.palette.gray[800],display:"inline",ml:.5,size:"md",children:o.split(" ")[0]}):void 0,r?t.jsx(D,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(Wt,{children:o[0].toUpperCase()}),a?t.jsxs(z,{color:c.palette.gray[800],display:"inline",ml:.5,size:"md",children:["Hi ",o.split(" ")[0],"!"]}):void 0,r?t.jsx(D,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}),t.jsx(No,{children:n})]})})}),Xe=({authorEmail:e,date:n,description:i,descriptionColor:o,id:r,title:a,titleColor:l,textAlign:s,textSpacing:c=0,tooltip:d})=>{const p=f.useTheme();return t.jsxs($,{width:"100%",children:[typeof a=="string"||d?t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof a=="string"?t.jsx(z,{color:l??p.palette.gray[800],fontWeight:"bold",mb:c,size:"md",textAlign:s,wordBreak:"break-word",children:a}):a,d&&t.jsx(Y,{icon:"circle-info",id:r,place:"top",tip:d})]}):void 0,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(z,{color:o??p.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"md",textAlign:s,wordBreak:"break-word",children:i}),n&&t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"md",textAlign:s,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"md",textAlign:s,wordBreak:"break-word",children:`Author: ${e}`})]})]})},_t=f.styled($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
756
+ `,oe=({children:e,color:n,download:i,href:o,iconPosition:r="right",onClick:a,target:l,variant:s="lowRelevance",wrap:c=!1})=>{const d=o.startsWith("https://"),p=t.jsx(D,{icon:i===void 0?"arrow-up-right-from-square":"arrow-down-to-bracket",iconSize:"sm",iconType:"fa-light",ml:.25,mr:.25});return d?t.jsxs(Wo,{$color:n,$variant:s,$wrap:c,download:i,href:o,onClick:a,rel:"nofollow noopener noreferrer",target:l??"_blank",children:[r==="left"?p:void 0,e,r==="right"?p:void 0]}):t.jsxs(_o,{$variant:s,$wrap:c,download:i,onClick:a,rel:"nofollow noopener noreferrer",target:l,to:o,children:[l!==void 0&&r==="left"?p:void 0,e,l!==void 0&&r==="right"?p:void 0]})},J=({disabled:e,icon:n,iconColor:i="inherit",iconType:o="fa-light",id:r="close-tag",filterValues:a="",fontSize:l,href:s,linkLabel:c,onClose:d,priority:p="default",tagTitle:g="",tagLabel:x,variant:h="default"})=>{const b=x.length>25&&y.lodashExports.isEmpty(g+a),m=`${x.slice(0,25)}...`;return t.jsxs(Ce,{className:"gap-0.5",display:s===void 0?"initial":"flex",size:"md",children:[t.jsxs(Mo,{$fontSize:l,$variant:h,className:p,children:[n&&t.jsx(D,{icon:n,iconColor:i,iconSize:"sm",iconType:o}),t.jsxs("span",{className:"w-full",children:[t.jsx("strong",{children:g}),t.jsx("span",{children:b?m:x}),t.jsx("strong",{className:"w-full",children:a})]}),d?t.jsx(_,{disabled:e,icon:"xmark",iconSize:"sm",iconType:"fa-light",id:r,onClick:d,px:.125,py:.125,variant:"ghost"}):void 0]}),s===void 0?void 0:t.jsx(oe,{href:s,children:c})]})},fn=(e,n=!0)=>{const i=window.open(e,n?void 0:"_self","noopener,noreferrer,");y.lodashExports.isObject(i)&&(i.opener=null)},O=u.forwardRef(function({children:n,disabled:i=!1,external:o=!1,href:r,id:a,icon:l,iconColor:s,iconSize:c="lg",iconType:d,name:p,dotNotification:g,notification:x,onClick:h,rightIcon:b,tag:m,type:j="button",tooltip:w,tooltipPlace:C="bottom",underline:v=!1,value:k,variant:S="primary",width:I,...R},F){const E=w!==void 0,T=`${a}-tooltip`,N=u.useCallback(()=>{r&&fn(r,o)},[o,r]),M=t.jsxs(xn,{$variant:S,"aria-disabled":i,className:v?"underline":void 0,disabled:i,id:a,name:p,onClick:S==="link"?N:h,ref:F,type:j,value:k,width:I,...E?{"data-tooltip-id":T}:{},...R,children:[g&&S==="ghost"&&!i?t.jsx(Ue,{left:l!==void 0?"13%":"1%",show:!0,top:"20%",variant:"error"}):void 0,l!==void 0&&t.jsx(D,{icon:l,iconColor:s??void 0,iconSize:c,iconType:d??"fa-light"}),n,b||S==="link"?t.jsx(D,{icon:b??"arrow-right",iconSize:c,iconType:"fa-light"}):void 0,m===void 0||i?null:t.jsx(J,{tagLabel:m,variant:"default"}),x!==void 0&&S==="ghost"&&!i?t.jsx(Ue,{numberIndicator:x,show:!0,variant:"error"}):void 0]});return E?t.jsx(Y,{disabled:!E,id:T,place:C,tip:w,width:I,children:M}):M}),Bo=u.forwardRef(function({children:n,onClick:i,userName:o,showIcon:r=!1,showUsername:a=!1},l){const s=!!i,c=f.useTheme();return t.jsx($,{id:"navbar-user-profile",ref:l,zIndex:9999,children:t.jsxs($,{alignItems:"end",display:"flex",flexDirection:"column",position:"relative",zIndex:30,children:[s?t.jsxs(O,{onClick:i,px:.5,py:.5,variant:"ghost",children:[t.jsx(Wt,{children:o[0].toUpperCase()}),a?t.jsx(z,{color:c.palette.gray[800],display:"inline",ml:.5,size:"md",children:o.split(" ")[0]}):void 0,r?t.jsx(D,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}):t.jsxs($,{alignItems:"center",display:"flex",px:.5,py:.5,children:[t.jsx(Wt,{children:o[0].toUpperCase()}),a?t.jsxs(z,{color:c.palette.gray[800],display:"inline",ml:.5,size:"md",children:["Hi ",o.split(" ")[0],"!"]}):void 0,r?t.jsx(D,{clickable:!1,icon:"ellipsis-v",iconSize:"xs",ml:.5}):void 0]}),t.jsx(No,{children:n})]})})}),Xe=({authorEmail:e,date:n,description:i,descriptionColor:o,id:r,title:a,titleColor:l,textAlign:s,textSpacing:c=0,tooltip:d})=>{const p=f.useTheme();return t.jsxs($,{width:"100%",children:[typeof a=="string"||d?t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,width:"100%",children:[typeof a=="string"?t.jsx(z,{color:l??p.palette.gray[800],fontWeight:"bold",mb:c,size:"md",textAlign:s,wordBreak:"break-word",children:a}):a,d&&t.jsx(Y,{icon:"circle-info",id:r,place:"top",tip:d})]}):void 0,t.jsxs($,{alignItems:"start",display:"flex",flexDirection:"column",gap:.25,children:[i&&t.jsx(z,{color:o??p.palette.gray[800],fontWeight:i===void 0?"bold":"regular",size:"md",textAlign:s,wordBreak:"break-word",children:i}),n&&t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"md",textAlign:s,wordBreak:"break-word",children:`Date: ${n.split(" ")[0]}`}),e&&t.jsx(z,{color:p.palette.gray[800],fontWeight:"bold",size:"md",textAlign:s,wordBreak:"break-word",children:`Author: ${e}`})]})]})},_t=f.styled($).attrs(({...e})=>({display:"inline-block",position:"relative",...e}))`
757
757
  & img {
758
758
  display: block;
759
759
  }
@@ -1142,7 +1142,7 @@
1142
1142
  fill: ${e.palette.white};
1143
1143
  }
1144
1144
  `}
1145
- `,le=u.forwardRef(function({checked:n,disabled:i=!1,label:o,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:c,tooltip:d,value:p,...g},x){return t.jsxs("div",{className:"gap-1 inline-flex items-start parent-checkbox",children:[t.jsxs(Jo,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:n,"data-testid":typeof o=="string"?o??p:p,disabled:i,id:r,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:c,ref:x,type:"checkbox",value:p,...g}),t.jsx(D,{disabled:i,icon:"check",iconSize:"xl"}),o??p]}),d===void 0?void 0:t.jsx(Y,{icon:"circle-info",id:d,place:"right",tip:d})]})}),bn=({item:e,multiSelection:n,name:i,register:o,setInputValue:r,setValue:a,state:l,watch:s})=>{var R,E,F;const c=f.useTheme(),d=u.useRef(null),p=e.props.hrefLang,g=l.disabledKeys,x=Array.from(l.collection.getKeys()).filter(T=>!Array.from(g).includes(T)&&T!=="All"),{optionProps:h,isSelected:b,isFocused:m,isDisabled:j}=y.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,d),w=[b?"selected":"",m?"focused":"",j?"disabled":""].join(" "),C=u.useCallback(T=>{r(""),a==null||a(`${i}Options`,""),T.currentTarget.checked&&(r(T.currentTarget.value),a==null||a(`${i}Options`,x))},[x,i,r,a]),k=u.useCallback(()=>{const T=s==null?void 0:s(`${i}Options`),N=typeof T=="string"?[T]:T;y.isEqual(x,N)&&!Array.from(g).includes("All")?(a==null||a("checkAll","All vulnerability types"),r("All vulnerability types")):(a==null||a("checkAll",""),r((N==null?void 0:N.length)<=2?N.join(", "):`${N.slice(0,2).join(", ")+`, +${N.length-2} more`}`))},[g,x,i,r,a,s]),v=e.key==="All"?t.jsx(le,{...o==null?void 0:o("checkAll",{onChange:C}),label:(R=e.rendered)==null?void 0:R.toString(),name:"checkAll",value:(E=e.rendered)==null?void 0:E.toString()}):t.jsx(le,{...o==null?void 0:o(`${i}Options`,{onChange:k}),label:(F=e.rendered)==null?void 0:F.toString(),name:`${i}Options`,value:e.key.toString()}),S=n&&!j?v:t.jsx(z,{color:c.palette.gray[800],size:"md",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),I=u.useCallback(T=>{var N;T.preventDefault(),r(((N=e.rendered)==null?void 0:N.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),fn(p)},[p,e.key,e.rendered,l,r]);return te(document.getElementsByClassName("dropdown")[0],()=>{n&&l.close()},!0,[document.getElementById("combobox")]),t.jsxs(Zo,{...!n&&!p?h:{},$multiSelection:n,className:w,ref:d,children:[p?t.jsx(oe,{href:p,onClick:I,children:S}):S,b&&!j&&!n?t.jsx(D,{icon:"check",iconSize:"sm",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:t.jsx(J,{tagLabel:e.textValue,variant:"inactive"})]})},lt=({field:e,disabled:n=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:c,name:d,multiSelection:p=!1,items:g,onBlur:x,onChange:h,onClear:b,placeholder:m,clearable:j=!1,emptyMessage:w,register:C,required:k,setValue:v,tooltip:S,value:I,watch:R,weight:E})=>{var Lt,Pt;const F=f.useTheme(),T=n?void 0:o,N=(e==null?void 0:e.value)??I,[M,W]=u.useState(((Lt=g.find(P=>P.value===N))==null?void 0:Lt.name)??""),[X,B]=u.useState(N),[H,ae]=u.useState(g),[Oe,fe]=u.useState(!1),{contains:We}=y.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),nt=u.useRef(null),it=u.useRef(null),ye=u.useRef(null),be=u.useRef(null),_e=u.useRef(null),Di=u.useMemo(()=>g.toSorted((P,G)=>{const Z=Array.from(i??[]),$e=Z.includes(P.value),Mt=Z.includes(G.value);return $e&&!Mt?1:!$e&&Mt?-1:0}).map(P=>We(P.name,M)||Oe?t.jsx(y.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":P.value,hrefLang:P.href,textValue:P.tag,children:P.name},P.value):null),[We,i,M,g,Oe]),Fi=u.useCallback(P=>{const G=P.split(/,|\s/u).slice(-1)[0].trim();W(p?G:P),P===""||P.endsWith(",")?fe(!0):(fe(!1),B(Z=>{const $e=P===""?"":Z;return e&&e.onChange($e),h&&h(P),$e}),ae(g.filter(Z=>We(Z.name,p?G:P))))},[We,g,e,p,h]),Ei=u.useCallback(P=>{var G;W(((G=g.find(Z=>Z.value===P))==null?void 0:G.name)??""),B(P?String(P):""),e&&e.onChange(P),h&&h(P?String(P):""),ae(g)},[g,e,h]),Ft=u.useCallback(P=>{P.key==="Enter"&&P.preventDefault(),fe(!1)},[]),Ri=u.useCallback(()=>{x&&x(),e&&e.onBlur()},[e,x]),Ni=u.useCallback(()=>{fe(!0)},[]),U=y.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:p,allowsEmptyCollection:!0,disabledKeys:i,inputValue:M,items:H,menuTrigger:"focus",shouldCloseOnBlur:!p,selectedKey:X,onBlur:Ri,onInputChange:Fi,onKeyDown:Ft,onKeyUp:Ni,onOpenChange(P,G){fe(P&&(G==="manual"||G==="focus")),P&&setTimeout(()=>{var Z;return(Z=nt.current)==null?void 0:Z.focus()},50)},onSelectionChange:p?void 0:Ei,children:Di}),Ai=u.useCallback(()=>{W(""),B(null),ae(g),U.setSelectedKey(null),U.setInputValue(""),h&&h(""),b==null||b()},[g,b,U,h]),{buttonProps:Li,inputProps:Pi,listBoxProps:Mi}=y.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:M,buttonRef:it,id:d,inputRef:nt,label:s??d,listBoxRef:ye,name:d,placeholder:m,popoverRef:_e},U),{listBoxProps:Et}=y.$c132121280ec012d$export$50eacbbf140a3141(Mi,U,ye),{buttonProps:Oi}=y.$701a24aa0da5b062$export$ea18c227d4417cc3(Li,it),{width:Rt}=((Pt=be.current)==null?void 0:Pt.getBoundingClientRect())??{width:240};te(be.current,()=>{U.isOpen&&!p&&U.close()},!0,[_e.current]),u.useEffect(()=>{var P;if((c===!1||!N)&&!p){const G=((P=g.find(Z=>Z.value===N))==null?void 0:P.name)??"";W(G),B(G)}},[N,g,c,p]);const Nt=Array.from(U.collection),At=y.useVirtualizer({count:Nt.length,estimateSize:()=>28,getScrollElement:()=>ye.current});return t.jsxs(K,{error:T,helpLink:r,helpLinkText:a,helpText:l,htmlFor:d,id:"combobox",label:s,required:k,tooltip:S,weight:E,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${T?"error":""}`,ref:be,children:[t.jsx("input",{...Pi,"aria-invalid":T?"true":"false","aria-label":d,disabled:n,onKeyDown:Ft,ref:nt}),T?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:F.palette.error[500],iconSize:"lg"}):void 0,j&&X&&!n?t.jsx(_,{icon:"xmark",iconColor:F.palette.gray[400],iconSize:"sm",iconType:"fa-light",onClick:Ai,px:.125,py:.125,type:"reset",variant:"ghost"}):void 0,t.jsx(_,{...Oi,className:"action",disabled:n,icon:U.isOpen&&!n?"chevron-up":"chevron-down",iconColor:F.palette.gray[400],iconSize:"sm",iconType:"fa-light",px:.125,py:.125,ref:it,type:"button",variant:"ghost"})]}),U.isOpen&&U.collection.size>0&&!n?t.jsx(ge,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:_e,state:U,triggerRef:be,children:t.jsx(Bt,{...Et,$multiSelection:p&&!Array.from(i??[]).includes("All"),$width:Rt,ref:ye,children:t.jsx("div",{style:{height:`${At.getTotalSize()}px`,position:"relative"},children:At.getVirtualItems().map(P=>{const G=Nt[P.index];return t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${P.size}px`,transform:`translateY(${P.start}px)`},children:t.jsx(bn,{item:G,multiSelection:p,name:d,register:C,setInputValue:W,setValue:v,state:U,watch:R})},P.index)})})})}):g.length>0||!U.isOpen||n||!w?null:t.jsx(ge,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:_e,state:U,triggerRef:be,children:t.jsx(Bt,{...Et,$multiSelection:!1,$width:Rt,ref:ye,children:t.jsx(qo,{children:t.jsx(z,{color:F.palette.gray[400],size:"md",textOverflow:"auto",whiteSpace:"wrap",children:w})})})})]})},wt=({control:e,disabled:n=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:c,name:d,multiSelection:p,items:g,onBlur:x,onChange:h,onClear:b,placeholder:m,clearable:j=!1,emptyMessage:w,register:C,required:k,setValue:v,tooltip:S,value:I,watch:R,weight:E})=>e?t.jsx(y.Controller,{control:e,name:d,render:({field:F,fieldState:T})=>{var N;return t.jsx(lt,{clearable:j,disabled:n,disabledKeys:i,emptyMessage:w,error:(N=T.error)==null?void 0:N.message,field:F,helpLink:r,helpLinkText:a,helpText:l,items:g,label:s,loadingItems:c,multiSelection:p,name:d,onBlur:x,onChange:h,onClear:b,placeholder:m,register:C,required:k,setValue:v,tooltip:S,value:I,watch:R,weight:E})},rules:{required:k}}):t.jsx(lt,{clearable:j,disabled:n,disabledKeys:i,emptyMessage:w,error:o,helpLink:r,helpLinkText:a,helpText:l,items:g,label:s,loadingItems:c,multiSelection:p,name:d,onBlur:x,onChange:h,onClear:b,placeholder:m,required:k,tooltip:S,value:I,weight:E}),Qo=f.styled.div`
1145
+ `,le=u.forwardRef(function({checked:n,disabled:i=!1,label:o,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:c,tooltip:d,value:p,...g},x){return t.jsxs("div",{className:"gap-1 inline-flex items-start parent-checkbox",children:[t.jsxs(Jo,{"aria-disabled":i,children:[t.jsx("input",{"aria-checked":n,"aria-disabled":i,"aria-hidden":!1,"aria-label":r,checked:n,"data-testid":typeof o=="string"?o??p:p,disabled:i,id:r,name:r,onChange:a,onClick:l,onFocus:s,onKeyDown:c,ref:x,type:"checkbox",value:p,...g}),t.jsx(D,{disabled:i,icon:"check",iconSize:"xl"}),o??p]}),d===void 0?void 0:t.jsx(Y,{icon:"circle-info",id:d,place:"right",tip:d})]})}),bn=({item:e,multiSelection:n,name:i,register:o,setInputValue:r,setValue:a,state:l,watch:s})=>{var R,F,E;const c=f.useTheme(),d=u.useRef(null),p=e.props.hrefLang,g=l.disabledKeys,x=Array.from(l.collection.getKeys()).filter(T=>!Array.from(g).includes(T)&&T!=="All"),{optionProps:h,isSelected:b,isFocused:m,isDisabled:j}=y.$293f70390ea03370$export$497855f14858aa34({key:e.key},l,d),w=[b?"selected":"",m?"focused":"",j?"disabled":""].join(" "),C=u.useCallback(T=>{r(""),a==null||a(`${i}Options`,""),T.currentTarget.checked&&(r(T.currentTarget.value),a==null||a(`${i}Options`,x))},[x,i,r,a]),v=u.useCallback(()=>{const T=s==null?void 0:s(`${i}Options`),N=typeof T=="string"?[T]:T;y.isEqual(x,N)&&!Array.from(g).includes("All")?(a==null||a("checkAll","All vulnerability types"),r("All vulnerability types")):(a==null||a("checkAll",""),r((N==null?void 0:N.length)<=2?N.join(", "):`${N.slice(0,2).join(", ")+`, +${N.length-2} more`}`))},[g,x,i,r,a,s]),k=e.key==="All"?t.jsx(le,{...o==null?void 0:o("checkAll",{onChange:C}),label:(R=e.rendered)==null?void 0:R.toString(),name:"checkAll",value:(F=e.rendered)==null?void 0:F.toString()}):t.jsx(le,{...o==null?void 0:o(`${i}Options`,{onChange:v}),label:(E=e.rendered)==null?void 0:E.toString(),name:`${i}Options`,value:e.key.toString()}),S=n&&!j?k:t.jsx(z,{color:c.palette.gray[800],size:"md",textOverflow:"ellipsis",whiteSpace:"nowrap",children:e.rendered}),I=u.useCallback(T=>{var N;T.preventDefault(),r(((N=e.rendered)==null?void 0:N.toString())??""),l.setSelectedKey(e.key),setTimeout(()=>{l.setOpen(!1)},50),fn(p)},[p,e.key,e.rendered,l,r]);return te(document.getElementsByClassName("dropdown")[0],()=>{n&&l.close()},!0,[document.getElementById("combobox")]),t.jsxs(Zo,{...!n&&!p?h:{},$multiSelection:n,className:w,ref:d,children:[p?t.jsx(oe,{href:p,onClick:I,children:S}):S,b&&!j&&!n?t.jsx(D,{icon:"check",iconSize:"sm",iconType:"fa-light"}):void 0,e.rendered===e.textValue?void 0:t.jsx(J,{tagLabel:e.textValue,variant:"inactive"})]})},lt=({field:e,disabled:n=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:c,name:d,multiSelection:p=!1,items:g,onBlur:x,onChange:h,onClear:b,placeholder:m,clearable:j=!1,emptyMessage:w,register:C,required:v,setValue:k,tooltip:S,value:I,watch:R,weight:F})=>{var Lt,Pt;const E=f.useTheme(),T=n?void 0:o,N=(e==null?void 0:e.value)??I,[M,W]=u.useState(((Lt=g.find(P=>P.value===N))==null?void 0:Lt.name)??""),[X,B]=u.useState(N),[H,ae]=u.useState(g),[Oe,fe]=u.useState(!1),{contains:We}=y.$bb77f239b46e8c72$export$3274cf84b703fff({sensitivity:"base"}),nt=u.useRef(null),it=u.useRef(null),ye=u.useRef(null),be=u.useRef(null),_e=u.useRef(null),Di=u.useMemo(()=>g.toSorted((P,G)=>{const Z=Array.from(i??[]),$e=Z.includes(P.value),Mt=Z.includes(G.value);return $e&&!Mt?1:!$e&&Mt?-1:0}).map(P=>We(P.name,M)||Oe?t.jsx(y.$c1d7fb2ec91bae71$export$6d08773d2e66f8f2,{"aria-label":P.value,hrefLang:P.href,textValue:P.tag,children:P.name},P.value):null),[We,i,M,g,Oe]),Ei=u.useCallback(P=>{const G=P.split(/,|\s/u).slice(-1)[0].trim();W(p?G:P),P===""||P.endsWith(",")?fe(!0):(fe(!1),B(Z=>{const $e=P===""?"":Z;return e&&e.onChange($e),h&&h(P),$e}),ae(g.filter(Z=>We(Z.name,p?G:P))))},[We,g,e,p,h]),Fi=u.useCallback(P=>{var G;W(((G=g.find(Z=>Z.value===P))==null?void 0:G.name)??""),B(P?String(P):""),e&&e.onChange(P),h&&h(P?String(P):""),ae(g)},[g,e,h]),Et=u.useCallback(P=>{P.key==="Enter"&&P.preventDefault(),fe(!1)},[]),Ri=u.useCallback(()=>{x&&x(),e&&e.onBlur()},[e,x]),Ni=u.useCallback(()=>{fe(!0)},[]),U=y.$a9e7382a7d111cb5$export$b453a3bfd4a5fa9e({allowsCustomValue:p,allowsEmptyCollection:!0,disabledKeys:i,inputValue:M,items:H,menuTrigger:"focus",shouldCloseOnBlur:!p,selectedKey:X,onBlur:Ri,onInputChange:Ei,onKeyDown:Et,onKeyUp:Ni,onOpenChange(P,G){fe(P&&(G==="manual"||G==="focus")),P&&setTimeout(()=>{var Z;return(Z=nt.current)==null?void 0:Z.focus()},50)},onSelectionChange:p?void 0:Fi,children:Di}),Ai=u.useCallback(()=>{W(""),B(null),ae(g),U.setSelectedKey(null),U.setInputValue(""),h&&h(""),b==null||b()},[g,b,U,h]),{buttonProps:Li,inputProps:Pi,listBoxProps:Mi}=y.$c350ade66beef0af$export$8c18d1b4f7232bbf({inputValue:M,buttonRef:it,id:d,inputRef:nt,label:s??d,listBoxRef:ye,name:d,placeholder:m,popoverRef:_e},U),{listBoxProps:Ft}=y.$c132121280ec012d$export$50eacbbf140a3141(Mi,U,ye),{buttonProps:Oi}=y.$701a24aa0da5b062$export$ea18c227d4417cc3(Li,it),{width:Rt}=((Pt=be.current)==null?void 0:Pt.getBoundingClientRect())??{width:240};te(be.current,()=>{U.isOpen&&!p&&U.close()},!0,[_e.current]),u.useEffect(()=>{var P;if((c===!1||!N)&&!p){const G=((P=g.find(Z=>Z.value===N))==null?void 0:P.name)??"";W(G),B(G)}},[N,g,c,p]);const Nt=Array.from(U.collection),At=y.useVirtualizer({count:Nt.length,estimateSize:()=>28,getScrollElement:()=>ye.current});return t.jsxs(K,{error:T,helpLink:r,helpLinkText:a,helpText:l,htmlFor:d,id:"combobox",label:s,required:v,tooltip:S,weight:F,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${T?"error":""}`,ref:be,children:[t.jsx("input",{...Pi,"aria-invalid":T?"true":"false","aria-label":d,disabled:n,onKeyDown:Et,ref:nt}),T?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"lg"}):void 0,j&&X&&!n?t.jsx(_,{icon:"xmark",iconColor:E.palette.gray[400],iconSize:"sm",iconType:"fa-light",onClick:Ai,px:.125,py:.125,type:"reset",variant:"ghost"}):void 0,t.jsx(_,{...Oi,className:"action",disabled:n,icon:U.isOpen&&!n?"chevron-up":"chevron-down",iconColor:E.palette.gray[400],iconSize:"sm",iconType:"fa-light",px:.125,py:.125,ref:it,type:"button",variant:"ghost"})]}),U.isOpen&&U.collection.size>0&&!n?t.jsx(ge,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:_e,state:U,triggerRef:be,children:t.jsx(Bt,{...Ft,$multiSelection:p&&!Array.from(i??[]).includes("All"),$width:Rt,ref:ye,children:t.jsx("div",{style:{height:`${At.getTotalSize()}px`,position:"relative"},children:At.getVirtualItems().map(P=>{const G=Nt[P.index];return t.jsx("div",{style:{position:"absolute",top:0,left:0,width:"100%",height:`${P.size}px`,transform:`translateY(${P.start}px)`},children:t.jsx(bn,{item:G,multiSelection:p,name:d,register:C,setInputValue:W,setValue:k,state:U,watch:R})},P.index)})})})}):g.length>0||!U.isOpen||n||!w?null:t.jsx(ge,{className:"dropdown",offset:4,placement:"bottom start",popoverRef:_e,state:U,triggerRef:be,children:t.jsx(Bt,{...Ft,$multiSelection:!1,$width:Rt,ref:ye,children:t.jsx(qo,{children:t.jsx(z,{color:E.palette.gray[400],size:"md",textOverflow:"auto",whiteSpace:"wrap",children:w})})})})]})},wt=({control:e,disabled:n=!1,disabledKeys:i,error:o,helpLink:r,helpLinkText:a,helpText:l,label:s,loadingItems:c,name:d,multiSelection:p,items:g,onBlur:x,onChange:h,onClear:b,placeholder:m,clearable:j=!1,emptyMessage:w,register:C,required:v,setValue:k,tooltip:S,value:I,watch:R,weight:F})=>e?t.jsx(y.Controller,{control:e,name:d,render:({field:E,fieldState:T})=>{var N;return t.jsx(lt,{clearable:j,disabled:n,disabledKeys:i,emptyMessage:w,error:(N=T.error)==null?void 0:N.message,field:E,helpLink:r,helpLinkText:a,helpText:l,items:g,label:s,loadingItems:c,multiSelection:p,name:d,onBlur:x,onChange:h,onClear:b,placeholder:m,register:C,required:v,setValue:k,tooltip:S,value:I,watch:R,weight:F})},rules:{required:v}}):t.jsx(lt,{clearable:j,disabled:n,disabledKeys:i,emptyMessage:w,error:o,helpLink:r,helpLinkText:a,helpText:l,items:g,label:s,loadingItems:c,multiSelection:p,name:d,onBlur:x,onChange:h,onClear:b,placeholder:m,required:v,tooltip:S,value:I,weight:F}),Qo=f.styled.div`
1146
1146
  ${({theme:e})=>`
1147
1147
  align-items: center;
1148
1148
  color: ${e.palette.gray[800]};
@@ -1374,7 +1374,7 @@
1374
1374
  font-weight: ${e.typography.weight.bold};
1375
1375
  }
1376
1376
  `}
1377
- `,Ge=({disabled:e=!1,icon:n,props:i})=>{const o=u.useRef(null),{buttonProps:r}=y.$701a24aa0da5b062$export$ea18c227d4417cc3(i,o);return t.jsx(ar,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:o,type:"button",children:t.jsx(D,{icon:n,iconColor:A.palette.gray[e?400:700],iconSize:"lg",iconType:"fa-light"})})},qe=({state:e,prevButtonProps:n,nextButtonProps:i,title:o})=>{const r=e.focusedDate,a=f.useTheme(),l=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),s=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",style:{position:"sticky",top:0,zIndex:2,background:a.palette.white},children:[t.jsx(Ge,{icon:"chevron-left",props:n}),t.jsxs(Qo,{children:[o,t.jsxs(er,{children:[t.jsx(Vt,{"aria-label":"top",onClick:l,children:t.jsx(D,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xs"})}),t.jsx(Vt,{"aria-label":"bottom",onClick:s,children:t.jsx(D,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xs"})})]})]}),t.jsx(Ge,{icon:"chevron-right",props:i})]})},jn=({onClose:e,props:n})=>{const{locale:i}=y.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=y.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:a,title:l}=y.$9942cad8a072a530$export$3ee915f8151bd4f1(n,o);return t.jsxs("div",{className:"calendar",children:[t.jsx(qe,{nextButtonProps:a,prevButtonProps:r,state:o,title:l}),t.jsx(Ze,{state:o}),t.jsx(vt,{children:t.jsx(O,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wn=({segment:e,state:n})=>{const i=f.useTheme(),o=u.useRef(null),a={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=y.$32489daedd52963e$export$1315d136e6f7581(a,n,o),s=i.palette.gray[a.isEditable?800:500];return t.jsx("div",{...a.type!=="literal"&&{...l,className:"segment-cell"},ref:o,style:a.type==="literal"?void 0:{color:a.isPlaceholder?i.palette.gray[400]:s},children:a.isPlaceholder?a.placeholder:a.text})},vn=({disabled:e,error:n=!1,props:i})=>{const o=f.useTheme(),r=u.useRef(null),a=y.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=y.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,a,r),s=u.useCallback(c=>{const d=document.getElementsByClassName("segment-cell"),p=c.currentTarget;Object.values(d).some(g=>g.contains(p))||(c.preventDefault(),c.stopPropagation())},[]);return t.jsxs(sr,{...l,onClick:s,children:[t.jsx("div",{className:"flex flex-row",style:{color:o.palette.gray[y.lodashExports.isNil(a.value)?400:800]},tabIndex:-1,children:a.segments.map((c,d)=>{const p=`key_${d}`;return t.jsx(wn,{segment:{...c,isEditable:!e},state:a},p)})}),n?t.jsx(D,{icon:"exclamation-circle",iconColor:o.palette.error[500],iconSize:"lg"}):void 0]})},kn=e=>{const n=u.useRef(null),i=y.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:o}=i,r=!y.lodashExports.isNil(o)&&o.hour<12?"AM":"PM",[a,l]=u.useState(y.lodashExports.isNil(o)?"AM":r),{fieldProps:s}=y.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),c=u.useCallback(d=>{const p=d.currentTarget.name;p!==a&&(y.lodashExports.isNil(o)||(p==="AM"?i.setSegment("dayPeriod",0):p==="PM"&&i.setSegment("dayPeriod",12))),l(p)},[a,i,o]);return t.jsxs(lr,{children:[t.jsx(Ut,{...s,ref:n,children:i.segments.slice(0,-2).map((d,p)=>{const g=`key_${p}`;return t.jsx(wn,{segment:d,state:i},g)})}),t.jsxs(Ut,{children:[t.jsx(Gt,{id:a==="AM"?"active":"",name:"AM",onClick:c,type:"button",children:"AM"}),t.jsx(Gt,{id:a==="PM"?"active":"",name:"PM",onClick:c,type:"button",children:"PM"})]})]})},Ye=e=>e&&e!=="-"?y.dayjs(e).format("YYYY-MM-DD"):"-",cr=e=>e&&e!=="-"?y.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",Yt=(e,n)=>y.dayjs(String(e).replace(/-/gu,"/")).hour(n.hour).minute(n.minute).second(n.second).format("YYYY/MM/DD hh:mm A"),Se=({error:e,buttonProps:n,datePickerRef:i,disabled:o=!1,granularity:r="day",fieldProps:a,groupProps:l,name:s,register:c,required:d,setValue:p,value:g})=>{const x=u.useCallback(h=>{if(!h)return;const b=r==="day"?Ye(String(h)):cr(String(h));a.onChange&&a.onChange(h??null),p&&p(s,b,{shouldDirty:!0})},[a,r,s,p]);return t.jsxs(ee,{...l,className:`${o?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(vn,{disabled:o,error:e!=null,props:{...a,autoFocus:!1,granularity:r,onChange:x,shouldForceLeadingZeros:!0}}),t.jsx(Ge,{disabled:o,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...c==null?void 0:c(s,{required:d}),"aria-label":s,className:"date-input",disabled:o,id:s,name:s,type:"text",value:g??""})]})},Je=({children:e,...n})=>{const i=u.useRef(null),{dialogProps:o}=y.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(rr,{...o,ref:i,children:e})},Cn=({disabled:e=!1,error:n,helpLink:i,helpLinkText:o,helpText:r,required:a,label:l,name:s,register:c,setValue:d,tooltip:p,watch:g,...x})=>{const h=u.useRef(null),b=g==null?void 0:g(s),m=u.useCallback(R=>{d&&R&&d(s,Ye(String(R)),{shouldDirty:!0})},[s,d]),j=y.$ab5bf3f618090389$export$87194bb378cc3ac2({...x,onChange(R){m(R)},...!y._.isNil(b)&&!y._.isEmpty(b)&&y.dayjs(b).isValid()?{defaultValue:y.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}:{}}),{close:w}=j,{groupProps:C,fieldProps:k,buttonProps:v,dialogProps:S,calendarProps:I}=y.$6057a3d2a53a12fd$export$42df105a73306d51({...x,"aria-label":l??s,name:s},j,h);return t.jsxs(K,{error:e?void 0:n,helpLink:i,helpLinkText:o,helpText:r,htmlFor:s,label:l,required:a,tooltip:p,children:[t.jsx(Se,{buttonProps:v,datePickerRef:h,disabled:e,error:n,fieldProps:k,groupProps:C,name:s,register:c,required:a,setValue:d,value:b}),j.isOpen&&!e?t.jsx(ge,{offset:8,placement:"bottom start",state:j,triggerRef:h,children:t.jsx(Je,{...S,children:t.jsx(jn,{onClose:w,props:I})})}):null]})},Sn=({onClose:e,props:n})=>{const{locale:i}=y.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=u.useRef(null),r=y.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:l,title:s}=y.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,o);return t.jsxs("div",{className:"calendar-range",ref:o,children:[t.jsx(qe,{nextButtonProps:l,prevButtonProps:a,state:r,title:s}),t.jsx(Ze,{state:r}),t.jsx(vt,{children:t.jsx(O,{onClick:e,variant:"ghost",children:"Cancel"})})]})},dr=f.styled.div`
1377
+ `,Ge=({disabled:e=!1,icon:n,props:i})=>{const o=u.useRef(null),{buttonProps:r}=y.$701a24aa0da5b062$export$ea18c227d4417cc3(i,o);return t.jsx(ar,{...r,$disabled:e,$focus:!!r["aria-expanded"],$header:n==="calendar"||n==="calendar-clock",disabled:e,ref:o,type:"button",children:t.jsx(D,{icon:n,iconColor:A.palette.gray[e?400:700],iconSize:"lg",iconType:"fa-light"})})},qe=({state:e,prevButtonProps:n,nextButtonProps:i,title:o})=>{const r=e.focusedDate,a=f.useTheme(),l=u.useCallback(()=>{e.setFocusedDate(r.add({years:1}))},[r,e]),s=u.useCallback(()=>{e.setFocusedDate(r.subtract({years:1}))},[r,e]);return t.jsxs("div",{className:"header flex items-start",style:{position:"sticky",top:0,zIndex:2,background:a.palette.white},children:[t.jsx(Ge,{icon:"chevron-left",props:n}),t.jsxs(Qo,{children:[o,t.jsxs(er,{children:[t.jsx(Vt,{"aria-label":"top",onClick:l,children:t.jsx(D,{icon:"caret-up",iconClass:"fa-sharp",iconSize:"xs"})}),t.jsx(Vt,{"aria-label":"bottom",onClick:s,children:t.jsx(D,{icon:"caret-down",iconClass:"fa-sharp",iconSize:"xs"})})]})]}),t.jsx(Ge,{icon:"chevron-right",props:i})]})},jn=({onClose:e,props:n})=>{const{locale:i}=y.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=y.$131cf43a05231e1e$export$6d095e787d2b5e1f({...n,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:r,nextButtonProps:a,title:l}=y.$9942cad8a072a530$export$3ee915f8151bd4f1(n,o);return t.jsxs("div",{className:"calendar",children:[t.jsx(qe,{nextButtonProps:a,prevButtonProps:r,state:o,title:l}),t.jsx(Ze,{state:o}),t.jsx(vt,{children:t.jsx(O,{onClick:e,variant:"ghost",children:"Cancel"})})]})},wn=({segment:e,state:n})=>{const i=f.useTheme(),o=u.useRef(null),a={...e,placeholder:{day:"dd",dayPeriod:"(AM/PM)",era:"",hour:"hh",literal:"",minute:"mm",month:"mm",second:"",timeZoneName:"",year:"yyyy"}[e.type]},{segmentProps:l}=y.$32489daedd52963e$export$1315d136e6f7581(a,n,o),s=i.palette.gray[a.isEditable?800:500];return t.jsx("div",{...a.type!=="literal"&&{...l,className:"segment-cell"},ref:o,style:a.type==="literal"?void 0:{color:a.isPlaceholder?i.palette.gray[400]:s},children:a.isPlaceholder?a.placeholder:a.text})},vn=({disabled:e,error:n=!1,props:i})=>{const o=f.useTheme(),r=u.useRef(null),a=y.$3c0fc76039f1c516$export$60e84778edff6d26({...i,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:"en-US"}),{fieldProps:l}=y.$16f0b7bb276bc17e$export$5591b0b878c1a989(i,a,r),s=u.useCallback(c=>{const d=document.getElementsByClassName("segment-cell"),p=c.currentTarget;Object.values(d).some(g=>g.contains(p))||(c.preventDefault(),c.stopPropagation())},[]);return t.jsxs(sr,{...l,onClick:s,children:[t.jsx("div",{className:"flex flex-row",style:{color:o.palette.gray[y.lodashExports.isNil(a.value)?400:800]},tabIndex:-1,children:a.segments.map((c,d)=>{const p=`key_${d}`;return t.jsx(wn,{segment:{...c,isEditable:!e},state:a},p)})}),n?t.jsx(D,{icon:"exclamation-circle",iconColor:o.palette.error[500],iconSize:"lg"}):void 0]})},kn=e=>{const n=u.useRef(null),i=y.$eff5d8ee529ac4bb$export$fd53cef0cc796101({...e,locale:"en-US",shouldForceLeadingZeros:!0}),{timeValue:o}=i,r=!y.lodashExports.isNil(o)&&o.hour<12?"AM":"PM",[a,l]=u.useState(y.lodashExports.isNil(o)?"AM":r),{fieldProps:s}=y.$16f0b7bb276bc17e$export$4c842f6a241dc825(e,i,n),c=u.useCallback(d=>{const p=d.currentTarget.name;p!==a&&(y.lodashExports.isNil(o)||(p==="AM"?i.setSegment("dayPeriod",0):p==="PM"&&i.setSegment("dayPeriod",12))),l(p)},[a,i,o]);return t.jsxs(lr,{children:[t.jsx(Ut,{...s,ref:n,children:i.segments.slice(0,-2).map((d,p)=>{const g=`key_${p}`;return t.jsx(wn,{segment:d,state:i},g)})}),t.jsxs(Ut,{children:[t.jsx(Gt,{id:a==="AM"?"active":"",name:"AM",onClick:c,type:"button",children:"AM"}),t.jsx(Gt,{id:a==="PM"?"active":"",name:"PM",onClick:c,type:"button",children:"PM"})]})]})},Ye=e=>e&&e!=="-"?y.dayjs(e).format("YYYY-MM-DD"):"-",cr=e=>e&&e!=="-"?y.dayjs(e).format("YYYY-MM-DD hh:mm A"):"-",Yt=(e,n)=>y.dayjs(String(e).replace(/-/gu,"/")).hour(n.hour).minute(n.minute).second(n.second).format("YYYY/MM/DD hh:mm A"),Se=({error:e,buttonProps:n,datePickerRef:i,disabled:o=!1,granularity:r="day",fieldProps:a,groupProps:l,name:s,register:c,required:d,setValue:p,value:g})=>{const x=u.useCallback(h=>{if(!h)return;const b=r==="day"?Ye(String(h)):cr(String(h));a.onChange&&a.onChange(h??null),p&&p(s,b,{shouldDirty:!0})},[a,r,s,p]);return t.jsxs(ee,{...l,className:`${o?"disabled":""} ${e?"error":""}`,ref:i,children:[t.jsx(vn,{disabled:o,error:e!=null,props:{...a,autoFocus:!1,granularity:r,onChange:x,shouldForceLeadingZeros:!0}}),t.jsx(Ge,{disabled:o,icon:r==="minute"?"calendar-clock":"calendar",props:n}),t.jsx("input",{...c==null?void 0:c(s,{required:d}),"aria-label":s,className:"date-input",disabled:o,id:s,name:s,type:"text",value:g??""})]})},Je=({children:e,...n})=>{const i=u.useRef(null),{dialogProps:o}=y.$40df3f8667284809$export$d55e7ee900f34e93(n,i);return t.jsx(rr,{...o,ref:i,children:e})},Cn=({disabled:e=!1,error:n,helpLink:i,helpLinkText:o,helpText:r,required:a,label:l,name:s,register:c,setValue:d,tooltip:p,watch:g,...x})=>{const h=u.useRef(null),b=g==null?void 0:g(s),m=u.useCallback(R=>{d&&R&&d(s,Ye(String(R)),{shouldDirty:!0})},[s,d]),j=y.$ab5bf3f618090389$export$87194bb378cc3ac2({...x,onChange(R){m(R)},...!y._.isNil(b)&&!y._.isEmpty(b)&&y.dayjs(b).isValid()?{defaultValue:y.$fae977aafc393c5c$export$6b862160d295c8e(b.replace(/\//gu,"-"))}:{}}),{close:w}=j,{groupProps:C,fieldProps:v,buttonProps:k,dialogProps:S,calendarProps:I}=y.$6057a3d2a53a12fd$export$42df105a73306d51({...x,"aria-label":l??s,name:s},j,h);return t.jsxs(K,{error:e?void 0:n,helpLink:i,helpLinkText:o,helpText:r,htmlFor:s,label:l,required:a,tooltip:p,children:[t.jsx(Se,{buttonProps:k,datePickerRef:h,disabled:e,error:n,fieldProps:v,groupProps:C,name:s,register:c,required:a,setValue:d,value:b}),j.isOpen&&!e?t.jsx(ge,{offset:8,placement:"bottom start",state:j,triggerRef:h,children:t.jsx(Je,{...S,children:t.jsx(jn,{onClose:w,props:I})})}):null]})},Sn=({onClose:e,props:n})=>{const{locale:i}=y.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),o=u.useRef(null),r=y.$9a36b6ba2fb1a7c5$export$9a987164d97ecc90({...n,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:i}),{prevButtonProps:a,nextButtonProps:l,title:s}=y.$46a4342aab3d8076$export$87e0539f600c24e5(n,r,o);return t.jsxs("div",{className:"calendar-range",ref:o,children:[t.jsx(qe,{nextButtonProps:l,prevButtonProps:a,state:r,title:s}),t.jsx(Ze,{state:r}),t.jsx(vt,{children:t.jsx(O,{onClick:e,variant:"ghost",children:"Cancel"})})]})},dr=f.styled.div`
1378
1378
  ${({theme:e,$disabled:n,$show:i})=>`
1379
1379
  border-color: ${i?e.palette.error[500]:e.palette.gray[300]};
1380
1380
  display: flex;
@@ -1385,7 +1385,7 @@
1385
1385
  background: ${n?e.palette.gray[200]:e.palette.white};
1386
1386
  }
1387
1387
  `}
1388
- `,kt=({disabled:e=!1,error:n,label:i,name:o,required:r,tooltip:a,register:l,setValue:s,propsMax:c,propsMin:d,variant:p="default",...g})=>{const x=`${o}Max`,h=`${o}Min`,b=u.useRef(null),m=u.useCallback(E=>{s&&E&&(s((c==null?void 0:c.name)??x,Ye(String(E.end))),s((d==null?void 0:d.name)??h,Ye(String(E.start))))},[x,h,s,c,d]),j=y.$93c38a5e28be6249$export$e50a61c1de9f574({...g,endName:(c==null?void 0:c.name)??x,startName:(d==null?void 0:d.name)??h,onChange(E){m(E)}}),{close:w}=j,{groupProps:C,startFieldProps:k,endFieldProps:v,buttonProps:S,dialogProps:I,calendarProps:R}=y.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...g,"aria-label":i??o},j,b);return t.jsxs(K,{error:e?void 0:n,htmlFor:o,label:i,required:r,tooltip:a,children:[t.jsxs(dr,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:p==="filters"?"column":"row"},children:[t.jsx(Se,{buttonProps:S,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${o}`,validate:E=>v.value&&E>v.value?"Start date must be less than or equal to end date":null},groupProps:C,name:(d==null?void 0:d.name)??h,register:l,setValue:s,value:d==null?void 0:d.value}),t.jsx(Se,{buttonProps:S,datePickerRef:b,disabled:e,error:n,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${o}`,validate:E=>k.value&&E<k.value?"End date must be greater than or equal to start date":null},groupProps:C,name:(c==null?void 0:c.name)??x,register:l,setValue:s,value:c==null?void 0:c.value})]}),j.isOpen&&!e?t.jsx(ge,{offset:8,placement:"bottom start",state:j,triggerRef:b,children:t.jsx(Je,{...I,children:t.jsx(Sn,{onClose:w,props:R})})}):null]})},pr=f.styled.div`
1388
+ `,kt=({disabled:e=!1,error:n,label:i,name:o,required:r,tooltip:a,register:l,setValue:s,propsMax:c,propsMin:d,variant:p="default",...g})=>{const x=`${o}Max`,h=`${o}Min`,b=u.useRef(null),m=u.useCallback(F=>{s&&F&&(s((c==null?void 0:c.name)??x,Ye(String(F.end))),s((d==null?void 0:d.name)??h,Ye(String(F.start))))},[x,h,s,c,d]),j=y.$93c38a5e28be6249$export$e50a61c1de9f574({...g,endName:(c==null?void 0:c.name)??x,startName:(d==null?void 0:d.name)??h,onChange(F){m(F)}}),{close:w}=j,{groupProps:C,startFieldProps:v,endFieldProps:k,buttonProps:S,dialogProps:I,calendarProps:R}=y.$887cac91b7cc8801$export$12fd5f0e9f4bb192({...g,"aria-label":i??o},j,b);return t.jsxs(K,{error:e?void 0:n,htmlFor:o,label:i,required:r,tooltip:a,children:[t.jsxs(dr,{$disabled:e,$show:n!==void 0,ref:b,style:{flexDirection:p==="filters"?"column":"row"},children:[t.jsx(Se,{buttonProps:S,datePickerRef:b,disabled:e,error:n,fieldProps:{...v,"aria-label":`${v["aria-label"]} ${o}`,validate:F=>k.value&&F>k.value?"Start date must be less than or equal to end date":null},groupProps:C,name:(d==null?void 0:d.name)??h,register:l,setValue:s,value:d==null?void 0:d.value}),t.jsx(Se,{buttonProps:S,datePickerRef:b,disabled:e,error:n,fieldProps:{...k,"aria-label":`${k["aria-label"]} ${o}`,validate:F=>v.value&&F<v.value?"End date must be greater than or equal to start date":null},groupProps:C,name:(c==null?void 0:c.name)??x,register:l,setValue:s,value:c==null?void 0:c.value})]}),j.isOpen&&!e?t.jsx(ge,{offset:8,placement:"bottom start",state:j,triggerRef:b,children:t.jsx(Je,{...I,children:t.jsx(Sn,{onClose:w,props:R})})}):null]})},pr=f.styled.div`
1389
1389
  ${({theme:e})=>`
1390
1390
  align-items: center;
1391
1391
  border-top: 1px solid ${e.palette.gray[200]};
@@ -1400,9 +1400,9 @@
1400
1400
  gap: ${({theme:e})=>e.spacing[.5]};
1401
1401
  justify-content: flex-end;
1402
1402
  flex: 1 0 0;
1403
- `,zn=({handleTimeChange:e,onClose:n,props:i,timeState:o})=>{const r=f.useTheme(),{locale:a}=y.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=y.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:a}),{prevButtonProps:s,nextButtonProps:c,title:d}=y.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(qe,{nextButtonProps:c,prevButtonProps:s,state:l,title:d}),t.jsx(Ze,{state:l}),t.jsxs(pr,{children:[t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",size:"md",children:"Time"}),t.jsx(gr,{children:t.jsx(kn,{hourCycle:12,label:"time-field",onChange:e,value:o.timeValue})})]}),t.jsx(vt,{children:t.jsx(O,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ur=e=>{const{disabled:n=!1,error:i,required:o,label:r,name:a,tooltip:l,register:s,setValue:c,watch:d}=e,p=d==null?void 0:d(a),g=u.useRef(null),x=y.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:o,shouldCloseOnSelect:!1,value:y._.isNil(p)||y._.isEmpty(p)||p==="-"||y.dayjs(p,"YYYY/MM/DD hh:mm A").isValid()===!1?null:y.$fae977aafc393c5c$export$588937bcd60ade55(y.dayjs(p,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=x,{groupProps:b,fieldProps:m,buttonProps:j,dialogProps:w,calendarProps:C}=y.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,g),k=u.useCallback(S=>{if(C.onChange&&C.onChange(S),x.timeValue){const I=Yt(S,x.timeValue);c==null||c(a,I,{shouldDirty:!0})}else x.setDateValue(S)},[C,a,c,x]),v=u.useCallback(S=>{if(S){x.setTimeValue(S);const I=x.dateValue;if(I){const R=Yt(I,S);c==null||c(a,R,{shouldDirty:!0})}}},[x,c,a]);return t.jsxs(K,{error:n?void 0:i,htmlFor:a,label:r,required:o,tooltip:l,children:[t.jsx(Se,{buttonProps:j,datePickerRef:g,disabled:n,error:i,fieldProps:m,granularity:"minute",groupProps:b,name:a,register:s,setValue:c,value:p}),x.isOpen&&!n?t.jsx(ge,{offset:8,placement:"bottom start",state:x,triggerRef:g,children:t.jsx(Je,{...w,children:t.jsx(zn,{handleTimeChange:v,onClose:h,props:{...C,onChange:k},timeState:x})})}):null]})},xr=({children:e,currentValue:n,externalLink:i,isEditing:o,label:r,name:a,tooltip:l})=>{if(o)return t.jsx("div",{children:e});const s=y.lodashExports.isNil(n)?"":n,c=String(i??s);return t.jsxs($,{children:[t.jsx(jt,{htmlFor:a,label:r,tooltip:l,weight:"bold"}),c.startsWith("https://")?t.jsx(oe,{href:c,children:s}):t.jsx(z,{size:"md",children:s})]})},Qe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:o,helpText:r,error:a,id:l,indexArray:s=0,isValid:c,isTouched:d,label:p,name:g,maskValue:x=!1,onPaste:h,placeholder:b,removeItemArray:m,register:j,suggestions:w,tooltip:C,type:k="text",weight:v,...S})=>{const{required:I,onBlur:R,onChange:E}=S,F=f.useTheme(),T=e?void 0:a,[N,M]=u.useState(""),W=u.useCallback(H=>{M(H.target.value),E==null||E(H)},[E]),X=c&&d&&!e&&N.trim()!=="",B=u.useCallback(H=>{H.key==="Enter"&&H.preventDefault()},[]);return t.jsxs(K,{error:T,helpLink:i,helpLinkText:o,helpText:r,htmlFor:g,label:p,required:I,tooltip:C,weight:v,children:[t.jsxs(ee,{className:`
1403
+ `,zn=({handleTimeChange:e,onClose:n,props:i,timeState:o})=>{const r=f.useTheme(),{locale:a}=y.$18f2051aff69b9bf$export$43bb16f9c6d9e3f7(),l=y.$131cf43a05231e1e$export$6d095e787d2b5e1f({...i,createCalendar:y.$64244302c3013299$export$dd0bbc9b26defe37,locale:a}),{prevButtonProps:s,nextButtonProps:c,title:d}=y.$9942cad8a072a530$export$3ee915f8151bd4f1(i,l);return t.jsxs("div",{className:"calendar",children:[t.jsx(qe,{nextButtonProps:c,prevButtonProps:s,state:l,title:d}),t.jsx(Ze,{state:l}),t.jsxs(pr,{children:[t.jsx(z,{color:r.palette.gray[800],fontWeight:"bold",size:"md",children:"Time"}),t.jsx(gr,{children:t.jsx(kn,{hourCycle:12,label:"time-field",onChange:e,value:o.timeValue})})]}),t.jsx(vt,{children:t.jsx(O,{onClick:n,variant:"ghost",children:"Cancel"})})]})},ur=e=>{const{disabled:n=!1,error:i,required:o,label:r,name:a,tooltip:l,register:s,setValue:c,watch:d}=e,p=d==null?void 0:d(a),g=u.useRef(null),x=y.$ab5bf3f618090389$export$87194bb378cc3ac2({...e,granularity:"minute",hourCycle:12,isDisabled:n,isRequired:o,shouldCloseOnSelect:!1,value:y._.isNil(p)||y._.isEmpty(p)||p==="-"||y.dayjs(p,"YYYY/MM/DD hh:mm A").isValid()===!1?null:y.$fae977aafc393c5c$export$588937bcd60ade55(y.dayjs(p,"YYYY/MM/DD hh:mm A").format("YYYY-MM-DDTHH:mm:ss"))}),{close:h}=x,{groupProps:b,fieldProps:m,buttonProps:j,dialogProps:w,calendarProps:C}=y.$6057a3d2a53a12fd$export$42df105a73306d51(e,x,g),v=u.useCallback(S=>{if(C.onChange&&C.onChange(S),x.timeValue){const I=Yt(S,x.timeValue);c==null||c(a,I,{shouldDirty:!0})}else x.setDateValue(S)},[C,a,c,x]),k=u.useCallback(S=>{if(S){x.setTimeValue(S);const I=x.dateValue;if(I){const R=Yt(I,S);c==null||c(a,R,{shouldDirty:!0})}}},[x,c,a]);return t.jsxs(K,{error:n?void 0:i,htmlFor:a,label:r,required:o,tooltip:l,children:[t.jsx(Se,{buttonProps:j,datePickerRef:g,disabled:n,error:i,fieldProps:m,granularity:"minute",groupProps:b,name:a,register:s,setValue:c,value:p}),x.isOpen&&!n?t.jsx(ge,{offset:8,placement:"bottom start",state:x,triggerRef:g,children:t.jsx(Je,{...w,children:t.jsx(zn,{handleTimeChange:k,onClose:h,props:{...C,onChange:v},timeState:x})})}):null]})},xr=({children:e,currentValue:n,externalLink:i,isEditing:o,label:r,name:a,tooltip:l})=>{if(o)return t.jsx("div",{children:e});const s=y.lodashExports.isNil(n)?"":n,c=String(i??s);return t.jsxs($,{children:[t.jsx(jt,{htmlFor:a,label:r,tooltip:l,weight:"bold"}),c.startsWith("https://")?t.jsx(oe,{href:c,children:s}):t.jsx(z,{size:"md",children:s})]})},Qe=({disabled:e=!1,hasIcon:n=!1,helpLink:i,helpLinkText:o,helpText:r,error:a,id:l,indexArray:s=0,isValid:c,isTouched:d,label:p,name:g,maskValue:x=!1,onPaste:h,placeholder:b,removeItemArray:m,register:j,suggestions:w,tooltip:C,type:v="text",weight:k,...S})=>{const{required:I,onBlur:R,onChange:F}=S,E=f.useTheme(),T=e?void 0:a,[N,M]=u.useState(""),W=u.useCallback(H=>{M(H.target.value),F==null||F(H)},[F]),X=c&&d&&!e&&N.trim()!=="",B=u.useCallback(H=>{H.key==="Enter"&&H.preventDefault()},[]);return t.jsxs(K,{error:T,helpLink:i,helpLinkText:o,helpText:r,htmlFor:g,label:p,required:I,tooltip:C,weight:k,children:[t.jsxs(ee,{className:`
1404
1404
  ${e?"disabled":""} ${T?"error":""} ${X?"success":""}
1405
- `,children:[n?t.jsx(D,{icon:"user",iconSize:"xl",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":g,"aria-required":I,autoComplete:"off",className:x?"sr-block":"","data-testid":`${g}-input`,disabled:e,id:g,list:w?`list_${g}`:void 0,onKeyDown:B,onPaste:h,placeholder:b,type:k,...j?j(g,{required:I,onBlur:R,onChange:W}):{...S,onChange:W}}),T?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:F.palette.error[500],iconSize:"lg"}):void 0,X?t.jsx(D,{icon:"check-circle",iconClass:"success-icon",iconColor:F.palette.success[500],iconSize:"lg"}):void 0,l==="array"&&s>0?t.jsx(_,{color:F.palette.gray[400],icon:"trash",iconSize:"sm",iconType:"fa-light",onClick:m?m(s):void 0,variant:"ghost"}):void 0]}),w?t.jsx("datalist",{id:`list_${g}`,children:w.map(H=>t.jsx("option",{value:H},H))}):void 0]})},hr=f.styled.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,fr=f.styled.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
1405
+ `,children:[n?t.jsx(D,{icon:"user",iconSize:"xl",iconType:"fa-light"}):void 0,t.jsx("input",{"aria-hidden":!1,"aria-invalid":T?"true":"false","aria-label":g,"aria-required":I,autoComplete:"off",className:x?"sr-block":"","data-testid":`${g}-input`,disabled:e,id:g,list:w?`list_${g}`:void 0,onKeyDown:B,onPaste:h,placeholder:b,type:v,...j?j(g,{required:I,onBlur:R,onChange:W}):{...S,onChange:W}}),T?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:E.palette.error[500],iconSize:"lg"}):void 0,X?t.jsx(D,{icon:"check-circle",iconClass:"success-icon",iconColor:E.palette.success[500],iconSize:"lg"}):void 0,l==="array"&&s>0?t.jsx(_,{color:E.palette.gray[400],icon:"trash",iconSize:"sm",iconType:"fa-light",onClick:m?m(s):void 0,variant:"ghost"}):void 0]}),w?t.jsx("datalist",{id:`list_${g}`,children:w.map(H=>t.jsx("option",{value:H},H))}):void 0]})},hr=f.styled.div.attrs({className:"flex flex-wrap justify-center pv3 w-100"})``,fr=f.styled.div.attrs({className:"flex flex-wrap items-center justify-start mb2"})`
1406
1406
  gap: 12px;
1407
1407
  `,yr=f.styled.div.attrs({className:"flex flex-wrap items-center justify-end mb2"})`
1408
1408
  gap: 8px;
@@ -1458,7 +1458,7 @@
1458
1458
  padding: ${i}px;
1459
1459
  }
1460
1460
  `}
1461
- `,Tn=({align:e,children:n,cols:i,colsPadding:o,justify:r})=>t.jsx(jr,{$align:e,$cols:i,$colsPadding:o,$justify:r,children:n}),dt=({addText:e,append:n,disabled:i=!1,fields:o,fieldState:r,initValue:a="",index:l=0,required:s,label:c,max:d=100,name:p,onBlur:g,onChange:x,placeholder:h,tooltip:b,remove:m,value:j})=>{var k;const w=u.useCallback(()=>{n==null||n(a)},[n,a]),C=u.useCallback(v=>()=>{m==null||m(v)},[m]);return t.jsxs(Tn,{align:"start",children:[t.jsx(ct,{lg:75,md:75,sm:75,children:t.jsx(Qe,{disabled:i,error:r?(k=r.error)==null?void 0:k.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:c,name:p,onBlur:g,onChange:x,placeholder:h,removeItemArray:C,required:s,tooltip:b,value:j})}),l<d-1&&l+1===(o==null?void 0:o.length)?t.jsx(ct,{lg:25,md:25,sm:25,children:t.jsx(O,{disabled:i,icon:"plus",onClick:w,variant:"ghost",width:"max-content",children:e??"Add"})}):void 0]})},wr=({addText:e,append:n,control:i,disabled:o,fields:r,initValue:a="",required:l,label:s,max:c=void 0,name:d="array-field",onChange:p,placeholder:g,remove:x,tooltip:h})=>i&&r?t.jsx(u.Fragment,{children:r.map((b,m)=>t.jsx(y.Controller,{control:i,name:`${d}.${m}`,render:({field:j,fieldState:w})=>t.jsx(dt,{addText:e,append:n,disabled:o,fieldState:w,fields:r,index:m,initValue:a,label:s,max:c,name:j.name,onBlur:j.onBlur,onChange:p??j.onChange,placeholder:g,remove:x,required:l,tooltip:h,value:typeof j.value=="object"?j.value.value:j.value}),index:m},b.id))}):t.jsx(dt,{addText:e,disabled:o,initValue:a,label:s,max:c,name:d,onChange:p,placeholder:g,required:l,tooltip:h}),vr=f.styled(sn)`
1461
+ `,Tn=({align:e,children:n,cols:i,colsPadding:o,justify:r})=>t.jsx(jr,{$align:e,$cols:i,$colsPadding:o,$justify:r,children:n}),dt=({addText:e,append:n,disabled:i=!1,fields:o,fieldState:r,initValue:a="",index:l=0,required:s,label:c,max:d=100,name:p,onBlur:g,onChange:x,placeholder:h,tooltip:b,remove:m,value:j})=>{var v;const w=u.useCallback(()=>{n==null||n(a)},[n,a]),C=u.useCallback(k=>()=>{m==null||m(k)},[m]);return t.jsxs(Tn,{align:"start",children:[t.jsx(ct,{lg:75,md:75,sm:75,children:t.jsx(Qe,{disabled:i,error:r?(v=r.error)==null?void 0:v.message:void 0,id:"array",indexArray:l,isTouched:r?r.isTouched:void 0,isValid:r?!r.invalid:void 0,label:c,name:p,onBlur:g,onChange:x,placeholder:h,removeItemArray:C,required:s,tooltip:b,value:j})}),l<d-1&&l+1===(o==null?void 0:o.length)?t.jsx(ct,{lg:25,md:25,sm:25,children:t.jsx(O,{disabled:i,icon:"plus",onClick:w,variant:"ghost",width:"max-content",children:e??"Add"})}):void 0]})},wr=({addText:e,append:n,control:i,disabled:o,fields:r,initValue:a="",required:l,label:s,max:c=void 0,name:d="array-field",onChange:p,placeholder:g,remove:x,tooltip:h})=>i&&r?t.jsx(u.Fragment,{children:r.map((b,m)=>t.jsx(y.Controller,{control:i,name:`${d}.${m}`,render:({field:j,fieldState:w})=>t.jsx(dt,{addText:e,append:n,disabled:o,fieldState:w,fields:r,index:m,initValue:a,label:s,max:c,name:j.name,onBlur:j.onBlur,onChange:p??j.onChange,placeholder:g,remove:x,required:l,tooltip:h,value:typeof j.value=="object"?j.value.value:j.value}),index:m},b.id))}):t.jsx(dt,{addText:e,disabled:o,initValue:a,label:s,max:c,name:d,onChange:p,placeholder:g,required:l,tooltip:h}),vr=f.styled(sn)`
1462
1462
  white-space: nowrap;
1463
1463
  margin-right: ${({theme:e})=>e.spacing[.25]};
1464
1464
  text-overflow: ellipsis;
@@ -1469,13 +1469,13 @@
1469
1469
  position: absolute;
1470
1470
  visibility: hidden;
1471
1471
  width: 0;
1472
- `,ze=(e,n,i)=>{const o=new Event(e);return Object.defineProperty(o,"target",{value:{name:n,value:i}}),o},Cr=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Sr=({accept:e,disabled:n=!1,error:i,label:o,helpLink:r,helpText:a,id:l,multiple:s,name:c,onChange:d,required:p,register:g,setValue:x,tooltip:h,watch:b,weight:m})=>{const j=f.useTheme(),w=n?void 0:i,C=u.useRef(null),k=g==null?void 0:g(c,{required:p}),v=b==null?void 0:b(c),S=Cr(v),I=u.useCallback(()=>{const F=ze("change",c,void 0);x&&x(c,void 0),k&&k.onChange(F)},[k,c,x]),R=u.useCallback(F=>{const{files:T}=F.currentTarget,N=ze("change",c,T&&T.length>0?T:void 0);T&&T.length>0&&(d==null||d(N),x&&x(c,T),k&&k.onChange(N))},[k,c,d,x]),E=u.useCallback(F=>{n?F.preventDefault():C.current&&C.current.click()},[n]);return t.jsxs(K,{error:w,helpLink:r,helpText:a,htmlFor:l??c,label:o,required:p,tooltip:h,weight:m,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${w?"error":""}`,children:[t.jsx(vr,{$size:"md",children:S}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[y.lodashExports.isEmpty(S)||n?void 0:t.jsx(_,{color:j.palette.gray[400],height:"20px",icon:"xmark",iconSize:"64px",iconType:"fa-light",onClick:I,variant:"ghost",width:"20px"}),w&&t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"lg"}),t.jsxs(O,{border:n?`1px solid ${j.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:E,variant:"primary",width:"96px",children:[t.jsx(D,{icon:"search",iconSize:"xl",mr:.5}),"Add file"]})]})]}),t.jsx(kr,{...k,accept:e,"aria-label":c,"data-testid":c,disabled:n,id:l??c,multiple:s,name:c,onChange:R,ref:C,type:"file"})]})},zr=({title:e,icon:n="circle-info",children:i,tagElement:o})=>t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"row",gap:.75,children:[t.jsx(D,{icon:n,iconSize:"md",iconType:"fa-light"}),t.jsx(V,{fontWeight:"bold",size:"xs",children:e}),o&&t.jsx($,{display:"flex",flexDirection:"row",mb:.25,children:o})]}),t.jsx($,{children:i})]}),Tr=f.styled.input`
1472
+ `,ze=(e,n,i)=>{const o=new Event(e);return Object.defineProperty(o,"target",{value:{name:n,value:i}}),o},Cr=e=>{const n=e;return n?Array.from(n).map(i=>i.name).join(", "):""},Sr=({accept:e,disabled:n=!1,error:i,label:o,helpLink:r,helpText:a,id:l,multiple:s,name:c,onChange:d,required:p,register:g,setValue:x,tooltip:h,watch:b,weight:m})=>{const j=f.useTheme(),w=n?void 0:i,C=u.useRef(null),v=g==null?void 0:g(c,{required:p}),k=b==null?void 0:b(c),S=Cr(k),I=u.useCallback(()=>{const E=ze("change",c,void 0);x&&x(c,void 0),v&&v.onChange(E)},[v,c,x]),R=u.useCallback(E=>{const{files:T}=E.currentTarget,N=ze("change",c,T&&T.length>0?T:void 0);T&&T.length>0&&(d==null||d(N),x&&x(c,T),v&&v.onChange(N))},[v,c,d,x]),F=u.useCallback(E=>{n?E.preventDefault():C.current&&C.current.click()},[n]);return t.jsxs(K,{error:w,helpLink:r,helpText:a,htmlFor:l??c,label:o,required:p,tooltip:h,weight:m,children:[t.jsxs(ee,{className:`${n?"disabled":""} ${w?"error":""}`,children:[t.jsx(vr,{$size:"md",children:S}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,children:[y.lodashExports.isEmpty(S)||n?void 0:t.jsx(_,{color:j.palette.gray[400],height:"20px",icon:"xmark",iconSize:"64px",iconType:"fa-light",onClick:I,variant:"ghost",width:"20px"}),w&&t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:j.palette.error[500],iconSize:"lg"}),t.jsxs(O,{border:n?`1px solid ${j.palette.gray[300]} !important`:"",borderRadius:"0px 8px 8px 0px !important",disabled:n,height:"40px",onClick:F,variant:"primary",width:"96px",children:[t.jsx(D,{icon:"search",iconSize:"xl",mr:.5}),"Add file"]})]})]}),t.jsx(kr,{...v,accept:e,"aria-label":c,"data-testid":c,disabled:n,id:l??c,multiple:s,name:c,onChange:R,ref:C,type:"file"})]})},zr=({title:e,icon:n="circle-info",children:i,tagElement:o})=>t.jsxs($,{display:"flex",flexDirection:"column",gap:.25,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"row",gap:.75,children:[t.jsx(D,{icon:n,iconSize:"md",iconType:"fa-light"}),t.jsx(V,{fontWeight:"bold",size:"xs",children:e}),o&&t.jsx($,{display:"flex",flexDirection:"row",mb:.25,children:o})]}),t.jsx($,{children:i})]}),Tr=f.styled.input`
1473
1473
  border: none;
1474
1474
  background: transparent;
1475
1475
  min-width: 15rem;
1476
1476
  padding: 0;
1477
1477
  flex: 1;
1478
- `,pt=({disabled:e=!1,error:n,field:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b})=>{const m=f.useTheme(),j=e?void 0:n,[w,C]=u.useState(""),k=c?h:i==null?void 0:i.value,v=u.useMemo(()=>k&&typeof k=="string"?k.split(",").filter(Boolean):[],[k]),S=u.useCallback(T=>{const M=[...new Set(T.filter(Boolean))].join(","),W=ze("change",s,M);i&&i.onChange(W),c&&c(W)},[i,s,c]),I=u.useCallback(T=>{C(T.target.value)},[]),R=u.useCallback(T=>{const N=w.trim();N.length&&!v.includes(N)&&(T.preventDefault(),S([...v,N]),C("")),i&&i.onBlur()},[w,i,S,v]),E=u.useCallback(T=>{const N=w.trim();T.key==="Enter"&&N.length===0&&T.preventDefault(),["Enter",","].includes(T.key)&&N.length>0&&!v.includes(N)?(T.preventDefault(),S([...v,N]),C("")):T.key==="Backspace"&&!N.length&&v.length&&(T.preventDefault(),d==null||d(v[v.length-1]),S(v.slice(0,-1)))},[w,d,S,v]),F=u.useCallback(T=>()=>{d==null||d(T),S(v.filter(N=>N!==T))},[d,S,v]);return t.jsx(K,{error:j,helpLink:o,helpLinkText:r,helpText:a,htmlFor:s,label:l,required:g,tooltip:x,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${j?"error":""}`,children:[v.map(T=>t.jsx(J,{disabled:e,onClose:F(T),tagLabel:T},T)),t.jsx(Tr,{"aria-hidden":!1,"aria-invalid":j?"true":"false","aria-label":s,"aria-required":g,autoComplete:"off",disabled:e,id:s,onBlur:R,onChange:I,onKeyDown:E,placeholder:v.length===0?p:void 0,ref:i==null?void 0:i.ref,type:"text",value:w}),j?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"lg"}):void 0]})})},Ir=({disabled:e=!1,control:n,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b})=>n?t.jsx(y.Controller,{control:n,name:s,render:({field:m})=>t.jsx(pt,{disabled:e,error:i,field:m,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onRemove:d,placeholder:p,required:g,tooltip:x,weight:b}),rules:{required:g}}):t.jsx(pt,{disabled:e,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b}),me=u.forwardRef(function({disabled:n,icon:i,margin:o,onClick:r,...a},l){return t.jsx(or,{$margin:o,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...a,children:t.jsx(D,{icon:i,iconClass:"action",iconSize:"lg",iconType:"fa-light"})})}),Te=({error:e,decimalPlaces:n=0,disabled:i=!1,id:o,maxLength:r,max:a=1/0,min:l=0,name:s,onChange:c,onEnter:d,placeholder:p,register:g,required:x,setValue:h,tooltipMessage:b,value:m,variant:j="full",defaultValue:w})=>{const C=f.useTheme(),k=i?void 0:e,v=n<0?0:n,[S,I]=u.useState(m?y._.toNumber(m):w?y._.toNumber(w):0),R=u.useCallback(()=>{const M=(S-10**-v).toFixed(v),W=Math.max(Number(l),Number(M));h&&h(s,W,{shouldDirty:!0}),I(W);const X=ze("change",s,M);c&&c(X)},[S,v,l,h,s,c]),E=u.useCallback(()=>{const M=(S+10**-v).toFixed(v),W=Math.min(Number(a),Number(M)>Number(l)?Number(M):Number(l));h&&h(s,W,{shouldDirty:!0}),I(W);const X=ze("change",s,M);c&&c(X)},[S,v,a,l,h,s,c]),F=u.useCallback(M=>{const{value:W}=M.target,X=/\d+/u.test(W)&&!y._.isEmpty(W);h&&h(s,X?W:void 0),c&&c(M),I(Number(W))},[s,c,h]),T=u.useCallback(M=>{M.stopPropagation(),M.key==="Enter"&&!y.lodashExports.isEmpty(M.currentTarget.value)&&(d==null||d(y.lodashExports.toNumber(M.currentTarget.value)))},[d]),N=()=>t.jsx("input",{"aria-hidden":!1,"aria-invalid":k?"true":"false","aria-label":s,"aria-required":x,autoComplete:"off",disabled:i,id:o??s,max:a,min:l,onChange:F,onKeyUp:T,placeholder:p,required:x,step:10**-v,type:"number",value:S,...g==null?void 0:g(s,{maxLength:r,max:a,min:l,onChange:F,value:m,valueAsNumber:!0})});return t.jsxs(ee,{$variant:j,className:`${i?"disabled":""} ${k?"error":""}`,children:[j==="compact"&&b?t.jsx(Y,{id:`numberInputTooltip-${s}`,tip:b,width:"100%",children:N()}):N(),k&&t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:C.palette.error[500],iconSize:"lg"}),j==="compact"?t.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",borderLeft:"inherit"},children:[t.jsx(me,{borderRadius:`0 ${C.spacing[.5]} 0 0`,disabled:i,icon:"plus",onClick:E,px:.25}),t.jsx(Ko,{}),t.jsx(me,{borderRadius:`0 0 ${C.spacing[.5]} 0`,disabled:i,icon:"minus",onClick:R,px:.25})]}):t.jsxs(t.Fragment,{children:[t.jsx(me,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:R,px:.75,py:.75}),t.jsx(me,{borderRadius:`0 ${C.spacing[.5]} ${C.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:E,px:.75,py:.75})]})]})},In=({autoUpdate:e,decimalPlaces:n,disabled:i=!1,error:o,helpLink:r,helpLinkText:a,helpText:l,id:s,label:c,linkPosition:d,maxLength:p,max:g,min:x,name:h,onChange:b,onEnter:m,placeholder:j,register:w,required:C,setValue:k,tooltip:v,tooltipMessage:S,value:I,variant:R="full",watch:E,weight:F,defaultValue:T})=>R==="compact"?t.jsx(Te,{"aria-label":h,autoUpdate:e,decimalPlaces:n,defaultValue:T??Number(I??0),disabled:i,max:g,min:x,name:h,onEnter:m??(()=>{}),tooltipMessage:S,value:I,variant:R}):t.jsx(K,{error:i?void 0:o,helpLink:r,helpLinkText:a,helpText:l,htmlFor:h,label:c,linkPosition:d,maxLength:p,required:C,tooltip:v,weight:F,children:t.jsx(Te,{decimalPlaces:n,disabled:i,error:o,id:s,max:g,maxLength:p,min:x,name:h,onChange:b,placeholder:j,register:w,required:C,setValue:k,value:E?E(h):I,variant:R})}),Ct=({disabled:e=!1,error:n,name:i,label:o,propsMax:r,propsMin:a,required:l,tooltip:s,variant:c="default"})=>{const d=`${i}Max`,p=`${i}Min`;return t.jsx(K,{error:e?void 0:n,htmlFor:i,label:o,required:l,tooltip:s,children:t.jsxs($,{display:"flex",flexDirection:c==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Te,{...a,disabled:e,error:n,name:(a==null?void 0:a.name)??p}),t.jsx(Te,{...r,disabled:e,error:n,name:(r==null?void 0:r.name)??d})]})})},Dr=f.styled.div`
1478
+ `,pt=({disabled:e=!1,error:n,field:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b})=>{const m=f.useTheme(),j=e?void 0:n,[w,C]=u.useState(""),v=c?h:i==null?void 0:i.value,k=u.useMemo(()=>v&&typeof v=="string"?v.split(",").filter(Boolean):[],[v]),S=u.useCallback(T=>{const M=[...new Set(T.filter(Boolean))].join(","),W=ze("change",s,M);i&&i.onChange(W),c&&c(W)},[i,s,c]),I=u.useCallback(T=>{C(T.target.value)},[]),R=u.useCallback(T=>{const N=w.trim();N.length&&!k.includes(N)&&(T.preventDefault(),S([...k,N]),C("")),i&&i.onBlur()},[w,i,S,k]),F=u.useCallback(T=>{const N=w.trim();T.key==="Enter"&&N.length===0&&T.preventDefault(),["Enter",","].includes(T.key)&&N.length>0&&!k.includes(N)?(T.preventDefault(),S([...k,N]),C("")):T.key==="Backspace"&&!N.length&&k.length&&(T.preventDefault(),d==null||d(k[k.length-1]),S(k.slice(0,-1)))},[w,d,S,k]),E=u.useCallback(T=>()=>{d==null||d(T),S(k.filter(N=>N!==T))},[d,S,k]);return t.jsx(K,{error:j,helpLink:o,helpLinkText:r,helpText:a,htmlFor:s,label:l,required:g,tooltip:x,weight:b,children:t.jsxs(ee,{$overflowX:"auto",className:`${e?"disabled":""} ${j?"error":""}`,children:[k.map(T=>t.jsx(J,{disabled:e,onClose:E(T),tagLabel:T},T)),t.jsx(Tr,{"aria-hidden":!1,"aria-invalid":j?"true":"false","aria-label":s,"aria-required":g,autoComplete:"off",disabled:e,id:s,onBlur:R,onChange:I,onKeyDown:F,placeholder:k.length===0?p:void 0,ref:i==null?void 0:i.ref,type:"text",value:w}),j?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:m.palette.error[500],iconSize:"lg"}):void 0]})})},Ir=({disabled:e=!1,control:n,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s="input-tag",onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b})=>n?t.jsx(y.Controller,{control:n,name:s,render:({field:m})=>t.jsx(pt,{disabled:e,error:i,field:m,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onRemove:d,placeholder:p,required:g,tooltip:x,weight:b}),rules:{required:g}}):t.jsx(pt,{disabled:e,error:i,helpLink:o,helpLinkText:r,helpText:a,label:l,name:s,onChange:c,onRemove:d,placeholder:p,required:g,tooltip:x,value:h,weight:b}),me=u.forwardRef(function({disabled:n,icon:i,margin:o,onClick:r,...a},l){return t.jsx(or,{$margin:o,"aria-label":i,className:"action-btn",disabled:n,onClick:r,ref:l,type:"button",...a,children:t.jsx(D,{icon:i,iconClass:"action",iconSize:"lg",iconType:"fa-light"})})}),Te=({error:e,decimalPlaces:n=0,disabled:i=!1,id:o,maxLength:r,max:a=1/0,min:l=0,name:s,onChange:c,onEnter:d,placeholder:p,register:g,required:x,setValue:h,tooltipMessage:b,value:m,variant:j="full",defaultValue:w})=>{const C=f.useTheme(),v=i?void 0:e,k=n<0?0:n,[S,I]=u.useState(m?y._.toNumber(m):w?y._.toNumber(w):0),R=u.useCallback(()=>{const M=(S-10**-k).toFixed(k),W=Math.max(Number(l),Number(M));h&&h(s,W,{shouldDirty:!0}),I(W);const X=ze("change",s,M);c&&c(X)},[S,k,l,h,s,c]),F=u.useCallback(()=>{const M=(S+10**-k).toFixed(k),W=Math.min(Number(a),Number(M)>Number(l)?Number(M):Number(l));h&&h(s,W,{shouldDirty:!0}),I(W);const X=ze("change",s,M);c&&c(X)},[S,k,a,l,h,s,c]),E=u.useCallback(M=>{const{value:W}=M.target,X=/\d+/u.test(W)&&!y._.isEmpty(W);h&&h(s,X?W:void 0),c&&c(M),I(Number(W))},[s,c,h]),T=u.useCallback(M=>{M.stopPropagation(),M.key==="Enter"&&!y.lodashExports.isEmpty(M.currentTarget.value)&&(d==null||d(y.lodashExports.toNumber(M.currentTarget.value)))},[d]),N=()=>t.jsx("input",{"aria-hidden":!1,"aria-invalid":v?"true":"false","aria-label":s,"aria-required":x,autoComplete:"off",disabled:i,id:o??s,max:a,min:l,onChange:E,onKeyUp:T,placeholder:p,required:x,step:10**-k,type:"number",value:S,...g==null?void 0:g(s,{maxLength:r,max:a,min:l,onChange:E,value:m,valueAsNumber:!0})});return t.jsxs(ee,{$variant:j,className:`${i?"disabled":""} ${v?"error":""}`,children:[j==="compact"&&b?t.jsx(Y,{id:`numberInputTooltip-${s}`,tip:b,width:"100%",children:N()}):N(),v&&t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:C.palette.error[500],iconSize:"lg"}),j==="compact"?t.jsxs("div",{style:{display:"flex",flexDirection:"column",height:"100%",justifyContent:"center",borderLeft:"inherit"},children:[t.jsx(me,{borderRadius:`0 ${C.spacing[.5]} 0 0`,disabled:i,icon:"plus",onClick:F,px:.25}),t.jsx(Ko,{}),t.jsx(me,{borderRadius:`0 0 ${C.spacing[.5]} 0`,disabled:i,icon:"minus",onClick:R,px:.25})]}):t.jsxs(t.Fragment,{children:[t.jsx(me,{borderLeft:"inherit",borderRight:"inherit",disabled:i,icon:"minus",margin:"0 -0.625rem 0 0",onClick:R,px:.75,py:.75}),t.jsx(me,{borderRadius:`0 ${C.spacing[.5]} ${C.spacing[.5]} 0`,disabled:i,icon:"plus",onClick:F,px:.75,py:.75})]})]})},In=({autoUpdate:e,decimalPlaces:n,disabled:i=!1,error:o,helpLink:r,helpLinkText:a,helpText:l,id:s,label:c,linkPosition:d,maxLength:p,max:g,min:x,name:h,onChange:b,onEnter:m,placeholder:j,register:w,required:C,setValue:v,tooltip:k,tooltipMessage:S,value:I,variant:R="full",watch:F,weight:E,defaultValue:T})=>R==="compact"?t.jsx(Te,{"aria-label":h,autoUpdate:e,decimalPlaces:n,defaultValue:T??Number(I??0),disabled:i,max:g,min:x,name:h,onEnter:m??(()=>{}),tooltipMessage:S,value:I,variant:R}):t.jsx(K,{error:i?void 0:o,helpLink:r,helpLinkText:a,helpText:l,htmlFor:h,label:c,linkPosition:d,maxLength:p,required:C,tooltip:k,weight:E,children:t.jsx(Te,{decimalPlaces:n,disabled:i,error:o,id:s,max:g,maxLength:p,min:x,name:h,onChange:b,placeholder:j,register:w,required:C,setValue:v,value:F?F(h):I,variant:R})}),Ct=({disabled:e=!1,error:n,name:i,label:o,propsMax:r,propsMin:a,required:l,tooltip:s,variant:c="default"})=>{const d=`${i}Max`,p=`${i}Min`;return t.jsx(K,{error:e?void 0:n,htmlFor:i,label:o,required:l,tooltip:s,children:t.jsxs($,{display:"flex",flexDirection:c==="filters"?"column":"row",gap:.25,width:"100%",children:[t.jsx(Te,{...a,disabled:e,error:n,name:(a==null?void 0:a.name)??p}),t.jsx(Te,{...r,disabled:e,error:n,name:(r==null?void 0:r.name)??d})]})})},Dr=f.styled.div`
1479
1479
  ${({theme:e})=>`
1480
1480
  align-items: flex-start;
1481
1481
  align-self: stretch;
@@ -1515,7 +1515,7 @@
1515
1515
  }
1516
1516
  }
1517
1517
  `}
1518
- `,Fr=f.styled.button`
1518
+ `,Er=f.styled.button`
1519
1519
  ${({theme:e})=>`
1520
1520
  align-items: center;
1521
1521
  background: inherit;
@@ -1531,7 +1531,7 @@
1531
1531
  cursor: not-allowed;
1532
1532
  }
1533
1533
  `}
1534
- `,Er=f.styled.ul`
1534
+ `,Fr=f.styled.ul`
1535
1535
  ${({theme:e})=>`
1536
1536
  align-items: flex-start;
1537
1537
  box-shadow: ${e.shadows.md};
@@ -1569,9 +1569,9 @@
1569
1569
  overflow: hidden;
1570
1570
  text-overflow: ellipsis;
1571
1571
  white-space: nowrap;
1572
- `,Ar=({disabled:e,error:n,label:i,name:o,placeholder:r,required:a,register:l,tooltip:s,value:c,watch:d,weight:p})=>{const g=f.useTheme(),x=u.useRef(null),h=e?void 0:n,b=(d==null?void 0:d(o))??c,[m,j]=u.useState(!1),[w,C]=u.useState(""),{refs:k,floatingStyles:v}=y.useFloating$1({placement:"bottom-start",whileElementsMounted:y.autoUpdate}),{inputRef:S,inputValue:I,handlePhoneValueChange:R,country:E,setCountry:F}=y.ee({countries:y._$1,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),T=u.useCallback(B=>{B.key==="Enter"&&B.preventDefault()},[]),N=u.useCallback(B=>{B.preventDefault(),j(H=>!H),m||C("")},[m]),M=u.useCallback(B=>()=>{F(B),j(!1),C("")},[F,j]),W=u.useCallback(B=>{B.key.length===1?C(H=>H+B.key):B.key==="Backspace"&&C(H=>H.slice(0,-1))},[]),X=y._$1.filter(B=>{const{name:H}=y.M(B);return H.toLowerCase().includes(w.toLowerCase())});return te(k.floating.current,()=>{j(!1),C("")},!0),t.jsx(K,{error:h,htmlFor:o,label:i,required:a,tooltip:s,weight:p,children:t.jsxs(Dr,{className:`${e?"disabled":""} ${h?"error":""}`,ref:x,children:[t.jsxs(Fr,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:N,onKeyDown:W,ref:k.setReference,children:[t.jsx(y.q,{iso2:E.iso2,size:"16px"}),t.jsx(D,{icon:"angle-down",iconColor:g.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]}),t.jsxs(ee,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":o,"aria-required":a,autoComplete:"off","data-testid":`${o}-input`,disabled:e,id:o,name:o,onKeyDown:T,placeholder:r,ref:S,type:"tel",value:I,...l==null?void 0:l(o,{required:a,onChange:R})}),h?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:g.palette.error[500],iconSize:"lg"}):void 0]}),m&&xe.createPortal(t.jsx(Er,{ref:k.setFloating,style:v,children:X.map(B=>{const{dialCode:H,iso2:ae,name:Oe}=y.M(B);return t.jsxs(Rr,{onClick:M(ae),value:ae,children:[t.jsx(y.q,{iso2:ae,size:"16px"}),t.jsx(Nr,{children:Oe}),t.jsx(z,{color:g.palette.gray[400],size:"md",textAlign:"end",children:"+"+H})]},ae)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Lr=({disabled:e=!1,error:n,helpLink:i,helpLinkText:o,helpText:r,isTouched:a,isValid:l,label:s,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,onBlur:x,placeholder:h,register:b,required:m,rows:j,tooltip:w,watch:C,weight:k,value:v})=>{const S=f.useTheme(),I=(C==null?void 0:C(c))??v,R=l&&a&&!e,E=e?void 0:n;return t.jsx(K,{disabled:e,error:E,helpLink:i,helpLinkText:o,helpText:r,htmlFor:c,label:s,maxLength:g,required:m,tooltip:w,value:I?String(I):void 0,weight:k,children:t.jsxs(ee,{className:`
1573
- ${e?"disabled":""} ${E?"error":""} ${R?"success":""}
1574
- `,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":E?"true":"false","aria-label":c,"aria-required":m,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:h,rows:j,value:I,...b==null?void 0:b(c,{required:m,onBlur:x})}),E?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:S.palette.error[500],iconSize:"lg"}):void 0,R?t.jsx(D,{icon:"check-circle",iconClass:"success-icon",iconColor:S.palette.success[500],iconSize:"lg"}):void 0]})})},Pr=({control:e,description:n,disabled:i,id:o,items:r,align:a,inputType:l="text",inputNumberProps:s,minHeight:c,minWidth:d,name:p,placeholder:g,textAlign:x,tooltip:h,title:b,value:m,isTouched:j,isValid:w,error:C,onChange:k,register:v,setValue:S,watch:I})=>{const R=u.useMemo(()=>{if(l==="text")return t.jsx(Qe,{disabled:i,error:C,isTouched:j,isValid:w,name:p,placeholder:g,register:v});if(l==="date")return t.jsx(Cn,{disabled:i,error:C,name:p,register:v,setValue:S,watch:I});if(l==="select"&&r)return t.jsx(wt,{control:e,disabled:i,items:r,name:p,placeholder:g,value:m});const{decimalPlaces:E,max:F,min:T}=s??{};return t.jsx(In,{decimalPlaces:E,disabled:i,error:C,max:F,min:T,name:p,onChange:k,placeholder:g,register:v,setValue:S,value:m,watch:I})},[e,i,C,s,l,j,w,r,p,k,g,v,S,m,I]);return t.jsxs(Go,{$align:a,$minHeight:c,$minWidth:d,children:[t.jsx(Xe,{description:n,id:o,textAlign:x,title:b,tooltip:h}),R]})},Dn=({options:e,title:n,checkboxesName:i,defaultBgColor:o,defaultCollapsed:r,onChange:a})=>{const l=f.useTheme(),[s,c]=u.useState(r??!1),d=u.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":n,bgColor:s&&!o?l.palette.gray[50]:l.palette.white,border:"1px solid"+l.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[t.jsxs($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(z,{color:l.palette.gray[800],fontWeight:"bold",size:"md",children:n}),t.jsx(D,{icon:s?"chevron-up":"chevron-down",iconColor:l.palette.gray[400],iconSize:"lg"})]}),s?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{bgColor:l.palette.white,border:"1px solid",borderColor:l.palette.gray[300],borderRadius:l.spacing[.25],px:.5,py:.5,children:t.jsx(le,{checked:p.visible,disabled:p.locked,label:p.name,name:`${i}-${p.name}`,onChange:a,value:p.name})},p.name))}):void 0]})},Mr=f.styled.div`
1572
+ `,Ar=({disabled:e,error:n,label:i,name:o,placeholder:r,required:a,register:l,tooltip:s,value:c,watch:d,weight:p})=>{const g=f.useTheme(),x=u.useRef(null),h=e?void 0:n,b=(d==null?void 0:d(o))??c,[m,j]=u.useState(!1),[w,C]=u.useState(""),{refs:v,floatingStyles:k}=y.useFloating$1({placement:"bottom-start",whileElementsMounted:y.autoUpdate}),{inputRef:S,inputValue:I,handlePhoneValueChange:R,country:F,setCountry:E}=y.ee({countries:y._$1,defaultCountry:"co",forceDialCode:!0,value:b?String(b):""}),T=u.useCallback(B=>{B.key==="Enter"&&B.preventDefault()},[]),N=u.useCallback(B=>{B.preventDefault(),j(H=>!H),m||C("")},[m]),M=u.useCallback(B=>()=>{E(B),j(!1),C("")},[E,j]),W=u.useCallback(B=>{B.key.length===1?C(H=>H+B.key):B.key==="Backspace"&&C(H=>H.slice(0,-1))},[]),X=y._$1.filter(B=>{const{name:H}=y.M(B);return H.toLowerCase().includes(w.toLowerCase())});return te(v.floating.current,()=>{j(!1),C("")},!0),t.jsx(K,{error:h,htmlFor:o,label:i,required:a,tooltip:s,weight:p,children:t.jsxs(Dr,{className:`${e?"disabled":""} ${h?"error":""}`,ref:x,children:[t.jsxs(Er,{"aria-label":"country-selector","data-testid":"country-selector",disabled:e,id:"country-selector",onClick:N,onKeyDown:W,ref:v.setReference,children:[t.jsx(y.q,{iso2:F.iso2,size:"16px"}),t.jsx(D,{icon:"angle-down",iconColor:g.palette.gray[400],iconSize:"lg",iconType:"fa-light"})]}),t.jsxs(ee,{className:`${e?"disabled":""} ${h?"error":""}`,children:[t.jsx("input",{"aria-hidden":!1,"aria-invalid":h?"true":"false","aria-label":o,"aria-required":a,autoComplete:"off","data-testid":`${o}-input`,disabled:e,id:o,name:o,onKeyDown:T,placeholder:r,ref:S,type:"tel",value:I,...l==null?void 0:l(o,{required:a,onChange:R})}),h?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:g.palette.error[500],iconSize:"lg"}):void 0]}),m&&xe.createPortal(t.jsx(Fr,{ref:v.setFloating,style:k,children:X.map(B=>{const{dialCode:H,iso2:ae,name:Oe}=y.M(B);return t.jsxs(Rr,{onClick:M(ae),value:ae,children:[t.jsx(y.q,{iso2:ae,size:"16px"}),t.jsx(Nr,{children:Oe}),t.jsx(z,{color:g.palette.gray[400],size:"md",textAlign:"end",children:"+"+H})]},ae)})}),document.getElementById("modal-wrapper")??document.getElementById("root")??document.body)]})})},Lr=({disabled:e=!1,error:n,helpLink:i,helpLinkText:o,helpText:r,isTouched:a,isValid:l,label:s,name:c="input-text",id:d,maskValue:p=!1,maxLength:g,onBlur:x,placeholder:h,register:b,required:m,rows:j,tooltip:w,watch:C,weight:v,value:k})=>{const S=f.useTheme(),I=(C==null?void 0:C(c))??k,R=l&&a&&!e,F=e?void 0:n;return t.jsx(K,{disabled:e,error:F,helpLink:i,helpLinkText:o,helpText:r,htmlFor:c,label:s,maxLength:g,required:m,tooltip:w,value:I?String(I):void 0,weight:v,children:t.jsxs(ee,{className:`
1573
+ ${e?"disabled":""} ${F?"error":""} ${R?"success":""}
1574
+ `,children:[t.jsx("textarea",{"aria-hidden":!1,"aria-invalid":F?"true":"false","aria-label":c,"aria-required":m,className:p?"sr-block":"","data-testid":`${c}-text-area`,disabled:e,id:d??c,maxLength:g,placeholder:h,rows:j,value:I,...b==null?void 0:b(c,{required:m,onBlur:x})}),F?t.jsx(D,{icon:"exclamation-circle",iconClass:"error-icon",iconColor:S.palette.error[500],iconSize:"lg"}):void 0,R?t.jsx(D,{icon:"check-circle",iconClass:"success-icon",iconColor:S.palette.success[500],iconSize:"lg"}):void 0]})})},Pr=({control:e,description:n,disabled:i,id:o,items:r,align:a,inputType:l="text",inputNumberProps:s,minHeight:c,minWidth:d,name:p,placeholder:g,textAlign:x,tooltip:h,title:b,value:m,isTouched:j,isValid:w,error:C,onChange:v,register:k,setValue:S,watch:I})=>{const R=u.useMemo(()=>{if(l==="text")return t.jsx(Qe,{disabled:i,error:C,isTouched:j,isValid:w,name:p,placeholder:g,register:k});if(l==="date")return t.jsx(Cn,{disabled:i,error:C,name:p,register:k,setValue:S,watch:I});if(l==="select"&&r)return t.jsx(wt,{control:e,disabled:i,items:r,name:p,placeholder:g,value:m});const{decimalPlaces:F,max:E,min:T}=s??{};return t.jsx(In,{decimalPlaces:F,disabled:i,error:C,max:E,min:T,name:p,onChange:v,placeholder:g,register:k,setValue:S,value:m,watch:I})},[e,i,C,s,l,j,w,r,p,v,g,k,S,m,I]);return t.jsxs(Go,{$align:a,$minHeight:c,$minWidth:d,children:[t.jsx(Xe,{description:n,id:o,textAlign:x,title:b,tooltip:h}),R]})},Dn=({options:e,title:n,checkboxesName:i,defaultBgColor:o,defaultCollapsed:r,onChange:a})=>{const l=f.useTheme(),[s,c]=u.useState(r??!1),d=u.useCallback(()=>{c(p=>!p)},[]);return t.jsxs($,{"aria-label":n,bgColor:s&&!o?l.palette.gray[50]:l.palette.white,border:"1px solid"+l.palette.gray[300],borderRadius:"8px",display:"inline-flex",flexDirection:"column",gap:.625,px:.75,py:.625,role:"region",width:"100%",children:[t.jsxs($,{alignItems:"center",cursor:"pointer",display:"flex",onClick:d,children:[t.jsx(z,{color:l.palette.gray[800],fontWeight:"bold",size:"md",children:n}),t.jsx(D,{icon:s?"chevron-up":"chevron-down",iconColor:l.palette.gray[400],iconSize:"lg"})]}),s?t.jsx($,{display:"flex",gap:.75,wrap:"wrap",children:e.map(p=>t.jsx($,{bgColor:l.palette.white,border:"1px solid",borderColor:l.palette.gray[300],borderRadius:l.spacing[.25],px:.5,py:.5,children:t.jsx(le,{checked:p.visible,disabled:p.locked,label:p.name,name:`${i}-${p.name}`,onChange:a,value:p.name})},p.name))}):void 0]})},Mr=f.styled.div`
1575
1575
  display: flex;
1576
1576
  align-self: flex-start;
1577
1577
  margin-left: auto;
@@ -1831,7 +1831,7 @@
1831
1831
  color: ${({theme:e})=>e.palette.gray[400]};
1832
1832
  right: 6px;
1833
1833
  }
1834
- `,Fn=u.forwardRef(function({defaultChecked:n,disabled:i=!1,variant:o="default",icon:r=!1,justify:a,name:l,leftText:s,leftTextMinWidth:c,rightText:d,tooltip:p,tooltipPlace:g,onChange:x,...h},b){const m=n===!0?"on":"off",j=typeof s=="object"&&s.on&&s.off?s[m]:s,w=u.useCallback(v=>{v.stopPropagation()},[]),C=()=>o==="inline"?t.jsxs(Hr,{onClick:w,role:"switch",children:[t.jsx("input",{...h,"aria-disabled":i,"aria-label":l,checked:n===!0,disabled:i,name:l,onChange:x,ref:b,type:"checkbox"}),t.jsxs(q,{"aria-label":"Toggle Switch",id:`${l}Toggle`,children:[t.jsx(pe,{children:n?t.jsx(D,{icon:"check",iconSize:"sm"}):t.jsx(D,{icon:"times",iconSize:"sm"})}),t.jsx(Ve,{children:n?"YES":"NO"})]})]}):t.jsxs(Br,{onClick:w,role:"switch",children:[t.jsx("input",{...h,"aria-disabled":i,"aria-label":l,checked:n===!0,disabled:i,name:l,onChange:x,ref:b,type:"checkbox"}),t.jsx(Q,{"aria-label":"Toggle Switch",id:`${l}Toggle`,children:t.jsx(de,{children:r?t.jsx(D,{icon:n?"check":"times",iconSize:"md"}):void 0})})]}),k=()=>{const v=C();return i&&p?t.jsx(Y,{id:`${l}-tooltip`,place:g,tip:p,children:v}):v};return o==="inline"?t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:c,children:j}),k(),d]}):t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:c,children:j}),k(),d]})}),Vr=({id:e,title:n,toggles:i,minWidth:o="auto",height:r="auto"})=>{const a=f.useTheme();return t.jsxs($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${a.palette.gray[200]}`,borderRadius:a.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:o,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Xe,{id:e,title:n}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(Fn,{...l},`$card-toggle-${l.name}`))})]})},Ur=({description:e,height:n="auto",leftIconName:i,children:o,rightIconName:r,title:a,tooltipId:l,tooltipTip:s,tooltipPlace:c="bottom",variant:d="centered",width:p="318px"})=>{const g=f.useTheme(),x=d==="centered",h=l&&s?t.jsx(Y,{display:"flex",icon:r??i,iconColor:g.palette.gray[800],id:l,place:c,tip:s}):void 0;return t.jsxs($,{alignItems:x?"center":"flex-start",bgColor:g.palette.gray[50],border:`1px solid ${g.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:p,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[x||y.isUndefined(i)?void 0:h,t.jsx(z,{color:x?g.palette.gray[800]:g.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||y.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[x&&!y.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[y.isUndefined(a)?void 0:t.jsx(V,{fontWeight:"bold",size:"sm",children:a}),o]}),x&&!y.isUndefined(r)?h:void 0]})]})},Gr=.5,Kt=1.25,Yr=({children:e,bgColor:n,border:i,gap:o=Gr,px:r=Kt,py:a=Kt,...l})=>{const s=f.useTheme();return t.jsx($,{bgColor:n??s.palette.white,border:i??`1px solid ${s.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:"column",gap:o,px:r,py:a,...l,children:e})},Kr=f.styled.div`
1834
+ `,En=u.forwardRef(function({defaultChecked:n,disabled:i=!1,variant:o="default",icon:r=!1,justify:a,name:l,leftText:s,leftTextMinWidth:c,rightText:d,tooltip:p,tooltipPlace:g,onChange:x,...h},b){const m=n===!0?"on":"off",j=typeof s=="object"&&s.on&&s.off?s[m]:s,w=u.useCallback(k=>{k.stopPropagation()},[]),C=()=>o==="inline"?t.jsxs(Hr,{onClick:w,role:"switch",children:[t.jsx("input",{...h,"aria-disabled":i,"aria-label":l,checked:n===!0,disabled:i,name:l,onChange:x,ref:b,type:"checkbox"}),t.jsxs(q,{"aria-label":"Toggle Switch",id:`${l}Toggle`,children:[t.jsx(pe,{children:n?t.jsx(D,{icon:"check",iconSize:"sm"}):t.jsx(D,{icon:"times",iconSize:"sm"})}),t.jsx(Ve,{children:n?"YES":"NO"})]})]}):t.jsxs(Br,{onClick:w,role:"switch",children:[t.jsx("input",{...h,"aria-disabled":i,"aria-label":l,checked:n===!0,disabled:i,name:l,onChange:x,ref:b,type:"checkbox"}),t.jsx(Q,{"aria-label":"Toggle Switch",id:`${l}Toggle`,children:t.jsx(de,{children:r?t.jsx(D,{icon:n?"check":"times",iconSize:"md"}):void 0})})]}),v=()=>{const k=C();return i&&p?t.jsx(Y,{id:`${l}-tooltip`,place:g,tip:p,children:k}):k};return o==="inline"?t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:c,children:j}),v(),d]}):t.jsxs($,{alignItems:"center",display:"flex",fontSize:"14px",gap:.75,justify:a,children:[t.jsx($,{minWidth:c,children:j}),v(),d]})}),Vr=({id:e,title:n,toggles:i,minWidth:o="auto",height:r="auto"})=>{const a=f.useTheme();return t.jsxs($,{alignItems:"center",bgColor:a.palette.white,border:`1px solid ${a.palette.gray[200]}`,borderRadius:a.spacing[.25],display:"flex",flexDirection:"column",gap:.5,height:r,justify:"center",minHeight:"100px",minWidth:o,padding:[1.25,1.25,1.25,1.25],children:[t.jsx(Xe,{id:e,title:n}),t.jsx($,{display:"flex",flexDirection:"column",gap:.5,minHeight:"40px",width:"100%",children:i.map(l=>t.jsx(En,{...l},`$card-toggle-${l.name}`))})]})},Ur=({description:e,height:n="auto",leftIconName:i,children:o,rightIconName:r,title:a,tooltipId:l,tooltipTip:s,tooltipPlace:c="bottom",variant:d="centered",width:p="318px"})=>{const g=f.useTheme(),x=d==="centered",h=l&&s?t.jsx(Y,{display:"flex",icon:r??i,iconColor:g.palette.gray[800],id:l,place:c,tip:s}):void 0;return t.jsxs($,{alignItems:x?"center":"flex-start",bgColor:g.palette.gray[50],border:`1px solid ${g.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:x?"column":"column-reverse",gap:.5,height:n,justify:"center",padding:[1.25,1.25,1.25,1.25],width:p,children:[t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[x||y.isUndefined(i)?void 0:h,t.jsx(z,{color:x?g.palette.gray[800]:g.palette.gray[400],size:"md",textAlign:x?"center":"start",children:e}),x||y.isUndefined(r)?void 0:h]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.5,children:[x&&!y.isUndefined(i)?h:void 0,t.jsxs("div",{style:{display:"flex",gap:"12px"},children:[y.isUndefined(a)?void 0:t.jsx(V,{fontWeight:"bold",size:"sm",children:a}),o]}),x&&!y.isUndefined(r)?h:void 0]})]})},Gr=.5,Kt=1.25,Yr=({children:e,bgColor:n,border:i,gap:o=Gr,px:r=Kt,py:a=Kt,...l})=>{const s=f.useTheme();return t.jsx($,{bgColor:n??s.palette.white,border:i??`1px solid ${s.palette.gray[200]}`,borderRadius:"4px",display:"inline-flex",flexDirection:"column",gap:o,px:r,py:a,...l,children:e})},Kr=f.styled.div`
1835
1835
  position: relative;
1836
1836
  margin: auto;
1837
1837
  overflow: hidden;
@@ -1861,7 +1861,7 @@
1861
1861
  gap: ${({theme:e})=>e.spacing[.5]};
1862
1862
  justify-content: center;
1863
1863
  margin-top: ${({theme:e})=>e.spacing[2]};
1864
- `,Qr=({slides:e,interval:n=300})=>{const{cycle:i,setCycle:o,setProgress:r}=cn(n,e.length),a=u.useCallback(l=>()=>{o(l),r(0)},[o,r]);return t.jsxs(Kr,{"aria-roledescription":"carousel",children:[t.jsx(Xr,{$currentIndex:i,children:e.map((l,s)=>{const c=`slide-${s}`;return t.jsx(Zr,{"aria-label":c,"aria-roledescription":"slide",children:l.content},c)})}),t.jsx(Jr,{children:e.map((l,s)=>{const c=`nav-button-${s}`;return t.jsx(qr,{$isActive:s===i,"aria-label":`Go to slide ${s+1}`,"data-testid":s===i?"active":"inactive",onClick:a(s)},c)})})]})},En=f.styled.div`
1864
+ `,Qr=({slides:e,interval:n=300})=>{const{cycle:i,setCycle:o,setProgress:r}=cn(n,e.length),a=u.useCallback(l=>()=>{o(l),r(0)},[o,r]);return t.jsxs(Kr,{"aria-roledescription":"carousel",children:[t.jsx(Xr,{$currentIndex:i,children:e.map((l,s)=>{const c=`slide-${s}`;return t.jsx(Zr,{"aria-label":c,"aria-roledescription":"slide",children:l.content},c)})}),t.jsx(Jr,{children:e.map((l,s)=>{const c=`nav-button-${s}`;return t.jsx(qr,{$isActive:s===i,"aria-label":`Go to slide ${s+1}`,"data-testid":s===i?"active":"inactive",onClick:a(s)},c)})})]})},Fn=f.styled.div`
1865
1865
  ${({theme:e})=>`
1866
1866
  background-color: ${e.palette.gray[100]};
1867
1867
  border-radius: ${e.spacing[.25]};
@@ -1952,10 +1952,10 @@
1952
1952
  background-color: ${e.palette.gray[200]};
1953
1953
  }
1954
1954
  `}
1955
- `,Rn=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(u.useEffect(()=>{y.prismExports.highlightAll()},[]),t.jsx(En,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":y._.isNil(n)||y._.isString(n)?0:n.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:y._.isNil(n)||y._.isString(n)||y._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),ta=({minWidth:e="565px",noCodeMessage:n="Code snippet not available",snippet:i,specific:o,variant:r="normal",expanded:a=!1})=>{const l=f.useTheme(),[s,c]=u.useState(!1),[d,p]=u.useState(!0),g=u.useCallback(()=>{c(m=>!m)},[c]),x=u.useCallback(()=>{if(y._.isNil(i)||y._.isEmpty(i)||!y._.isString(i))return p(!1),n;const m=i.split(`
1955
+ `,Rn=({noCodeMessage:e="Code snippet not available",snippet:n,specific:i})=>(u.useEffect(()=>{y.prismExports.highlightAll()},[]),t.jsx(Fn,{"data-private":!0,children:t.jsx("pre",{className:"line-highlight","data-line-offset":y._.isNil(n)||y._.isString(n)?0:n.offset+.7,...i!==void 0?{"data-line":String(Number(i))}:{},children:y._.isNil(n)||y._.isString(n)||y._.isEmpty(n.content)?t.jsx("div",{className:"no-data",children:t.jsx("p",{children:e})}):t.jsx("code",{className:"language-none",children:n.content})})})),ta=({minWidth:e="565px",noCodeMessage:n="Code snippet not available",snippet:i,specific:o,variant:r="normal",expanded:a=!1})=>{const l=f.useTheme(),[s,c]=u.useState(!1),[d,p]=u.useState(!0),g=u.useCallback(()=>{c(m=>!m)},[c]),x=u.useCallback(()=>{if(y._.isNil(i)||y._.isEmpty(i)||!y._.isString(i))return p(!1),n;const m=i.split(`
1956
1956
  `);return m.length>8&&!s?`${[...m].splice(0,7).join(`
1957
1957
  `)}
1958
- ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(async()=>{await navigator.clipboard.writeText(h)},[h]);return r==="location"?t.jsx(Rn,{noCodeMessage:n,snippet:i,specific:o}):t.jsxs($,{bgColor:l.palette.gray[100],borderRadius:"4px",display:"inline-flex",justify:a?"space-between":"center",minWidth:e,position:"relative",px:1,py:1,scroll:"x",width:a?"100%":"fit-content",children:[t.jsx(En,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:h})})}),t.jsxs(ea,{children:[t.jsx(_,{height:l.spacing[2.5],icon:"copy",iconColor:l.palette.gray[700],iconSize:"lg",iconType:"fa-light",onClick:b,variant:"ghost",width:l.spacing[2.5]}),d?t.jsxs(O,{onClick:g,variant:"ghost",children:[s?"Show Less":"Show more",t.jsx(D,{icon:s?"chevron-up":"chevron-down",iconColor:l.palette.gray[700],iconSize:"sm",iconType:"fa-light",ml:.25,onClick:b})]}):!1]})]})},{getVariant:na}=ie(e=>({fixed:`
1958
+ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(async()=>{await navigator.clipboard.writeText(h)},[h]);return r==="location"?t.jsx(Rn,{noCodeMessage:n,snippet:i,specific:o}):t.jsxs($,{bgColor:l.palette.gray[100],borderRadius:"4px",display:"inline-flex",justify:a?"space-between":"center",minWidth:e,position:"relative",px:1,py:1,scroll:"x",width:a?"100%":"fit-content",children:[t.jsx(Fn,{"data-private":!0,children:t.jsx("pre",{children:t.jsx("code",{className:"language-none",children:h})})}),t.jsxs(ea,{children:[t.jsx(_,{height:l.spacing[2.5],icon:"copy",iconColor:l.palette.gray[700],iconSize:"lg",iconType:"fa-light",onClick:b,variant:"ghost",width:l.spacing[2.5]}),d?t.jsxs(O,{onClick:g,variant:"ghost",children:[s?"Show Less":"Show more",t.jsx(D,{icon:s?"chevron-up":"chevron-down",iconColor:l.palette.gray[700],iconSize:"sm",iconType:"fa-light",ml:.25,onClick:b})]}):!1]})]})},{getVariant:na}=ie(e=>({fixed:`
1959
1959
  height: auto;
1960
1960
  min-width: 300px;
1961
1961
  padding: ${e.spacing[1.25]};
@@ -2243,7 +2243,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2243
2243
  svg.fa-check {
2244
2244
  border-radius: 2px;
2245
2245
  }
2246
- `,Hn=({control:e,option:n,register:i,watch:o,setValue:r})=>{var a,l,s,c;switch(n.type){case"checkboxes":{const p=o("search")??"",g=o("checkbox")??[],x=n.options??[],h=fa(x,p,g);return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[!n.label||n.label===""?void 0:null,h.map(b=>t.jsx(qt,{value:b.value,width:"content",children:t.jsx(le,{...i("checkbox"),label:b.label,value:b.value})},`li-checkbox-${b.value}`))]})}case"radioButton":return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[n.label,(a=n.options)==null?void 0:a.map(p=>t.jsx(qt,{value:p.value,width:"content",children:t.jsx(et,{...i("radio"),label:p.label,value:p.value})},`li-radio-${p.value}`))]});case"select":return t.jsx(wt,{control:e,items:((l=n.options)==null?void 0:l.map(p=>({name:p.label??"",value:p.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const d=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Qe,{label:n.label,name:d,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Ct,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:r},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(kt,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(s=n.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(c=n.minValue)==null?void 0:c.toString()},register:i,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},Vn=({control:e,items:n,register:i,setValue:o,watch:r})=>t.jsx(t.Fragment,{children:n.map((a,l)=>{const s=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Hn,{control:e,option:a,register:i,setValue:o,watch:r}),l<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},s)})}),Un=e=>{var c,d,p,g,x;const[n,i]=u.useState([...e]),{control:o,register:r,handleSubmit:a,setValue:l,watch:s}=y.useForm({defaultValues:{checkbox:e.filter(h=>h.type==="checkboxes").flatMap(h=>{var b;return((b=h.options)==null?void 0:b.filter(m=>m.checked).map(m=>m.value))??[]}),radio:((p=(d=(c=e.find(h=>h.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:h})=>h))==null?void 0:p.value)??"",text:e.filter(h=>["text","select"].includes(h.type)).reduce((h,b)=>({...h,[`${String(b.key)}-${b.filterFn??"caseInsensitive"}`]:b.value??""}),{}),minValue:(g=e.find(h=>["numberRange","dateRange"].includes(h.type)))==null?void 0:g.minValue,maxValue:(x=e.find(h=>["numberRange","dateRange"].includes(h.type)))==null?void 0:x.maxValue,search:""}});return{control:o,items:n,setItems:i,register:r,handleSubmit:a,setValue:l,watch:s}},gt=({options:e,onSearch:n,onSubmit:i,id:o,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:c,handleSubmit:d,setValue:p,watch:g}=Un(e),x=e.some(w=>w.type==="checkboxes"&&w.hideSearch!==!0),h=e.some(w=>w.label&&w.label!==""),b=u.useCallback(async w=>{const{value:C}=w.target;p("search",C),n&&n(C)},[n,p]),m=u.useCallback(()=>{p("search",""),n&&n("")},[n,p]),j=u.useCallback(w=>{i&&i(w)},[i]);return u.useEffect(()=>{s(e),ha(e,p)},[e,s,p]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:o,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[x&&t.jsxs("div",{children:[h?r:void 0,t.jsx(ce,{onChange:b,onClear:m,placeholder:"Search"})]}),t.jsxs("form",{id:o,onSubmit:d(j),children:[t.jsx(Vn,{control:a,items:l,register:c,setValue:p,watch:g}),t.jsx(O,{mt:1,type:"submit",children:"Apply"})]})]})},Gn=({options:e,variant:n,onApplyFilters:i,onSearch:o,setDirection:r,setHandler:a,onFilterStateChange:l})=>{const s=f.useTheme(),[c,d]=u.useState(e),[p,g]=u.useState([]),[x,h]=u.useState({}),[b,m]=u.useState(""),j=u.useCallback(k=>()=>{const v=c.find(I=>I.label===k),S=!(v!=null&&v.filterOptions.some(I=>I.type==="dateRange"||I.type==="select"));a==null||a(S??!0),m(k),g((v==null?void 0:v.filterOptions)??[])},[c,a]),w=u.useCallback(k=>{const v=[...k.checkbox,...Object.values(k.text??{}),...k.radio?[k.radio]:[],...k.minValue?[String(k.minValue)]:[],...k.maxValue?[String(k.maxValue)]:[]];h(F=>v.length>0?{...F,[b]:v}:F);const S=F=>{var T,N;return{...F,options:(T=F.options)==null?void 0:T.map(M=>({...M,checked:k.checkbox.includes(M.value)||k.radio===M.value})),value:["text","select"].includes(F.type)?((N=k.text)==null?void 0:N[`${String(F.key)}-${F.filterFn??"caseInsensitive"}`])??F.value:F.value,minValue:["numberRange","dateRange"].includes(F.type)?k.minValue:F.minValue,maxValue:["numberRange","dateRange"].includes(F.type)?k.maxValue:F.maxValue}},I=F=>F.label===b?{...F,filterOptions:F.filterOptions.map(S)}:F,R=c.map(I);d(F=>F.map(I));const E=R.flatMap(({filterOptions:F})=>F);i(E),g([])},[c,i,b]),C=u.useCallback((k,v)=>{const S=`li-filter-option-${k}`;return t.jsxs(xa,{icon:v,onClick:j(k),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:S,width:"100%",children:[k,x[k]===void 0?void 0:t.jsx(J,{tagLabel:x[k].length.toString()})]},S)},[x,j]);return u.useEffect(()=>{const k=e.reduce((v,{label:S,filterOptions:I})=>{const R=I.flatMap(({value:T,minValue:N,maxValue:M})=>[N,M,T]).filter(Boolean),E=I.flatMap(({options:T})=>T??[]).filter(({checked:T=!1})=>T).map(({value:T})=>T),F=[...R,...E];return F.length===0?v:{...v,[S]:F}},{});h(k),p.length>0&&r&&r("column")},[p,e,r]),u.useEffect(()=>{l==null||l(p.length>0)},[p.length,l]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"row",height:"max-content",maxHeight:p.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?t.jsx(gt,{id:"filters-options",onSearch:o,onSubmit:w,options:p,selectedFilter:b}):Object.entries(Tt(e)).map(([k,v])=>t.jsxs($,{style:{writingMode:"horizontal-tb"},children:[t.jsx(z,{color:s.palette.gray[400],fontWeight:"bold",mb:.25,size:"md",children:k}),v.map(({label:S,icon:I="filter-list"})=>C(S,I))]},k))}):t.jsx($,{display:"flex",flexDirection:"row",height:"max-content",maxHeight:p.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?t.jsx(gt,{id:"filters-options",onSearch:o,onSubmit:w,options:p,selectedFilter:b}):e.map(({label:k,icon:v="filter-list"})=>C(k,v))})},Yn=({options:e,onApplyFilters:n,onSearch:i,modalRef:o,variant:r})=>{const[a,l]=u.useState("row"),[s,c]=u.useState(!0),[d,p]=u.useState(!1),x=(r==="grouped"?Object.values(Tt(e)).reduce((j,w)=>j+w.length,0):e.length)>5&&!d,h=f.useTheme(),b=u.useRef(null),m=t.jsx(_,{icon:"close",iconColor:h.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"});return u.useEffect(()=>{const j=w=>{const C=b.current;C&&!C.contains(w.target)&&o.close()};if(s)return document.addEventListener("mousedown",j,!0),()=>{document.removeEventListener("mousedown",j,!0)}},[b,s,o]),t.jsx(ya,{$bgColor:"transparent","aria-label":o.name,children:t.jsxs(St,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:b,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content",paddingBottom:x?"0":void 0},children:[a==="column"?m:void 0,t.jsx(Gn,{onApplyFilters:n,onFilterStateChange:p,onSearch:i,options:e,setDirection:l,setHandler:c,variant:r}),a==="row"?m:void 0]})})};function ba(e){if(!e)return;const n=20;if(e.length<=n)return e;const i=n-3,o=Math.ceil(i/2),r=Math.floor(i/2);return`${e.slice(0,o)}...${e.slice(e.length-r)}`}function Kn(e){if(!e||e.length===0)return;const n=e.filter(s=>s.checked).map(s=>s.label??s.value);if(n.length===0)return;const i=(s,c=20)=>{if(s.length<=c)return s;const d=c-3,p=Math.ceil(d/2),g=Math.floor(d/2);return`${s.slice(0,p)}...${s.slice(s.length-g)}`};if(n.length===1){const s=n[0];return s.length>20?i(s,20):s}if(n.length===2){const s=n[0],c=n.join(", ").length;return s.length>20||c>20?`${i(s,20)} +1 more`:`${n[0]}, ${n[1]}`}const o=n[0],r=n.length-1,a=20,l=n.join(", ").length;return o.length>a||l>a?`${i(o,a)} +${r} more`:`${n[0]}, ${n[1]}`}function $a(e,n,i){const o=i??"",r=y._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=y._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!y._.isUndefined(r)&&!y._.isUndefined(a))return`${r}${o} - ${a}${o}`;if(!y._.isUndefined(r))return`Min ${r}${o}`;if(!y._.isUndefined(a))return`Max ${a}${o}`}function ma(e,n){if(y.dayjs_minExports.extend(y.localizedFormat),!(y._.isUndefined(e)&&y._.isUndefined(n))){if(e!==""&&n!==""&&!y._.isUndefined(e)&&!y._.isUndefined(n))return`${y.dayjs(e).format("LL")} - ${y.dayjs(n).format("LL")}`;if(e!==""&&!y._.isUndefined(e))return`From ${y.dayjs(e).format("LL")}`;if(n!==""&&!y._.isUndefined(n))return`To ${y.dayjs(n).format("LL")}`}}function ja(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const je=({filter:e,icon:n="filter-list",label:i,onClose:o,filterValue:r})=>{if(y._.isNil(r)||y._.isEmpty(String(r)))return null;const a=e.type==="checkboxes"?(e.options??[]).filter(c=>c.checked).map(c=>c.label??c.value):[],{tooltipContent:l,shouldShowTooltip:s}=(()=>{var d,p,g;if(a.length>0){if(a.length===1){const m=(((d=a[0])==null?void 0:d.length)??0)>20;return{shouldShowTooltip:m,tooltipContent:m?a[0]:void 0}}if(a.length===2){const m=((p=a[0])==null?void 0:p.length)??0,j=a.join(", ").length,w=m>20||j>20;return{shouldShowTooltip:w,tooltipContent:w?a:void 0}}const x=((g=a[0])==null?void 0:g.length)??0,h=a.join(", ").length,b=x>20||h>20;return{shouldShowTooltip:b,tooltipContent:b?a:void 0}}const c=e.value;return typeof c=="string"&&c.length>20?{shouldShowTooltip:!0,tooltipContent:c}:{shouldShowTooltip:!1,tooltipContent:void 0}})();return t.jsx(Y,{disabled:!s,id:"applied-filter-tooltip",nodeTip:s?Array.isArray(l)?t.jsx($,{display:"flex",flexDirection:"column",gap:.25,children:l.map(c=>t.jsxs($,{alignItems:"flex-start",display:"flex",gap:.5,children:[t.jsx("span",{children:"•"}),t.jsx($,{whiteSpace:"normal",wordWrap:"break-word",children:c})]},c))}):t.jsx($,{whiteSpace:"normal",wordWrap:"break-word",children:l}):void 0,children:t.jsx(J,{filterValues:r,icon:n,id:"remove-filter",onClose:o(e),tagLabel:`${i} `})})},wa=({options:e,onClose:n})=>{const i=e.flatMap(o=>o.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:c,options:d,minValue:p,maxValue:g}=r;switch(s){case"numberRange":{const x=$a(p,g,o.placeholder);return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:o.label,onClose:n},l)}case"dateRange":{const x=ma(p==null?void 0:p.toString(),g==null?void 0:g.toString());return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:o.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Kn(d);return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:o.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=ba(c),h=ja(s,o.label,a);return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:h,onClose:n},l)}}})).filter(o=>{if(o===null)return!1;const{filterValue:r}=o.props;return!y._.isNil(r)&&!y._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},va=e=>e.map(n=>{const i={key:String(n.key),type:n.type},o=(()=>{let r={...i};if(n.filterFn&&(r={...r,filterFn:n.filterFn}),n.value&&(r={...r,value:n.value}),n.minValue!==void 0&&n.minValue!==null&&(r={...r,minValue:n.minValue}),n.maxValue!==void 0&&n.maxValue!==null&&(r={...r,maxValue:n.maxValue}),n.options&&n.options.length>0){const a=n.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(o).length>2?o:null}).filter(Boolean),ka=(e,n)=>n.map(i=>{const o=e.find(a=>a.key===String(i.key)&&a.type===i.type);return o?(()=>{let a={...i};return o.filterFn&&(a={...a,filterFn:o.filterFn}),o.value!==void 0&&o.value!==null&&(a={...a,value:o.value}),o.minValue!==void 0&&o.minValue!==null&&(a={...a,minValue:o.minValue}),o.maxValue!==void 0&&o.maxValue!==null&&(a={...a,maxValue:o.maxValue}),o.selectedValues&&i.options&&(a={...a,options:i.options.map(l=>{var s;return{...l,checked:((s=o.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():i}),rt=(e,n)=>{const i=va(e);n(JSON.stringify(i))},Ca=(e,n)=>{const i=e();if(!i)return n;try{const o=JSON.parse(i);return ka(o,n)}catch{return n}},Sa=(e,n)=>{function i(l,s){if(s.value===""||s.value===void 0||y._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function o(l,s){if(!s.options||s.options.length===0)return!0;const c=s.options.filter(d=>d.checked).map(d=>d.value);return c.length===0?!0:c.includes(String(l[s.key]))}function r(l,s,c){const d=c(String(l[s.key])),{minValue:p,maxValue:g}=s,x=y._.isEmpty(p)&&typeof p!="number"?void 0:c(String(p)),h=y._.isEmpty(g)&&typeof g!="number"?void 0:c(String(g));return y._.isUndefined(x)&&y._.isUndefined(h)?!0:(x??-1/0)<=d&&d<=(h??1/0)}function a(l){return n.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return o(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,c=>new Date(c));case"select":case"text":default:return i(l,s)}})}return e.filter(a)},za=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Ta=e=>{var i;const n=((i=e.options)==null?void 0:i.map(o=>({...o,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Ia=({dataset:e,setValues:n,getValues:i,options:o,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:c="ungrouped"})=>{const d=he("filters-modal"),[p,g]=u.useState(!1),[x,h]=u.useState([]),b=za(x),m=o.map(v=>({...v,filterOptions:v.filterOptions.map(S=>x.find(R=>R.key===S.key&&R.type===S.type&&R.filterFn===S.filterFn)??{...S})})),j=u.useCallback(v=>{h([...v]),rt(v,n)},[h,n]),w=u.useCallback(()=>{l&&l(),d.isOpen||g(!0),d.toggle()},[d,l]),C=u.useCallback(v=>()=>{l&&l();const S=x.map(I=>I.key===v.key&&I.type===v.type&&I.filterFn===v.filterFn?Ta(I):I);h(S),rt(S,n)},[x,l,n]);return u.useEffect(()=>{const v=o.flatMap(R=>R.filterOptions),S=i();if((()=>{if(!S)return!1;try{const R=JSON.parse(S);return Array.isArray(R)&&R.length>0}catch{return!1}})()){const R=Ca(i,v);h(R)}else v.flatMap(E=>E.value).filter(Boolean).length>0||v.flatMap(E=>E.options).filter(E=>(E==null?void 0:E.checked)===!0).length>0?(h(v),p&&rt(v,n)):h(v)},[o,h,n,i,p]),u.useEffect(()=>{r&&e!==void 0&&r(Sa(e,x)),a==null||a(x)},[e,x,r,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(O,{icon:"filter",id:"filter-btn",onClick:w,tag:b.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(Yn,{modalRef:d,onApplyFilters:j,onSearch:s,options:m,variant:c})]}),options:m,removeFilter:C}},It=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:o=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:c=void 0,onClose:d=void 0,tabItems:p=void 0,title:g=void 0,size:x,id:h="modal-container"})=>{const b=f.useTheme(),[m,j]=u.useState(void 0),w=u.useRef(null),C=u.useRef(!1),k=Array.isArray(p)&&p.length>0,v=i??r;u.useEffect(()=>{if(k&&!C.current&&w.current){const I=w.current.getBoundingClientRect().height;I>50&&(j(I),C.current=!0)}s.isOpen||(j(void 0),C.current=!1)},[k,s.isOpen]);const S=t.jsx(Nn,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(St,{$size:x,"data-testid":h,flexDirection:"column",id:h,ref:k?w:void 0,style:k&&m?{height:m}:void 0,children:[!y._.isEmpty(g)&&!y._.isNil(g)&&t.jsx(Ln,{description:l,modalRef:s,onClose:d,otherActions:c,title:g}),p&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(zt,{items:p})}),(y._.isObject(a)||o)&&t.jsxs(ia,{style:v?{borderBottom:`1px solid ${b.palette.gray[200]}`}:void 0,children:[o,y._.isObject(a)&&y._.isString(a.imageSrc)&&t.jsx(sa,{$framed:a.imageFramed,children:t.jsx(ne,{alt:"modal-img",publicId:a.imageSrc})}),y._.isObject(a)&&y._.isString(a.imageText)&&t.jsx(z,{size:"md",children:a.imageText})]}),t.jsx(An,{alert:n,cancelButton:i,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?xe.createPortal(S,document.getElementById("portals")??document.body):s.isOpen?S:null},Da=(e,n,i)=>{const o=he("confirm-dialog-modal"),r=u.useRef(null),a=u.useCallback(async()=>(o.open(),new Promise(d=>{r.current=d})),[o]),l=u.useCallback(()=>{var d;o.close(),(d=r.current)==null||d.call(r,!0)},[o]),s=u.useCallback(()=>{var d;o.close(),(d=r.current)==null||d.call(r,!1)},[o]);return[a,({children:d})=>{const[p,g]=u.useState(i),x=u.useCallback(()=>{g({...i})},[]),h=u.useCallback(j=>()=>{g(w=>({...w,[j]:{...w[j],state:!w[j].state}}))},[]),b=!Object.values(p).every(({state:j})=>j),m=Object.entries(p).map(([j,{state:w,label:C}])=>t.jsx(le,{defaultChecked:w,label:C,name:j,onChange:h(j)},j));return t.jsxs(It,{"data-testid":e,id:e,modalRef:{...o,close:s},onClose:x,size:"sm",title:n,children:[d,t.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:m}),t.jsx(Pn,{disabled:b,id:e,onConfirm:l})]})}]},Fa=()=>{const[e,n]=u.useState(!1),[i,o]=u.useState(),r=u.useRef(null),a=he("confirm-dialog-modal"),l=u.useCallback(async p=>(o(p),n(!0),new Promise(g=>{r.current=g})),[]),s=u.useCallback(()=>{var p;n(!1),o(void 0),(p=r.current)==null||p.call(r,!0)},[]),c=u.useCallback(()=>{var p;n(!1),o(void 0),(p=r.current)==null||p.call(r,!1)},[]);return u.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:p="confirm-dialog-modal",children:g})=>t.jsxs(It,{cancelButton:{onClick:c,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:s,text:"Confirm"},description:i==null?void 0:i.message,id:p,modalRef:{...a,close:c},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,g]}),confirm:l}},Ea=2e3,Ra=({content:e})=>{const[n,i]=u.useState("Copy"),o=u.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},Ea)}).catch(()=>{i("Failed to copy")})},[e]);return t.jsx(_,{icon:"copy",iconSize:"lg",iconType:"fa-light",onClick:o,tooltip:n,variant:"ghost"})},Na=f.styled.ul`
2246
+ `,Hn=({control:e,option:n,register:i,watch:o,setValue:r})=>{var a,l,s,c;switch(n.type){case"checkboxes":{const p=o("search")??"",g=o("checkbox")??[],x=n.options??[],h=fa(x,p,g);return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[!n.label||n.label===""?void 0:null,h.map(b=>t.jsx(qt,{value:b.value,width:"content",children:t.jsx(le,{...i("checkbox"),label:b.label,value:b.value})},`li-checkbox-${b.value}`))]})}case"radioButton":return t.jsxs("div",{style:{overflowX:"hidden",overflowY:"auto",maxHeight:"280px"},children:[n.label,(a=n.options)==null?void 0:a.map(p=>t.jsx(qt,{value:p.value,width:"content",children:t.jsx(et,{...i("radio"),label:p.label,value:p.value})},`li-radio-${p.value}`))]});case"select":return t.jsx(wt,{control:e,items:((l=n.options)==null?void 0:l.map(p=>({name:p.label??"",value:p.value})))??[],label:n.label,name:`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`,placeholder:n.placeholder,value:n.value});case"text":const d=`text.${String(n.key)}-${n.filterFn??"caseInsensitive"}`;return t.jsx(Qe,{label:n.label,name:d,placeholder:n.placeholder,register:i,value:n.value});case"numberRange":return t.jsx(Ct,{label:n.label,name:String(n.key),propsMax:{placeholder:n.placeholder?`${n.placeholder} Max`:"Max",register:i,name:"maxValue",value:n.maxValue,setValue:r},propsMin:{placeholder:n.placeholder?`${n.placeholder} Min`:"Min",register:i,name:"minValue",value:n.minValue,setValue:r},variant:"filters"});case"dateRange":return t.jsx(kt,{label:n.label,name:String(n.key),propsMax:{name:"maxValue",value:(s=n.maxValue)==null?void 0:s.toString()},propsMin:{name:"minValue",value:(c=n.minValue)==null?void 0:c.toString()},register:i,setValue:r,variant:"filters"});default:return t.jsx("div",{})}},Vn=({control:e,items:n,register:i,setValue:o,watch:r})=>t.jsx(t.Fragment,{children:n.map((a,l)=>{const s=`${a.type}-${a.value}-${a.filterFn??"default"}`;return t.jsxs("div",{children:[t.jsx(Hn,{control:e,option:a,register:i,setValue:o,watch:r}),l<n.length-1&&t.jsx("hr",{style:{margin:"1.25rem 0 0.625rem"}})]},s)})}),Un=e=>{var c,d,p,g,x;const[n,i]=u.useState([...e]),{control:o,register:r,handleSubmit:a,setValue:l,watch:s}=y.useForm({defaultValues:{checkbox:e.filter(h=>h.type==="checkboxes").flatMap(h=>{var b;return((b=h.options)==null?void 0:b.filter(m=>m.checked).map(m=>m.value))??[]}),radio:((p=(d=(c=e.find(h=>h.type==="radioButton"))==null?void 0:c.options)==null?void 0:d.find(({checked:h})=>h))==null?void 0:p.value)??"",text:e.filter(h=>["text","select"].includes(h.type)).reduce((h,b)=>({...h,[`${String(b.key)}-${b.filterFn??"caseInsensitive"}`]:b.value??""}),{}),minValue:(g=e.find(h=>["numberRange","dateRange"].includes(h.type)))==null?void 0:g.minValue,maxValue:(x=e.find(h=>["numberRange","dateRange"].includes(h.type)))==null?void 0:x.maxValue,search:""}});return{control:o,items:n,setItems:i,register:r,handleSubmit:a,setValue:l,watch:s}},gt=({options:e,onSearch:n,onSubmit:i,id:o,selectedFilter:r})=>{const{control:a,items:l,setItems:s,register:c,handleSubmit:d,setValue:p,watch:g}=Un(e),x=e.some(w=>w.type==="checkboxes"&&w.hideSearch!==!0),h=e.some(w=>w.label&&w.label!==""),b=u.useCallback(async w=>{const{value:C}=w.target;p("search",C),n&&n(C)},[n,p]),m=u.useCallback(()=>{p("search",""),n&&n("")},[n,p]),j=u.useCallback(w=>{i&&i(w)},[i]);return u.useEffect(()=>{s(e),ha(e,p)},[e,s,p]),t.jsxs("div",{className:"flex flex-col gap-[8px]",id:o,style:{writingMode:"horizontal-tb",maxWidth:"300px",width:"100%"},children:[x&&t.jsxs("div",{children:[h?r:void 0,t.jsx(ce,{onChange:b,onClear:m,placeholder:"Search"})]}),t.jsxs("form",{id:o,onSubmit:d(j),children:[t.jsx(Vn,{control:a,items:l,register:c,setValue:p,watch:g}),t.jsx(O,{mt:1,type:"submit",children:"Apply"})]})]})},Gn=({options:e,variant:n,onApplyFilters:i,onSearch:o,setDirection:r,setHandler:a,onFilterStateChange:l})=>{const s=f.useTheme(),[c,d]=u.useState(e),[p,g]=u.useState([]),[x,h]=u.useState({}),[b,m]=u.useState(""),j=u.useCallback(v=>()=>{const k=c.find(I=>I.label===v),S=!(k!=null&&k.filterOptions.some(I=>I.type==="dateRange"||I.type==="select"));a==null||a(S??!0),m(v),g((k==null?void 0:k.filterOptions)??[])},[c,a]),w=u.useCallback(v=>{const k=[...v.checkbox,...Object.values(v.text??{}),...v.radio?[v.radio]:[],...v.minValue?[String(v.minValue)]:[],...v.maxValue?[String(v.maxValue)]:[]];h(E=>k.length>0?{...E,[b]:k}:E);const S=E=>{var T,N;return{...E,options:(T=E.options)==null?void 0:T.map(M=>({...M,checked:v.checkbox.includes(M.value)||v.radio===M.value})),value:["text","select"].includes(E.type)?((N=v.text)==null?void 0:N[`${String(E.key)}-${E.filterFn??"caseInsensitive"}`])??E.value:E.value,minValue:["numberRange","dateRange"].includes(E.type)?v.minValue:E.minValue,maxValue:["numberRange","dateRange"].includes(E.type)?v.maxValue:E.maxValue}},I=E=>E.label===b?{...E,filterOptions:E.filterOptions.map(S)}:E,R=c.map(I);d(E=>E.map(I));const F=R.flatMap(({filterOptions:E})=>E);i(F),g([])},[c,i,b]),C=u.useCallback((v,k)=>{const S=`li-filter-option-${v}`;return t.jsxs(xa,{icon:k,onClick:j(v),style:{minWidth:"180px",writingMode:"horizontal-tb"},value:S,width:"100%",children:[v,x[v]===void 0?void 0:t.jsx(J,{tagLabel:x[v].length.toString()})]},S)},[x,j]);return u.useEffect(()=>{const v=e.reduce((k,{label:S,filterOptions:I})=>{const R=I.flatMap(({value:T,minValue:N,maxValue:M})=>[N,M,T]).filter(Boolean),F=I.flatMap(({options:T})=>T??[]).filter(({checked:T=!1})=>T).map(({value:T})=>T),E=[...R,...F];return E.length===0?k:{...k,[S]:E}},{});h(v),p.length>0&&r&&r("column")},[p,e,r]),u.useEffect(()=>{l==null||l(p.length>0)},[p.length,l]),n==="grouped"?t.jsx($,{display:"flex",flexDirection:"row",height:"max-content",maxHeight:p.length>0?"unset":"360px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?t.jsx(gt,{id:"filters-options",onSearch:o,onSubmit:w,options:p,selectedFilter:b}):Object.entries(Tt(e)).map(([v,k])=>t.jsxs($,{style:{writingMode:"horizontal-tb"},children:[t.jsx(z,{color:s.palette.gray[400],fontWeight:"bold",mb:.25,size:"md",children:v}),k.map(({label:S,icon:I="filter-list"})=>C(S,I))]},v))}):t.jsx($,{display:"flex",flexDirection:"row",height:"max-content",maxHeight:p.length>0?"unset":"200px",style:{rowGap:"10px",writingMode:"vertical-lr"},wrap:"wrap",children:p.length>0?t.jsx(gt,{id:"filters-options",onSearch:o,onSubmit:w,options:p,selectedFilter:b}):e.map(({label:v,icon:k="filter-list"})=>C(v,k))})},Yn=({options:e,onApplyFilters:n,onSearch:i,modalRef:o,variant:r})=>{const[a,l]=u.useState("row"),[s,c]=u.useState(!0),[d,p]=u.useState(!1),x=(r==="grouped"?Object.values(Tt(e)).reduce((j,w)=>j+w.length,0):e.length)>5&&!d,h=f.useTheme(),b=u.useRef(null),m=t.jsx(_,{icon:"close",iconColor:h.palette.gray[400],iconSize:"lg",iconTransform:"grow-2",iconType:"fa-light",id:"modal-close",onClick:o.close,px:.25,py:.25,variant:"ghost"});return u.useEffect(()=>{const j=w=>{const C=b.current;C&&!C.contains(w.target)&&o.close()};if(s)return document.addEventListener("mousedown",j,!0),()=>{document.removeEventListener("mousedown",j,!0)}},[b,s,o]),t.jsx(ya,{$bgColor:"transparent","aria-label":o.name,children:t.jsxs(St,{$size:"fixed",alignItems:a==="row"?"start":"end",display:"flex",flexDirection:a,gap:.5,id:"filters-list",justify:"space-between",position:"relative",px:1.25,py:1.25,ref:b,style:{maxWidth:"620px",overflow:"hidden",width:"fit-content",paddingBottom:x?"0":void 0},children:[a==="column"?m:void 0,t.jsx(Gn,{onApplyFilters:n,onFilterStateChange:p,onSearch:i,options:e,setDirection:l,setHandler:c,variant:r}),a==="row"?m:void 0]})})};function ba(e){if(!e)return;const n=20;if(e.length<=n)return e;const i=n-3,o=Math.ceil(i/2),r=Math.floor(i/2);return`${e.slice(0,o)}...${e.slice(e.length-r)}`}function Kn(e){if(!e||e.length===0)return;const n=e.filter(s=>s.checked).map(s=>s.label??s.value);if(n.length===0)return;const i=(s,c=20)=>{if(s.length<=c)return s;const d=c-3,p=Math.ceil(d/2),g=Math.floor(d/2);return`${s.slice(0,p)}...${s.slice(s.length-g)}`};if(n.length===1){const s=n[0];return s.length>20?i(s,20):s}if(n.length===2){const s=n[0],c=n.join(", ").length;return s.length>20||c>20?`${i(s,20)} +1 more`:`${n[0]}, ${n[1]}`}const o=n[0],r=n.length-1,a=20,l=n.join(", ").length;return o.length>a||l>a?`${i(o,a)} +${r} more`:`${n[0]}, ${n[1]}`}function $a(e,n,i){const o=i??"",r=y._.isEmpty(e)&&typeof e!="number"||Number.isNaN(e)?void 0:Number(e),a=y._.isEmpty(n)&&typeof n!="number"||Number.isNaN(n)?void 0:Number(String(n));if(!y._.isUndefined(r)&&!y._.isUndefined(a))return`${r}${o} - ${a}${o}`;if(!y._.isUndefined(r))return`Min ${r}${o}`;if(!y._.isUndefined(a))return`Max ${a}${o}`}function ma(e,n){if(y.dayjs_minExports.extend(y.localizedFormat),!(y._.isUndefined(e)&&y._.isUndefined(n))){if(e!==""&&n!==""&&!y._.isUndefined(e)&&!y._.isUndefined(n))return`${y.dayjs(e).format("LL")} - ${y.dayjs(n).format("LL")}`;if(e!==""&&!y._.isUndefined(e))return`From ${y.dayjs(e).format("LL")}`;if(n!==""&&!y._.isUndefined(n))return`To ${y.dayjs(n).format("LL")}`}}function ja(e,n,i){return e==="select"?n:`${n} ${i==="includesInsensitive"?"contains":"is"}`}const je=({filter:e,icon:n="filter-list",label:i,onClose:o,filterValue:r})=>{if(y._.isNil(r)||y._.isEmpty(String(r)))return null;const a=e.type==="checkboxes"?(e.options??[]).filter(c=>c.checked).map(c=>c.label??c.value):[],{tooltipContent:l,shouldShowTooltip:s}=(()=>{var d,p,g;if(a.length>0){if(a.length===1){const m=(((d=a[0])==null?void 0:d.length)??0)>20;return{shouldShowTooltip:m,tooltipContent:m?a[0]:void 0}}if(a.length===2){const m=((p=a[0])==null?void 0:p.length)??0,j=a.join(", ").length,w=m>20||j>20;return{shouldShowTooltip:w,tooltipContent:w?a:void 0}}const x=((g=a[0])==null?void 0:g.length)??0,h=a.join(", ").length,b=x>20||h>20;return{shouldShowTooltip:b,tooltipContent:b?a:void 0}}const c=e.value;return typeof c=="string"&&c.length>20?{shouldShowTooltip:!0,tooltipContent:c}:{shouldShowTooltip:!1,tooltipContent:void 0}})();return t.jsx(Y,{disabled:!s,id:"applied-filter-tooltip",nodeTip:s?Array.isArray(l)?t.jsx($,{display:"flex",flexDirection:"column",gap:.25,children:l.map(c=>t.jsxs($,{alignItems:"flex-start",display:"flex",gap:.5,children:[t.jsx("span",{children:"•"}),t.jsx($,{whiteSpace:"normal",wordWrap:"break-word",children:c})]},c))}):t.jsx($,{whiteSpace:"normal",wordWrap:"break-word",children:l}):void 0,children:t.jsx(J,{filterValues:r,icon:n,id:"remove-filter",onClose:o(e),tagLabel:`${i} `})})},wa=({options:e,onClose:n})=>{const i=e.flatMap(o=>o.filterOptions.map(r=>{const{filterFn:a,label:l,type:s,value:c,options:d,minValue:p,maxValue:g}=r;switch(s){case"numberRange":{const x=$a(p,g,o.placeholder);return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:o.label,onClose:n},l)}case"dateRange":{const x=ma(p==null?void 0:p.toString(),g==null?void 0:g.toString());return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:o.label,onClose:n},l)}case"radioButton":case"checkboxes":{const x=Kn(d);return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:o.label,onClose:n},l)}case void 0:case"select":case"text":default:{const x=ba(c),h=ja(s,o.label,a);return t.jsx(je,{filter:r,filterValue:x,icon:o.icon,label:h,onClose:n},l)}}})).filter(o=>{if(o===null)return!1;const{filterValue:r}=o.props;return!y._.isNil(r)&&!y._.isEmpty(String(r))});return i.length>0?t.jsx($,{alignItems:"center",display:"flex",gap:.5,pb:1,width:"100%",wrap:"wrap",children:i}):null},va=e=>e.map(n=>{const i={key:String(n.key),type:n.type},o=(()=>{let r={...i};if(n.filterFn&&(r={...r,filterFn:n.filterFn}),n.value&&(r={...r,value:n.value}),n.minValue!==void 0&&n.minValue!==null&&(r={...r,minValue:n.minValue}),n.maxValue!==void 0&&n.maxValue!==null&&(r={...r,maxValue:n.maxValue}),n.options&&n.options.length>0){const a=n.options.filter(l=>l.checked).map(l=>l.value);a.length>0&&(r={...r,selectedValues:a})}return r})();return Object.keys(o).length>2?o:null}).filter(Boolean),ka=(e,n)=>n.map(i=>{const o=e.find(a=>a.key===String(i.key)&&a.type===i.type);return o?(()=>{let a={...i};return o.filterFn&&(a={...a,filterFn:o.filterFn}),o.value!==void 0&&o.value!==null&&(a={...a,value:o.value}),o.minValue!==void 0&&o.minValue!==null&&(a={...a,minValue:o.minValue}),o.maxValue!==void 0&&o.maxValue!==null&&(a={...a,maxValue:o.maxValue}),o.selectedValues&&i.options&&(a={...a,options:i.options.map(l=>{var s;return{...l,checked:((s=o.selectedValues)==null?void 0:s.includes(l.value))??!1}})}),a})():i}),rt=(e,n)=>{const i=va(e);n(JSON.stringify(i))},Ca=(e,n)=>{const i=e();if(!i)return n;try{const o=JSON.parse(i);return ka(o,n)}catch{return n}},Sa=(e,n)=>{function i(l,s){if(s.value===""||s.value===void 0||y._.defaultTo(s.isBackFilter,!1))return!0;switch(s.filterFn){case"includesInsensitive":return String(l[s.key]).toLowerCase().includes(s.value.toLowerCase());case"caseInsensitive":case void 0:default:return String(l[s.key]).toLowerCase()===s.value.toLowerCase()}}function o(l,s){if(!s.options||s.options.length===0)return!0;const c=s.options.filter(d=>d.checked).map(d=>d.value);return c.length===0?!0:c.includes(String(l[s.key]))}function r(l,s,c){const d=c(String(l[s.key])),{minValue:p,maxValue:g}=s,x=y._.isEmpty(p)&&typeof p!="number"?void 0:c(String(p)),h=y._.isEmpty(g)&&typeof g!="number"?void 0:c(String(g));return y._.isUndefined(x)&&y._.isUndefined(h)?!0:(x??-1/0)<=d&&d<=(h??1/0)}function a(l){return n.every(s=>{if(typeof s.key=="function")return s.key(l,s.value);switch(s.type){case"radioButton":case"checkboxes":return o(l,s);case"numberRange":return r(l,s,Number);case"dateRange":return r(l,s,c=>new Date(c));case"select":case"text":default:return i(l,s)}})}return e.filter(a)},za=e=>[...e.flatMap(({options:i})=>i).filter(i=>i==null?void 0:i.checked),...e.flatMap(i=>[i.value,i.maxValue,i.minValue]).filter(Boolean)].length,Ta=e=>{var i;const n=((i=e.options)==null?void 0:i.map(o=>({...o,checked:void 0})))??void 0;return{...e,minValue:void 0,maxValue:void 0,value:void 0,options:n}},Ia=({dataset:e,setValues:n,getValues:i,options:o,setFilteredDataset:r,onFiltersChange:a,onReset:l,onSearch:s,variant:c="ungrouped"})=>{const d=he("filters-modal"),[p,g]=u.useState(!1),[x,h]=u.useState([]),b=za(x),m=o.map(k=>({...k,filterOptions:k.filterOptions.map(S=>x.find(R=>R.key===S.key&&R.type===S.type&&R.filterFn===S.filterFn)??{...S})})),j=u.useCallback(k=>{h([...k]),rt(k,n)},[h,n]),w=u.useCallback(()=>{l&&l(),d.isOpen||g(!0),d.toggle()},[d,l]),C=u.useCallback(k=>()=>{l&&l();const S=x.map(I=>I.key===k.key&&I.type===k.type&&I.filterFn===k.filterFn?Ta(I):I);h(S),rt(S,n)},[x,l,n]);return u.useEffect(()=>{const k=o.flatMap(R=>R.filterOptions),S=i();if((()=>{if(!S)return!1;try{const R=JSON.parse(S);return Array.isArray(R)&&R.length>0}catch{return!1}})()){const R=Ca(i,k);h(R)}else k.flatMap(F=>F.value).filter(Boolean).length>0||k.flatMap(F=>F.options).filter(F=>(F==null?void 0:F.checked)===!0).length>0?(h(k),p&&rt(k,n)):h(k)},[o,h,n,i,p]),u.useEffect(()=>{r&&e!==void 0&&r(Sa(e,x)),a==null||a(x)},[e,x,r,a]),{Filters:()=>t.jsxs($,{alignItems:"center",display:"flex",gap:.25,maxWidth:"100%",position:"relative",wrap:"wrap",children:[t.jsx($,{pr:.25,children:t.jsx(O,{icon:"filter",id:"filter-btn",onClick:w,tag:b.toString(),variant:"ghost"})}),d.isOpen&&t.jsx(Yn,{modalRef:d,onApplyFilters:j,onSearch:s,options:m,variant:c})]}),options:m,removeFilter:C}},It=({_portal:e=!0,alert:n,cancelButton:i=void 0,children:o=void 0,confirmButton:r=void 0,content:a=void 0,description:l=void 0,modalRef:s,otherActions:c=void 0,onClose:d=void 0,tabItems:p=void 0,title:g=void 0,size:x,id:h="modal-container"})=>{const b=f.useTheme(),[m,j]=u.useState(void 0),w=u.useRef(null),C=u.useRef(!1),v=Array.isArray(p)&&p.length>0,k=i??r;u.useEffect(()=>{if(v&&!C.current&&w.current){const I=w.current.getBoundingClientRect().height;I>50&&(j(I),C.current=!0)}s.isOpen||(j(void 0),C.current=!1)},[v,s.isOpen]);const S=t.jsx(Nn,{"aria-label":s.name,"aria-modal":"true",id:"modal-wrapper",children:t.jsxs(St,{$size:x,"data-testid":h,flexDirection:"column",id:h,ref:v?w:void 0,style:v&&m?{height:m}:void 0,children:[!y._.isEmpty(g)&&!y._.isNil(g)&&t.jsx(Ln,{description:l,modalRef:s,onClose:d,otherActions:c,title:g}),p&&t.jsx($,{borderTop:`1px solid ${b.palette.gray[300]}`,display:"block",mb:1.25,position:"sticky",children:t.jsx(zt,{items:p})}),(y._.isObject(a)||o)&&t.jsxs(ia,{style:k?{borderBottom:`1px solid ${b.palette.gray[200]}`}:void 0,children:[o,y._.isObject(a)&&y._.isString(a.imageSrc)&&t.jsx(sa,{$framed:a.imageFramed,children:t.jsx(ne,{alt:"modal-img",publicId:a.imageSrc})}),y._.isObject(a)&&y._.isString(a.imageText)&&t.jsx(z,{size:"md",children:a.imageText})]}),t.jsx(An,{alert:n,cancelButton:i,confirmButton:r,modalRef:s})]})});return e&&s.isOpen?xe.createPortal(S,document.getElementById("portals")??document.body):s.isOpen?S:null},Da=(e,n,i)=>{const o=he("confirm-dialog-modal"),r=u.useRef(null),a=u.useCallback(async()=>(o.open(),new Promise(d=>{r.current=d})),[o]),l=u.useCallback(()=>{var d;o.close(),(d=r.current)==null||d.call(r,!0)},[o]),s=u.useCallback(()=>{var d;o.close(),(d=r.current)==null||d.call(r,!1)},[o]);return[a,({children:d})=>{const[p,g]=u.useState(i),x=u.useCallback(()=>{g({...i})},[]),h=u.useCallback(j=>()=>{g(w=>({...w,[j]:{...w[j],state:!w[j].state}}))},[]),b=!Object.values(p).every(({state:j})=>j),m=Object.entries(p).map(([j,{state:w,label:C}])=>t.jsx(le,{defaultChecked:w,label:C,name:j,onChange:h(j)},j));return t.jsxs(It,{"data-testid":e,id:e,modalRef:{...o,close:s},onClose:x,size:"sm",title:n,children:[d,t.jsx($,{display:"flex",flexDirection:"column",gap:.5,children:m}),t.jsx(Pn,{disabled:b,id:e,onConfirm:l})]})}]},Ea=()=>{const[e,n]=u.useState(!1),[i,o]=u.useState(),r=u.useRef(null),a=he("confirm-dialog-modal"),l=u.useCallback(async p=>(o(p),n(!0),new Promise(g=>{r.current=g})),[]),s=u.useCallback(()=>{var p;n(!1),o(void 0),(p=r.current)==null||p.call(r,!0)},[]),c=u.useCallback(()=>{var p;n(!1),o(void 0),(p=r.current)==null||p.call(r,!1)},[]);return u.useEffect(()=>{a.setIsOpen(e)},[e,a]),{ConfirmDialog:({id:p="confirm-dialog-modal",children:g})=>t.jsxs(It,{cancelButton:{onClick:c,text:"Cancel"},confirmButton:{id:(i==null?void 0:i.id)??"modal-confirm",onClick:s,text:"Confirm"},description:i==null?void 0:i.message,id:p,modalRef:{...a,close:c},size:"sm",title:i==null?void 0:i.title,children:[i==null?void 0:i.content,g]}),confirm:l}},Fa=2e3,Ra=({content:e})=>{const[n,i]=u.useState("Copy"),o=u.useCallback(()=>{navigator.clipboard.writeText(e).then(()=>{i("Copied"),setTimeout(()=>{i("Copy")},Fa)}).catch(()=>{i("Failed to copy")})},[e]);return t.jsx(_,{icon:"copy",iconSize:"lg",iconType:"fa-light",onClick:o,tooltip:n,variant:"ghost"})},Na=f.styled.ul`
2247
2247
  ${({theme:e})=>`
2248
2248
  align-items: flex-start;
2249
2249
  border-radius: ${e.spacing[.25]};
@@ -2326,7 +2326,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2326
2326
  overflow: hidden auto;
2327
2327
  width: 100%;
2328
2328
  `}
2329
- `,Ha=({alert:e,buttonAlignment:n,cancelButton:i,children:o,confirmButton:r,defaultDisabled:a=!0,id:l="modal-confirm",maxButtonWidth:s="392px",mode:c,onSubmit:d,padding:p=!0,showButtons:g=!0,yupSchema:x,...h})=>{const b=f.useTheme(),m=y.useForm({...h,mode:c??"all",resolver:x?y.o(x):void 0});function j(v){v.stopPropagation(),m.handleSubmit(d)(v)}const C=g?`calc(100% - ${e?"139px":"83px"})`:"100%",k=p?1.5:0;return t.jsx(y.FormProvider,{...m,children:t.jsx(Ba,{onSubmit:j,children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:C,pb:k,pt:0,px:k,scroll:"y",children:o}),g&&t.jsxs($,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,borderTop:`1px solid ${b.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:s,children:[i?t.jsx(O,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,t.jsx(O,{disabled:((r==null?void 0:r.disabled)??!1)||m.formState.isSubmitting||a&&!m.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Va=f.styled(Pe)`
2329
+ `,Ha=({alert:e,buttonAlignment:n,cancelButton:i,children:o,confirmButton:r,defaultDisabled:a=!0,id:l="modal-confirm",maxButtonWidth:s="392px",mode:c,onSubmit:d,padding:p=!0,showButtons:g=!0,yupSchema:x,...h})=>{const b=f.useTheme(),m=y.useForm({...h,mode:c??"all",resolver:x?y.o(x):void 0});function j(k){k.stopPropagation(),m.handleSubmit(d)(k)}const C=g?`calc(100% - ${e?"139px":"83px"})`:"100%",v=p?1.5:0;return t.jsx(y.FormProvider,{...m,children:t.jsx(Ba,{onSubmit:j,children:t.jsxs($,{scroll:"y",width:"100%",children:[t.jsx($,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,display:"flex",flexDirection:"column",gap:.5,height:C,pb:v,pt:0,px:v,scroll:"y",children:o}),g&&t.jsxs($,{borderRadius:`0 0 ${b.spacing[.25]} ${b.spacing[.25]}`,borderTop:`1px solid ${b.palette.gray[200]}`,display:"flex",flexDirection:n?"unset":"column",gap:.625,justify:n??"stretch",position:"sticky",px:1.25,py:1.25,children:[e,t.jsxs($,{display:"flex",gap:.75,maxWidth:s,children:[i?t.jsx(O,{icon:i.icon,id:`${l}-cancel`,justify:"center",onClick:i.onClick,type:"reset",variant:"tertiary",width:"100%",children:i.label??"Cancel"}):void 0,t.jsx(O,{disabled:((r==null?void 0:r.disabled)??!1)||m.formState.isSubmitting||a&&!m.formState.isDirty,icon:r==null?void 0:r.icon,id:l,justify:"center",type:"submit",width:"100%",children:(r==null?void 0:r.label)??"Confirm"})]})]})]})})})},Va=f.styled(Pe)`
2330
2330
  display: grid;
2331
2331
  grid-template-columns: ${({$sm:e})=>`repeat(${e}, 1fr)`};
2332
2332
  grid-auto-flow: ${({$autoFlow:e="row"})=>e};
@@ -2382,7 +2382,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2382
2382
  background-color: ${e.palette.gray[100]};
2383
2383
  }
2384
2384
  `}
2385
- `,Xn=({isSelected:e=!1,label:n,onSelect:i})=>{const o=f.useTheme(),r=u.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Dt,{$isSelected:e,onClick:r,children:[e?t.jsx(D,{icon:"check",iconColor:o.palette.gray[800],iconSize:"lg"}):null,t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"md",children:n})]})},He=100,Ya=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:o,onClose:r,selectedItem:a,title:l,variant:s})=>{const c=f.useTheme(),[d,p]=u.useState(n),[g,x]=u.useState(""),h=u.useCallback(w=>{if(!w){p(n);return}const C=w.slice(0,He);p(k=>{const v=C.toLowerCase();return k.filter(S=>{const I=String(S.name).toLowerCase();return I.startsWith(v)||I.includes(v)})})},[p,n]),b=u.useCallback(w=>{if(w.currentTarget){const C=w.currentTarget.value.slice(0,He);x(C),h(C)}},[x,h]),m=u.useCallback(w=>{const C=w.target.value.slice(0,He);x(C),h(C)},[x,h]);u.useEffect(()=>{e&&(x(""),p(n))},[e,n]),u.useEffect(()=>{g?h(g):p(n)},[n,g,h]);const j=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(Ga,{$itemsLength:d.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(z,{color:c.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(_,{icon:"xmark",iconColor:c.palette.gray[400],iconSize:"lg",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ce,{maxLength:He,onChange:m,onInput:b,placeholder:"Search",value:g})}),t.jsx(ue,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[s==="organization-selector"?t.jsx(Dt,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(D,{icon:"square-plus",iconColor:c.palette.gray[400],iconSize:"lg",iconType:"fa-light",mr:.5}),t.jsx(z,{color:c.palette.gray[400],size:"md",children:"New organization"})]})}):void 0,d.map(w=>t.jsx(Xn,{isSelected:a.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:o},w.name))]})]})})});return e?xe.createPortal(j,document.body):t.jsx("div",{})},Ka=f.styled.div`
2385
+ `,Xn=({isSelected:e=!1,label:n,onSelect:i})=>{const o=f.useTheme(),r=u.useCallback(()=>{i&&i(n)},[i,n]);return t.jsxs(Dt,{$isSelected:e,onClick:r,children:[e?t.jsx(D,{icon:"check",iconColor:o.palette.gray[800],iconSize:"lg"}):null,t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"md",children:n})]})},He=100,Ya=({isOpen:e=!0,items:n,handleNewOrganization:i,onSelect:o,onClose:r,selectedItem:a,title:l,variant:s})=>{const c=f.useTheme(),[d,p]=u.useState(n),[g,x]=u.useState(""),h=u.useCallback(w=>{if(!w){p(n);return}const C=w.slice(0,He);p(v=>{const k=C.toLowerCase();return v.filter(S=>{const I=String(S.name).toLowerCase();return I.startsWith(k)||I.includes(k)})})},[p,n]),b=u.useCallback(w=>{if(w.currentTarget){const C=w.currentTarget.value.slice(0,He);x(C),h(C)}},[x,h]),m=u.useCallback(w=>{const C=w.target.value.slice(0,He);x(C),h(C)},[x,h]);u.useEffect(()=>{e&&(x(""),p(n))},[e,n]),u.useEffect(()=>{g?h(g):p(n)},[n,g,h]);const j=t.jsx($,{"aria-modal":"true",className:"comp-modal fixed inset-0 overflow-auto",zIndex:99999,children:t.jsx($,{alignItems:"center",bgColor:"rgb(52 64 84 / 70%)",display:"flex",height:"100vh",justify:"center",left:"0",top:"0",width:"100%",children:t.jsxs(Ga,{$itemsLength:d.length,children:[t.jsxs($,{alignItems:"center",display:"flex",justify:"space-between",children:[t.jsx(z,{color:c.palette.gray[800],fontWeight:"bold",size:"lg",children:l}),t.jsx(_,{icon:"xmark",iconColor:c.palette.gray[400],iconSize:"lg",iconType:"fa-light",onClick:r,variant:"ghost"})]}),t.jsx($,{mt:1,children:t.jsx(ce,{maxLength:He,onChange:m,onInput:b,placeholder:"Search",value:g})}),t.jsx(ue,{mb:1,mt:1}),t.jsxs($,{display:"inline-flex",gap:1,maxHeight:"332px",scroll:"y",wrap:"wrap",children:[s==="organization-selector"?t.jsx(Dt,{onClick:i,children:t.jsxs($,{alignItems:"center",display:"flex",children:[t.jsx(D,{icon:"square-plus",iconColor:c.palette.gray[400],iconSize:"lg",iconType:"fa-light",mr:.5}),t.jsx(z,{color:c.palette.gray[400],size:"md",children:"New organization"})]})}):void 0,d.map(w=>t.jsx(Xn,{isSelected:a.toLowerCase()===w.name,label:w.name.charAt(0).toUpperCase()+w.name.slice(1),onSelect:o},w.name))]})]})})});return e?xe.createPortal(j,document.body):t.jsx("div",{})},Ka=f.styled.div`
2386
2386
  ${({theme:e,$backgroundColor:n=e.palette.white})=>`
2387
2387
  align-items: flex-start;
2388
2388
  display: flex;
@@ -2614,7 +2614,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2614
2614
  color: ${e.palette.white};
2615
2615
  }
2616
2616
  `}
2617
- `,se=({children:e,disabled:n,hasIcon:i=!1,selected:o,onClick:r})=>t.jsx(ks,{...o?{className:"selected"}:{},$hasIcon:i,disabled:n,onClick:n||o?void 0:r,children:e}),Cs=[10,20,50,100],qn=({pageSize:e,setPageSize:n})=>{const i=f.useTheme(),[o,r]=u.useState(!1),{refs:a,floatingStyles:l}=y.useFloating({middleware:[y.flip(),y.offset({mainAxis:4})],placement:"top-end",whileElementsMounted:y.autoUpdate}),s=u.useCallback(()=>{r(d=>!d)},[]),c=u.useCallback(d=>()=>{n(d),r(!1)},[n]);return te(a.reference.current,()=>{r(!1)},!0,[a.floating.current]),t.jsxs(u.Fragment,{children:[t.jsxs($,{alignItems:"center",bgColor:i.palette.white,border:"1px solid",borderColor:i.palette.gray[200],borderRadius:i.spacing[.25],display:"flex",gap:.125,px:.25,py:.125,children:[t.jsx(z,{size:"md",children:e}),t.jsx(_,{color:i.palette.gray[400],icon:o?"chevron-up":"chevron-down",iconSize:"sm",iconType:"fa-light",id:"paginator-dropdown",onClick:s,px:.125,py:.125,ref:a.setReference,variant:"ghost"})]}),o?t.jsx($,{bgColor:i.palette.white,border:`1px solid ${i.palette.gray[200]}`,borderRadius:i.spacing[.5],display:"flex",flexDirection:"column",px:.25,py:.25,ref:a.setFloating,shadow:"md",style:l,children:Cs.map(d=>{const p=c(d);return t.jsx($,{bgColor:e===d?i.palette.gray[800]:"transparent",bgColorHover:i.palette.gray[e===d?800:100],borderRadius:i.spacing["0.25"],cursor:"pointer",maxWidth:"40px",minWidth:"40px",onClick:p,px:.25,py:.25,children:t.jsx(z,{color:e===d?i.palette.white:i.palette.gray[600],size:"md",textAlign:"center",children:d})},`${d}-${y.random(10)}`)})}):void 0]})},Ss=(e,n)=>{if(n<=7)return{pages:Array.from({length:n},(r,a)=>a+1),ellipsis:{start:!1,middle:!1,end:!1}};if(e<=3||e>=n-2){const r=[1,2,3],a=[n-2,n-1,n];return{pages:[...r,...a],ellipsis:{start:!1,middle:!0,end:!1}}}return{pages:[1,...Array.from({length:5},(r,a)=>e-2+a),n],ellipsis:{start:!0,middle:!1,end:!0}}},zs=({totalItems:e,totalPages:n,page:{pageIndex:i,pageSize:o},onPageChange:r,onPageSizeChange:a})=>{const l=f.useTheme(),s=i*o,c=i===1,d=i===n,{pages:p,ellipsis:{start:g,middle:x,end:h}}=Ss(i,n),b=u.useCallback(C=>()=>{r(C)},[r]),m=u.useCallback(()=>{i>1&&r(i-1)},[r,i]),j=u.useCallback(()=>{i<n&&r(i+1)},[r,i,n]),w=u.useCallback(C=>{a(C)},[a]);return t.jsxs($,{alignItems:"center",as:"nav",display:"flex",justify:"space-between",py:.875,children:[t.jsx(z,{color:l.palette.gray[800],display:"inline",size:"md",children:`${s-o+1}-${s} of ${e} items`}),t.jsxs($,{alignItems:"center",display:"flex",gap:1,children:[t.jsx(se,{disabled:c,hasIcon:!0,onClick:b(1),children:t.jsx(D,{icon:"angles-left",iconSize:"sm",iconType:"fa-light"})}),t.jsx(se,{disabled:c,hasIcon:!0,onClick:m,children:t.jsx(D,{icon:"angle-left",iconSize:"sm",iconType:"fa-light"})}),p.map((C,k,v)=>{const S=C===1,I=C===n,R=g&&S&&k===0,E=h&&I&&k===p.length-1,F=x&&k===v.length/2-1;return t.jsxs(Ke.default.Fragment,{children:[E&&t.jsx(se,{disabled:!0,children:"..."}),t.jsx(se,{onClick:b(C),selected:i===C,children:C}),(R||F)&&t.jsx(se,{disabled:!0,children:"..."})]},C)}),t.jsx(se,{disabled:d,hasIcon:!0,onClick:j,children:t.jsx(D,{icon:"angle-right",iconSize:"sm",iconType:"fa-light"})}),t.jsx(se,{disabled:d,hasIcon:!0,onClick:b(n),children:t.jsx(D,{icon:"angles-right",iconSize:"sm",iconType:"fa-light"})})]}),t.jsxs($,{alignItems:"center",display:"flex",gap:1,children:[t.jsx(qn,{pageSize:o,setPageSize:w}),t.jsx(z,{color:l.palette.gray[800],display:"inline",size:"md",children:"Items per page"})]})]})},Ts=f.styled.div`
2617
+ `,se=({children:e,disabled:n,hasIcon:i=!1,selected:o,onClick:r})=>t.jsx(ks,{...o?{className:"selected"}:{},$hasIcon:i,disabled:n,onClick:n||o?void 0:r,children:e}),Cs=[10,20,50,100],qn=({pageSize:e,setPageSize:n})=>{const i=f.useTheme(),[o,r]=u.useState(!1),{refs:a,floatingStyles:l}=y.useFloating({middleware:[y.flip(),y.offset({mainAxis:4})],placement:"top-end",whileElementsMounted:y.autoUpdate}),s=u.useCallback(()=>{r(d=>!d)},[]),c=u.useCallback(d=>()=>{n(d),r(!1)},[n]);return te(a.reference.current,()=>{r(!1)},!0,[a.floating.current]),t.jsxs(u.Fragment,{children:[t.jsxs($,{alignItems:"center",bgColor:i.palette.white,border:"1px solid",borderColor:i.palette.gray[200],borderRadius:i.spacing[.25],display:"flex",gap:.125,px:.25,py:.125,children:[t.jsx(z,{size:"md",children:e}),t.jsx(_,{color:i.palette.gray[400],icon:o?"chevron-up":"chevron-down",iconSize:"sm",iconType:"fa-light",id:"paginator-dropdown",onClick:s,px:.125,py:.125,ref:a.setReference,variant:"ghost"})]}),o?t.jsx($,{bgColor:i.palette.white,border:`1px solid ${i.palette.gray[200]}`,borderRadius:i.spacing[.5],display:"flex",flexDirection:"column",px:.25,py:.25,ref:a.setFloating,shadow:"md",style:l,children:Cs.map(d=>{const p=c(d);return t.jsx($,{bgColor:e===d?i.palette.gray[800]:"transparent",bgColorHover:i.palette.gray[e===d?800:100],borderRadius:i.spacing["0.25"],cursor:"pointer",maxWidth:"40px",minWidth:"40px",onClick:p,px:.25,py:.25,children:t.jsx(z,{color:e===d?i.palette.white:i.palette.gray[600],size:"md",textAlign:"center",children:d})},`${d}-${y.random(10)}`)})}):void 0]})},Ss=(e,n)=>{if(n<=7)return{pages:Array.from({length:n},(r,a)=>a+1),ellipsis:{start:!1,middle:!1,end:!1}};if(e<=3||e>=n-2){const r=[1,2,3],a=[n-2,n-1,n];return{pages:[...r,...a],ellipsis:{start:!1,middle:!0,end:!1}}}return{pages:[1,...Array.from({length:5},(r,a)=>e-2+a),n],ellipsis:{start:!0,middle:!1,end:!0}}},zs=({totalItems:e,totalPages:n,page:{pageIndex:i,pageSize:o},onPageChange:r,onPageSizeChange:a})=>{const l=f.useTheme(),s=i*o,c=i===1,d=i===n,{pages:p,ellipsis:{start:g,middle:x,end:h}}=Ss(i,n),b=u.useCallback(C=>()=>{r(C)},[r]),m=u.useCallback(()=>{i>1&&r(i-1)},[r,i]),j=u.useCallback(()=>{i<n&&r(i+1)},[r,i,n]),w=u.useCallback(C=>{a(C)},[a]);return t.jsxs($,{alignItems:"center",as:"nav",display:"flex",justify:"space-between",py:.875,children:[t.jsx(z,{color:l.palette.gray[800],display:"inline",size:"md",children:`${s-o+1}-${s} of ${e} items`}),t.jsxs($,{alignItems:"center",display:"flex",gap:1,children:[t.jsx(se,{disabled:c,hasIcon:!0,onClick:b(1),children:t.jsx(D,{icon:"angles-left",iconSize:"sm",iconType:"fa-light"})}),t.jsx(se,{disabled:c,hasIcon:!0,onClick:m,children:t.jsx(D,{icon:"angle-left",iconSize:"sm",iconType:"fa-light"})}),p.map((C,v,k)=>{const S=C===1,I=C===n,R=g&&S&&v===0,F=h&&I&&v===p.length-1,E=x&&v===k.length/2-1;return t.jsxs(Ke.default.Fragment,{children:[F&&t.jsx(se,{disabled:!0,children:"..."}),t.jsx(se,{onClick:b(C),selected:i===C,children:C}),(R||E)&&t.jsx(se,{disabled:!0,children:"..."})]},C)}),t.jsx(se,{disabled:d,hasIcon:!0,onClick:j,children:t.jsx(D,{icon:"angle-right",iconSize:"sm",iconType:"fa-light"})}),t.jsx(se,{disabled:d,hasIcon:!0,onClick:b(n),children:t.jsx(D,{icon:"angles-right",iconSize:"sm",iconType:"fa-light"})})]}),t.jsxs($,{alignItems:"center",display:"flex",gap:1,children:[t.jsx(qn,{pageSize:o,setPageSize:w}),t.jsx(z,{color:l.palette.gray[800],display:"inline",size:"md",children:"Items per page"})]})]})},Ts=f.styled.div`
2618
2618
  ${({theme:e})=>`
2619
2619
  height: ${e.spacing[1]};
2620
2620
  width: ${e.spacing[1]};
@@ -2658,7 +2658,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2658
2658
 
2659
2659
  ${n?`border: 1px solid ${e.palette.black};`:""}
2660
2660
  `}
2661
- `,Qn=({color:e,icon:n})=>t.jsxs("span",{style:{display:"inline-flex",position:"relative"},children:[t.jsxs("span",{className:"fa-stack",style:{zIndex:0,height:"20px",width:"20px"},children:[t.jsx("i",{className:"fa-solid fa-square fa-stack-2x",style:{color:e,height:"20px",width:"20px"}}),t.jsx("i",{className:"fa-solid fa-circle fa-stack-1x",style:{color:"#ffffff",height:"14px",width:"14px"}})]}),t.jsx("i",{className:`fa-regular fa-${n}`,style:{color:e,position:"absolute",height:"14px",left:"3px",top:"3px",width:"14px"}})]},`${n}-${e}`),ei=({rank:e})=>{const n=f.useTheme(),i={1:{color:n.palette.error[700],icon:"gauge-max"},2:{color:n.palette.error[500],icon:"gauge-high"},3:{color:n.palette.warning[500],icon:"gauge"},4:{color:n.palette.success[500],icon:"gauge-low"},5:{color:n.palette.info[700],icon:"gauge-min"},6:{color:n.palette.gray[400],icon:"gauge-min"}};return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(Qn,{color:i[e].color,icon:i[e].icon}),t.jsx(V,{fontWeight:"bold",size:"xs",children:e})]})},ti=({item:e,disabled:n,draggedItem:i,position:o,handleDragEnd:r,handleItemDragStart:a})=>{const l=f.useTheme();return t.jsx(y.ReorderItem,{as:"div",dragListener:!n,item:e.title,onDragEnd:r,onDragStart:a(e.title),style:{zIndex:i===e.title?9999:"auto",position:i===e.title?"relative":"static"},value:e,children:t.jsxs(Is,{$isDragging:i===e.title,children:[t.jsxs($,{alignItems:"center",borderRight:"1px solid "+l.palette.gray[200],display:"flex",gap:.625,minWidth:"200px",px:1,py:1,width:"200px",children:[!n&&t.jsx(D,{icon:"grip-vertical",iconColor:l.palette.gray[400],iconSize:"md",mx:.75,my:.75}),t.jsx(V,{fontWeight:"bold",size:"xs",children:e.title})]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,justify:"space-between",pl:1,pr:1.75,py:1,width:"100%",children:[t.jsx(z,{size:"md",children:e.description}),t.jsx(ei,{rank:o+1})]})]})},e.title)},Ds=({disabled:e,items:n,handleSetItems:i})=>{const o=f.useTheme(),[r,a]=u.useState(n),[l,s]=u.useState(void 0);u.useEffect(()=>{a(n)},[n]);const c=u.useCallback(x=>{a([...x])},[]),d=u.useCallback(x=>{s(x)},[]),p=u.useCallback(()=>{s(void 0),i(r)},[i,r]),g=u.useCallback(x=>()=>{d(x)},[d]);return t.jsx(y.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:c,style:{borderBottom:`1px solid ${o.palette.gray[200]}`},values:r,children:r.map((x,h)=>t.jsx(ti,{disabled:e,draggedItem:l,handleDragEnd:p,handleItemDragStart:g,item:x,position:h},x.title))})},Qt=2,Fs=({score:e,toFixed:n=void 0})=>{const i=f.useTheme(),o=e<=33?"priority-bars-low":"priority-bars-medium",r=e>66||e===0?"priority-bars-high":o,a=n===void 0||n<0?0:n,l=e%1===0?Qt+a:Qt+a+1;return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(D,{icon:r,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?i.palette.primary[500]:i.palette.gray[200],iconSize:"lg",iconType:"fa-kit",secondaryColor:i.palette.gray[200]}),t.jsx(z,{color:i.palette.gray[800],size:"md",textAlign:"right",children:(n===void 0?e:e.toFixed(a).toString().padStart(l,"0"))+"%"})]})},{getVariant:Es}=ie(e=>({compliance:`
2661
+ `,Qn=({color:e,icon:n})=>t.jsxs("span",{style:{display:"inline-flex",position:"relative"},children:[t.jsxs("span",{className:"fa-stack",style:{zIndex:0,height:"20px",width:"20px"},children:[t.jsx("i",{className:"fa-solid fa-square fa-stack-2x",style:{color:e,height:"20px",width:"20px"}}),t.jsx("i",{className:"fa-solid fa-circle fa-stack-1x",style:{color:"#ffffff",height:"14px",width:"14px"}})]}),t.jsx("i",{className:`fa-regular fa-${n}`,style:{color:e,position:"absolute",height:"14px",left:"3px",top:"3px",width:"14px"}})]},`${n}-${e}`),ei=({rank:e})=>{const n=f.useTheme(),i={1:{color:n.palette.error[700],icon:"gauge-max"},2:{color:n.palette.error[500],icon:"gauge-high"},3:{color:n.palette.warning[500],icon:"gauge"},4:{color:n.palette.success[500],icon:"gauge-low"},5:{color:n.palette.info[700],icon:"gauge-min"},6:{color:n.palette.gray[400],icon:"gauge-min"}};return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,children:[t.jsx(Qn,{color:i[e].color,icon:i[e].icon}),t.jsx(V,{fontWeight:"bold",size:"xs",children:e})]})},ti=({item:e,disabled:n,draggedItem:i,position:o,handleDragEnd:r,handleItemDragStart:a})=>{const l=f.useTheme();return t.jsx(y.ReorderItem,{as:"div",dragListener:!n,item:e.title,onDragEnd:r,onDragStart:a(e.title),style:{zIndex:i===e.title?9999:"auto",position:i===e.title?"relative":"static"},value:e,children:t.jsxs(Is,{$isDragging:i===e.title,children:[t.jsxs($,{alignItems:"center",borderRight:"1px solid "+l.palette.gray[200],display:"flex",gap:.625,minWidth:"200px",px:1,py:1,width:"200px",children:[!n&&t.jsx(D,{icon:"grip-vertical",iconColor:l.palette.gray[400],iconSize:"md",mx:.75,my:.75}),t.jsx(V,{fontWeight:"bold",size:"xs",children:e.title})]}),t.jsxs($,{alignItems:"center",display:"flex",gap:.625,justify:"space-between",pl:1,pr:1.75,py:1,width:"100%",children:[t.jsx(z,{size:"md",children:e.description}),t.jsx(ei,{rank:o+1})]})]})},e.title)},Ds=({disabled:e,items:n,handleSetItems:i})=>{const o=f.useTheme(),[r,a]=u.useState(n),[l,s]=u.useState(void 0);u.useEffect(()=>{a(n)},[n]);const c=u.useCallback(x=>{a([...x])},[]),d=u.useCallback(x=>{s(x)},[]),p=u.useCallback(()=>{s(void 0),i(r)},[i,r]),g=u.useCallback(x=>()=>{d(x)},[d]);return t.jsx(y.ReorderGroup,{as:"div",axis:"y",layoutScroll:!0,onReorder:c,style:{borderBottom:`1px solid ${o.palette.gray[200]}`},values:r,children:r.map((x,h)=>t.jsx(ti,{disabled:e,draggedItem:l,handleDragEnd:p,handleItemDragStart:g,item:x,position:h},x.title))})},Qt=2,Es=({score:e,toFixed:n=void 0})=>{const i=f.useTheme(),o=e<=33?"priority-bars-low":"priority-bars-medium",r=e>66||e===0?"priority-bars-high":o,a=n===void 0||n<0?0:n,l=e%1===0?Qt+a:Qt+a+1;return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.25,children:[t.jsx(D,{icon:r,iconClass:e<=66?"fa-kit-duotone":"",iconColor:e>0?i.palette.primary[500]:i.palette.gray[200],iconSize:"lg",iconType:"fa-kit",secondaryColor:i.palette.gray[200]}),t.jsx(z,{color:i.palette.gray[800],size:"md",textAlign:"right",children:(n===void 0?e:e.toFixed(a).toString().padStart(l,"0"))+"%"})]})},{getVariant:Fs}=ie(e=>({compliance:`
2662
2662
  display: inline-flex;
2663
2663
 
2664
2664
  &.horizontal {
@@ -2723,7 +2723,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2723
2723
  ${i==="horizontal"?"min-width":"min-height"}: ${n}px;
2724
2724
  ${i==="horizontal"?"":"height: 100%;"}
2725
2725
 
2726
- ${Es(e,r)}
2726
+ ${Fs(e,r)}
2727
2727
 
2728
2728
  `}
2729
2729
  `,As=f.styled.div`
@@ -2753,7 +2753,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2753
2753
  flex-flow: row wrap;
2754
2754
  }
2755
2755
  `}
2756
- `,Ms=150,Os=({label:e,minWidth:n=Ms,state:i="not completed",stepNumber:o=1,title:r,onClick:a,orientation:l="horizontal"})=>{const s=f.useTheme(),c={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},d=i==="disabled";return t.jsxs($,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${n}px`,children:[t.jsx(ni,{minWidth:n,orientation:l,percentage:d||i==="not completed"?0:100,rounded:!1,variant:i==="error"?"progressIndicatorError":"progressIndicator"}),t.jsxs($,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[i==="in progress"?t.jsx(ii,{onClick:a}):t.jsx(Ls,{$variant:i,clickable:!d,disabled:d,icon:c[i],iconColor:oi(i,s),iconSize:"lg",iconType:"fa-light",onClick:d?void 0:a}),t.jsxs($,{children:[t.jsx(z,{color:s.palette.gray[d?300:800],fontWeight:"bold",size:"md",children:`${o}.${r}`}),e===void 0?null:t.jsx(z,{color:s.palette.gray[d?300:600],size:"sm",children:e})]})]})]})},Ws=150,_s=({children:e,orientation:n="horizontal",minWidth:i=Ws})=>{const o=u.Children.toArray(e),r=u.useMemo(()=>u.Children.count(e),[e]),a=u.useMemo(()=>r*i,[r,i]);return t.jsx(Ps,{$minWidth:`${a}px`,$orientation:n,children:o.map(l=>u.cloneElement(l,{minWidth:i,orientation:n}))})},ri=({description:e="",highlightDescription:n="",mobile:i})=>{const o=f.useTheme(),r=i?"md":"lg",a=typeof n=="string",l=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(z,{display:"inline",lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:a?t.jsxs(u.Fragment,{children:[t.jsx(Ce,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:n}),e]}):e.split(l).map((s,c)=>n.includes(s)?t.jsx(Ce,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:s},`${c+1}-bold`):s)}):t.jsx(z,{lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:e})},Bs=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:o,confirmButton:r,container:a,description:l,highlightDescription:s="",image:c,maxWidth:d,mobile:p=!1,title:g,titleColor:x})=>{const h=f.useTheme(),{alt:b,src:m,width:j="77px",height:w="77px"}=c,C=u.useCallback(()=>{n==null||n.onClick()},[n]),k=u.useCallback(()=>{r==null||r.onClick()},[r]),v=t.jsx(V,{color:x,fontWeight:"bold",lineSpacing:p?1.5:2.5,mb:p?1.5:0,size:p?"sm":"md",textAlign:p?"start":"center",children:g}),S=t.jsx(ne,{alt:b,height:w,publicId:m,width:j}),I=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:d,position:"relative",px:p?1.5:2.5,py:p?1.5:2.5,shadow:"lg",width:p?"335px":"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[p?v:void 0,p?t.jsx($,{alignItems:"center",height:w,justify:"center",mr:0,children:t.jsx($,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:S})}):S,t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[p?void 0:v,t.jsx(ri,{description:l,highlightDescription:s,mobile:p})]})]}),o&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:o})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:p?"start":"center",children:[y.lodashExports.isObject(r)?t.jsx(O,{onClick:k,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,y.lodashExports.isObject(n)?t.jsx(O,{onClick:C,variant:(n==null?void 0:n.variant)??"tertiary",children:n==null?void 0:n.text},n==null?void 0:n.key):void 0]})]})});return e?xe.createPortal(I,a??document.body):I},Hs=f.styled.div.attrs({className:"comp-scroll-up"})`
2756
+ `,Ms=150,Os=({label:e,minWidth:n=Ms,state:i="not completed",stepNumber:o=1,title:r,onClick:a,orientation:l="horizontal"})=>{const s=f.useTheme(),c={completed:"circle-check",disabled:"circle-dashed",error:"circle-exclamation","in progress":"circle-half","not completed":"circle-dashed"},d=i==="disabled";return t.jsxs($,{display:"inline-flex",flexDirection:l==="horizontal"?"column":"row",minWidth:`${n}px`,children:[t.jsx(ni,{minWidth:n,orientation:l,percentage:d||i==="not completed"?0:100,rounded:!1,variant:i==="error"?"progressIndicatorError":"progressIndicator"}),t.jsxs($,{display:"flex",gap:.5,px:.5,py:.5,width:"100%",children:[i==="in progress"?t.jsx(ii,{onClick:a}):t.jsx(Ls,{$variant:i,clickable:!d,disabled:d,icon:c[i],iconColor:oi(i,s),iconSize:"lg",iconType:"fa-light",onClick:d?void 0:a}),t.jsxs($,{children:[t.jsx(z,{color:s.palette.gray[d?300:800],fontWeight:"bold",size:"md",children:`${o}.${r}`}),e===void 0?null:t.jsx(z,{color:s.palette.gray[d?300:600],size:"sm",children:e})]})]})]})},Ws=150,_s=({children:e,orientation:n="horizontal",minWidth:i=Ws})=>{const o=u.Children.toArray(e),r=u.useMemo(()=>u.Children.count(e),[e]),a=u.useMemo(()=>r*i,[r,i]);return t.jsx(Ps,{$minWidth:`${a}px`,$orientation:n,children:o.map(l=>u.cloneElement(l,{minWidth:i,orientation:n}))})},ri=({description:e="",highlightDescription:n="",mobile:i})=>{const o=f.useTheme(),r=i?"md":"lg",a=typeof n=="string",l=a?"":new RegExp(`(${n.join("|")})`,"u");return n.length>0?t.jsx(z,{display:"inline",lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:a?t.jsxs(u.Fragment,{children:[t.jsx(Ce,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:n}),e]}):e.split(l).map((s,c)=>n.includes(s)?t.jsx(Ce,{color:o.palette.gray[600],display:"inline",fontWeight:"bold",lineSpacing:1.5,size:r,children:s},`${c+1}-bold`):s)}):t.jsx(z,{lineSpacing:1.5,size:r,textAlign:i?"start":"center",children:e})},Bs=({_portal:e=!1,cancelButton:n,darkBackground:i=!1,children:o,confirmButton:r,container:a,description:l,highlightDescription:s="",image:c,maxWidth:d,mobile:p=!1,title:g,titleColor:x})=>{const h=f.useTheme(),{alt:b,src:m,width:j="77px",height:w="77px"}=c,C=u.useCallback(()=>{n==null||n.onClick()},[n]),v=u.useCallback(()=>{r==null||r.onClick()},[r]),k=t.jsx(V,{color:x,fontWeight:"bold",lineSpacing:p?1.5:2.5,mb:p?1.5:0,size:p?"sm":"md",textAlign:p?"start":"center",children:g}),S=t.jsx(ne,{alt:b,height:w,publicId:m,width:j}),I=t.jsx($,{alignItems:"center","aria-label":g,"aria-modal":"true",bgColor:i?"rgba(52, 64, 84, 70%)":"",display:"flex",height:"100vh",justify:"center",left:"0",position:e?"fixed":"absolute",top:"0px",width:"100%",zIndex:99999,children:t.jsxs($,{bgColor:h.palette.white,border:`1px solid ${h.palette.gray[200]}`,borderRadius:"8px",display:"inline-flex",flexDirection:"column",maxWidth:d,position:"relative",px:p?1.5:2.5,py:p?1.5:2.5,shadow:"lg",width:p?"335px":"100%",zIndex:11,children:[t.jsxs($,{alignItems:"center",display:"flex",flexDirection:"column",width:"100%",children:[p?k:void 0,p?t.jsx($,{alignItems:"center",height:w,justify:"center",mr:0,children:t.jsx($,{bgColor:h.palette.gray[100],left:"0",position:"absolute",textAlign:"center",width:"100%",children:S})}):S,t.jsxs($,{display:"flex",flexDirection:"column",gap:.5,mb:1.5,mt:1.5,children:[p?void 0:k,t.jsx(ri,{description:l,highlightDescription:s,mobile:p})]})]}),o&&t.jsx($,{mb:1,scroll:"y",children:t.jsx($,{height:"100%",children:o})}),t.jsxs($,{alignItems:"flex-start",display:"flex",gap:1,justify:p?"start":"center",children:[y.lodashExports.isObject(r)?t.jsx(O,{onClick:v,variant:(r==null?void 0:r.variant)??"primary",children:r==null?void 0:r.text},r==null?void 0:r.key):void 0,y.lodashExports.isObject(n)?t.jsx(O,{onClick:C,variant:(n==null?void 0:n.variant)??"tertiary",children:n==null?void 0:n.text},n==null?void 0:n.key):void 0]})]})});return e?xe.createPortal(I,a??document.body):I},Hs=f.styled.div.attrs({className:"comp-scroll-up"})`
2757
2757
  position: fixed;
2758
2758
  bottom: ${({bottom:e})=>e??"unset"};
2759
2759
  right: ${({right:e})=>e??"unset"};
@@ -2827,7 +2827,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
2827
2827
  padding: ${e.spacing[.75]};
2828
2828
  color: ${e.palette.gray[500]};
2829
2829
  `}
2830
- `,Js=300,Qs=({name:e,items:n=[],renderItem:i,onSelectItem:o,onClear:r,onChange:a,value:l,maxLength:s=Js,emptyText:c="No results",openOnFocus:d=!0,...p})=>{const g=f.useTheme(),x=u.useRef(null),[h,b]=u.useState(!1),[m,j]=u.useState(String(l??""));u.useEffect(()=>{j(String(l??""))},[l]);const{refs:w,floatingStyles:C}=y.useFloating$1({placement:"bottom-start"});te(w.floating.current,()=>b(!1),!0);const k=u.useCallback(()=>{d&&b(!0)},[d]),v=u.useCallback(T=>{const N=T.target.value;if(N.length>s){j(N.slice(0,s));return}j(N),a==null||a(T),b(!0)},[a,s]),S=u.useCallback(()=>{var T;j(""),r==null||r(),a&&a({target:{value:""},currentTarget:{value:""}}),(T=x.current)==null||T.focus(),b(!1)},[r,a]),I=u.useCallback(T=>{const N=Number(T.currentTarget.dataset.index),M=n[N];o==null||o(M),b(!1)},[n,o]),R=h&&(m.trim().length>0||n.length>0),E=u.useMemo(()=>n.length===0?t.jsx(qs,{children:c}):t.jsx(Xs,{role:"listbox",children:n.map((T,N)=>t.jsx(Zs,{onClick:I,role:"option",children:i(T)},N))}),[n,c,i,I]),F=u.useCallback(T=>{T.key==="Escape"&&b(!1)},[]);return t.jsxs(Us,{ref:w.setReference,children:[t.jsxs(Gs,{children:[t.jsx(D,{icon:"magnifying-glass",iconColor:g.palette.gray[700],iconSize:"lg",iconType:"fa-light"}),t.jsx(Ys,{"aria-expanded":R,id:e,maxLength:s,name:e,onChange:v,onFocus:k,onKeyDown:F,ref:x,type:"search",value:m,...p}),!y.lodashExports.isEmpty(m)&&t.jsx(_,{icon:"xmark",iconColor:g.palette.gray[300],iconSize:"lg",iconType:"fa-light",onClick:S,px:.25,py:.25,type:"reset",variant:"ghost"})]}),R?t.jsx(Ks,{ref:w.setFloating,style:C,children:E}):void 0]})},el=(e,n)=>{const i={critical:A.palette.primary[700],high:A.palette.error[500],low:A.palette.warning[200],medium:A.palette.warning[500],none:A.palette.gray[200]},o={disabled:A.palette.gray[400],enabled:A.palette.gray[800]},r={critical:A.palette.white,high:A.palette.white,low:A.palette.gray[800],medium:A.palette.gray[800],none:A.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:y.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?o.disabled:o.enabled}},we=({variant:e,value:n})=>{const{iconColor:i,iconText:o,iconTextColor:r,textColor:a}=el(e,n),l=y.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(z,{color:r,size:"md",textAlign:"center",children:o})})}),t.jsx(z,{color:a,size:"md",children:n})]})},tl=({critical:e,high:n,medium:i,low:o})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(we,{value:e,variant:"critical"}),t.jsx(we,{value:n,variant:"high"}),t.jsx(we,{value:i,variant:"medium"}),t.jsx(we,{value:o,variant:"low"})]}),nl=f.styled.div`
2830
+ `,Js=300,Qs=({name:e,items:n=[],renderItem:i,onSelectItem:o,onClear:r,onChange:a,value:l,maxLength:s=Js,emptyText:c="No results",openOnFocus:d=!0,...p})=>{const g=f.useTheme(),x=u.useRef(null),[h,b]=u.useState(!1),[m,j]=u.useState(String(l??""));u.useEffect(()=>{j(String(l??""))},[l]);const{refs:w,floatingStyles:C}=y.useFloating$1({placement:"bottom-start"});te(w.floating.current,()=>b(!1),!0);const v=u.useCallback(()=>{d&&b(!0)},[d]),k=u.useCallback(T=>{const N=T.target.value;if(N.length>s){j(N.slice(0,s));return}j(N),a==null||a(T),b(!0)},[a,s]),S=u.useCallback(()=>{var T;j(""),r==null||r(),a&&a({target:{value:""},currentTarget:{value:""}}),(T=x.current)==null||T.focus(),b(!1)},[r,a]),I=u.useCallback(T=>{const N=Number(T.currentTarget.dataset.index),M=n[N];o==null||o(M),b(!1)},[n,o]),R=h&&(m.trim().length>0||n.length>0),F=u.useMemo(()=>n.length===0?t.jsx(qs,{children:c}):t.jsx(Xs,{role:"listbox",children:n.map((T,N)=>t.jsx(Zs,{onClick:I,role:"option",children:i(T)},N))}),[n,c,i,I]),E=u.useCallback(T=>{T.key==="Escape"&&b(!1)},[]);return t.jsxs(Us,{ref:w.setReference,children:[t.jsxs(Gs,{children:[t.jsx(D,{icon:"magnifying-glass",iconColor:g.palette.gray[700],iconSize:"lg",iconType:"fa-light"}),t.jsx(Ys,{"aria-expanded":R,id:e,maxLength:s,name:e,onChange:k,onFocus:v,onKeyDown:E,ref:x,type:"search",value:m,...p}),!y.lodashExports.isEmpty(m)&&t.jsx(_,{icon:"xmark",iconColor:g.palette.gray[300],iconSize:"lg",iconType:"fa-light",onClick:S,px:.25,py:.25,type:"reset",variant:"ghost"})]}),R?t.jsx(Ks,{ref:w.setFloating,style:C,children:F}):void 0]})},el=(e,n)=>{const i={critical:A.palette.primary[700],high:A.palette.error[500],low:A.palette.warning[200],medium:A.palette.warning[500],none:A.palette.gray[200]},o={disabled:A.palette.gray[400],enabled:A.palette.gray[800]},r={critical:A.palette.white,high:A.palette.white,low:A.palette.gray[800],medium:A.palette.gray[800],none:A.palette.gray[400]};return{iconColor:n<1?i.none:i[e],iconText:y.lodashExports.capitalize(e.charAt(0)),iconTextColor:n<1?r.none:r[e],textColor:n<1?o.disabled:o.enabled}},we=({variant:e,value:n})=>{const{iconColor:i,iconText:o,iconTextColor:r,textColor:a}=el(e,n),l=y.lodashExports.capitalize(e.charAt(0))+e.slice(1);return t.jsxs($,{alignItems:"center",display:"inline-flex",gap:.5,minWidth:"43px",children:[t.jsx(Y,{id:l,place:"top",tip:l,children:t.jsx($,{alignItems:"center",bgColor:i,borderRadius:"4px",cursor:"pointer",display:"flex",height:"22px",maxWidth:"22px",minWidth:"22px",children:t.jsx(z,{color:r,size:"md",textAlign:"center",children:o})})}),t.jsx(z,{color:a,size:"md",children:n})]})},tl=({critical:e,high:n,medium:i,low:o})=>t.jsxs($,{alignItems:"center",display:"inline-flex",gap:1,children:[t.jsx(we,{value:e,variant:"critical"}),t.jsx(we,{value:n,variant:"high"}),t.jsx(we,{value:i,variant:"medium"}),t.jsx(we,{value:o,variant:"low"})]}),nl=f.styled.div`
2831
2831
  ${({theme:e})=>`
2832
2832
  border-radius: ${e.spacing[.25]};
2833
2833
  cursor: pointer;
@@ -3395,7 +3395,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
3395
3395
  .highlight-container ~ .controls-container {
3396
3396
  flex: 1 0 100%;
3397
3397
  }
3398
- `,Fl=500,on=300,bi=({children:e})=>{const{table:n}=u.useContext(re),{onSearch:i,search:o,searchPlaceholder:r="Search"}=(n==null?void 0:n.options.meta)??{},a=$t(s=>{const c=s.target.value.slice(0,on);i==null||i(c)},Fl),l=u.useCallback(()=>{i==null||i("")},[i]);return t.jsxs(Dl,{children:[i===void 0?void 0:t.jsx(Tl,{children:t.jsx(ce,{maxLength:on,name:"search",onChange:a,onClear:l,placeholder:r,value:o})}),e]})},$i=({children:e})=>t.jsx($,{display:"flex",flexDirection:"column",children:t.jsx("div",{className:"caption-container",children:e})}),mi=({children:e})=>t.jsx(Il,{children:e}),ji=({children:e})=>t.jsx("div",{className:"highlight-container",children:e}),El=160,wi=({children:e,table:n})=>{var x;const i=u.useRef(null),o=u.useRef(null),{id:r}=n.options.meta??{},{enableMultiRowSelection:a}=(n==null?void 0:n.options)??{},l=Object.keys(n.getState().rowSelection).length,s=l===1?"item":"items",c=l===0||!a,d=Math.max(((x=i.current)==null?void 0:x.clientWidth)??0,n.getTotalSize()+El),p=u.useCallback(()=>{n.resetRowSelection()},[n]),g=u.useCallback(h=>{h.key==="Enter"&&p()},[p]);return u.useEffect(()=>{n.setPageIndex(0)},[n]),t.jsx(re.Provider,{value:{containerRef:i,elementName:s,handleUnselectAll:p,hidden:c,onKeyDown:g,selected:l,tableSize:d,tableRef:o,table:n},children:t.jsx(ml,{id:r,children:e})})},Rl=Object.assign(wi,{Caption:$i,Columns:ci,Content:gi,Controls:mi,Export:li,Footer:fi,FooterContent:yi,Highlighted:ji,Options:bi}),Nl=f.styled.button`
3398
+ `,El=500,on=300,bi=({children:e})=>{const{table:n}=u.useContext(re),{onSearch:i,search:o,searchPlaceholder:r="Search"}=(n==null?void 0:n.options.meta)??{},a=$t(s=>{const c=s.target.value.slice(0,on);i==null||i(c)},El),l=u.useCallback(()=>{i==null||i("")},[i]);return t.jsxs(Dl,{children:[i===void 0?void 0:t.jsx(Tl,{children:t.jsx(ce,{maxLength:on,name:"search",onChange:a,onClear:l,placeholder:r,value:o})}),e]})},$i=({children:e})=>t.jsx($,{display:"flex",flexDirection:"column",children:t.jsx("div",{className:"caption-container",children:e})}),mi=({children:e})=>t.jsx(Il,{children:e}),ji=({children:e})=>t.jsx("div",{className:"highlight-container",children:e}),Fl=160,wi=({children:e,table:n})=>{var x;const i=u.useRef(null),o=u.useRef(null),{id:r}=n.options.meta??{},{enableMultiRowSelection:a}=(n==null?void 0:n.options)??{},l=Object.keys(n.getState().rowSelection).length,s=l===1?"item":"items",c=l===0||!a,d=Math.max(((x=i.current)==null?void 0:x.clientWidth)??0,n.getTotalSize()+Fl),p=u.useCallback(()=>{n.resetRowSelection()},[n]),g=u.useCallback(h=>{h.key==="Enter"&&p()},[p]);return u.useEffect(()=>{n.setPageIndex(0)},[n]),t.jsx(re.Provider,{value:{containerRef:i,elementName:s,handleUnselectAll:p,hidden:c,onKeyDown:g,selected:l,tableSize:d,tableRef:o,table:n},children:t.jsx(ml,{id:r,children:e})})},Rl=Object.assign(wi,{Caption:$i,Columns:ci,Content:gi,Controls:mi,Export:li,Footer:fi,FooterContent:yi,Highlighted:ji,Options:bi}),Nl=f.styled.button`
3399
3399
  ${({theme:e})=>`
3400
3400
  align-items: center;
3401
3401
  background-color: ${e.palette.white};
@@ -3538,7 +3538,7 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
3538
3538
  transform: translateX(-50%);
3539
3539
  }
3540
3540
  `}
3541
- `,vi=({date:e,description:n,title:i})=>{const o=f.useTheme();return t.jsxs(Ol,{className:"timeline-card",children:[t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"md",textAlign:"start",children:e}),t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",mb:.5,size:"md",textAlign:"center",children:i}),t.jsx("div",{children:n.map((r,a)=>{const l=`${r}#${a}`;return t.jsx(z,{size:"md",textAlign:"center",wordBreak:"break-word",children:r},l)})})]})},_l=({items:e})=>{const n=u.useRef(null),[i,o]=u.useState("long");return u.useEffect(()=>{n.current&&o(n.current.offsetWidth<=1100?"small":"long")},[]),t.jsx($,{ref:n,width:"100%",children:t.jsx(Wl,{$size:i,children:e.map((r,a)=>t.jsx(vi,{date:r.date,description:r.description,size:i,title:r.title},`${r.title}-${a}`))})})},Bl={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},Hl=({run:e,steps:n,onFinish:i})=>{const[o,r]=u.useState(e),[a,l]=u.useState(0),s=u.useCallback(c=>{const{action:d,index:p,status:g,type:x}=c;[y.EVENTS.STEP_AFTER,y.EVENTS.TARGET_NOT_FOUND].includes(x)?l(p+(d===y.ACTIONS.PREV?-1:1)):([y.STATUS.FINISHED,y.STATUS.SKIPPED].includes(g)||d==="close")&&(r(!1),y.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(y.components_default,{callback:s,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:o,spotlightClicks:!0,stepIndex:a,steps:n,styles:{buttonNext:{display:a===n.length-1?"none":"block"},options:{zIndex:9999}}})},Vl={md:{categorySize:"sm",titleSize:"xs",descriptionSize:"md",detailsSize:"md"},lg:{categorySize:"md",titleSize:"sm",descriptionSize:"lg",detailsSize:"lg"}},Ul=({title:e,href:n,description:i,category:o,id:r,indx:a,remediationTime:l,score:s,severity:c,size:d="lg",requirements:p,Link:g})=>{const x=f.useTheme(),{categorySize:h,titleSize:b,descriptionSize:m,detailsSize:j}=Vl[d],w=g??"a";return t.jsxs(un,{$index:a,children:[t.jsx(z,{bgGradient:x.palette.gradient,fontWeight:"bold",size:h,textFill:"transparent",children:o}),t.jsxs(w,{href:n,children:[t.jsx(V,{color:x.palette.gray[400],display:"inline",fontWeight:"bold",size:b,children:r}),t.jsx(V,{display:"inline",fontWeight:"bold",ml:.25,size:b,children:e})]}),t.jsx(z,{size:m,children:i}),t.jsxs($,{alignItems:d==="md"?"flex-start":"center",display:"flex",flexDirection:d==="md"?"column":"row",gap:.75,width:"100%",children:[t.jsxs(z,{color:x.palette.gray[400],display:"inline",size:j,children:[t.jsx("b",{children:"Remediation time: "}),`${l} min`]}),d==="lg"?t.jsx(ke,{}):void 0,t.jsxs($,{alignItems:d==="md"?"flex-start":"center",display:"flex",gap:.25,children:[t.jsx(z,{color:x.palette.gray[400],display:"inline",fontWeight:"bold",size:j,children:"Default score: "}),t.jsx(mt,{textL:s,textR:y.capitalize(c==="disable"?"Unknown":c),variant:c})]}),d==="lg"?t.jsx(ke,{}):void 0,t.jsxs($,{alignItems:"center",children:[t.jsx(z,{color:x.palette.gray[400],display:"inline",fontWeight:"bold",size:j,children:"Requirements: "}),p.map((C,k)=>t.jsxs(u.Fragment,{children:[k>0?t.jsx(z,{color:x.palette.gray[400],display:"inline",size:j,children:" / "}):void 0,t.jsx("a",{href:C.href,style:{color:x.palette.gray[400],fontSize:x.typography.text[j],textDecoration:"underline"},children:C.title})]},C.key))]})]})]})},tt=u.createContext({id:"",filterValue:null,setFilterValue:()=>Promise.resolve(new URLSearchParams)}),ki=f.styled.div`
3541
+ `,vi=({date:e,description:n,title:i})=>{const o=f.useTheme();return t.jsxs(Ol,{className:"timeline-card",children:[t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",size:"md",textAlign:"start",children:e}),t.jsx(z,{color:o.palette.gray[800],fontWeight:"bold",mb:.5,size:"md",textAlign:"center",children:i}),t.jsx("div",{children:n.map((r,a)=>{const l=`${r}#${a}`;return t.jsx(z,{size:"md",textAlign:"center",wordBreak:"break-word",children:r},l)})})]})},_l=({items:e})=>{const n=u.useRef(null),[i,o]=u.useState("long");return u.useEffect(()=>{n.current&&o(n.current.offsetWidth<=1100?"small":"long")},[]),t.jsx($,{ref:n,width:"100%",children:t.jsx(Wl,{$size:i,children:e.map((r,a)=>t.jsx(vi,{date:r.date,description:r.description,size:i,title:r.title},`${r.title}-${a}`))})})},Bl={content:"",disableBeacon:!0,hideCloseButton:!1,locale:{back:"Back",close:"Close",last:"Close",next:"Next",open:"Open the dialog",skip:"Skip"},showSkipButton:!0,styles:{buttonBack:{fontFamily:"roboto"},buttonNext:{fontFamily:"roboto"},buttonSkip:{fontFamily:"roboto"},options:{zIndex:9999},tooltipContainer:{fontFamily:"roboto",textAlign:"left"}},target:""},Hl=({run:e,steps:n,onFinish:i})=>{const[o,r]=u.useState(e),[a,l]=u.useState(0),s=u.useCallback(c=>{const{action:d,index:p,status:g,type:x}=c;[y.EVENTS.STEP_AFTER,y.EVENTS.TARGET_NOT_FOUND].includes(x)?l(p+(d===y.ACTIONS.PREV?-1:1)):([y.STATUS.FINISHED,y.STATUS.SKIPPED].includes(g)||d==="close")&&(r(!1),y.lodashExports.isUndefined(i)||i())},[i]);return t.jsx(y.components_default,{callback:s,continuous:!0,disableOverlayClose:!0,disableScrollParentFix:!0,run:o,spotlightClicks:!0,stepIndex:a,steps:n,styles:{buttonNext:{display:a===n.length-1?"none":"block"},options:{zIndex:9999}}})},Vl={md:{categorySize:"sm",titleSize:"xs",descriptionSize:"md",detailsSize:"md"},lg:{categorySize:"md",titleSize:"sm",descriptionSize:"lg",detailsSize:"lg"}},Ul=({title:e,href:n,description:i,category:o,id:r,indx:a,remediationTime:l,score:s,severity:c,size:d="lg",requirements:p,Link:g})=>{const x=f.useTheme(),{categorySize:h,titleSize:b,descriptionSize:m,detailsSize:j}=Vl[d],w=g??"a";return t.jsxs(un,{$index:a,children:[t.jsx(z,{bgGradient:x.palette.gradient,fontWeight:"bold",size:h,textFill:"transparent",children:o}),t.jsxs(w,{href:n,children:[t.jsx(V,{color:x.palette.gray[400],display:"inline",fontWeight:"bold",size:b,children:r}),t.jsx(V,{display:"inline",fontWeight:"bold",ml:.25,size:b,children:e})]}),t.jsx(z,{size:m,children:i}),t.jsxs($,{alignItems:d==="md"?"flex-start":"center",display:"flex",flexDirection:d==="md"?"column":"row",gap:.75,width:"100%",children:[t.jsxs(z,{color:x.palette.gray[400],display:"inline",size:j,children:[t.jsx("b",{children:"Remediation time: "}),`${l} min`]}),d==="lg"?t.jsx(ke,{}):void 0,t.jsxs($,{alignItems:d==="md"?"flex-start":"center",display:"flex",gap:.25,children:[t.jsx(z,{color:x.palette.gray[400],display:"inline",fontWeight:"bold",size:j,children:"Default score: "}),t.jsx(mt,{textL:s,textR:y.capitalize(c==="disable"?"Unknown":c),variant:c})]}),d==="lg"?t.jsx(ke,{}):void 0,t.jsxs($,{alignItems:"center",children:[t.jsx(z,{color:x.palette.gray[400],display:"inline",fontWeight:"bold",size:j,children:"Requirements: "}),p.map((C,v)=>t.jsxs(u.Fragment,{children:[v>0?t.jsx(z,{color:x.palette.gray[400],display:"inline",size:j,children:" / "}):void 0,t.jsx("a",{href:C.href,style:{color:x.palette.gray[400],fontSize:x.typography.text[j],textDecoration:"underline"},children:C.title})]},C.key))]})]})]})},tt=u.createContext({id:"",values:{},setValues:()=>Promise.resolve(new URLSearchParams)}),ki=f.styled.div`
3542
3542
  ${({theme:e,$left:n="0"})=>`
3543
3543
  align-items: flex-start;
3544
3544
  background: ${e.palette.white};
@@ -3599,4 +3599,4 @@ ${m[8]}...`:(m.length<8&&p(!1),i)},[s,i,n]),h=u.useMemo(x,[x]),b=u.useCallback(a
3599
3599
  background: ${e.palette.gray[100]};
3600
3600
  }
3601
3601
  `}
3602
- `,zi=u.forwardRef(function({includeSearch:n=!1,groupedFilters:i,handleChangeId:o},r){const a=f.useTheme(),{id:l,filterValue:s}=u.useContext(tt),[c,d]=u.useState(""),p=u.useCallback(g=>()=>{o(g),d(g)},[o]);return t.jsxs(ki,{ref:r,children:[t.jsxs(Ci,{children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"md",children:"Filters menu"}),n?t.jsx(ce,{placeholder:"Search filter..."}):void 0]}),t.jsx($,{alignItems:"flex-start",display:"flex",flexDirection:"column",scroll:"y",width:"100%",children:Object.entries(i).map(([g,x],h)=>t.jsxs(Si,{$border:h>0&&g!=="default",children:[g!=="default"?t.jsx(z,{color:a.palette.gray[400],fontWeight:"bold",mb:.5,size:"md",children:g}):void 0,x.map(b=>t.jsx(u.Fragment,{children:t.jsxs(ve,{as:"button","data-testid":b.id,onClick:p(b.id),children:[t.jsx(D,{icon:"filter",iconClass:"filter-item",iconSize:"md",iconType:"fa-light"}),b.label,t.jsxs($,{alignItems:"center",display:"flex",gap:.5,style:{marginLeft:"auto"},children:[c===b.id?t.jsx(D,{icon:"chevron-right",iconClass:"selected",iconSize:"lg",iconType:"fa-light"}):void 0,s&&l===b.id?t.jsx(J,{tagLabel:s.split(",").length.toString(),variant:"default"}):void 0]})]})},`${b.id}-${y.random(1,10)}`))]},g))})]})}),Gl={checkbox:(e,n,i,o)=>e.map(r=>t.jsx(ve,{children:t.jsx(le,{checked:i==null?void 0:i.split(",").includes(r.value),label:r.label,name:r.value,onChange:o,value:r.value})},`li-checkbox-${r.value}`)),radioButton:e=>e.map(n=>t.jsx(ve,{children:t.jsx(et,{label:n.label,name:n.value})},`li-radio-${n.value}`)),dateRange:(e,n,i,o,r,a)=>t.jsx(ve,{children:t.jsx(kt,{name:n,propsMax:{name:"maxValue",value:a==null?void 0:a.toString()},propsMin:{name:"minValue",value:r==null?void 0:r.toString()},variant:"filters"})}),numberRange:(e,n,i,o,r,a)=>t.jsx(ve,{children:t.jsx(Ct,{name:n,propsMax:{name:"maxValue",value:a},propsMin:{name:"minValue",value:r},variant:"filters"})})},Ti=({id:e,filterValue:n,option:i,onChange:o})=>{const{items:r=[],type:a,minValue:l,maxValue:s}=i??{},c=a&&Gl[a],d=u.useCallback(p=>{o(p.currentTarget.value,a??"")},[o,a]);return t.jsx(t.Fragment,{children:(c==null?void 0:c(r,e,n,d,l,s))??null})},Ii=u.forwardRef(function({includeSearch:n=!1,label:i,options:o},r){const a=f.useTheme(),{id:l,filterValue:s,setFilterValue:c}=u.useContext(tt),d=u.useCallback((p,g)=>{c(g==="checkbox"?x=>{if(x){const h=x.split(",");return h.includes(p)?h.filter(m=>m!==p).join(","):[...h,p].join(",")}else return p}:p)},[c]);return t.jsxs(ki,{$left:"346px",ref:r,children:[t.jsxs(Ci,{children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"md",children:`Select ${i}`}),n?t.jsx(ce,{placeholder:`Search ${i}...`}):void 0]}),o==null?void 0:o.map((p,g,x)=>t.jsxs(Si,{$border:x.length>1&&g>0,children:[g>0?t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",mb:.5,size:"md",children:p.label}):void 0,t.jsx(Ti,{filterValue:s,id:l,onChange:d,option:p})]},`${p.label}-${y.random(1,10)}`))]})}),Yl=e=>e.reduce((n,i)=>(i.group?(n[i.group]||(n[i.group]=[]),n[i.group].push(i)):n.default=[...n.default||[],i],n),{}),Kl=(e,n)=>{const i=e.find(o=>o.id===n);return{label:(i==null?void 0:i.label)??"",options:(i==null?void 0:i.options)??[]}},Xl=({filters:e})=>{const n=window.location.search,i=new URLSearchParams(n);return{appliedFilters:Array.from(i.entries()).filter(([r])=>e.some(a=>a.id===r)).map(([r,a])=>({label:r,value:a})),filters:e}},Zl=7,ql=({filterOptions:e})=>{const n=he("filters"),[i,o]=u.useState(""),[r,a]=y.useQueryState("filter"),[l,s]=y.useQueryState(i,{defaultValue:""}),{refs:c}=y.useFloating({placement:"bottom-start"}),{refs:d}=y.useFloating({elements:{reference:c.reference.current},placement:"right-end"}),{appliedFilters:p,filters:g}=Xl({filters:e}),{label:x,options:h}=Kl(g,i),b=Yl(g),m=u.useCallback(w=>{o(w),a(w)},[a]),j=u.useCallback(()=>{n.toggle(),a(null)},[n,a]);return te(c.floating.current,()=>{n.close(),a(null)},!0,[c.reference.current,d.floating.current]),t.jsx(tt.Provider,{value:{id:i,filterValue:l,setFilterValue:s},children:t.jsxs($,{alignItems:"center",display:"flex",position:"relative",wrap:"wrap",children:[t.jsx(O,{icon:"filter",id:"filter-btn",onClick:j,ref:c.setReference,tag:p.length.toString(),variant:"ghost"}),n.isOpen?t.jsx(zi,{groupedFilters:b,handleChangeId:m,includeSearch:e.length>Zl,ref:c.setFloating}):void 0,y.isEmpty(r)||r===null||i!==r?void 0:t.jsx(Ii,{label:x.toLowerCase(),options:h,ref:d.setFloating})]})})};exports.Accordion=lo;exports.AccordionContent=ln;exports.ActionButton=me;exports.AdvancedBadge=xo;exports.AdvisoriesCard=wo;exports.Alert=Ro;exports.AppliedFilter=je;exports.AppliedFilters=wa;exports.ArrayField=dt;exports.Avatar=Bo;exports.BaseButtonComponent=ft;exports.BaseComponent=Pe;exports.BaseSpanComponent=bt;exports.BaseTextComponent=yt;exports.Body=pi;exports.Button=O;exports.Button$1=Ge;exports.Button$2=se;exports.ButtonToolbarCenter=hr;exports.ButtonToolbarRow=yr;exports.ButtonToolbarStartRow=fr;exports.Calendar=jn;exports.Calendar$1=Sn;exports.Calendar$2=zn;exports.CalendarCell=mn;exports.CalendarGrid=Ze;exports.CaptionContent=$i;exports.CardContainer=Yr;exports.CardHeader=Xe;exports.CardWithImage=Uo;exports.CardWithInput=Pr;exports.CardWithOptions=Dn;exports.CardWithSelector=_r;exports.CardWithSwitch=Vr;exports.Carousel=Qr;exports.Checkbox=le;exports.CodeSnippet=ta;exports.Col=ct;exports.ColumFilters=Yn;exports.ColumnToggle=ci;exports.ColumnsModal=Bn;exports.ComboBox=wt;exports.ComboBoxField=lt;exports.Container=$;exports.ControlsContent=mi;exports.CopyButton=Ra;exports.CustomThemeProvider=eo;exports.DateField=vn;exports.DateSelector=Se;exports.Description=ri;exports.Dialog=Je;exports.Divider=ue;exports.Dropdown=La;exports.Editable=xr;exports.EmptyButton=ut;exports.EmptyState=Wa;exports.ErrorMessage=Xo;exports.ExportCsv=li;exports.FATag=gn;exports.FilePreview=yn;exports.FilterControl=Hn;exports.FilterForm=gt;exports.FilterFormContent=Vn;exports.Filters=ql;exports.FiltersContext=tt;exports.FiltersList=Gn;exports.FiltersMenu=zi;exports.FooterContent=yi;exports.Form=Ha;exports.Gap=mr;exports.GridContainer=Ua;exports.GroupSelector=Ya;exports.Head=di;exports.Header=qe;exports.Header$1=Ln;exports.Heading=V;exports.HighlightedContent=ji;exports.Icon=D;exports.IconButton=_;exports.InProgressIcon=ii;exports.IndicatorCard=Ur;exports.IndicatorCardDB=Xa;exports.InfoSidebar=Za;exports.InnerForm=_a;exports.InputArray=wr;exports.InputDate=Cn;exports.InputDateRange=kt;exports.InputDateTime=ur;exports.InputFile=Sr;exports.InputNumber=In;exports.InputNumberRange=Ct;exports.InputSection=zr;exports.InputTags=Ir;exports.ItemCardDB=es;exports.ItemContent=Ll;exports.Label=jt;exports.Link=oe;exports.ListItem=Me;exports.ListItemsWrapper=On;exports.LittleFlag=ns;exports.Loading=Zn;exports.LocationCode=Rn;exports.Logo=ps;exports.Lottie=us;exports.MemoizedImage=ne;exports.Menu=xs;exports.MenuItem=ai;exports.MessageBanner=fs;exports.Modal=It;exports.ModalConfirm=Pn;exports.ModalFooter=An;exports.Notification=js;exports.NotificationSign=Ue;exports.NumberField=Te;exports.OAuthSelector=vs;exports.Option=bn;exports.OptionBoxContainer=Dt;exports.OptionContainer=xt;exports.OptionContainer$1=Xn;exports.Options=Ti;exports.OptionsMenu=Ii;exports.OutlineContainer=K;exports.PaginationControl=ui;exports.PaginationDropdown=xi;exports.PaginationSize=hi;exports.PaginatorDb=zs;exports.PaginatorDbDropdown=qn;exports.PhoneInput=Ar;exports.PopUp=Bs;exports.Popover=ge;exports.PremiumFeature=Jn;exports.PreviewPanel=Wn;exports.PriorityCard=ti;exports.PriorityCards=Ds;exports.PriorityScore=Fs;exports.ProgressBar=ni;exports.ProgressIndicator=_s;exports.ProgressStep=Os;exports.RadioButton=et;exports.RankPosition=ei;exports.RankPositionIcon=Qn;exports.Row=Tn;exports.ScrollUpButton=Vs;exports.Search=ce;exports.SearchDropdown=Qs;exports.SearchPanel=_n;exports.SeverityBadge=mt;exports.SeverityOverview=tl;exports.SeverityOverviewBadge=we;exports.ShowOnHover=il;exports.SlideOutMenu=rl;exports.Slider=pl;exports.SortIcon=ht;exports.Span=Ce;exports.StepLapse=yl;exports.Tab=Mn;exports.Table=Rl;exports.Table$1=wi;exports.TableButton=Al;exports.TableContent=Ml;exports.TableContent$1=gi;exports.TableContext=re;exports.TableFooter=fi;exports.TableOptions=bi;exports.Tabs=zt;exports.Tag=J;exports.TagsField=pt;exports.Text=z;exports.TextArea=Lr;exports.TextInput=Qe;exports.Thumb=si;exports.TimeField=kn;exports.TimeLine=_l;exports.TimeLineCard=vi;exports.Toggle=Fn;exports.Tooltip=Y;exports.Tour=Hl;exports.WeaknessesCard=Ul;exports.baseStep=Bl;exports.formatCheckValues=Kn;exports.getStyledConfig=Le;exports.hiddenProps=rn;exports.icons=Qi;exports.setBorder=Ee;exports.setDisplay=Re;exports.setInteraction=Ae;exports.setMargin=De;exports.setPadding=Ie;exports.setPosition=Fe;exports.setText=Ne;exports.theme=A;exports.useCarousel=cn;exports.useClickOutside=te;exports.useCloudinaryImage=dn;exports.useColumnsModal=pn;exports.useConditionsDialog=Da;exports.useConfirmDialog=Fa;exports.useDebouncedCallback=$t;exports.useFilterForm=Un;exports.useFilters=Ia;exports.useModal=he;exports.useSearch=bo;exports.variantBuilder=ie;
3602
+ `,zi=u.forwardRef(function({includeSearch:n=!1,groupedFilters:i,handleChangeId:o},r){const a=f.useTheme(),{values:l}=u.useContext(tt),[s,c]=u.useState(""),d=u.useCallback(p=>()=>{o(p),c(p)},[o]);return t.jsxs(ki,{ref:r,children:[t.jsxs(Ci,{children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"md",children:"Filters menu"}),n?t.jsx(ce,{placeholder:"Search filter..."}):void 0]}),t.jsx($,{alignItems:"flex-start",display:"flex",flexDirection:"column",scroll:"y",width:"100%",children:Object.entries(i).map(([p,g],x)=>t.jsxs(Si,{$border:x>0&&p!=="default",children:[p!=="default"?t.jsx(z,{color:a.palette.gray[400],fontWeight:"bold",mb:.5,size:"md",children:p}):void 0,g.map(h=>{const b=l[h.id];return t.jsx(u.Fragment,{children:t.jsxs(ve,{as:"button","data-testid":h.id,onClick:d(h.id),children:[t.jsx(D,{icon:"filter",iconClass:"filter-item",iconSize:"md",iconType:"fa-light"}),h.label,t.jsxs($,{alignItems:"center",display:"flex",gap:.5,style:{marginLeft:"auto"},children:[s===h.id?t.jsx(D,{icon:"chevron-right",iconClass:"selected",iconSize:"lg",iconType:"fa-light"}):void 0,b?t.jsx(J,{tagLabel:b.split(",").length.toString(),variant:"default"}):void 0]})]})},`${h.id}-${y.random(1,10)}`)})]},p))})]})}),Gl={checkbox:(e,n,i,o)=>e.map(r=>t.jsx(ve,{children:t.jsx(le,{checked:i==null?void 0:i.split(",").includes(r.value),label:r.label,name:r.value,onChange:o,value:r.value})},`li-checkbox-${r.value}`)),radioButton:e=>e.map(n=>t.jsx(ve,{children:t.jsx(et,{label:n.label,name:n.value})},`li-radio-${n.value}`)),dateRange:(e,n,i,o,r,a)=>t.jsx(ve,{children:t.jsx(kt,{name:n,propsMax:{name:"maxValue",value:a==null?void 0:a.toString()},propsMin:{name:"minValue",value:r==null?void 0:r.toString()},variant:"filters"})}),numberRange:(e,n,i,o,r,a)=>t.jsx(ve,{children:t.jsx(Ct,{name:n,propsMax:{name:"maxValue",value:a},propsMin:{name:"minValue",value:r},variant:"filters"})})},Ti=({id:e,filterValue:n,option:i,onChange:o})=>{const{items:r=[],type:a,minValue:l,maxValue:s}=i??{},c=a&&Gl[a],d=u.useCallback(p=>{o(p.currentTarget.value,a??"")},[o,a]);return t.jsx(t.Fragment,{children:(c==null?void 0:c(r,e,n,d,l,s))??null})},Ii=u.forwardRef(function({includeSearch:n=!1,label:i,options:o},r){const a=f.useTheme(),{id:l,values:s,setValues:c}=u.useContext(tt),d=u.useCallback((p,g)=>{c(x=>{var h;if(g==="checkbox"){const b=((h=x[l])==null?void 0:h.split(",").filter(j=>j!==""))??[],m=b!=null&&b.includes(p)?b==null?void 0:b.filter(j=>j!==p).join(","):[...b,p].join(",");return{...x,[l]:m}}return{...x,[l]:p}})},[l,c]);return t.jsxs(ki,{$left:"346px",ref:r,children:[t.jsxs(Ci,{children:[t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",size:"md",children:`Select ${i}`}),n?t.jsx(ce,{placeholder:`Search ${i}...`}):void 0]}),o==null?void 0:o.map((p,g,x)=>t.jsxs(Si,{$border:x.length>1&&g>0,children:[g>0?t.jsx(z,{color:a.palette.gray[800],fontWeight:"bold",mb:.5,size:"md",children:p.label}):void 0,t.jsx(Ti,{filterValue:s[l],id:l,onChange:d,option:p})]},`${p.label}-${y.random(1,10)}`))]})}),Yl=e=>e.reduce((n,i)=>(i.group?(n[i.group]||(n[i.group]=[]),n[i.group].push(i)):n.default=[...n.default||[],i],n),{}),Kl=(e,n)=>{const i=e.find(o=>o.id===n);return{label:(i==null?void 0:i.label)??"",options:(i==null?void 0:i.options)??[]}},Xl=({filters:e})=>{const n=window.location.search,i=new URLSearchParams(n);return{appliedFilters:Array.from(i.entries()).filter(([r])=>e.some(a=>a.id===r)).map(([r,a])=>({label:r,value:a})),filters:e}},Zl=7,ql=({filterOptions:e})=>{const n=he("filters"),i=e.flatMap(v=>v.id),[o,r]=y.useQueryStates(Object.fromEntries(i.map(v=>[v,y.parseAsString.withDefault("")]))),[a,l]=y.useQueryState("filter"),[s,c]=u.useState(""),{refs:d}=y.useFloating({placement:"bottom-start"}),{refs:p}=y.useFloating({elements:{reference:d.reference.current},placement:"right-end"}),{appliedFilters:g,filters:x}=Xl({filters:e}),{label:h,options:b}=Kl(x,s),m=Yl(x),j=y.isEmpty(a)||a===null||s!==a,w=u.useCallback(v=>{c(v),l(v)},[l]),C=u.useCallback(()=>{n.toggle(),l(null)},[n,l]);return te(d.floating.current,()=>{n.close(),l(null)},!0,[d.reference.current,p.floating.current]),t.jsx(tt.Provider,{value:{id:s,values:o,setValues:r},children:t.jsxs($,{alignItems:"center",display:"flex",position:"relative",wrap:"wrap",children:[t.jsx(O,{icon:"filter",id:"filter-btn",onClick:C,ref:d.setReference,tag:g.length.toString(),variant:"ghost"}),n.isOpen?t.jsx(zi,{groupedFilters:m,handleChangeId:w,includeSearch:e.length>Zl,ref:d.setFloating}):void 0,j?void 0:t.jsx(Ii,{label:h.toLowerCase(),options:b,ref:p.setFloating})]})})};exports.Accordion=lo;exports.AccordionContent=ln;exports.ActionButton=me;exports.AdvancedBadge=xo;exports.AdvisoriesCard=wo;exports.Alert=Ro;exports.AppliedFilter=je;exports.AppliedFilters=wa;exports.ArrayField=dt;exports.Avatar=Bo;exports.BaseButtonComponent=ft;exports.BaseComponent=Pe;exports.BaseSpanComponent=bt;exports.BaseTextComponent=yt;exports.Body=pi;exports.Button=O;exports.Button$1=Ge;exports.Button$2=se;exports.ButtonToolbarCenter=hr;exports.ButtonToolbarRow=yr;exports.ButtonToolbarStartRow=fr;exports.Calendar=jn;exports.Calendar$1=Sn;exports.Calendar$2=zn;exports.CalendarCell=mn;exports.CalendarGrid=Ze;exports.CaptionContent=$i;exports.CardContainer=Yr;exports.CardHeader=Xe;exports.CardWithImage=Uo;exports.CardWithInput=Pr;exports.CardWithOptions=Dn;exports.CardWithSelector=_r;exports.CardWithSwitch=Vr;exports.Carousel=Qr;exports.Checkbox=le;exports.CodeSnippet=ta;exports.Col=ct;exports.ColumFilters=Yn;exports.ColumnToggle=ci;exports.ColumnsModal=Bn;exports.ComboBox=wt;exports.ComboBoxField=lt;exports.Container=$;exports.ControlsContent=mi;exports.CopyButton=Ra;exports.CustomThemeProvider=eo;exports.DateField=vn;exports.DateSelector=Se;exports.Description=ri;exports.Dialog=Je;exports.Divider=ue;exports.Dropdown=La;exports.Editable=xr;exports.EmptyButton=ut;exports.EmptyState=Wa;exports.ErrorMessage=Xo;exports.ExportCsv=li;exports.FATag=gn;exports.FilePreview=yn;exports.FilterControl=Hn;exports.FilterForm=gt;exports.FilterFormContent=Vn;exports.Filters=ql;exports.FiltersContext=tt;exports.FiltersList=Gn;exports.FiltersMenu=zi;exports.FooterContent=yi;exports.Form=Ha;exports.Gap=mr;exports.GridContainer=Ua;exports.GroupSelector=Ya;exports.Head=di;exports.Header=qe;exports.Header$1=Ln;exports.Heading=V;exports.HighlightedContent=ji;exports.Icon=D;exports.IconButton=_;exports.InProgressIcon=ii;exports.IndicatorCard=Ur;exports.IndicatorCardDB=Xa;exports.InfoSidebar=Za;exports.InnerForm=_a;exports.InputArray=wr;exports.InputDate=Cn;exports.InputDateRange=kt;exports.InputDateTime=ur;exports.InputFile=Sr;exports.InputNumber=In;exports.InputNumberRange=Ct;exports.InputSection=zr;exports.InputTags=Ir;exports.ItemCardDB=es;exports.ItemContent=Ll;exports.Label=jt;exports.Link=oe;exports.ListItem=Me;exports.ListItemsWrapper=On;exports.LittleFlag=ns;exports.Loading=Zn;exports.LocationCode=Rn;exports.Logo=ps;exports.Lottie=us;exports.MemoizedImage=ne;exports.Menu=xs;exports.MenuItem=ai;exports.MessageBanner=fs;exports.Modal=It;exports.ModalConfirm=Pn;exports.ModalFooter=An;exports.Notification=js;exports.NotificationSign=Ue;exports.NumberField=Te;exports.OAuthSelector=vs;exports.Option=bn;exports.OptionBoxContainer=Dt;exports.OptionContainer=xt;exports.OptionContainer$1=Xn;exports.Options=Ti;exports.OptionsMenu=Ii;exports.OutlineContainer=K;exports.PaginationControl=ui;exports.PaginationDropdown=xi;exports.PaginationSize=hi;exports.PaginatorDb=zs;exports.PaginatorDbDropdown=qn;exports.PhoneInput=Ar;exports.PopUp=Bs;exports.Popover=ge;exports.PremiumFeature=Jn;exports.PreviewPanel=Wn;exports.PriorityCard=ti;exports.PriorityCards=Ds;exports.PriorityScore=Es;exports.ProgressBar=ni;exports.ProgressIndicator=_s;exports.ProgressStep=Os;exports.RadioButton=et;exports.RankPosition=ei;exports.RankPositionIcon=Qn;exports.Row=Tn;exports.ScrollUpButton=Vs;exports.Search=ce;exports.SearchDropdown=Qs;exports.SearchPanel=_n;exports.SeverityBadge=mt;exports.SeverityOverview=tl;exports.SeverityOverviewBadge=we;exports.ShowOnHover=il;exports.SlideOutMenu=rl;exports.Slider=pl;exports.SortIcon=ht;exports.Span=Ce;exports.StepLapse=yl;exports.Tab=Mn;exports.Table=Rl;exports.Table$1=wi;exports.TableButton=Al;exports.TableContent=Ml;exports.TableContent$1=gi;exports.TableContext=re;exports.TableFooter=fi;exports.TableOptions=bi;exports.Tabs=zt;exports.Tag=J;exports.TagsField=pt;exports.Text=z;exports.TextArea=Lr;exports.TextInput=Qe;exports.Thumb=si;exports.TimeField=kn;exports.TimeLine=_l;exports.TimeLineCard=vi;exports.Toggle=En;exports.Tooltip=Y;exports.Tour=Hl;exports.WeaknessesCard=Ul;exports.baseStep=Bl;exports.formatCheckValues=Kn;exports.getStyledConfig=Le;exports.hiddenProps=rn;exports.icons=Qi;exports.setBorder=Fe;exports.setDisplay=Re;exports.setInteraction=Ae;exports.setMargin=De;exports.setPadding=Ie;exports.setPosition=Ee;exports.setText=Ne;exports.theme=A;exports.useCarousel=cn;exports.useClickOutside=te;exports.useCloudinaryImage=dn;exports.useColumnsModal=pn;exports.useConditionsDialog=Da;exports.useConfirmDialog=Ea;exports.useDebouncedCallback=$t;exports.useFilterForm=Un;exports.useFilters=Ia;exports.useModal=he;exports.useSearch=bo;exports.variantBuilder=ie;