@producteca/producteca-ui-kit 1.95.0 → 1.96.0

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.
@@ -10,8 +10,10 @@ export interface WarningModalProps extends Omit<ModalProps, 'children'> {
10
10
  icon?: React.ReactNode;
11
11
  title?: React.ReactNode;
12
12
  saveAttrs?: DataAttributes;
13
+ helpAttrs?: DataAttributes;
13
14
  helpArticleHref?: string;
14
15
  cancelAttrs?: DataAttributes;
16
+ checkboxAttrs?: DataAttributes;
15
17
  dontShowAgainLabel?: string;
16
18
  description: React.ReactNode;
17
19
  onChangeDontShowAgain?: (event: ChangeEvent<HTMLInputElement>) => void;
@@ -1,5 +1,5 @@
1
1
  import { PickChannelModalChannel, PickChannelModalProps } from './pickChannelModal.types';
2
2
 
3
3
  export declare const productecaStrategy: PickChannelModalChannel;
4
- export declare const PickChannelModal: ({ open, onClose, channels, fitContent, generalEditionTitle, channelEditionTitle, generalEditionDescription, channelEditionDescription, showGeneralEdition, onSelectChannel, titleProps, ...props }: PickChannelModalProps) => import("react/jsx-runtime").JSX.Element;
4
+ export declare const PickChannelModal: ({ open, onClose, channels, fitContent, generalEditionAttrs, generalEditionTitle, channelEditionTitle, generalEditionDescription, channelEditionDescription, showGeneralEdition, onSelectChannel, titleProps, ...props }: PickChannelModalProps) => import("react/jsx-runtime").JSX.Element;
5
5
  export default PickChannelModal;
@@ -1,4 +1,5 @@
1
1
  import { ModalTitleProps } from '../../modals/modalTitle';
2
+ import { DataAttributes } from '../../../utils';
2
3
 
3
4
  export interface PickChannelModalChannel {
4
5
  clientId: string | number;
@@ -15,6 +16,7 @@ export interface PickChannelModalProps {
15
16
  onClose?: () => void;
16
17
  titleProps?: ModalTitleProps;
17
18
  showGeneralEdition?: boolean;
19
+ generalEditionAttrs?: DataAttributes;
18
20
  generalEditionTitle?: string;
19
21
  generalEditionDescription?: string;
20
22
  channelEditionTitle?: string;
@@ -7003,7 +7003,7 @@ targetInLock&&(endTarget.contains(target)||endTarget===target));if(isDeltaPositi
7003
7003
  * The system prop that allows defining system overrides as well as additional CSS styles.
7004
7004
  */sx:PropTypes.oneOfType([PropTypes.arrayOf(PropTypes.oneOfType([PropTypes.func,PropTypes.object,PropTypes.bool])),PropTypes.func,PropTypes.object]),/**
7005
7005
  * Tooltip title. Zero-length titles string, undefined, null and false are never displayed.
7006
- */title:PropTypes.node}:void 0;var OverflowChecker=function OverflowChecker2(_ref3){var children=_ref3.children;var ref=useRef(null);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),showTooltip=_useState2[0],setShowTooltip=_useState2[1];useEffect(function(){var checkOverflow=function checkOverflow2(){if(ref.current){setShowTooltip(ref.current.scrollWidth>ref.current.offsetWidth);}};checkOverflow();window.addEventListener("resize",checkOverflow);return function(){return window.removeEventListener("resize",checkOverflow);};},[children]);return/* @__PURE__ */jsx$1(Fragment$1,{children:children(ref,showTooltip)});};var _excluded$r=["children","content","placement","arrow","maxWidth","trigger","shouldShowTooltip","slotProps"],_excluded2$6=["content","children"];var WithTooltip=function WithTooltip2(_ref3){var children=_ref3.children,content2=_ref3.content,_ref$placement=_ref3.placement,placement=_ref$placement===void 0?"top":_ref$placement,_ref$arrow=_ref3.arrow,arrow2=_ref$arrow===void 0?false:_ref$arrow,_ref$maxWidth=_ref3.maxWidth,maxWidth2=_ref$maxWidth===void 0?"284px":_ref$maxWidth,_ref$trigger=_ref3.trigger,trigger=_ref$trigger===void 0?"hover":_ref$trigger,_ref$shouldShowToolti=_ref3.shouldShowTooltip,shouldShowTooltip=_ref$shouldShowToolti===void 0?true:_ref$shouldShowToolti,customSlotProps=_ref3.slotProps,otherProps=_objectWithoutProperties$1(_ref3,_excluded$r);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),open=_useState2[0],setOpen=_useState2[1];var enhancedChildren=/* @__PURE__ */React__default.cloneElement(children,_objectSpread2$1({style:_objectSpread2$1(_objectSpread2$1({},children.props.style||{}),{},{cursor:"pointer"})},trigger==="click"&&shouldShowTooltip&&{onClick:function onClick(e){if(children.props.onClick){children.props.onClick(e);}setOpen(!open);}}));var tooltipProps=trigger==="click"?{open:shouldShowTooltip?open:false,onClose:function onClose(){return setOpen(false);},disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};var disabledListeners=!shouldShowTooltip?{disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};var customPopperProps=typeof(customSlotProps===null||customSlotProps===void 0?void 0:customSlotProps.popper)==="function"?void 0:customSlotProps===null||customSlotProps===void 0?void 0:customSlotProps.popper;return/* @__PURE__ */jsx$1(Tooltip,_objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({title:shouldShowTooltip?content2:"",placement:placement,arrow:arrow2,slots:{transition:Zoom},slotProps:{popper:{sx:_objectSpread2$1(_objectSpread2$1({},(customPopperProps===null||customPopperProps===void 0?void 0:customPopperProps.sx)||{}),{},_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.tooltip),{fontFamily:"var(--primary-font-family)",background:"var(--grey-800)",padding:"9px 9px 8px 12px",fontSize:"var(--body-small)",fontWeight:"400",color:"white !important",borderRadius:"4px",maxWidth:maxWidth2}),"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.arrow),{color:"var(--grey-800)"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="top"] .').concat(tooltipClasses.tooltip),{marginBottom:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="bottom"] .').concat(tooltipClasses.tooltip),{marginTop:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="left"] .').concat(tooltipClasses.tooltip),{marginRight:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="right"] .').concat(tooltipClasses.tooltip),{marginLeft:"8px"}))}}},tooltipProps),disabledListeners),otherProps),{},{children:enhancedChildren}));};var WithOverflowTooltip=function WithOverflowTooltip2(_ref22){var content2=_ref22.content,_children=_ref22.children,tooltipProps=_objectWithoutProperties$1(_ref22,_excluded2$6);return/* @__PURE__ */jsx$1(OverflowChecker,{children:function children(ref,showTooltip){var childrenWithRef=/* @__PURE__ */React__default.cloneElement(_children,{ref:ref});return showTooltip&&content2?/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({content:content2},tooltipProps),{},{children:childrenWithRef})):childrenWithRef;}});};var styles$n={"help-link":"helpArticleLink-module_help-link_Tne5b"};var _excluded$q=["href","tooltip"];var HelpArticleLink=/* @__PURE__ */React__default.memo(function(_ref3){var href=_ref3.href,tooltip=_ref3.tooltip,props=_objectWithoutProperties$1(_ref3,_excluded$q);if(!href)return null;return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltip,placement:"left",children:/* @__PURE__ */jsx$1(Link,_objectSpread2$1(_objectSpread2$1({href:href,target:"_blank","aria-label":tooltip,className:styles$n["help-link"]},props),{},{children:/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:getColor("primary","500"),children:/* @__PURE__ */jsx$1(AutoStoriesIcon,{"data-testid":"AutoStoriesIcon"})})}))});});HelpArticleLink.displayName="HelpArticleLink";var styles$m={"maintenance-wrapper":"maintenance-module_maintenance-wrapper_21CSu","maintenance-content":"maintenance-module_maintenance-content_csxiz","maintenance-icon":"maintenance-module_maintenance-icon_4Jqjc","maintenance-title":"maintenance-module_maintenance-title_6ALRO","maintenance-text":"maintenance-module_maintenance-text_P-UPr"};var _excluded$p=["title","description","subtitle"];var Maintenance=function Maintenance2(_ref3){var _ref$title=_ref3.title,title2=_ref$title===void 0?locale("maintenance.title"):_ref$title,_ref$description=_ref3.description,description2=_ref$description===void 0?locale("maintenance.description"):_ref$description,_ref$subtitle=_ref3.subtitle,subtitle2=_ref$subtitle===void 0?locale("maintenance.subtitle"):_ref$subtitle,props=_objectWithoutProperties$1(_ref3,_excluded$p);return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:styles$m["maintenance-wrapper"]},props),{},{children:/* @__PURE__ */jsxs("div",{className:styles$m["maintenance-content"],children:[/* @__PURE__ */jsx$1("div",{className:styles$m["maintenance-icon"],children:/* @__PURE__ */jsx$1(MaintenanceIcon,{})}),/* @__PURE__ */jsx$1("h1",{className:styles$m["maintenance-title"],children:title2}),/* @__PURE__ */jsxs("div",{className:styles$m["maintenance-text"],children:[/* @__PURE__ */jsx$1("p",{children:description2}),/* @__PURE__ */jsx$1("p",{children:subtitle2})]})]})}));};var title$4="generatingState-module_title_WfWVT";var highlight="generatingState-module_highlight_L1iz8";var description$1="generatingState-module_description_htMlf";var styles$l={"generating-state-container":"generatingState-module_generating-state-container_XNq1W","text-container":"generatingState-module_text-container_PHvh6","spinner-container":"generatingState-module_spinner-container_D21cF",title:title$4,highlight:highlight,description:description$1};var _excluded$o=["highlight","icon","text","description"];var DefaultIcon$1=/* @__PURE__ */jsx$1(GeneratingStateIcon,{});var GeneratingState=function GeneratingState2(_ref3){var highlight2=_ref3.highlight,_ref$icon=_ref3.icon,icon2=_ref$icon===void 0?DefaultIcon$1:_ref$icon,_ref$text=_ref3.text,text2=_ref$text===void 0?locale("generatingState.text"):_ref$text,_ref$description=_ref3.description,description2=_ref$description===void 0?locale("generatingState.description"):_ref$description,props=_objectWithoutProperties$1(_ref3,_excluded$o);var title2=highlight2?/* @__PURE__ */jsxs(Fragment$1,{children:[text2," ",/* @__PURE__ */jsx$1("strong",{className:styles$l.highlight,children:highlight2})]}):text2;return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$l["generating-state-container"],role:"status"},props),{},{children:[icon2,/* @__PURE__ */jsxs("div",{className:styles$l["text-container"],children:[/* @__PURE__ */jsx$1("p",{className:styles$l.title,children:title2}),/* @__PURE__ */jsx$1("p",{className:styles$l.description,children:description2})]}),/* @__PURE__ */jsx$1("div",{className:styles$l["spinner-container"],children:/* @__PURE__ */jsx$1(Spinner,{size:"sm"})})]}));};var modal$1="pickChannelModal-module_modal_YGDD7";var body="pickChannelModal-module_body_X7L60";var compact$1="pickChannelModal-module_compact_hD7b-";var sections="pickChannelModal-module_sections_VGJ6N";var section="pickChannelModal-module_section_BklUc";var section__title="pickChannelModal-module_section__title_fBRgI";var section__description="pickChannelModal-module_section__description_Pgidd";var styles$k={modal:modal$1,body:body,compact:compact$1,sections:sections,section:section,section__title:section__title,section__description:section__description,"cards-grid":"pickChannelModal-module_cards-grid_kLH1X"};var overlay="modal-module_overlay_tuS3y";var modal="modal-module_modal_pwYxH";var sm$3="modal-module_sm_yWHmZ";var md$1="modal-module_md_rV0w9";var lg$3="modal-module_lg_sy6Md";var xl="modal-module_xl_UbiWN";var styles$j={overlay:overlay,"modal-backdrop-fade-in":"modal-module_modal-backdrop-fade-in_ipnEv",modal:modal,"modal-enter":"modal-module_modal-enter_uufyU",sm:sm$3,md:md$1,lg:lg$3,xl:xl,"fit-content":"modal-module_fit-content_CBdg6"};var _excluded$n=["open","onClose","children","className","size","isLoading","fitContent","ariaLabel"];var ModalContext=/* @__PURE__ */createContext({isLoading:false});var ModalBase=function ModalBase2(_ref3){var open=_ref3.open,onClose=_ref3.onClose,children=_ref3.children,className=_ref3.className,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$isLoading=_ref3.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$fitContent=_ref3.fitContent,fitContent=_ref$fitContent===void 0?false:_ref$fitContent,ariaLabel=_ref3.ariaLabel,props=_objectWithoutProperties$1(_ref3,_excluded$n);return/* @__PURE__ */jsx$1(Modal$2,{open:open,onClose:onClose,className:styles$j["overlay"],children:/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({role:"dialog","aria-modal":"true","aria-label":ariaLabel||locale("a11y.dialog"),"aria-busy":isLoading||void 0,className:clsx(styles$j["modal"],styles$j[size2],className,_defineProperty$2({},styles$j["fit-content"],fitContent))},props),{},{children:/* @__PURE__ */jsx$1(ModalContext.Provider,{value:{isLoading:isLoading},children:children})}))});};var Modal$1=withDebugHandlers(ModalBase,"Modal");var icon$1="modalTitle-module_icon_jKB-M";var title$3="modalTitle-module_title_U2a2X";var subtitle="modalTitle-module_subtitle_DTIpI";var styles$i={"title-modal":"modalTitle-module_title-modal_Q-5aj","title-with-icon":"modalTitle-module_title-with-icon_qaofY",icon:icon$1,"title-group":"modalTitle-module_title-group_glQK9",title:title$3,subtitle:subtitle};var _excluded$m=["icon","title","subtitle","helpArticleUrl","helpTooltip"];var ModalTitle=function ModalTitle2(_ref3){var icon2=_ref3.icon,title2=_ref3.title,subtitle2=_ref3.subtitle,helpArticleUrl=_ref3.helpArticleUrl,_ref$helpTooltip=_ref3.helpTooltip,helpTooltip=_ref$helpTooltip===void 0?locale("modalTitle.instructive"):_ref$helpTooltip,props=_objectWithoutProperties$1(_ref3,_excluded$m);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$i["title-modal"]},props),{},{children:[/* @__PURE__ */jsxs("div",{className:styles$i["title-with-icon"],children:[icon2&&/* @__PURE__ */jsx$1("span",{className:styles$i["icon"],"aria-hidden":"true",children:icon2}),/* @__PURE__ */jsxs("div",{className:styles$i["title-group"],children:[/* @__PURE__ */jsx$1("span",{className:styles$i["title"],children:title2}),subtitle2&&/* @__PURE__ */jsx$1("div",{className:styles$i["subtitle"],children:subtitle2})]})]}),/* @__PURE__ */jsx$1(HelpArticleLink,{href:helpArticleUrl,tooltip:helpTooltip})]}));};var styles$h={"modal-body":"modalBody-module_modal-body_EvgIj","modal-body--loading":"modalBody-module_modal-body--loading_SG8wG"};var _excluded$l=["children","className"];var ModalBody=function ModalBody2(_ref3){var children=_ref3.children,className=_ref3.className,props=_objectWithoutProperties$1(_ref3,_excluded$l);var _useContext=useContext(ModalContext),isLoading=_useContext.isLoading;if(isLoading){return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$h["modal-body"],styles$h["modal-body--loading"],className)},props),{},{children:/* @__PURE__ */jsx$1(Spinner,{size:"lg"})}));}return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$h["modal-body"],className)},props),{},{children:children}));};var ModalFooter=function ModalFooter2(props){return/* @__PURE__ */jsx$1(ActionBar,_objectSpread2$1({variant:"modal"},props));};var Modal2=Modal$1;Modal2.Title=ModalTitle;Modal2.Body=ModalBody;Modal2.Footer=ModalFooter;var InsertPhotoRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.9 13.98l2.1 2.53 3.1-3.99c.2-.26.6-.26.8.01l3.51 4.68c.25.33.01.8-.4.8H6.02c-.42 0-.65-.48-.39-.81L8.12 14c.19-.26.57-.27.78-.02"}),"InsertPhotoRounded");var image="image-module_image_y02P7";var error$3="image-module_error_QtQOy";var styles$g={"image-container":"image-module_image-container_ZhlhW","show-border":"image-module_show-border_LV5sz",image:image,error:error$3};var _excluded$k=["sx","src","alt","imageSx","errorIcon","showBorder"];var Image=function Image2(_ref3){var sx=_ref3.sx,src=_ref3.src,alt=_ref3.alt,imageSx=_ref3.imageSx,errorIcon=_ref3.errorIcon,_ref$showBorder=_ref3.showBorder,showBorder=_ref$showBorder===void 0?true:_ref$showBorder,props=_objectWithoutProperties$1(_ref3,_excluded$k);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),hasError3=_useState2[0],setHasError=_useState2[1];useEffect(function(){setHasError(false);},[src]);var handleImageError=function handleImageError2(){setHasError(true);};return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$g["image-container"],_defineProperty$2({},styles$g["show-border"],showBorder)),style:_objectSpread2$1({},sx)},props),{},{children:hasError3?!!errorIcon?errorIcon:/* @__PURE__ */jsx$1(InsertPhotoRoundedIcon,{className:styles$g.error}):/* @__PURE__ */jsx$1("img",{src:src,alt:alt||src,className:styles$g.image,style:_objectSpread2$1({},imageSx),onError:handleImageError})}));};var card$1="card-module_card_HG0v6";var header$2="card-module_header_Jtd2-";var title$2="card-module_title_9LIjW";var description="card-module_description_nxqlH";var disabled$5="card-module_disabled_Zdzj7";var active$3="card-module_active_dTNAe";var styles$f={card:card$1,header:header$2,title:title$2,description:description,disabled:disabled$5,active:active$3};var _excluded$j=["sx","icon","title","onClick","children","description","isActive","disabled"];var CardBase=function CardBase2(_ref3){var sx=_ref3.sx,icon2=_ref3.icon,title2=_ref3.title,onClick=_ref3.onClick,children=_ref3.children,description2=_ref3.description,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,props=_objectWithoutProperties$1(_ref3,_excluded$j);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({style:sx,onClick:onClick,className:clsx(styles$f.card,_defineProperty$2(_defineProperty$2({},styles$f.disabled,disabled2),styles$f.active,isActive))},props),{},{children:[/* @__PURE__ */jsxs("div",{className:styles$f.header,children:[!!icon2&&icon2,!!title2&&/* @__PURE__ */jsx$1("div",{className:styles$f.title,children:title2})]}),!!description2&&/* @__PURE__ */jsx$1("span",{className:styles$f.description,children:description2}),children]}));};var Card=withDebugHandlers(CardBase,"Card");var _excluded$i=["open","onClose","channels","fitContent","generalEditionTitle","channelEditionTitle","generalEditionDescription","channelEditionDescription","showGeneralEdition","onSelectChannel","titleProps"];var ChannelIcon=function ChannelIcon2(_ref3){var iconUrl=_ref3.iconUrl,name2=_ref3.name;return/* @__PURE__ */jsx$1(Image,{alt:name2,src:iconUrl,showBorder:false,imageSx:{objectFit:"contain"},sx:{height:"36px",maxHeight:"36px",maxWidth:"128px",width:"128px"}});};var ChannelCard=function ChannelCard2(_ref22){var channel=_ref22.channel,onSelect=_ref22.onSelect;var name2=channel.name,iconUrl=channel.iconUrl,disabled2=channel.disabled,tooltipMessage=channel.tooltipMessage;var _splitDataProps=splitDataProps(channel),_splitDataProps2=_slicedToArray$1(_splitDataProps,1),dataProps=_splitDataProps2[0];return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltipMessage,shouldShowTooltip:!!tooltipMessage,children:/* @__PURE__ */jsx$1("div",{children:/* @__PURE__ */jsx$1(Card,_objectSpread2$1({disabled:disabled2,description:name2,sx:{width:"200px",height:"88px"},onClick:function onClick(){return!disabled2&&onSelect(channel);},icon:/* @__PURE__ */jsx$1(ChannelIcon,{iconUrl:iconUrl,name:name2})},dataProps))})});};var productecaStrategy={clientId:1,iconUrl:"https://imagesproducteca.blob.core.windows.net/producteca/isologo-producteca.svg"};var COMPACT_CARD_THRESHOLD=6;var PickChannelModalBase=function PickChannelModalBase2(_ref3){var _channels$length;var open=_ref3.open,onClose=_ref3.onClose,channels=_ref3.channels,fitContent=_ref3.fitContent,generalEditionTitle=_ref3.generalEditionTitle,channelEditionTitle=_ref3.channelEditionTitle,generalEditionDescription=_ref3.generalEditionDescription,channelEditionDescription=_ref3.channelEditionDescription,_ref3$showGeneralEdit=_ref3.showGeneralEdition,showGeneralEdition=_ref3$showGeneralEdit===void 0?false:_ref3$showGeneralEdit,_ref3$onSelectChannel=_ref3.onSelectChannel,onSelectChannel=_ref3$onSelectChannel===void 0?function(){}:_ref3$onSelectChannel,_ref3$titleProps=_ref3.titleProps,titleProps=_ref3$titleProps===void 0?{title:locale("pickChannelModal.title")}:_ref3$titleProps,props=_objectWithoutProperties$1(_ref3,_excluded$i);var cardCount=((_channels$length=channels===null||channels===void 0?void 0:channels.length)!==null&&_channels$length!==void 0?_channels$length:0)+(showGeneralEdition?1:0);var isCompact=!fitContent&&cardCount<=COMPACT_CARD_THRESHOLD;return/* @__PURE__ */jsxs(Modal2,_objectSpread2$1(_objectSpread2$1({open:open,onClose:onClose,size:"md",fitContent:fitContent,className:clsx(styles$k["modal"],_defineProperty$2({},styles$k["compact"],isCompact))},props),{},{children:[/* @__PURE__ */jsx$1(Modal2.Title,_objectSpread2$1({},titleProps)),/* @__PURE__ */jsx$1(Modal2.Body,{className:styles$k["body"],children:/* @__PURE__ */jsxs("div",{className:styles$k["sections"],children:[showGeneralEdition&&/* @__PURE__ */jsxs("section",{className:styles$k["section"],children:[generalEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$k["section__title"],children:generalEditionTitle}),generalEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$k["section__description"],children:generalEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$k["cards-grid"],children:/* @__PURE__ */jsx$1(ChannelCard,{channel:productecaStrategy,onSelect:onSelectChannel})})]}),/* @__PURE__ */jsxs("section",{className:styles$k["section"],children:[channelEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$k["section__title"],children:channelEditionTitle}),channelEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$k["section__description"],children:channelEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$k["cards-grid"],children:(channels||[]).map(function(channel){return/* @__PURE__ */jsx$1(ChannelCard,{channel:channel,onSelect:onSelectChannel},channel.clientId);})})]})]})})]}));};var PickChannelModal=withDebugHandlers(PickChannelModalBase,"PickChannelModal");var error$2="fileRow-module_error_51hJa";var card="fileRow-module_card_C0eaS";var compact="fileRow-module_compact_okqD-";var invalid$1="fileRow-module_invalid_lkV3F";var header$1="fileRow-module_header_5rhh6";var name="fileRow-module_name_8uFTt";var remove="fileRow-module_remove_2seMK";var progress="fileRow-module_progress_fOcXN";var percentage="fileRow-module_percentage_rszkL";var styles$e={"file-row":"fileRow-module_file-row_Sm6HQ",error:error$2,card:card,compact:compact,invalid:invalid$1,header:header$1,name:name,remove:remove,progress:progress,percentage:percentage};function getLinearProgressUtilityClass(slot){return generateUtilityClass("MuiLinearProgress",slot);}generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","bar","bar1","bar2"]);var TRANSITION_DURATION=4;var indeterminate1Keyframe=keyframes(_templateObject0||(_templateObject0=_taggedTemplateLiteral2(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])));var indeterminate1Animation=typeof indeterminate1Keyframe!=="string"?css$2(_templateObject1||(_templateObject1=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "])),indeterminate1Keyframe):null;var indeterminate2Keyframe=keyframes(_templateObject10||(_templateObject10=_taggedTemplateLiteral2(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])));var indeterminate2Animation=typeof indeterminate2Keyframe!=="string"?css$2(_templateObject11||(_templateObject11=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "])),indeterminate2Keyframe):null;var bufferKeyframe=keyframes(_templateObject12||(_templateObject12=_taggedTemplateLiteral2(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])));var bufferAnimation=typeof bufferKeyframe!=="string"?css$2(_templateObject13||(_templateObject13=_taggedTemplateLiteral2(["\n animation: "," 3s infinite linear;\n "])),bufferKeyframe):null;var useUtilityClasses=function useUtilityClasses(ownerState){var classes=ownerState.classes,variant=ownerState.variant,color2=ownerState.color;var slots={root:["root","color".concat(capitalize$1(color2)),variant],dashed:["dashed"],bar1:["bar","bar1"],bar2:["bar","bar2",variant==="buffer"&&"color".concat(capitalize$1(color2))]};return composeClasses(slots,getLinearProgressUtilityClass,classes);};var getColorShade=function getColorShade(theme,color2){if(theme.vars){return theme.vars.palette.LinearProgress["".concat(color2,"Bg")];}return theme.palette.mode==="light"?theme.lighten(theme.palette[color2].main,0.62):theme.darken(theme.palette[color2].main,0.5);};var LinearProgressRoot=styled("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function overridesResolver(props,styles2){var ownerState=props.ownerState;return[styles2.root,styles2["color".concat(capitalize$1(ownerState.color))],styles2[ownerState.variant]];}})(memoTheme(function(_ref118){var theme=_ref118.theme;return{position:"relative",overflow:"hidden",display:"block",height:4,// Fix Safari's bug during composition of different paint.
7006
+ */title:PropTypes.node}:void 0;var OverflowChecker=function OverflowChecker2(_ref3){var children=_ref3.children;var ref=useRef(null);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),showTooltip=_useState2[0],setShowTooltip=_useState2[1];useEffect(function(){var checkOverflow=function checkOverflow2(){if(ref.current){setShowTooltip(ref.current.scrollWidth>ref.current.offsetWidth);}};checkOverflow();window.addEventListener("resize",checkOverflow);return function(){return window.removeEventListener("resize",checkOverflow);};},[children]);return/* @__PURE__ */jsx$1(Fragment$1,{children:children(ref,showTooltip)});};var _excluded$r=["children","content","placement","arrow","maxWidth","trigger","shouldShowTooltip","slotProps"],_excluded2$6=["content","children"];var WithTooltip=function WithTooltip2(_ref3){var children=_ref3.children,content2=_ref3.content,_ref$placement=_ref3.placement,placement=_ref$placement===void 0?"top":_ref$placement,_ref$arrow=_ref3.arrow,arrow2=_ref$arrow===void 0?false:_ref$arrow,_ref$maxWidth=_ref3.maxWidth,maxWidth2=_ref$maxWidth===void 0?"284px":_ref$maxWidth,_ref$trigger=_ref3.trigger,trigger=_ref$trigger===void 0?"hover":_ref$trigger,_ref$shouldShowToolti=_ref3.shouldShowTooltip,shouldShowTooltip=_ref$shouldShowToolti===void 0?true:_ref$shouldShowToolti,customSlotProps=_ref3.slotProps,otherProps=_objectWithoutProperties$1(_ref3,_excluded$r);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),open=_useState2[0],setOpen=_useState2[1];var enhancedChildren=/* @__PURE__ */React__default.cloneElement(children,_objectSpread2$1({style:_objectSpread2$1(_objectSpread2$1({},children.props.style||{}),{},{cursor:"pointer"})},trigger==="click"&&shouldShowTooltip&&{onClick:function onClick(e){if(children.props.onClick){children.props.onClick(e);}setOpen(!open);}}));var tooltipProps=trigger==="click"?{open:shouldShowTooltip?open:false,onClose:function onClose(){return setOpen(false);},disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};var disabledListeners=!shouldShowTooltip?{disableHoverListener:true,disableFocusListener:true,disableTouchListener:true}:{};var customPopperProps=typeof(customSlotProps===null||customSlotProps===void 0?void 0:customSlotProps.popper)==="function"?void 0:customSlotProps===null||customSlotProps===void 0?void 0:customSlotProps.popper;return/* @__PURE__ */jsx$1(Tooltip,_objectSpread2$1(_objectSpread2$1(_objectSpread2$1(_objectSpread2$1({title:shouldShowTooltip?content2:"",placement:placement,arrow:arrow2,slots:{transition:Zoom},slotProps:{popper:{sx:_objectSpread2$1(_objectSpread2$1({},(customPopperProps===null||customPopperProps===void 0?void 0:customPopperProps.sx)||{}),{},_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.tooltip),{fontFamily:"var(--primary-font-family)",background:"var(--grey-800)",padding:"9px 9px 8px 12px",fontSize:"var(--body-small)",fontWeight:"400",color:"white !important",borderRadius:"4px",maxWidth:maxWidth2}),"&.".concat(tooltipClasses.popper," .").concat(tooltipClasses.arrow),{color:"var(--grey-800)"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="top"] .').concat(tooltipClasses.tooltip),{marginBottom:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="bottom"] .').concat(tooltipClasses.tooltip),{marginTop:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="left"] .').concat(tooltipClasses.tooltip),{marginRight:"8px"}),"&.".concat(tooltipClasses.popper,'[data-popper-placement*="right"] .').concat(tooltipClasses.tooltip),{marginLeft:"8px"}))}}},tooltipProps),disabledListeners),otherProps),{},{children:enhancedChildren}));};var WithOverflowTooltip=function WithOverflowTooltip2(_ref22){var content2=_ref22.content,_children=_ref22.children,tooltipProps=_objectWithoutProperties$1(_ref22,_excluded2$6);return/* @__PURE__ */jsx$1(OverflowChecker,{children:function children(ref,showTooltip){var childrenWithRef=/* @__PURE__ */React__default.cloneElement(_children,{ref:ref});return showTooltip&&content2?/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({content:content2},tooltipProps),{},{children:childrenWithRef})):childrenWithRef;}});};var styles$n={"help-link":"helpArticleLink-module_help-link_Tne5b"};var _excluded$q=["href","tooltip"];var HelpArticleLink=/* @__PURE__ */React__default.memo(function(_ref3){var href=_ref3.href,tooltip=_ref3.tooltip,props=_objectWithoutProperties$1(_ref3,_excluded$q);if(!href)return null;return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltip,placement:"left",children:/* @__PURE__ */jsx$1(Link,_objectSpread2$1(_objectSpread2$1({href:href,target:"_blank","aria-label":tooltip,className:styles$n["help-link"]},props),{},{children:/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:getColor("primary","500"),children:/* @__PURE__ */jsx$1(AutoStoriesIcon,{"data-testid":"AutoStoriesIcon"})})}))});});HelpArticleLink.displayName="HelpArticleLink";var styles$m={"maintenance-wrapper":"maintenance-module_maintenance-wrapper_21CSu","maintenance-content":"maintenance-module_maintenance-content_csxiz","maintenance-icon":"maintenance-module_maintenance-icon_4Jqjc","maintenance-title":"maintenance-module_maintenance-title_6ALRO","maintenance-text":"maintenance-module_maintenance-text_P-UPr"};var _excluded$p=["title","description","subtitle"];var Maintenance=function Maintenance2(_ref3){var _ref$title=_ref3.title,title2=_ref$title===void 0?locale("maintenance.title"):_ref$title,_ref$description=_ref3.description,description2=_ref$description===void 0?locale("maintenance.description"):_ref$description,_ref$subtitle=_ref3.subtitle,subtitle2=_ref$subtitle===void 0?locale("maintenance.subtitle"):_ref$subtitle,props=_objectWithoutProperties$1(_ref3,_excluded$p);return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:styles$m["maintenance-wrapper"]},props),{},{children:/* @__PURE__ */jsxs("div",{className:styles$m["maintenance-content"],children:[/* @__PURE__ */jsx$1("div",{className:styles$m["maintenance-icon"],children:/* @__PURE__ */jsx$1(MaintenanceIcon,{})}),/* @__PURE__ */jsx$1("h1",{className:styles$m["maintenance-title"],children:title2}),/* @__PURE__ */jsxs("div",{className:styles$m["maintenance-text"],children:[/* @__PURE__ */jsx$1("p",{children:description2}),/* @__PURE__ */jsx$1("p",{children:subtitle2})]})]})}));};var title$4="generatingState-module_title_WfWVT";var highlight="generatingState-module_highlight_L1iz8";var description$1="generatingState-module_description_htMlf";var styles$l={"generating-state-container":"generatingState-module_generating-state-container_XNq1W","text-container":"generatingState-module_text-container_PHvh6","spinner-container":"generatingState-module_spinner-container_D21cF",title:title$4,highlight:highlight,description:description$1};var _excluded$o=["highlight","icon","text","description"];var DefaultIcon$1=/* @__PURE__ */jsx$1(GeneratingStateIcon,{});var GeneratingState=function GeneratingState2(_ref3){var highlight2=_ref3.highlight,_ref$icon=_ref3.icon,icon2=_ref$icon===void 0?DefaultIcon$1:_ref$icon,_ref$text=_ref3.text,text2=_ref$text===void 0?locale("generatingState.text"):_ref$text,_ref$description=_ref3.description,description2=_ref$description===void 0?locale("generatingState.description"):_ref$description,props=_objectWithoutProperties$1(_ref3,_excluded$o);var title2=highlight2?/* @__PURE__ */jsxs(Fragment$1,{children:[text2," ",/* @__PURE__ */jsx$1("strong",{className:styles$l.highlight,children:highlight2})]}):text2;return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$l["generating-state-container"],role:"status"},props),{},{children:[icon2,/* @__PURE__ */jsxs("div",{className:styles$l["text-container"],children:[/* @__PURE__ */jsx$1("p",{className:styles$l.title,children:title2}),/* @__PURE__ */jsx$1("p",{className:styles$l.description,children:description2})]}),/* @__PURE__ */jsx$1("div",{className:styles$l["spinner-container"],children:/* @__PURE__ */jsx$1(Spinner,{size:"sm"})})]}));};var modal$1="pickChannelModal-module_modal_YGDD7";var body="pickChannelModal-module_body_X7L60";var compact$1="pickChannelModal-module_compact_hD7b-";var sections="pickChannelModal-module_sections_VGJ6N";var section="pickChannelModal-module_section_BklUc";var section__title="pickChannelModal-module_section__title_fBRgI";var section__description="pickChannelModal-module_section__description_Pgidd";var styles$k={modal:modal$1,body:body,compact:compact$1,sections:sections,section:section,section__title:section__title,section__description:section__description,"cards-grid":"pickChannelModal-module_cards-grid_kLH1X"};var overlay="modal-module_overlay_tuS3y";var modal="modal-module_modal_pwYxH";var sm$3="modal-module_sm_yWHmZ";var md$1="modal-module_md_rV0w9";var lg$3="modal-module_lg_sy6Md";var xl="modal-module_xl_UbiWN";var styles$j={overlay:overlay,"modal-backdrop-fade-in":"modal-module_modal-backdrop-fade-in_ipnEv",modal:modal,"modal-enter":"modal-module_modal-enter_uufyU",sm:sm$3,md:md$1,lg:lg$3,xl:xl,"fit-content":"modal-module_fit-content_CBdg6"};var _excluded$n=["open","onClose","children","className","size","isLoading","fitContent","ariaLabel"];var ModalContext=/* @__PURE__ */createContext({isLoading:false});var ModalBase=function ModalBase2(_ref3){var open=_ref3.open,onClose=_ref3.onClose,children=_ref3.children,className=_ref3.className,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$isLoading=_ref3.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$fitContent=_ref3.fitContent,fitContent=_ref$fitContent===void 0?false:_ref$fitContent,ariaLabel=_ref3.ariaLabel,props=_objectWithoutProperties$1(_ref3,_excluded$n);return/* @__PURE__ */jsx$1(Modal$2,{open:open,onClose:onClose,className:styles$j["overlay"],children:/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({role:"dialog","aria-modal":"true","aria-label":ariaLabel||locale("a11y.dialog"),"aria-busy":isLoading||void 0,className:clsx(styles$j["modal"],styles$j[size2],className,_defineProperty$2({},styles$j["fit-content"],fitContent))},props),{},{children:/* @__PURE__ */jsx$1(ModalContext.Provider,{value:{isLoading:isLoading},children:children})}))});};var Modal$1=withDebugHandlers(ModalBase,"Modal");var icon$1="modalTitle-module_icon_jKB-M";var title$3="modalTitle-module_title_U2a2X";var subtitle="modalTitle-module_subtitle_DTIpI";var styles$i={"title-modal":"modalTitle-module_title-modal_Q-5aj","title-with-icon":"modalTitle-module_title-with-icon_qaofY",icon:icon$1,"title-group":"modalTitle-module_title-group_glQK9",title:title$3,subtitle:subtitle};var _excluded$m=["icon","title","subtitle","helpArticleUrl","helpTooltip"];var ModalTitle=function ModalTitle2(_ref3){var icon2=_ref3.icon,title2=_ref3.title,subtitle2=_ref3.subtitle,helpArticleUrl=_ref3.helpArticleUrl,_ref$helpTooltip=_ref3.helpTooltip,helpTooltip=_ref$helpTooltip===void 0?locale("modalTitle.instructive"):_ref$helpTooltip,props=_objectWithoutProperties$1(_ref3,_excluded$m);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$i["title-modal"]},props),{},{children:[/* @__PURE__ */jsxs("div",{className:styles$i["title-with-icon"],children:[icon2&&/* @__PURE__ */jsx$1("span",{className:styles$i["icon"],"aria-hidden":"true",children:icon2}),/* @__PURE__ */jsxs("div",{className:styles$i["title-group"],children:[/* @__PURE__ */jsx$1("span",{className:styles$i["title"],children:title2}),subtitle2&&/* @__PURE__ */jsx$1("div",{className:styles$i["subtitle"],children:subtitle2})]})]}),/* @__PURE__ */jsx$1(HelpArticleLink,{href:helpArticleUrl,tooltip:helpTooltip})]}));};var styles$h={"modal-body":"modalBody-module_modal-body_EvgIj","modal-body--loading":"modalBody-module_modal-body--loading_SG8wG"};var _excluded$l=["children","className"];var ModalBody=function ModalBody2(_ref3){var children=_ref3.children,className=_ref3.className,props=_objectWithoutProperties$1(_ref3,_excluded$l);var _useContext=useContext(ModalContext),isLoading=_useContext.isLoading;if(isLoading){return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$h["modal-body"],styles$h["modal-body--loading"],className)},props),{},{children:/* @__PURE__ */jsx$1(Spinner,{size:"lg"})}));}return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$h["modal-body"],className)},props),{},{children:children}));};var ModalFooter=function ModalFooter2(props){return/* @__PURE__ */jsx$1(ActionBar,_objectSpread2$1({variant:"modal"},props));};var Modal2=Modal$1;Modal2.Title=ModalTitle;Modal2.Body=ModalBody;Modal2.Footer=ModalFooter;var InsertPhotoRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M21 19V5c0-1.1-.9-2-2-2H5c-1.1 0-2 .9-2 2v14c0 1.1.9 2 2 2h14c1.1 0 2-.9 2-2M8.9 13.98l2.1 2.53 3.1-3.99c.2-.26.6-.26.8.01l3.51 4.68c.25.33.01.8-.4.8H6.02c-.42 0-.65-.48-.39-.81L8.12 14c.19-.26.57-.27.78-.02"}),"InsertPhotoRounded");var image="image-module_image_y02P7";var error$3="image-module_error_QtQOy";var styles$g={"image-container":"image-module_image-container_ZhlhW","show-border":"image-module_show-border_LV5sz",image:image,error:error$3};var _excluded$k=["sx","src","alt","imageSx","errorIcon","showBorder"];var Image=function Image2(_ref3){var sx=_ref3.sx,src=_ref3.src,alt=_ref3.alt,imageSx=_ref3.imageSx,errorIcon=_ref3.errorIcon,_ref$showBorder=_ref3.showBorder,showBorder=_ref$showBorder===void 0?true:_ref$showBorder,props=_objectWithoutProperties$1(_ref3,_excluded$k);var _useState=useState(false),_useState2=_slicedToArray$1(_useState,2),hasError3=_useState2[0],setHasError=_useState2[1];useEffect(function(){setHasError(false);},[src]);var handleImageError=function handleImageError2(){setHasError(true);};return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$g["image-container"],_defineProperty$2({},styles$g["show-border"],showBorder)),style:_objectSpread2$1({},sx)},props),{},{children:hasError3?!!errorIcon?errorIcon:/* @__PURE__ */jsx$1(InsertPhotoRoundedIcon,{className:styles$g.error}):/* @__PURE__ */jsx$1("img",{src:src,alt:alt||src,className:styles$g.image,style:_objectSpread2$1({},imageSx),onError:handleImageError})}));};var card$1="card-module_card_HG0v6";var header$2="card-module_header_Jtd2-";var title$2="card-module_title_9LIjW";var description="card-module_description_nxqlH";var disabled$5="card-module_disabled_Zdzj7";var active$3="card-module_active_dTNAe";var styles$f={card:card$1,header:header$2,title:title$2,description:description,disabled:disabled$5,active:active$3};var _excluded$j=["sx","icon","title","onClick","children","description","isActive","disabled"];var CardBase=function CardBase2(_ref3){var sx=_ref3.sx,icon2=_ref3.icon,title2=_ref3.title,onClick=_ref3.onClick,children=_ref3.children,description2=_ref3.description,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,props=_objectWithoutProperties$1(_ref3,_excluded$j);return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({style:sx,onClick:onClick,className:clsx(styles$f.card,_defineProperty$2(_defineProperty$2({},styles$f.disabled,disabled2),styles$f.active,isActive))},props),{},{children:[/* @__PURE__ */jsxs("div",{className:styles$f.header,children:[!!icon2&&icon2,!!title2&&/* @__PURE__ */jsx$1("div",{className:styles$f.title,children:title2})]}),!!description2&&/* @__PURE__ */jsx$1("span",{className:styles$f.description,children:description2}),children]}));};var Card=withDebugHandlers(CardBase,"Card");var _excluded$i=["open","onClose","channels","fitContent","generalEditionAttrs","generalEditionTitle","channelEditionTitle","generalEditionDescription","channelEditionDescription","showGeneralEdition","onSelectChannel","titleProps"];var ChannelIcon=function ChannelIcon2(_ref3){var iconUrl=_ref3.iconUrl,name2=_ref3.name;return/* @__PURE__ */jsx$1(Image,{alt:name2,src:iconUrl,showBorder:false,imageSx:{objectFit:"contain"},sx:{height:"36px",maxHeight:"36px",maxWidth:"128px",width:"128px"}});};var ChannelCard=function ChannelCard2(_ref22){var channel=_ref22.channel,onSelect=_ref22.onSelect;var name2=channel.name,iconUrl=channel.iconUrl,disabled2=channel.disabled,tooltipMessage=channel.tooltipMessage;var _splitDataProps=splitDataProps(channel),_splitDataProps2=_slicedToArray$1(_splitDataProps,1),dataProps=_splitDataProps2[0];return/* @__PURE__ */jsx$1(WithTooltip,{content:tooltipMessage,shouldShowTooltip:!!tooltipMessage,children:/* @__PURE__ */jsx$1("div",{children:/* @__PURE__ */jsx$1(Card,_objectSpread2$1({disabled:disabled2,description:name2,sx:{width:"200px",height:"88px"},onClick:function onClick(){return!disabled2&&onSelect(channel);},icon:/* @__PURE__ */jsx$1(ChannelIcon,{iconUrl:iconUrl,name:name2})},dataProps))})});};var productecaStrategy={clientId:1,iconUrl:"https://imagesproducteca.blob.core.windows.net/producteca/isologo-producteca.svg"};var COMPACT_CARD_THRESHOLD=6;var PickChannelModalBase=function PickChannelModalBase2(_ref3){var _channels$length;var open=_ref3.open,onClose=_ref3.onClose,channels=_ref3.channels,fitContent=_ref3.fitContent,generalEditionAttrs=_ref3.generalEditionAttrs,generalEditionTitle=_ref3.generalEditionTitle,channelEditionTitle=_ref3.channelEditionTitle,generalEditionDescription=_ref3.generalEditionDescription,channelEditionDescription=_ref3.channelEditionDescription,_ref3$showGeneralEdit=_ref3.showGeneralEdition,showGeneralEdition=_ref3$showGeneralEdit===void 0?false:_ref3$showGeneralEdit,_ref3$onSelectChannel=_ref3.onSelectChannel,onSelectChannel=_ref3$onSelectChannel===void 0?function(){}:_ref3$onSelectChannel,_ref3$titleProps=_ref3.titleProps,titleProps=_ref3$titleProps===void 0?{title:locale("pickChannelModal.title")}:_ref3$titleProps,props=_objectWithoutProperties$1(_ref3,_excluded$i);var cardCount=((_channels$length=channels===null||channels===void 0?void 0:channels.length)!==null&&_channels$length!==void 0?_channels$length:0)+(showGeneralEdition?1:0);var isCompact=!fitContent&&cardCount<=COMPACT_CARD_THRESHOLD;return/* @__PURE__ */jsxs(Modal2,_objectSpread2$1(_objectSpread2$1({open:open,onClose:onClose,size:"md",fitContent:fitContent,className:clsx(styles$k["modal"],_defineProperty$2({},styles$k["compact"],isCompact))},props),{},{children:[/* @__PURE__ */jsx$1(Modal2.Title,_objectSpread2$1({},titleProps)),/* @__PURE__ */jsx$1(Modal2.Body,{className:styles$k["body"],children:/* @__PURE__ */jsxs("div",{className:styles$k["sections"],children:[showGeneralEdition&&/* @__PURE__ */jsxs("section",{className:styles$k["section"],children:[generalEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$k["section__title"],children:generalEditionTitle}),generalEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$k["section__description"],children:generalEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$k["cards-grid"],children:/* @__PURE__ */jsx$1(ChannelCard,{channel:_objectSpread2$1(_objectSpread2$1({},productecaStrategy),generalEditionAttrs),onSelect:onSelectChannel})})]}),/* @__PURE__ */jsxs("section",{className:styles$k["section"],children:[channelEditionTitle&&/* @__PURE__ */jsx$1("h3",{className:styles$k["section__title"],children:channelEditionTitle}),channelEditionDescription&&/* @__PURE__ */jsx$1("p",{className:styles$k["section__description"],children:channelEditionDescription}),/* @__PURE__ */jsx$1("div",{className:styles$k["cards-grid"],children:(channels||[]).map(function(channel){return/* @__PURE__ */jsx$1(ChannelCard,{channel:channel,onSelect:onSelectChannel},channel.clientId);})})]})]})})]}));};var PickChannelModal=withDebugHandlers(PickChannelModalBase,"PickChannelModal");var error$2="fileRow-module_error_51hJa";var card="fileRow-module_card_C0eaS";var compact="fileRow-module_compact_okqD-";var invalid$1="fileRow-module_invalid_lkV3F";var header$1="fileRow-module_header_5rhh6";var name="fileRow-module_name_8uFTt";var remove="fileRow-module_remove_2seMK";var progress="fileRow-module_progress_fOcXN";var percentage="fileRow-module_percentage_rszkL";var styles$e={"file-row":"fileRow-module_file-row_Sm6HQ",error:error$2,card:card,compact:compact,invalid:invalid$1,header:header$1,name:name,remove:remove,progress:progress,percentage:percentage};function getLinearProgressUtilityClass(slot){return generateUtilityClass("MuiLinearProgress",slot);}generateUtilityClasses("MuiLinearProgress",["root","colorPrimary","colorSecondary","determinate","indeterminate","buffer","query","dashed","bar","bar1","bar2"]);var TRANSITION_DURATION=4;var indeterminate1Keyframe=keyframes(_templateObject0||(_templateObject0=_taggedTemplateLiteral2(["\n 0% {\n left: -35%;\n right: 100%;\n }\n\n 60% {\n left: 100%;\n right: -90%;\n }\n\n 100% {\n left: 100%;\n right: -90%;\n }\n"])));var indeterminate1Animation=typeof indeterminate1Keyframe!=="string"?css$2(_templateObject1||(_templateObject1=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite;\n "])),indeterminate1Keyframe):null;var indeterminate2Keyframe=keyframes(_templateObject10||(_templateObject10=_taggedTemplateLiteral2(["\n 0% {\n left: -200%;\n right: 100%;\n }\n\n 60% {\n left: 107%;\n right: -8%;\n }\n\n 100% {\n left: 107%;\n right: -8%;\n }\n"])));var indeterminate2Animation=typeof indeterminate2Keyframe!=="string"?css$2(_templateObject11||(_templateObject11=_taggedTemplateLiteral2(["\n animation: "," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite;\n "])),indeterminate2Keyframe):null;var bufferKeyframe=keyframes(_templateObject12||(_templateObject12=_taggedTemplateLiteral2(["\n 0% {\n opacity: 1;\n background-position: 0 -23px;\n }\n\n 60% {\n opacity: 0;\n background-position: 0 -23px;\n }\n\n 100% {\n opacity: 1;\n background-position: -200px -23px;\n }\n"])));var bufferAnimation=typeof bufferKeyframe!=="string"?css$2(_templateObject13||(_templateObject13=_taggedTemplateLiteral2(["\n animation: "," 3s infinite linear;\n "])),bufferKeyframe):null;var useUtilityClasses=function useUtilityClasses(ownerState){var classes=ownerState.classes,variant=ownerState.variant,color2=ownerState.color;var slots={root:["root","color".concat(capitalize$1(color2)),variant],dashed:["dashed"],bar1:["bar","bar1"],bar2:["bar","bar2",variant==="buffer"&&"color".concat(capitalize$1(color2))]};return composeClasses(slots,getLinearProgressUtilityClass,classes);};var getColorShade=function getColorShade(theme,color2){if(theme.vars){return theme.vars.palette.LinearProgress["".concat(color2,"Bg")];}return theme.palette.mode==="light"?theme.lighten(theme.palette[color2].main,0.62):theme.darken(theme.palette[color2].main,0.5);};var LinearProgressRoot=styled("span",{name:"MuiLinearProgress",slot:"Root",overridesResolver:function overridesResolver(props,styles2){var ownerState=props.ownerState;return[styles2.root,styles2["color".concat(capitalize$1(ownerState.color))],styles2[ownerState.variant]];}})(memoTheme(function(_ref118){var theme=_ref118.theme;return{position:"relative",overflow:"hidden",display:"block",height:4,// Fix Safari's bug during composition of different paint.
7007
7007
  zIndex:0,"@media print":{colorAdjust:"exact"},variants:[].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref128){var _ref129=_slicedToArray2(_ref128,1),color2=_ref129[0];return{props:{color:color2},style:{backgroundColor:getColorShade(theme,color2)}};})),[{props:function props(_ref130){var ownerState=_ref130.ownerState;return ownerState.color==="inherit"&&ownerState.variant!=="buffer";},style:{"&::before":{content:'""',position:"absolute",left:0,top:0,right:0,bottom:0,backgroundColor:"currentColor",opacity:0.3}}},{props:{variant:"buffer"},style:{backgroundColor:"transparent"}},{props:{variant:"query"},style:{transform:"rotate(180deg)"}}])};}));var LinearProgressDashed=styled("span",{name:"MuiLinearProgress",slot:"Dashed"})(memoTheme(function(_ref140){var theme=_ref140.theme;return{position:"absolute",marginTop:0,height:"100%",width:"100%",backgroundSize:"10px 10px",backgroundPosition:"0 -23px",variants:[{props:{color:"inherit"},style:{opacity:0.3,backgroundImage:"radial-gradient(currentColor 0%, currentColor 16%, transparent 42%)"}}].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref150){var _ref158=_slicedToArray2(_ref150,1),color2=_ref158[0];var backgroundColor2=getColorShade(theme,color2);return{props:{color:color2},style:{backgroundImage:"radial-gradient(".concat(backgroundColor2," 0%, ").concat(backgroundColor2," 16%, transparent 42%)")}};})))};}),bufferAnimation||{// At runtime for Pigment CSS, `bufferAnimation` will be null and the generated keyframe will be used.
7008
7008
  animation:"".concat(bufferKeyframe," 3s infinite linear")});var LinearProgressBar1=styled("span",{name:"MuiLinearProgress",slot:"Bar1",overridesResolver:function overridesResolver(props,styles2){return[styles2.bar,styles2.bar1];}})(memoTheme(function(_ref159){var theme=_ref159.theme;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[{props:{color:"inherit"},style:{backgroundColor:"currentColor"}}].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref180){var _ref182=_slicedToArray2(_ref180,1),color2=_ref182[0];return{props:{color:color2},style:{backgroundColor:(theme.vars||theme).palette[color2].main}};})),[{props:{variant:"determinate"},style:{transition:"transform .".concat(TRANSITION_DURATION,"s linear")}},{props:{variant:"buffer"},style:{zIndex:1,transition:"transform .".concat(TRANSITION_DURATION,"s linear")}},{props:function props(_ref188){var ownerState=_ref188.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:{width:"auto"}},{props:function props(_ref192){var ownerState=_ref192.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:indeterminate1Animation||{animation:"".concat(indeterminate1Keyframe," 2.1s cubic-bezier(0.65, 0.815, 0.735, 0.395) infinite")}}])};}));var LinearProgressBar2=styled("span",{name:"MuiLinearProgress",slot:"Bar2",overridesResolver:function overridesResolver(props,styles2){return[styles2.bar,styles2.bar2];}})(memoTheme(function(_ref193){var theme=_ref193.theme;return{width:"100%",position:"absolute",left:0,bottom:0,top:0,transition:"transform 0.2s linear",transformOrigin:"left",variants:[].concat(_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref195){var _ref196=_slicedToArray2(_ref195,1),color2=_ref196[0];return{props:{color:color2},style:{"--LinearProgressBar2-barColor":(theme.vars||theme).palette[color2].main}};})),[{props:function props(_ref222){var ownerState=_ref222.ownerState;return ownerState.variant!=="buffer"&&ownerState.color!=="inherit";},style:{backgroundColor:"var(--LinearProgressBar2-barColor, currentColor)"}},{props:function props(_ref233){var ownerState=_ref233.ownerState;return ownerState.variant!=="buffer"&&ownerState.color==="inherit";},style:{backgroundColor:"currentColor"}},{props:{color:"inherit"},style:{opacity:0.3}}],_toConsumableArray2(Object.entries(theme.palette).filter(createSimplePaletteValueFilter()).map(function(_ref234){var _ref250=_slicedToArray2(_ref234,1),color2=_ref250[0];return{props:{color:color2,variant:"buffer"},style:{backgroundColor:getColorShade(theme,color2),transition:"transform .".concat(TRANSITION_DURATION,"s linear")}};})),[{props:function props(_ref254){var ownerState=_ref254.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:{width:"auto"}},{props:function props(_ref255){var ownerState=_ref255.ownerState;return ownerState.variant==="indeterminate"||ownerState.variant==="query";},style:indeterminate2Animation||{animation:"".concat(indeterminate2Keyframe," 2.1s cubic-bezier(0.165, 0.84, 0.44, 1) 1.15s infinite")}}])};}));var LinearProgress=/* @__PURE__ */React.forwardRef(function LinearProgress2(inProps,ref){var props=useDefaultProps({props:inProps,name:"MuiLinearProgress"});var _a=props,className=_a.className,_a$color7=_a.color,color2=_a$color7===void 0?"primary":_a$color7,maxProp=_a.max,minProp=_a.min,value=_a.value,valueBuffer=_a.valueBuffer,_a$variant12=_a.variant,variant=_a$variant12===void 0?"indeterminate":_a$variant12,other=__objRest(_a,["className","color","max","min","value","valueBuffer","variant"]);var ownerState=__spreadProps(__spreadValues({},props),{color:color2,variant:variant});if(process.env.NODE_ENV!=="production"){if(["indeterminate","query"].includes(variant)&&(minProp!==void 0||maxProp!==void 0)){console.warn("MUI: You have provided the `min` or `max` props with an 'indeterminate' or 'query' variant. These props will have no effect.");}}var min2=minProp!=null?minProp:0;var max2=maxProp!=null?maxProp:100;var classes=useUtilityClasses(ownerState);var isRtl=useRtl();var rootProps={};var inlineStyles={bar1:{},bar2:{}};if(variant==="determinate"||variant==="buffer"){if(value!==void 0){if(process.env.NODE_ENV!=="production"){if(value<min2||value>max2||min2>=max2){console.error("MUI: The min, max, and value props in LinearProgress should be numbers where min < max and min <= value <= max. Received min=".concat(min2,", max=").concat(max2,", value=").concat(value,"."));}}var range=max2-min2;var transform=(value-min2)/range*100-100;if(isRtl){transform=-transform;}inlineStyles.bar1.transform=range>0?"translateX(".concat(transform,"%)"):"translateX(-100%)";rootProps["aria-valuenow"]=value;rootProps["aria-valuemin"]=min2;rootProps["aria-valuemax"]=max2;}else if(process.env.NODE_ENV!=="production"){console.error("MUI: You need to provide a value prop when using the determinate or buffer variant of LinearProgress.");}}if(variant==="buffer"){if(valueBuffer!==void 0){if(process.env.NODE_ENV!=="production"){if(valueBuffer<min2||valueBuffer>max2||valueBuffer<value||min2>=max2){console.error("MUI: The min, max, value, and valueBuffer props in LinearProgress should be numbers where min < max and min <= value <= valueBuffer <= max. Received min=".concat(min2,", max=").concat(max2,", value=").concat(value,", valueBuffer=").concat(valueBuffer,"."));}}var _range=max2-min2;var _transform=(valueBuffer-min2)/_range*100-100;if(isRtl){_transform=-_transform;}inlineStyles.bar2.transform=_range>0?"translateX(".concat(_transform,"%)"):"translateX(-100%)";}else if(process.env.NODE_ENV!=="production"){console.error("MUI: You need to provide a valueBuffer prop when using the buffer variant of LinearProgress.");}}return/* @__PURE__ */jsxs(LinearProgressRoot,__spreadProps(__spreadValues(__spreadProps(__spreadValues({className:clsx(classes.root,className),ownerState:ownerState,role:"progressbar"},rootProps),{ref:ref}),other),{children:[variant==="buffer"?/* @__PURE__ */jsx$1(LinearProgressDashed,{className:classes.dashed,ownerState:ownerState}):null,/* @__PURE__ */jsx$1(LinearProgressBar1,{className:classes.bar1,ownerState:ownerState,style:inlineStyles.bar1}),variant==="determinate"?null:/* @__PURE__ */jsx$1(LinearProgressBar2,{className:classes.bar2,ownerState:ownerState,style:inlineStyles.bar2})]}));});process.env.NODE_ENV!=="production"?LinearProgress.propTypes={// ┌────────────────────────────── Warning ──────────────────────────────┐
7009
7009
  // │ These PropTypes are generated from the TypeScript type definitions. │
@@ -7036,7 +7036,7 @@ animation:"".concat(bufferKeyframe," 3s infinite linear")});var LinearProgressBa
7036
7036
  * The variant to use.
7037
7037
  * Use indeterminate or query when there is no progress value.
7038
7038
  * @default 'indeterminate'
7039
- */variant:PropTypes.oneOf(["buffer","determinate","indeterminate","query"])}:void 0;var progressbar="progressbar-module_progressbar_8ygYR";var lg$2="progressbar-module_lg_5JGr-";var sm$2="progressbar-module_sm_LPtUo";var styles$d={progressbar:progressbar,lg:lg$2,sm:sm$2};var _excluded$h=["size","progress","variant"];var Progressbar=function Progressbar2(_ref3){var _ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,_ref$progress=_ref3.progress,initialProgress=_ref$progress===void 0?0:_ref$progress,_ref$variant=_ref3.variant,variant=_ref$variant===void 0?"determinate":_ref$variant,props=_objectWithoutProperties$1(_ref3,_excluded$h);var _useState=useState(initialProgress),_useState2=_slicedToArray$1(_useState,2),progress2=_useState2[0],setProgress=_useState2[1];useEffect(function(){if(variant==="buffer"){var timer=setInterval(function(){setProgress(function(oldProgress){var newProgress=Math.min(100,oldProgress+Math.sqrt(100-oldProgress)*0.5);return Math.round(newProgress);});},100);return function(){clearInterval(timer);};}else{setProgress(initialProgress);}},[variant,initialProgress]);return/* @__PURE__ */jsx$1(LinearProgress,_objectSpread2$1({variant:variant=="buffer"?"determinate":variant,value:progress2,className:clsx(styles$d["progressbar"],styles$d[size2]),"aria-label":locale("a11y.progress"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":progress2},props));};var defaultDuration=2500;var stepInterval=100;var easeOutQuad=function easeOutQuad2(ratio){return ratio*(2-ratio);};var useAutoloadProgress=function useAutoloadProgress2(_ref3){var enabled=_ref3.enabled,_ref$duration=_ref3.duration,duration2=_ref$duration===void 0?defaultDuration:_ref$duration,_ref$onComplete=_ref3.onComplete,onComplete=_ref$onComplete===void 0?void 0:_ref$onComplete;var _useState=useState(0),_useState2=_slicedToArray$1(_useState,2),progress2=_useState2[0],setProgress=_useState2[1];var onCompleteRef=useRef(onComplete);useEffect(function(){onCompleteRef.current=onComplete;},[onComplete]);useEffect(function(){if(!enabled){setProgress(0);return void 0;}if(duration2<=0){var _onCompleteRef$curren;setProgress(100);(_onCompleteRef$curren=onCompleteRef.current)===null||_onCompleteRef$curren===void 0||_onCompleteRef$curren.call(onCompleteRef);return void 0;}var startedAt=Date.now();setProgress(0);var timer=setInterval(function(){var _onCompleteRef$curren2;var ratio=Math.min(1,(Date.now()-startedAt)/duration2);setProgress(Math.floor(easeOutQuad(ratio)*100));if(ratio<1)return;clearInterval(timer);(_onCompleteRef$curren2=onCompleteRef.current)===null||_onCompleteRef$curren2===void 0||_onCompleteRef$curren2.call(onCompleteRef);},stepInterval);return function(){return clearInterval(timer);};},[enabled,duration2]);return progress2;};var _excluded$g=["name","progress","autoload","autoloadDuration","onAutoloadComplete","error","onRemove","showRemoveAction"];var FileRowBase=function FileRowBase2(_ref3){var name2=_ref3.name,_ref$progress=_ref3.progress,progress2=_ref$progress===void 0?void 0:_ref$progress,_ref$autoload=_ref3.autoload,autoload=_ref$autoload===void 0?false:_ref$autoload,_ref$autoloadDuration=_ref3.autoloadDuration,autoloadDuration=_ref$autoloadDuration===void 0?void 0:_ref$autoloadDuration,_ref$onAutoloadComple=_ref3.onAutoloadComplete,onAutoloadComplete=_ref$onAutoloadComple===void 0?void 0:_ref$onAutoloadComple,_ref$error=_ref3.error,error2=_ref$error===void 0?void 0:_ref$error,_ref$onRemove=_ref3.onRemove,onRemove=_ref$onRemove===void 0?void 0:_ref$onRemove,_ref$showRemoveAction=_ref3.showRemoveAction,showRemoveAction=_ref$showRemoveAction===void 0?true:_ref$showRemoveAction,props=_objectWithoutProperties$1(_ref3,_excluded$g);var isControlled=progress2!==void 0;var autoloadProgress=useAutoloadProgress({enabled:autoload&&!isControlled,duration:autoloadDuration,onComplete:onAutoloadComplete});var isAutoloading=autoload&&!isControlled&&autoloadProgress<100;var currentProgress=isControlled?progress2:autoloadProgress;var hasProgress=isControlled||isAutoloading;var isRemovable=showRemoveAction&&!!onRemove;return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$e["file-row"]},props),{},{children:[/* @__PURE__ */jsxs("div",{className:clsx(styles$e.card,_defineProperty$2(_defineProperty$2({},styles$e.invalid,!!error2),styles$e.compact,hasProgress)),children:[/* @__PURE__ */jsxs("div",{className:styles$e.header,children:[/* @__PURE__ */jsx$1("span",{className:styles$e.name,children:name2}),isRemovable&&/* @__PURE__ */jsx$1("button",{type:"button",className:styles$e.remove,"aria-label":locale("dropzone.removeFile"),onClick:onRemove,children:/* @__PURE__ */jsx$1(TrashIcon,{size:16,color:getColor("primary","500")})})]}),hasProgress&&/* @__PURE__ */jsxs("div",{className:styles$e.progress,children:[/* @__PURE__ */jsx$1(Progressbar,{size:"sm",progress:currentProgress}),/* @__PURE__ */jsx$1("span",{className:styles$e.percentage,children:locale("dropzone.percentage",{progress:currentProgress})})]})]}),!!error2&&/* @__PURE__ */jsx$1("span",{role:"alert",className:styles$e.error,children:error2})]}));};var FileRow=withDebugHandlers(FileRowBase,"FileRow");var EditRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded");var VisibilityRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded");var VisibilityOffRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded");var label$3="permissionOption-module_label_Vxb8a";var active$2="permissionOption-module_active_adte8";var clickable="permissionOption-module_clickable_qJgeM";var disabled$4="permissionOption-module_disabled_GSgD5";var styles$c={"permission-option":"permissionOption-module_permission-option_n5PwJ",label:label$3,active:active$2,"no-background":"permissionOption-module_no-background_IsIRU",clickable:clickable,disabled:disabled$4};var _excluded$f=["permission","isActive","disabled","showBackground","label","icon","onClick"];var permissionConfig={read:{icon:/* @__PURE__ */jsx$1(VisibilityRoundedIcon,{}),labelKey:"permissions.read"},edit:{icon:/* @__PURE__ */jsx$1(EditRoundedIcon,{}),labelKey:"permissions.edit"},noAccess:{icon:/* @__PURE__ */jsx$1(VisibilityOffRoundedIcon,{}),labelKey:"permissions.noAccess"}};var PermissionOptionBase=function PermissionOptionBase2(_ref3){var permission=_ref3.permission,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$showBackground=_ref3.showBackground,showBackground=_ref$showBackground===void 0?true:_ref$showBackground,label2=_ref3.label,icon2=_ref3.icon,_ref$onClick=_ref3.onClick,onClick=_ref$onClick===void 0?void 0:_ref$onClick,props=_objectWithoutProperties$1(_ref3,_excluded$f);var _permissionConfig$per=permissionConfig[permission],defaultIcon=_permissionConfig$per.icon,labelKey=_permissionConfig$per.labelKey;var resolvedIcon=icon2!==null&&icon2!==void 0?icon2:defaultIcon;var resolvedLabel=label2!==null&&label2!==void 0?label2:locale(labelKey);var isClickable=!!onClick&&!disabled2;var iconColor=isActive?getColor("primary","500"):getColor("grey","800");return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$c["permission-option"],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$c.active,isActive),styles$c.disabled,disabled2),styles$c.clickable,isClickable),styles$c["no-background"],!showBackground)),role:isClickable?"button":void 0,tabIndex:isClickable?0:void 0,"aria-pressed":isClickable?isActive:void 0,"aria-disabled":disabled2||void 0,onClick:isClickable?onClick:void 0},props),{},{children:[/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:iconColor,children:resolvedIcon}),/* @__PURE__ */jsx$1("span",{className:styles$c.label,children:resolvedLabel})]}));};var PermissionOption=withDebugHandlers(PermissionOptionBase,"PermissionOption");var styles$b={"permission-selector":"permissionSelector-module_permission-selector_4Bgcp"};var _excluded$e=["sx","value","name","onChange","items","defaultValue"];var DEFAULT_ITEMS=[{permission:"noAccess"},{permission:"read"},{permission:"edit"}];var PermissionSelectorBase=function PermissionSelectorBase2(_ref3){var sx=_ref3.sx,value=_ref3.value,name2=_ref3.name,onChange2=_ref3.onChange,_ref$items=_ref3.items,items=_ref$items===void 0?DEFAULT_ITEMS:_ref$items,_ref$defaultValue=_ref3.defaultValue,defaultValue2=_ref$defaultValue===void 0?"noAccess":_ref$defaultValue,props=_objectWithoutProperties$1(_ref3,_excluded$e);var _React$useState=React__default.useState(defaultValue2),_React$useState2=_slicedToArray$1(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var activeValue=value!==null&&value!==void 0?value:internalValue;var combinedSx=useMemo(function(){return sxTabs$1(sx);},[sx]);var _handleChange=function _handleChange2(_event,newValue){if(value===void 0)setInternalValue(newValue);var fakeEvent={target:{name:name2,value:newValue}};onChange2===null||onChange2===void 0||onChange2(fakeEvent);};return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:styles$b["permission-selector"]},props),{},{children:/* @__PURE__ */jsx$1(Tabs$1,{sx:combinedSx,value:activeValue,onChange:_handleChange,"aria-label":locale("permissionSelector.ariaLabel"),children:map$2(items,function(item2){return/* @__PURE__ */jsx$1(Tab,{value:item2.permission,sx:sxTab$1,disableRipple:true,disabled:item2.disabled,label:/* @__PURE__ */jsx$1(PermissionOption,{icon:item2.icon,label:item2.label,showBackground:false,disabled:item2.disabled,permission:item2.permission,isActive:item2.permission===activeValue})},item2.permission);})})}));};var sxTabs$1=function sxTabs(sxListStyles){return{padding:0,minHeight:0,"& .MuiTabs-list":_objectSpread2$1({gap:"2px"},sxListStyles||{}),"& .MuiTab-root":{minWidth:0,minHeight:0,padding:0,zIndex:1,textTransform:"none"},"& .MuiTabs-indicator":{bottom:0,height:"100%",zIndex:0,borderRadius:"var(--radius-md)",backgroundColor:getColor("primary","50")}};};var sxTab$1={padding:0,minHeight:0};var PermissionSelector=withDebugHandlers(PermissionSelectorBase,"PermissionSelector");var Cancel=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var ErrorIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error");var Info=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");var CheckCircle=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");var alert="alert-module_alert_j7ZRS";var icon="alert-module_icon_vbZHd";var message="alert-module_message_klR2U";var close="alert-module_close_x5ptw";var success="alert-module_success_AVBKS";var error$1="alert-module_error_cxg96";var warning="alert-module_warning_zkMaJ";var info="alert-module_info_PBo1l";var styles$a={alert:alert,"full-width":"alert-module_full-width_eKIHw",icon:icon,message:message,close:close,success:success,error:error$1,warning:warning,info:info};var _excluded$d=["message","variant","className","icon","fullWidth","link","onClose"];var AlertBase=function AlertBase2(_ref3){var _link$href;var message2=_ref3.message,_ref$variant=_ref3.variant,variant=_ref$variant===void 0?"success":_ref$variant,className=_ref3.className,icon2=_ref3.icon,_ref$fullWidth=_ref3.fullWidth,fullWidth=_ref$fullWidth===void 0?false:_ref$fullWidth,link2=_ref3.link,onClose=_ref3.onClose,props=_objectWithoutProperties$1(_ref3,_excluded$d);var defaultIcons={success:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("success","500"),children:/* @__PURE__ */jsx$1(CheckCircle,{"data-testid":"CheckCircleIcon"})}),error:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("error","700"),children:/* @__PURE__ */jsx$1(Cancel,{})}),warning:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("secondary","500"),children:/* @__PURE__ */jsx$1(ErrorIcon,{})}),info:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("primary","500"),children:/* @__PURE__ */jsx$1(Info,{})})};return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$a["alert"],styles$a[variant],_defineProperty$2({},styles$a["full-width"],fullWidth),className)},props),{},{children:[/* @__PURE__ */jsx$1("div",{className:styles$a["icon"],children:icon2||defaultIcons[variant]}),/* @__PURE__ */jsxs("div",{className:styles$a["message"],children:[isString$4(message2)?/* @__PURE__ */jsx$1("span",{dangerouslySetInnerHTML:{__html:message2}}):/* @__PURE__ */jsxs("span",{children:[" ",message2]}),link2&&/* @__PURE__ */jsxs(Fragment$1,{children:[" ",/* @__PURE__ */jsx$1(Link,{href:(_link$href=link2.href)!==null&&_link$href!==void 0?_link$href:"#",size:"sm",weight:400,decoration:"underline",onClick:link2.onClick,children:link2.text})]})]}),onClose&&/* @__PURE__ */jsx$1("button",{type:"button",className:styles$a["close"],"aria-label":locale("a11y.close"),onClick:onClose,children:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("grey","800"),children:/* @__PURE__ */jsx$1(CloseRoundedIcon,{})})})]}));};var Alert=withDebugHandlers(AlertBase,"Alert");var breadcrumb="breadcrumb-module_breadcrumb_r-ILp";var styles$9={breadcrumb:breadcrumb,"breadcrumb-item":"breadcrumb-module_breadcrumb-item_suTUF"};var _excluded$c=["text","href","onClick"],_excluded2$5=["items","className"];var BreadcrumbItemComponent=function BreadcrumbItemComponent2(_ref3){var item2=_ref3.item;var itemText=item2.text,href=item2.href,onClick=item2.onClick,itemProps=_objectWithoutProperties$1(item2,_excluded$c);var text2="".concat(itemText," >");return onClick||href?/* @__PURE__ */jsx$1(Link,_objectSpread2$1(_objectSpread2$1({size:"sm",href:"".concat(href),onClick:onClick},itemProps),{},{children:text2})):/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$9["breadcrumb-item"]},itemProps),{},{children:[" ",text2," "]}));};var BreadcrumbBase=function BreadcrumbBase2(_ref22){var items=_ref22.items,className=_ref22.className,otherProps=_objectWithoutProperties$1(_ref22,_excluded2$5);return/* @__PURE__ */jsx$1("nav",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$9["breadcrumb"],className),"aria-label":"Breadcrumb"},otherProps),{},{children:map$2(items,function(item2,index2){return/* @__PURE__ */jsx$1(BreadcrumbItemComponent,{item:item2},index2);})}));};var Breadcrumb=withDebugHandlers(BreadcrumbBase,"Breadcrumb");var MoreVertIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var menuPaperSx=function menuPaperSx2(size2,maxItemsVisible){return{"& .MuiPopover-paper":{boxShadow:"var(--shadow-md)",maxHeight:"".concat(maxHeight(size2,maxItemsVisible),"px")}};};var getMenuActionSize=function getMenuActionSize2(size2){switch(size2){case"sm":return 32;case"md":return 37;case"lg":return 42;default:return 37;}};var maxHeight=function maxHeight2(size2,maxItemsVisible){return getMenuActionSize(size2)*(maxItemsVisible!==null&&maxItemsVisible!==void 0?maxItemsVisible:6);};var item="menuItem-module_item_IbBuJ";var lg$1="menuItem-module_lg_ZMwXU";var md="menuItem-module_md_apOGd";var sm$1="menuItem-module_sm_gHxtB";var disabled$3="menuItem-module_disabled_LOHD3";var styles$8={item:item,lg:lg$1,md:md,sm:sm$1,disabled:disabled$3};var menuItemSx={fontFamily:"var(--primary-font-family)",fontSize:"14px",color:getColor("grey","900"),"&.Mui-selected":{backgroundColor:getColor("grey","100")},"&.Mui-selected:hover":{backgroundColor:getColor("grey","100")},"&.Mui-disabled":{opacity:0.5,pointerEvents:"none","& > *":{pointerEvents:"auto"}},padding:"0 16px"};var _excluded$b=["label","icon","onClick","selected","disabled","onClose","size","tooltipProps"];var ItemContent=function ItemContent2(_ref3){var icon2=_ref3.icon,label2=_ref3.label,disabled2=_ref3.disabled,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size;return/* @__PURE__ */jsxs("div",{className:clsx(styles$8.item,styles$8[size2],_defineProperty$2({},styles$8.disabled,disabled2)),children:[!!icon2&&icon2,/* @__PURE__ */jsx$1("span",{children:label2})]});};var MenuItemComponentBase=function MenuItemComponentBase2(_ref22){var label2=_ref22.label,icon2=_ref22.icon,onClick=_ref22.onClick,selected2=_ref22.selected,disabled2=_ref22.disabled,onClose=_ref22.onClose,_ref2$size=_ref22.size,size2=_ref2$size===void 0?"md":_ref2$size,tooltipProps=_ref22.tooltipProps,otherProps=_objectWithoutProperties$1(_ref22,_excluded$b);var _handleClick=function _handleClick2(){if(!disabled2){onClose===null||onClose===void 0||onClose();onClick===null||onClick===void 0||onClick();}};var shouldShowTooltip=(tooltipProps===null||tooltipProps===void 0?void 0:tooltipProps.shouldShowTooltip)||disabled2&&!!(tooltipProps!==null&&tooltipProps!==void 0&&tooltipProps.content);return/* @__PURE__ */jsx$1(MenuItem$1,_objectSpread2$1(_objectSpread2$1({sx:menuItemSx,selected:selected2,disabled:disabled2,onClick:_handleClick},otherProps),{},{children:/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({},tooltipProps),{},{shouldShowTooltip:shouldShowTooltip,children:/* @__PURE__ */jsx$1("span",{role:"tooltip",children:/* @__PURE__ */jsx$1(ItemContent,{icon:icon2,label:label2,disabled:disabled2,size:size2})})}))}));};var MenuItemComponent=withDebugHandlers(MenuItemComponentBase,"MenuItemComponent");var _excluded$a=["items","id","maxItemsVisible","icon","size","disableRipple","iconButtonSx"];var MenuAction=function MenuAction2(_ref3){var items=_ref3.items,_ref$id=_ref3.id,id=_ref$id===void 0?"menu-action-button":_ref$id,_ref$maxItemsVisible=_ref3.maxItemsVisible,maxItemsVisible=_ref$maxItemsVisible===void 0?6:_ref$maxItemsVisible,icon2=_ref3.icon,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$disableRipple=_ref3.disableRipple,disableRipple=_ref$disableRipple===void 0?false:_ref$disableRipple,iconButtonSx=_ref3.iconButtonSx,otherProps=_objectWithoutProperties$1(_ref3,_excluded$a);var _useState=useState(null),_useState2=_slicedToArray$1(_useState,2),anchorEl=_useState2[0],setAnchorEl=_useState2[1];var open=Boolean(anchorEl);var _splitDataProps=splitDataProps(otherProps),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),dataProps=_splitDataProps2[0],menuProps=_splitDataProps2[1];var handleClick=function handleClick2(event){setAnchorEl(event.currentTarget);};var handleClose=function handleClose2(){setAnchorEl(null);};return/* @__PURE__ */jsxs("div",{children:[/* @__PURE__ */jsx$1(IconButton,_objectSpread2$1(_objectSpread2$1({id:id,"aria-label":locale("a11y.moreActions"),"aria-controls":open?"".concat(id,"-menu"):void 0,"aria-expanded":open?"true":void 0,"aria-haspopup":"true",onClick:handleClick,disableRipple:disableRipple,sx:iconButtonSx},dataProps),{},{children:icon2!==null&&icon2!==void 0?icon2:/* @__PURE__ */jsx$1(CustomIcon,{color:getColor("grey","900"),children:/* @__PURE__ */jsx$1(MoreVertIcon,{})})})),/* @__PURE__ */jsx$1(Menu$1,_objectSpread2$1(_objectSpread2$1({id:"".concat(id,"-menu"),anchorEl:anchorEl,open:open,onClose:handleClose,disableScrollLock:true,slotProps:{list:{"aria-labelledby":id}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:menuPaperSx(size2,maxItemsVisible)},menuProps),{},{children:map$2(items,function(item2,index2){var _item$size;return/* @__PURE__ */jsx$1(MenuItemComponent,_objectSpread2$1(_objectSpread2$1({},item2),{},{size:(_item$size=item2.size)!==null&&_item$size!==void 0?_item$size:size2,onClose:handleClose}),index2);})}))]});};var title$1="warningModal-module_title_kZiTR";var styles$7={"custom-header":"warningModal-module_custom-header_kflIT","help-container":"warningModal-module_help-container_hsnyD","header-icon":"warningModal-module_header-icon_qOIRS",title:title$1,"warning-modal":"warningModal-module_warning-modal_Nlamu","warning-body":"warningModal-module_warning-body_5DHA9"};var _excluded$9=["icon","onSave","onCancel","className","saveAttrs","description","size","open","cancelAttrs","helpArticleHref","isLoading","fitContent","onChangeDontShowAgain","cancelLabel","confirmLabel","title","dontShowAgainLabel"];var DefaultIcon=/* @__PURE__ */jsx$1(CustomIcon,{size:"32",color:getColor("secondary","500"),children:/* @__PURE__ */jsx$1(ErrorIcon,{})});var WarningModalBase=function WarningModalBase2(_ref3){var icon2=_ref3.icon,onSave=_ref3.onSave,onCancel=_ref3.onCancel,className=_ref3.className,saveAttrs=_ref3.saveAttrs,description2=_ref3.description,_ref$size=_ref3.size,size2=_ref$size===void 0?"sm":_ref$size,_ref$open=_ref3.open,open=_ref$open===void 0?true:_ref$open,cancelAttrs=_ref3.cancelAttrs,helpArticleHref=_ref3.helpArticleHref,_ref$isLoading=_ref3.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$fitContent=_ref3.fitContent,fitContent=_ref$fitContent===void 0?true:_ref$fitContent,onChangeDontShowAgain=_ref3.onChangeDontShowAgain,_ref$cancelLabel=_ref3.cancelLabel,cancelLabel=_ref$cancelLabel===void 0?locale("cancel"):_ref$cancelLabel,_ref$confirmLabel=_ref3.confirmLabel,confirmLabel=_ref$confirmLabel===void 0?locale("continue"):_ref$confirmLabel,_ref$title=_ref3.title,title2=_ref$title===void 0?locale("warningModal.warning"):_ref$title,_ref$dontShowAgainLab=_ref3.dontShowAgainLabel,dontShowAgainLabel=_ref$dontShowAgainLab===void 0?locale("warningModal.dontShowAgain"):_ref$dontShowAgainLab,props=_objectWithoutProperties$1(_ref3,_excluded$9);var _splitDataProps=splitDataProps(props),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),dataProps=_splitDataProps2[0],checkboxProps=_splitDataProps2[1];return/* @__PURE__ */jsxs(Modal2,_objectSpread2$1(_objectSpread2$1({open:open,size:size2,onClose:onCancel,isLoading:isLoading,className:clsx(styles$7["warning-modal"],className),fitContent:fitContent,ariaLabel:typeof title2==="string"?title2:void 0},dataProps),{},{children:[/* @__PURE__ */jsxs("div",{className:styles$7["custom-header"],children:[/* @__PURE__ */jsx$1("div",{className:styles$7["help-container"],children:/* @__PURE__ */jsx$1(HelpArticleLink,{href:helpArticleHref,tooltip:locale("guide")})}),/* @__PURE__ */jsxs("div",{className:styles$7["header-icon"],children:[!!icon2?icon2:DefaultIcon,/* @__PURE__ */jsx$1("div",{className:styles$7["title"],children:title2})]})]}),/* @__PURE__ */jsxs(Modal2.Body,{className:styles$7["warning-body"],children:[/* @__PURE__ */jsx$1("span",{children:description2}),onChangeDontShowAgain&&/* @__PURE__ */jsx$1(CheckboxInput,_objectSpread2$1({name:"dont-show-again",label:dontShowAgainLabel,onChange:onChangeDontShowAgain},checkboxProps))]}),/* @__PURE__ */jsx$1(Modal2.Footer,{cancelProps:_objectSpread2$1({onCancel:onCancel,label:cancelLabel},cancelAttrs),saveProps:_objectSpread2$1({onSave:onSave,label:confirmLabel,variant:"primary",size:"md"},saveAttrs)})]}));};var WarningModal=withDebugHandlers(WarningModalBase,"WarningModal");var baseIteratee$1=_baseIteratee,isArrayLike$1=isArrayLike_1,keys=keys_1;function createFind$1(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike$1(collection)){var iteratee=baseIteratee$1(predicate);collection=keys(collection);predicate=function predicate(key){return iteratee(iterable[key],key,iterable);};}var index2=findIndexFunc(collection,predicate,fromIndex);return index2>-1?iterable[iteratee?collection[index2]:index2]:void 0;};}var _createFind=createFind$1;var baseFindIndex=_baseFindIndex,baseIteratee=_baseIteratee,toInteger=toInteger_1;var nativeMax=Math.max;function findIndex$1(array,predicate,fromIndex){var length2=array==null?0:array.length;if(!length2){return-1;}var index2=fromIndex==null?0:toInteger(fromIndex);if(index2<0){index2=nativeMax(length2+index2,0);}return baseFindIndex(array,baseIteratee(predicate),index2);}var findIndex_1=findIndex$1;var createFind=_createFind,findIndex=findIndex_1;var find=createFind(findIndex);var find_1=find;var find$1=/* @__PURE__ */getDefaultExportFromCjs(find_1);function isUndefined(value){return value===void 0;}var isUndefined_1=isUndefined;var isUndefined$1=/* @__PURE__ */getDefaultExportFromCjs(isUndefined_1);var tabs="tabs-module_tabs_UMeM9";var list="tabs-module_list_rsWgV";var tab="tabs-module_tab_qi523";var label$2="tabs-module_label_gXlYw";var active$1="tabs-module_active_PvUYu";var disabled$2="tabs-module_disabled_Lue6Q";var styles$6={tabs:tabs,list:list,tab:tab,label:label$2,active:active$1,disabled:disabled$2};var _excluded$8=["content","shouldShowTooltip"],_excluded2$4=["sx","items","value","onChange","defaultValue"],_excluded3$1=["id","href","label","disabled","tooltipProps","target","onClick"];var TabLabel=function TabLabel2(_ref3){var label2=_ref3.label,tooltipProps=_ref3.tooltipProps;var _ref22=tooltipProps!==null&&tooltipProps!==void 0?tooltipProps:{},content2=_ref22.content,_ref2$shouldShowToolt=_ref22.shouldShowTooltip,shouldShowTooltip=_ref2$shouldShowToolt===void 0?true:_ref2$shouldShowToolt,otherTooltipProps=_objectWithoutProperties$1(_ref22,_excluded$8);var tabLabel=/* @__PURE__ */jsx$1("span",{className:styles$6["label"],children:label2});if(!content2||!shouldShowTooltip)return tabLabel;return/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({},otherTooltipProps),{},{content:content2,describeChild:true,children:tabLabel}));};var TabsBase=function TabsBase2(_ref3){var sx=_ref3.sx,items=_ref3.items,value=_ref3.value,onChange2=_ref3.onChange,defaultValue2=_ref3.defaultValue,props=_objectWithoutProperties$1(_ref3,_excluded2$4);var _React$useState=React__default.useState(defaultValue2),_React$useState2=_slicedToArray$1(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var activeId=!isUndefined$1(value)?value:internalValue;var firstEnabledId=useMemo(function(){var _find;return(_find=find$1(items,function(i){return!i.disabled;}))===null||_find===void 0?void 0:_find.id;},[items]);var combinedSx=useMemo(function(){return sxTabs2(sx);},[sx]);useEffect(function(){if(activeId===void 0){setInternalValue(firstEnabledId);}},[activeId,firstEnabledId]);var _handleSelect=function _handleSelect2(_event,newValue){var selectedId=String(newValue);var itemSelected=find$1(items,function(item2){return item2.id===selectedId;});if(itemSelected!==null&&itemSelected!==void 0&&itemSelected.disabled)return;if(value===void 0)setInternalValue(selectedId);onChange2===null||onChange2===void 0||onChange2(itemSelected);};var _handleTabClick=function _handleTabClick2(item2,event){if(item2.disabled||!item2.href)return;var isCtrlClick=event.ctrlKey||event.metaKey;var isMiddleClick=event.button===1;var isTargetBlank=item2.target==="_blank";if(isCtrlClick||isMiddleClick||isTargetBlank){return;}event.preventDefault();if(item2!==null&&item2!==void 0&&item2.onClick){var _item$onClick;item2===null||item2===void 0||(_item$onClick=item2.onClick)===null||_item$onClick===void 0||_item$onClick.call(item2);}else{setTimeout(function(){window.location.href=item2.href;},300);}};return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$6["tabs"])},props),{},{children:/* @__PURE__ */jsx$1(Tabs$1,{sx:combinedSx,value:activeId,"aria-label":"tabs",onChange:_handleSelect,className:styles$6["list"],children:map$2(items,function(item2){var id=item2.id,href=item2.href,label2=item2.label,disabled2=item2.disabled,tooltipProps=item2.tooltipProps,target=item2.target;item2.onClick;var itemProps=_objectWithoutProperties$1(item2,_excluded3$1);return/* @__PURE__ */jsx$1(Tab,_objectSpread2$1({value:id,sx:sxTab,disableRipple:true,component:"a",disabled:disabled2,label:/* @__PURE__ */jsx$1(TabLabel,{label:label2,tooltipProps:tooltipProps}),onClick:function onClick(e){return _handleTabClick(item2,e);},className:clsx(styles$6["tab"],_defineProperty$2(_defineProperty$2({},styles$6["active"],id===activeId),styles$6["disabled"],disabled2)),href:href,target:target},itemProps),id);})})}));};var sxTabs2=function sxTabs3(sxListStyles){return{padding:0,minHeight:0,"& .MuiTabs-list":_objectSpread2$1({gap:"24px",padding:"0 32px"},sxListStyles||{}),"& .MuiTab-root":{minWidth:"0"},"& .MuiTabs-indicator":{borderRadius:"48px",backgroundColor:getColor("primary","500")}};};var sxTab={padding:0,minHeight:0};var Tabs2=withDebugHandlers(TabsBase,"Tabs");/*! *****************************************************************************
7039
+ */variant:PropTypes.oneOf(["buffer","determinate","indeterminate","query"])}:void 0;var progressbar="progressbar-module_progressbar_8ygYR";var lg$2="progressbar-module_lg_5JGr-";var sm$2="progressbar-module_sm_LPtUo";var styles$d={progressbar:progressbar,lg:lg$2,sm:sm$2};var _excluded$h=["size","progress","variant"];var Progressbar=function Progressbar2(_ref3){var _ref$size=_ref3.size,size2=_ref$size===void 0?"lg":_ref$size,_ref$progress=_ref3.progress,initialProgress=_ref$progress===void 0?0:_ref$progress,_ref$variant=_ref3.variant,variant=_ref$variant===void 0?"determinate":_ref$variant,props=_objectWithoutProperties$1(_ref3,_excluded$h);var _useState=useState(initialProgress),_useState2=_slicedToArray$1(_useState,2),progress2=_useState2[0],setProgress=_useState2[1];useEffect(function(){if(variant==="buffer"){var timer=setInterval(function(){setProgress(function(oldProgress){var newProgress=Math.min(100,oldProgress+Math.sqrt(100-oldProgress)*0.5);return Math.round(newProgress);});},100);return function(){clearInterval(timer);};}else{setProgress(initialProgress);}},[variant,initialProgress]);return/* @__PURE__ */jsx$1(LinearProgress,_objectSpread2$1({variant:variant=="buffer"?"determinate":variant,value:progress2,className:clsx(styles$d["progressbar"],styles$d[size2]),"aria-label":locale("a11y.progress"),"aria-valuemin":0,"aria-valuemax":100,"aria-valuenow":progress2},props));};var defaultDuration=2500;var stepInterval=100;var easeOutQuad=function easeOutQuad2(ratio){return ratio*(2-ratio);};var useAutoloadProgress=function useAutoloadProgress2(_ref3){var enabled=_ref3.enabled,_ref$duration=_ref3.duration,duration2=_ref$duration===void 0?defaultDuration:_ref$duration,_ref$onComplete=_ref3.onComplete,onComplete=_ref$onComplete===void 0?void 0:_ref$onComplete;var _useState=useState(0),_useState2=_slicedToArray$1(_useState,2),progress2=_useState2[0],setProgress=_useState2[1];var onCompleteRef=useRef(onComplete);useEffect(function(){onCompleteRef.current=onComplete;},[onComplete]);useEffect(function(){if(!enabled){setProgress(0);return void 0;}if(duration2<=0){var _onCompleteRef$curren;setProgress(100);(_onCompleteRef$curren=onCompleteRef.current)===null||_onCompleteRef$curren===void 0||_onCompleteRef$curren.call(onCompleteRef);return void 0;}var startedAt=Date.now();setProgress(0);var timer=setInterval(function(){var _onCompleteRef$curren2;var ratio=Math.min(1,(Date.now()-startedAt)/duration2);setProgress(Math.floor(easeOutQuad(ratio)*100));if(ratio<1)return;clearInterval(timer);(_onCompleteRef$curren2=onCompleteRef.current)===null||_onCompleteRef$curren2===void 0||_onCompleteRef$curren2.call(onCompleteRef);},stepInterval);return function(){return clearInterval(timer);};},[enabled,duration2]);return progress2;};var _excluded$g=["name","progress","autoload","autoloadDuration","onAutoloadComplete","error","onRemove","showRemoveAction"];var FileRowBase=function FileRowBase2(_ref3){var name2=_ref3.name,_ref$progress=_ref3.progress,progress2=_ref$progress===void 0?void 0:_ref$progress,_ref$autoload=_ref3.autoload,autoload=_ref$autoload===void 0?false:_ref$autoload,_ref$autoloadDuration=_ref3.autoloadDuration,autoloadDuration=_ref$autoloadDuration===void 0?void 0:_ref$autoloadDuration,_ref$onAutoloadComple=_ref3.onAutoloadComplete,onAutoloadComplete=_ref$onAutoloadComple===void 0?void 0:_ref$onAutoloadComple,_ref$error=_ref3.error,error2=_ref$error===void 0?void 0:_ref$error,_ref$onRemove=_ref3.onRemove,onRemove=_ref$onRemove===void 0?void 0:_ref$onRemove,_ref$showRemoveAction=_ref3.showRemoveAction,showRemoveAction=_ref$showRemoveAction===void 0?true:_ref$showRemoveAction,props=_objectWithoutProperties$1(_ref3,_excluded$g);var isControlled=progress2!==void 0;var autoloadProgress=useAutoloadProgress({enabled:autoload&&!isControlled,duration:autoloadDuration,onComplete:onAutoloadComplete});var isAutoloading=autoload&&!isControlled&&autoloadProgress<100;var currentProgress=isControlled?progress2:autoloadProgress;var hasProgress=isControlled||isAutoloading;var isRemovable=showRemoveAction&&!!onRemove;return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$e["file-row"]},props),{},{children:[/* @__PURE__ */jsxs("div",{className:clsx(styles$e.card,_defineProperty$2(_defineProperty$2({},styles$e.invalid,!!error2),styles$e.compact,hasProgress)),children:[/* @__PURE__ */jsxs("div",{className:styles$e.header,children:[/* @__PURE__ */jsx$1("span",{className:styles$e.name,children:name2}),isRemovable&&/* @__PURE__ */jsx$1("button",{type:"button",className:styles$e.remove,"aria-label":locale("dropzone.removeFile"),onClick:onRemove,children:/* @__PURE__ */jsx$1(TrashIcon,{size:16,color:getColor("primary","500")})})]}),hasProgress&&/* @__PURE__ */jsxs("div",{className:styles$e.progress,children:[/* @__PURE__ */jsx$1(Progressbar,{size:"sm",progress:currentProgress}),/* @__PURE__ */jsx$1("span",{className:styles$e.percentage,children:locale("dropzone.percentage",{progress:currentProgress})})]})]}),!!error2&&/* @__PURE__ */jsx$1("span",{role:"alert",className:styles$e.error,children:error2})]}));};var FileRow=withDebugHandlers(FileRowBase,"FileRow");var EditRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M3 17.46v3.04c0 .28.22.5.5.5h3.04c.13 0 .26-.05.35-.15L17.81 9.94l-3.75-3.75L3.15 17.1q-.15.15-.15.36M20.71 7.04c.39-.39.39-1.02 0-1.41l-2.34-2.34a.996.996 0 0 0-1.41 0l-1.83 1.83 3.75 3.75z"}),"EditRounded");var VisibilityRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 4C7 4 2.73 7.11 1 11.5 2.73 15.89 7 19 12 19s9.27-3.11 11-7.5C21.27 7.11 17 4 12 4m0 12.5c-2.76 0-5-2.24-5-5s2.24-5 5-5 5 2.24 5 5-2.24 5-5 5m0-8c-1.66 0-3 1.34-3 3s1.34 3 3 3 3-1.34 3-3-1.34-3-3-3"}),"VisibilityRounded");var VisibilityOffRoundedIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 6.5c2.76 0 5 2.24 5 5 0 .51-.1 1-.24 1.46l3.06 3.06c1.39-1.23 2.49-2.77 3.18-4.53C21.27 7.11 17 4 12 4c-1.27 0-2.49.2-3.64.57l2.17 2.17c.47-.14.96-.24 1.47-.24M2.71 3.16c-.39.39-.39 1.02 0 1.41l1.97 1.97C3.06 7.83 1.77 9.53 1 11.5 2.73 15.89 7 19 12 19c1.52 0 2.97-.3 4.31-.82l2.72 2.72c.39.39 1.02.39 1.41 0s.39-1.02 0-1.41L4.13 3.16c-.39-.39-1.03-.39-1.42 0M12 16.5c-2.76 0-5-2.24-5-5 0-.77.18-1.5.49-2.14l1.57 1.57c-.03.18-.06.37-.06.57 0 1.66 1.34 3 3 3 .2 0 .38-.03.57-.07L14.14 16c-.65.32-1.37.5-2.14.5m2.97-5.33c-.15-1.4-1.25-2.49-2.64-2.64z"}),"VisibilityOffRounded");var label$3="permissionOption-module_label_Vxb8a";var active$2="permissionOption-module_active_adte8";var clickable="permissionOption-module_clickable_qJgeM";var disabled$4="permissionOption-module_disabled_GSgD5";var styles$c={"permission-option":"permissionOption-module_permission-option_n5PwJ",label:label$3,active:active$2,"no-background":"permissionOption-module_no-background_IsIRU",clickable:clickable,disabled:disabled$4};var _excluded$f=["permission","isActive","disabled","showBackground","label","icon","onClick"];var permissionConfig={read:{icon:/* @__PURE__ */jsx$1(VisibilityRoundedIcon,{}),labelKey:"permissions.read"},edit:{icon:/* @__PURE__ */jsx$1(EditRoundedIcon,{}),labelKey:"permissions.edit"},noAccess:{icon:/* @__PURE__ */jsx$1(VisibilityOffRoundedIcon,{}),labelKey:"permissions.noAccess"}};var PermissionOptionBase=function PermissionOptionBase2(_ref3){var permission=_ref3.permission,_ref$isActive=_ref3.isActive,isActive=_ref$isActive===void 0?false:_ref$isActive,_ref$disabled=_ref3.disabled,disabled2=_ref$disabled===void 0?false:_ref$disabled,_ref$showBackground=_ref3.showBackground,showBackground=_ref$showBackground===void 0?true:_ref$showBackground,label2=_ref3.label,icon2=_ref3.icon,_ref$onClick=_ref3.onClick,onClick=_ref$onClick===void 0?void 0:_ref$onClick,props=_objectWithoutProperties$1(_ref3,_excluded$f);var _permissionConfig$per=permissionConfig[permission],defaultIcon=_permissionConfig$per.icon,labelKey=_permissionConfig$per.labelKey;var resolvedIcon=icon2!==null&&icon2!==void 0?icon2:defaultIcon;var resolvedLabel=label2!==null&&label2!==void 0?label2:locale(labelKey);var isClickable=!!onClick&&!disabled2;var iconColor=isActive?getColor("primary","500"):getColor("grey","800");return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$c["permission-option"],_defineProperty$2(_defineProperty$2(_defineProperty$2(_defineProperty$2({},styles$c.active,isActive),styles$c.disabled,disabled2),styles$c.clickable,isClickable),styles$c["no-background"],!showBackground)),role:isClickable?"button":void 0,tabIndex:isClickable?0:void 0,"aria-pressed":isClickable?isActive:void 0,"aria-disabled":disabled2||void 0,onClick:isClickable?onClick:void 0},props),{},{children:[/* @__PURE__ */jsx$1(CustomIcon,{size:"8",color:iconColor,children:resolvedIcon}),/* @__PURE__ */jsx$1("span",{className:styles$c.label,children:resolvedLabel})]}));};var PermissionOption=withDebugHandlers(PermissionOptionBase,"PermissionOption");var styles$b={"permission-selector":"permissionSelector-module_permission-selector_4Bgcp"};var _excluded$e=["sx","value","name","onChange","items","defaultValue"];var DEFAULT_ITEMS=[{permission:"noAccess"},{permission:"read"},{permission:"edit"}];var PermissionSelectorBase=function PermissionSelectorBase2(_ref3){var sx=_ref3.sx,value=_ref3.value,name2=_ref3.name,onChange2=_ref3.onChange,_ref$items=_ref3.items,items=_ref$items===void 0?DEFAULT_ITEMS:_ref$items,_ref$defaultValue=_ref3.defaultValue,defaultValue2=_ref$defaultValue===void 0?"noAccess":_ref$defaultValue,props=_objectWithoutProperties$1(_ref3,_excluded$e);var _React$useState=React__default.useState(defaultValue2),_React$useState2=_slicedToArray$1(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var activeValue=value!==null&&value!==void 0?value:internalValue;var combinedSx=useMemo(function(){return sxTabs$1(sx);},[sx]);var _handleChange=function _handleChange2(_event,newValue){if(value===void 0)setInternalValue(newValue);var fakeEvent={target:{name:name2,value:newValue}};onChange2===null||onChange2===void 0||onChange2(fakeEvent);};return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:styles$b["permission-selector"]},props),{},{children:/* @__PURE__ */jsx$1(Tabs$1,{sx:combinedSx,value:activeValue,onChange:_handleChange,"aria-label":locale("permissionSelector.ariaLabel"),children:map$2(items,function(item2){return/* @__PURE__ */jsx$1(Tab,{value:item2.permission,sx:sxTab$1,disableRipple:true,disabled:item2.disabled,label:/* @__PURE__ */jsx$1(PermissionOption,{icon:item2.icon,label:item2.label,showBackground:false,disabled:item2.disabled,permission:item2.permission,isActive:item2.permission===activeValue})},item2.permission);})})}));};var sxTabs$1=function sxTabs(sxListStyles){return{padding:0,minHeight:0,"& .MuiTabs-list":_objectSpread2$1({gap:"2px"},sxListStyles||{}),"& .MuiTab-root":{minWidth:0,minHeight:0,padding:0,zIndex:1,textTransform:"none"},"& .MuiTabs-indicator":{bottom:0,height:"100%",zIndex:0,borderRadius:"var(--radius-md)",backgroundColor:getColor("primary","50")}};};var sxTab$1={padding:0,minHeight:0};var PermissionSelector=withDebugHandlers(PermissionSelectorBase,"PermissionSelector");var Cancel=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.47 2 2 6.47 2 12s4.47 10 10 10 10-4.47 10-10S17.53 2 12 2m5 13.59L15.59 17 12 13.41 8.41 17 7 15.59 10.59 12 7 8.41 8.41 7 12 10.59 15.59 7 17 8.41 13.41 12z"}),"Cancel");var ErrorIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-2h2zm0-4h-2V7h2z"}),"Error");var Info=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m1 15h-2v-6h2zm0-8h-2V7h2z"}),"Info");var CheckCircle=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 2C6.48 2 2 6.48 2 12s4.48 10 10 10 10-4.48 10-10S17.52 2 12 2m-2 15-5-5 1.41-1.41L10 14.17l7.59-7.59L19 8z"}),"CheckCircle");var alert="alert-module_alert_j7ZRS";var icon="alert-module_icon_vbZHd";var message="alert-module_message_klR2U";var close="alert-module_close_x5ptw";var success="alert-module_success_AVBKS";var error$1="alert-module_error_cxg96";var warning="alert-module_warning_zkMaJ";var info="alert-module_info_PBo1l";var styles$a={alert:alert,"full-width":"alert-module_full-width_eKIHw",icon:icon,message:message,close:close,success:success,error:error$1,warning:warning,info:info};var _excluded$d=["message","variant","className","icon","fullWidth","link","onClose"];var AlertBase=function AlertBase2(_ref3){var _link$href;var message2=_ref3.message,_ref$variant=_ref3.variant,variant=_ref$variant===void 0?"success":_ref$variant,className=_ref3.className,icon2=_ref3.icon,_ref$fullWidth=_ref3.fullWidth,fullWidth=_ref$fullWidth===void 0?false:_ref$fullWidth,link2=_ref3.link,onClose=_ref3.onClose,props=_objectWithoutProperties$1(_ref3,_excluded$d);var defaultIcons={success:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("success","500"),children:/* @__PURE__ */jsx$1(CheckCircle,{"data-testid":"CheckCircleIcon"})}),error:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("error","700"),children:/* @__PURE__ */jsx$1(Cancel,{})}),warning:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("secondary","500"),children:/* @__PURE__ */jsx$1(ErrorIcon,{})}),info:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("primary","500"),children:/* @__PURE__ */jsx$1(Info,{})})};return/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$a["alert"],styles$a[variant],_defineProperty$2({},styles$a["full-width"],fullWidth),className)},props),{},{children:[/* @__PURE__ */jsx$1("div",{className:styles$a["icon"],children:icon2||defaultIcons[variant]}),/* @__PURE__ */jsxs("div",{className:styles$a["message"],children:[isString$4(message2)?/* @__PURE__ */jsx$1("span",{dangerouslySetInnerHTML:{__html:message2}}):/* @__PURE__ */jsxs("span",{children:[" ",message2]}),link2&&/* @__PURE__ */jsxs(Fragment$1,{children:[" ",/* @__PURE__ */jsx$1(Link,{href:(_link$href=link2.href)!==null&&_link$href!==void 0?_link$href:"#",size:"sm",weight:400,decoration:"underline",onClick:link2.onClick,children:link2.text})]})]}),onClose&&/* @__PURE__ */jsx$1("button",{type:"button",className:styles$a["close"],"aria-label":locale("a11y.close"),onClick:onClose,children:/* @__PURE__ */jsx$1(CustomIcon,{size:"12",color:getColor("grey","800"),children:/* @__PURE__ */jsx$1(CloseRoundedIcon,{})})})]}));};var Alert=withDebugHandlers(AlertBase,"Alert");var breadcrumb="breadcrumb-module_breadcrumb_r-ILp";var styles$9={breadcrumb:breadcrumb,"breadcrumb-item":"breadcrumb-module_breadcrumb-item_suTUF"};var _excluded$c=["text","href","onClick"],_excluded2$5=["items","className"];var BreadcrumbItemComponent=function BreadcrumbItemComponent2(_ref3){var item2=_ref3.item;var itemText=item2.text,href=item2.href,onClick=item2.onClick,itemProps=_objectWithoutProperties$1(item2,_excluded$c);var text2="".concat(itemText," >");return onClick||href?/* @__PURE__ */jsx$1(Link,_objectSpread2$1(_objectSpread2$1({size:"sm",href:"".concat(href),onClick:onClick},itemProps),{},{children:text2})):/* @__PURE__ */jsxs("div",_objectSpread2$1(_objectSpread2$1({className:styles$9["breadcrumb-item"]},itemProps),{},{children:[" ",text2," "]}));};var BreadcrumbBase=function BreadcrumbBase2(_ref22){var items=_ref22.items,className=_ref22.className,otherProps=_objectWithoutProperties$1(_ref22,_excluded2$5);return/* @__PURE__ */jsx$1("nav",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$9["breadcrumb"],className),"aria-label":"Breadcrumb"},otherProps),{},{children:map$2(items,function(item2,index2){return/* @__PURE__ */jsx$1(BreadcrumbItemComponent,{item:item2},index2);})}));};var Breadcrumb=withDebugHandlers(BreadcrumbBase,"Breadcrumb");var MoreVertIcon=createSvgIcon(/* @__PURE__ */jsx$1("path",{d:"M12 8c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2m0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2m0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2"}),"MoreVert");var menuPaperSx=function menuPaperSx2(size2,maxItemsVisible){return{"& .MuiPopover-paper":{boxShadow:"var(--shadow-md)",maxHeight:"".concat(maxHeight(size2,maxItemsVisible),"px")}};};var getMenuActionSize=function getMenuActionSize2(size2){switch(size2){case"sm":return 32;case"md":return 37;case"lg":return 42;default:return 37;}};var maxHeight=function maxHeight2(size2,maxItemsVisible){return getMenuActionSize(size2)*(maxItemsVisible!==null&&maxItemsVisible!==void 0?maxItemsVisible:6);};var item="menuItem-module_item_IbBuJ";var lg$1="menuItem-module_lg_ZMwXU";var md="menuItem-module_md_apOGd";var sm$1="menuItem-module_sm_gHxtB";var disabled$3="menuItem-module_disabled_LOHD3";var styles$8={item:item,lg:lg$1,md:md,sm:sm$1,disabled:disabled$3};var menuItemSx={fontFamily:"var(--primary-font-family)",fontSize:"14px",color:getColor("grey","900"),"&.Mui-selected":{backgroundColor:getColor("grey","100")},"&.Mui-selected:hover":{backgroundColor:getColor("grey","100")},"&.Mui-disabled":{opacity:0.5,pointerEvents:"none","& > *":{pointerEvents:"auto"}},padding:"0 16px"};var _excluded$b=["label","icon","onClick","selected","disabled","onClose","size","tooltipProps"];var ItemContent=function ItemContent2(_ref3){var icon2=_ref3.icon,label2=_ref3.label,disabled2=_ref3.disabled,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size;return/* @__PURE__ */jsxs("div",{className:clsx(styles$8.item,styles$8[size2],_defineProperty$2({},styles$8.disabled,disabled2)),children:[!!icon2&&icon2,/* @__PURE__ */jsx$1("span",{children:label2})]});};var MenuItemComponentBase=function MenuItemComponentBase2(_ref22){var label2=_ref22.label,icon2=_ref22.icon,onClick=_ref22.onClick,selected2=_ref22.selected,disabled2=_ref22.disabled,onClose=_ref22.onClose,_ref2$size=_ref22.size,size2=_ref2$size===void 0?"md":_ref2$size,tooltipProps=_ref22.tooltipProps,otherProps=_objectWithoutProperties$1(_ref22,_excluded$b);var _handleClick=function _handleClick2(){if(!disabled2){onClose===null||onClose===void 0||onClose();onClick===null||onClick===void 0||onClick();}};var shouldShowTooltip=(tooltipProps===null||tooltipProps===void 0?void 0:tooltipProps.shouldShowTooltip)||disabled2&&!!(tooltipProps!==null&&tooltipProps!==void 0&&tooltipProps.content);return/* @__PURE__ */jsx$1(MenuItem$1,_objectSpread2$1(_objectSpread2$1({sx:menuItemSx,selected:selected2,disabled:disabled2,onClick:_handleClick},otherProps),{},{children:/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({},tooltipProps),{},{shouldShowTooltip:shouldShowTooltip,children:/* @__PURE__ */jsx$1("span",{role:"tooltip",children:/* @__PURE__ */jsx$1(ItemContent,{icon:icon2,label:label2,disabled:disabled2,size:size2})})}))}));};var MenuItemComponent=withDebugHandlers(MenuItemComponentBase,"MenuItemComponent");var _excluded$a=["items","id","maxItemsVisible","icon","size","disableRipple","iconButtonSx"];var MenuAction=function MenuAction2(_ref3){var items=_ref3.items,_ref$id=_ref3.id,id=_ref$id===void 0?"menu-action-button":_ref$id,_ref$maxItemsVisible=_ref3.maxItemsVisible,maxItemsVisible=_ref$maxItemsVisible===void 0?6:_ref$maxItemsVisible,icon2=_ref3.icon,_ref$size=_ref3.size,size2=_ref$size===void 0?"md":_ref$size,_ref$disableRipple=_ref3.disableRipple,disableRipple=_ref$disableRipple===void 0?false:_ref$disableRipple,iconButtonSx=_ref3.iconButtonSx,otherProps=_objectWithoutProperties$1(_ref3,_excluded$a);var _useState=useState(null),_useState2=_slicedToArray$1(_useState,2),anchorEl=_useState2[0],setAnchorEl=_useState2[1];var open=Boolean(anchorEl);var _splitDataProps=splitDataProps(otherProps),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),dataProps=_splitDataProps2[0],menuProps=_splitDataProps2[1];var handleClick=function handleClick2(event){setAnchorEl(event.currentTarget);};var handleClose=function handleClose2(){setAnchorEl(null);};return/* @__PURE__ */jsxs("div",{children:[/* @__PURE__ */jsx$1(IconButton,_objectSpread2$1(_objectSpread2$1({id:id,"aria-label":locale("a11y.moreActions"),"aria-controls":open?"".concat(id,"-menu"):void 0,"aria-expanded":open?"true":void 0,"aria-haspopup":"true",onClick:handleClick,disableRipple:disableRipple,sx:iconButtonSx},dataProps),{},{children:icon2!==null&&icon2!==void 0?icon2:/* @__PURE__ */jsx$1(CustomIcon,{color:getColor("grey","900"),children:/* @__PURE__ */jsx$1(MoreVertIcon,{})})})),/* @__PURE__ */jsx$1(Menu$1,_objectSpread2$1(_objectSpread2$1({id:"".concat(id,"-menu"),anchorEl:anchorEl,open:open,onClose:handleClose,disableScrollLock:true,slotProps:{list:{"aria-labelledby":id}},anchorOrigin:{vertical:"bottom",horizontal:"right"},transformOrigin:{vertical:"top",horizontal:"right"},sx:menuPaperSx(size2,maxItemsVisible)},menuProps),{},{children:map$2(items,function(item2,index2){var _item$size;return/* @__PURE__ */jsx$1(MenuItemComponent,_objectSpread2$1(_objectSpread2$1({},item2),{},{size:(_item$size=item2.size)!==null&&_item$size!==void 0?_item$size:size2,onClose:handleClose}),index2);})}))]});};var title$1="warningModal-module_title_kZiTR";var styles$7={"custom-header":"warningModal-module_custom-header_kflIT","help-container":"warningModal-module_help-container_hsnyD","header-icon":"warningModal-module_header-icon_qOIRS",title:title$1,"warning-modal":"warningModal-module_warning-modal_Nlamu","warning-body":"warningModal-module_warning-body_5DHA9"};var _excluded$9=["icon","onSave","onCancel","className","saveAttrs","helpAttrs","description","size","open","cancelAttrs","checkboxAttrs","helpArticleHref","isLoading","fitContent","onChangeDontShowAgain","cancelLabel","confirmLabel","title","dontShowAgainLabel"];var DefaultIcon=/* @__PURE__ */jsx$1(CustomIcon,{size:"32",color:getColor("secondary","500"),children:/* @__PURE__ */jsx$1(ErrorIcon,{})});var WarningModalBase=function WarningModalBase2(_ref3){var icon2=_ref3.icon,onSave=_ref3.onSave,onCancel=_ref3.onCancel,className=_ref3.className,saveAttrs=_ref3.saveAttrs,helpAttrs=_ref3.helpAttrs,description2=_ref3.description,_ref$size=_ref3.size,size2=_ref$size===void 0?"sm":_ref$size,_ref$open=_ref3.open,open=_ref$open===void 0?true:_ref$open,cancelAttrs=_ref3.cancelAttrs,checkboxAttrs=_ref3.checkboxAttrs,helpArticleHref=_ref3.helpArticleHref,_ref$isLoading=_ref3.isLoading,isLoading=_ref$isLoading===void 0?false:_ref$isLoading,_ref$fitContent=_ref3.fitContent,fitContent=_ref$fitContent===void 0?true:_ref$fitContent,onChangeDontShowAgain=_ref3.onChangeDontShowAgain,_ref$cancelLabel=_ref3.cancelLabel,cancelLabel=_ref$cancelLabel===void 0?locale("cancel"):_ref$cancelLabel,_ref$confirmLabel=_ref3.confirmLabel,confirmLabel=_ref$confirmLabel===void 0?locale("continue"):_ref$confirmLabel,_ref$title=_ref3.title,title2=_ref$title===void 0?locale("warningModal.warning"):_ref$title,_ref$dontShowAgainLab=_ref3.dontShowAgainLabel,dontShowAgainLabel=_ref$dontShowAgainLab===void 0?locale("warningModal.dontShowAgain"):_ref$dontShowAgainLab,props=_objectWithoutProperties$1(_ref3,_excluded$9);var _splitDataProps=splitDataProps(props),_splitDataProps2=_slicedToArray$1(_splitDataProps,2),dataProps=_splitDataProps2[0],checkboxProps=_splitDataProps2[1];return/* @__PURE__ */jsxs(Modal2,_objectSpread2$1(_objectSpread2$1({open:open,size:size2,onClose:onCancel,isLoading:isLoading,className:clsx(styles$7["warning-modal"],className),fitContent:fitContent,ariaLabel:typeof title2==="string"?title2:void 0},dataProps),{},{children:[/* @__PURE__ */jsxs("div",{className:styles$7["custom-header"],children:[/* @__PURE__ */jsx$1("div",{className:styles$7["help-container"],children:/* @__PURE__ */jsx$1(HelpArticleLink,_objectSpread2$1({href:helpArticleHref,tooltip:locale("guide")},helpAttrs))}),/* @__PURE__ */jsxs("div",{className:styles$7["header-icon"],children:[!!icon2?icon2:DefaultIcon,/* @__PURE__ */jsx$1("div",{className:styles$7["title"],children:title2})]})]}),/* @__PURE__ */jsxs(Modal2.Body,{className:styles$7["warning-body"],children:[/* @__PURE__ */jsx$1("span",{children:description2}),onChangeDontShowAgain&&/* @__PURE__ */jsx$1(CheckboxInput,_objectSpread2$1(_objectSpread2$1({name:"dont-show-again",label:dontShowAgainLabel,onChange:onChangeDontShowAgain},checkboxProps),checkboxAttrs))]}),/* @__PURE__ */jsx$1(Modal2.Footer,{cancelProps:_objectSpread2$1({onCancel:onCancel,label:cancelLabel},cancelAttrs),saveProps:_objectSpread2$1({onSave:onSave,label:confirmLabel,variant:"primary",size:"md"},saveAttrs)})]}));};var WarningModal=withDebugHandlers(WarningModalBase,"WarningModal");var baseIteratee$1=_baseIteratee,isArrayLike$1=isArrayLike_1,keys=keys_1;function createFind$1(findIndexFunc){return function(collection,predicate,fromIndex){var iterable=Object(collection);if(!isArrayLike$1(collection)){var iteratee=baseIteratee$1(predicate);collection=keys(collection);predicate=function predicate(key){return iteratee(iterable[key],key,iterable);};}var index2=findIndexFunc(collection,predicate,fromIndex);return index2>-1?iterable[iteratee?collection[index2]:index2]:void 0;};}var _createFind=createFind$1;var baseFindIndex=_baseFindIndex,baseIteratee=_baseIteratee,toInteger=toInteger_1;var nativeMax=Math.max;function findIndex$1(array,predicate,fromIndex){var length2=array==null?0:array.length;if(!length2){return-1;}var index2=fromIndex==null?0:toInteger(fromIndex);if(index2<0){index2=nativeMax(length2+index2,0);}return baseFindIndex(array,baseIteratee(predicate),index2);}var findIndex_1=findIndex$1;var createFind=_createFind,findIndex=findIndex_1;var find=createFind(findIndex);var find_1=find;var find$1=/* @__PURE__ */getDefaultExportFromCjs(find_1);function isUndefined(value){return value===void 0;}var isUndefined_1=isUndefined;var isUndefined$1=/* @__PURE__ */getDefaultExportFromCjs(isUndefined_1);var tabs="tabs-module_tabs_UMeM9";var list="tabs-module_list_rsWgV";var tab="tabs-module_tab_qi523";var label$2="tabs-module_label_gXlYw";var active$1="tabs-module_active_PvUYu";var disabled$2="tabs-module_disabled_Lue6Q";var styles$6={tabs:tabs,list:list,tab:tab,label:label$2,active:active$1,disabled:disabled$2};var _excluded$8=["content","shouldShowTooltip"],_excluded2$4=["sx","items","value","onChange","defaultValue"],_excluded3$1=["id","href","label","disabled","tooltipProps","target","onClick"];var TabLabel=function TabLabel2(_ref3){var label2=_ref3.label,tooltipProps=_ref3.tooltipProps;var _ref22=tooltipProps!==null&&tooltipProps!==void 0?tooltipProps:{},content2=_ref22.content,_ref2$shouldShowToolt=_ref22.shouldShowTooltip,shouldShowTooltip=_ref2$shouldShowToolt===void 0?true:_ref2$shouldShowToolt,otherTooltipProps=_objectWithoutProperties$1(_ref22,_excluded$8);var tabLabel=/* @__PURE__ */jsx$1("span",{className:styles$6["label"],children:label2});if(!content2||!shouldShowTooltip)return tabLabel;return/* @__PURE__ */jsx$1(WithTooltip,_objectSpread2$1(_objectSpread2$1({},otherTooltipProps),{},{content:content2,describeChild:true,children:tabLabel}));};var TabsBase=function TabsBase2(_ref3){var sx=_ref3.sx,items=_ref3.items,value=_ref3.value,onChange2=_ref3.onChange,defaultValue2=_ref3.defaultValue,props=_objectWithoutProperties$1(_ref3,_excluded2$4);var _React$useState=React__default.useState(defaultValue2),_React$useState2=_slicedToArray$1(_React$useState,2),internalValue=_React$useState2[0],setInternalValue=_React$useState2[1];var activeId=!isUndefined$1(value)?value:internalValue;var firstEnabledId=useMemo(function(){var _find;return(_find=find$1(items,function(i){return!i.disabled;}))===null||_find===void 0?void 0:_find.id;},[items]);var combinedSx=useMemo(function(){return sxTabs2(sx);},[sx]);useEffect(function(){if(activeId===void 0){setInternalValue(firstEnabledId);}},[activeId,firstEnabledId]);var _handleSelect=function _handleSelect2(_event,newValue){var selectedId=String(newValue);var itemSelected=find$1(items,function(item2){return item2.id===selectedId;});if(itemSelected!==null&&itemSelected!==void 0&&itemSelected.disabled)return;if(value===void 0)setInternalValue(selectedId);onChange2===null||onChange2===void 0||onChange2(itemSelected);};var _handleTabClick=function _handleTabClick2(item2,event){if(item2.disabled||!item2.href)return;var isCtrlClick=event.ctrlKey||event.metaKey;var isMiddleClick=event.button===1;var isTargetBlank=item2.target==="_blank";if(isCtrlClick||isMiddleClick||isTargetBlank){return;}event.preventDefault();if(item2!==null&&item2!==void 0&&item2.onClick){var _item$onClick;item2===null||item2===void 0||(_item$onClick=item2.onClick)===null||_item$onClick===void 0||_item$onClick.call(item2);}else{setTimeout(function(){window.location.href=item2.href;},300);}};return/* @__PURE__ */jsx$1("div",_objectSpread2$1(_objectSpread2$1({className:clsx(styles$6["tabs"])},props),{},{children:/* @__PURE__ */jsx$1(Tabs$1,{sx:combinedSx,value:activeId,"aria-label":"tabs",onChange:_handleSelect,className:styles$6["list"],children:map$2(items,function(item2){var id=item2.id,href=item2.href,label2=item2.label,disabled2=item2.disabled,tooltipProps=item2.tooltipProps,target=item2.target;item2.onClick;var itemProps=_objectWithoutProperties$1(item2,_excluded3$1);return/* @__PURE__ */jsx$1(Tab,_objectSpread2$1({value:id,sx:sxTab,disableRipple:true,component:"a",disabled:disabled2,label:/* @__PURE__ */jsx$1(TabLabel,{label:label2,tooltipProps:tooltipProps}),onClick:function onClick(e){return _handleTabClick(item2,e);},className:clsx(styles$6["tab"],_defineProperty$2(_defineProperty$2({},styles$6["active"],id===activeId),styles$6["disabled"],disabled2)),href:href,target:target},itemProps),id);})})}));};var sxTabs2=function sxTabs3(sxListStyles){return{padding:0,minHeight:0,"& .MuiTabs-list":_objectSpread2$1({gap:"24px",padding:"0 32px"},sxListStyles||{}),"& .MuiTab-root":{minWidth:"0"},"& .MuiTabs-indicator":{borderRadius:"48px",backgroundColor:getColor("primary","500")}};};var sxTab={padding:0,minHeight:0};var Tabs2=withDebugHandlers(TabsBase,"Tabs");/*! *****************************************************************************
7040
7040
  Copyright (c) Microsoft Corporation.
7041
7041
 
7042
7042
  Permission to use, copy, modify, and/or distribute this software for any