PageSourceSearch

https://my.nsone.net/vendors-7f854005.7a6be6b1.js

js nsone.net collected 2026-10-03 19:08:40 UTC 356,107 bytes, 2 lines download raw bytes

1/*! For license information please see vendors-7f854005.7a6be6b1.js.LICENSE.txt */
2(self.webpackChunk=self.webpackChunk||[]).push([[778],{97451(e,t,n){"use strict";n.d(t,{td4:()=>Ze,nD3:()=>f,AsP:()=>R,kZS:()=>Rl,QpV:()=>L,J53:()=>z,$nd:()=>Ae,Te$:()=>Pe,PqE:()=>Dl,Sc0:()=>bt,$QX:()=>ht,z7k:()=>Rt,VPZ:()=>Ni,a32:()=>In,FaC:()=>On,KXP:()=>wr,sa7:()=>Ar,Pb:()=>jr,Tps:()=>Pr,bQt:()=>ko,OOb:()=>Io,lrV:()=>Jo,tKA:()=>Eo,lrh:()=>ye,fJ8:()=>Xl,msM:()=>oi,dF7:()=>ii,tgi:()=>Er,F9d:()=>li,ssm:()=>ci,Qp5:()=>dl,MCg:()=>hi,lVW:()=>Ot,gE_:()=>di,lRv:()=>ui,xA9:()=>$i,Y9Y:()=>dc,B3R:()=>uc,V8d:()=>mc,wdv:()=>fc,tdE:()=>xc,dJ2:()=>yc,Ksz:()=>gc,bCw:()=>$c,elu:()=>wc,ebS:()=>_c,aKp:()=>Cc,DZT:()=>ra,K0:()=>Oe,b_r:()=>ki,aMY:()=>Mr,OuH:()=>Gn,jeF:()=>El,Wdr:()=>Fn,N_E:()=>P,ckQ:()=>Ii,Rhj:()=>Vn,IUz:()=>Si,Drp:()=>st,OHP:()=>ct,aFV:()=>Ai,cwr:()=>$r,jlY:()=>Xn,rQ0:()=>qn,KFt:()=>Tl,Q7x:()=>Hl,jZg:()=>es,obU:()=>to,XSD:()=>Ea,dKS:()=>is,yAz:()=>us,AMh:()=>xe,hlN:()=>ve,z21:()=>Pc,ZPf:()=>vs,OMs:()=>ys,aaP:()=>ja,zWQ:()=>$s,fI1:()=>wi,vji:()=>kr,wn6:()=>na,l6P:()=>ts,ebT:()=>ns,lS8:()=>rc,f8J:()=>Ec,k$h:()=>Rc,w_:()=>Oc,E$h:()=>Dc,BC4:()=>Ac,OUy:()=>Lc,PuA:()=>ws,rrI:()=>A,oJA:()=>kc,BJc:()=>js,GRJ:()=>Es,Um2:()=>Ds,AVA:()=>Ss,Cvq:()=>Os,XZq:()=>As,r9c:()=>Is,dOG:()=>Lr,ozo:()=>Us,wbY:()=>Ks,O7s:()=>Vs,KpK:()=>Qs,T2N:()=>Zs,XIK:()=>zr,HCI:()=>Hr,GGC:()=>Xr,BFY:()=>Jr,nA6:()=>ea,K3K:()=>aa,Uwq:()=>ia,fZD:()=>da,cwJ:()=>ua,ndF:()=>pa,A0N:()=>ya,Hjg:()=>$a,iHm:()=>Ta,bXy:()=>Ca,e1U:()=>Sa,VbH:()=>Ra,w6V:()=>Ma,tUM:()=>Hs,vwO:()=>Zl,fs1:()=>Js,ksK:()=>ec,Sxu:()=>zc,FAs:()=>tc,AG:()=>lc,E_7:()=>sc,HYS:()=>Sl,lMk:()=>cc,Gff:()=>qe,nXl:()=>Ue,yvu:()=>Ve,pNg:()=>We,gNA:()=>Be,m_M:()=>Ie,XyR:()=>Mc,ZnG:()=>K,uas:()=>V,Mh1:()=>i});var r=n(52638);(0,r.h1)({"enable-css-custom-properties":!0,"enable-css-grid":!0,"enable-v11-release":!0,"enable-v12-release":!1,"enable-experimental-tile-contrast":!1,"enable-tile-contrast":!1,"enable-v12-tile-radio-icons":!1,"enable-v12-structured-list-visible-icons":!1,"enable-v12-dynamic-floating-styles":!1});var a=n(63696);const o=a.createContext("cds");function i(){return a.useContext(o)}var l=n(62540);const s=(0,a.createContext)({disabled:!1}),c=({disabled:e,children:t})=>(0,l.jsx)(s.Provider,{value:{disabled:e},children:t});var d=n(4452),u=n.n(d),p=n(62688),m=n.n(p);function f({align:e="end",children:t,className:n,disabled:r=!1,isFlush:a=!1,ordered:o=!1,size:s,...d}){const p=i(),m=u()(`${p}--accordion`,n,{[`${p}--accordion--${e}`]:e,[`${p}--accordion--${s}`]:s,[`${p}--layout--size-${s}`]:s,[`${p}--accordion--flush`]:a&&"start"!==e});return(0,l.jsx)(c,{disabled:r,children:(0,l.jsx)(o?"ol":"ul",{className:m,...d,children:t})})}f.propTypes={align:m().oneOf(["start","end"]),children:m().node,className:m().string,disabled:m().bool,isFlush:m().bool,ordered:m().bool,size:m().oneOf(["sm","md","lg"])};const b=(0,a.createContext)({direction:"auto",getTextDirection:{current:void 0}}),h=(0,a.forwardRef)(({as:e,children:t,dir:n="auto",...r},o)=>{const i=(0,a.useContext)(b),s={},c=e??"span",d={...i};if(i){const{direction:e,getTextDirection:r}=i;if(r&&r.current){const n=g(t),a=r.current(n);e!==a?(s.dir=a,d.direction=a):"auto"===e&&(s.dir=a)}else e!==n?(s.dir=n,d.direction=n):"auto"===e&&(s.dir=n)}else s.dir=n,d.direction=n;return(0,l.jsx)(b.Provider,{value:d,children:(0,l.jsx)(c,{ref:o,...r,...s,children:t})})});h.displayName="Text",h.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,dir:m().oneOf(["ltr","rtl","auto"])};const g=e=>{if("string"==typeof e)return e;const t=a.Children.map(e,e=>"string"==typeof e?e:null)?.filter(e=>null!==e);return 1===t?.length?t[0]:t},x=()=>{let e=0;return()=>++e},v="undefined"!=typeof window?a.useLayoutEffect:a.useEffect,y=a.createContext(null);function $(){return a.useContext(y)}const w={...a},N=x();let T=!1;const j=w.useId?function(e="id"){const t=$();return`${t?`${t}-`:""}${e}-${w.useId()}`}:function(e="id"){const t=$(),[n,r]=(0,a.useState)(()=>T?`${t?`${t}-`:""}${e}-${N()}`:null);return v(()=>{null===n&&r(`${t?`${t}-`:""}${e}-${N()}`)},[N]),(0,a.useEffect)(()=>{!1===T&&(T=!0)},[]),n};function _(e){const t=j();return e??t}const C=(e,t)=>{if(void 0===t)throw new Error("`warning(condition, message)` requires a warning format argument");e||console.warn("Warning: "+t)},k=new Map,I=(e,t)=>(n,r,a,...o)=>{if(void 0===n[r])return;k.has(a)||k.set(a,new Set);const i=k.get(a);return i&&!i.has(r)&&(i.add(r),C(!1,t||`The prop \`${r}\` has been deprecated for the ${a} component. It will be removed in the next major release`)),e(n,r,a,...o)};var S=n(89068);const E=e=>(0,l.jsx)("button",{type:"button",...e});function R({children:e,className:t="",open:n=!1,onHeadingClick:r,renderExpando:o=E,renderToggle:c,title:d="title",disabled:p,handleAnimationEnd:m,"aria-label":f,...b}){const[g,x]=(0,a.useState)(n),v=(0,a.useRef)(n),y=(0,a.useContext)(s),$="boolean"==typeof p?p:y.disabled,w=j("accordion-item"),N=i(),T=u()({[`${N}--accordion__item`]:!0,[`${N}--accordion__item--active`]:g&&!$,[`${N}--accordion__item--disabled`]:$,[t]:!!t}),_=c||o,C=a.useCallback(e=>{e&&g&&(e.style.maxBlockSize="")},[g]);return(0,a.useEffect)(()=>{n!==v.current&&(x(n),v.current=n)},[n]),(0,l.jsxs)("li",{className:T,...b,children:[(0,l.jsxs)(_,{disabled:$,"aria-controls":w,"aria-expanded":g,"aria-label":f,className:`${N}--accordion__heading`,onClick:function(e){const t=!g;x(t),r&&r({isOpen:t,event:e})},type:"button",children:[(0,l.jsx)(S.c_,{className:`${N}--accordion__arrow`}),(0,l.jsx)(h,{as:"div",className:`${N}--accordion__title`,children:d})]}),(0,l.jsx)("div",{ref:C,className:`${N}--accordion__wrapper`,onTransitionEnd:function(e){m&&m(e)},children:(0,l.jsx)("div",{id:w,className:`${N}--accordion__content`,children:e})})]})}R.propTypes={children:m().node,className:m().string,disabled:m().bool,"aria-label":m().string,onClick:m().func,onHeadingClick:m().func,open:m().bool,renderExpando:I(m().func,"The `renderExpando` prop has been deprecated and will be removed in the next major release of Carbon. Use the `renderToggle` prop instead."),renderToggle:m().func,title:m().node};const O=[.973051493507435,.15334737213558558,.5671034553053769];function D(e,t,n){return Math.floor(O[n%3]*(t-e+1))+e}const A=({paragraph:e=!1,lineCount:t=3,width:n="100%",heading:r=!1,className:o="",...s})=>{const c=i(),d=u()({[`${c}--skeleton__text`]:!0,[`${c}--skeleton__heading`]:r,[o]:o}),p=parseInt(n,10),m=n.includes("px"),f=n.includes("%");let b=1;e&&(b=t);const h=(0,a.useRef)([]);v(()=>{h.current.map((t,r)=>{const a=D(0,75,r)+"px",o=D(Math.max(p-75,0),p,r)+"px";t&&(t.style.width=f&&e?`calc(${n} - ${a})`:m&&e?o:n)})},[b,e,h,n,p,f,m]);const g=[];for(let e=0;e<b;e++)g.push((0,l.jsx)("p",{className:d,ref:e=>{h.current=[...h.current,e]},...s},e));return 1!==b?(0,l.jsx)("div",{children:g}):(0,l.jsx)(l.Fragment,{children:g})};A.propTypes={className:m().string,heading:m().bool,lineCount:m().number,paragraph:m().bool,width:m().string};const L=(0,a.forwardRef)((e,t)=>{const{"aria-label":n,children:r,className:a,noTrailingSlash:o,size:s,...c}=e,d=i(),p=u()({[`${d}--breadcrumb`]:!0,[`${d}--breadcrumb--no-trailing-slash`]:o,[`${d}--breadcrumb--sm`]:"sm"===s});return(0,l.jsx)("nav",{className:a,"aria-label":n||"Breadcrumb",ref:t,...c,children:(0,l.jsx)("ol",{className:p,children:r})})});L.displayName="Breadcrumb",L.propTypes={"aria-label":m().string,children:m().node,className:m().string,noTrailingSlash:m().bool,size:m().oneOf(["sm","md"])};const M=a.forwardRef(({as:e,children:t,className:n,href:r,disabled:a=!1,inl
2ine:o=!1,visited:s=!1,renderIcon:c,size:d,target:p,...m},f)=>{const b=i(),h={className:u()(`${b}--link`,n,{[`${b}--link--disabled`]:a,[`${b}--link--inline`]:o,[`${b}--link--visited`]:s,[`${b}--link--${d}`]:d,[`${b}--link--icon`]:c}),rel:"_blank"===p?"noopener":void 0,target:p};a?(h.role="link",h["aria-disabled"]=!0):h.href=r;const g=e??"a";return(0,l.jsxs)(g,{ref:f,...h,...m,onClick:e=>{a?(e.preventDefault(),e.stopPropagation()):m.onClick&&m.onClick(e)},children:[t,!o&&c&&(0,l.jsx)("span",{className:`${b}--link__icon`,children:(0,l.jsx)(c,{})})]})});M.displayName="Link";const P=M;P.propTypes={as:m().elementType,children:m().node,className:m().string,disabled:m().bool,href:m().string,inline:m().bool,renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(["sm","md","lg"]),visited:m().bool};var B=P,F=n(45672);const z=(0,a.forwardRef)((e,t)=>{const{"aria-current":n,children:r,className:o="",href:s,isCurrentPage:c,...d}=e,p=i(),m=u()({[`${p}--breadcrumb-item`]:!0,[`${p}--breadcrumb-item--current`]:c&&"page"!==n,[o]:!!o}),f=(0,a.isValidElement)(r)?r:null,b=f?.type;if(f&&"string"!=typeof f.type&&b?.displayName?.includes("OverflowMenu")){const e=(0,l.jsx)(F.aI,{className:`${p}--overflow-menu__icon`});return(0,l.jsx)("li",{className:m,...d,children:a.cloneElement(f,{menuOptionsClass:`${p}--breadcrumb-menu-options`,menuOffset:{top:10,left:59},renderIcon:()=>e})})}return"string"==typeof r?(0,l.jsx)("li",{className:m,ref:t,...d,children:s?(0,l.jsx)(B,{href:s,"aria-current":n||c,children:r}):(0,l.jsx)(h,{"aria-current":n||c,className:`${p}--link`,children:r})}):(0,l.jsx)("li",{className:m,ref:t,...d,children:f?(0,a.cloneElement)(f,{"aria-current":n,className:u()(`${p}--link`,f.props.className)}):r})});z.displayName="BreadcrumbItem",z.propTypes={"aria-current":m().oneOfType([m().bool,m().oneOf(["false","true","page","step","location","date","time"])]),children:m().node,className:m().string,href:m().string,isCurrentPage:m().bool};const q=(0,a.createContext)(r.gH),H={enableV12Release:"enable-v12-release",enableV12TileDefaultIcons:"enable-v12-tile-default-icons",enableV12TileRadioIcons:"enable-v12-tile-radio-icons",enableV12Overflowmenu:"enable-v12-overflowmenu",enableTreeviewControllable:"enable-treeview-controllable",enableExperimentalFocusWrapWithoutSentinels:"enable-experimental-focus-wrap-without-sentinels",enableFocusWrapWithoutSentinels:"enable-focus-wrap-without-sentinels",enableDialogElement:"enable-dialog-element",enableV12DynamicFloatingStyles:"enable-v12-dynamic-floating-styles",enableEnhancedFileUploader:"enable-enhanced-file-uploader",enablePresence:"enable-presence"},K=({children:e,flags:t,enableV12Release:n,enableV12TileDefaultIcons:o,enableV12TileRadioIcons:i,enableV12Overflowmenu:s,enableTreeviewControllable:c,enableExperimentalFocusWrapWithoutSentinels:d,enableFocusWrapWithoutSentinels:u,enableDialogElement:p,enableV12DynamicFloatingStyles:m,enableEnhancedFileUploader:f,enablePresence:b})=>{const h=(0,a.useContext)(q),g=(0,a.useMemo)(()=>{const e={enableV12Release:n,enableV12TileDefaultIcons:o,enableV12TileRadioIcons:i,enableV12Overflowmenu:s,enableTreeviewControllable:c,enableExperimentalFocusWrapWithoutSentinels:d,enableFocusWrapWithoutSentinels:u,enableDialogElement:p,enableV12DynamicFloatingStyles:m,enableEnhancedFileUploader:f,enablePresence:b},a={};for(const[t,n]of Object.entries(H)){const r=e[t];void 0!==r&&(a[n]=r)}t&&Object.assign(a,t);const l=(0,r.Ds)(a);return l.mergeWithScope(h),l},[n,o,i,s,c,d,u,p,m,f,b,t,h]);return(0,l.jsx)(q.Provider,{value:g,children:e})};K.propTypes={children:m().node,flags:I(m().objectOf(m().bool),"The `flags` prop for `FeatureFlag` has been deprecated. Please run the `featureflag-deprecate-flags-prop` codemod to migrate to individual boolean props.npx @carbon/upgrade migrate featureflag-deprecate-flags-prop --write"),enableV12Release:m().bool,enableV12TileDefaultIcons:m().bool,enableV12TileRadioIcons:m().bool,enableV12Overflowmenu:m().bool,enableTreeviewControllable:m().bool,enableExperimentalFocusWrapWithoutSentinels:m().bool,enableFocusWrapWithoutSentinels:m().bool,enableDialogElement:m().bool,enableV12DynamicFloatingStyles:m().bool,enableEnhancedFileUploader:m().bool,enablePresence:m().bool};const V=e=>{const t=(0,a.useContext)(q).enabled(e);return(0,r.zV)(e,t),t},W={},U=(e,t,n)=>(r,a,o,...i)=>{if(void 0===r[a])return null;if(!W[o]||!W[o][a]){W[o]={...W[o],[a]:!0};const e=r[a],i=n?n(e):null;if(t&&!t.includes(e)){const r=n?`"${e}" is a deprecated value for the "${a}" prop on the "${o}" component. Use "${i}" instead. "${e}" will be removed in the next major release.`:`"${e}" is a deprecated value for the "${a}" prop on the "${o}" component. Allowed values is/are: ${t.join(", ")}.  "${e}" will be removed in the next major release. `;C(!1,r)}}return e(r,a,o,...i)},G=(e,t)=>(0,a.isValidElement)(e)&&e.type===t,Y=e=>{const t=(0,a.useMemo)(()=>e,e);return(0,a.useCallback)(e=>{t.forEach(t=>{"function"==typeof t?t(e):t&&(t.current=e)})},[t])},Q=(e,t,n)=>{const r=(0,a.useRef)(null);(0,a.useEffect)(()=>{r.current=n},[n]),(0,a.useEffect)(()=>{const n="current"in e?e.current:e;if(!n)return;const a=e=>{r.current&&r.current(e)};return n.addEventListener(t,a),()=>{n.removeEventListener(t,a)}},[e,t])},Z=(e,t)=>{const n=(0,a.useRef)(null);(0,a.useEffect)(()=>{n.current=t},[t]),(0,a.useEffect)(()=>{const t=e=>{n.current&&n.current(e)};return window.addEventListener(e,t),()=>{window.removeEventListener(e,t)}},[e])},X={key:"Tab",which:9,keyCode:9,code:"Tab"},J={key:"Enter",which:13,keyCode:13,code:"Enter"},ee={key:["Escape","Esc"],which:27,keyCode:27,code:"Esc"},te={key:" ",which:32,keyCode:32,code:"Space"},ne={key:"End",which:35,keyCode:35,code:"Numpad1"}
2,re={key:"Home",which:36,keyCode:36,code:"Numpad7"},ae={key:"ArrowLeft",which:37,keyCode:37,code:"ArrowLeft"},oe={key:"ArrowUp",which:38,keyCode:38,code:"ArrowUp"},ie={key:"ArrowRight",which:39,keyCode:39,code:"ArrowRight"},le={key:"ArrowDown",which:40,keyCode:40,code:"ArrowDown"},se={key:"Delete",which:8,keyCode:8,code:"ArrowDecimal"},ce=(e,t)=>{for(let n=0;n<t.length;n++)if(de(e,t[n]))return!0;return!1},de=(e,{key:t,which:n,keyCode:r,code:a})=>"string"==typeof e?e===t:"number"==typeof e?e===n||e===r:e.key&&Array.isArray(t)?t.includes(e.key):e.key===t||e.which===n||e.keyCode===r||e.code===a,ue="\n  a[href], area[href], input:not([disabled]):not([tabindex='-1']),\n  button:not([disabled]):not([tabindex='-1']),select:not([disabled]):not([tabindex='-1']),\n  textarea:not([disabled]):not([tabindex='-1']),\n  iframe, object, embed, *[tabindex]:not([tabindex='-1']):not([disabled]), *[contenteditable=true]\n",pe={"top-left":"top-start","top-right":"top-end","bottom-left":"bottom-start","bottom-right":"bottom-end","left-bottom":"left-end","left-top":"left-start","right-bottom":"right-end","right-top":"right-start"},me=e=>pe[e]??e;var fe=n(43407),be=n(94621),he=n(38889);const ge=a.createContext({setFloating:{current:null},caretRef:{current:null},autoAlign:null}),xe=a.forwardRef(function({isTabTip:e,align:t=(e?"bottom-start":"bottom"),as:n="span",autoAlign:r=!1,autoAlignBoundary:o,backgroundToken:s="layer",caret:c=!e,className:d,children:p,border:m=!1,dropShadow:f=!0,highContrast:b=!1,onRequestClose:h,open:g,alignmentAxisOffset:x,...y},$){const w=i(),N=(0,a.useRef)(null),T=(0,a.useRef)(null),j=(0,a.useRef)(null),_=V("enable-v12-dynamic-floating-styles")||r,C=V("enable-v12-release"),k=!C&&c,I=(0,a.useRef)(!1),S=e=>{if(!j.current)return!1;const t=e instanceof Element&&e.closest(".flatpickr-calendar");if(!t)return!1;const n=j.current.querySelectorAll("input");for(const e of n){if(!("_flatpickr"in e))continue;const n=e._flatpickr;if(n&&"object"==typeof n&&"calendarContainer"in n&&n.calendarContainer===t)return!0}return!1};let E=me(t);Q(j,"mousedown",e=>{const t=e.target;I.current=D.floating.current?.contains(t)||!1,I.current&&setTimeout(()=>{I.current=!1},0)}),Q(j,"focusout",e=>{const t=e.relatedTarget;if(t){if(t&&!j.current?.contains(t)){if(S(t))return;const e=!_||!D.floating.current||!D.floating.current.contains(t),n=t&&j.current&&t.contains(j.current);e&&!n&&h?.()}}else{if(I.current)return void(I.current=!1);h?.()}}),Z("keydown",e=>{if(!g||"Escape"!==e.key||e.defaultPrevented)return;const t=e.target;t instanceof Element&&t.closest(`.${w}--popover-content`)===D.floating.current&&(h?.(),(j.current?.querySelector(ue))?.focus())}),Z("click",({target:e})=>{g&&e instanceof Node&&!j.current?.contains(e)&&!S(e)&&h?.()});const R=a.Children.toArray(p).some(e=>e?.props?.className?.includes("slug")||e?.props?.className?.includes("ai-label"))?7:6,O=(0,a.useRef)({offset:10,caretHeight:R});v(()=>{if(k&&j.current){const e=window.getComputedStyle(j.current,null),t=e.getPropertyValue(`--${w}-popover-offset`),n=e.getPropertyValue(`--${w}-popover-caret-height`);t&&(O.current.offset=t.includes("px")?1*Number(t.split("px",1)[0]):16*Number(t.split("rem",1)[0])),n&&(O.current.caretHeight=n.includes("px")?1*Number(n.split("px",1)[0]):16*Number(n.split("rem",1)[0]))}});const{refs:D,floatingStyles:A,placement:L,middlewareData:M,elements:P,update:B}=(0,fe.we)(_?{placement:E,strategy:"fixed",middleware:[(0,be.cY)(e?{mainAxis:C?4:0}:{alignmentAxis:x,mainAxis:k?O?.current?.offset:4}),r&&(0,be.UU)({fallbackPlacements:e?E.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]:E.includes("bottom")?["bottom","bottom-start","bottom-end","right","right-start","right-end","left","left-start","left-end","top","top-start","top-end"]:["top","top-start","top-end","left","left-start","left-end","right","right-start","right-end","bottom","bottom-start","bottom-end"],fallbackStrategy:"initialPlacement",fallbackAxisSideDirection:"start",boundary:o}),(0,be.UE)({element:T,padding:C?3:16}),r&&(0,be.jD)()]}:{});(0,a.useEffect)(()=>
2{if(_)return g&&P.reference&&P.floating?(0,he.ll)(P.reference,P.floating,B):void 0},[_,g,P,B]);const F=(0,a.useMemo)(()=>({floating:N,setFloating:D.setFloating,caretRef:T,autoAlign:r}),[D.setFloating,r]);e&&(["bottom-start","bottom-end"].includes(E)||(E="bottom-start")),(0,a.useEffect)(()=>{if(_){const e={...A,visibility:M.hide?.referenceHidden?"hidden":"visible"};if(Object.keys(e).forEach(t=>{D.floating.current&&(D.floating.current.style[t]=e[t])}),k&&M&&M.arrow&&T?.current){const{x:e,y:t}=M.arrow,n={top:"bottom",right:"left",bottom:"top",left:"right"}[L.split("-")[0]];T.current.style.left=null!=e?`${e}px`:"",T.current.style.top=null!=t?`${t}px`:"",T.current.style.right="",T.current.style.bottom="",n&&(T.current.style[n]=-O?.current?.caretHeight+"px")}}},[A,D.floating,_,M,L,k]);const z=Y([$,j]),q=r&&L!==E?L:E,H=u()({[`${w}--popover-container`]:!0,[`${w}--popover--caret`]:k,[`${w}--popover--drop-shadow`]:f,[`${w}--popover--border`]:m,[`${w}--popover--high-contrast`]:b,[`${w}--popover--open`]:g,[`${w}--popover--auto-align ${w}--autoalign`]:_,[`${w}--popover--${q}`]:!0,[`${w}--popover--tab-tip`]:e,[`${w}--popover--background-token__background`]:"background"===s&&!b},d),K=a.Children.map(p,t=>{const n=t,r="ToggletipButton"===n?.type?.displayName,o="ToggletipContent"===n?.type?.displayName,i=G(n,ve),l="button"===n?.type,s=_&&r,c=_&&!o&&!i;if(a.isValidElement(n)&&(l||s||c)){const t=(n?.props)?.className,r=(n?.props).ref,o=u()(`${w}--popover--tab-tip__button`,t);return a.cloneElement(n,{className:e&&"button"===n?.type?o:t||"",ref:e=>{_&&!i&&D.setReference(e),"function"==typeof r?r(e):null!=r&&(r.current=e)}})}return n});return(0,l.jsx)(ge.Provider,{value:F,children:(0,l.jsx)(n,{...y,className:H,ref:z,children:_||e?K:p})})});xe.displayName="Popover",xe.propTypes={align:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),alignmentAxisOffset:m().number,as:m().oneOfType([m().string,m().elementType]),autoAlign:m().bool,backgroundToken:m().oneOf(["layer","background"]),autoAlignBoundary:m().oneOfType([m().oneOf(["clippingAncestors"]),m().elementType,m().arrayOf(m().elementType),m().exact({x:m().number.isRequired,y:m().number.isRequired,width:m().number.isRequired,height:m().number.isRequired})]),caret:I(m().bool,"The `caret` prop has been deprecated and will be removed in the next major release of Carbon."),border:m().bool,children:m().node,className:m().string,dropShadow:m().bool,highContrast:m().bool,isTabTip:m().bool,onRequestClose:m().func,open:m().bool.isRequired};const ve=(0,a.forwardRef)((e,t)=>{const{className:n,children:r,...o}=e,s=i(),{setFloating:c,caretRef:d,autoAlign:p}=a.useContext(ge),m=Y([c,t]),f=V("enable-v12-dynamic-floating-styles")||p;return(0,l.jsxs)("span",{...o,className:`${s}--popover`,children:[(0,l.jsxs)("span",{className:u()(`${s}--popover-content`,n),ref:m,children:[r,f&&(0,l.jsx)("span",{className:u()({[`${s}--popover-caret`]:!0,[`${s}--popover--auto-align`]:!0}),ref:d})]}),!f&&(0,l.jsx)("span",{className:u()({[`${s}--popover-caret`]:!0}),ref:d})]})});ve.displayName="PopoverContent",ve.propTypes={children:m().node,className:m().string};const ye=({align:e="bottom",autoAlign:t,className:n,children:r,definition:o,defaultOpen:s=!1,id:c,openOnHover:d,tooltipText:p,triggerClassName:m,...f})=>{const[b,h]=(0,a.useState)(s),g=i(),x=_(c);return(0,l.jsxs)(xe,{align:e,className:n,autoAlign:t,dropShadow:!1,highContrast:!0,onMouseLeave:()=>{h(!1)},onMouseEnter:()=>{d&&h(!0)},onFocus:()=>{h(!0)},open:b,children:[(0,l.jsx)("button",{...f,className:u()(`${g}--definition-term`,m),"aria-controls":x,"aria-describedby":x,"aria-expanded":b,onBlur:()=>{h(!1)},onMouseDown:e=>{0===e.button&&h(!b)},onKeyDown:function(e){de(e,J)||de(e,te)?(e.preventDefault(),h(!b)):b&&de(e,ee)&&(e.stopPropagation(),h(!1))},type:"button",children:r}),(0,l.jsx)(ve,{className:`${g}--definition-tooltip`,id:x,children:p??o})]})};function $e(e){const[t,n]=(0,a.useState)(e),r=(0,a.useRef)(null),o=(0,a.useCallback)((e,t=0)=>{window.clearTimeout(r.current??void 0),r.current=null,0!==t?r.current=window.setTimeout(()=>{n(e),r.current=null},t):n(e)},[]);return(0,a.useEffect)(()=>()=>{window.clearTimeout(r.current??void 0)},[]),[t,o]}ye.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","to
2p-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),autoAlign:m().bool,children:m().node.isRequired,className:m().string,defaultOpen:m().bool,definition:m().node.isRequired,id:m().string,openOnHover:m().bool,tooltipText:I(m().node,"The tooltipText prop has been deprecated. Please use the `definition` prop instead."),triggerClassName:m().string};const we=(e,t="component should have no interactive child nodes",{shouldThrow:n=!0}={})=>{(0,a.useEffect)(()=>{const{current:r}=e,a=r?Te(r):null;if(a){const e=`${n?"Error":"Warning"}: ${t}.\n\nInstead found: ${a.outerHTML}`;if(n)throw console.error(e),new Error(e);console.warn(e)}},[t,e,n])},Ne=(e,t)=>{if(t(e))return e;for(const n of e.children){if(!(n instanceof HTMLElement))continue;const e=Ne(n,t);if(e)return e}return null},Te=e=>Ne(e,Ce),je=e=>{const t=e.getAttribute("role");return null!==t&&""!==t},_e=e=>Ne(e,je),Ce=e=>{if(e.tabIndex<0)return!1;if((e instanceof HTMLButtonElement||e instanceof HTMLInputElement||e instanceof HTMLSelectElement||e instanceof HTMLTextAreaElement)&&e.disabled)return!1;switch(e.nodeName){case"A":return e instanceof HTMLAnchorElement&&!!e.href&&"ignore"!==e.rel;case"INPUT":return e instanceof HTMLInputElement&&"hidden"!==e.type;default:return!0}},ke=new Set(["mouseup","touchend","touchcancel"]),Ie=a.forwardRef(({as:e,align:t="top",className:n,children:r,label:o,description:s,enterDelayMs:c=100,leaveDelayMs:d=300,defaultOpen:p=!1,closeOnActivation:m=!1,dropShadow:f=!1,highContrast:b=!0,...h},g)=>{const x=(0,a.useRef)(null),[y,$]=$e(p),[w,N]=(0,a.useState)(!1),[T,_]=(0,a.useState)(!1),[C,k]=(0,a.useState)(!1),I=j("tooltip"),S=i(),E=a.Children.only(r),{"aria-labelledby":R,"aria-describedby":O}=E?.props??{},D=!!o,A={onFocus:()=>!T&&$(!0),onBlur:()=>{$(!1),_(!1)},onClick:()=>m&&$(!1),onMouseEnter:M,onMouseLeave:P,onMouseDown:function(){_(!0),B()},onMouseMove:function(e){1===e.buttons?N(!0):N(!1)},onTouchStart:B,"aria-labelledby":R??(D?I:void 0),"aria-describedby":O??(D?void 0:I)},L=(0,a.useCallback)(e=>{y&&de(e,ee)&&(e.stopPropagation(),$(!1)),y&&m&&(de(e,J)||de(e,te))&&$(!1)},[m,y,$]);function M(){h?.onMouseEnter||(k(!0),$(!0,c))}function P(){k(!1),w||$(!1,d)}function B(){N(!0)}v(()=>{if(y)return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)};function e(e){de(e,ee)&&L(e)}},[y,L]);const F=(0,a.useCallback)(()=>{N(!1),C||$(!1,d)},[C,d,$]);return we(x,"The Tooltip component must have no interactive content rendered by the`label` or `description` prop"),(0,a.useEffect)(()=>(w&&ke.forEach(e=>{document.addEventListener(e,F)}),()=>{ke.forEach(e=>{document.removeEventListener(e,F)})}),[w,F]),(0,l.jsxs)(xe,{as:e,ref:g,...h,align:t,className:u()(`${S}--tooltip`,n),dropShadow:f,highContrast:b,onKeyDown:L,onMouseLeave:P,open:y,children:[(0,l.jsx)("div",{className:`${S}--tooltip-trigger__wrapper`,children:void 0!==E?a.cloneElement(E,{...A,...function(e){const t=Object.keys(A).filter(e=>e.startsWith("on")),n={};return t.forEach(t=>{n[t]=n=>{A[t](n),e?.[t]&&e?.[t](n)}}),n}(E.props)}):null}),(0,l.jsx)(ve,{"aria-hidden":y?"false":"true",className:`${S}--tooltip-content`,id:I,onMouseEnter:M,role:"tooltip",children:o||s})]})});Ie.displayName="Tooltip",Ie.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,description:m().node,dropShadow:m().bool,enterDelayMs:m().number,highContrast:m().bool,label:m().node,leaveDelayMs:m().number};const Se=a.forwardRef(function({as:e,children:t,className:n,dangerDescription:r="",disabled:o=!1,hasIconOnly:s=!1,href:c,iconDescription:d,isExpressive:p=!1,isSelected:m,kind:f="primary",onBlur:b,onClick:h,onFocus:g,onMouseEnter:x,onMouseLeave:v,renderIcon:y,size:$,tabIndex:w,type:N="button",...T},_){const C=i(),k={tabIndex:w,className:u()(n,{[`${C}--btn`]:!0,[`${C}--btn--xs`]:"xs"===$&&!p,[`${C}--btn--sm`]:"sm"===$&&!p,[`${C}--btn--md`]:"md"===$&&!p,[`${C}--btn--lg`]:"lg"===$&&!p,[`${C}--btn--xl`]:"xl"===$,[`${C}
2--btn--2xl`]:"2xl"===$,[`${C}--layout--size-${$}`]:$,[`${C}--btn--${f}`]:f,[`${C}--btn--disabled`]:o,[`${C}--btn--expressive`]:p,[`${C}--btn--icon-only`]:s,[`${C}--btn--selected`]:s&&m&&"ghost"===f}),ref:_},I=y?(0,l.jsx)(y,{"aria-label":d,className:`${C}--btn__icon`,"aria-hidden":"true"}):null,S=["danger","danger--tertiary","danger--ghost"].includes(f)&&Boolean(r);let E="button";const R=j("danger-description"),{"aria-pressed":O,"aria-describedby":D}=T;let A={disabled:o,type:N,"aria-describedby":S?R:D||void 0,"aria-pressed":O??(s&&"ghost"===f?m:void 0)};const L={href:c};let M=null;return S&&(M=(0,l.jsx)("span",{id:R,className:`${C}--visually-hidden`,children:r})),e?(E=e,A={...A,...L}):c&&!o&&(E="a",A=L),a.createElement(E,{onMouseEnter:x,onMouseLeave:v,onFocus:g,onBlur:b,onClick:h,...T,...k,...A},M,t,I)}),Ee=(0,a.forwardRef)((e,t)=>{const{className:n,count:r,...a}=e,o=i(),s=u()(`${o}--badge-indicator`,n,{[`${o}--badge-indicator--count`]:r}),c=r&&r>999?"999+":r;return(0,l.jsx)("div",{className:s,ref:t,...a,children:c})});Ee.propTypes={className:m().string,count:m().number,id:m().string};const Re=["primary","secondary","ghost","tertiary"],Oe=(0,a.forwardRef)(({align:e,autoAlign:t=!1,badgeCount:n,children:r,className:a,closeOnActivation:o=!0,defaultOpen:s=!1,disabled:c,dropShadow:d=!1,enterDelayMs:p=100,highContrast:m=!0,kind:f,label:b,leaveDelayMs:h=100,wrapperClasses:g,size:x,isSelected:v,...y},$)=>{const w=i(),N=u()(g,`${w}--icon-tooltip`,{[`${w}--icon-tooltip--disabled`]:c});!n||"ghost"===f&&"lg"===x||console.warn("The prop BadgeCount must be used with hasIconOnly=true, kind='ghost' and size='lg'");const T=j("badge-indicator");return(0,l.jsx)(Ie,{align:e,autoAlign:t,closeOnActivation:o,className:N,defaultOpen:s,dropShadow:d,enterDelayMs:p,highContrast:m,label:b,leaveDelayMs:h,children:(0,l.jsxs)(Se,{...y,disabled:c,kind:f,ref:$,size:x,isSelected:v,hasIconOnly:!0,className:a,"aria-describedby":y["aria-describedby"]||n&&T,children:[r,!c&&void 0!==n&&(0,l.jsx)(Ee,{id:T,count:n>0?n:void 0})]})})});Oe.displayName="IconButton",Oe.propTypes={align:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),autoAlign:m().bool,badgeCount:m().number,href:m().string,children:m().node,className:m().string,closeOnActivation:m().bool,defaultOpen:m().bool,dropShadow:m().bool,disabled:m().bool,enterDelayMs:m().number,isSelected:m().bool,highContrast:m().bool,kind:m().oneOf(Re),label:m().node.isRequired,leaveDelayMs:m().number,rel:m().string,size:m().oneOf(["xs","sm","md","lg"]),target:m().string,wrapperClasses:m().string};const De=["primary","secondary","danger","ghost","danger--primary","danger--ghost","danger--tertiary","tertiary"],Ae=a.forwardRef((e,t)=>{const{as:n,autoAlign:r=!1,children:a,hasIconOnly:o=!1,tooltipHighContrast:i=!0,tooltipDropShadow:s=!1,iconDescription:c,kind:d="primary",onBlur:u,onClick:p,onFocus:m,onMouseEnter:f,onMouseLeave:b,renderIcon:h,size:g,tooltipAlignment:x="center",tooltipPosition:v="top",...y}=e;!h||a||c||console.error("Button: renderIcon property specified without also providing an iconDescription property. This may impact accessibility for screen reader users.");const $=h?(0,l.jsx)(h,{}):null;if(function(e){return!0===e}(o)){let e;return"top"!==v&&"bottom"!==v||("center"===x&&(e=v),"end"===x&&(e=`${v}-end`),"start"===x&&(e=`${v}-start`)),"right"!==v&&"left"!==v||(e=v),(0,l.jsx)(Oe,{...y,ref:t,as:n,align:e,label:c,kind:d,size:g,highContrast:i,dropShadow:s,onMouseEnter:f,onMouseLeave:b,onFocus:m,onBlur:u,autoAlign:r,onClick:p,renderIcon:$?null:h,children:$??a})}{const{autoAlign:n,tooltipAlignment:r,tooltipDropShadow:a,tooltipHighContrast:o,tooltipPosition:i,...s}=e;return(0,l.jsx)(Se,{ref:t,...s})}});Ae.displayName="Button",Ae.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),autoAlign:m().bool,children:m().node,className:m().string,dangerDescription:m().string,disabled:m().bool,hasIconOnly:m().bool,href:m().string,iconDescription:e=>!e.renderIcon||e.children||e.iconDescription?null:new Error("renderIcon property specified without also providing an iconDescription property."),isExpressive:m().bool,isSelected:m().bool,kind:(e,t,n)=>{const{hasIconOnly:r}=e,a=r?Re:De;return void 0===e[t]||a.includes(e[t])?null:new Error(`Invalid prop \`${t}\` supplied to \`${n}\`. Expected one of ${a.join(", ")}.`)},onBlur:m().func,onClick:m().func,onFocus:m().func,onMouseEnter:m().func,onMouseLeave:m().func,rel:m().string,renderIcon:m().oneOfType([m().func,m().object]),role:m().string,
2size:m().oneOf(["xs","sm","md","lg","xl","2xl"]),tabIndex:m().number,target:m().string,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipDropShadow:m().bool,tooltipHighContrast:m().bool,tooltipPosition:m().oneOf(["top","right","bottom","left"]),type:m().oneOf(["button","reset","submit"])};const Le=e=>({ghost:1,"danger--ghost":2,tertiary:3,danger:5,primary:6}[e]??4),Me=e=>a.isValidElement(e)&&e.props&&"object"==typeof e.props?e.props.kind??"primary":"primary",Pe=(0,a.forwardRef)((e,t)=>{const{children:n,className:r,fluid:o,stacked:s,...c}=e,d=i(),p=(0,a.useRef)(null),[m,f]=(0,a.useState)(!1),[b,h]=(0,a.useState)(a.Children.toArray(n));v(()=>{const e=()=>{let e=s||!1;return p&&p.current&&(e="column"===window.getComputedStyle(p.current)?.getPropertyValue?.("--flex-direction")),e};if(f(e()),!p.current)return;const t=new ResizeObserver(()=>{f(e())});return t.observe(p.current),()=>t.disconnect()},[o,s]),(0,a.useEffect)(()=>{const e=a.Children.toArray(n);e.sort((e,t)=>(Le(Me(e))-Le(Me(t)))*(m?-1:1)),h(e)},[n,m]);const g=u()(r,`${d}--btn-set`,{[`${d}--btn-set--stacked`]:m,[`${d}--btn-set--fluid`]:o});return(0,l.jsx)("div",{...c,className:g,ref:t,children:o?(0,l.jsx)("div",{ref:p,className:u()(`${d}--btn-set__fluid-inner`,{[`${d}--btn-set__fluid-inner--auto-stack`]:!0}),children:b}):n})});function Be({as:e="span",children:t,className:n,...r}){const a=i(),o=u()(`${a}--toggletip-label`,n);return(0,l.jsx)(e,{className:o,...r,children:t})}Pe.displayName="ButtonSet",Pe.propTypes={children:m().node,className:m().string,fluid:m().bool,stacked:m().bool},Be.propTypes={as:m().elementType,children:m().node,className:m().string};const Fe=a.createContext(void 0);function ze(){return(0,a.useContext)(Fe)}function qe({align:e,as:t,autoAlign:n,className:r,children:o,defaultOpen:s=!1,...c}){const d=(0,a.useRef)(null),[p,m]=(0,a.useState)(s),f=i(),b=j(),h=u()(`${f}--toggletip`,r,{[`${f}--toggletip--open`]:p,[`${f}--autoalign`]:n}),g={toggle:()=>{m(!p)},close:()=>{m(!1)}},x={buttonProps:{"aria-expanded":p,"aria-controls":b,"aria-describedby":p?b:void 0,onClick:g.toggle},contentProps:{id:b},onClick:{onClick:g.toggle}};return Z("blur",()=>{p&&g.close()}),(0,a.useEffect)(()=>{if(!p||!d.current)return;const e=d.current.ownerDocument||document,t="PointerEvent"in window?"pointerdown":"mousedown",n=e=>{const{current:t}=d;if(!t)return;const n=e=>e instanceof Node&&t.contains(e);n(e.target)||"function"==typeof e.composedPath&&e.composedPath().some(n)||m(!1)},r={capture:!0};return e.addEventListener(t,n,r),()=>{e.removeEventListener(t,n,r)}},[p]),(0,l.jsx)(Fe.Provider,{value:x,children:(0,l.jsx)(xe,{align:e,as:t,caret:!0,className:h,dropShadow:!1,highContrast:!0,open:p,onKeyDown:e=>{if(p&&de(e,ee)){e.stopPropagation(),g.close();const t=d.current?.children[0];t instanceof HTMLButtonElement&&t.focus()}},onBlur:e=>{p&&null===e.relatedTarget||e.currentTarget.contains(e.relatedTarget)||g.close()},ref:d,autoAlign:n,...c,children:o})})}const{open:He,...Ke}=xe.propTypes??{};qe.propTypes={...Ke,defaultOpen:m().bool};const Ve=(0,a.forwardRef)(function({children:e,className:t,label:n="Show information",as:r,...a},o){const s=ze(),c=i(),d=u()(`${c}--toggletip-button`,t),p=r??"button";return"button"!==p?(0,l.jsx)(p,{...s?.onClick,className:d,...a,children:e}):(0,l.jsx)("button",{...s?.buttonProps,"aria-label":n,type:"button",className:d,ref:o,...a,children:e})});Ve.propTypes={children:m().node,className:m().string,label:m().string},Ve.displayName="ToggletipButton";const We=(0,a.forwardRef)((e,t)=>{const{children:n,className:r}=e,a=ze(),o=i();return(0,l.jsx)(ve,{className:r,...a?.contentProps,ref:t,children:(0,l.jsx)("div",{className:`${o}--toggletip-content`,children:n})})});function Ue({children:e,className:t}){const n=i(),r=u()(`${n}--toggletip-actions`,t);return(0,l.jsx)("div",{className:r,children:e})}We.propTypes={children:m().node,className:m().string}
2,We.displayName="ToggletipContent",Ue.propTypes={children:m().node,className:m().string};var Ge=n(9491);const Ye=({className:e,children:t})=>{const n=i(),r=u()(e,{[`${n}--ai-label-content`]:!0,[`${n}--ai-label-content--with-actions`]:!1});return(0,l.jsx)(We,{className:r,children:t})};Ye.displayName="AILabelContent",Ye.propTypes={children:m().node,className:m().string};const Qe=({className:e,children:t})=>{const n=i(),r=u()(e,{[`${n}--ai-label-actions`]:!0});return(0,l.jsx)(Ue,{className:r,children:t})};Qe.displayName="AILabelActions",Qe.propTypes={children:m().node,className:m().string};const Ze=a.forwardRef(function({aiText:e="AI",aiTextLabel:t,textLabel:n,align:r,autoAlign:a=!0,children:o,className:s,kind:c="default",onRevertClick:d,revertActive:p,revertLabel:m="Revert to AI input",slugLabel:f="Show information","aria-label":b="Show information",size:h="xs",...g},x){const v=i(),y=j("AILabel"),$=u()(s,{[`${v}--ai-label`]:!0,[`${v}--ai-label--revert`]:p}),w=u()({[`${v}--ai-label__button`]:!0,[`${v}--ai-label__button--${h}`]:h,[`${v}--ai-label__button--${c}`]:c,[`${v}--ai-label__button--inline-with-content`]:"inline"===c&&(t||n)}),N=t||n?`${e} ${t||n}`:`${e} ${f||b}`,T=["xs","2xs","mini"].includes(h);return(0,l.jsx)("div",{className:$,ref:x,id:y,children:p?(0,l.jsx)(Oe,{onClick:e=>{d&&d(e)},kind:"ghost",size:"sm",label:m,...g,children:(0,l.jsx)(Ge.Vn,{})}):(0,l.jsxs)(qe,{align:r,autoAlign:a,alignmentAxisOffset:T?-24:0,...g,children:[(0,l.jsxs)(Ve,{className:w,label:"inline"===c?"":N,children:[(0,l.jsx)("span",{className:`${v}--ai-label__text`,children:e}),"inline"===c&&(t||n)&&(0,l.jsx)("span",{className:`${v}--ai-label__additional-text`,children:t||n})]}),o]})})});Ze.displayName="AILabel",Ze.propTypes={...qe.propTypes,AILabelContent:m().node,aiText:m().string,aiTextLabel:I(m().string,"`aiTextLabel` on `AILabel` has been deprecated - Please use the `textLabel` prop instead"),"aria-label":m().string,kind:m().oneOf(["default","inline"]),onRevertClick:m().func,revertActive:m().bool,revertLabel:m().string,size:m().oneOf(["mini","2xs","xs","sm","md","lg","xl"]),slugLabel:I(m().string,"`slugLabel` on `AILabel` has been deprecated - Please use the `ariaLabel` prop instead"),textLabel:m().string};const Xe=e=>"string"==typeof e?e:"number"==typeof e?`${e}`:e&&"object"==typeof e&&"label"in e&&"string"==typeof e.label?e.label:"";function Je(e,t){switch(t.type){case"enableIcons":return{...e,hasIcons:!0};case"enableSelectableItems":return{...e,hasSelectableItems:!0};case"registerItem":{const n=t.payload,r=e.items.filter(e=>e.ref.current),a=n.ref.current?.nextElementSibling,o=r.findIndex(e=>e.ref.current===a);return r.splice(o<0?r.length:o,0,n),{...e,items:r}}}}const et=(0,a.createContext)({state:{isRoot:!0,hasIcons:!1,hasSelectableItems:!1,size:null,items:[],requestCloseRoot:()=>{}},dispatch:()=>{}}),tt=a.createContext({direction:"ltr"});function nt(){return(0,a.useContext)(tt)}const rt=!("undefined"==typeof window||!window.document||!window.document.createElement);var at=n(78325);const ot=(0,a.forwardRef)(function({backgroundToken:e="layer",border:t=!1,children:n,className:r,containerRef:o,label:s,menuAlignment:c,onClose:d,onOpen:p,open:m,size:f="sm",legacyAutoalign:b=!0,target:h=rt&&document.body,x:g=0,y:x=0,...v},y){const $=i(),w=V("enable-v12-release")||t,N=(0,a.useRef)(null),T=(0,a.useContext)(et),j=T.state.isRoot,_=j?f:T.state.size,[C,k]=(0,a.useReducer)(Je,{...T.state,isRoot:!1,hasIcons:!1,hasSelectableItems:!1,size:f,requestCloseRoot:j?M:T.state.requestCloseRoot}),I=(0,a.useMemo)(()=>({state:C,dispatch:k}),[C,k]),S=(0,a.useRef)(null),E=Y([y,S]),[R,O]=(0,a.useState)([-1,-1]),D=(0,a.useMemo)(()=>I.state.items.filter(e=>!e.disabled&&e.ref.current),[I.state.items]);let A;if(o?.current){const{width:e}=o.current.getBoundingClientRect();A=e}const{direction:L}=nt();function M(){N.current&&N.current.focus(),d&&d()}function P(e){const t=D?.filter(e=>e?.ref?.current);if(!t?.length)return;const n=D.findIndex(e=>e.ref?.current?.contains(document.activeElement));let r=n;-1===n?r=0:e&&(de(e,oe)&&(r-=1),de(e,le)&&(r+=1)),r<0&&(r=t.length-1),r>=t.length&&(r=0),r!==n&&(t[r]?.ref?.current?.focus(),e?.preventDefault())}function B(e,t){if(!S.current)return;const{width:n,height:r}=S.current.getBoundingClientRect(),a=j?"vertical":"horizontal",o={x:{max:window.innerWidth,size:n,anchor:"horizontal"===a?e[1]:e[0],reversedAnchor:"horizontal"===a?e[0]:e[1],offset:0},y:{max:window.innerHeight,size:r,anchor:"horizontal"===a?e[0]:e[1],reversedAnchor:"horizontal"===a?e[1]:e[0],offset:j?0:4}};
2if(A&&A<o.x.size&&("bottom"===c||"top"===c)&&(o.x.size=A),A&&("bottom-end"===c||"top-end"===c)&&o.x.anchor>=87&&A<o.x.size){const e=o.x.anchor+o.x.reversedAnchor;o.x.anchor=o.x.anchor+e}const{max:i,size:l,anchor:s,reversedAnchor:d,offset:u}=o[t],p=[i-8-l-s>=0&&s-u,d-l>=0&&d-l+u,i-8-l],m="top"===c||"top-end"===c||"top-start"===c;"number"==typeof p[0]&&m&&p[0]>=0&&!p[1]&&"y"===t?S.current.style.transform="translate(0)":m&&!p[0]&&"y"===t&&(p[0]=s-u);const f=p.find(e=>!1!==e);return f>=8?f:8}function F(e){return null!=e}function z(e){if(Array.isArray(e)){const t=e.filter(F);return 2===t.length?t:void 0}return[e,e]}(0,a.useEffect)(()=>{if(m){const e=requestAnimationFrame(()=>{const e=S.current?.ownerDocument.activeElement,t=e instanceof Node&&S.current?.contains(e);D.length>0&&(!j||t)&&P()});return()=>cancelAnimationFrame(e)}},[m,D,j,R]),(0,a.useEffect)(()=>{m?function(){if(S.current){const{activeElement:e,dir:t}=document;if(N.current=e instanceof HTMLElement?e:null,b){const e=function(){const e={x:z(g),y:z(x)};return e.x&&e.y?[B(e.x,"x")??-1,B(e.y,"y")??-1]:[-1,-1]}();"rtl"!==t&&"rtl"!==L||v?.id?.includes("MenuButton")?(S.current.style.insetInlineStart=`${e[0]}
2px`,S.current.style.insetInlineEnd="initial"):(S.current.style.insetInlineStart="initial",S.current.style.insetInlineEnd=`${e[0]}px`),S.current.style.insetBlockStart=`${e[1]}px`,O(e)}S.current.focus(),p&&p()}}():O([-1,-1])},[m]);const q=u()(r,`${$}--menu`,`${$}--menu--${_}`,{[`${$}--menu--box-shadow-top`]:c&&"top"===c.slice(0,3),[`${$}--menu--open`]:m,[`${$}--menu--shown`]:m&&!b||R[0]>=0&&R[1]>=0,[`${$}--menu--with-icons`]:I.state.hasIcons,[`${$}--menu--with-selectable-items`]:I.state.hasSelectableItems,[`${$}--autoalign`]:!b,[`${$}--menu--border`]:w,[`${$}--menu--background-token__background`]:"background"===e}),H=(0,l.jsx)(et.Provider,{value:I,children:(0,l.jsx)("ul",{...v,className:q,role:"menu",ref:E,"aria-label":s,tabIndex:-1,onKeyDown:function(e){e.stopPropagation(),(de(e,ee)||de(e,X)||!j&&de(e,ae))&&d?(e.preventDefault(),M()):P(e)},onBlur:function(e){m&&d&&j&&!S.current?.contains(e.relatedTarget)&&M()},children:n})});return h&&j?m&&(0,at.createPortal)(H,h)||null:H});ot.propTypes={backgroundToken:m().oneOf(["layer","background"]),border:m().bool,children:m().node,className:m().string,label:m().string,menuAlignment:m().string,mode:I(m().oneOf(["full","basic"]),"Menus now always support both icons as well as selectable items and nesting."),onClose:m().func,onOpen:m().func,open:m().bool,size:m().oneOf(["xs","sm","md","lg"]),target:m().object,x:m().oneOfType([m().number,m().arrayOf(m().number)]),y:m().oneOfType([m().number,m().arrayOf(m().number)]),legacyAutoalign:m().bool};const it=({defaultValue:e,name:t="custom",onChange:n,value:r})=>{const[o,i]=(0,a.useState)(void 0!==r?r:e),l=(0,a.useRef)(null);null===l.current&&(l.current=void 0!==r);const s=e=>{const t="function"==typeof e?e(o):e;!1===l.current&&i(t),n&&n(t)};return(0,a.useEffect)(()=>{const e=void 0!==r;!1===l.current&&e&&C(!1,`A component is changing an uncontrolled ${t} component to be controlled. This is likely caused by the value changing to a defined value from undefined. Decide between using a controlled or uncontrolled value for the lifetime of the component. More info: https://reactjs.org/link/controlled-components`),!0!==l.current||e||C(!1,`A component is changing a controlled ${t} component to be uncontrolled. This is likely caused by the value changing to an undefined value from a defined one. Decide between using a controlled or uncontrolled value for the lifetime of the component. More info: https://reactjs.org/link/controlled-components`)},[t,r]),!0===l.current?[r,s,l.current]:[o,s,l.current]};var lt=n(55155);const st=(0,a.forwardRef)(function({children:e,className:t,dangerDescription:n="",disabled:r,kind:o="default",label:s,onClick:c,renderIcon:d,shortcut:p,...m},f){const[b,g]=(0,a.useState)(!1),[x,v]=(0,a.useState)(!1),y=V("enable-v12-release"),$=y?-2:-6,w=y?14:10,{refs:N,floatingStyles:T,context:_}=(0,fe.we)({open:b,onOpenChange:(e,t)=>
2{if(e)g(!0);else{const e=t&&"relatedTarget"in t?t.relatedTarget:null;if(e instanceof Node&&R.current?.contains(e))return;g(!1),e instanceof HTMLElement&&e.closest('[role="menuitem"]')?.querySelector('[role="menu"]')||R.current?.focus()}},placement:x?"left-start":"right-start",whileElementsMounted:he.ll,middleware:[(0,be.UU)(),(0,be.cY)(({placement:e})=>({mainAxis:e.startsWith("left")?w:$,crossAxis:-6}))],strategy:"fixed"}),{getReferenceProps:C,getFloatingProps:k}=(0,fe.bv)([(0,fe.Mk)(_,{delay:100,enabled:!0,handleClose:(0,fe.iB)({requireIntent:!1})})]),I=i(),E=(0,a.useContext)(et),R=(0,a.useRef)(null),O=Y([f,R,N.setReference]),D=a.Children.toArray(e).length>0,A=r&&!D,L="danger"===o&&!D,M=L&&Boolean(n);function P(){R.current&&g(!0)}function B(e){A||(D?P():(E.state.requestCloseRoot(e),c&&c(e)))}const F=(0,a.useRef)(!1),z=e=>de(e,J)||de(e,te),q=u()(t,`${I}--menu-item`,{[`${I}--menu-item--disabled`]:A,[`${I}--menu-item--danger`]:L});(0,a.useEffect)(()=>{E.dispatch({type:"registerItem",payload:{ref:R,disabled:r??!1}})},[]);const{direction:H}=nt();(0,a.useEffect)(()=>{"rtl"===document?.dir||"rtl"===H?v(!0):v(!1)},[H]),(0,a.useEffect)(()=>{d&&!E.state.hasIcons&&E.dispatch({type:"enableIcons"})},[d,E.state.hasIcons,E]),(0,a.useEffect)(()=>{Object.keys(T).forEach(e=>{N.floating.current&&"position"!==e&&(N.floating.current.style[e]=T[e])})},[T,N.floating]);const K=j("danger-description");return(0,l.jsx)(fe.s3,{context:_,order:["reference","floating"],modal:!1,children:(0,l.jsxs)("li",{role:"menuitem",...m,ref:O,className:q,tabIndex:r?-1:0,"aria-disabled":A??void 0,"aria-haspopup":D??void 0,"aria-expanded":D?b:void 0,onMouseDown:function(e){A&&e.preventDefault()},onClick:B,onKeyDown:function(e){D&&de(e,ie)&&(P(),requestAnimationFrame(()=>{N.floating.current?.focus()}),e.stopPropagation(),e.preventDefault()),F.current=z(e),m.onKeyDown&&m.onKeyDown(e)},onKeyUp:function(e){F.current&&z(e)&&B(e),F.current=!1},title:s,...C(),children:[(0,l.jsx)("div",{className:`${I}--menu-item__selection-icon`,children:m["aria-checked"]&&(0,l.jsx)(S.MG,{})}),(0,l.jsx)("div",{className:`${I}--menu-item__icon`,children:d&&(0,l.jsx)(d,{})}),(0,l.jsx)(h,{as:"div",className:`${I}--menu-item__label`,children:s}),M&&(0,l.jsx)("span",{id:K,className:`${I}--visually-hidden`,children:n}),p&&!D&&(0,l.jsx)("div",{className:`${I}--menu-item__shortcut`,children:p}),D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${I}--menu-item__shortcut`,children:x?(0,l.jsx)(lt.ZK,{}):(0,l.jsx)(lt.K3,{})}),(0,l.jsx)(ot,{label:s,open:b,onClose:()=>{g(!1),R.current?.focus()},ref:N.setFloating,...k(),children:e})]})]})})});st.propTypes={children:m().node,className:m().string,dangerDescription:m().string,disabled:m().bool,kind:m().oneOf(["default","danger"]),label:m().string.isRequired,onClick:m().func,renderIcon:m().oneOfType([m().func,m().object]),shortcut:m().string},(0,a.forwardRef)(function({className:e,defaultSelected:t,label:n,onChange:r,selected:o,...s},c){const d=i(),p=(0,a.useContext)(et),[m,f]=it({value:o,onChange:r,defaultValue:t??!1});(0,a.useEffect)(()=>{p.state.hasSelectableItems||p.dispatch({type:"enableSelectableItems"})},[p.state.hasSelectableItems,p]);const b=u()(e,`${d}--menu-item-selectable--selected`);return(0,l.jsx)(st,{...s,ref:c,label:n,className:b,role:"menuitemcheckbox","aria-checked":m,onClick:function(){f(!m)}})}).propTypes={className:m().string,defaultSelected:m().bool,label:m().string.isRequired,onChange:m().func,selected:m().bool},(0,a.forwardRef)(function({children:e,className:t,label:n,...r},a){const o=i(),s=u()(t,`${o}--menu-item-group`);return(0,l.jsx)("li",{className:s,role:"none",ref:a,children:(0,l.jsx)("ul",{...r,role:"group","aria-label":n,children:e})})}).propTypes={children:m().node,className:m().string,label:m().string.isRequired},(0,a.forwardRef)(function({className:e,defaultSelectedItem:t,items:n,itemToString:r=Xe,label:o,onChange:s,selectedItem:c,...d},p){const m=i(),f=(0,a.useContext)(et),[b,h]=it({value:c,onChange:s,defaultValue:t??{}});(0,a.useEffect)(()=>{f.state.hasSelectableItems||f.dispatch({type:"enableSelectableItems"})},[f.state.hasSelectableItems,f]);const g=u()(e,`${m}--menu-item-radio-group`);return(0,l.jsx)("li",{className:g,role:"none",ref:p,children:(0,l.jsx)("ul",{...d,role:"group","aria-label":o,children:n.map((e,t)=>(0,l.jsx)(st,{label:r(e),role:"menuitemradio","aria-checked":e===b,onClick:()=>{!function(e){h(e)}(e)}},t))})})}).propTypes={className:m().string,defaultSelectedItem:m().any,itemToString:m().func,items:m().array,label:m().string.isRequired,onChange:m().func,selectedItem:m().any};const ct=(0,a.forwardRef)(function({className:e,...t},n){const r=i(),a=u()(e,`${r}--menu-item-divider`);return(0,l.jsx)("li",{...t,className:a,role:"separator",ref:n})});ct.propTypes={className:m().string};const dt=()=>{},ut=e=>null!=e&&""!==e;var pt=n(85036);
2const mt=({id:e,readOnly:t,disabled:n,invalid:r,invalidText:a,warn:o,warnText:s})=>{const c=i(),d={disabled:!t&&n,invalid:!t&&!n&&r,invalidId:`${e}-error-msg`,warn:!t&&!r&&!n&&o,warnId:`${e}-warn-msg`,validation:null,icon:null,helperId:`${e}-helper-text`};return d.invalid?(d.icon=pt.BF,d.validation=(0,l.jsx)(h,{as:"div",className:`${c}--form-requirement`,id:d.invalidId,children:a})):d.warn&&(d.icon=pt.OR,d.validation=(0,l.jsx)(h,{as:"div",className:`${c}--form-requirement`,id:d.warnId,children:s})),d},ft=(e,t)=>{const n=V("enable-v12-release");we(e,`${t}. Render interactive content as a sibling of the label or use the \`decorator\` prop when available`,{shouldThrow:n})},bt=a.forwardRef(({className:e,decorator:t,helperText:n,id:r,labelText:o,onChange:s=dt,onClick:c,indeterminate:d=!1,invalid:p,invalidText:m,hideLabel:f,readOnly:b,title:g="",warn:x,warnText:v,disabled:y,slug:$,...w},N)=>{const T=i(),_=(0,a.useRef)(null),C=mt({id:r,readOnly:b,disabled:y??!1,invalid:p??!1,invalidText:m,warn:x??!1,warnText:v}),k=C.warn,I=!C.invalid&&!C.warn,S=j(),E=ut(n),R=E?`checkbox-helper-text-${S}`:void 0,O=E&&(0,l.jsx)("div",{id:R,className:`${T}--form__helper-text`,children:n}),D=u()(`${T}--form-item`,`${T}--checkbox-wrapper`,e,{[`${T}--checkbox-wrapper--readonly`]:b,[`${T}--checkbox-wrapper--invalid`]:C.invalid,[`${T}--checkbox-wrapper--warning`]:k,[`${T}--checkbox-wrapper--slug`]:$,[`${T}--checkbox-wrapper--decorator`]:t}),A=u()(`${T}--checkbox-label-text`,{[`${T}--visually-hidden`]:f}),L=$??t,M=G(L,Ze)?(0,a.cloneElement)(L,{size:"inline"===L.props.kind?"md":"mini"}):L;return ft(_,"The Checkbox component `labelText` prop must have no interactive content"),(0,l.jsxs)("div",{className:D,children:[(0,l.jsx)("input",{...w,disabled:y,type:"checkbox","data-invalid":!!C.invalid||void 0,onChange:e=>{!b&&s&&s(e,{checked:e.target.checked,id:r})},className:`${T}--checkbox`,id:r,ref:e=>{e&&(e.indeterminate=d??!1),"function"==typeof N?N(e):N&&"current"in N&&(N.current=e)},"aria-readonly":b,onClick:e=>{b&&e.preventDefault(),c&&c(e)}}),(0,l.jsx)("label",{htmlFor:r,className:`${T}--checkbox-label`,ref:_,title:g,children:(0,l.jsx)(h,{as:"div",className:A,children:o})}),$?M:t?(0,l.jsx)("div",{className:`${T}--checkbox-wrapper-inner--decorator`,children:M}):null,(0,l.jsxs)("div",{className:`${T}--checkbox__validation-msg`,children:[C.invalid&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pt.BF,{className:`${T}--checkbox__invalid-icon`}),(0,l.jsx)("div",{className:`${T}--form-requirement`,children:m})]}),k&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pt.OR,{className:`${T}--checkbox__invalid-icon ${T}--checkbox__invalid-icon--warning`}),(0,l.jsx)("div",{className:`${T}--form-requirement`,children:v})]})]}),I&&O]})});bt.propTypes={checked:m().bool,className:m().string,decorator:m().node,defaultChecked:m().bool,disabled:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,indeterminate:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,onChange:m().func,readOnly:m().bool,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),title:m().string,warn:m().bool,warnText:m().node},bt.displayName="Checkbox";const ht=({children:e,className:t,decorator:n,helperText:r,invalid:o,invalidText:s,legendId:c,legendText:d,readOnly:p,disabled:m,warn:f,warnText:b,slug:h,orientation:g="vertical",...x})=>{const v=i(),y=(0,a.useRef)(null),$=j(),w=mt({id:`checkbox-group-${$}`,readOnly:p,disabled:m??!1,invalid:o??!1,invalidText:s,warn:f??!1,warnText:b}),N=w.warn,T=!w.invalid&&!w.warn,_=ut(r),C=_?`checkbox-group-helper-text-${$}`:void 0,k=_&&(0,l.jsx)("div",{id:C,className:`${v}--form__helper-text`,children:r}),I=u()(`${v}--checkbox-group`,t,{[`${v}--checkbox-group--${g}`]:"horizontal"===g,[`${v}--checkbox-group--readonly`]:p,[`${v}--checkbox-group--invalid`]:w.invalid,[`${v}--checkbox-group--warning`]:N,[`${v}--checkbox-group--slug`]:h,[`${v}--checkbox-group--decorator`]:n}),S=h??n,E=G(S,Ze)?(0,a.cloneElement)(S,{size:"mini",kind:"default"}):S;ft(y,"The CheckboxGroup component `legendText` prop must have no interactive content");const R=a.Children.map(e,e=>{if(G(e,bt)){const t={...void 0!==o&&void 0===e.props.invalid?{invalid:w.invalid}:{},...void 0!==p&&void 0===e.props.readOnly?{readOnly:p}:{},...void 0!==f&&void 0===e.props.warn?{warn:w.warn}:{},...void 0!==m&&void 0===e.props.disabled?{disabled:m}:{}};return Object.keys(t).length?(0,a.cloneElement)(e,t):e}return e});return(0,l.jsxs)("fieldset",{className:I,disabled:m,"data-invalid":!!w.invalid||void 0,"aria-labelledby":x["aria-labelledby"]||c,"aria-readonly":p,"aria-disabled":m,"aria-describedby":w.invalid||w.warn||!k?void 0:C,...x,children:[(0,l.jsx)("legend",{className:`${v}
2--label`,id:c||x["aria-labelledby"],ref:y,children:d}),h?E:n?(0,l.jsx)("div",{className:`${v}--checkbox-group-inner--decorator`,children:E}):null,R,(0,l.jsxs)("div",{className:`${v}--checkbox-group__validation-msg`,children:[w.invalid&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pt.BF,{className:`${v}--checkbox__invalid-icon`}),(0,l.jsx)("div",{className:`${v}--form-requirement`,children:s})]}),N&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pt.OR,{className:`${v}--checkbox__invalid-icon ${v}--checkbox__invalid-icon--warning`}),(0,l.jsx)("div",{className:`${v}--form-requirement`,children:b})]})]}),T&&k]})};ht.propTypes={children:m().node,className:m().string,decorator:m().node,helperText:m().node,invalid:m().bool,invalidText:m().node,legendId:m().node,legendText:m().node.isRequired,orientation:m().oneOf(["horizontal","vertical"]),readOnly:m().bool,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),warn:m().bool,warnText:m().node};var gt=Ae;const xt=({ref:e,onResize:t})=>{const[n,r]=(0,a.useState)(-1),[o,i]=(0,a.useState)(-1),l=(0,a.useRef)(null),s=(0,a.useRef)(t);return(0,a.useEffect)(()=>{s.current=t},[t]),(0,a.useEffect)(()=>{!e?.current||n>=0&&o>=0||(()=>{if(e.current){const t=window.getComputedStyle(e.current),n=(e.current?.offsetWidth??0)-("string"==typeof t?.paddingLeft&&t?.paddingLeft.length?parseFloat(t?.paddingLeft):0)-("string"==typeof t?.paddingRight&&t?.paddingRight.length?parseFloat(t?.paddingRight):0),a=(e.current?.offsetHeight??0)-("string"==typeof t?.paddingTop&&t?.paddingTop.length?parseFloat(t?.paddingTop):0)-("string"==typeof t?.paddingBottom&&t?.paddingBottom.length?parseFloat(t?.paddingBottom):0);r(n),i(a)}})()},[n,o]),v(()=>{if(!e?.current)return;const t=new ResizeObserver(t=>{l.current=t,window.requestAnimationFrame(()=>{(()=>{if(!e?.current||!Array.isArray(l?.current))return;const t=l.current[0];r(t.contentRect.width),i(t.contentRect.height),s.current?.(t.contentRect)})()})});return t.observe(e.current),()=>{t.disconnect()}},[]),{width:n,height:o}},vt=e=>(t,...n)=>{for(const r of e){if(t.defaultPrevented)break;"function"==typeof r&&r(t,...n)}};var yt=n(58148);function $t({align:e="bottom",autoAlign:t=!1,children:n,className:r,feedback:o="Copied!",feedbackTimeout:s=2e3,onAnimationEnd:c,onClick:d=dt,...p}){const[m,f]=(0,a.useState)(""),b=i(),h=u()(r,`${b}--copy`,{[`${b}--copy-btn--animating`]:m,[`${b}--copy-btn--${m}`]:m}),g=(0,a.useCallback)((0,yt.s)(()=>{f("fade-out")},s),[s]),x=(0,a.useCallback)(()=>{f("fade-in"),g()},[g]);(0,a.useEffect)(()=>()=>{g.cancel()},[g]);const v=p["aria-label"]??"";return(0,l.jsx)(Oe,{closeOnActivation:!1,align:e,autoAlign:t,className:h,label:m?o:v,leaveDelayMs:m?s:void 0,onClick:vt([d,x]),onAnimationEnd:vt([c,e=>{e.animationName===`${b}--hide-feedback`&&f("")}]),...p,"aria-label":!n&&(m?o:p["aria-label"])||void 0,children:n})}$t.propTypes={align:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),autoAlign:m().bool,children:m().node,className:m().string,feedback:m().string,feedbackTimeout:m().number,onAnimationEnd:m().func,onClick:m().func};var wt=$t;const Nt=["xs","sm","md","lg","xl","2xl"],Tt=["condensed","normal"],jt=a.forwardRef(({as:e="div",children:t,className:n,density:r,size:a,...o},s)=>{const c=i(),d=u()(n,`${c}--layout`,{[`${c}--layout--size-${a}`]:a&&Nt.includes(a),[`${c}--layout--density-${r}`]:r&&Tt.includes(r)});return(0,l.jsx)(e,{...o,ref:s,className:d,children:t})});jt.displayName="Layout",jt.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,className:m().string,density:m().oneOf(Tt),size:m().oneOf(Nt)};const _t=a.forwardRef(({as:e="div",children:t,className:n,density:r,size:a,...o},s)=>{const c=i(),d=u()(n,Object.entries({size:a,density:r}).map(([e,t])=>({[`${c}--layout-constraint--${e}__default-${t?.default}`]:t?.default,[`${c}--layout-constraint--${e}__min-${t?.min}`]:t?.min,[`${c}--layout-constraint--${e}__max-${t?.max}`]:t?.max})));return(0,l.jsx)(e,{...o,ref:s,className:d,children:t})});
2_t.displayName="LayoutConstraint",_t.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,className:m().string,density:m().shape({min:m().oneOf(Tt),default:m().oneOf(Tt),max:m().oneOf(Tt)}),size:m().shape({min:m().oneOf(Nt),default:m().oneOf(Nt),max:m().oneOf(Nt)})};var Ct=n(47897);function kt({align:e="bottom",autoAlign:t=!1,feedback:n="Copied!",feedbackTimeout:r=2e3,iconDescription:a="Copy to clipboard",className:o,onClick:s=dt,...c}){const d=i();return(0,l.jsx)(_t,{size:{default:"md",max:"lg"},children:(0,l.jsx)(wt,{feedback:n,feedbackTimeout:r,onClick:s,align:e,autoAlign:t,className:u()(o,`${d}--copy-btn`),"aria-label":a,...c,children:(0,l.jsx)(Ct.QR,{className:`${d}--snippet__icon`})})})}kt.propTypes={align:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),autoAlign:m().bool,className:m().string,feedback:m().string,feedbackTimeout:m().number,iconDescription:m().string,onClick:m().func};var It=kt,St=n(97272);const Et=16;function Rt({align:e="bottom",autoAlign:t=!1,className:n,type:r="single",children:o,disabled:s,feedback:c,feedbackTimeout:d,onClick:p,"aria-label":m="Copy to clipboard",ariaLabel:f,copyText:b,copyButtonDescription:h,light:g,showMoreText:x="Show more",showLessText:v="Show less",hideCopyButton:y,wrapText:$=!1,maxCollapsedNumberOfRows:w=15,maxExpandedNumberOfRows:N=0,minCollapsedNumberOfRows:T=3,minExpandedNumberOfRows:_=16,...C}){const[k,I]=(0,a.useState)(!1),[E,R]=(0,a.useState)(!1),{current:O}=(0,a.useRef)(j()),D=(0,a.useRef)(null),A=(0,a.useRef)(null),L=(0,a.useRef)(null),M=(0,a.useCallback)(()=>"single"===r?A:"multi"===r?D:L,[r]),P=i();xt({ref:M(),onResize:()=>{if(L?.current&&"multi"===r){const{height:e}=L.current.getBoundingClientRect();R(w>0&&(N<=0||N>w)&&e>w*Et),k&&_>0&&e<=_*Et&&I(!1)}}});const B=e=>{(b||L?.current)&&(0,St.A)(b??L?.current?.innerText??""),p&&p(e)},F=u()(n,`${P}--snippet`,{[`${P}--snippet--${r}`]:r,[`${P}--snippet--disabled`]:"inline"!==r&&s,[`${P}--snippet--expand`]:k,[`${P}--snippet--light`]:g,[`${P}--snippet--no-copy`]:y,[`${P}--snippet--wraptext`]:$}),z=k?v:x;if("inline"===r)return y?(0,l.jsx)("span",{className:F,children:(0,l.jsx)("code",{id:O,ref:L,children:o})}):(0,l.jsx)(wt,{...C,align:e,autoAlign:t,onClick:B,"aria-label":f||m,"aria-describedby":O,className:F,disabled:s,feedback:c,feedbackTimeout:d,children:(0,l.jsx)("code",{id:O,ref:L,children:o})});const q={};if("multi"===r){const e={};k?(N>0&&(e.maxHeight=N*Et),_>0&&(e.minHeight=_*Et)):(w>0&&(e.maxHeight=w*Et),T>0&&(e.minHeight=T*Et)),Object.keys(e).length&&(q.style=e)}return(0,l.jsxs)("div",{...C,className:F,children:[(0,l.jsx)("div",{ref:A,role:"single"===r||"multi"===r?"textbox":void 0,tabIndex:"single"!==r&&"multi"!==r||s?void 0:0,className:`${P}--snippet-container`,"aria-label":f||m||"code-snippet","aria-readonly":"single"===r||"multi"===r||void 0,"aria-multiline":"multi"===r||void 0,...q,children:(0,l.jsx)("pre",{ref:D,...q,children:(0,l.jsx)("code",{ref:L,children:o})})}),!y&&(0,l.jsx)(It,{align:e,autoAlign:t,size:"multi"===r?"sm":"md",disabled:s,onClick:B,feedback:c,feedbackTimeout:d,iconDescription:h}),E&&(0,l.jsxs)(gt,{kind:"ghost",size:"sm",className:`${P}--snippet-btn--expand`,disabled:s,onClick:()=>I(!k),children:[(0,l.jsx)("span",{className:`${P}--snippet-btn--text`,children:z}),(0,l.jsx)(S.yQ,{className:`${P}--icon-chevron--down ${P}--snippet__icon`,name:"chevron--down",role:"img"})]})]})}function Ot({className:e,children:t,...n}){const r=i(),a=u()(`${r}--form`,e);return(0,l.jsx)("form",{className:a,...n,children:t})}Rt.propTypes={align:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","to
2p-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),autoAlign:m().bool,children:m().node,className:m().string,copyButtonDescription:m().string,copyText:m().string,disabled:m().bool,feedback:m().string,feedbackTimeout:m().number,hideCopyButton:m().bool,light:I(m().bool,"The `light` prop for `CodeSnippet` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),maxCollapsedNumberOfRows:m().number,maxExpandedNumberOfRows:m().number,minCollapsedNumberOfRows:m().number,minExpandedNumberOfRows:m().number,onClick:m().func,showLessText:m().string,showMoreText:m().string,type:m().oneOf(["single","inline","multi"]),wrapText:m().bool},Ot.propTypes={children:m().node,className:m().string};const Dt=e=>null!==e&&"object"==typeof e&&"disabled"in e&&!0===e.disabled,At=(...e)=>t=>{e.forEach(e=>{e&&("function"==typeof e?e(t):"object"==typeof e&&"current"in e&&(e.current=t))})},Lt=m().oneOf(["default","inline"]),Mt=m().oneOf(["xs","sm","md","lg"]),Pt=(0,a.createContext)({isFluid:!1}),Bt=e=>{27===e.keyCode&&e.stopPropagation()},Ft=e=>{e.preventDefault(),e.stopPropagation()},zt=(0,a.forwardRef)((e,t)=>{const{children:n,className:r,disabled:o=!1,type:s="default",size:c,invalid:d,invalidText:p,invalidTextId:m,warn:f,warnText:b,warnTextId:h,light:g,isOpen:x,...v}=e,y=i(),{isFluid:$}=(0,a.useContext)(Pt),w=!d&&f,N=u()({...r&&{[r]:!0},[`${y}--list-box`]:!0,[`${y}--list-box--${c}`]:c,[`${y}--layout--size-${c}`]:c,[`${y}--list-box--inline`]:"inline"===s,[`${y}--list-box--disabled`]:o,[`${y}--list-box--light`]:g,[`${y}--list-box--expanded`]:x,[`${y}--list-box--invalid`]:d,[`${y}--list-box--warning`]:w});return(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{...v,className:N,ref:t,onKeyDown:Bt,onClick:Ft,"data-invalid":d||void 0,children:n}),$&&(0,l.jsx)("hr",{className:`${y}--list-box__divider`}),d?(0,l.jsx)("div",{className:`${y}--form-requirement`,id:m,children:p}):null,w?(0,l.jsx)("div",{className:`${y}--form-requirement`,id:h,children:b}):null]})});function qt({children:e,disabled:t,tabIndex:n,...r}){const a=i();return(0,l.jsx)("div",{className:`${a}--list-box__field`,tabIndex:!t&&n||-1,...r,children:e})}zt.displayName="ListBox",zt.propTypes={children:m().node,className:m().string,disabled:m().bool,invalid:m().bool,invalidText:m().node,invalidTextId:m().string,isOpen:m().bool,light:I(m().bool,"The `light` prop for `ListBox` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),size:Mt,type:Lt,warn:m().bool,warnText:m().string,warnTextId:m().string},qt.propTypes={"aria-haspopup":m().oneOfType([m().string,m().bool]),children:m().node,disabled:m().bool,role:m().string,tabIndex:m().oneOfType([m().number,m().string])};const Ht=(0,a.forwardRef)(({children:e,isActive:t=!1,isHighlighted:n=!1,title:r,...o},s)=>{const c=i(),d=s&&"function"!=typeof s?s.menuItemOptionRef:void 0,{isTruncated:p,ref:m}=((e,t=[])=>{const n=(0,a.useRef)(null),r=Y([...e?[e]:[],n]),[o,i]=(0,a.useState)(!1);return(0,a.useEffect)(()=>{const e=n.current;if(e){const{offsetWidth:t,scrollWidth:n}=e;i(t<n)}},[n,...t]),{isTruncated:o,ref:r}})(d,[e]),f=u()(`${c}--list-box__menu-item`,{[`${c}--list-box__menu-item--active`]:t,[`${c}--list-box__menu-item--highlighted`]:n});return(0,l.jsx)("li",{...o,className:f,title:p?r:void 0,children:(0,l.jsx)("div",{className:`${c}--list-box__menu-item__option`,ref:m,children:e})})});Ht.displayName="ListBoxMenuItem",Ht.propTypes={children:m().node,disabled:m().bool,isActive:m().bool,isHighlighted:m().bool,title:m().string};const Kt=(0,a.forwardRef)(({children:e,id:t,...n},r)=>{const a=i();return(0,l.jsx)("ul",{ref:r,id:t,className:`${a}--list-box__menu`,role:"listbox",...n,children:e})});Kt.displayName="ListBoxMenu",Kt.propTypes={children:m().oneOfType([m().node,m().arrayOf(m().oneOf([Ht])),m().shape({type:m().oneOf([Ht])}),m().bool]),id:m().string.isRequired};const Vt="close.menu",Wt="open.menu",Ut={[Vt]:"Close menu",[Wt]:"Open menu"},Gt=e=>Ut[e],Yt=({isOpen:e,translateWithId:t=Gt})=>{const n=i(),r=u()(`${n}--list-box__menu-icon`,{[`${n}--list-box__menu-icon--open`]:e}),a=t(e?"close.menu":"open.menu");return(0,l.jsx)("div",{className:r,children:(0,l.jsx)(S.yQ,{name:"chevron--down","aria-label":a,children:(0,l.jsx)("title",{children:a})})})};
2Yt.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};const Qt="clear.all",Zt="clear.selection",Xt={[Qt]:"Clear selected items",[Zt]:"Clear selected item"},Jt=e=>Xt[e],en=({clearSelection:e,selectionCount:t,translateWithId:n=Jt,disabled:r,onClearSelection:a,readOnly:o})=>{const s=i(),c=(t??0)>0,d=(t??0)>1,p=u()(`${s}--list-box__selection`,{[`${s}--tag--filter`]:c,[`${s}--list-box__selection--multi`]:c}),m=t=>{t.stopPropagation(),r||o||(e(t),a&&a(t))},f=n(d?"clear.all":"clear.selection"),b=u()(`${s}--tag`,`${s}--tag--filter`,`${s}--tag--high-contrast`,{[`${s}--tag--disabled`]:r});return c?(0,l.jsxs)("div",{className:b,children:[(0,l.jsx)("span",{className:`${s}--tag__label`,title:`${t}`,children:t}),(0,l.jsx)("div",{role:"button",tabIndex:-1,className:`${s}--tag__close-icon`,onClick:m,"aria-label":f,title:f,"aria-disabled":!!o||void 0,children:(0,l.jsx)(S.bm,{})})]}):(0,l.jsx)("div",{role:"button",className:p,tabIndex:-1,onClick:m,"aria-label":f,title:f,children:(0,l.jsx)(S.bm,{})})};en.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,onClearSelection:m().func,readOnly:m().bool,selectionCount:m().number,translateWithId:m().func};const tn=Object.assign(zt,{Field:qt,Menu:Kt,MenuIcon:Yt,MenuItem:Ht,Selection:en}),nn="clear.all",rn="clear.selection",an={[nn]:"Clear selected items",[rn]:"Clear selected item"},on=e=>an[e];function ln({clearSelection:e,selectionCount:t,translateWithId:n=on,disabled:r,readOnly:a,onClearSelection:o,...s}){const c=i(),d=(t??0)>0,p=(t??0)>1,m=u()(`${c}--list-box__selection`,{[`${c}--tag--filter`]:d,[`${c}--list-box__selection--multi`]:d}),f=n(p?"clear.all":"clear.selection"),b=u()(`${c}--tag`,`${c}--tag--filter`,`${c}--tag--high-contrast`,{[`${c}--tag--disabled`]:r});function h(t){t.stopPropagation(),r||a||(e(t),o&&o(t))}return d?(0,l.jsxs)("div",{className:b,children:[(0,l.jsx)("span",{className:`${c}--tag__label`,title:t?.toString(),children:t}),(0,l.jsx)("button",{"aria-label":f,className:`${c}--tag__close-icon`,disabled:r||a,onClick:h,tabIndex:-1,title:f,type:"button","aria-disabled":!!a||void 0,children:(0,l.jsx)(S.bm,{})})]}):(0,l.jsx)("button",{...s,"aria-label":f,className:m,disabled:r||a,onClick:h,tabIndex:-1,title:f,type:"button","aria-disabled":!!a||void 0,children:(0,l.jsx)(S.bm,{})})}ln.propTypes={clearSelection:m().func.isRequired,disabled:m().bool,readOnly:m().bool,onClearSelection:m().func,onClick:m().func,onMouseDown:m().func,onMouseUp:m().func,onKeyDown:m().func,selectionCount:m().number,translateWithId:m().func};const sn="close.menu",cn="open.menu",dn={[sn]:"Close",[cn]:"Open"},un=e=>dn[e],pn=a.forwardRef(({isOpen:e,translateWithId:t=un,...n},r)=>{const a=i(),o=u()({[`${a}--list-box__menu-icon`]:!0,[`${a}--list-box__menu-icon--open`]:e}),s=t(e?"close.menu":"open.menu");return(0,l.jsx)("button",{...n,"aria-label":s,title:s,className:o,type:"button",tabIndex:-1,ref:r,children:(0,l.jsx)(S.yQ,{})})});pn.displayName="ListBoxTrigger",pn.propTypes={isOpen:m().bool.isRequired,translateWithId:m().func};var mn=n(86641),fn=n(97383),bn=n.n(fn);const{InputBlur:hn,InputKeyDownEnter:gn,FunctionToggleMenu:xn,ToggleButtonClick:vn,ItemMouseMove:yn,InputKeyDownArrowUp:$n,InputKeyDownArrowDown:wn,MenuMouseLeave:Nn,ItemClick:Tn,FunctionSelectItem:jn}=mn.Bp.stateChangeTypes,_n=()=>!0,Cn=({item:e,inputValue:t})=>{if(null===t||""===t)return!0;const n=e.toLowerCase(),r=t.toLowerCase();return n.startsWith(r)},kn=({initialSelectedItem:e,itemToString:t,selectedItem:n,prevSelectedItem:r})=>null!=n?t(n):void 0===r&&null!=e?t(e):"",In=(0,a.forwardRef)((e,t)=>{const n=(0,a.useRef)(0),r=(0,a.useRef)(null),{"aria-label":o="Choose an item",ariaLabel:s,autoAlign:c=!1,className:d,decorator:p,direction:m="bottom",disabled:f=!1,downshiftActions:b,downshiftProps:g,helperText:x,id:v,initialSelectedItem:y,invalid:$,invalidText:w,items:N,itemToElement:T=null,itemToString:_=Xe,light:C,onChange:k,onInputChange:I,onToggleClick:E,placeholder:R,readOnly:O,selectedItem:D,shouldFilterItem:A=_n,size:L,titleText:M,translateWithId:P,typeahead:B=!1,warn:F,warnText:z,allowCustomValue:q=!1,slug:H,inputProps:K,...W}=e,U=V("enable-v12-dynamic-floating-styles")||c,{refs:Y,floatingStyles:Q,middlewareData:Z}=(0,fe.we)(U?{placement:m,strategy:"fixed",middleware:c?[(0,be.UU)(),(0,be.jD)()]:void 0,whileElementsMounted:he.ll}:{}),X=Y?.reference?.current,ae="undefined"!=typeof HTMLElement&&X instanceof HTMLElement?X.clientWidth:void 0;(0,a.useEffect)(()=>
2{if(U){const e={...Q,visibility:Z.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{Y.floating.current&&(Y.floating.current.style[t]=e[t])}),ae&&Y.floating.current&&(Y.floating.current.style.width=ae+"px")}},[U,Q,Y.floating,ae]);const[oe,ie]=(0,a.useState)(kn({initialSelectedItem:y,itemToString:_,selectedItem:D})),[le,se]=(0,a.useState)("");(0,a.useEffect)(()=>{if(B){if(oe.length>=n.current)if(oe){const e=N.filter(e=>!Dt(e)&&Cn({item:_(e),inputValue:oe}));if(e.length>0){const t=_(e[0]);se(t.slice(oe.length))}else se("")}else se("");else se("");n.current=oe.length}},[B,oe,N,_,Cn]);const ce=(0,a.useRef)(!1),ue=(0,a.useRef)(""),[pe,me]=(0,a.useState)(!1),ge=i(),{isFluid:xe}=(0,a.useContext)(Pt),ve=(0,a.useRef)(null),ye=(0,a.useRef)(null),$e=j(),[we,Ne]=(0,a.useState)(!1),Te=(0,a.useRef)(oe),je=(0,a.useRef)(D),_e=(0,a.useRef)(!1),Ce=(0,a.useRef)({pending:!1,value:void 0});(0,a.useEffect)(()=>{ce.current=pe,pe&&me(!1)},[pe]),(0,a.useEffect)(()=>{if(je.current!==D){Ce.current={pending:!0,value:D};const e=kn({initialSelectedItem:y,itemToString:_,selectedItem:D,prevSelectedItem:je.current});oe!==e&&(ie(e),k({selectedItem:D,inputValue:e})),je.current=D}},[D]);const ke=(e,t,n)=>e.filter(e=>B?Cn({item:t(e),inputValue:n}):A?A({item:e,itemToString:t,inputValue:n}):_n());(0,a.useEffect)(()=>{Te.current!==oe&&(Te.current=oe,I?.(oe))},[oe]);const Ie=()=>{ve?.current&&ve.current.focus()},Se=e=>ke(N,_,e||null),Ee=t=>(({items:e,itemToString:t=Xe},n)=>{if(!n)return-1;const r=n.toLowerCase();for(let n=0;n<e.length;n++){const a=t(e[n]).toLowerCase();if(!Dt(e[n])&&-1!==a.indexOf(r))return n}return-1})({...e,items:Se(t)},t),Re=(0,a.useCallback)((e,t)=>{const{type:n,changes:r}=t,{highlightedIndex:a}=r;switch(n){case hn:if(q&&-1===a){const t=e.inputValue??"",n=void 0===r.selectedItem?e.selectedItem:r.selectedItem;if(null!=n&&_(n)===t&&N.some(e=>bn()(e,n)))return r;const a=""===t?null:N.find(e=>_(e)===t)??t,o="string"==typeof a&&""!==a&&!N.some(e=>bn()(e,a));return!bn()(n,a)&&k&&(k({selectedItem:a,inputValue:t}),ue.current=o?t:""),{...r,selectedItem:a}}if(e.inputValue&&-1===a&&r.selectedItem)return{...r,inputValue:_(r.selectedItem)};if(!q){const t=e.inputValue??"";if(!t||!N.some(e=>_(e)===t)){const t=void 0!==D?D:e.selectedItem,n=null!==t?_(t):"";return{...r,inputValue:n}}}return r;case gn:if(!q)if(-1!==e.highlightedIndex){const t=ke(N,_,oe)[e.highlightedIndex];if(t&&!Dt(t))return{...r,selectedItem:t,inputValue:_(t)}}else{const t=Ee(oe);if(-1!==t){const e=N[t];if(e&&!Dt(e))return{...r,selectedItem:e,inputValue:_(e)}}if(null!==e.selectedItem)return{...r,selectedItem:null,inputValue:oe}}return{...r,isOpen:!0};case xn:case vn:if(e.isOpen&&!r.isOpen&&!q){const t=e.inputValue??"";if(!t||!N.some(e=>_(e)===t)){const t=void 0!==D?D:e.selectedItem,n=null!==t?_(t):"";return{...r,inputValue:n}}}return r;case Nn:return{...r,highlightedIndex:e.highlightedIndex};case $n:case wn:return-1===a?{...r,highlightedIndex:0}:r;case yn:return{...r,highlightedIndex:e.highlightedIndex};default:return r}},[q,oe,_,N,k]),Oe=mt({id:v,readOnly:O,disabled:f||!1,invalid:$||!1,invalidText:w,warn:F||!1,warnText:z}),De=u()(`${ge}--combo-box`,{[`${ge}--combo-box--invalid--focused`]:$&&we,[`${ge}--list-box--up`]:"top"===m,[`${ge}--combo-box--warning`]:Oe.warn,[`${ge}--combo-box--readonly`]:O,[`${ge}--autoalign`]:U}),Ae=u()(`${ge}--label`,{[`${ge}--label--disabled`]:f}),Le=`combobox-helper-text-${$e}`,Me=`combobox-warn-text-${$e}`,Pe=`combobox-invalid-text-${$e}`,Be=u()(`${ge}--form__helper-text`,{[`${ge}--form__helper-text--disabled`]:f}),Fe=u()(`${ge}--list-box__wrapper`,[d,{[`${ge}--list-box__wrapper--fluid--invalid`]:xe&&$,[`${ge}--list-box__wrapper--slug`]:H,[`${ge}--list-box__wrapper--decorator`]:p}]),ze=u()(`${ge}--text-input`,{[`${ge}--text-input--empty`]:!oe,[`${ge}--combo-box--input--focus`]:we}),qe=H??p,He=G(qe,Ze),Ke=He?(0,a.cloneElement)(qe,{size:"mini"}):qe,{getInputProps:Ve,getItemProps:We,getLabelProps:Ue,getMenuProps:Ge,getToggleButtonProps:Ye,isOpen:Qe,highlightedIndex:Je,selectedItem:et,closeMenu:tt,openMenu:nt,reset:rt,selectItem:at,setHighlightedIndex:ot,setInputValue:it,toggleMenu:lt}=(0,mn.Bp)({items:ke(N,_,oe),inputValue:oe,itemToString:e=>_(e),onInputValueChange({inputValue:e}){const t=e||"";ie(t),ot(Ee(t))},onHighlightedIndexChange:({highlightedIndex:e})=>
2{if(e>-1){const t=document.querySelectorAll(`li.${ge}--list-box__menu-item[role="option"]`)[e];t&&t.scrollIntoView({behavior:"smooth",block:"nearest"})}},initialSelectedItem:y,inputId:v,stateReducer:Re,isItemDisabled:Dt,...g,onStateChange:({type:e,selectedItem:t})=>{ce.current||_e.current?_e.current=!1:(g?.onStateChange?.({type:e,selectedItem:t}),e!==Tn&&e!==jn&&e!==gn&&(q||e!==hn)||void 0===t||bn()(st,t)||(N.some(e=>bn()(e,t))&&(ue.current=""),k({selectedItem:t})))}}),st=void 0!==D?D:et;(0,a.useEffect)(()=>{if(Ce.current.pending){const{value:e}=Ce.current,t=void 0===e?null:e;Ce.current.pending=!1,bn()(et,t)||(_e.current=!0,at(t))}},[et,D,at]),(0,a.useEffect)(()=>{b&&(b.current={closeMenu:tt,openMenu:nt,reset:rt,selectItem:at,setHighlightedIndex:ot,setInputValue:it,toggleMenu:lt})},[tt,nt,rt,at,ot,it,lt]);const ct=Ye({disabled:f||O,onClick:(e=>t=>{if(E&&E(t),O)return t.preventDownshiftDefault=!0,void t?.persist?.();t.target===ve.current&&e&&(t.preventDownshiftDefault=!0,t?.persist?.())})(Qe),onMouseUp(e){Qe&&e.stopPropagation()}}),dt=e=>{Ne("focus"===e.type),r.current?.value||"blur"!==e.type||at(null)},ut=O?{onKeyDown:e=>{"Tab"!==e.key&&e.preventDefault()},onClick:e=>{e.preventDefault(),e.currentTarget.focus()}}:{},bt=Oe.invalid&&w&&Pe||Oe.warn&&z&&Me||x&&!xe&&Le||void 0,ht=(0,a.useMemo)(()=>Ge({ref:U?Y.setFloating:null}),[U,s,o,Ge,Y.setFloating]);return(0,a.useEffect)(()=>{if(ve.current&&r.current&&le){const e=oe.length,t=e+le.length;r.current.value=oe+le,r.current.setSelectionRange(e,t)}},[oe,le]),ft(ye,"The ComboBox component `titleText` prop must have no interactive content"),(0,l.jsxs)("div",{className:Fe,children:[M&&(0,l.jsx)(h,{as:"label",className:Ae,...Ue(),ref:ye,children:M}),(0,l.jsxs)(tn,{onFocus:dt,onBlur:dt,className:De,disabled:f,invalid:Oe.invali
2d,invalidText:w,invalidTextId:Pe,isOpen:Qe,light:C,size:L,warn:Oe.warn,ref:U?Y.setReference:null,warnText:z,warnTextId:Me,children:[(0,l.jsxs)("div",{className:`${ge}--list-box__field`,children:[(0,l.jsx)("input",{disabled:f,className:ze,type:"text",tabIndex:0,"aria-haspopup":"listbox",title:ve?.current?.value,...Ve({"aria-label":M?void 0:s||o,"aria-controls":ht.id,placeholder:R,value:oe,...K,onChange:e=>{const t=e.target.value,n=q&&ue.current&&oe===ue.current&&""===t;ie(t),it(t),n&&(me(!0),k({selectedItem:null,inputValue:""}),at(null),ue.current="")},ref:At(ve,t,r),onKeyDown:e=>{if(de(e,te)&&e.stopPropagation(),!de(e,J)||oe&&!q||(lt(),-1!==Je&&at(ke(N,_,oe)[Je]),q&&Qe&&oe&&-1===Je&&(ue.current=oe,k({selectedItem:null,inputValue:oe})),e.preventDownshiftDefault=!0,e?.persist?.()),de(e,ee)&&oe&&e.target===ve.current&&Qe&&(lt(),e.preventDownshiftDefault=!0,e?.persist?.()),de(e,re)&&"Numpad7"!==e.code&&e.target.setSelectionRange(0,0),de(e,ne)&&"Numpad1"!==e.code&&e.target.setSelectionRange(e.target.value.length,e.target.value.length),e.altKey&&"ArrowDown"==e.key&&(e.preventDownshiftDefault=!0,Qe||lt()),e.altKey&&"ArrowUp"==e.key&&(e.preventDownshiftDefault=!0,Qe&&lt()),oe||-1!=Je||"Enter"!=e.key||(Qe||lt(),at(null),e.preventDownshiftDefault=!0,"false"===e.currentTarget.ariaExpanded&&nt()),B&&"Tab"===e.key){if(!Qe)return;const e=N.find(e=>!Dt(e)&&_(e).toLowerCase().startsWith(oe.toLowerCase()));if(e){const t=_(e);it(t),at(e)}}}}),...W,...ut,readOnly:O,"aria-describedby":bt}),Oe.invalid&&(0,l.jsx)(pt.BF,{className:`${ge}--list-box__invalid-icon`}),Oe.warn&&(0,l.jsx)(pt.OR,{className:`${ge}--list-box__invalid-icon ${ge}--list-box__invalid-icon--warning`}),oe&&(0,l.jsx)(ln,{clearSelection:()=>{me(!0),ie(""),k({selectedItem:null}),at(null),ue.current="",Ie()},translateWithId:P,disabled:f||O,onClearSelection:Ie,selectionCount:0}),(0,l.jsx)(pn,{...ct,isOpen:Qe,translateWithId:P})]}),H?Ke:p?(0,l.jsx)("div",{className:`${ge}--list-box__inner-wrapper--decorator`,children:He?Ke:(0,l.jsx)("span",{children:Ke})}):"",(0,l.jsx)(tn.Menu,{...ht,children:Qe?ke(N,_,oe).map((e,t)=>{const n=null!==e&&"object"==typeof e&&"text"in e&&T?e.text?.toString():_(e),r=We({item:e,index:t}),a=r["aria-disabled"],{"aria-disabled":o,"aria-selected":i,...s}=r,c=bn()(st,e);return(0,l.jsxs)(tn.MenuItem,{isActive:c,isHighlighted:Je===t,title:n,disabled:a,...s,"aria-selected":c,children:[T?T(e):_(e),c&&(0,l.jsx)(S.MG,{className:`${ge}--list-box__menu-item__selected-icon`})]},r.id)}):null})]}),x&&!Oe.invalid&&!Oe.warn&&!xe&&(0,l.jsx)(h,{as:"div",id:Le,className:Be,children:x})]})});function Sn(e){const[t,n]=(0,a.useState)(!1),[r,o]=(0,a.useState)([[-1,-1],[-1,-1]]);function i(){n(!1)}return{open:t,x:r[0],y:r[1],handleClick:function(){t?i():function(){const t=e?.current||e;if(t){const{left:e,top:n,right:r,bottom:a}=t.getBoundingClientRect();o([[e,r],[n,a]])}n(!0)}()},handleMousedown:function(e){e.preventDefault()},handleClose:i}}In.displayName="ComboBox",In.propTypes={allowCustomValue:m().bool,"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),autoAlign:m().bool,className:m().string,decorator:m().node,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().object,downshiftActions:m().exact({current:m().any}),helperText:m().node,id:m().string.isRequired,initialSelectedItem:m().oneOfType([m().object,m().string,m().number]),invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,light:I(m().bool,"The `light` prop for `Combobox` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),onChange:m().func.isRequired,onInputChange:m().func,onToggleClick:m().func,placeholder:m().string,readOnly:m().bool,selectedItem:m().oneOfType([m().object,m().string,m().number]),shouldFilterItem:m().func,size:Mt,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),titleText:m().node,translateWithId:m().func,typeahead:m().bool,w
2arn:m().bool,warnText:m().node,inputProps:m().object};const En={"carbon.combo-button.additional-actions":"Additional actions"},Rn=e=>En[e],On=a.forwardRef(function({children:e,className:t,disabled:n,label:r,onClick:o,size:s="lg",menuAlignment:c="bottom",tooltipAlignment:d,translateWithId:p=Rn,...m},f){const b=V("enable-v12-dynamic-floating-styles"),h=j("combobutton"),g=i(),x=(0,a.useRef)(null),y=[];b||y.push((0,be.UU)({crossAxis:!1}),(0,be.jD)()),"bottom"!==c&&"top"!==c||y.push((0,be.Ej)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}));const{refs:$,floatingStyles:w,placement:N,middlewareData:T}=(0,fe.we)({placement:c,strategy:"fixed",middleware:y,whileElementsMounted:he.ll}),_=At(f,x,$.setReference),{open:C,handleClick:k,handleMousedown:I,handleClose:E}=Sn(x);v(()=>{const e={...w,visibility:T.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{$.floating.current&&($.floating.current.style[t]=e[t])})},[w,$.floating,T,N,C]);const R=u()(`${g}--combo-button__container`,`${g}--combo-button__container--${s}`,{[`${g}--combo-button__container--open`]:C},t),O=u()(`${g}--combo-button__${c}`),D=u()(`${g}--combo-button__primary-action`),A=u()(`${g}--combo-button__trigger`);return(0,l.jsxs)("div",{...m,className:R,ref:_,"aria-owns":C?h:void 0,children:[(0,l.jsx)("div",{className:D,children:(0,l.jsx)(gt,{title:r,size:s,disabled:n,onClick:function(e){o&&o(e)},children:r})}),(0,l.jsx)(Oe,{ref:$.setReference,className:A,label:p("carbon.combo-button.additional-actions"),size:s,disabled:n,align:d,"aria-haspopup":!0,"aria-expanded":C,onClick:function(){x.current&&k()},onMouseDown:I,"aria-controls":C?h:void 0,children:(0,l.jsx)(S.yQ,{})}),(0,l.jsx)(ot,{containerRef:x,menuAlignment:c,className:O,ref:$.setFloating,id:h,label:p("carbon.combo-button.additional-actions"),size:s,open:C,onClose:E,children:e})]})});On.propTypes={children:m().node.isRequired,className:m().string,disabled:m().bool,label:m().string.isRequired,menuAlignment:m().oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end"]),onClick:m().func,size:m().oneOf(["xs","sm","md","lg"]),tooltipAlignment:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),translateWithId:m().func};const Dn=a.createContext(1),An=["one","two","three"],Ln=[0,1,2],Mn=Ln[0],Pn=Ln[Ln.length-1],Bn=(e,t,n)=>Math.min(n,Math.max(t,e)),Fn=a.forwardRef((e,t)=>{const{as:n,className:r,children:o,level:s,withBackground:c=!1,...d}=e,p=a.useContext(Dn),m=s??p,f=i(),b=u()(`${f}--layer-${An[m]}`,{[`${f}--layer__with-background`]:c},r),h=Bn(m+1,Mn,Pn),g=n||"div";return(0,l.jsx)(Dn.Provider,{value:h,children:(0,l.jsx)(g,{ref:t,...d,className:b,children:o})})});Fn.displayName="Layer",Fn.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,className:m().string,level:m().oneOf([0,1,2]),withBackground:m().bool};const zn=(0,a.createContext)({}),qn=a.forwardRef(function({buttonOnClick:e,children:t,className:n,closeClassName:r,closeIconClassName:o,closeModal:s,iconDescription:c="Close",label:d,labelClassName:p,title:m,titleClassName:f,...b},h){const g=i(),x=j(),{setLabelId:v,setTitleId:y}=(0,a.useContext)(zn),$=`${g}--modal-header__label--${x}`,w=`${g}--modal-header__heading--${x}`;(0,a.useEffect)(()=>{if(d&&v)return v($),()=>v(void 0)},[d,$,v]),(0,a.useEffect)(()=>{if(m&&y)return y(w),()=>y(void 0)},[m,w,y]);const N=u()(`${g}--modal-header`,n),T=u()(`${g}--modal-header__label ${g}--type-delta`,p),_=u()(`${g}--modal-header__heading ${g}--type-beta`,f),C=u()(`${g}--modal-close`,r),k=u()(`${g}--modal-close__icon`,o);return(0,l.jsxs)("div",{className:N,...b,ref:h,children:[d&&(0,l.jsx)("h2",{id:$,className:T,children:d}),m&&(0,l.jsx)("h2",{id:w,className:_,children:m}),t,(0,l.jsx)("div",{className:`${g}--modal-close-button`,children:(0,l.jsx)(Oe,{className:C,label:c,onClick:function(t){s?.(t),e?.(t)},"aria-label":c,align:"left",children:(0,l.jsx)(S.bm,{size:20,"aria-hidden":"true",tabIndex:"-1",className:k})})})]})});qn.propTypes={buttonOnClick:m().func,children:m().node,className:m().string,closeClassName:m().string,closeIconClassName:m().string,closeModal:m().func,iconDescription:m().string,label:m().string,labelClassName:m().string,title:m().node,titleClassName:m().string};const Hn=e=>{if(e.matches('[aria-modal="true"]'))return!0;
2if(!(e instanceof HTMLDialogElement&&e.open))return!1;try{return e.matches(":modal")}catch{return!0}},Kn=(e,t)=>{if(!(e instanceof Element))return!1;for(let n=e;n;n=n.parentElement)if(Hn(n))return!n.contains(t);return!1};function Vn({active:e=!0,className:t,withOverlay:n=!0,small:r=!1,description:o="loading",...s}){const c=i(),d=(0,a.useRef)(null);((e,t)=>{(0,a.useEffect)(()=>{const n=e.current;if(!t||!n)return;const r=document.activeElement instanceof HTMLElement?document.activeElement:null;document.activeElement!==document.body||Kn(r,n)||n.focus();let a=!1;const o=()=>{if(!a){a=!0;try{n.focus()}finally{a=!1}}},i=e=>{const{target:t}=e;t instanceof Node&&!n.contains(t)&&(Kn(t,n)||o())},l=e=>{de(e,X)&&(Kn(e.target,n)||(e.preventDefault(),o()))};return document.addEventListener("focusin",i,!0),document.addEventListener("keydown",l,!0),()=>{document.removeEventListener("focusin",i,!0),document.removeEventListener("keydown",l,!0),((e,t)=>{const n=document.activeElement;if(n&&n!==document.body&&!e.contains(n)||!t?.isConnected)return;if(t.focus(),document.activeElement===t)return;const r=t.parentElement;r&&r!==document.body&&r!==document.documentElement&&(e=>{const t=e.hasAttribute("tabindex");t||e.setAttribute("tabindex","-1"),e.focus(),t||(document.activeElement===e?e.addEventListener("blur",()=>e.removeAttribute("tabindex"),{once:!0}):e.removeAttribute("tabindex"))})(r)})(n,r)}},[e,t])})(d,n&&e);const p=u()(t,{[`${c}--loading`]:!0,[`${c}--loading--small`]:r,[`${c}--loading--stop`]:!e}),m=u()({[`${c}--loading-overlay`]:!0,[`${c}--loading-overlay--stop`]:!e}),f=(0,l.jsx)("div",{...s,"aria-atomic":"true","aria-live":e?"assertive":"off",className:p,children:(0,l.jsxs)("svg",{className:`${c}--loading__svg`,viewBox:"0 0 100 100",role:"img","aria-label":o,children:[(0,l.jsx)("title",{children:o}),r?(0,l.jsx)("circle",{className:`${c}--loading__background`,cx:"50%",cy:"50%",r:"42"}):null,(0,l.jsx)("circle",{className:`${c}--loading__stroke`,cx:"50%",cy:"50%",r:r?"42":"44"})]})});return n?(0,l.jsx)("div",{className:m,role:"presentation",children:(0,l.jsx)("div",{ref:d,role:e?"dialog":void 0,"aria-label":e?o:void 0,tabIndex:e?-1:void 0,children:f})}):f}Vn.propTypes={active:m().bool,className:m().string,description:m().string,id:I(m().string,"\nThe prop `id` is no longer needed."),small:m().bool,withOverlay:m().bool};var Wn=Vn,Un=n(30496);const Gn=({className:e,status:t="active",iconDescription:n,description:r,onSuccess:o,successDelay:s=1500,...c})=>{const d=i(),p=u()(`${d}--inline-loading`,e),m=(0,a.useRef)(null);(0,a.useEffect)(()=>("finished"===t&&(m.current=setTimeout(()=>{o&&o()},s)),()=>{m.current&&(clearTimeout(m.current),m.current=null)}),[t,o,s]);const f=r&&(0,l.jsx)("div",{className:`${d}--inline-loading__text`,children:r}),b=(()=>{let e=n||t;if("error"===t)return(0,l.jsx)(Un.x,{className:`${d}--inline-loading--error`,children:(0,l.jsx)("title",{children:e})});if("finished"===t)return(0,l.jsx)(S._j,{className:`${d}--inline-loading__checkmark-container`,children:(0,l.jsx)("title",{children:e})});if("inactive"===t||"active"===t){if("inactive"===t)return;return n||(e="loading"),(0,l.jsx)(Wn,{small:!0,description:e,withOverlay:!1,active:"active"===t})}})(),h=b&&(0,l.jsx)("div",{className:`${d}--inline-loading__animation`,children:b});return(0,l.jsxs)("div",{className:p,...c,"aria-live":c["aria-live"]??("inactive"===t?"off":"assertive"),children:[h,f]})};Gn.propTypes={className:m().string,description:m().node,iconDescription:m().string,onSuccess:m().func,status:m().oneOf(["inactive","active","finished","error"]),successDelay:m().number};var Yn=Pe,Qn=Gn;function Zn({secondaryButtons:e,secondaryButtonText:t,secondaryClassName:n,closeModal:r,onRequestClose:a,disabled:o}){function i(e){r(e),a(e)}return Array.isArray(e)&&e.length<=2?(0,l.jsx)(l.Fragment,{children:e.map(({buttonText:e,onClick:t},r)=>(0,l.jsx)(gt,{className:n,kind:"secondary",onClick:t||i,children:e},`${e}-${r}`))}):t?(0,l.jsx)(gt,{disabled:o,className:n,onClick:i,kind:"secondary",children:t}):null}Zn.propTypes={closeModal:m().func,disabled:m().bool,onRequestClose:m().func,secondaryButtonText:m().string,
2secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},secondaryClassName:m().string};const Xn=a.forwardRef(function({children:e,className:t,closeModal:n=dt,danger:r,dangerDescription:a="",inputref:o,onRequestClose:s=dt,onRequestSubmit:c=dt,primaryButtonDisabled:d,primaryButtonText:p,primaryClassName:m,secondaryButtonText:f,secondaryButtons:b,secondaryClassName:h,loadingStatus:g="inactive",loadingDescription:x,loadingIconDescription:v,onLoadingSuccess:y=dt,...$},w){const N=i(),T=u()(`${N}--modal-footer`,t,Array.isArray(b)&&2===b.length?`${N}--modal-footer--three-button`:null),j=u()(m,"inactive"!==g?`${N}--btn--loading`:null),_="inactive"!==g,C={closeModal:n,secondaryButtons:b,secondaryButtonText:f,secondaryClassName:h,onRequestClose:s,disabled:_};return(0,l.jsxs)(Yn,{className:T,...$,ref:w,"aria-busy":_,children:[(0,l.jsx)(Zn,{...C}),p&&(0,l.jsx)(gt,{onClick:c,className:j,disabled:_||d,dangerDescription:a,kind:r?"danger":"primary",ref:o,children:"inactive"===g?p:(0,l.jsx)(Qn,{status:g,description:x,iconDescription:v,className:`${N}--inline-loading--btn`,onSuccess:y})}),e]})});Xn.propTypes={children:m().node,className:m().string,closeModal:m().func,danger:m().bool,dangerDescription:m().string,inputref:m().oneOfType([m().func,m().shape({current:m().any})]),loadingDescription:m().string,loadingIconDescription:m().string,loadingStatus:m().oneOf(["inactive","active","finished","error"]),onLoadingSuccess:m().func,onRequestClose:m().func,onRequestSubmit:m().func,primaryButtonDisabled:m().bool,primaryButtonText:m().string,primaryClassName:m().string,secondaryButtonText:m().string,secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},secondaryClassName:m().string};const Jn=(e,t,n)=>{e.classList.toggle(t,n)};var er=n(13066);const tr="undefined"!=typeof Node?Node.DOCUMENT_POSITION_PRECEDING|Node.DOCUMENT_POSITION_CONTAINS:0,nr="undefined"!=typeof Node?Node.DOCUMENT_POSITION_FOLLOWING|Node.DOCUMENT_POSITION_CONTAINED_BY:0,rr=(e,t=[],n="cds")=>e instanceof Element&&"function"==typeof e.closest&&[`.${n}--overflow-menu-options`,`.${n}--tooltip`,".flatpickr-calendar",...t].some(t=>!!e.closest(t)),ar=({bodyNode:e,startTrapNode:t,endTrapNode:n,currentActiveNode:r,oldActiveNode:a,selectorsFloatingMenus:o,prefix:i="cds"})=>{if(e&&r&&a&&!e.contains(r)&&!rr(r,o,i)){const o=a.compareDocumentPosition(r);if(r===t||o&tr){const t=Array.from(e.querySelectorAll(ue)).reverse().find(({offsetParent:e})=>Boolean(e));t?t.focus():e!==a&&e.focus()}else if(r===n||o&nr){const t=Array.from(e.querySelectorAll(ue)).find(({offsetParent:e})=>Boolean(e));t?t.focus():e!==a&&e.focus()}}},or=({containerNode:e,currentActiveNode:t,event:n})=>{if(!e)return;if(["blur","focusout","focusin","focus"].includes(n.type))throw new Error(`Error: wrapFocusWithoutSentinels(...) called in unsupported ${n.type} event.\n\nCall wrapFocusWithoutSentinels(...) from onKeyDown instead.`);const r=(0,er.Kr)(e),a=r[0],o=r[r.length-1];t!==o||n.shiftKey||(n.preventDefault(),a.focus()),t===a&&n.shiftKey&&(n.preventDefault(),o.focus())},ir=(0,a.createContext)({}),lr=a.forwardRef(({children:e,className:t,focusAfterCloseRef:n,modal:r,onCancel:o=dt,onClick:s=dt,onClose:c=dt,onRequestClose:d=dt,open:p=!1,role:m,"aria-label":f,"aria-labelledby":b,"aria-describedby":h,ariaLabel:g,ariaLabelledBy:x,ariaDescribedBy:v,...y},$)=>{const w=i(),N=j(),[T,_]=(0,a.useState)(void 0),[C,k]=(0,a.useState)(void 0),I=(0,a.useRef)(null),S=$??I;(0,a.useEffect)(()=>{S.current&&(p?r?S.current.showModal():S.current.show():S.current.close())},[r,p]),(0,a.useEffect)(()=>{if(!p&&n){const e=setTimeout(()=>{n.current?.focus()});return()=>{clearTimeout(e)}}},[p,n]);const E=u()(`${w}--dialog-container`),R={dialogId:N,titleId:T,subtitleId:C,isOpen:p,setTitleId:_,setSubtitleId:k};return(0,a.useEffect)(()=>{const e=f||g,t=b||x;if(S.current&&p&&!e&&!t){const e=S.current.querySelector(`.${w}--dialog-header__heading`);
2e&&e.id&&S.current.setAttribute("aria-labelledby",e.id)}},[p,f,g,b,x,w]),(0,l.jsx)(ir.Provider,{value:R,children:(0,l.jsx)("dialog",{...y,className:u()(`${w}--dialog`,{[`${w}--dialog--modal`]:r},t),ref:S,onCancel:o,onClick:function(e){!function(e){p&&r&&e.target===S.current&&d(e)}(e),s(e)},onClose:c,role:m,"aria-label":f||g,"aria-labelledby":f||g?void 0:b||x||T,"aria-describedby":h||v,children:(0,l.jsx)("div",{className:E,children:e})})})});lr.displayName="Dialog",lr.propTypes={children:m().node,className:m().string,focusAfterCloseRef:m().oneOfType([m().func,m().shape({current:m().any})]),modal:m().bool,onRequestClose:m().func,open:m().bool,role:m().oneOf(["dialog","alertdialog"]),"aria-label":m().string,"aria-labelledby":m().string,"aria-describedby":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`"),ariaLabelledBy:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-labelledby`"),ariaDescribedBy:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-describedby`")};const sr=a.forwardRef(({children:e,...t},n)=>{const r=i();return(0,l.jsx)("div",{className:`${r}--dialog__header`,ref:n,...t,children:e})});sr.displayName="DialogHeader",sr.propTypes={children:m().node};const cr=a.forwardRef(({children:e,...t},n)=>{const r=i();return(0,l.jsx)("div",{className:`${r}--dialog__header-controls`,ref:n,...t,children:e})});cr.displayName="DialogControls",cr.propTypes={children:m().node};const dr=a.forwardRef(({onClick:e,...t},n)=>{const r=i();return(0,l.jsx)(Oe,{kind:"ghost",className:`${r}--dialog__close`,label:"Close",title:"Close","aria-label":"Close",align:"left",onClick:e,ref:n,...t,children:(0,l.jsx)(S.bm,{size:20,"aria-hidden":"true",tabIndex:-1,className:`${r}--icon__close`})})});dr.displayName="DialogCloseButton",dr.propTypes={onClick:m().func};const ur=a.forwardRef(({children:e,className:t,id:n,...r},o)=>{const s=i(),{dialogId:c,setTitleId:d}=(0,a.useContext)(ir),p=n??`${s}--dialog-header__heading--${c}`;return(0,a.useEffect)(()=>(d?.(p),()=>d?.(void 0)),[p,d]),(0,l.jsx)(h,{as:"h2",id:p,className:u()(`${s}--dialog-header__heading`,t),ref:o,...r,children:e})});ur.displayName="DialogTitle",ur.propTypes={children:m().node,className:m().string,id:m().string};const pr=a.forwardRef(({children:e,className:t,id:n,...r},o)=>{const s=i(),{dialogId:c,setSubtitleId:d}=(0,a.useContext)(ir),p=n??`${s}--dialog-header__label--${c}`;return(0,a.useEffect)(()=>(d?.(p),()=>d?.(void 0)),[p,d]),(0,l.jsx)(h,{as:"h2",id:p,className:u()(`${s}--dialog-header__label`,t),ref:o,...r,children:e})});pr.displayName="DialogSubtitle",pr.propTypes={children:m().node,className:m().string,id:m().string};const mr=a.forwardRef(({children:e,className:t,hasScrollingContent:n,...r},o)=>{const s=i(),c=(0,a.useRef)(null),d=`${s}--dialog-body--${j()}`,{titleId:p,subtitleId:m}=(0,a.useContext)(ir),{height:f}=xt({ref:c}),b=!!c.current&&c?.current?.scrollHeight>c?.current?.clientHeight,h=u()(`${s}--dialog-content`,{[`${s}--dialog-scroll-content`]:n||b,[`${s}--dialog-scroll-content--no-fade`]:f<=300},t),g=n||b?{tabIndex:0,role:"region","aria-labelledby":m??p}:{};return(0,l.jsx)(Fn,{ref:e=>{"function"==typeof o?o(e):o&&(o.current=e),c.current=e},id:d,className:h,...g,...r,children:e})});mr.displayName="DialogBody",mr.propTypes={children:m().node,className:m().string,hasScrollingContent:m().bool};const fr=a.forwardRef(({children:e,className:t,onRequestClose:n=dt,onSecondarySubmit:r,onRequestSubmit:o=dt,primaryButtonText:s="Save",primaryButtonDisabled:c=!1,secondaryButtonText:d="Cancel",secondaryButtons:p,loadingStatus:m="inactive",loadingDescription:f,loadingIconDescription:b,onLoadingSuccess:h=dt,danger:g=!1,dangerDescription:x="",...v},y)=>{const $=i(),w=(0,a.useRef)(null),{isOpen:N}=(0,a.useContext)(ir),[T,j]=(0,a.useState)(null);(0,a.useEffect)(()=>{if(g&&T){const e=requestAnimationFrame(()=>{T.focus()});return()=>cancelAnimationFrame(e)}},[g,T,N]);const _=u()(`${$}--dialog-footer`,t,{[`${$}--dialog-footer--three-button`]:Array.isArray(p)&&2===p.length}),C="inactive"!==m,k=u()({[`${$}--btn--loading`]:"inactive"!==m}),I=r||n;return e?(0,l.jsx)(Yn,{className:_,ref:y,...v,children:e}):(0,l.jsxs)(Yn,{className:_,"aria-busy":C,ref:y,...v,children:[Array.isArray(p)&&p.length<=2?p.map(({buttonText:e,onClick:t},n)=>(0,l.jsx)(gt,{autoFocus:g,kind:"secondary",ref:0===n&&g?j:void 0,onClick:t,children:e},`${e}-${n}`)):d&&(0,l.jsx)(gt,{ref:g?j:void 0,disabled:C,kind:"secondary",autoF
2ocus:g,onClick:I,children:d}),(0,l.jsx)(gt,{className:k,kind:g?"danger":"primary",dangerDescription:x,disabled:C||c,onClick:o,ref:w,children:"inactive"===m?s:(0,l.jsx)(Gn,{status:m,description:f,iconDescription:b,className:`${$}--inline-loading--btn`,onSuccess:h})})]})});fr.displayName="DialogFooter",fr.propTypes={children:m().node,className:m().string,onRequestClose:m().func,onSecondarySubmit:m().func,onRequestSubmit:m().func,primaryButtonText:m().node,primaryButtonDisabled:m().bool,secondaryButtonText:m().node,secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},danger:m().bool,dangerDescription:m().string,loadingStatus:m().oneOf(["inactive","active","finished","error"]),loadingDescription:m().string,loadingIconDescription:m().string,onLoadingSuccess:m().func};const br=e=>{const[t,n]=(0,a.useState)(!!e),[r,o]=(0,a.useState)(!!e);return(0,a.useEffect)(()=>{e!==r&&(n(!!e),o(!!e))},[e,r]),(0,a.useMemo)(()=>[t,n],[t])},hr=(0,a.createContext)(void 0),gr=(e,t)=>{const n=(0,a.useRef)(t),r=(0,a.useRef)(null),o=(0,a.useRef)(null),[l,s]=(0,a.useState)(0);t||!o.current||r.current||(n.current=null),o.current=r.current;const{isPresent:c,isExiting:d}=((e,t,n=0,r)=>{const o=i(),[l,s]=(0,a.useState)(t?"idle":"finished"),c="active"===l;return v(()=>{s(e=>t||"idle"!==e?t&&"idle"!==e?"idle":e:"active")},[t]),v(()=>{if(!e.current||!c)return;if(n>0)return;if(!("getAnimations"in e.current))return void s("finished");const t=r??`${o}--presence`,a=e.current.getAnimations({subtree:!0}).filter(e=>e instanceof CSSAnimation&&e.animationName.startsWith(t));if(!a.length)return void s("finished");let i=!1;return Promise.all(a.map(e=>e.finished)).finally(()=>{i||s("finished")}),()=>{i=!0}},[e,c,o,n,r]),{isPresent:t||"finished"!==l,isExiting:c}})(r,e,l),u=(0,a.useCallback)(e=>!(!e||n.current&&n.current!==e||(n.current=e,0)),[]),p=(0,a.useCallback)(()=>{s(e=>e+1);let e=!1;return()=>{e||(e=!0,s(e=>e-1))}},[]);return[c,(0,a.useMemo)(()=>({presenceRef:r,isPresenceExclusive:u,isExiting:d,holdExit:p}),[r,u,d,p])]},xr=({open:e,_presenceId:t,_autoEnablePresence:n=!0,children:r})=>{const o=br(e),[i]=o,[s,c]=gr(i,t),d=(0,a.useMemo)(()=>({modalState:o,autoEnablePresence:n,...c}),[o,n,c]);return s?(0,l.jsx)(vr,{value:d,children:(0,l.jsx)(hr,{value:d,children:r})}):null},vr=(0,a.createContext)(void 0),yr=(e,t)=>{if(!e)return!1;const n=document.querySelectorAll(`.${t}--modal.is-visible`);return n.item(n.length-1)===e},$r=a.forwardRef(function({"aria-label":e,"aria-labelledby":t,className:n,children:r,hasForm:o,hasScrollingContent:s,...c},d){const p=i(),m=(0,a.useRef)(null),{labelId:f,titleId:b}=(0,a.useContext)(zn),{height:h}=xt({ref:m}),g=!!m.current&&m?.current?.scrollHeight>m?.current?.clientHeight,x=u()({[`${p}--modal-content`]:!0,[`${p}--modal-content--with-form`]:o,[`${p}--modal-scroll-content`]:s||g,[`${p}--modal-scroll-content--no-fade`]:h<=300},n);return(0,l.jsx)(Fn,{className:x,...s||g?{tabIndex:0,role:"region","aria-label":e,"aria-labelledby":t||f||b}:{},...c,ref:At(m,d),children:r})});$r.propTypes={"aria-label":m().string,"aria-labelledby":m().string,children:m().node,className:m().string,hasForm:m().bool,hasScrollingContent:m().bool};const wr=a.forwardRef(function({open:e,...t},n){const r=j(),o=V("enable-presence"),i=Boolean((0,a.useContext)(vr)),s=o||i,c=(e=>{const t=(0,a.useContext)(vr);return t?.isPresenceExclusive(e)?t:void 0})(r);return s&&!c?(0,l.jsx)(xr,{open:e??!1,_presenceId:r,_autoEnablePresence:i,children:(0,l.jsx)(Nr,{open:!0,ref:n,...t})}):(0,l.jsx)(Nr,{ref:n,open:e,...t})}),Nr=a.forwardRef(function({"aria-labelledby":e,"aria-label":t,children:n,className:r,containerClassName:o,danger:s,decorator:c,isFullWidth:d,onClose:p,onKeyDown:m,open:f,preventCloseOnClickOutside:b,selectorPrimaryFocus:h="[data-modal-primary-focus]",selectorsFloatingMenus:g,size:x,launcherButtonRef:v,slug:y,...$},w){const N=i(),[T,j]=(0,a.useState)(void 0),[_,k]=(0,a.useState)(void 0),I=(0,a.useRef)(null),S=(0,a.useRef)(null),E=(0,a.useRef)(null),R=(0,a.useRef)(null),O=(0,a.useRef)(null),D=(0,a.useRef)(null),A=(0,a.useContext)(vr),L=(0,fe.SV)([O,w,A?.presenceRef]),M=V("enable-presence")||A?.autoEnablePresence,P=f||M,B=br(P),[F,z]=A?.modalState??B,q=V("enable-dialog-element"),H=V("enable-experimental-focus-wrap-without-sentinels"),K=V("enable-focus-wrap-without-sentinels"),W=H||K;function U(e){const t=document.activeElement instanceof HTMLElement&&I.current?.contains(document.activeElement)?document.activeElement:null;t?.blur(),p&&!1===p(e)?t?.focus():z(!1)}C(!(W&&q),"`<Modal>` detected both `focusTrapWithoutSentinels` and `enableDialogElement` feature flags are enabled. The native dialog element handles focus, so `enableDialogElement` must be off for `focusTrapWithoutSentinels` to have any effect."),(0,a.useEffect)(()=>{q||Jn(document.body,`${N}--body--with-modal-open`,!!P)},[P,N]),(0,a.useEffect)(()=>
2{if(!q)return()=>{Jn(document.body,`${N}--body--with-modal-open`,!1)}},[]);const Y=u()(`${N}--modal`,{"is-visible":M||F,[`${N}--modal--enable-presence`]:A?.autoEnablePresence,[`${N}--modal--danger`]:s,[`${N}--modal--slug`]:y,[`${N}--modal--decorator`]:c},r),Q=u()(`${N}--modal-container`,x&&`${N}--modal-container--${x}`,d&&`${N}--modal-container--full-width`,o);let Z;const J=a.Children.toArray(n).map(e=>G(e,qn)?(Z=e.props.label,(0,a.cloneElement)(e,{closeModal:U})):G(e,Xn)?(0,a.cloneElement)(e,{closeModal:U,inputref:S,danger:s}):e),te=!a.Children.toArray(J).some(e=>G(e,Xn));C(!(!te&&!1===b),"`<ComposedModal>` prop `preventCloseOnClickOutside` should not be `false` when `<ModalFooter>` is present. Transactional, non-passive Modals should not be dissmissable by clicking outside. See: https://carbondesignsystem.com/components/modal/usage/#transactional-modal"),(0,a.useEffect)(()=>{if(!P||q)return;const e=e=>{de(e,ee)&&yr(O.current,N)&&(e.preventDefault(),U(e))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[P,q]),(0,a.useEffect)(()=>{q||M||P||!v||setTimeout(()=>{v.current?.focus()})},[q,M,P,v]),(0,a.useEffect)(()=>{const e=v?.current;return()=>{M&&e&&setTimeout(()=>{e.focus()})}},[M,v]),(0,a.useEffect)(()=>{if(!q){const e=e=>{const t=e||I.current;return(t?t.querySelector(s?`.${N}--btn--secondary`:h):null)||S&&S.current};P&&F&&(t=>{const n=e(t),r=t.querySelector(`.${N}--modal-close`);n?n.focus():!n&&r&&r?.focus()})(I.current)}},[P,h,F]);const ne=y??c,re=G(ne,Ze)?(0,a.cloneElement)(ne,{size:"sm"}):ne,ae=q?(0,l.jsx)(lr,{open:P,onCancel:e=>{e.preventDefault(),U(e)},focusAfterCloseRef:v,modal:!0,className:Q,"aria-label":t||Z,"aria-labelledby":e,"data-exiting":A?.isExiting||void 0,children:(0,l.jsxs)("div",{ref:I,className:`${N}--modal-container-body`,children:[y?re:c?(0,l.jsx)("div",{className:`${N}--modal--inner__decorator`,children:re}):"",J]})}):(0,l.jsxs)("div",{className:Q,role:"dialog","aria-modal":"true","aria-label":t||Z,"aria-labelledby":e,children:[!W&&(0,l.jsx)("button",{type:"button",ref:E,className:`${N}--visually-hidden`,children:"Focus sentinel"}),(0,l.jsxs)("div",{ref:I,className:`${N}--modal-container-body`,children:[y?re:c?(0,l.jsx)("div",{className:`${N}--modal--inner__decorator`,children:re}):"",J]}),!W&&(0,l.jsx)("button",{type:"button",ref:R,className:`${N}--visually-hidden`,children:"Focus sentinel"})]}),oe={labelId:T,titleId:_,setLabelId:j,setTitleId:k};return(0,l.jsx)(zn.Provider,{value:oe,children:(0,l.jsx)(Fn,{...$,level:0,role:"presentation",ref:L,"aria-hidden":!P,onBlur:function({target:e,relatedTarget:t}){if(!q&&!W&&P&&t&&e&&I.current){const{current:n}=I,{current:r}=E,{current:a}=R;
2ar({bodyNode:n,startTrapNode:r,endTrapNode:a,currentActiveNode:t,oldActiveNode:e,selectorsFloatingMenus:g?.filter(Boolean),prefix:N})}const n=document.querySelector(`.${N}--modal-content`);n&&n.classList.contains(`${N}--modal-scroll-content`)&&t&&n.contains(t)&&t.scrollIntoView({block:"center"})},onClick:vt([$?.onClick,function(e){const{target:t}=e,n=D.current;(te&&!b||!te&&!1===b)&&t instanceof Node&&!rr(t,g,N)&&I.current&&!I.current.contains(t)&&!I.current.contains(n)&&U(e)}]),onMouseDown:vt([$?.onMouseDown,function(e){const t=e.target;D.current=t}]),onKeyDown:function(e){q||W&&P&&de(e,X)&&I.current&&or({containerNode:I.current,currentActiveNode:e.target,event:e}),m?.(e)},className:Y,"data-exiting":A?.isExiting||void 0,children:ae})})});wr.propTypes={"aria-label":m().string,"aria-labelledby":m().string,children:m().node,className:m().string,containerClassName:m().string,danger:m().bool,decorator:m().node,isFullWidth:m().bool,launcherButtonRef:m().oneOfType([m().func,m().shape({current:m().any})]),onClose:m().func,onKeyDown:m().func,open:m().bool,preventCloseOnClickOutside:m().bool,selectorPrimaryFocus:m().string,selectorsFloatingMenus:m().arrayOf(m().string.isRequired),size:m().oneOf(["xs","sm","md","lg"]),slug:I(m().node,"The `slug` prop for `ComposedModal` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release.")};const Tr=({action:e,children:t,className:n,disabled:r=!1,onClick:a,renderIcon:o,...s})=>{const c=i(),d=void 0!==a,p=u()(`${c}--contained-list-item`,n,{[`${c}--contained-list-item--clickable`]:d,[`${c}--contained-list-item--with-icon`]:o,[`${c}--contained-list-item--with-action`]:e}),m=(0,l.jsxs)(l.Fragment,{children:[o&&(0,l.jsx)("div",{className:`${c}--contained-list-item__icon`,children:(0,l.jsx)(o,{})}),(0,l.jsx)("div",{children:t})]});return(0,l.jsxs)("li",{className:p,...s,children:[d?(0,l.jsx)("button",{className:`${c}--contained-list-item__content`,type:"button",disabled:r,onClick:a,children:m}):(0,l.jsx)("div",{className:`${c}--contained-list-item__content`,children:m}),e&&(0,l.jsx)(_t,{size:{min:"sm",max:"lg"},className:`${c}--contained-list-item__action`,children:e})]})};Tr.propTypes={action:m().node,children:m().node,className:m().string,disabled:m().bool,onClick:m().func,renderIcon:m().oneOfType([m().func,m().object])};var jr=Tr;const _r=e=>""!==e&&void 0!==e;var Cr=n(75809);const kr=a.forwardRef(({autoComplete:e="off",className:t,closeButtonLabelText:n="Clear search input",defaultValue:r,disabled:o,isExpanded:s=!0,inert:c,id:d,labelText:p,light:m,onChange:f=()=>{},onClear:b=()=>{},onKeyDown:h,onExpand:g,placeholder:x="Search",renderIcon:v,role:y,size:$,tabIndex:w,type:N="search",value:T,..._},C)=>{const k=_r(T)||_r(r),I=i(),{isFluid:E}=(0,a.useContext)(Pt),R=(0,a.useRef)(null),O=Y([C,R]),D=(0,a.useRef)(null),A=(0,a.useRef)(null),L=j("search-input"),M=d||L,P=`${M}-search`,[B,F]=(0,a.useState)(k||!1),z=!!g&&!s,q=u()({[`${I}--search`]:!0,[`${I}--search--${$}`]:$,[`${I}--layout--size-${$}`]:$,[`${I}--search--light`]:m,[`${I}--search--disabled`]:o,[`${I}--search--fluid`]:E},t),H=u()({[`${I}--search-close`]:!0,[`${I}--search-close--hidden`]:!B||!s});function K(){if(!T&&R.current&&(R.current.value=""),R.current){const e=Object.assign({},R.current,{value:""});f({bubbles:!1,cancelable:!1,currentTarget:R.current,defaultPrevented:!1,eventPhase:0,isDefaultPrevented:()=>!1,isPropagationStopped:()=>!1,isTrusted:!1,nativeEvent:new Event("change"),persist:dt,preventDefault:dt,stopPropagation:dt,target:e,timeStamp:0,type:"change"})}b(),F(!1),R.current?.focus()}(0,a.useEffect)(()=>{void 0!==T&&F(_r(T))},[T]);const V=(0,l.jsx)("div",{"aria-labelledby":g?P:void 0,role:g?"button":void 0,className:`${I}--search-magnifier`,onClick:o?void 0:g,onKeyDown:function(e){o||(de(e,J)||de(e,te))&&(e.stopPropagation(),g&&g(e))},tabIndex:z?o?void 0:0:-1,ref:D,"aria-disabled":!(!g||!o)||void 0,"aria-expanded":!(!g||!s)||!(g&&!s)&&void 0,"aria-controls":g?M:void 0,children:(0,l.jsx)(Ir,{icon:v})}),W=!g||s||o?V:(0,l.jsx)(Ie,{className:`${I}--search-tooltip ${I}--search-magnifier-tooltip ${I}--icon-tooltip`,align:"top",label:"Search",children:V});return ft(A,"The Search component `labelText` prop must have no interactive content"),(0,l.jsxs)("div",{role:"search","aria-labelledby":P,className:q,children:[W,(0,l.jsx)("label",{id:P,htmlFor:M,className:`${I}--label`,ref:A,children:p}),(0,l.jsx)("input",{autoComplete:e,className:`${I}
2--search-input`,defaultValue:r,disabled:o,role:y,ref:O,id:M,onChange:vt([f,function(e){F(""!==e.target.value)}]),onKeyDown:vt([h,function(e){de(e,ee)&&(e.stopPropagation(),R.current?.value?K():g&&s&&D.current?.focus())}]),placeholder:x,type:N,value:T,..._,inert:!!z||c,tabIndex:z?-1:w}),(0,l.jsx)("button",{"aria-label":n,className:H,disabled:o,onClick:K,title:n,type:"button",children:(0,l.jsx)(S.bm,{})})]})});function Ir({icon:e}){const t=i();return e?(0,l.jsx)(e,{className:`${t}--search-magnifier-icon`}):(0,l.jsx)(Cr.vj,{className:`${t}--search-magnifier-icon`})}kr.displayName="Search",kr.propTypes={autoComplete:m().string,className:m().string,closeButtonLabelText:m().string,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,id:m().string,isExpanded:m().bool,labelText:m().node.isRequired,light:I(m().bool,"The `light` prop for `Search` is no longer needed and has been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release."),onChange:m().func,onClear:m().func,onExpand:m().func,onKeyDown:m().func,placeholder:m().string,renderIcon:m().oneOfType([m().func,m().object]),role:I(m().string,'The `role` prop has been deprecated since <input type="search"> already provides correct semantics. It will be removed in the next major release of Carbon.'),size:m().oneOf(["xs","sm","md","lg"]),type:m().string,value:m().oneOfType([m().string,m().number])},Ir.propTypes={icon:m().oneOfType([m().func,m().object])};var Sr=kr;const Er=(0,a.forwardRef)((e,t)=>{const{onBlur:n,onChange:r,onExpand:o,onKeyDown:s,defaultValue:c,isExpanded:d,...p}=e,[m,f]=(0,a.useState)(d||!1),[b,h]=(0,a.useState)(_r(c)),g=(0,a.useRef)(null),x=(0,a.useRef)(!1),v=i();(0,a.useEffect)(()=>{f(!!d)},[d]),(0,a.useEffect)(()=>{m&&x.current&&(x.current=!1,g.current?.focus?.())},[m]);const y=u()(`${v}--search--expandable`,{[`${v}--search--expanded`]:m},p.className);return(0,l.jsx)(Sr,{...p,defaultValue:c,isExpanded:m,ref:At(g,t),className:y,onBlur:vt([n,function(e){const t=e.relatedTarget&&e.relatedTarget.classList.contains(`${v}--search-close`);!m||t||b||d||f(!1)}]),onChange:vt([r,function(e){h(""!==e.target.value)}]),onExpand:vt([o,function(){x.current=!0,f(!0)}]),onKeyDown:vt([s,function(e){m&&de(e,ee)&&(e.stopPropagation(),e.target?.value||d||f(!1))}])})});Er.propTypes=Sr.propTypes,Er.displayName="ExpandableSearch";var Rr=Er;const Or=["on-page","disclosed"],Dr=e=>G(e,kr)||G(e,Rr),Ar=({action:e,children:t,className:n,isInset:r,kind:a=Or[0],label:o,size:s,...c})=>{const d=`${j("contained-list")}-header`,p=i(),m=u()(`${p}--contained-list`,{[`${p}--contained-list--inset-rulers`]:r,[`${p}--contained-list--${s}`]:s,[`${p}--layout--size-${s}`]:s},`${p}--contained-list--${a}`,n),f=(e=>Array.isArray(e)?e.filter(e=>!Dr(e)):e&&!Dr(e)?e:null)(t),b=Dr(e);return(0,l.jsxs)("div",{className:m,...c,children:[o&&(0,l.jsxs)("div",{className:`${p}--contained-list__header`,children:[(0,l.jsx)("div",{id:d,className:`${p}--contained-list__label`,children:o}),(0,l.jsx)(_t,{size:{min:"sm",max:"xl"},className:`${p}--contained-list__action`,children:e})]}),t&&(0,l.jsx)("ul",{role:"list","aria-labelledby":o?d:void 0,children:b?f:t})]})};Ar.propTypes={action:m().node,children:m().node,className:m().string,isInset:m().bool,kind:m().oneOf(Or),label:m().oneOfType([m().string,m().node]),size:m().oneOf(["sm","md","lg","xl"])},Object.assign(Ar,{ContainedListItem:jr});const Lr=a.forwardRef((e,t)=>{const{children:n,className:r,disabled:a,index:o,name:s,onClick:c=dt,onKeyDown:d=dt,selected:p=!1,text:m,...f}=e,b=i(),h={onClick:e=>{e.preventDefault(),c?.({index:o,name:s,text:m})},onKeyDown:e=>{const t=e.key||e.which;d?.({index:o,name:s,text:m,key:t})},className:u()(r,`${b}--content-switcher-btn`,{[`${b}--content-switcher--selected`]:p}),disabled:a};return(0,l.jsx)("button",{type:"button",ref:t,role:"tab",tabIndex:p?0:-1,"aria-selected":p,...f,...h,children:(0,l.jsx)("span",{className:`${b}--content-switcher__label`,title:m,children:void 0!==m?m:n})})});Lr.displayName="Switch",Lr.propTypes={children:m().node,className:m().string,disabled:m().bool,index:m().number,name:m().oneOfType([m().str
2ing,m().number]),onClick:m().func,onKeyDown:m().func,selected:m().bool,text:m().string};const Mr=(0,a.forwardRef)((e,t)=>{const{align:n,children:r,className:o,disabled:s,enterDelayMs:c,index:d,leaveDelayMs:p=0,name:m,onClick:f=dt,onKeyDown:b=dt,selected:h=!1,size:g,text:x,...v}=e,y=i(),[$,w]=(0,a.useState)(!1),N=()=>{w(!0)},T=()=>{w(!1)},j=u()(o,`${y}--content-switcher-btn`,{[`${y}--content-switcher--selected`]:h}),_=u()(`${y}--content-switcher-popover__wrapper`,{[`${y}--content-switcher-popover--selected`]:h,[`${y}--content-switcher-popover--disabled`]:s});return(0,l.jsx)(Oe,{label:x,type:"button",ref:t,role:"tab",tabIndex:h||$?0:-1,onMouseEnter:N,onMouseLeave:T,onFocus:N,onBlur:T,"aria-selected":h,"aria-label":x,wrapperClasses:_,...v,align:n,className:j,disabled:s,enterDelayMs:c,leaveDelayMs:p,onClick:e=>{e.preventDefault(),f({index:d,name:m,text:x})},onKeyDown:e=>{const t=e.key||e.which;b({index:d,name:m,text:x,key:t})},size:g,children:r})});Mr.displayName="IconSwitch",Mr.propTypes={align:m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","right"]),children:m().node,className:m().string,disabled:m().bool,enterDelayMs:m().number,index:m().number,leaveDelayMs:m().number,name:m().oneOfType([m().string,m().number]),onClick:m().func,onKeyDown:m().func,selected:m().bool,size:m().oneOf(["sm","md","lg"]),text:m().string};const Pr=({children:e,className:t,light:n,lowContrast:r,selectedIndex:i=0,selectionMode:s="automatic",size:c,onChange:d,...p})=>{const m=(0,a.useContext)(o),[f,b]=(0,a.useState)(i),h=(0,a.useRef)(i),g=(0,a.useRef)([]),x=a.Children.toArray(e);(0,a.useEffect)(()=>{h.current!==i&&(b(i),h.current=i)},[i]);const v=e=>t=>{t&&(g.current[e]=t)},y=e=>{const t=g.current[e];t&&t.focus()},$=e=>"object"==typeof e&&null!==e&&"key"in e,w=e=>{if(void 0===e.index)return;const{index:t}=e;if($(e)&&(de(e.key,ie)||de(e.key,ae))){const n=((e,t,n)=>de(e,ie)?(t+1)%n:de(e,ae)?(t+n-1)%n:void 0)(e.key,t,x.length);if("number"!=typeof n)return;if(y(n),"manual"!==s){const t=x[n];b(n),(G(t,Lr)||G(t,Mr))&&d({...e,index:n,name:t.props.name,text:t.props.text})}}else f===t||$(e)&&!de(e.key,J)&&!de(e.key,te)||(b(t),y(t),d(e))},N=a.Children.map(e,e=>G(e,Mr))?.every(e=>!0===e),T=u()(`${m}--content-switcher`,t,{[`${m}--content-switcher--light`]:n,[`${m}--content-switcher--${c}`]:c,[`${m}--layout--size-${c}`]:c,[`${m}--content-switcher--icon-only`]:N,[`${m}--content-switcher--low-contrast`]:r});return(0,l.jsx)(_t,{size:{default:"md",min:"sm",max:"lg"},...p,className:T,role:"tablist",onChange:void 0,children:a.Children.map(e,(e,t)=>{if(!G(e,Lr)&&!G(e,Mr))return e;const n={index:t,onClick:t=>{w(t),e.props.onClick?.(t)},onKeyDown:t=>{w(t),e.props.onKeyDown?.(t)},selected:t===f,ref:v(t)};return(0,a.cloneElement)(e,{...n,...G(e,Mr)?{size:c}:{}})})})};Pr.displayName="ContentSwitcher",Pr.propTypes={children:m().node,className:m().string,light:I(m().bool,"The `light` prop for `ContentSwitcher` is no longer needed and has been deprecated. It will be removed in the next major release."),lowContrast:m().bool,onChange:m().func.isRequired,selectedIndex:m().number,selectionMode:m().oneOf(["automatic","manual"]),size:m().oneOf(["sm","md","lg"])};const Br=(0,a.createContext)({titleId:void 0,descriptionId:void 0}),Fr=(e,t)=>{if(e.children.length>0)return!1;const n=window.getComputedStyle(e);t.font=n.font?n.font:`${n.fontSize}" "${n.fontFamily}`;let r=(t?.measureText(e.textContent??"")).width??0;const a=n.letterSpacing?.split("px");a&&a.length&&!isNaN(Number(a[0]))&&(r+=Number(a[0])*(e.textContent?.length??0));const o=n.paddingLeft?.split("px");o&&o.length&&!isNaN(Number(o[0]))&&(r+=Number(o[0]));const i=n.paddingLeft?.split("px");return i&&i.length&&!isNaN(Number(i[0]))&&(r+=Number(i[0])),r>e.getBoundingClientRect().width},zr=({className:e,children:t,useZebraStyles:n,size:r="lg",isSortable:o=!1,useStaticWidth:s,stickyHeader:c,overflowMenuOnHover:d=!0,experimentalAutoAlign:p=!1,...m})=>{const{titleId:f,descriptionId:b}=(0,a.useContext)(Br),h=i(),g=(0,a.useRef)(null),x=u()(`${h}--data-table`,e,{[`${h}--data-table--${r}`]:r,[`${h}--data-table--sort`]:o,[`${h}--data-table--zebra`]:n,[`${h}--data-table--static`]:s,[`${h}--data-table--sticky-header`]:c,[`${h}--data-table--visible-overflow-menu`]:!d}),y=(0,a.useCallback)((e=!1)=>{e?g.current?.classList.add(`${h}--data-table--top-aligned-body`):g.current?.classList.remove(`${h}--data-table--top-aligned-body`)},[h]),$=(0,a.useCallback)((e=!1)=>{e?g.current?.classList.add(`${h}--data-table--top-aligned-header`):g.current?.classList.remove(`${h}--data-table--top-aligned-header`)},[h]),w=(0,a.useCallback)(()=>
2{if(p){const e=document.createElement("canvas").getContext("2d");if(g.current&&e){const t=Array.from(g.current.querySelectorAll("td")).some(t=>Fr(t,e)),n=Array.from(g.current.querySelectorAll("th")).some(t=>{const n=t.querySelector(`.${h}--table-header-label`);return n instanceof HTMLElement&&Fr(n,e)});y(t),$(n)}}else y(!1),$(!1)},[p,y,$,h]),N=(0,yt.s)(w,100);Z("resize",N),"undefined"!=typeof document&&document?.fonts?.status&&"loaded"!==document.fonts.status&&document.fonts.ready.then(()=>{w()}),v(()=>{w()},[w,r]);const T=(0,l.jsx)("div",{className:`${h}--data-table-content`,children:(0,l.jsx)("table",{"aria-labelledby":f,"aria-describedby":b,...m,className:x,ref:g,children:t})});return c?(0,l.jsx)("section",{className:`${h}--data-table_inner-container`,children:T}):T};zr.propTypes={children:m().node,className:m().string,experimentalAutoAlign:m().bool,isSortable:m().bool,overflowMenuOnHover:m().bool,size:m().oneOf(["xs","sm","md","lg","xl"]),stickyHeader:m().bool,useStaticWidth:m().bool,useZebraStyles:m().bool,tabIndex:m().number};var qr=n(70645);const Hr=({renderIcon:e=qr.on,iconDescription:t="Add",...n})=>(0,l.jsx)(gt,{renderIcon:e,iconDescription:t,...n});Hr.propTypes={hasIconOnly:m().bool,iconDescription:e=>{if(e.renderIcon&&!e.children&&!e.iconDescription)return new Error("renderIcon property specified without also providing an iconDescription property.")},renderIcon:m().oneOfType([m().func,m().object])};const Kr=({name:e,className:t,type:n})=>{function r({className:e,...r}){const o=i(),l=u()("function"==typeof t?t(o):t,e);return a.createElement(n,{...r,className:l||void 0})}return r.displayName=e,r.propTypes={className:m().string},r},Vr=Kr({name:"TableActionList",type:"div",className:e=>`${e}--action-list`}),Wr="carbon.table.batch.cancel",Ur="carbon.table.batch.items.selected",Gr="carbon.table.batch.item.selected",Yr="carbon.table.batch.selectAll",Qr={[Wr]:"Cancel",[Ur]:"items selected",[Gr]:"item selected",[Yr]:"Select all"},Zr=(e,t={totalSelected:0,totalCount:0})=>{const{totalSelected:n,totalCount:r}=t;switch(e){case Wr:return Qr[e];case Yr:return`${Qr[e]} (${r})`;case Ur:case Gr:return`${n} ${Qr[e]}`}},Xr=({className:e,children:t,shouldShowBatchActions:n,totalSelected:r,totalCount:o,onCancel:s,onSelectAll:c,translateWithId:d=Zr,...p})=>{const[m,f]=a.useState(!1),b=i(),g=u()({[`${b}--batch-actions`]:!0,[`${b}--batch-actions--active`]:n},e),x=u()(`${b}--batch-summary`,{[`${b}--batch-summary__scroll`]:m});return(0,l.jsxs)("div",{onScroll:()=>{f(!m)},"aria-hidden":!n,className:g,...p,children:[(0,l.jsxs)("div",{className:x,children:[(0,l.jsx)("p",{className:`${b}--batch-summary__para`,children:(0,l.jsx)(h,{children:d(r>1||0===r?"carbon.table.batch.items.selected":"carbon.table.batch.item.selected",{totalSelected:r})})}),c&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:`${b}--batch-summary__divider`,children:"|"}),(0,l.jsx)(gt,{onClick:c,tabIndex:n?0:-1,children:d("carbon.table.batch.selectAll",{totalCount:o})})]})]}),(0,l.jsxs)(Vr,{children:[t,(0,l.jsx)(gt,{className:`${b}--batch-summary__cancel`,tabIndex:n?0:-1,onClick:s,children:d("carbon.table.batch.cancel")})]})]})};Xr.propTypes={children:m().node,className:m().string,onCancel:m().func.isRequired,onSelectAll:m().func,shouldShowBatchActions:m().bool,totalCount:m().number,totalSelected:m().number.isRequired,translateWithId:m().func};const Jr=({children:e,className:t,...n})=>(0,l.jsx)("tbody",{"aria-live":n["aria-live"]??"polite",className:t,...n,children:e});Jr.propTypes={"aria-live":m().oneOf(["polite","assertive","off"]),children:m().node,className:m().string};const ea=(0,a.forwardRef)((e,t)=>{const{children:n,className:r,hasAILabelHeader:a,colSpan:o,...s}=e,c=i(),d=u()(r,{[`${c}--table-cell--column-slug`]:a});return(0,l.jsx)("td",{className:d||void 0,ref:t,colSpan:o,...s,children:n})});ea.displayName="TableCell",ea.propTypes={children:m().node,className:m().string,colSpan:m().number,hasAILabelHeader:m().bool,headers:m().string};const ta=a.createContext(1),na=a.forwardRef(function({as:e="section",level:t,...n},r){const o=a.useContext(ta),i=t??o+1,s=e;return(0,l.jsx)(ta.Provider,{value:Math.min(i,6),children:(0,l.jsx)(s,{ref:r,...n})})});na.propTypes={as:m().elementType,children:m().node,className:m().string,level:m().number};const ra=a.forwardRef((e,t)=>
2{const n=`h${a.useContext(ta)}`;return(0,l.jsx)(n,{ref:t,...e})});ra.displayName="Heading",ra.propTypes={children:m().node,className:m().string};const aa=({aiEnabled:e,className:t,children:n,decorator:r,title:o,description:s,stickyHeader:c,useStaticWidth:d,...p})=>{const m=j("tc"),f=`${m}-title`,b=`${m}-description`,h=i(),g=u()(t,`${h}--data-table-container`,{[`${h}--data-table--max-width`]:c,[`${h}--data-table-container--static`]:d,[`${h}--data-table-container--ai-enabled`]:e}),x=(0,a.useMemo)(()=>({titleId:o?f:void 0,descriptionId:s?b:void 0}),[o,s,f,b]);return(0,l.jsx)(Br.Provider,{value:x,children:(0,l.jsxs)(na,{...p,className:g,children:[(o||s||r)&&(0,l.jsxs)("div",{className:u()(`${h}--data-table-header`,{[`${h}--data-table-header__with-decorator`]:r,[`${h}--data-table-header__with-decorator--standalone`]:r&&!o&&!s}),children:[(o||s)&&(0,l.jsxs)("div",{className:`${h}--data-table-header__content`,children:[o&&(0,l.jsx)(ra,{className:`${h}--data-table-header__title`,id:f,children:o}),s&&(0,l.jsx)("p",{className:`${h}--data-table-header__description`,id:b,children:s})]}),r&&(0,l.jsx)("div",{className:`${h}--data-table-header__decorator`,children:r})]}),n]})})};aa.propTypes={aiEnabled:m().bool,children:m().node,className:m().string,decorator:m().node,description:m().node,stickyHeader:m().bool,title:m().node,useStaticWidth:m().bool};const oa=(e,t)=>(n,r,a,...o)=>!0===n[e]&&null===n[r]?new Error(`You must provide a value for \`${r}\` in \`${a}\` if \`${e}\` exists.`):t(n,r,a,...o),ia=({"aria-controls":e,"aria-label":t,ariaLabel:n,className:r,enableExpando:a,enableToggle:o,id:s="expand",isExpanded:c,onExpand:d,expandIconDescription:p,children:m,...f})=>{const b=i(),h=u()(`${b}--table-expand`,r);return(0,l.jsxs)("th",{scope:"col",className:h,"data-previous-value":c?"collapsed":void 0,id:s,...f,children:[a||o?(0,l.jsx)("button",{type:"button",className:`${b}--table-expand__button`,onClick:d,title:p,"aria-label":n||t,"aria-expanded":c,"aria-controls":e,children:(0,l.jsx)(S.c_,{className:`${b}--table-expand__svg`,"aria-label":p})}):null,m]})};ia.propTypes={"aria-controls":m().string,"aria-label":m().string,ariaLabel:m().string,children:m().node,className:m().string,enableExpando:I(m().bool,"The `enableExpando` prop has been deprecated in favor of `enableToggle`. This prop will be removed in the next major release."),enableToggle:m().bool,expandIconDescription:m().string,id:m().string,isExpanded:oa("enableToggle",m().bool),onExpand:m().oneOfType([oa("enableExpando",m().func),oa("enableToggle",m().func)])};const la=({className:e,decorator:t})=>{const n=i(),r=u()({...e&&{[e]:!0},[`${n}--table-column-decorator`]:!0,[`${n}--table-column-decorator--active`]:t}),o=G(t,Ze)?(0,a.cloneElement)(t,{size:"mini"}):null;return(0,l.jsx)("td",{className:r,children:o})};la.displayName="TableDecoratorRow",la.propTypes={className:m().string,decorator:m().node};const sa={},ca=({className:e,slug:t})=>{(0,a.useEffect)(()=>{var e;(e="TableSlugRow")&&(sa[e]||(sa[e]=!0,C(!1,"The `TableSlugRow` component has been deprecated and will be removed in the next major version. Use the TableDecoratorRow component instead.")))},[]);const n=i(),r=u()({...e&&{[e]:!0},[`${n}--table-column-slug`]:!0,[`${n}--table-column-slug--active`]:t}),o=(0,a.isValidElement)(t)?(0,a.cloneElement)(t,{size:"mini"}):void 0;return(0,l.jsx)("td",{className:r,children:o})};ca.displayName="TableSlugRow",ca.propTypes={className:m().string,slug:m().node};const da=(0,a.forwardRef)(({"aria-controls":e,"aria-label":t,ariaLabel:n,className:r,children:o,isExpanded:s,onExpand:c,expandIconDescription:d,isSelected:p,expandHeader:m="expand",...f},b)=>{const h=i();let g;const x=a.Children.toArray(o).map(e=>G(e,ca)?(e.props.slug&&(g=!0),e):G(e,la)?(G(e.props.decorator,Ze)&&(g=!0),e):void 0),v=a.Children.toArray(o).map(e=>{if(!G(e,ca)&&!G(e,la))return e}),y=u()({[`${h}--parent-row`]:!0,[`${h}--expandable-row`]:s,[`${h}--data-table--selected`]:p,[`${h}--data-table--slug-row ${h}--data-table--ai-label-row`]:g},r),$=s?"collapsed":void 0;return(0,l.jsxs)("tr",{...f,ref:b,className:y,"data-parent-row":!0,children:[x,(0,l.jsx)(ea,{className:`${h}--table-expand`,"data-previous-value":$,headers:m,children:(0,l.jsx)("button",{type:"button",className:`${h}--table-expand__button`,onClick:c,title:d,"aria-label":n||t,"aria-expanded":s,"aria-controls":e,children:(0,l.jsx)(S.c_,{className:`${h}--table-expand__svg`,"aria-label":d})})}),v]})});da.propTypes={"aria-controls":m().string,"aria-label":m().string,ariaLabel:m().string,children:m().node,className:m().string,expandHeader:m().string,expandIconDescription:m().string,isExpanded:m().bool,isSelected:m().bool,onExpand:m().func.isRequired},da.displayName="TableExpandRow";const ua=({className:e,children:t,colSpan:n,...r})=>{const o=(0,a.useRef)(null),s=i(),c=u()(`${s}--expandable-row`,e),d=e=>{if(o&&o.current&&o.current.previousElementSibling){const t=o.current.previousElementSibling;
2"enter"===e?t.classList.add(`${s}--expandable-row--hover`):t.classList.remove(`${s}--expandable-row--hover`)}};return(0,l.jsx)("tr",{ref:o,onMouseEnter:()=>d("enter"),onMouseLeave:()=>d("leave"),...r,className:c,"data-child-row":!0,children:(0,l.jsx)(ea,{colSpan:n,children:(0,l.jsx)("div",{className:`${s}--child-row-inner-container`,children:t})})})};ua.propTypes={children:m().node,className:m().string,colSpan:m().number.isRequired};const pa=Kr({name:"TableHead",type:"thead"}),ma={NONE:"NONE",DESC:"DESC",ASC:"ASC"};var fa=n(61686);const ba="col",ha="carbon.table.header.icon.description",ga={[ha]:"Click to sort rows by header in ascending order"},xa=(e,t)=>t&&e===ha?t.isSortHeader&&ma?t.sortDirection===ma.NONE?`Click to sort rows by ${t.header} header in ascending order`:t.sortDirection===ma.ASC?`Click to sort rows by ${t.header} header in descending order`:`Click to unsort rows by ${t.header} header`:`Click to sort rows by ${t.header} header in ascending order`:ga[e],va={[ma.NONE]:"none",[ma.ASC]:"ascending",[ma.DESC]:"descending"},ya=(0,a.forwardRef)((e,t)=>{const{className:n,children:r,colSpan:o,decorator:s,isSortable:c=!1,isSortHeader:d,onClick:p,scope:m=ba,sortDirection:f,translateWithId:b=xa,slug:h,id:g,...x}=e,v=i(),y=j("table-sort"),$=(0,a.useRef)(null),w=h??s,N=G(w,Ze),T=N,_=N?(0,a.cloneElement)(w,{size:"mini"}):w,C=u()({[`${v}--table-header-label`]:!0,[`${v}--table-header-label--slug ${v}--table-header-label--ai-label`]:T,[`${v}--table-header-label--decorator`]:s});if(ft($,"The TableHeader component `children` prop must have no interactive content when `isSortable` is true"),!c)return(0,l.jsx)("th",{...x,id:g,className:n,scope:m,colSpan:o,ref:t,children:r?(0,l.jsxs)("div",{className:C,children:[r,(0,l.jsx)("div",{className:`${v}--table-header-label--decorator-inner`,children:_})]}):null});const k=u()(n,{[`${v}--table-sort`]:!0,[`${v}--table-sort--active`]:d&&f!==ma.NONE,[`${v}--table-sort--descending`]:d&&f===ma.DESC}),I=d&&f?va[f]:"none",S=b&&b("carbon.table.header.icon.description",{header:r,sortDirection:f,isSortHeader:d,sortStates:ma}),E=u()(n,`${v}--table-sort__header`,{[`${v}--table-sort__header--slug`]:h,[`${v}--table-sort__header--ai-label`]:T,[`${v}--table-sort__header--decorator`]:s});return(0,l.jsxs)("th",{id:g,"aria-sort":I,className:E,colSpan:o,ref:t,scope:m,children:[(0,l.jsx)("div",{className:`${v}--table-sort__description`,id:y,children:S}),(0,l.jsx)("button",{type:"button","aria-describedby":y,className:k,onClick:p,...x,children:(0,l.jsxs)("span",{className:`${v}--table-sort__flex`,children:[(0,l.jsx)("div",{className:`${v}--table-header-label`,ref:$,children:r}),(0,l.jsx)(fa.Do,{size:20,className:`${v}--table-sort__icon`}),(0,l.jsx)(fa.BK,{size:20,className:`${v}--table-sort__icon-unsorted`})]})}),(h||s)&&(0,l.jsx)("div",{className:`${v}--table-header-label--decorator-inner`,children:_})]})});ya.propTypes={children:m().node,className:m().string,colSpan:m().number,id:m().string,isSortHeader:m().bool,isSortable:m().bool,onClick:m().func,scope:m().string,sortDirection:m().oneOf(Object.values(ma)),translateWithId:m().func},ya.displayName="TableHeader";const $a=(0,a.forwardRef)((e,t)=>{const{ariaLabel:n,"aria-label":r,"aria-controls":o,onExpand:s,isExpanded:c,isSelected:d,expandHeader:p,...m}=e,f=i(),b=a.Children.toArray(e.children).some(e=>G(e,ca)?!!e.props.slug:G(e,la)&&G(e.props.decorator,Ze)),h=u()(e.className,{[`${f}--data-table--selected`]:d,[`${f}--data-table--slug-row ${f}--data-table--ai-label-row`]:b});return h&&(m.className=h),(0,l.jsx)("tr",{ref:t,...m})});$a.propTypes={className:m().string,isSelected:m().bool,ariaLabel:m().string,"aria-label":m().string,"aria-controls":m().string,onExpand:m().func,isExpanded:m().bool};const wa=a.forwardRef((e,t)=>{const{"aria-label":n,ariaLabel:r,checked:o=!1,disabled:s,id:c,indeterminate:d,name:u,onChange:p=()=>{},onClick:m,onKeyDown:f,title:b}=e,h=i(),g=(0,a.useRef)(null),x=Y([g,t]),v={checked:o,className:`${h}--checkbox`,disabled:s,id:c,name:u,onClick:m?function(e){d&&(e.target.checked=!1),m?.(e)}:m,onChange:e=>{p(e.target.checked,c,e)},onKeyDown:f,ref:x,type:"checkbox"};return d&&(v.checked=!1),(0,a.useEffect)(()=>{g?.current&&(g.current.indeterminate=d||!1)},[d]),(0,l.jsxs)("div",{className:`${h}--checkbox--inline`,children:[(0,l.jsx)("input",{...v}),(0,l.jsx)("label",{htmlFor:c,className:`${h}--checkbox-label`,title:b,onClick:e=>{e.stopPropagation()},children:(0,l.jsx)("span",{className:`${h}--visually-hidden`,children:r||n})})]})});wa.displayName="InlineCheckbox",wa.propTypes={"aria-label":m().string.isRequired,ariaLabel:I(m().string.isRequired,"The `ariaLabel` prop has been deprecated 
2in favor of `aria-label`. This prop will be removed in the next major release."),checked:m().bool,disabled:m().bool,id:m().string.isRequired,indeterminate:m().bool,name:m().string.isRequired,onChange:m().func,onClick:m().func,onKeyDown:m().func,title:m().string};var Na=wa;const Ta=({ariaLabel:e="Select all rows in the table","aria-label":t,checked:n,id:r,indeterminate:a,name:o,onSelect:s,disabled:c,className:d})=>{const p=i();return(0,l.jsx)("th",{"aria-live":"off",scope:"col",className:u()(`${p}--table-column-checkbox`,d),children:(0,l.jsx)(Na,{"aria-label":t||e,checked:n,id:r,indeterminate:a,name:o,onClick:s,disabled:c})})};Ta.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),checked:m().bool,className:m().string,disabled:m().bool,id:m().string.isRequired,indeterminate:m().bool,name:m().string.isRequired,onSelect:m().func.isRequired};const ja=a.forwardRef((e,t)=>{const{className:n,decorator:r,disabled:o=!1,hideLabel:s,id:c,labelPosition:d="right",labelText:p="",name:m,onChange:f=()=>{},value:b="",slug:g,required:x,invalid:v=!1,invalidText:y,warn:$=!1,warnText:w,readOnly:N,...T}=e,_=i(),C=j("radio-button"),k=c||C,I=mt({id:k,readOnly:N,disabled:o,invalid:v,invalidText:y,warn:$,warnText:w}),S=u()(`${_}--radio-button__label-text`,{[`${_}--visually-hidden`]:s}),E=u()(n,`${_}--radio-button-wrapper`,{[`${_}--radio-button-wrapper--label-${d}`]:"right"!==d,[`${_}--radio-button-wrapper--slug`]:g,[`${_}--radio-button-wrapper--decorator`]:r,[`${_}--radio-button-wrapper--invalid`]:I.invalid,[`${_}--radio-button-wrapper--warning`]:I.warn}),R=(0,a.useRef)(null),O=(0,a.useRef)(null),D=g??r,A=G(D,Ze)?(0,a.cloneElement)(D,{size:"inline"===D.props?.kind?"md":"mini"}):D;return ft(O,"The RadioButton component `labelText` prop must have no interactive content"),(0,l.jsxs)("div",{className:E,children:[(0,l.jsx)("input",{...T,type:"radio",className:`${_}--radio-button`,onChange:function(e){f(b,m,e)},id:k,ref:At(R,t),disabled:I.disabled,value:b,name:m,required:x,readOnly:N}),(0,l.jsxs)("label",{htmlFor:k,className:`${_}--radio-button__label`,ref:O,children:[(0,l.jsx)("span",{className:`${_}--radio-button__appearance`}),p&&(0,l.jsx)(h,{className:S,children:p})]}),p&&g?A:p&&r?(0,l.jsx)("div",{className:`${_}--radio-button-wrapper-inner--decorator`,children:A}):null,I.validation]})});ja.displayName="RadioButton",ja.propTypes={checked:m().bool,className:m().string,decorator:m().node,defaultChecked:m().bool,disabled:m().bool,hideLabel:m().bool,id:m().string,labelPosition:m().oneOf(["right","left"]),labelText:m().node.isRequired,name:m().string,onChange:m().func,onClick:m().func,required:m().bool,invalid:m().bool,invalidText:m().node,warn:m().bool,warnText:m().node,readOnly:m().bool,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),value:m().oneOfType([m().string,m().number])};var _a=ja;const Ca=({ariaLabel:e,"aria-label":t,checked:n,id:r,name:a,onSelect:o,onChange:s,disabled:c,radio:d,className:p})=>{const m=i(),f=j(),b=s?(e,t,n)=>{s(!!e,t||"",n)}:void 0,h=s?(e,t,n)=>{s(e,t,n)}:void 0,g={id:r,name:a||f,onClick:o,checked:n,disabled:c},x=t||e||"",v=u()(`${m}--table-column-checkbox`,{...p&&{[p]:!0},[`${m}--table-column-radio`]:d});return(0,l.jsx)("td",{className:v,"aria-live":"off",children:d?(0,l.jsx)(_a,{...g,labelText:x,onChange:b,hideLabel:!0}):(0,l.jsx)(Na,{...g,"aria-label":x,onChange:h})})};Ca.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),checked:m().bool,className:m().string,disabled:m().bool,id:m().string.isRequired,name:m().string.isRequired,onChange:m().func,onSelect:m().func.isRequired,radio:m().bool};const ka=(0,a.createContext)({}),Ia=()=>(0,a.useContext)(ka),Sa=({"aria-label":e="data table toolbar",ariaLabel:t,children:n,size:r,...a})=>{const o=i(),s=u()({[`${o}--table-toolbar`]:!0,[`${o}--table-toolbar--${r}`]:r,[`${o}--layout--size-${r}`]:r});return(0,l.jsx)(ka.Provider,{value:{size:r},children:(0,l.jsx)("section",{role:"group","aria-label":t||e,...a,className:s,children:n})})};Sa.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),children:m().node,size:m().oneOf(["xs","sm","lg"])};const Ea=(0,a.forwardRef)((e,t)=>{const{className:n,closeMenu:r,dangerDescription:a="",disabled:o=!1,handleOverflowMenuItemFocus:s,hasDivider:c=!1,href:d,isDelete:p=!1,index:m,itemText:f="Provide itemText",onClick:b=()=>{},onKeyDown:g=()=>{},requireTitle:x,title:v,wrapperClassName:y,...$}=e,w=i();C(!!r,"`<OverflowMenuItem>` detected missing `closeMenu` prop. `closeMenu` is required to let `<OverflowMenu>` close the menu upon actions on `<OverflowMenuItem>`. Please make sure `<OverflowMenuItem>` is a direct child of `<OverflowMenu>.");const N=u()(`${w}--overflow-menu-options__btn`,n),T=u()(`${w}--overflow-menu-options__option`,{[`${w}--overflow-menu--divider`]:c,[`${w}--overflow-menu-options__option--danger`]:p,[`${w}--overflow-menu-options__option--disabled`]:o},y),_=d?"a":"button",k=p&&Boolean(a),I=j("danger-description"),S="string"!=typeof f?f:(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("div",{className:`${w}--overflow-menu-options__option-content`,children:f}),k&&(0,l.jsx)("span",{id:I,className:`${w}--visually-hidden`,children:a})]});return(0,l.jsx)(h,{as:"li",className:T,role:"none",children:(0,l.jsx)(_,{className:N,disabled:o,href:d,onClick:function(e){b(e),r&&r()},onKeyDown:e=>{!function(e){de(e,le)&&s?.({currentIndex:m,direction:1}),de(e,oe)&&s?.({currentIndex:m,direction:-1})}(e),g(e)},role:"menuitem",ref:t,tabIndex:-1,title:x?v||f:void 0,...$,children:S})})});Ea.propTypes={className:m().string,closeMenu:m().func,dangerDescription:m().string,disabled:m().bool,handleOverflowMenuItemFocus:m().func,hasDivider:m().bool,href:m().string,index:m().number,isDelete:m().bool,itemText:m().node.isRequired,onBlur:m().func,onClick:m().func,onFocus:m().func,onKeyDown:m().func,onKeyUp:m().func,onMouseDown:m().func,onMouseEnter:m().func,onMouseLeave:m().func,onMouseUp:m().func,requireTitle:m().bool,title:m().string,wrapperClassName:m().string};const Ra=Kr({name:"TableToolbarContent",type:"div",className:e=>`${e}--toolbar-content`}
2),Oa="carbon.table.toolbar.search.label",Da="carbon.table.toolbar.search.placeholder",Aa={[Oa]:"Filter table",[Da]:"Filter table"},La=e=>Aa[e],Ma=({className:e,searchContainerClass:t,onChange:n,onClear:r=dt,translateWithId:o=La,placeholder:s,labelText:c,expanded:d,defaultExpanded:p,defaultValue:m,disabled:f,onExpand:b,persistent:h=!1,id:g,onBlur:x,onFocus:v,size:y,tabIndex:$="0",...w})=>{const N=Ia(),T=y??N.size,{current:_}=(0,a.useRef)(void 0!==d),[C,k]=(0,a.useState)(Boolean(p||m)),I=_?d:C,[S,E]=(0,a.useState)(m||""),R=j("table-toolbar-search"),[O,D]=(0,a.useState)(null),A=i();(0,a.useEffect)(()=>{O&&(O.current?.querySelector?.("input")?.focus(),D(null))},[O]),(0,a.useEffect)(()=>{m&&n?.("",m)},[]);const L=u()(e,t,{[`${A}--toolbar-search-container-active`]:I,[`${A}--toolbar-search-container-disabled`]:f,[`${A}--toolbar-search-container-expandable`]:!h,[`${A}--toolbar-search-container-persistent`]:h}),M=(e,t=!I)=>{f||(_||h||k(t),b&&b(e,t))};return(0,l.jsx)(Sr,{disabled:f,className:L,value:S,id:void 0!==g?g:R,labelText:c||o("carbon.table.toolbar.search.label"),placeholder:s||o("carbon.table.toolbar.search.placeholder"),onChange:e=>{E(e.target.value),n&&n(e,e.target.value)},onClear:r,onFocus:v?e=>v(e,M):e=>M(e,!0),onBlur:x?e=>x(e,M):e=>!S&&M(e,!1),size:T,tabIndex:$,...w})};Ma.propTypes={children:m().node,className:m().string,defaultExpanded:m().bool,defaultValue:m().string,disabled:m().bool,expanded:m().bool,id:m().string,labelText:m().string,onBlur:m().func,onChange:m().func,onClear:m().func,onExpand:m().func,onFocus:m().func,persistent:m().bool,placeholder:m().string,searchContainerClass:m().string,size:m().oneOf(["xs","sm","md","lg"]),tabIndex:m().oneOfType([m().number,m().string]),translateWithId:m().func};const Pa="md",Ba=a.forwardRef(({autoAlign:e=!1,children:t,className:n,label:r="Options",renderIcon:o=F.CH,size:s=Pa,menuAlignment:c="bottom-start",tooltipAlignment:d,menuTarget:p,...m},f)=>{const b=V("enable-v12-dynamic-floating-styles")||e,{refs:h,floatingStyles:g,placement:x,middlewareData:v}=(0,fe.we)(b?{placement:c,strategy:"fixed",middleware:[e&&(0,be.UU)({fallbackPlacements:c.includes("bottom")?["bottom-start","bottom-end","top-start","top-end"]:["top-start","top-end","bottom-start","bottom-end"]})],whileElementsMounted:he.ll}:{}),y=j("overflowmenu"),$=i(),w=(0,a.useRef)(null),{open:N,x:T,y:_,handleClick:C,handleMousedown:k,handleClose:I}=Sn(w);(0,a.useEffect)(()=>{b&&Object.keys(g).forEach(e=>{h.floating.current&&(h.floating.current.style[e]=g[e])})},[g,b,h.floating,N,x,v]);const S=u()(n,`${$}--overflow-menu__container`,{[`${$}--autoalign`]:b}),E=u()(`${$}--overflow-menu__${c}`),R=u()(`${$}--overflow-menu`,{[`${$}--overflow-menu--open`]:N},s!==Pa&&`${$}--overflow-menu--${s}`,s!==Pa&&`${$}--layout--size-${s}`),O=At(w,h.setReference);return(0,l.jsxs)("div",{...m,className:S,"aria-owns":N?y:void 0,ref:f,children:[(0,l.jsx)(Oe,{"aria-controls":N?y:void 0,"aria-haspopup":!0,"aria-expanded":N,className:R,onClick:function(){w.current&&C()},onMouseDown:k,ref:O,label:r,align:d,kind:"ghost",children:(0,l.jsx)(o,{className:`${$}--overflow-menu__icon`})}),(0,l.jsx)(ot,{containerRef:w,ref:h.setFloating,menuAlignment:c,className:E,id:y,size:s,legacyAutoalign:!b,open:N,onClose:I,x:T,y:_,label:r,target:p,children:t})]})});Ba.displayName="OverflowMenu",Ba.propTypes={autoAlign:m().bool,children:m().node,className:m().string,label:m().string,menuAlignment:m().oneOf(["top-start","top-end","bottom-start","bottom-end"]),renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(["xs","sm","md","lg"]),tooltipAlignment:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),menuTarget:m().instanceOf("undefined"!=typeof Element?Element:Object)};const Fa=globalThis,za=(()=>{const e=[];let t=!1;const n=()=>
2{e.forEach(e=>{e()}),t=!1},r=()=>{t||(t=!0,Fa.requestAnimationFrame(n))};return{add:t=>(e.length||Fa.addEventListener("resize",r),(t=>{e.indexOf(t)<0&&e.push(t)})(t),{remove:()=>{const n=e.indexOf(t);n>=0&&e.splice(n,1)}})}})(),qa="left",Ha="right",Ka="bottom",Va=()=>document.body,Wa=({children:e,flipped:t,focusTrap:n,menuDirection:i=Ka,menuOffset:s={top:0,left:0},menuRef:c,onPlace:d,selectorPrimaryFocus:u,styles:p,target:m=Va,triggerRef:f,updateOrientation:b})=>{const h=(0,a.useContext)(o),[g,x]=(0,a.useState)(void 0),v=(0,a.useRef)(null),y=(0,a.useRef)(void 0),$=(0,a.useRef)(null),w=(0,a.useRef)(null),N=(0,a.useRef)(!1),T=(0,a.useCallback)(e=>{const n=v.current;if(!n)return void C(!!n,"The DOM node for menu body for calculating its position is not available. Skipping...");const r=f.current,a=n.getBoundingClientRect(),o=r?r.getBoundingClientRect():void 0,l="function"==typeof s?s(n,i,r,t):s,c=globalThis.scrollX??0,d=globalThis.scrollY??0;if(b&&b({menuSize:a,refPosition:o,direction:i,offset:l,scrollX:c,scrollY:d,container:{rect:m().getBoundingClientRect(),position:getComputedStyle(m()).position}}),a.width>0&&a.height>0||!l){const t=(({menuSize:e,refPosition:t,offset:n,direction:r,scrollX:a,scrollY:o,container:i})=>{const{left:l=0,top:s=0,right:c=0,bottom:d=0}=t,u="static"!==i.position?0:a,p="static"!==i.position?0:o,m="static"!==i.position?i.rect.top:0,f="static"!==i.position?i.rect.left:0,{width:b,height:h}=e,{top:g=0,left:x=0}=n,v=(l+c)/2,y=(s+d)/2;return{[qa]:()=>({left:l-b+u-x-f,top:y-h/2+p+g-9-m}),top:()=>({left:v-b/2+u+x-f,top:s-h+p-g-m}),[Ha]:()=>({left:c+u+x-f,top:y-h/2+p+g+3-m}),[Ka]:()=>({left:v-b/2+u+x-f,top:d+p+g-m})}[r]()})({menuSize:a,refPosition:o??{left:0,top:0,right:0,bottom:0},offset:l,direction:i,scrollX:c,scrollY:d,container:{rect:m().getBoundingClientRect(),position:getComputedStyle(m()).position}}),r=y.current;if(r&&r.left===t.left&&r.top===t.top||(y.current=t,x(t)),!e){const e=n.getBoundingClientRect();e.width===a.width&&e.height===a.height||T(!0)}}},[f,s,i,t,m,b]),j=(0,a.useCallback)(e=>{v.current=e,N.current=!!e,c&&c(e),e&&T()},[c,T]);(0,a.useEffect)(()=>{N.current&&g&&v.current&&(v.current.contains(document.activeElement)||(e=>{const t=u?e.querySelector(u):null,n=e.querySelector(ue),r=e.querySelector("\n  a[href], area[href], input:not([disabled]),\n  button:not([disabled]),select:not([disabled]),\n  textarea:not([disabled]),\n  iframe, object, embed, *[tabindex]:not([disabled]), *[contenteditable=true]\n"),a=t||n||r||e;a.focus(),a===e&&C(null===r,'Floating Menus must have at least a programmatically focusable child. This can be accomplished by adding tabIndex="-1" to the content element.')})(v.current),"function"==typeof d&&d(v.current),N.current=!1)},[g,d]),(0,a.useEffect)(()=>{const e=za.add(()=>{T()});return()=>{e.remove()}},[f,s,i,t,m,b]),(0,a.useEffect)(()=>{T()},[s,i,t,f,m,b]);const _=()=>{const t=g,n=t?{left:`${t.left}px`,top:`${t.top}px`,right:"auto"}:{visibility:"hidden",top:"0px"};return(0,a.cloneElement)(e,{ref:j,style:{...p,...n,position:"absolute",opacity:1}})},k=e=>{const{target:t,relatedTarget:n}=e;v.current&&$.current&&w.current&&t instanceof HTMLElement&&n instanceof HTMLElement&&ar({bodyNode:v.current,startTrapNode:$.current,endTrapNode:w.current,currentActiveNode:n,oldActiveNode:t,prefix:h})},I=e=>{de(e,X)&&v.current&&e.target instanceof HTMLElement&&or({containerNode:v.current,currentActiveNode:e.target,event:e})},S=(0,r.Sn)("enable-experimental-focus-wrap-without-sentinels"),E=(0,r.Sn)("enable-focus-wrap-without-sentinels"),R=S||E;if("undefined"!=typeof document){const e=m?m():document.body;return at.createPortal((0,l.jsxs)("div",{onBlur:n&&!R?k:void 0,onKeyDown:R?I:void 0,children:[!R&&(0,l.jsx)("span",{ref:$,tabIndex:0,role:"link",className:`${h}--visually-hidden`,children:"Focus sentinel"}),_(),!R&&(0,l.jsx)("span",{ref:w,tabIndex:0,role:"link",className:`${h}--visually-hidden`,children:"Focus sentinel"})]}),e)}return null},Ua=(e,t)=>{const n=(0,a.useRef)(t);(0,a.useEffect)(()=>{n.current=t},[t]),Z("click",t=>{if(!rt)return;const{target:r}=t;r instanceof Node&&e.current&&!e.current.contains(r)&&n.current(t)})};var Ga=n(32091),Ya=n.n(Ga);const Qa=x(),Za={top:"bottom",bottom:"top"},Xa={top:-2,bottom:-1},Ja=(e,t,n,r)=>{const a=Za[t],o=Xa[t];Ya()(a&&o,"[OverflowMenu] wrong floating menu direction: `%s`",t);const{offsetWidth:i}=e;switch(a){case"top":case"bottom":return{left:(r?-1:1)*(i/2-(n?n.offsetWidth:0)/2),top:0};default:return{left:0,top:0}}},eo=(0,a.forwardRef)(({align:e,"aria-label":t=null,ariaLabel:n,children:r,className:i,direction:s="bottom",flipped:c=!1,focusTrap:d=!1,iconClass:p,iconDescription:m="Options",id:f,light:b,menuOffset:h=Ja,menuOffsetFlip:g=Ja,menuOptionsClass:x,onClick:v=dt,onClose:y=dt,onOpen:$=dt,open:w,renderIcon:N=F.CH,selectorPrimaryFocus:T="[data-floating-menu-primary-focus]",size:j,innerRef:_,...C},k)=>{const I=(0,a.useContext)(o),[S,E]=(0,a.useState)(w??!1),[R,O]=(0,a.useState)(!1),[D,A]=(0,a.useState)(!1),L=(0,a.useRef)(null),M=(0,a.useRef)(Qa()),P=(0,a.useRef)(null),B=(0,a.useRef)({}),z=(0,a.useRef)(w),q=(0,a.useRef)(S),H=(0,a.useRef)(null),K=(0,a.useRef)(null),[,V]=(0,a.useReducer)(e=>e+1,0),W=(0,a.useRef)(null);(0,a.useEffect)(()=>{z.current!==w&&(E(!!w),z.current=w)},[w]),(0,a.useEffect)(()=>{H.current&&A(!0)},[]),(0,a.useEffect)(()=>
2(W.current=new ResizeObserver(()=>{V()}),()=>{W.current?.disconnect(),W.current=null}),[]),(0,a.useEffect)(()=>{H.current&&W.current&&(S?W.current.observe(H.current):W.current.disconnect())},[S]),(0,a.useEffect)(()=>{S&&!q.current?$():!S&&q.current&&y(),q.current=S},[S,y,$]),Ua(K,({target:e})=>{S&&(!P.current||e instanceof Node&&!P.current.contains(e))&&G()});const U=(0,a.useCallback)(()=>{H.current&&H.current.focus()},[]),G=(0,a.useCallback)(e=>{E(!1),e&&e()},[]),Y=(0,a.useCallback)(()=>{const e=R,t=S;G(()=>{t&&!e&&U()})},[R,S,G,U]),Q=(0,a.useCallback)(()=>{const e=S;G(()=>{e&&U()})},[S,G,U]),Z=({currentIndex:e=0,direction:t})=>{const n=a.Children.toArray(r).reduce((e,t,n)=>(a.isValidElement(t)&&!t.props.disabled&&e.push(n),e),[]),o=(()=>{const r=n.indexOf(e)+t;switch(r){case-1:return n.length-1;case n.length:return 0;default:return r}})();B.current[n[o]]?.focus()},J=`overflow-menu-${M.current}__menu-body`,te=u()(i,`${I}--overflow-menu`,{[`${I}--overflow-menu--open`]:S,[`${I}--overflow-menu--light`]:b,[`${I}--overflow-menu--${j}`]:j,[`${I}--layout--size-${j}`]:j}),ne=u()(x,`${I}--overflow-menu-options`,{[`${I}--overflow-menu--flip`]:c,[`${I}--overflow-menu-options--open`]:S,[`${I}--overflow-menu-options--light`]:b,[`${I}--overflow-menu-options--${j}`]:j,[`${I}--layout--size-${j}`]:j}),re=u()(`${I}--overflow-menu__icon`,p),se=u()(`${I}--overflow-menu__wrapper`),de=a.Children.toArray(r).map((e,t)=>{if((0,a.isValidElement)(e)){const n=e;return(0,a.cloneElement)(n,{closeMenu:n.props.closeMenu||Y,handleOverflowMenuItemFocus:Z,ref:e=>{B.current[t]=e},index:t})}return null}),ue=(0,l.jsx)(Wa,{focusTrap:d,triggerRef:H,menuDirection:s,menuOffset:c?g:h,menuRef:e=>{e||(P.current=e),!e&&L.current&&(L.current=L.current.release())},flipped:c,target:()=>{const e=H.current;return e instanceof Element&&(e.closest("[data-floating-menu-container]")||e.closest(`.${I}--layout`))||document.body},onPlace:e=>{if(!e)return;P.current=e;const t="onfocusin"in window,n=t?"focusin":"focus";L.current=((e,...t)=>(e.addEventListener(...t),{release:()=>(e.removeEventListener(...t),null)}))(e.ownerDocument,n,t=>{const n=t.target;if(!(n instanceof Element))return;const r=H.current;"function"==typeof n.matches&&(e.contains(n)||!r||n.matches(`.${I}--overflow-menu:first-child, .${I}--overflow-menu-options:first-child`)||Y())},!t)},selectorPrimaryFocus:T,children:(0,a.cloneElement)((0,l.jsx)("ul",{className:ne,tabIndex:-1,role:"menu","aria-label":t||n,onKeyDown:e=>{S&&ce(e,[oe,ie,le,ae])&&e.preventDefault(),ce(e,[ee,X])&&(Q(),e.stopPropagation(),e.preventDefault())},id:J,children:de}),{"data-floating-menu-direction":s})}),pe=_?At(H,_,k):At(H,k);return(0,l.jsx)(l.Fragment,{children:(0,l.jsxs)("span",{className:se,"aria-owns":S?J:void 0,ref:K,children:[(0,l.jsx)(Oe,{...C,align:e,type:"button","aria-haspopup":!0,"aria-expanded":S,"aria-controls":S?J:void 0,className:te,onClick:e=>{O(!0),P.current&&P.current.contains(e.target)||(E(e=>!e),v(e))},id:f,ref:pe,size:j,label:m,kind:"ghost",children:(0,l.jsx)(N,{className:re,"aria-label":m})}),S&&D&&ue]})})});eo.displayName="OverflowMenu",eo.propTypes={align:U(m().oneOf(["top","top-left","top-right","bottom","bottom-left","bottom-right","left","left-bottom","left-top","right","right-bottom","right-top","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),["top","top-start","top-end","bottom","bottom-start","bottom-end","left","left-start","left-end","right","right-start","right-end"],me),"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),children:m().node,className:m().string,direction:m().oneOf(["top","bottom"]),flipped:m().bool,focusTrap:m().bool,iconClass:m().string,iconDescription:m().string,id:m().string,light:I(m().bool,"The `light` prop for `OverflowMenu` is no longer needed and has been deprecated. It will be removed in the next major release. Use the Layer component instead."),menuOffset:m().oneOfType([m().shape({top:m().number.isRequired,left:m().number.isRequired}),m().func]),menuOffsetFlip:m().oneOfType([m().shape({top:m().number.isRequired,left:m().number.isRequired}),m().func]),menuOptionsClass:m().string,onClick:m().func,onClose:m().func,onFocus:m().func,onKeyDown:m().func,onOpen:m().func,open:m().bool,renderIcon:m().oneOfType([m().func,m().object]),selectorPrimaryFocus:m().string,
2size:m().oneOf(["xs","sm","md","lg"])};const to=(0,a.forwardRef)((e,t)=>V("enable-v12-overflowmenu")?(0,l.jsx)(Ba,{...e,ref:t}):(0,l.jsx)(eo,{...e,ref:t}));to.displayName="OverflowMenu",to.propTypes=eo.propTypes;const no=(e,t)=>`${e}:${t}`,ro=(e,t,n="en")=>{if(null===e&&(e=""),null===t&&(t=""),"number"==typeof e&&"number"==typeof t)return e-t;if("string"==typeof e&&"string"==typeof t)return ao(e,t,n);const r=e?.props?.children,a=t?.props?.children;return"string"==typeof r&&"string"==typeof a?ao(r,a,n):ao(String(e),String(t),n)},ao=(e,t,n="en")=>{const r=!isNaN(parseFloat(e))&&!isNaN(parseFloat(t));return e.localeCompare(t,n,{numeric:r})},oo=({rowIds:e,cellsById:t,sortDirection:n,key:r,locale:a="en",sortRow:o=io})=>e.slice().sort((e,i)=>{const l=t[no(e,r)],s=t[no(i,r)];return o(l?.value,s?.value,{key:r,sortDirection:n,sortStates:ma,locale:a,compare:ro,rowIds:[e,i]})}),io=(e,t,{sortDirection:n,sortStates:r,locale:a})=>n===r.ASC?ro(e,t,a):ro(t,e,a),lo=ma.NONE,so=(e,t,{key:n})=>{const{sortDirection:r,sortHeaderKey:a}=t,o=((e,t,n)=>{if(e===t)switch(n){case ma.NONE:return ma.ASC;case ma.ASC:return ma.DESC;case ma.DESC:return ma.NONE}return ma.ASC})(n,a??"",r);return co(e,t,n,o)},co=({locale:e,sortRow:t},{rowIds:n,cellsById:r,initialRowOrder:a},o,i)=>({sortHeaderKey:o,sortDirection:i,rowIds:i!==ma.NONE?oo({rowIds:n,cellsById:r,sortDirection:i,key:o,locale:e,sortRow:t}):a}),uo=(e,t)=>{const{rowIds:n,rowsById:r,cellsById:a}=((e,t,n={})=>{const{rowsById:r}=n,a=new Array(e.length),o={},i={};return e.forEach((e,n)=>{a[n]=e.id;const{id:l,isSelected:s=!1,isExpanded:c=!1,disabled:d=!1}=e;o[l]={id:l,isSelected:s,isExpanded:c,disabled:d,cells:new Array(t.length)},r&&void 0!==r[e.id]&&(o[e.id].isSelected=r[e.id].isSelected,o[e.id].isExpanded=r[e.id].isExpanded),t.forEach(({key:t,slug:n,decorator:r},a)=>{const l=no(e.id,t);i[l]={id:l,value:e[t],isEditable:!1,isEditing:!1,isValid:!0,errors:null,hasAILabelHeader:!(!n&&!G(r,Ze)),info:{header:t}},o[e.id].cells[a]=l})}),{rowIds:a,rowsById:o,cellsById:i}})(e.rows,e.headers,t),o={rowIds:n,rowsById:r,cellsById:a,sortDirection:t.sortDirection||lo,sortHeaderKey:t.sortHeaderKey||null,initialRowOrder:n.slice(),filterInputValue:t.filterInputValue||null,shouldShowBatchActions:t.shouldShowBatchActions||!1,isExpandedAll:!1};if(t.sortDirection&&t.sortHeaderKey){const{rowIds:n}=co(e,o,t.sortHeaderKey,t.sortDirection);o.rowIds=n}return o.isExpandedAll=o.rowIds.every(e=>!0===o.rowsById[e].isExpanded),o},po=(e,t,n)=>e.map(e=>({...t[e],cells:t[e].cells.map(e=>n[e])})),mo=({rowIds:e,headers:t,cellsById:n,inputValue:r,getCellId:a})=>{const o=r.trim().toLowerCase();return o?e.filter(e=>t.some(({key:t})=>{const r=n[a(e,t)];return"boolean"!=typeof r.value&&String(r.value).toLowerCase().includes(o)})):e};var fo=Ea;const bo=(0,a.forwardRef)((e,t)=>{const{children:n,...r}=e;return(0,l.jsx)(fo,{ref:t,itemText:n,...r})});bo.displayName="TableToolbarAction",bo.propTypes={children:m().node,className:m().string,onClick:m().func.isRequired};const ho=({className:e,renderIcon:t=Cr.wB,iconDescription:n="Settings",children:r,menuOptionsClass:a,size:o,...s})=>{const c=Ia(),d=o??c.size,p=i(),m=u()(e,`${p}--toolbar-action ${p}--overflow-menu`),f=u()(a,`${p}--toolbar-action__menu`);return(0,l.jsx)(to,{renderIcon:t,className:m,iconDescription:n,menuOptionsClass:f,size:d,flipped:!0,...s,children:r})};ho.propTypes={children:m().node.isRequired,className:m().string,iconDescription:m().string,menuOptionsClass:m().string,renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(["xs","sm","md","lg"])};const go=x(),xo="carbon.table.row.expand",vo="carbon.table.row.collapse",yo="carbon.table.all.expand",$o="carbon.table.all.collapse",wo="carbon.table.all.select",No="carbon.table.all.unselect",To="carbon.table.row.select",jo="carbon.table.row.unselect",_o={[yo]:"Expand all rows",[$o]:"Collapse all rows",[xo]:"Expand current row",[vo]:"Collapse current row",[wo]:"Select all rows",[No]:"Unselect all rows",[To]:"Select row",[jo]:"Unselect row"},Co=e=>_o[e],ko=e=>{const{children:t,filterRows:n=mo,headers:r,render:o,translateWithId:i=Co,size:l,isSortable:s,useZebraStyles:c,useStaticWidth:d,stickyHeader:u,overflowMenuOnHover:p,experimentalAutoAlign:m,radio:f,rows:b}=e,h=(0,a.useMemo)(()=>go(),[]),[g,x]=(0,a.useState)(()=>({...uo(e,{}),isExpandedAll:!1}));(0,a.useEffect)(()=>{const t=b.map(e=>e.id),n=r.map(e=>e.key),a=!bn()(t,g.rowIds),o=Array.from(new Set(Object.keys(g.cellsById).map(e=>e.split(":")[1]))),i=!bn()(n,o),l=g.rowIds.map(e=>{const t=g.rowsById[e];return r.reduce((e,{key:n})=>({...e,[n]:g.cellsById[no(t.id,n)]?.value}),{id:t.id,disabled:t.disabled,isExpanded:t.isExpanded,isSelected:t.isSelected})}),s=b.map(e=>({...e,disabled:e.disabled??!1,isExpanded:e.isExpanded??!1,isSelected:e.isSelected??!1})),c=!bn()(s,l);(a||i||c)&&x(t=>uo(e,t))},[r,b]);const v=g.rowIds.filter(e=>{const t=g.rowsById[e];return t.isSelected&&!t.disabled}),y="string"==typeof g.filterInputValue?n({cellsById:g.cellsById,getCellId:no,headers:r,inputValue:g.filterInputValue,rowIds:g.rowIds}):g.rowIds,$=()=>`data-table-${h}`,w=e=>`${$()}__header-${e}`,N=(e,t)=>{const{rowIds:n}=e,r=n.length!==y.length;return{rowsById:n.reduce((n,a)=>{const o={...e.rowsById[a]};return o.disabled||r&&!y.includes(a)||(o.isSelected=t),n[a]=o,n},{})}},T=()=>{x(e=>
2({...e,shouldShowBatchActions:!1,...N(e,!1)}))},j=()=>{x(e=>{const{rowsById:t}=e,n=!Object.values(t).filter(e=>e.isSelected&&!e.disabled).length;return{...e,shouldShowBatchActions:n,...N(e,n)}})},_=e=>()=>{x(t=>{const n=t.rowsById[e];if(f){const n=Object.entries(t.rowsById).reduce((e,[t,n])=>(e[t]={...n,isSelected:!1},e),{});return{...t,shouldShowBatchActions:!1,rowsById:{...n,[e]:{...n[e],isSelected:!n[e].isSelected}}}}const r=t.rowIds.filter(e=>t.rowsById[e].isSelected).length,a=n.isSelected?r-1:r+1;return{...t,shouldShowBatchActions:!n.isSelected||a>0,rowsById:{...t.rowsById,[e]:{...n,isSelected:!n.isSelected}}}})},C=e=>()=>{x(t=>{const n=t.rowsById[e],{isExpandedAll:r}=t;return{...t,isExpandedAll:!n.isExpanded&&r,rowsById:{...t.rowsById,[e]:{...n,isExpanded:!n.isExpanded}}}})},k=()=>{x(e=>{const{rowIds:t,isExpandedAll:n}=e;return{...e,isExpandedAll:!n,rowsById:t.reduce((t,r)=>(t[r]={...e.rowsById[r],isExpanded:!n},t),{})}})},I={rows:po(y,g.rowsById,g.cellsById),headers:r,selectedRows:po(v,g.rowsById,g.cellsById),getHeaderProps:({header:t,onClick:n,isSortable:r,...a})=>{const{sortDirection:o,sortHeaderKey:i}=g,{key:l,slug:c,decorator:d}=t,u="string"==typeof a.id&&a.id.length?a.id:w(l);return{...a,id:u,key:l,sortDirection:o,isSortable:r??t.isSortable??s,isSortHeader:i===l,slug:c,decorator:d,onClick:t=>{const r=so(e,g,{key:l});x(e=>({...e,...r})),n&&((e,t)=>n=>e(n,t))(n,{sortHeaderKey:l,sortDirection:r.sortDirection})(t)}}},getExpandHeaderProps:({onClick:e,onExpand:t,...n}={})=>{const{isExpandedAll:r,rowIds:a,rowsById:o}=g,l=r||a.every(e=>o[e].isExpanded),s=l?$o:yo,c=[k,t];return e&&c.push(((e,t)=>n=>e(n,t))(e,{isExpanded:l})),{...n,"aria-label":i(s),"aria-controls":a.map(e=>`${$()}-expanded-row-${e}`).join(" "),isExpanded:l,onExpand:vt(c),id:`${$()}-expand`}},getRowProps:({row:e,onClick:t,...n})=>{const r=e.isExpanded?vo:xo;return{...n,key:e.id,onClick:t,onExpand:vt([C(e.id),t]),isExpanded:e.isExpanded,"aria-label":i(r),"aria-controls":`${$()}-expanded-row-${e.id}`,isSelected:e.isSelected,disabled:e.disabled,expandHeader:`${$()}-expand`}},getExpandedRowProps:({row:e,...t})=>({...t,id:`${$()}-expanded-row-${e.id}`}),getSelectionProps:({onClick:e,row:t,...n}={})=>{if(t){const r=t.isSelected?jo:To;return{...n,checked:t.isSelected,onSelect:vt([_(t.id),e]),id:`${$()}__select-row-${t.id}`,name:`select-row-${h}`,"aria-label":i(r),disabled:t.disabled,radio:f}}const r=g.rowIds.length,a=v.length,o=r>0&&a===r,l=r>0&&a>0&&a!==r,s=o||l?No:wo;return{...n,"aria-label":i(s),checked:o,id:`${$()}__select-all`,indeterminate:l,name:`select-all-${h}`,onSelect:vt([j,e])}},getToolbarProps:e=>({...e,size:"xs"===l||"sm"===l?l:void 0}),getBatchActionProps:e=>{const{shouldShowBatchActions:t}=g,n=v.length;return{onSelectAll:void 0,totalCount:g.rowIds.length,...e,shouldShowBatchActions:t&&n>0,totalSelected:n,onCancel:T}},getTableProps:()=>({useZebraStyles:c,size:l??"lg",isSortable:s,useStaticWidth:d,stickyHeader:u,overflowMenuOnHover:p??!1,experimentalAutoAlign:m}),getTableContainerProps:()=>({stickyHeader:u,useStaticWidth:d}),getCellProps:({cell:{hasAILabelHeader:e,id:t,info:{header:n}},headers:r,...a})=>({...a,hasAILabelHeader:e,headers:"string"==typeof r&&r.length?r:w(n),key:t}),onInputChange:(e,t)=>
2{const n=t??(""===e?e:e.target.value);x(e=>({...e,filterInputValue:n}))},sortBy:t=>(t=>()=>{x(n=>{const r=so(e,n,{key:t});return{...n,...r}})})(t)(),selectAll:j,selectRow:e=>_(e)(),expandRow:e=>C(e)(),expandAll:k,radio:f};return void 0!==o?o(I):void 0!==t?t(I):null};ko.Table=zr,ko.TableActionList=Vr,ko.TableBatchAction=Hr,ko.TableBatchActions=Xr,ko.TableBody=Jr,ko.TableCell=ea,ko.TableContainer=aa,ko.TableDecoratorRow=la,ko.TableExpandHeader=ia,ko.TableExpandRow=da,ko.TableExpandedRow=ua,ko.TableHead=pa,ko.TableHeader=ya,ko.TableRow=$a,ko.TableSelectAll=Ta,ko.TableSelectRow=Ca,ko.TableSlugRow=ca,ko.TableToolbar=Sa,ko.TableToolbarAction=bo,ko.TableToolbarContent=Ra,ko.TableToolbarSearch=Ma,ko.TableToolbarMenu=ho,ko.propTypes={children:m().func,experimentalAutoAlign:m().bool,filterRows:m().func,headers:m().arrayOf(m().shape({key:m().string.isRequired,header:m().node.isRequired,isSortable:m().bool})).isRequired,isSortable:m().bool,locale:m().string,overflowMenuOnHover:m().bool,radio:m().bool,render:I(m().func),rows:m().arrayOf(m().shape({id:m().string.isRequired,disabled:m().bool,isSelected:m().bool,isExpanded:m().bool})).isRequired,size:m().oneOf(["xs","sm","md","lg","xl"]),sortRow:m().func,stickyHeader:m().bool,translateWithId:m().func,useStaticWidth:m().bool,useZebraStyles:m().bool};const Io=({headers:e,rowCount:t=5,columnCount:n=5,zebra:r=!1,className:a,showHeader:o=!0,showToolbar:s=!0,size:c="lg",...d})=>{const p=i(),m=u()(a,{[`${p}--skeleton`]:!0,[`${p}--data-table`]:!0,[`${p}--data-table--${c}`]:c,[`${p}--data-table--zebra`]:r}),f=t,b=Array(f),h=Array.from({length:n},(e,t)=>t);for(let e=0;e<f;e++)b[e]=(0,l.jsx)("tr",{children:h.map(e=>(0,l.jsx)("td",{children:(0,l.jsx)("span",{})},e))},e);return(0,l.jsxs)("div",{className:`${p}--skeleton ${p}--data-table-container`,children:[o?(0,l.jsxs)("div",{className:`${p}--data-table-header`,children:[(0,l.jsx)("div",{className:`${p}--data-table-header__title`}),(0,l.jsx)("div",{className:`${p}--data-table-header__description`})]}
2):null,s?(0,l.jsx)("section",{"aria-label":"data table toolbar",className:`${p}--table-toolbar`,children:(0,l.jsx)("div",{className:`${p}--toolbar-content`,children:(0,l.jsx)("span",{className:`${p}--skeleton ${p}--btn ${p}--btn--sm`})})}):null,(0,l.jsxs)("table",{className:m,...d,children:[(0,l.jsx)("thead",{children:(0,l.jsx)("tr",{children:h.map(t=>(0,l.jsx)("th",{children:e?(0,l.jsx)("div",{className:`${p}--table-header-label`,children:e[t]?.header}):(0,l.jsx)("span",{})},t))})}),(0,l.jsx)("tbody",{children:b})]})]})};Io.propTypes={className:m().string,columnCount:m().number,headers:m().arrayOf(m().shape({header:m().node.isRequired}).isRequired),rowCount:m().number,showHeader:m().bool,showToolbar:m().bool,size:m().oneOf(["xs","sm","md","lg","xl"]),zebra:m().bool};let So=!1;const Eo=(0,a.forwardRef)((e,t)=>{const{datePickerType:n,decorator:r,disabled:o=!1,helperText:s,hideLabel:c,id:d,invalid:p=!1,invalidText:m,labelText:f,onClick:b=()=>{},onChange:g=()=>{},pattern:x="\\d{1,2}\\/\\d{1,2}\\/\\d{4}",placeholder:v,size:y="md",slug:$,type:w="text",warn:N=!1,warnText:T,readOnly:_,...k}=e,I=i(),{isFluid:S}=(0,a.useContext)(Pt),E=V("enable-v12-release"),R=j(),O=(0,a.useRef)(null),D=mt({id:d,readOnly:_,disabled:o,invalid:p,invalidText:m,warn:N,warnText:T}),A={id:d,onChange:e=>{o||g(e)},onClick:e=>{o||b(e)},pattern:x,placeholder:v,type:w};"value"in k&&!So&&(C(!1,"The 'value' prop is not supported on the DatePickerInput component. For DatePicker components with 'datePickerType=\"range\"', please pass the 'value' prop (as an array of dates) to the parent DatePicker component instead."),So=!0);const L=u()(`${I}--date-picker-input__wrapper`,{[`${I}--date-picker-input__wrapper--invalid`]:D.invalid,[`${I}--date-picker-input__wrapper--warn`]:D.warn,[`${I}--date-picker-input__wrapper--slug`]:$,[`${I}--date-picker-input__wrapper--decorator`]:r}),M=u()(`${I}--label`,{[`${I}--visually-hidden`]:c,[`${I}--label--disabled`]:D.disabled,[`${I}--label--readonly`]:_}),P=u()(`${I}--form__helper-text`,{[`${I}--form__helper-text--disabled`]:D.disabled}),B=u()(`${I}--date-picker__input`,{[`${I}--date-picker__input--${y}`]:y,[`${I}--date-picker__input--invalid`]:D.invalid,[`${I}--date-picker__input--warn`]:D.warn}),F=u()(`${I}--date-picker-container`,{[`${I}--date-picker--nolabel`]:!f,[`${I}--date-picker--fluid--invalid`]:S&&D.invalid,[`${I}--date-picker--fluid--warn`]:S&&D.warn}),z=s?`datepicker-input-helper-text-${R}`:void 0;let q;q=D.invalid?D.invalidId:D.warn?D.warnId:s?z:void 0;const H={...k,...A,className:B,disabled:D.disabled,readOnly:_,ref:t,"aria-describedby":q};D.invalid&&(H["data-invalid"]=!0,H["aria-invalid"]=!0);const K=(0,l.jsx)("input",{...H}),W=$??r,U=G(W,Ze)?(0,a.cloneElement)(W,{size:"mini"}):W;return ft(O,"The DatePickerInput component `labelText` prop must have no interactive content"),(0,l.jsxs)("div",{className:F,children:[f?(0,l.jsx)(h,{as:"label",htmlFor:d,className:M,ref:O,children:f}):null,(0,l.jsx)("div",{className:L,children:(0,l.jsxs)("span",{children:[K,$?U:r?(0,l.jsx)("div",{className:`${I}--date-picker-input-inner-wrapper--decorator`,children:U}):"",(0,l.jsx)(Ro,{datePickerType:n,invalid:D.invalid,warn:D.warn,disabled:D.disabled,readOnly:_})]})}),E&&S&&(D.invalid||D.warn)&&(0,l.jsx)("hr",{className:`${I}--date-picker__divider`}),D.validation,s&&!D.invalid&&!D.warn&&(0,l.jsx)(h,{as:"div",id:z,className:P,children:s})]})});function Ro({datePickerType:e,invalid:t,warn:n,disabled:r,readOnly:o}){const s=i(),{isFluid:c}=(0,a.useContext)(Pt);return"simple"!==e||t||n||c?r||o?(0,l.jsx)(lt.Vv,{className:`${s}--date-picker__icon`,role:"img","aria-hidden":"true"}):t?(0,l.jsx)(pt.BF,{className:`${s}--date-picker__icon ${s}--date-picker__icon--invalid`}):!t&&n?(0,l.jsx)(pt.OR,{className:`${s}--date-picker__icon ${s}--date-picker__icon--warn`}):(0,l.jsx)(lt.Vv,{className:`${s}--date-picker__icon`,role:"img","aria-hidden":"true"}):null}Eo.propTypes={datePickerType:m().oneOf(["simple","single","range"]),decorator:m().node,disabled:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,onChange:m().func,onClick:m().func,pattern:m().string,placeholder:m().string,readOnly:m().bool,size:m().oneOf(["sm","md","lg"]),slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),type:m().string,warn:m().bool,w
2arnText:m().node},Ro.propTypes={datePickerType:m().oneOf(["simple","single","range"]),invalid:m().bool,warn:m().bool,disabled:m().bool,readOnly:m().bool};var Oo=Eo;const Do=e=>t=>{const{inputFrom:n,inputTo:r,container:a}=e;let o=!1;const i=e=>{const o=e.composedPath(),{target:i}=e;return i instanceof Node&&Boolean(a&&(o.includes(a)||a.contains(i))||o.includes(t.calendarContainer)||t.calendarContainer.contains(i)||n&&(o.includes(n)||n.contains(i))||r&&(o.includes(r)||r.contains(i)))},l=e=>{o?o=!1:t.isOpen&&!i(e)?(o=!1,t.close()):o=!1},s=e=>{o=i(e)},c=e=>{const{target:a}=e;n!==a&&r!==a||(de(e,J)?(o=!1,t.setDate(r?[n.value,r.value]:[n.value],!0,t.config.dateFormat),e.stopPropagation(),r===a&&t.config.closeOnSelect&&requestAnimationFrame(()=>{t.close()})):de(e,le)?(e.preventDefault(),t.open()):t.config.allowInput||de(e,X)||(e.stopPropagation(),e.preventDefault()))},d=e=>t.parseDate(e,t.config.dateFormat),u=e=>{const{target:a}=e;if(r){if(r===a&&t.selectedDates[1]){const e=e=>e?.setHours(0,0,0,0),a=e(new Date(t.selectedDates[1])),o=e(d(r.value));a&&o&&a!==o&&t.setDate([n.value,r.value],!0,t.config.dateFormat)}var o;r===a&&1===t.selectedDates.length&&r.value&&(o=d(r.value),"Invalid Date"!==o?.toString()&&t.setDate([n.value,r.value],!0,t.config.dateFormat))}},p=()=>{const{inputFrom:t,inputTo:n}=e;n&&(n.removeEventListener("keydown",c,!0),n.removeEventListener("blur",u,!0)),t.removeEventListener("keydown",c,!0),document.removeEventListener("mousedown",s,!0),document.removeEventListener("click",l,!0)};return{onReady:[()=>{t.loadedPlugins.push("carbonFlatpickrFixEventsPlugin")},()=>{p();const{inputFrom:t,inputTo:n}=e;t.addEventListener("keydown",c,!0),n&&(n.addEventListener("keydown",c,!0),n.addEventListener("blur",u,!0)),document.addEventListener("mousedown",s,!0),document.addEventListener("click",l,!0)}],onDestroy:[p]}},Ao=e=>""===e||null==e;var Lo=n(79977),Mo=n.n(Lo);const Po=(e={})=>{const t=Mo()(Object.assign({position:"left"},e));return n=>{const{setDate:r}=n,a=t(n),{onReady:o}=a;return Object.assign(a,{onReady:[()=>{n.setDate=(t,a,o)=>{if(r(t,a,o),!a&&Array.isArray(t)&&2===t.length){const{formatDate:r,_input:a}=n,{input:o}=e;[a,"string"==typeof o?document.querySelector(o):o].forEach((e,a)=>{e&&e instanceof HTMLInputElement&&(e.value=Ao(t[a])?"":r(new Date(t[a]),n.config.dateFormat))})}}},o],onPreCalendarPosition:()=>{}})}},Bo=e=>{const t=(0,a.useRef)(e);return(0,a.useEffect)(()=>{t.current=e},[e]),(0,a.useCallback)((...e)=>t.current?t.current(...e):void 0,[])},Fo=new Map;const zo=e=>"month-year"===function(e){const t=Fo.get(e);if(t)return t;const n=new Intl.DateTimeFormat(e,{year:"numeric",month:"long"}).formatToParts(new Date(2e3,0,1)),r=n.findIndex(e=>"month"===e.type)<n.findIndex(e=>"year"===e.type)?"month-year":"year-month";return Fo.set(e,r),r}(e);var qo=n(96529),Ho=n(49388),Ko=n.n(Ho);const Vo=Array.prototype.forEach,Wo=e=>`The \`${e}\` prop is deprecated and will be removed in the next major release. Please use the new \`preview__DatePicker\` component which doesn't use it — if that blocks you, tell us why: https://github.com/carbon-design-system/carbon/issues.`,Uo=(e,t,n)=>n.months[t?"shorthand":"longhand"][e],Go={selectorFlatpickrMonthYearContainer:".flatpickr-current-month",selectorFlatpickrYearContainer:".numInputWrapper",selectorFlatpickrCurrentMonth:".cur-month",classFlatpickrCurrentMonth:"cur-month"},Yo=(e,t)=>{if(e.monthElements){const n=Uo(e.currentMonth,!0===t.shorthand,e.l10n);e.yearElements.forEach(e=>{const r=e.closest(t.selectorFlatpickrMonthYearContainer);r&&Array.prototype.forEach.call(r.querySelectorAll(t.selectorFlatpickrCurrentMonth),e=>{e.textContent=n})})}},Qo=e=>t=>({onMonthChange:()=>Yo(t,e),onValueUpdate:()=>Yo(t,e),onOpen:()=>Yo(t,e),onReady:[()=>{t.monthElements&&(t.monthElements.forEach(e=>{e.parentNode&&e.parentNode.removeChild(e)}),t.monthElements.splice(0,t.monthElements.length,...t.monthElements.map(()=>{const n=t._createElement("span",e.classFlatpickrCurrentMonth);return n.textContent=Uo(t.currentMonth,!0===e.shorthand,t.l10n),zo(e.locale)?t.yearElements[0].closest(e.selectorFlatpickrMonthYearContainer).insertBefore(n,t.yearElements[0].closest(e.selectorFlatpickrYearContainer)):t.yearElements[0].closest(e.selectorFlatpickrMonthYearContainer).insertAdjacentElement("beforeend",n),n})))},()=>Yo(t,e),()=>{t.loadedPlugins.push("carbonFlatpickrMonthSelectPlugin")}]});function Zo(e){return e.every(e=>!e.props.labelText)}function Xo(e,t,n=!1){const r=e.calendarContainer,a=e.days;r&&a&&(r.classList.add(`${t}--date-picker__calendar`),r.classList.toggle(`${t}--date-picker__calendar--fluid`,n),r.querySelector(".flatpickr-month").classList.add(`${t}--date-picker__month`),r.querySelector(".flatpickr-weekdays").classList.add(`${t}--date-picker__weekdays`),r.querySelector(".flatpickr-days").classList.add(`${t}--date-picker__days`),Vo.call(r.querySelectorAll(".flatpickr-weekday"),e=>{const n=e;n.innerHTML=n.innerHTML.replace(/\s+/g,""),n.classList.add(`${t}--date-picker__weekday`)}),Vo.call(a.querySelectorAll(".flatpickr-day"),n=>{n.classList.add(`${t}--date-picker__day`),n.setAttribute("role","button"),n.classList.contains("today")&&e.selectedDates.length>0?n.classList.add("no-border"):n.classList.contains("today")&&0===e.selectedDates.length&&n.classList.remove("no-border")}))}const Jo=(0,a.forwardRef)((e,t)=>{const{allowInput:n,appendTo:r,children:o,className:s,closeOnSelect:c=!0,dateFormat:d="m/d/Y",datePickerType:p,disable:m,enable:f,inline:b,invali
2d:h,warn:g,light:x=!1,locale:v="en",maxDate:y,minDate:$,onChange:w,onClose:N,onOpen:T,readOnly:j=!1,short:_=!1,value:C,parseDate:k,nextMonthAriaLabel:I="Next month",prevMonthAriaLabel:S="Previous month",...E}=e,R=i(),[O,D]=(0,a.useState)(!1),A=(0,a.useCallback)(e=>{null!==e&&(A.current=e,D(!0))},[]),L=(0,a.useRef)(""),M=(0,a.useRef)(null),[P,B]=(0,a.useState)(null),F=(0,a.useCallback)((e,t,n)=>{L.current&&e[0]&&!A.current.value&&(A.current.value=L.current,M.current?.setDate([A.current.value,q?.current?.value],!0,M.current.config.dateFormat)),N&&N(e,t,n)},[N]),z=(e,t,n,r)=>{r&&"clickOutside"===r.type||B({selectedDates:e,dateStr:t,instance:n})};(0,a.useEffect)(()=>{if(P){const{selectedDates:e,dateStr:t,instance:n}=P;F(e,t,n),B(null)}},[P,F]);const q=(0,a.useRef)(null),H=(0,a.useRef)(null),K=Bo(w),V=Bo(T),W=(0,a.useRef)(null),{isFluid:U}=(0,a.useContext)(Pt),Y=u()(`${R}--date-picker`,{[`${R}--date-picker--short`]:_,[`${R}--date-picker--light`]:x,[`${R}--date-picker--simple`]:"simple"===p,[`${R}--date-picker--single`]:"single"===p,[`${R}--date-picker--range`]:"range"===p,[`${R}--date-picker--nolabel`]:"range"===p&&Zo(o)}),Q=u()(`${R}--form-item`,{[String(s)]:s}),Z=a.Children.toArray(o).map((e,t)=>{const n=e.props?.invalid,r=e.props?.warn,o=h??n,i=!o&&(g??r);return 0===t&&G(e,Oo)?a.cloneElement(e,{datePickerType:p,ref:A,readOnly:j,invalid:o,warn:i}):1===t&&G(e,Oo)?a.cloneElement(e,{datePickerType:p,ref:q,readOnly:j,invalid:o,warn:i}):0===t?a.cloneElement(e,{ref:A,readOnly:j,invalid:o,warn:i}):1===t?a.cloneElement(e,{ref:q,readOnly:j,invalid:o,warn:i}):void 0});return(0,a.useEffect)(()=>{Ko()?.en?.weekdays?.shorthand&&Ko().en.weekdays.shorthand.forEach((e,t)=>{const n=Ko().en.weekdays.shorthand;"Thu"===n[t]||"Th"===n[t]?n[t]="Th":n[t]=n[t].charAt(0)})},[]),(0,a.useEffect)(()=>{if("single"!==p&&"range"!==p)return;if(!A.current)return;const e=(e,t,n)=>{Xo(n,R,U),A?.current&&(A.current.readOnly=j),q?.current&&(q.current.readOnly=j)},t=f?"enable":"disable";let a,o,i;if(a=f||m?f||m:[],"object"==typeof v){const e=v.locale?v.locale:"en";o={...Ko()[e],...v}}else o=Ko()[v];k||"m/d/Y"!==d?k&&(i=k):i=e=>{const t=e.split("/")[0]<=12&&e.split("/")[0]>0?parseInt(e.split("/")[0]):1,n=parseInt(e.split("/")[2]);if(t&&n){const r=new Date(n,t,0).getDate(),a=e.split("/")[1]<=r&&e.split("/")[1]>0?parseInt(e.split("/")[1]):1;return new Date(`${n}/${t}/${a}`)}return!1};const l=`<svg aria-label="${I}" role="img" width="16px" height="16px" viewBox="0 0 16 16">\n      <polygon points="11,8 6,13 5.3,12.3 9.6,8 5.3,3.7 6,3 "/>\n    </svg>`,s=`<svg aria-label="${S}" role="img" width="16px" height="16px" viewBox="0 0 16 16">\n      <polygon points="5,8 10,3 10.7,3.7 6.4,8 10.7,12.3 10,13 "/>\n    </svg>`,{current:u}=A,{current:h}=q,g={inline:b??!1,onClose:z,disableMobile:!0,ariaDateFormat:"l, F j, Y",defaultDate:C,closeOnSelect:c,mode:p,allowInput:n??!0,dateFormat:d,locale:o,[t]:a,minDate:$,maxDate:y,parseDate:i,plugins:["range"===p?Po({input:q.current??void 0}):()=>{},r?(x={appendTo:r},e=>({appendTo:x.appendTo,onReady:()=>{e.loadedPlugins.push("carbonFlatpickrAppendToPlugin")},onPreCalendarPosition:()=>{Promise.resolve().then(()=>{const{calendarContainer:t,config:n,_positionElement:r}=e,a=n.appendTo;if(!a)throw new Error("[appendToPlugin] Missing `appendTo` element.");const{left:o,top:i}=a.getBoundingClientRect(),{left:l,bottom:s}=r.getBoundingClientRect();if((a!==a.ownerDocument.body||0!==o||0!==i)&&"static"===a.ownerDocument.defaultView?.getComputedStyle(a).getPropertyValue("position"))throw new Error("Floating menu container must not have `position: static`.");t.style.top=s-i+2+"px",t.style.left=l-o+"px"})}})):()=>{},Qo({...Go,locale:v}),Do({inputFrom:A.current,inputTo:q.current,container:W.current})],clickOpens:!j,noCalendar:j,nextArrow:l,prevArrow:s,onChange:(...e)=>{j||K(...e)},onReady:e,onMonthChange:e,onYearChange:e,onOpen:(...t)=>{e(...t),V(...t)},onValueUpdate:e};var x;const w=(0,qo.A)(u,g);M.current=w;const N=e=>{if(j&&de(e,X))return;const{calendarContainer:t,selectedDateElem:n,todayDateElem:r}=w;if(de(e,ee)&&t.classList.remove("open"),de(e,X)){if(!e.shiftKey&&"range"===p&&e.target===A.current&&1===w.selectedDates.length&&q.current&&!q.current.disabled)return e.preventDefault(),q.current.focus(),void(H.current=q.current);if(e.shiftKey)M.current?.isOpen&&e.target===A.current&&(M.current.close(),z(M.current.selectedDates,"",M.current,e));else{e.preventDefault(),t.classList.add("open");const a=t.querySelector(".selected")&&n,o=t.querySelector(".today")&&r,i=a||o||t.querySelector(".flatpickr-day[tabindex]")||t;i instanceof HTMLElement&&i.focus(),e.target===A.current?H.current=A.current:e.target===q.current&&(H.current=q.current)}}},T=e=>{if(!M.current||!A.current)return;const t="range"==p?q.current:A.current;de(e,X)&&(e.shiftKey?(e.preventDefault(),(H.current||A.current).focus()):H.current===t?(t.focus(),M.current.close(),z(M.current.selectedDates,"",M.current,e)):(e.preventDefault(),t.focus()))};function _(e){const{target:t}=e;t===u&&(L.current=u.value),""===u.value&&w.selectedDates.length}function E(e){de(e,J)&&c&&"single"==p&&w.calendarContainer.classList.remove("open")}return u&&(u.addEventListener("keydown",N),u.addEventListener("change",_),u.addEventListener("keypress",E),w&&w.calendarContainer&&(w.calendarContainer.setAttribute("role","application"),w.calendarContainer.setAttribute("aria-label","calendar-container"))),h&&(h.addEventListener("keydown",N),h.addEventListener("change",_),h.addEventListener("keypress",E)),w.calendarContainer&&w.calendarContainer.addEventListener("keydown",T),()=>{w&&w.destroy&&w.destroy(),C&&(u&&(u.value=""),h&&(h.value="")),u&&(u.removeEventListener("keydown",N),u.removeEventListener("change",_),u.removeEventListener("keypress",E)),h&&(h.removeEventListener("keydown",N),h.removeEventListener("change",_),h.removeEventListener("keypress",E)),w.calendarContainer&&w.calendarContainer.removeEventListener("keydown",T)}},[K,V,j,c,O,p,I,S]),(0,a.useImperativeHandle)(t,()=>
2({get calendar(){return M.current}})),(0,a.useEffect)(()=>{M.current?.set&&M.current.set({dateFormat:d})},[d]),(0,a.useEffect)(()=>{M.current?.set&&M.current.set("minDate",$)},[$]),(0,a.useEffect)(()=>{M.current?.set&&M.current.set("allowInput",n)},[n]),(0,a.useEffect)(()=>{M.current?.set&&M.current.set("maxDate",y)},[y]),(0,a.useEffect)(()=>{M.current?.set&&m&&M.current.set("disable",m)},[m]),(0,a.useEffect)(()=>{M.current?.set&&f&&M.current.set("enable",f)},[f]),(0,a.useEffect)(()=>{M.current?.set&&b&&M.current.set("inline",b)},[b]),(0,a.useEffect)(()=>{(Ao(C)||Array.isArray(C)&&C.every(Ao))&&M.current?.selectedDates.length&&(M.current?.clear(),A.current&&(A.current.value=""),q.current&&(q.current.value=""))},[C,A]),(0,a.useEffect)(()=>{M.current?.set?(!Ao(C)&&(!Array.isArray(C)||C.length>0&&!C.every(Ao))&&(M.current.setDate(C),Yo(M.current,Go)),Xo(M.current,R,U)):M.current||null==C||(A.current.value=C)},[C,R,A,U]),(0,l.jsxs)("div",{className:Q,ref:t,...E,children:[(0,l.jsx)("div",{className:Y,ref:W,children:Z}),void 0]})});Jo.propTypes={allowInput:m().bool,appendTo:I(m().object,Wo("appendTo")),children:m().node,className:m().string,closeOnSelect:m().bool,dateFormat:m().string,datePickerType:m().oneOf(["simple","single","range"]),disable:I(m().array,Wo("disable")),enable:I(m().array,Wo("enable")),inline:I(m().bool,Wo("inline")),invalid:m().bool,light:I(m().bool,"The `light` prop for `DatePicker` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),locale:m().oneOfType([m().object,m().oneOf(["ar","at","az","be","bg","bn","bs","cat","cs","cy","da","de","en","eo","es","et","fa","fi","fo","fr","ga","gr","he","hi","hr","hu","id","is","it","ja","ka","km","ko","kz","lt","lv","mk","mn","ms","my","nl","no","pa","pl","pt","ro","ru","si","sk","sl","sq","sr","sv","th","tr","uk","uz","uz_latn","vn","zh_tw","zh"])]),maxDate:m().oneOfType([m().string,m().number]),minDate:m().oneOfType([m().string,m().number]),onChange:m().func,onClose:m().func,onOpen:m().func,parseDate:I(m().func,Wo("parseDate")),readOnly:m().oneOfType([m().bool,m().array]),short:m().bool,value:m().oneOfType([m().string,m().arrayOf(m().oneOfType([m().string,m().number,m().object])),m().object,m().number]),warn:m().bool,nextMonthAriaLabel:m().string,prevMonthAriaLabel:m().string};const{ItemMouseMove:ei,MenuMouseLeave:ti,ToggleButtonBlur:ni,FunctionCloseMenu:ri}=mn.WM.stateChangeTypes;function ai(e,t){const{changes:n,type:r}=t;switch(r){case ei:return e;case ti:return n.highlightedIndex===e.highlightedIndex?e:n;case ni:case ri:return{...n,selectedItem:e.selectedItem};default:return n}}const oi=a.forwardRef(({autoAlign:e=!1,className:t,decorator:n,disabled:r=!1,direction:o="bottom",items:s,label:c,"aria-label":d,ariaLabel:p,itemToString:m=Xe,itemToElement:f=null,renderSelectedItem:b,type:h="default",size:g,onChange:x,id:v,titleText:y="",hideLabel:$,helperText:w="",translateWithId:N,light:T,invalid:j,invalidText:_,warn:C,warnText:k,initialSelectedItem:I,selectedItem:E,downshiftProps:R,readOnly:O,slug:D,...A},L)=>{const M=V("enable-v12-dynamic-floating-styles"),{refs:P,floatingStyles:B,middlewareData:F}=(0,fe.we)(M||e?{placement:o,strategy:"fixed",middleware:[(0,be.Ej)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}),e&&(0,be.UU)(),e&&(0,be.jD)()],whileElementsMounted:he.ll}:{});(0,a.useEffect)(()=>{if(M||e){const e={...B,visibility:F.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{P.floating.current&&(P.floating.current.style[t]=e[t])})}},[B,e,P.floating]);const z=i(),{isFluid:q}=(0,a.useContext)(Pt),H=(0,a.useCallback)(({selectedItem:e})=>{x&&x({selectedItem:e??null})},[x]),K=(0,a.useCallback)(e=>{const{highlightedIndex:t}=e;if(void 0!==t&&t>-1){const e=document.querySelectorAll(`li.${z}--list-box__menu-item[role="option"]`)[t];e&&e.scrollIntoView({behavior:"smooth",block:"nearest"})}},[z]),W=(0,a.useMemo)(()=>s,[s]),U=(0,a.useMemo)(()=>({items:W,itemToString:m,initialSelectedItem:I,onSelectedItemChange:H,stateReducer:ai,isItemDisabled:Dt,onHighlightedIndexChange:K,...R}),[W,m,I,H,ai,K,R]);void 0!==E&&(U.selectedItem=E);const{isOpen:Y,getToggleButtonProps:Q,getLabelProps:Z,getMenuProps:X,getItemProps:J,selectedItem:ee,highlightedIndex:te}=(0,mn.WM)(U),ne="inline"===h,re=mt({id:v,readOnly:O,disabled:r??!1,invalid:j??!1,invalidText:_,warn:C??!1,warnText:k}),[ae,oe]=(0,a.useState)(!1),ie=u()(`${z}--dropdown`,{[`${z}
2--dropdown--invalid`]:re.invalid,[`${z}--dropdown--warning`]:re.warn,[`${z}--dropdown--open`]:Y,[`${z}--dropdown--focus`]:ae,[`${z}--dropdown--inline`]:ne,[`${z}--dropdown--disabled`]:re.disabled,[`${z}--dropdown--light`]:T,[`${z}--dropdown--readonly`]:O,[`${z}--dropdown--${g}`]:g,[`${z}--list-box--up`]:"top"===o,[`${z}--autoalign`]:e}),le=u()(`${z}--label`,{[`${z}--label--disabled`]:re.disabled,[`${z}--visually-hidden`]:$}),se=u()(`${z}--form__helper-text`,{[`${z}--form__helper-text--disabled`]:re.disabled}),ce=u()(`${z}--dropdown__wrapper`,`${z}--list-box__wrapper`,t,{[`${z}--dropdown__wrapper--inline`]:ne,[`${z}--list-box__wrapper--inline`]:ne,[`${z}--dropdown__wrapper--inline--invalid`]:ne&&re.invalid,[`${z}--list-box__wrapper--inline--invalid`]:ne&&re.invalid,[`${z}--list-box__wrapper--fluid--invalid`]:q&&re.invalid,[`${z}--list-box__wrapper--slug`]:D,[`${z}--list-box__wrapper--decorator`]:n}),de=Q({"aria-label":d||p}),ue=w&&!q?(0,l.jsx)("div",{id:re.helperId,className:se,children:w}):null,pe=e=>{oe("focus"===e.type&&!ee)},me=(0,a.useRef)(null),ge=(0,a.useRef)(null),xe=(0,a.useRef)(null),ve=At(de.ref,L,me),[ye,$e]=(0,a.useState)(),[we,Ne]=(0,a.useState)(!1),Te=(0,a.useCallback)(e=>{["ArrowDown","ArrowUp"," ","Enter"].includes(e.key)?we&&" "===e.key&&(ye&&clearTimeout(ye),$e(setTimeout(()=>{Ne(!1)},3e3))):(Ne(!0),ye&&clearTimeout(ye),$e(setTimeout(()=>{Ne(!1)},3e3))),["ArrowDown"].includes(e.key)&&oe(!1),!["Enter"].includes(e.key)||ee||Y||oe(!0),de.onKeyDown&&("ArrowUp"!==e.key||Y&&"ArrowUp"===e.key)&&de.onKeyDown(e)},[we,ye,de]),je=(0,a.useMemo)(()=>O?{onClick:e=>{e.preventDefault(),me.current?.focus()},onKeyDown:e=>{["ArrowDown","ArrowUp"," ","Enter"].includes(e.key)&&e.preventDefault()}}:{onKeyDown:Te},[O,Te]),_e=(0,a.useMemo)(()=>X({ref:M||e?P.setFloating:null}),[e,X,P.setFloating,M]),Ce=D??n,ke=G(Ce,Ze)?(0,a.cloneElement)(Ce,{size:"mini"}):Ce,Ie=Z(),Se=(0,a.isValidElement)(y)?{id:Ie.id}:Ie;return ft(ge,"The Dropdown component `titleText` prop must have no interactive content"),ft(xe,"The Dropdown component `label` prop must have no interactive content"),(0,l.jsxs)("div",{className:ce,...A,children:[y?(0,l.jsx)("label",{className:le,...Se,ref:ge,children:y}):null,(0,l.jsxs)(tn,{onFocus:pe,onBlur:pe,size:g,className:ie,invalid:re.invalid,invalidText:_,invalidTextId:re.invali
2dId,warn:re.warn,warnText:k,warnTextId:re.warnId,light:T,isOpen:Y,ref:M||e?P.setReference:null,id:v,children:[re.invalid&&(0,l.jsx)(pt.BF,{className:`${z}--list-box__invalid-icon`}),re.warn&&(0,l.jsx)(pt.OR,{className:`${z}--list-box__invalid-icon ${z}--list-box__invalid-icon--warning`}),(0,l.jsxs)("button",{type:"button",className:`${z}--list-box__field`,disabled:re.disabled,"aria-disabled":!!O||void 0,"aria-describedby":ne||re.invalid||re.warn||!ue?re.invalid?re.invalidId:re.warn?re.warnId:void 0:re.helperId,title:ee&&void 0!==m?m(ee):Xe(c),...de,...je,ref:ve,children:[(0,l.jsx)("span",{className:`${z}--list-box__label`,ref:xe,children:ee?b?b(ee):m(ee):c}),(0,l.jsx)(tn.MenuIcon,{isOpen:Y,translateWithId:N})]}),D?ke:n?(0,l.jsx)("div",{className:`${z}--list-box__inner-wrapper--decorator`,children:ke}):"",(0,l.jsx)(tn.Menu,{..._e,children:Y&&W.map((e,t)=>{const n=J({item:e,index:t}),r=m(e);return(0,l.jsxs)(tn.MenuItem,{isActive:ee===e,isHighlighted:te===t,title:r,disabled:n["aria-disabled"],...n,children:[f?f(e):m(e),ee===e&&(0,l.jsx)(S.MG,{className:`${z}--list-box__menu-item__selected-icon`})]},n.id)})})]}),!ne&&!q&&!re.validation&&ue]})});oi.displayName="Dropdown",oi.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),autoAlign:m().bool,className:m().string,decorator:m().node,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().object,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,initialSelectedItem:m().oneOfType([m().object,m().string,m().number]),invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,label:m().node.isRequired,light:I(m().bool,"The `light` prop for `Dropdown` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),onChange:m().func,readOnly:m().bool,renderSelectedItem:m().func,selectedItem:m().oneOfType([m().object,m().string,m().number]),size:Mt,slug:I(m().node,"The `slug` prop for `Dropdown` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release."),titleText:m().node.isRequired,translateWithId:m().func,type:Lt,warn:m().bool,warnText:m().node};const ii=({className:e,size:t,hideLabel:n,...r})=>{const a=i(),o=u()(e,`${a}--skeleton`,`${a}--form-item`);return(0,l.jsxs)("div",{className:o,...r,children:[!n&&(0,l.jsx)("span",{className:`${a}--label ${a}--skeleton`}),(0,l.jsx)("div",{className:u()(`${a}--skeleton ${a}--dropdown`,{[`${a}--list-box--${t}`]:t})})]})};function li({accept:e=[],className:t,id:n,disabled:r,labelText:o="Add file",maxFileSize:s,multiple:c=!1,name:d,onAddFiles:p=dt,onClick:m,pattern:f=".[0-9a-z]+$",innerRef:b,...h}){const g=i(),x=(0,a.useRef)(null),v=j(),{current:y}=(0,a.useRef)(n||v),[$,w]=(0,a.useState)(!1),N=u()(`${g}--file__drop-container`,`${g}--file-browse-btn`,{[`${g}--file__drop-container--drag-over`]:$,[`${g}--file-browse-btn--disabled`]:r},t),T=t=>t.length?function(t){const n=new Set(e);return t.reduce((t,r)=>{const{name:a,type:o=""}=r,i=new RegExp(f,"i"),[l]=a.match(i)??[];return s&&r.size>s?(r.invalidFileType=!0,t.concat([r])):e.length?void 0===l?t:(n.has(o)||n.has(l.toLowerCase())||(r.invalidFileType=!0),t.concat([r])):t.concat([r])},[])}(c?t:[t[0]]):[];return(0,l.jsxs)("div",{className:`${g}--file`,onDragOver:e=>{e.stopPropagation(),e.preventDefault(),r||(w(!0),e.dataTransfer.dropEffect="copy")},onDragLeave:e=>{e.stopPropagation(),e.preventDefault(),r||(w(!1),e.dataTransfer.dropEffect="move")},onDrop:e=>{e.stopPropagation(),e.preventDefault(),r||(w(!1),(e=>{const t=[...e.dataTransfer.items??[]],n=t.length?t.reduce((e,t)=>{if("file"!==t.kind)return e;if(t.webkitGetAsEntry()?.isDirectory)return e;const n=t.getAsFile();return n&&e.push(n),e},[]):[...e.dataTransfer.files],r=T(n);if(x.current)try{const e=new DataTransfer;r.forEach(t=>e.items.add(t)),x.current.files=e.files}catch{}p(e,{addedFiles:r})})(e))},children:[(0,l.jsx)("button",{type:"button",className:N,ref:b,onKeyDown:e=>{ce(e,[J,te])&&(e.preventDefault(),x.current?.click())},onClick:vt([m,()=>{r||x.current?.click()}]),...h,children:o}),(0,l.jsx)("label",{htmlFor:y,className:`${g}--visually-hidden`,children:o}),(0,l.jsx)("input",{type:"file",id:y,className:`${g}--file-input`,ref:x,tabIndex:-1,disabled:r,accept:e.join(","),name:d,multiple:c,onChange:e=>{const t=[...e.target.files??[]];return p(e,{addedFiles:T(t)})},onClick:e=>{e.target.value=""}})]})}function si({iconDescription:e="Uploading file",status:t="uploading",invalid:n,disabled:r,name:a,tabIndex:o=0,"aria-describedby":s,...c}){const d=i();switch(t){case"uploading":return(0,l.jsx)(Wn,{description:e,small:!0,withOverlay:!1,className:`${d}--file-loading`});case"edit":return(0,l.jsxs)(l.Fragment,{children:[n&&(0,l.jsx)(pt.BF,{className:`${d}--file-invalid`}),(0,l.jsx)("button",{disabled:r,"aria-label":`${e} - ${a}`,className:`${d}--file-close`,type:"button",tabIndex:o,...c,"aria-describedby":n?s:void 0,children:(0,l.jsx)(S.bm,{})})]});case"complete":return(0,l.jsx)(S._j,{"aria-label":e,className:`${d}
2--file-complete`,...c,tabIndex:-1,children:e&&(0,l.jsx)("title",{children:e})});default:return null}}function ci({uuid:e,name:t,status:n="uploading",iconDescription:r,onDelete:o=dt,invalid:s,errorSubject:c,errorBody:d,size:p,className:m,disabled:f,...b}){const g=(0,a.useRef)(null),[x,y]=(0,a.useState)(!1),$=i(),w=j(),{current:N}=(0,a.useRef)(e||w),T=u()(`${$}--file__selected-file`,m,{[`${$}--file__selected-file--invalid`]:s,[`${$}--file__selected-file--md`]:"md"===p,[`${$}--file__selected-file--sm`]:"sm"===p,[`${$}--file__selected-file--disabled`]:f}),_=s?`${$}--file-filename-container-wrap-invalid`:`${$}--file-filename-container-wrap`,C=e=>e?.replace(/\s+/g,"");return v(()=>{(e=>{if(!e)return y(!1),!1;const t=e.offsetWidth<e.scrollWidth;y(t)})(g.current)},[$,t]),(0,l.jsxs)("span",{className:T,...b,children:[x?(0,l.jsx)("div",{className:_,children:(0,l.jsx)(Ie,{label:t,align:"bottom",className:`${$}--file-filename-tooltip`,children:(0,l.jsx)("button",{className:`${$}--file-filename-button`,type:"button",children:(0,l.jsx)(h,{ref:g,as:"p",title:t,className:`${$}--file-filename-button`,id:C(t),children:t})})})}):(0,l.jsx)(h,{ref:g,as:"p",title:t,className:`${$}--file-filename`,id:C(t),children:t}),(0,l.jsx)("div",{className:`${$}--file-container-item`,children:(0,l.jsx)("span",{className:`${$}--file__state-container`,children:(0,l.jsx)(si,{name:t,disabled:f,iconDescription:r,status:n,invalid:s,"aria-describedby":s&&c?`${C(t)}-id-error`:void 0,onKeyDown:e=>{ce(e,[J,te])&&"edit"===n&&(e.preventDefault(),o(e,{uuid:N}))},onClick:e=>{"edit"===n&&o(e,{uuid:N})}})})}),s&&c&&(0,l.jsxs)("div",{className:`${$}--form-requirement`,role:"alert",id:`${C(t)}-id-error`,children:[(0,l.jsx)(h,{as:"div",className:`${$}--form-requirement__title`,children:c}),d&&(0,l.jsx)(h,{as:"p",className:`${$}--form-requirement__supplement`,children:d})]})]})}ii.propTypes={className:m().string,hideLabel:m().bool,size:Mt},li.propTypes={accept:m().arrayOf(m().string),className:m().string,disabled:m().bool,id:m().string,labelText:m().string.isRequired,maxFileSize:m().number,multiple:m().bool,name:m().string,onAddFiles:m().func,onClick:m().func,pattern:m().string,role:I(m().number,"The `role` prop for `FileUploaderButton` has been deprecated since it now renders a button element by default, and has an implicit role of button."),tabIndex:I(m().number,"The `tabIndex` prop for `FileUploaderButton` has been deprecated since it now renders a button element by default.")},si.propTypes={"aria-describedby":m().string,iconDescription:m().string,invalid:m().bool,name:m().string,status:m().oneOf(["edit","complete","uploading"]),tabIndex:m().number},ci.propTypes={errorBody:m().string,errorSubject:m().string,iconDescription:m().string,invalid:m().bool,name:m().string,onDelete:m().func,size:m().oneOf(["sm","md","lg"]),status:m().oneOf(["uploading","edit","complete"]),uuid:m().string};const di=({disabled:e=!1,legendId:t,legendText:n,invalid:r=!1,children:o,className:s,message:c=!1,messageText:d="",...p})=>{const m=i(),f=(0,a.useRef)(null),b=u()(`${m}--fieldset`,s);return ft(f,"The FormGroup component `legendText` prop must have no interactive content"),(0,l.jsxs)("fieldset",{disabled:e,...r&&{"data-invalid":""},className:b,...p,"aria-labelledby":p["aria-labelledby"]||t,children:[(0,l.jsx)("legend",{className:`${m}--label`,id:t||p["aria-labelledby"],ref:f,children:n}),o,c?(0,l.jsx)("div",{className:`${m}--form__requirements`,children:d}):null]})};function ui({className:e,children:t,id:n,...r}){const a=i(),o=u()(`${a}--label`,`${a}--label--no-margin`,e);return(0,l.jsx)(h,{as:"label",htmlFor:n,className:o,...r,children:t})}di.propTypes={children:m().node,className:m().string,disabled:m().bool,invalid:m().bool,legendId:m().node,legendText:m().node.isRequired,message:m().bool,messageText:m().string},ui.propTypes={children:m().node,className:m().string,id:m().string};const pi=a.createContext({mode:"flexbox",subgrid:!1}),mi=({children:e,mode:t,subgrid:n=!1})=>{const r=a.useMemo(()=>({mode:t,subgrid:n}),[t,n]);return(0,l.jsx)(pi.Provider,{value:r,children:e})};mi.propTypes={children:m().node,mode:m().oneOf(["flexbox","css-grid"]).isRequired,subgrid:m().bool};const fi=()=>a.useContext(pi),bi=a.forwardRef(({as:e,condensed:t=!1,narrow:n=!1,fullWidth:r=!1,withRowGap:a=!1,className:o,children:s,...c},d)=>{const p=i(),m=u()(o,{[`${p}--grid`]:!0,[`${p}--grid--condensed`]:t,[`${p}--grid--narrow`]:n,[`${p}--grid--full-width`]:r,[`${p}--grid--with-row-gap`]:a});return(0,l.jsx)(mi,{mode:"flexbox",subgrid:!1,children:(0,l.jsx)(e||"div",{className:m,ref:d,...c,children:s})})});bi.displayName="FlexGrid",bi.propTypes={as:m().oneOfType([m().str
2ing,m().elementType]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool,withRowGap:m().bool};const hi=bi,gi=a.forwardRef(({align:e,as:t,children:n,className:r,condensed:a=!1,fullWidth:o=!1,narrow:s=!1,withRowGap:c,...d},p)=>{const m=i(),{subgrid:f}=fi();let b="wide";if(s?b="narrow":a&&(b="condensed"),f)return(0,l.jsx)(mi,{mode:"css-grid",subgrid:!0,children:(0,l.jsx)(xi,{ref:p,as:t,className:r,mode:b,withRowGap:c,...d,children:n})});const h=u()(r,{[`${m}--css-grid`]:!0,[`${m}--css-grid--condensed`]:"condensed"===b,[`${m}--css-grid--narrow`]:"narrow"===b,[`${m}--css-grid--full-width`]:o,[`${m}--css-grid--start`]:"start"===e,[`${m}--css-grid--end`]:"end"===e,[`${m}--css-grid--with-row-gap`]:c});return(0,l.jsx)(mi,{mode:"css-grid",subgrid:!0,children:(0,l.jsx)(t||"div",{className:h,ref:p,...d,children:n})})});gi.displayName="CSSGrid",gi.propTypes={as:m().oneOfType([m().string,m().elementType]),align:m().oneOf(["start","center","end"]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool,withRowGap:m().bool};const xi=a.forwardRef(({as:e,className:t,children:n,mode:r,withRowGap:a,...o},s)=>{const c=i(),d=u()(t,{[`${c}--subgrid`]:!0,[`${c}--subgrid--condensed`]:"condensed"===r,[`${c}--subgrid--narrow`]:"narrow"===r,[`${c}--subgrid--wide`]:"wide"===r,[`${c}--subgrid--with-row-gap`]:a});return(0,l.jsx)(e||"div",{...o,ref:s,className:d,children:n})});xi.displayName="Subgrid",xi.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,mode:m().oneOf(["wide","narrow","condensed"]),withRowGap:m().bool};const vi=gi;function yi(e){return V("enable-css-grid")?(0,l.jsx)(vi,{...e}):(0,l.jsx)(hi,{...e})}yi.propTypes={align:m().oneOf(["start","center","end"]),as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,condensed:m().bool,fullWidth:m().bool,narrow:m().bool,withRowGap:m().bool};const $i=yi;function wi({as:e="div",condensed:t=!1,narrow:n=!1,className:r,children:a,...o}){const s=i(),c=u()(r,{[`${s}--row`]:!0,[`${s}--row--condensed`]:t,[`${s}--row--narrow`]:n});return(0,l.jsx)(e,{className:c,...o,children:a})}wi.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,condensed:m().bool,narrow:m().bool};const Ni=a.forwardRef(({as:e,children:t,className:n,sm:r,md:a,lg:o,xlg:s,max:c,...d},p)=>{const{mode:m}=fi(),f=i(),b=e||"div";if("css-grid"===m)return(0,l.jsx)(_i,{as:b,className:n,sm:r,md:a,ref:p,lg:o,xlg:s,max:c,...d,children:t});const h=function(e,t){const n=[];for(let r=0;r<e.length;r++){const a=e[r];if(null==a)continue;const o=Ci[r];if(!0!==a)if("number"!=typeof a){if("object"==typeof a){const{span:e,offset:r}=a;"number"==typeof e&&n.push(`${t}--col-${o}-${e}`),!0===e&&n.push(`${t}--col-${o}`),"number"==typeof r&&n.push(`${t}--offset-${o}-${r}`)}}else n.push(`${t}--col-${o}-${a}`);else n.push(`${t}--col-${o}`)}return n.join(" ")}([r,a,o,s,c],f),g=u()(n,h,{[`${f}--col`]:0===h.length});return(0,l.jsx)(b,{className:g,ref:p,...d,children:t})}),Ti=m().oneOf(["25%","50%","75%","100%"]),ji=(0,r.Sn)("enable-css-grid")?m().oneOfType([m().bool,m().number,m().shape({span:m().oneOfType([m().number,Ti]),offset:m().number,start:m().number,end:m().number}),Ti]):m().oneOfType([m().bool,m().number,m().shape({span:m().number,offset:m().number})]);Ni.displayName="Column",Ni.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,lg:ji,max:ji,md:ji,sm:ji,span:m().oneOfType([m().number,Ti]),xlg:ji};const _i=a.forwardRef(({as:e="div",children:t,className:n,sm:r,md:a,lg:o,xlg:s,max:c,span:d,...p},m)=>{const f=i(),b=function(e,t){const n=[];for(let r=0;r<e.length;r++){const a=e[r];if(null==a)continue;const o=Ci[r];if(!0!==a)if("string"!=typeof a)if("number"!=typeof a){if("object"==typeof a){const{span:e,offset:r,start:i,end:l}=a;if("number"==typeof r&&n.push(`${t}--${o}:col-start-${r>0?r+1:"auto"}`),"number"==typeof i&&n.push(`${t}--${o}:col-start-${i||"auto"}`),"number"==typeof l&&n.push(`${t}--${o}:col-end-${l}`),"number"==typeof e)n.push(`${t}--${o}:col-span-${e}`);else if("string"==typeof e){n.push(`${t}--${o}:col-span-${e.slice(0,-1)}`);continue}}}else n.push(`${t}--${o}:col-span-${a}`);else n.push(`${t}--${o}:col-span-${a.replace("%","")}`);else n.push(`${t}--${o}:col-span-auto`)}return n.join(" ")}([r,a,o,s,c],f),h=function(e,t){const n=[];if("number"==typeof e)n.push(`${t}--col-span-${e}`);else if("string"==typeof e)n.push(`${t}--col-span-${e.slice(0,-1)}`);else if("object"==typeof e){const{span:r,start:a,end:o}=e;null!=r&&n.push(`${t}--col-span-${r}`),null!=a&&n.push(`${t}--col-start-${a}`),null!=o&&n.push(`${t}--col-end-${o}`)}return n.join("")}(d,f),g=u()(n,b,h,{[`${f}--css-grid-column`]:!0});return(0,l.jsx)(e,{className:g,ref:m,...p,children:t})});_i.displayName="CSSGridColumn",_i.propTypes={as:m().oneOfType([m().str
2ing,m().elementType]),children:m().node,className:m().string,lg:ji,max:ji,md:ji,sm:ji,span:m().oneOfType([m().number,Ti,m().shape({span:m().oneOfType([m().number,Ti]),start:m().number,end:m().number})]),xlg:ji};const Ci=["sm","md","lg","xlg","max"],ki=({className:e,...t})=>{const n=i();return(0,l.jsx)("div",{className:u()(`${n}--icon--skeleton`,e),...t})};function Ii({className:e,children:t,...n}){const r=i(),a=u()(`${r}--list__item`,e);return(0,l.jsx)(h,{as:"li",className:a,...n,children:t})}ki.propTypes={className:m().string},Ii.propTypes={children:m().node,className:m().string};const Si=(0,a.forwardRef)(({children:e,className:t,disabled:n,kind:r="primary",label:o,menuBackgroundToken:s="layer",menuBorder:c=!1,size:d="lg",menuAlignment:p="bottom",tabIndex:m=0,menuTarget:f,...b},h)=>{const g=V("enable-v12-dynamic-floating-styles"),x=j("MenuButton"),y=i(),$=(0,a.useRef)(null);let w=[];g||(w=[(0,be.UU)({crossAxis:!1})]),"bottom"!==p&&"top"!==p||w.push((0,be.Ej)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}));const{refs:N,floatingStyles:T,placement:_,middlewareData:C}=(0,fe.we)({placement:p,strategy:"fixed",transform:!1,middleware:w,whileElementsMounted:he.ll}),k=At(h,$),{open:I,handleClick:E,handleMousedown:R,handleClose:O}=Sn($);v(()=>{Object.keys(T).forEach(e=>{if(N.floating.current){let t=T[e];["top","right","bottom","left"].includes(e)&&Number(t)&&(t+="px"),N.floating.current.style[e]=t}})},[T,N.floating,C,_,I]);const D=u()(`${y}--menu-button__container`,t),A=u()(`${y}--menu-button__trigger`,{[`${y}--menu-button__trigger--open`]:I}),L=u()(`${y}--menu-button__${p}`);return(0,l.jsxs)("div",{...b,ref:k,"aria-owns":I?x:void 0,className:D,children:[(0,l.jsx)(gt,{ref:N.setReference,className:A,size:d,tabIndex:m,kind:r,renderIcon:S.yQ,disabled:n,"aria-haspopup":!0,"aria-expanded":I,onClick:function(){$.current&&E()},onMouseDown:R,"aria-controls":I?x:void 0,children:o}),(0,l.jsx)(ot,{containerRef:$,menuAlignment:p,className:L,ref:N.setFloating,id:x,legacyAutoalign:!1,label:o,size:d,open:I,onClose:O,target:f,backgroundToken:s,border:c,children:e})]})});Si.displayName="MenuButton",Si.propTypes={children:m().node.isRequired,className:m().string,disabled:m().bool,kind:m().oneOf(["primary","tertiary","ghost"]),label:m().string.isRequired,menuAlignment:m().oneOf(["top","top-start","top-end","bottom","bottom-start","bottom-end"]),size:m().oneOf(["xs","sm","md","lg"]),tabIndex:m().number,menuBackgroundToken:m().oneOf(["layer","background"]),menuBorder:m().bool,menuTarget:m().instanceOf("undefined"!=typeof Element?Element:Object)};const Ei=e=>{const t=(0,a.useRef)(void 0);return(0,a.useEffect)(()=>{t.current=e},[e]),t.current},Ri=({open:e,_presenceId:t,_autoEnablePresence:n=!0,children:r})=>{const[o,i]=gr(e,t),s=(0,a.useMemo)(()=>({autoEnablePresence:n,...i}),[n,i]);return o?(0,l.jsx)(Oi.Provider,{value:s,children:(0,l.jsx)(hr.Provider,{value:s,children:r})}):null},Oi=(0,a.createContext)(void 0),Di="`<Modal>` prop `preventCloseOnClickOutside` should not be `false` when `passiveModal` is `false`. Transactional, non-passive Modals should not be dissmissable by clicking outside. See: https://carbondesignsystem.com/components/modal/usage/#transactional-modal",Ai=a.forwardRef(function({open:e,...t},n){const r=j(),o=V("enable-presence"),i=Boolean((0,a.useContext)(Oi)),s=o||i,c=(e=>{const t=(0,a.useContext)(Oi);return t?.isPresenceExclusive(e)?t:void 0})(r);return s&&!c?(0,l.jsx)(Ri,{open:e??!1,_presenceId:r,_autoEnablePresence:i,children:(0,l.jsx)(Li,{open:!0,ref:n,...t})}):(0,l.jsx)(Li,{ref:n,open:e,...t})}),Li=a.forwardRef(function({"aria-label":e,children:t,className:n,decorator:r,modalHeading:o="",modalLabel:s="",modalAriaLabel:c,passiveModal:d=!1,secondaryButtonText:p,primaryButtonText:m,open:f,onRequestClose:b=dt,onRequestSubmit:g=dt,onSecondarySubmit:x,primaryButtonDisabled:v=!1,danger:y,dangerDescription:$="",alert:w,secondaryButtons:N,selectorPrimaryFocus:T="[data-modal-primary-focus]",selectorsFloatingMenus:_,shouldSubmitOnEnter:k,size:I,hasScrollingContent:E=!1,closeButtonLabel:R="Close",preventCloseOnClickOutside:O,isFullWidth:D,launcherButtonRef:A,loadingStatus:L="inactive",loadingDescription:M,loadingIconDescription:P,onLoadingSuccess:B=dt,slug:F,...z},q){const H=i(),K=(0,a.useRef)(null),W=(0,a.useRef)(null),U=(0,a.useRef)(null),Q=(0,a.useRef)(null),Z=(0,a.useRef)(null),te=(0,a.useRef)(null),ne=(0,a.useRef)(null),re=(0,a.useRef)(null),ae=`modal-${j()}`,oe=`${H}--modal-header__label--${ae}`,ie=`${H}--modal-header__heading--${ae}`,le=`${H}--modal-body--${ae}`,se=`${H}--modal-close`,ce=u()({[`${H}--btn--loading`]:"inactive"!==L}),pe="inactive"!==L,me=(0,a.useContext)(Oi),fe=Y([Z,q,me?.presenceRef]),be=V("enable-presence")||me?.autoEnablePresence,he=f||be,ge=Ei(he),xe=V("enable-experimental-focus-wrap-without-sentinels"),ve=V("enable-focus-wrap-without-sentinels")||xe,ye=V("enable-dialog-element");C(!(ve&&ye),"`<Modal>` detected both `focusTrapWithoutSentinels` and `enableDialogElement` feature flags are enabled. The native dialog element handles focus, so `enableDialogElement` must be off for `focusTrapWithoutSentinels` to have any effect."),C(!(!d&&!1===O),Di);const $e=x||b,{height:we}=xt({ref:U}),Ne=u()(`${H}--modal`,{[`${H}--modal-tall`]:!d,"is-visible":be||he,[`${H}--modal--enable-presence`]:me?.autoEnablePresence,[`${H}--modal--danger`]:y,[`${H}--modal--slug`]:F,[`${H}--modal--decorator`]:r},n),Te=u()(`${H}--modal-container`,{[`${H}--modal-container--${I}`]:I,[`${H}--modal-container--full-width`]:D}),je=U.current?.scrollHeight||0,_e=U.current?.clientHeight||0,[Ce,ke]=(0,a.useState)(je>_e);(0,a.useEffect)(()=>
2{if(!U.current)return void ke(!1);const e=U.current.scrollHeight-U.current.clientHeight;e>5?ke(!0):e<-5&&ke(!1)},[je,_e]);const Ie=u()(`${H}--modal-content`,{[`${H}--modal-scroll-content`]:E||Ce,[`${H}--modal-scroll-content--no-fade`]:we<=300}),Se=u()(`${H}--modal-footer`,{[`${H}--modal-footer--three-button`]:Array.isArray(N)&&2===N.length}),Ee=e=>"string"==typeof e?e:void 0,Re=Ee(s),De=Ee(o),Ae=Re||e||c||De,Le=E||Ce?{tabIndex:0,role:"region","aria-label":Ae,"aria-labelledby":s?oe:ie}:{},Me={};w&&d&&(Me.role="alert"),w&&!d&&(Me.role="alertdialog",Me["aria-describedby"]=le),(0,a.useEffect)(()=>{if(!he||ye)return;const e=e=>{de(e,ee)&&yr(Z.current,H)&&(e.preventDefault(),b(e))};return document.addEventListener("keydown",e),()=>{document.removeEventListener("keydown",e)}},[he,ye]),(0,a.useEffect)(()=>()=>{ye||Jn(document.body,`${H}--body--with-modal-open`,!1)},[H,ye]),(0,a.useEffect)(()=>{ye||Jn(document.body,`${H}--body--with-modal-open`,he??!1)},[he,H,ye]);const Pe=(0,a.useCallback)(()=>{if(!A||!A.current)return;const{current:e}=A;(e.matches(ue)?e:e.querySelector(ue))?.focus()},[A]);(0,a.useEffect)(()=>{ye||be||!ge||he||!A||setTimeout(()=>{Pe()})},[he,ge,A,ye,be,Pe]),(0,a.useEffect)(()=>{const e=A?.current;return()=>{be&&e&&setTimeout(()=>{Pe()})}},[be,A,Pe]),(0,a.useEffect)(()=>{if(!ye){const e=e=>{const t=e||Q.current;return t&&(t.querySelector(T)||y&&t.querySelector(`.${H}--btn--secondary`))||K&&K.current};he&&(t=>{const n=e(t);null!==n&&n.focus()})(Q.current)}},[he,T,y,H,ye]);const Be=F??r,Fe=G(Be,Ze)?(0,a.cloneElement)(Be,{size:"sm"}):Be,ze=(0,l.jsx)("div",{className:`${H}--modal-close-button`,children:(0,l.jsx)(Oe,{className:se,label:R,onClick:b,"aria-label":R,align:"left",ref:K,children:(0,l.jsx)(S.bm,{size:20,"aria-hidden":"true",tabIndex:"-1",className:`${se}__icon`})})}),qe=w&&!d,He=ye?(0,l.jsxs)(lr,{open:he,onCancel:e=>{e.preventDefault(),b(e)},focusAfterCloseRef:A,modal:!0,ref:Q,role:qe?"alertdialog":void 0,"aria-describedby":qe?le:void 0,className:Te,"aria-label":Ae,"data-exiting":me?.isExiting||void 0,children:[(0,l.jsxs)("div",{className:`${H}--modal-header`,children:[s&&(0,l.jsx)(h,{as:"h2",id:oe,className:`${H}--modal-header__label`,children:s}),(0,l.jsx)(h,{as:"h2",id:ie,className:`${H}--modal-header__heading`,children:o}),r?(0,l.jsx)("div",{className:`${H}--modal--inner__decorator`,children:Fe}):"",(0,l.jsx)("div",{className:`${H}--modal-close-button`,children:(0,l.jsx)(Oe,{className:se,label:R,onClick:b,"aria-label":R,align:"left",ref:K,children:(0,l.jsx)(S.bm,{size:20,"aria-hidden":"true",tabIndex:"-1",className:`${se}__icon`})})})]}),(0,l.jsx)(Fn,{ref:U,id:le,className:Ie,...Le,children:t}),!d&&(0,l.jsxs)(Yn,{className:Se,"aria-busy":pe,children:[Array.isArray(N)&&N.length<=2?N.map(({buttonText:e,onClick:t},n)=>(0,l.jsx)(gt,{kind:"secondary",onClick:t,children:e},`${e}-${n}`)):p&&(0,l.jsx)(gt,{disabled:pe,kind:"secondary",onClick:$e,ref:W,children:p}),(0,l.jsx)(gt,{className:ce,kind:y?"danger":"primary",dangerDescription:$,disabled:pe||v,onClick:g,ref:K,children:"inactive"===L?m:(0,l.jsx)(Qn,{status:L,description:M,iconDescription:P,className:`${H}--inline-loading--btn`,onSuccess:B})})]})]}):(0,l.jsxs)(l.Fragment,{children:[!ye&&!ve&&(0,l.jsx)("span",{ref:te,tabIndex:0,role:"link",className:`${H}--visually-hidden`,children:"Focus sentinel"}),(0,l.jsxs)("div",{ref:Q,role:"dialog",...Me,className:Te,"aria-label":Ae,"aria-modal":"true",tabIndex:-1,children:[(0,l.jsxs)("div",{className:`${H}--modal-header`,children:[d&&ze,s&&(0,l.jsx)(h,{as:"h2",id:oe,className:`${H}--modal-header__label`,children:s}),(0,l.jsx)(h,{as:"h2",id:ie,className:`${H}--modal-header__heading`,children:o}),F?Fe:r?(0,l.jsx)("div",{className:`${H}--modal--inner__decorator`,children:Fe}):"",!d&&ze]}),(0,l.jsx)(Fn,{ref:U,id:le,className:Ie,...Le,children:t}),!d&&(0,l.jsxs)(Yn,{className:Se,"aria-busy":pe,children:[Array.isArray(N)&&N.length<=2?N.map(({buttonText:e,onClick:t},n)=>(0,l.jsx)(gt,{kind:"secondary",onClick:t,children:e},`${e}-${n}`)):p&&(0,l.jsx)(gt,{disabled:pe,kind:"secondary",onClick:$e,ref:W,children:p}),(0,l.jsx)(gt,{className:ce,kind:y?"danger":"primary",dangerDescription:$,disabled:pe||v,onClick:g,ref:K,children:"inactive"===L?m:(0,l.jsx)(Qn,{status:L,description:M,iconDescription:P,className:`${H}--inline-loading--btn`,onSuccess:B})})]})]}),!ye&&!ve&&(0,l.jsx)("span",{ref:ne,tabIndex:0,role:"link",className:`${H}--visually-hidden`,children:"Focus sentinel"})]});return(0,l.jsx)(Fn,{...z,level:0,onKeyDown:function(e){const{target:t}=e;var n;he&&t instanceof HTMLElement&&(de(e,J)&&k&&(n=t,(x||n!==W.current)&&!n.classList.contains(se))&&document.activeElement!==K.current&&(e.stopPropagation(),g(e)),ve&&!ye&&de(e,X)&&Q.current&&(e.stopPropagation(),or({containerNode:Q.current,currentActiveNode:t,event:e})))},onClick:vt([z?.onClick,function(e){const{target:t}=e;(d&&!O||!d&&!1===O)&&t instanceof Node&&!rr(t,_,H)&&Q.current&&!Q.current.contains(t)&&b(e)}]),onBlur:function({target:e,relatedTarget:t}){if(!ye&&he&&e instanceof HTMLElement&&t instanceof HTMLElement){const{current:n}=Q,{current:r}=te,{current:a}=ne;re.current=setTimeout(()=>{ar({bodyNode:n,startTrapNode:r,endTrapNode:a,currentActiveNode:t,oldActiveNode:e,selectorsFloatingMenus:_,prefix:H}),re.current&&clearTimeout(re.current)})}const n=document.querySelector(`.${H}--modal-content`);if(!(n&&n.classList.contains(`${H}--modal-scroll-content`)&&t&&n.contains(t)))return;const r=n.getBoundingClientRect(),a=t.getBoundingClientRect();a.top>=r.top&&a.bottom<=r.bottom||t.scrollIntoView({block:"center"})},className:Ne,role:"presentation",ref:fe,"data-exiting":me?.isExiting||void 0,children:He})});Ai.propTypes={alert:m().bool,"aria-label":oa("hasScrollingContent",m().string),children:m().node,className:m().string,closeButtonLabel:m().string,danger:m().bool,dangerDescription:m().string,decorator:m().node,hasScrollingContent:m().bool,id:m().string,isFullWidth:m().bool,launcherButtonRef:m().oneOfType([m().func,m().shape({current:m().oneOfType(["undefined"!=typeof HTMLElement?m().instanceOf(HTMLElement):m().any,m().oneOf([null])]).isRequired})]),loadingDescription:m().string,loadingIconDescription:m().string,loadingStatus:m().oneOf(["inactive","active","finished","error"]),modalAriaLabel:m().string,modalHeading:m().node,modalL
2abel:m().node,onKeyDown:m().func,onLoadingSuccess:m().func,onRequestClose:m().func,onRequestSubmit:m().func,onSecondarySubmit:m().func,open:m().bool,passiveModal:m().bool,preventCloseOnClickOutside:(e,t)=>e.passiveModal||!1!==e[t]?null:new Error(Di),primaryButtonDisabled:m().bool,primaryButtonText:m().node,secondaryButtonText:m().node,secondaryButtons:(e,t,n)=>{if(e.secondaryButtons){if(!Array.isArray(e.secondaryButtons)||2!==e.secondaryButtons.length)return new Error(`${t} needs to be an array of two button config objects`);const r={buttonText:m().node,onClick:m().func};e[t].forEach(e=>{m().checkPropTypes(r,e,t,n)})}return null},selectorPrimaryFocus:m().string,selectorsFloatingMenus:m().arrayOf(m().string.isRequired),shouldSubmitOnEnter:m().bool,size:m().oneOf(["xs","sm","md","lg"]),slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead.")};var Mi=bt;const Pi=(e,{itemToString:t,inputValue:n})=>{if(!n)return e;const r=n.toLowerCase();return e.filter(e=>t(e).toLowerCase().includes(r))},Bi={compareItems:m().func,sortItems:m().func},Fi=e=>"object"==typeof e&&null!==e&&"isSelectAll"in e,zi=(e,t,{locale:n})=>e.localeCompare(t,n,{numeric:!0}),qi=(e,{selectedItems:t,itemToString:n,compareItems:r,locale:a})=>e.sort((e,o)=>{if(Fi(e)&&e.isSelectAll)return-1;if(Fi(o)&&o.isSelectAll)return 1;const i=t.includes(e),l=t.includes(o);return i&&!l?-1:l&&!i?1:r(n(e),n(o),{locale:a})}),Hi=({isControlled:e,isMounted:t,onChangeHandlerControlled:n,onChangeHandlerUncontrolled:r,selectedItems:a})=>{e?t&&n&&setTimeout(()=>{n({selectedItems:a})},0):r(a)},Ki=({disabled:e,onChange:t,initialSelectedItems:n=[],selectedItems:r,selectAll:o=!1,filteredItems:i=[]})=>{const l=(0,a.useRef)(!1),s=(0,a.useRef)(t),[c,d]=(0,a.useState)(n),u=!!r,p=u?r:c,m=(0,a.useCallback)(t=>{if(e)return;const n=i.filter(e=>!e?.disabled&&!e?.isSelectAll),r=i.filter(e=>e?.disabled).length;let a;if(t?.isSelectAll&&p.length>0)a=[];else if(t?.isSelectAll&&0===p.length)a=n;else{const e=p.findLastIndex(e=>bn()(e,t));-1===e?(a=p.concat(t),o&&i.length-1===a.length+r&&(a=n)):(a=Vi(p,e),a=a.filter(e=>!e?.isSelectAll))}Hi({isControlled:u,isMounted:l.current,onChangeHandlerControlled:s.current,onChangeHandlerUncontrolled:d,selectedItems:a})},[e,p,i,o,u]),f=(0,a.useCallback)(()=>{e||Hi({isControlled:u,isMounted:l.current,onChangeHandlerControlled:s.current,onChangeHandlerUncontrolled:d,selectedItems:[]})},[e,u]),b=(0,a.useCallback)(e=>{Hi({isControlled:u,isMounted:l.current,onChangeHandlerControlled:s.current,onChangeHandlerUncontrolled:d,selectedItems:e})},[u]);return(0,a.useEffect)(()=>{s.current=t},[t]),(0,a.useEffect)(()=>{l.current&&s.current&&!u&&s.current({selectedItems:p})},[u,p]),(0,a.useEffect)(()=>(l.current=!0,()=>{l.current=!1}),[]),{clearSelection:f,onItemChange:m,toggleAll:b,selectedItems:p}},Vi=(e,t)=>{const n=e.slice();return n.splice(t,1),n},{InputBlur:Wi,InputKeyDownEnter:Ui,ItemClick:Gi,MenuMouseLeave:Yi,InputKeyDownArrowUp:Qi,InputKeyDownArrowDown:Zi,ItemMouseMove:Xi,InputClick:Ji,ToggleButtonClick:el,FunctionToggleMenu:tl,InputChange:nl,InputKeyDownEscape:rl,FunctionSetHighlightedIndex:al,FunctionSetInputValue:ol}=mn.Bp.stateChangeTypes,{SelectedItemKeyDownBackspace:il,SelectedItemKeyDownDelete:ll,DropdownKeyDownBackspace:sl,FunctionRemoveSelectedItem:cl}=mn.mH.stateChangeTypes,dl=(0,a.forwardRef)(function({autoAlign:e=!1,className:t,clearSelectionDescription:n="Total items selected: ",clearSelectionText:r="To clear selection, press Delete or Backspace",compareItems:o=zi,decorator:s,direction:c="bottom",disabled:d=!1,downshiftProps:p,filterItems:m=Pi,helperText:f,hideLabel:b,id:h,initialSelectedItems:g=[],invalid:x=!1,invalidText:y,items:$,itemToElement:w,itemToString:N=Xe,light:T,locale:_="en",onInputValueChange:C,open:k=!1,onChange:I,onMenuChange:S,placeholder:E,readOnly:R,titleText:O,type:D,selectionFeedback:A="top-after-reopen",selectedItems:L,size:M,sortItems:P=qi,translateWithId:B,useTitleInItem:F,warn:z=!1,warnText:q,slug:H,inputProps:K},W){const{isFluid:U}=(0,a.useContext)(Pt),Y=(0,a.useRef)(!0),Q=(0,a.useRef)(null),[Z,ae]=(0,a.useState)(!!k),[oe,ie]=(0,a.useState)(""),[le,ce]=(0,a.useState)(g??[]),[ue,pe]=(0,a.useState)(!1),me=(0,a.useMemo)(()=>m($,{itemToString:N,inputValue:oe}),[$,oe,N,m]),ge=(0,a.useMemo)(()=>me.filter(e=>!Fi(e)),[me]),xe=me.some(Fi),ve=V("enable-v12-release"),{selectedItems:ye,onItemChange:$e,clearSelection:we,toggleAll:Ne}=Ki({disabled:d,initialSelectedItems:g,onChange:I,selectedItems:L,selectAll:xe,filteredItems:me}),Te=(0,a.useMemo)(()=>{const e=ge.filter(e=>!Dt(e)),t=e.filter(e=>!ye.some(t=>bn()(t,e))).length,n=e.length;return{checked:n>0&&0===t,indeterminate:t>0&&t<n}},[ye,ge]),je=(0,a.useCallback)(()=>{const e=ge.filter(e=>!Dt(e)),{checked:t,indeterminate:n}=Te;if(t||n){const e=ye.filter(e=>!me.some(t=>bn()(t,e)));Ne(e)}else{const t=e.filter(e=>!ye.some(t=>bn()(t,e)));Ne([...ye,...t])}},[ge,Te,ye,Ne]),{refs:_e,floatingStyles:Ce,middlewareData:ke}=(0,fe.we)(e?{placement:c,strategy:"fixed",middleware:[(0,be.UU)({crossAxis:!1}),(0,be.Ej)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}),(0,be.jD)()],whileElementsMounted:he.ll}:{});v(()=>{if(e){const e={...Ce,visibility:ke.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{_e.floating.current&&(_e.floating.current.style[t]=e[t])})}},[e,Ce,_e.floating,ke,k]);const Ie=(0,a.useRef)(null),Se=j(),Ee=i();(0,a.useEffect)(()=>{ae(k)},[k]);const Re=(0,a.useMemo)(()=>{const e=$.find(Fi),t=ge.filter(e=>!Dt(e)),n=P(ge,{selectedItems:{top:ye,fixed:[],"top-after-reopen":le}[A],itemToString:N,compareItems:o,locale:_});return e&&t.length>0?[e,...n]:n},[$,oe,ye,le,A,N,o,_,P,ge]),Oe=mt({id:h,disabled:d,readOnly:R,invalid:x,warn:z}
2),De="inline"===D,Ae=Oe.warn,Le=!Oe.warn&&!Oe.invalid,Me=u()(`${Ee}--multi-select__wrapper`,`${Ee}--multi-select--filterable__wrapper`,`${Ee}--list-box__wrapper`,t,{[`${Ee}--multi-select__wrapper--inline`]:De,[`${Ee}--list-box__wrapper--inline`]:De,[`${Ee}--multi-select__wrapper--inline--invalid`]:De&&Oe.invalid,[`${Ee}--list-box__wrapper--inline--invalid`]:De&&Oe.invalid,[`${Ee}--list-box--up`]:"top"===c,[`${Ee}--list-box__wrapper--fluid--invalid`]:U&&Oe.invalid,[`${Ee}--list-box__wrapper--slug`]:H,[`${Ee}--list-box__wrapper--decorator`]:s,[`${Ee}--autoalign`]:e}),Pe=ut(f),Be=Pe?`filterablemultiselect-helper-text-${Se}`:void 0,Fe=`${h}-label`,ze=u()({[`${Ee}--label`]:!0,[`${Ee}--label--disabled`]:d,[`${Ee}--visually-hidden`]:b}),qe=u()({[`${Ee}--form__helper-text`]:!0,[`${Ee}--form__helper-text--disabled`]:d}),He=u()({[`${Ee}--text-input`]:!0,[`${Ee}--text-input--empty`]:!oe,[`${Ee}--text-input--light`]:T}),Ke=Pe&&(0,l.jsx)("div",{id:Be,className:qe,children:f}),Ve=`${h}__menu`,We=`${h}-input`;(0,a.useEffect)(()=>{Z||ce(ye)},[ye,Z,ce]);const Ue=()=>{ye.length>0&&nt(0)};function Ge(e){R||(ae(e??!Z),Ue())}(0,a.useEffect)(()=>{Y.current?(Y.current=!1,k&&S?.(Z)):S?.(Z)},[Z,S,k]),(0,a.useEffect)(()=>{const e=e=>{const t=e.target;if(!(t instanceof Node))return;const n=document.getElementById(h)?.closest(`.${Ee}--multi-select__wrapper`);n&&!n.contains(t)&&(Z||ue)&&(ae(!1),pe(!1),ie(""))};return(ue||Z)&&document.addEventListener("mousedown",e),()=>{document.removeEventListener("mousedown",e)}},[Z,ue]);const{getToggleButtonProps:Ye,getLabelProps:Qe,getMenuProps:Je,getInputProps:et,highlightedIndex:tt,setHighlightedIndex:nt,getItemProps:rt,openMenu:at,isOpen:ot}=(0,mn.Bp)({isOpen:Z,items:Re,itemToString:N,id:h,labelId:Fe,menuId:Ve,inputId:We,inputValue:oe,onInputValueChange:C,stateReducer:function(e,t){const{type:n,props:r,changes:a}=t,{highlightedIndex:o}=a;switch(a.isOpen&&!Z&&ce(ye),n){case Ui:return 0===Re.length?a:(a.selectedItem&&!Dt(a.selectedItem)&&(Fi(a.selectedItem)?je():$e(a.selectedItem)),nt(a.selectedItem),{...a,highlightedIndex:e.highlightedIndex});case Gi:return Fi(a.selectedItem)?je():$e(a.selectedItem),nt(a.selectedItem),a;case Wi:case rl:return ae(!1),a;case tl:case el:return Ue(),a.isOpen&&!a.selectedItem?{...a}:{...a,highlightedIndex:ye.length>0?0:-1};case nl:return ie(a.inputValue??""),ae(!0),{...a,highlightedIndex:0};case Ji:return ae(a.isOpen||!1),Ue(),a.isOpen&&!a.selectedItem?{...a}:{...a,isOpen:!1,highlightedIndex:ye.length>0?0:-1};case Yi:return{...a,highlightedIndex:e.highlightedIndex};case Qi:case Zi:if(Zi===n&&!Z)return ae(!0),{...a,highlightedIndex:0};if(o>-1){const e=document.querySelectorAll(`li.${Ee}--list-box__menu-item[role="option"]`);r.scrollIntoView(e[o])}return-1===o?{...a,highlightedIndex:0}:a;case Xi:return{...a,highlightedIndex:e.highlightedIndex};case al:return Z?{...a,highlightedIndex:r.items.indexOf(o)}:{...a,highlightedIndex:0};default:return a}},isItemDisabled:Dt}),{getDropdownProps:it}=(0,mn.mH)({activeIndex:tt,initialSelectedItems:g,selectedItems:ye,onStateChange(e){switch(e.type){case il:case ll:case sl:case cl:we()}},...p});function lt(e){const t=Ie.current?.value,n=e&&"key"in e&&de(e,ee),r=t&&!(e&&"key"in e);1===t?.length||n||r?(ie(""),C?.({inputValue:"",type:ol})):ie(t??""),Ie.current&&Ie.current.focus()}(0,a.useEffect)(()=>{Z&&!ot&&at()});const st=H??s,ct=G(st,Ze),dt=ct?(0,a.cloneElement)(st,{size:"mini"}):st,bt=ye.filter(e=>!Fi(e)).length,ht=u()(`${Ee}--multi-select`,`${Ee}--combo-box`,`${Ee}--multi-select--filterable`,{[`${Ee}--multi-select--invalid`]:Oe.invalid,[`${Ee}--multi-select--invalid--focused`]:ue&&Oe.invalid,[`${Ee}--multi-select--open`]:Z,[`${Ee}--multi-select--inline`]:De,[`${Ee}--multi-select--selected`]:ye?.length>0,[`${Ee}--multi-select--filterable--input-focused`]:ue,[`${Ee}--multi-select--readonly`]:R,[`${Ee}--multi-select--selectall`]:xe}),gt=Qe();ft(Q,"The FilterableMultiSelect component `titleText` prop must have no interactive content");const xt=Ye({disabled:d,onClick:()=>{Ge(!Z),Ie.current?.focus()},onMouseUp(e){Z&&e.stopPropagation()}}),vt=et(it({"aria-controls":Z?Ve:void 0,"aria-describedby":Pe&&Le?Be:void 0,"aria-haspopup":"listbox","aria-labelledby":void 0,disabled:d,placeholder:E,preventKeyAction:Z,...K,onClick:()=>Ge(!0),onKeyDown(e){const t=e.target,n=t.value;de(e,te)&&e.stopPropagation(),de(e,J)&&Ge(!0),d||(de(e,se)||de(e,ee))&&(Z?(Ge(!0),lt(e),e.stopPropagation()):Z||(lt(e),we(),e.stopPropagation())),de(e,X)&&Ge(!1),de(e,re)&&t.setSelectionRange(0,0),de(e,ne)&&t.setSelectionRange(n.length,n.length)},onFocus:()=>pe(!0),onBlur:()=>{pe(!1),ie("")}})),yt=(0,a.useMemo)(()=>Je({ref:e?_e.setFloating:null,hidden:!Z},{suppressRefError:!0}),[e,Je,Z,_e.setFloating]),$t=At(Ie,vt.ref),wt=R?{onClick:e=>{e.preventDefault(),Ie.current&&Ie.current.focus()},onKeyDown:e=>
2{["ArrowDown","ArrowUp"," ","Enter"].includes(e.key)&&e.preventDefault()}}:{},Nt=ye.length>0?`${n} ${ye.length}. ${r}.`:`${n} 0.`;return(0,l.jsxs)("div",{className:Me,children:[O?(0,l.jsxs)("label",{className:ze,...gt,ref:Q,children:[O,(0,l.jsx)("span",{className:`${Ee}--visually-hidden`,children:Nt})]}):null,(0,l.jsxs)(tn,{className:ht,disabled:d,light:T,ref:W,id:h,invalid:Oe.invalid,invalidText:y,warn:Oe.warn,warnText:q,isOpen:!R&&Z,size:M,children:[(0,l.jsxs)("div",{className:`${Ee}--list-box__field`,ref:e?_e.setReference:null,children:[ye.length>0&&(0,l.jsx)(ln,{readOnly:R,clearSelection:()=>{we(),Ie.current&&Ie.current.focus()},selectionCount:bt,translateWithId:B,disabled:d}),(0,l.jsx)("input",{className:He,...vt,ref:$t,...wt,readOnly:R}),Oe.invalid&&(0,l.jsx)(pt.BF,{className:`${Ee}--list-box__invalid-icon`}),Ae&&(0,l.jsx)(pt.OR,{className:`${Ee}--list-box__invalid-icon ${Ee}--list-box__invalid-icon--warning`}),oe&&(0,l.jsx)(ln,{clearSelection:lt,disabled:d,translateWithId:B,readOnly:R,onMouseDown:e=>{e.preventDefault()},onMouseUp:e=>{e.stopPropagation()}}),(0,l.jsx)(pn,{...xt,isOpen:Z,translateWithId:B})]}),H?dt:s?(0,l.jsx)("div",{className:`${Ee}--list-box__inner-wrapper--decorator`,children:ct?dt:(0,l.jsx)("span",{children:dt})}):"",(0,l.jsx)(tn.Menu,{...yt,children:Z?Re.map((e,t)=>{let n,r=!1;const a=Fi(e);a?(n=Te.checked,r=Te.indeterminate):n=ye.filter(t=>bn()(t,e)).length>0;const o=rt({item:e,"aria-selected":n}),i=N(e),s=o["aria-disabled"],{"aria-disabled":c,...d}=o,u=(0,l.jsx)(tn.MenuItem,{"aria-label":i,"aria-checked":r?"mixed":n,isActive:n&&!a,isHighlighted:tt===t,title:i,disabled:s,...d,children:(0,l.jsx)("div",{className:`${Ee}--checkbox-wrapper`,children:(0,l.jsx)(Mi,{id:`${o.id}-item`,labelText:w?(0,l.jsx)(w,{...e},o.id):i,checked:n,title:F?i:void 0,indeterminate:r,disabled:s,tabIndex:-1})})},o.id);return a&&ve?[u,(0,l.jsx)("li",{className:`${Ee}--list-box__menu-divider`,"aria-hidden":"true"},`${o.id}__divider`)]:u}):null})]}),!De&&Le?Ke:null]})});dl.displayName="FilterableMultiSelect",dl.propTypes={"aria-label":I(m().string,"ariaLabel / aria-label props are no longer required for FilterableMultiSelect"),ariaLabel:I(m().string,"ariaLabel / aria-label props are no longer required for FilterableMultiSelect"),autoAlign:m().bool,clearSelectionDescription:m().string,clearSelectionText:m().string,decorator:m().node,filterItems:m().func,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().shape(mn.Ay.propTypes),hideLabel:m().bool,id:m().string.isRequired,initialSelectedItems:m().array,invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,light:I(m().bool,"The `light` prop for `FilterableMultiSelect` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),locale:m().string,onChange:m().func,onInputValueChange:m().func,onMenuChange:m().func,open:m().bool,placeholder:m().string,selectionFeedback:m().oneOf(["top","fixed","top-after-reopen"]),size:Mt,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),...Bi,titleText:m().node,translateWithId:m().func,type:Lt,useTitleInItem:m().bool,warn:m().bool,warnText:m().node,inputProps:m().object};const{ItemClick:ul,ToggleButtonBlur:pl,ToggleButtonKeyDownArrowDown:ml,ToggleButtonKeyDownArrowUp:fl,ToggleButtonKeyDownEnter:bl,ToggleButtonKeyDownEscape:hl,ToggleButtonKeyDownSpaceButton:gl,ItemMouseMove:xl,MenuMouseLeave:vl,ToggleButtonClick:yl,ToggleButtonKeyDownPageDown:$l,ToggleButtonKeyDownPageUp:wl,FunctionSetHighlightedIndex:Nl}=mn.WM.stateChangeTypes,Tl=a.forwardRef(({autoAlign:e=!1,className:t,decorator:n,id:r,items:o,itemToElement:s,itemToString:c=Xe,titleText:d=!1,hideLabel:p,helperText:m,label:f,type:b="default",size:h,disabled:g=!1,initialSelectedItems:x=[],sortItems:y=qi,compareItems:$=zi,clearSelectionText:w="To clear selection, press Delete or Backspace",clearAnnouncement:N="all items have been cleared",clearSelectionDescription:T="Total items selected: ",light:_,invalid:C=!1,invalidText:k,warn:I=!1,warnText:S,useTitleInItem:E,translateWithId:R,downshiftProps:O,open:D=!1,selectionFeedback:A="top-after-reopen",onChange:L,onMenuChange:M,direction:P="bottom",selectedItems:B,readOnly:F,locale:z="en",slug:q},H)=>{const K=(0,a.useMemo)(()=>o.filter(e=>{if("object"==typeof e&&null!==e)for(const t in e)if(Object.hasOwn(e,t)&&void 0===e[t])return!1;return!0}),[o]),W=K.some(Fi),U=i(),{isFluid:Y}=(0,a.useContext)(Pt),Q=j(),Z=(0,a.useRef)(D),[ne,re]=(0,a.useState)(!1),[ae,oe]=(0,a.useState)(D||!1),[ie,ce]=(0,a.useState)([]),[ue,pe]=(0,a.useState)(!1),me=V("enable-v12-dynamic-floating-styles")||e,ge=V("enable-v12-release"),{refs:xe,floatingStyles:ve,middlewareData:ye}=(0,fe.we)(me?{placement:P,strategy:"fixed",middleware:[e&&(0,be.UU)({crossAxis:!1}),(0,be.Ej)({apply({rects:e,elements:t}){Object.assign(t.floating.style,{width:`${e.reference.width}px`})}}),e&&(0,be.jD)()],whileElementsMounted:he.ll}:{});v(()=>{if(me){const e={...ve,visibility:ye.hide?.referenceHidden?"hidden":"visible"};Object.keys(e).forEach(t=>{xe.floating.current&&(xe.floating.current.style[t]=e[t])})}},[me,ve,xe.floating,ye,D]);const{selectedItems:$e,onItemChange:we,clearSelection:Ne}=Ki({disabled:g,initialSelectedItems:x,onChange:L,selectedItems:B,selectAll:W,filteredItems:K}),Te={selectedItems:$e,itemToString:c,compareItems:$,locale:z},je={stateReducer:function(e,t){const{changes:n,props:r,type:a}=t,{highlightedIndex:o}=n;switch(n.isOpen&&!ae&&ce($e),a){case gl:case bl:if(void 0===n.selectedItem)break;
2if(Array.isArray(n.selectedItem))break;return we(n.selectedItem),{...n,highlightedIndex:e.highlightedIndex};case pl:case hl:Be(!1);break;case yl:return Be(n.isOpen||!1),{...n,highlightedIndex:$e.length>0?0:void 0};case ul:return Re(n.selectedItem),we(n.selectedItem),{...n,highlightedIndex:e.highlightedIndex};case vl:return{...n,highlightedIndex:e.highlightedIndex};case Nl:return ae?{...n,highlightedIndex:K.indexOf(o)}:{...n,highlightedIndex:0};case ml:case fl:case $l:case wl:if(o>-1){const e=document.querySelectorAll(`li.${U}--list-box__menu-item[role="option"]`);r.scrollIntoView(e[o])}return-1===o?{...n,highlightedIndex:0}:n;case xl:return{...n,highlightedIndex:e.highlightedIndex}}return n},isOpen:ae,itemToString:e=>Array.isArray(e)&&e.map(e=>c(e)).join(", ")||"",selectedItem:$e,items:K,isItemDisabled:Dt,...O},{getToggleButtonProps:_e,getLabelProps:Ce,getMenuProps:ke,getItemProps:Ie,selectedItem:Se,highlightedIndex:Ee,setHighlightedIndex:Re}=(0,mn.WM)(je),Oe=_e({onFocus:()=>{re(!0)},onBlur:()=>{re(!1)},onKeyDown:e=>{g||(!de(e,se)&&!de(e,ee)||ae||(Ne(),e.stopPropagation()),!ae&&de(e,se)&&Pe.length>0&&pe(!0),(de(e,te)||de(e,le)||de(e,J))&&!ae&&(Re(0),pe(!1),Be(!0)),de(e,le)&&0===Pe.length&&re(!1),de(e,ee)&&ae&&re(!0),de(e,J)&&ae&&re(!0),de(e,X)&&ae&&Be(!1))}}),De=(0,a.useRef)(null),Ae=(0,a.useRef)(null),Le=(0,a.useRef)(null),Me=At(Oe.ref,H,De),Pe=Se,Be=e=>{oe(e),M&&M(e)};(0,a.useEffect)(()=>{Z.current!==D&&(oe(D),M?.(D),Z.current=D)},[D,M]);const Fe=mt({id:r,disabled:g,readOnly:F,invalid:C,warn:I}),ze="inline"===b,qe=Fe.warn,He=!Fe.warn&&!Fe.invalid&&m,Ke=u()(`${U}--multi-select__wrapper`,`${U}--list-box__wrapper`,t,{[`${U}--multi-select__wrapper--inline`]:ze,[`${U}--list-box__wrapper--inline`]:ze,[`${U}--multi-select__wrapper--inline--invalid`]:ze&&Fe.invalid,[`${U}--list-box__wrapper--inline--invalid`]:ze&&Fe.invalid,[`${U}--list-box__wrapper--fluid--invalid`]:Y&&Fe.invalid,[`${U}--list-box__wrapper--slug`]:q,[`${U}--list-box__wrapper--decorator`]:n}),Ve=u()(`${U}--label`,{[`${U}--label--disabled`]:g,[`${U}--visually-hidden`]:p}),We=m?`multiselect-helper-text-${Q}`:void 0,Ue=`multiselect-field-label-${Q}`,Ge=u()(`${U}--form__helper-text`,{[`${U}--form__helper-text--disabled`]:g}),Ye=u()(`${U}--multi-select`,{[`${U}--multi-select--invalid`]:Fe.invalid,[`${U}--multi-select--invalid--focused`]:ne&&Fe.invalid,[`${U}--multi-select--warning`]:qe,[`${U}--multi-select--inline`]:ze,[`${U}--multi-select--selected`]:Pe&&Pe.length>0,[`${U}--list-box--up`]:"top"===P,[`${U}--multi-select--readonly`]:F,[`${U}--autoalign`]:me,[`${U}--multi-select--selectall`]:W});"fixed"===A?Te.selectedItems=[]:"top-after-reopen"===A&&(Te.selectedItems=ie);const Qe=u()(`${U}--list-box__field--wrapper`,{[`${U}--list-box__field--wrapper--input-focused`]:ne}),Je=F?{onClick:e=>{e.preventDefault(),De.current&&De.current.focus()},onKeyDown:e=>{["ArrowDown","ArrowUp"," ","Enter"].includes(e.key)&&e.preventDefault()}}:{},et=q??n,tt=G(et,Ze)?(0,a.cloneElement)(et,{size:"mini"}):et,nt=Pe.length>0&&Pe.map(e=>e?.text),rt=W?Pe.filter(e=>!Fi(e)).length:Pe.length,at=(0,a.useMemo)(()=>ke({ref:me?xe.setFloating:null,hidden:!ae}),[me,ke,ae,xe.setFloating]),ot=Ce(),it=(0,a.isValidElement)(d)?{id:ot.id}:ot;ft(Ae,"The MultiSelect component `titleText` prop must have no interactive content"),ft(Le,"The MultiSelect component `label` prop must have no interactive content");const lt=(0,a.useCallback)((e,t)=>({hasIndividualSelections:e.some(e=>!Fi(e)),nonSelectAllSelectedCount:e.filter(e=>!Fi(e)).length,totalSelectableCount:t.filter(e=>!Fi(e)&&!Dt(e)).length}),[Pe,K]);return(0,l.jsxs)("div",{className:Ke,children:[(0,l.jsxs)("label",{className:Ve,...it,ref:Ae,children:[d&&d,Pe.length>0&&(0,l.jsxs)("span",{className:`${U}--visually-hidden`,children:[T," ",Pe.length," ",nt,",",w]})]}),(0,l.jsxs)(tn,{type:b,size:h,className:Ye,disabled:g,light:_,invalid:Fe.invalid,invalidText:k,warn:Fe.warn,warnText:S,isOpen:ae,id:r,children:[Fe.invalid&&(0,l.jsx)(pt.BF,{className:`${U}--list-box__invalid-icon`}),qe&&(0,l.jsx)(pt.OR,{className:`${U}--list-box__invalid-icon ${U}--list-box__invalid-icon--warning`}),(0,l.jsxs)("div",{className:Qe,ref:me?xe.setReference:null,children:[Pe.length>0&&(0,l.jsx)(tn.Selection,{readOnly:F,clearSelection:g||F?dt:Ne,selectionCount:rt,translateWithId:R,disabled:g}),(0,l.jsxs)("button",{type:"button",className:`${U}--list-box__field`,disabled:g,"aria-disabled":g||F,"aria-describedby":!ze&&He?We:void 0,...Oe,ref:Me,...Je,children:[(0,l.jsx)("span",{id:Ue,className:`${U}--list-box__label`,ref:Le,children:f}),(0,l.jsx)(tn.MenuIcon,{isOpen:ae,translateWithId:R})]}),q?tt:n?(0,l.jsx)("div",{className:`${U}
2--list-box__inner-wrapper--decorator`,children:tt}):""]}),(0,l.jsx)(tn.Menu,{...at,children:ae&&y(K,Te).map((e,t)=>{const{hasIndividualSelections:n,nonSelectAllSelectedCount:r,totalSelectableCount:a}=lt(Pe,K),o=Fi(e),i=o?r===a&&a>0:Pe.some(t=>bn()(t,e)),d=o&&n&&r<a,u=Ie({item:e,"aria-selected":i}),p=c(e),m=(0,l.jsx)(tn.MenuItem,{isActive:i&&!o,"aria-label":p,"aria-checked":d?"mixed":i,isHighlighted:Ee===t,title:p,disabled:u["aria-disabled"],...u,children:(0,l.jsx)("div",{className:`${U}--checkbox-wrapper`,children:(0,l.jsx)(Mi,{id:`${u.id}__checkbox`,labelText:s?s(e):p,checked:i,title:E?p:void 0,indeterminate:d,disabled:g})})},u.id);return o&&ge?[m,(0,l.jsx)("li",{className:`${U}--list-box__menu-divider`,"aria-hidden":"true"},`${u.id}__divider`)]:m})}),ue&&(0,l.jsx)("span",{"aria-live":"assertive","aria-label":N})]}),!ze&&He&&(0,l.jsx)("div",{id:We,className:Ge,children:m})]})});Tl.displayName="MultiSelect",Tl.propTypes={...Bi,autoAlign:m().bool,className:m().string,clearSelectionDescription:m().string,clearSelectionText:m().string,compareItems:m().func,decorator:m().node,direction:m().oneOf(["top","bottom"]),disabled:m().bool,downshiftProps:m().object,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,initialSelectedItems:m().array,invalid:m().bool,invalidText:m().node,itemToElement:m().func,itemToString:m().func,items:m().array.isRequired,label:m().node.isRequired,light:I(m().bool,"The `light` prop for `MultiSelect` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),locale:m().string,onChange:m().func,onMenuChange:m().func,open:m().bool,readOnly:m().bool,selectedItems:m().array,selectionFeedback:m().oneOf(["top","fixed","top-after-reopen"]),size:Mt,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),sortItems:m().func,titleText:m().node,translateWithId:m().func,type:Lt,useTitleInItem:m().bool,warn:m().bool,warnText:m().node};var jl=n(61467);function _l({children:e,className:t,onClick:n,inline:r,...a}){const o=i(),s=u()(t,{[`${o}--actionable-notification__action-button`]:!0});return(0,l.jsx)(gt,{className:s,kind:r?"ghost":"tertiary",onClick:n,size:"sm",...a,children:e})}function Cl({"aria-label":e="close notification",ariaLabel:t,className:n,type:r="button",renderIcon:a=S.bm,name:o,notificationType:s="toast",...c}){const d=i(),p=u()(n,{[`${d}--${s}-notification__close-button`]:s}),m=u()({[`${d}--${s}-notification__close-icon`]:s});return(0,l.jsx)("button",{...c,type:r,"aria-label":t||e,title:t||e,className:p,children:a&&(0,l.jsx)(a,{className:m,name:o})})}_l.propTypes={children:m().node,className:m().string,inline:m().bool,onClick:m().func}
2,Cl.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),className:m().string,name:m().string,notificationType:m().oneOf(["toast","inline","actionable"]),renderIcon:m().oneOfType([m().func,m().object]),type:m().string};const kl={error:Un.x,success:S._j,warning:pt.BF,"warning-alt":pt.OR,info:jl.NM,"info-square":jl.mR};function Il({iconDescription:e,kind:t,notificationType:n}){const r=i(),a=kl[t];return a?(0,l.jsx)(a,{className:`${r}--${n}-notification__icon`,size:20,children:(0,l.jsx)("title",{children:e})}):null}function Sl({"aria-label":e,ariaLabel:t,role:n="status",onClose:r,onCloseButtonClick:o=dt,statusIconDescription:s,className:c,children:d,kind:p="error",lowContrast:m,hideCloseButton:f=!1,timeout:b=0,title:g,caption:x,subtitle:v,...y}){const[$,w]=(0,a.useState)(!0),N=i(),T=u()(c,{[`${N}--toast-notification`]:!0,[`${N}--toast-notification--low-contrast`]:m,[`${N}--toast-notification--${p}`]:p}),j=(0,a.useRef)(null);we(j);const _=(0,a.useRef)(null),C=(0,a.useRef)(r);return(0,a.useEffect)(()=>{C.current=r}),(0,a.useEffect)(()=>{if(!b)return;const e=window.setTimeout(e=>{w(!1),C.current&&C.current(e)},b);return()=>{window.clearTimeout(e)}},[b]),$?(0,l.jsxs)("div",{ref:_,...y,role:n,className:T,children:[(0,l.jsx)(Il,{notificationType:"toast",kind:p,iconDescription:s||`${p} icon`}),(0,l.jsxs)("div",{ref:j,className:`${N}--toast-notification__details`,children:[g&&(0,l.jsx)(h,{as:"div",className:`${N}--toast-notification__title`,children:g}),v&&(0,l.jsx)(h,{as:"div",className:`${N}--toast-notification__subtitle`,children:v}),x&&(0,l.jsx)(h,{as:"div",className:`${N}--toast-notification__caption`,children:x}),d]}),!f&&(0,l.jsx)(Cl,{notificationType:"toast",onClick:function(e){o(e),r&&!1===r(e)||w(!1)},"aria-label":t||e})]}):null}function El({"aria-label":e,children:t,title:n,subtitle:r,role:o="status",onClose:s,onCloseButtonClick:c=dt,statusIconDescription:d,className:p,kind:m="error",lowContrast:f,hideCloseButton:b=!1,...g}){const[x,v]=(0,a.useState)(!0),y=i(),$=u()(p,{[`${y}--inline-notification`]:!0,[`${y}--inline-notification--low-contrast`]:f,[`${y}--inline-notification--${m}`]:m,[`${y}--inline-notification--hide-close-button`]:b}),w=(0,a.useRef)(null);we(w);const N=(0,a.useRef)(null);return x?(0,l.jsxs)("div",{ref:N,...g,role:o,className:$,children:[(0,l.jsxs)("div",{className:`${y}--inline-notification__details`,children:[(0,l.jsx)(Il,{notificationType:"inline",kind:m,iconDescription:d||`${m} icon`}),(0,l.jsxs)("div",{ref:w,className:`${y}--inline-notification__text-wrapper`,children:[n&&(0,l.jsx)(h,{as:"div",className:`${y}--inline-notification__title`,children:n}),r&&(0,l.jsx)(h,{as:"div",className:`${y}--inline-notification__subtitle`,children:r}),t]})]}),!b&&(0,l.jsx)(Cl,{notificationType:"inline",onClick:function(e){c(e),s&&!1===s(e)||v(!1)},"aria-label":e})]}):null}function Rl({actionButtonLabel:e,"aria-label":t,ariaLabel:n,caption:r,children:o,role:s="alertdialog",onActionButtonClick:c,onClose:d,onCloseButtonClick:p=dt,statusIconDescription:m,className:f,inline:b=!1,kind:g="error",lowContrast:x,hideCloseButton:y=!1,hasFocus:$=!0,closeOnEscape:w=!0,title:N,subtitle:T,..._}){const[C,k]=(0,a.useState)(!0),I=i(),S=j("actionable-notification"),E=j("actionable-notification-subtitle"),R=u()(f,{[`${I}--actionable-notification`]:!0,[`${I}--actionable-notification--toast`]:!b,[`${I}--actionable-notification--low-contrast`]:x,[`${I}--actionable-notification--${g}`]:g,[`${I}--actionable-notification--hide-close-button`]:y}),O=(0,a.useRef)(null),D=(0,a.useRef)(null),A=(0,a.useRef)(null),L=(0,a.useRef)(null),M=V("enable-experimental-focus-wrap-without-sentinels"),P=V("enable-focus-wrap-without-sentinels")||M;function B(e){p(e),d&&!1===d(e)||k(!1)}return v(()=>{$&&"alertdialog"===s&&document.querySelector(`button.${I}--actionable-notification__action-button`)?.focus()}),function(e,t,n=!0){const r=r=>{const a=e.current&&document.activeElement===e.current||e.current?.contains(document.activeElement);ce(r,[ee])&&n&&a&&t(r)};v(()=>(null!==e.current&&document.addEventListener("keydown",r,!1),()=>document.removeEventListener("keydown",r,!1)))}(L,B,w),C?(0,l.jsxs)("div",{..._,ref:L,role:s,className:R,"aria-labelledby":N?S:E,onBlur:P?(
2)=>{}:function({target:e,relatedTarget:t}){if(C&&t&&e&&"alertdialog"===s){const{current:n}=O,{current:r}=D,{current:a}=A;ar({bodyNode:n,startTrapNode:r,endTrapNode:a,currentActiveNode:t,oldActiveNode:e,prefix:I})}},onKeyDown:P?function(e){C&&de(e,X)&&L.current&&"alertdialog"===s&&or({containerNode:L.current,currentActiveNode:e.target,event:e})}:()=>{},children:[!P&&(0,l.jsx)("span",{ref:D,tabIndex:0,role:"link",className:`${I}--visually-hidden`,children:"Focus sentinel"}),(0,l.jsxs)("div",{ref:O,className:`${I}--actionable-notification__focus-wrapper`,children:[(0,l.jsxs)("div",{className:`${I}--actionable-notification__details`,children:[(0,l.jsx)(Il,{notificationType:b?"inline":"toast",kind:g,iconDescription:m||`${g} icon`}),(0,l.jsx)("div",{className:`${I}--actionable-notification__text-wrapper`,children:(0,l.jsxs)("div",{className:`${I}--actionable-notification__content`,children:[N&&(0,l.jsx)(h,{as:"div",className:`${I}--actionable-notification__title`,id:S,children:N}),T&&(0,l.jsx)(h,{as:"div",className:`${I}--actionable-notification__subtitle`,id:E,children:T}),r&&(0,l.jsx)(h,{as:"div",className:`${I}--actionable-notification__caption`,children:r}),o]})})]}),(0,l.jsxs)("div",{className:`${I}--actionable-notification__button-wrapper`,children:[e&&(0,l.jsx)(_l,{onClick:c,inline:b,children:e}),!y&&(0,l.jsx)(Cl,{"aria-label":n||t,notificationType:"actionable",onClick:B})]})]}),!P&&(0,l.jsx)("span",{ref:A,tabIndex:0,role:"link",className:`${I}--visually-hidden`,children:"Focus sentinel"})]}):null}Il.propTypes={iconDescription:m().string.isRequired,kind:m().oneOf(["error","success","warning","warning-alt","info","info-square"]).isRequired,notificationType:m().oneOf(["inline","toast"]).isRequired},Sl.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),caption:m().string,children:m().node,className:m().string,hideCloseButton:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onClose:m().func,onCloseButtonClick:m().func,role:m().oneOf(["alert","log","status"]),statusIconDescription:m().string,subtitle:m().string,timeout:m().number,title:m().string},El.propTypes={"aria-label":m().string,children:m().node,className:m().string,hideCloseButton:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onClose:m().func,onCloseButtonClick:m().func,role:m().oneOf(["alert","log","status"]),statusIconDescription:m().string,subtitle:m().string,title:m().string},Rl.propTypes={actionButtonLabel:m().string,"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),caption:m().string,children:m().node,className:m().string,closeOnEscape:m().bool,hasFocus:I(m().bool,"hasFocus is deprecated. To conform to accessibility requirements hasFocus should always be `true` for ActionableNotification. If you were setting this prop to `false`, consider using the Callout component instead."),hideCloseButton:m().bool,inline:m().bool,kind:m().oneOf(["error","info","info-square","success","warning","warning-alt"]),lowContrast:m().bool,onActionButtonClick:m().func,onClose:m().func,onCloseButtonClick:m().func,role:m().string,statusIconDescription:m().string,subtitle:m().node,title:m().string};const Ol={error:"warning",success:"info"};function Dl({actionButtonLabel:e,children:t,onActionButtonClick:n,title:r,titleId:o,subtitle:s,statusIconDescription:c,className:d,kind:p="info",lowContrast:m,...f}){const b=i(),g=u()(d,{[`${b}--actionable-notification`]:!0,[`${b}--actionable-notification--low-contrast`]:m,[`${b}--actionable-notification--${p}`]:p,[`${b}--actionable-notification--hide-close-button`]:!0}),x=(0,a.useRef)(null);return((e,t="interactive child node(s) should have an `aria-describedby` property")=>{(0,a.useEffect)(()=>{const{current:n}=e,r=n?Te(n):null;if(r&&!r.hasAttribute("aria-describedby"))throw new Error(`Error: ${t}.\n\nInstead found: ${r.outerHTML}`)},[t,e])})(x,"interactive child node(s) should have an `aria-describedby` property with a value matching the value of `titleId`"),(0,l.jsxs)("div",{...f,className:g,children:[(0,l.jsxs)("div",{className:`${b}--actionable-notification__details`,children:[(0,l.jsx)(Il,{notificationType:"inline",kind:p,iconDescription:c||`${p} icon`}),(0,l.jsxs)("div",{ref:x,className:`${b}--actionable-notification__text-wrapper`,children:[r&&(0,l.jsx)(h,{as:"div",id:o,className:`${b}--actionable-notification__title`,children:r}),s&&(0,l.jsx)(h,{as:"div",className:`${b}--actionable-notification__subtitle`,children:s}),t]})]}),(0,l.jsx)("div",{className:`${b}--actionable-notification__button-wrapper`,children:e&&(0,l.jsx)(_l,{onClick:n,"aria-describedby":o,inline:!0,children:e})})]})}
2Dl.propTypes={actionButtonLabel:m().string,children:m().node,className:m().string,kind:U(m().oneOf(["error","info","info-square","success","warning","warning-alt"]),["warning","info"],e=>Ol[e]),lowContrast:m().bool,onActionButtonClick:m().func,statusIconDescription:m().string,subtitle:m().node,title:m().string,titleId:m().string};const Al=m().shape({localeMatcher:m().oneOf(["best fit","lookup"]),style:m().oneOf(["decimal","currency","percent","unit"]),currency:m().string,currencyDisplay:m().oneOf(["symbol","narrowSymbol","code","name"]),currencySign:m().oneOf(["standard","accounting"]),unit:m().string,unitDisplay:m().oneOf(["short","narrow","long"]),notation:m().oneOf(["standard","scientific","engineering","compact"]),compactDisplay:m().oneOf(["short","long"]),signDisplay:m().oneOf(["auto","never","always","exceptZero"]),minimumIntegerDigits:m().number,minimumFractionDigits:m().number,maximumFractionDigits:m().number,minimumSignificantDigits:m().number,maximumSignificantDigits:m().number,useGrouping:m().oneOfType([m().bool,m().oneOf(["always","auto","min2"])]),numberingSystem:m().string,roundingIncrement:m().number,roundingMode:m().oneOf(["ceil","floor","expand","trunc","halfCeil","halfFloor","halfExpand","halfTrunc","halfEven"]),trailingZeroDisplay:m().oneOf(["auto","stripIfInteger"])});var Ll=n(61612),Ml=n(77078),Pl=n(91823);const Bl="increment.number",Fl="decrement.number",zl={[Bl]:"Increment number",[Fl]:"Decrement number"},ql=e=>zl[e],Hl=a.forwardRef((e,t)=>{const{allowEmpty:n=!1,className:r,decorator:o,disabled:s=!1,disableWheel:c=!1,formatOptions:d,helperText:p="",hideLabel:m=!1,hideSteppers:f,iconDescription:b,id:h,inputMode:g="decimal",invalid:x=!1,invalidText:v,label:y,light:$,locale:w="en-US",max:N,min:T,onBlur:j,onStepperBlur:_,onChange:C,onClick:k,onKeyUp:I,pattern:S="[0-9]*",readOnly:E,size:R="md",slug:O,step:D=1,translateWithId:A=ql,type:L="number",defaultValue:M=("number"===L?0:NaN),validate:P,warn:B=!1,warnText:F="",stepStartValue:z=0,value:q,...H}=e,K=i(),{isFluid:V}=(0,a.useContext)(Pt),[W,U]=(0,a.useState)(!1),[Q,Z]=(0,a.useState)(()=>void 0!==q?q:M),X=(0,a.useMemo)(()=>new Ml.d(w,d),[w,d]),[J,ee,te]=it({name:"NumberInput",defaultValue:"string"==typeof M?X.parse(M):M,value:"string"==typeof q?X.parse(q):q}),ne=(0,a.useRef)(J),[re,ae]=a.useState(()=>isNaN(J)?"":new Pl.K(w,d).format(J)),ie=(0,a.useMemo)(()=>X.getNumberingSystem(re),[X,re]),se=(0,a.useMemo)(()=>new Pl.K(w,{...d,numberingSystem:ie}),[w,d,ie]),ce=(0,a.useCallback)(e=>isNaN(e)||null===e?"":se.format(e),[se]);(0,a.useEffect)(()=>{!te||isNaN(ne.current)&&isNaN(J)||ne.current===J||(ae(ce(J)),ne.current=J)},[te,J,ce]);const ue=(0,a.useRef)(null),pe=Y([t,ue]),me=u()({[`${K}--number`]:!0,[`${K}--number--helpertext`]:!0,[`${K}--number--readonly`]:E,[`${K}--number--light`]:$,[`${K}--number--nolabel`]:m,[`${K}--number--nosteppers`]:f,[`${K}--number--${R}`]:R}),fe=function({allowEmpty:e,invalid:t,value:n,max:r,min:a,validate:o,locale:i}){if(t)return!1;if(""===n)return e;let l;return l="string"==typeof n?((e,t)=>{if(""===e||null==e)return NaN;e=(e=>e.replace(/[\u061C\u200E\u200F\u202A-\u202E\u2066-\u2069]/g,"").replace(/[\u2212\u2012\u2013\u2014\uFE63\uFF0D]/g,"-"))(e);const{groupSeparator:n,decimalSeparator:r}=(e=>{const t=new Intl.NumberFormat(e).format(1234567.89),n="[\\u0030-\\u0039\\u0660-\\u0669\\u0966-\\u096F\\u09E6-\\u09EF\\uFF10-\\uFF19一二三四五六七八九〇零]",r="[^\\u0030-\\u0039\\u0660-\\u0669\\u0966-\\u096F\\u09E6-\\u09EF\\uFF10-\\uFF19一二三四五六七八九〇零]+",a=new RegExp(`(${r})${n}{3}(${r})${n}{2}$`),o=t.match(a);return o?{groupSeparator:o[1],decimalSeparator:o[2]}:{groupSeparator:null,decimalSeparator:null}})(t),a={零:"0",〇:"0",一:"1",二:"2",三:"3",四:"4",五:"5",六:"6",七:"7",八:"8",九:"9"},o=[{start:48,end:57,base:48},{start:1632,end:1641,base:1632},{start:2406,end:2415,base:2406},{start:2534,end:2543,base:2534},{start:65296,end:65305,base:65296}];let i=Array.from(e).map(e=>{if("e"===e||"E"===e||"+"===e||"-"===e)return e;if(void 0!==a[e])return a[e];const t=e.charCodeAt(0);for(const e of o)if(t>=e.start&&t<=e.end)return String(t-e.start);return e}).join("");if(n)if(""===n?.trim())i=i?.replace(/[\u00A0\u202F\s]/g,"");else if(","!==r&&"٬"!==r&&(i=i?.replace(/[,٬]/g,"")),","!==n&&"٬"!==n){const e=n?.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i?.replace(new RegExp(e,"g"),"")}if(i=i.replace(/٫/g,"."),r&&"."!==r&&"٫"!==r){const e=r.replace(/[.*+?^${}()|[\]\\]/g,"\\$&");i=i.replace(new RegExp(e,"g"),".")}return i=i.replace(/[\u2212\u2012\u2013\u2014\uFE63\uFF0D]/g,"-"),Number(i)})(n,i):n,(!o||"string"!=typeof n||!1!==o(n,i))&&!(void 0!==r&&l>r||void 0!==a&&l<a)}({allowEmpty:n,invalid:x,value:P?re:"number"===L?Q:J,max:N,min:T,validate:P,locale:w}
2),be=mt({id:h,readOnly:E,disabled:s,invalid:!fe,invalidText:v,warn:B,warnText:F}),[he,ge]=[A("increment.number"),A("decrement.number")],xe=u()(`${K}--number__input-wrapper`,{[`${K}--number__input-wrapper--warning`]:be.warn,[`${K}--number__input-wrapper--slug`]:O,[`${K}--number__input-wrapper--decorator`]:o}),ve=u()({[`${K}--number__invalid`]:be.invalid||be.warn,[`${K}--number__invalid--warning`]:be.warn});let ye;(0,a.useEffect)(()=>{"number"===L&&void 0!==q&&Z(n&&""===q?"":q)},[q,L,n]),be.invalid&&(ye=be.invalidId),be.warn&&(ye=be.warnId),be.validation||(ye=p?be.helperId:void 0);const $e=e=>{"type"in e.target&&"button"===e.target.type?U(!1):U("focus"===e.type)},we=u()(`${K}--form-item`,{...r?{[r]:!0}:{},[`${K}--number-input--fluid--invalid`]:V&&be.invalid,[`${K}--number-input--fluid--focus`]:V&&W,[`${K}--number-input--fluid--disabled`]:V&&s}),Ne=be.icon,Te=e=>{const t=e.toString().split(".");return t[1]?t[1].length:0},je=(e,t)=>{if(ue.current){const n="number"===L?Number(ue.current.value):J;let r;Number.isNaN(n)||!n?"number"==typeof z&&z?r=z:T&&T<0&&N&&N>0||!N&&!T||N?("up"===t&&(r=1),"down"===t&&(r=-1)):(T&&T>0&&N&&N>0||T)&&(r=T):r="up"===t?n+D:n-D;const a=Math.max(Te(n),Te(D)),o=parseFloat(Number(r).toFixed(a)),i=Bn(o,T??-1/0,N??1/0),l={value:i,direction:t};if("number"===L&&void 0===q&&Z(l.value),"text"===L){const e=ce(i),t=X.parse(e);ee(t),ae(e),ne.current=t}return C&&C(e,l),l}},_e=(e,t)=>{if(ue.current){const n=je(e,t);k&&k(e,n)}},Ce=O??o,ke=G(Ce,Ze)?(0,a.cloneElement)(Ce,{size:"mini"}):Ce,Ie=G(ke,Ze)?ke.props.revertActive:void 0;return(0,a.useEffect)(()=>{!Ie&&O&&M&&Z(M)},[M,Ie,O]),(0,l.jsx)("div",{className:we,onFocus:V?$e:void 0,onBlur:V?$e:void 0,children:(0,l.jsxs)("div",{className:me,"data-invalid":!!be.invalid||void 0,children:[(0,l.jsx)(Kl,{disabled:be.disabled,hideLabel:m,id:h,label:y}),(0,l.jsxs)("div",{className:xe,children:[(0,l.jsx)("input",{...H,"data-invalid":!!be.invalid||void 0,"aria-invalid":be.invali
2d,"aria-describedby":ye,"aria-readonly":E,disabled:be.disabled,ref:pe,id:h,max:N,min:T,onClick:k,onChange:function(e){if(!s){if("number"===L){const t={value:n&&""===e.target.value?"":Number(e.target.value),direction:Q<e.target.value?"up":"down"};return void 0===q&&Z(t.value),void(C&&C(e,t))}if("text"===L){const t=n&&""===e.target.value?"":e.target.value;ee(X.parse(t)),ae(t)}}},onKeyUp:I,onKeyDown:e=>{"text"!==L||E||s||(de(e,oe)?je(e,"up"):de(e,le)&&je(e,"down")),H?.onKeyDown&&H?.onKeyDown(e)},onFocus:e=>{c&&e.target.addEventListener("wheel",Wl),H.onFocus&&H.onFocus(e)},onBlur:e=>{let t;if(c&&e.target.removeEventListener("wheel",Wl),"text"===L){const n=te?X.parse(re):J,r=isNaN(n)?"":ce(n),a=e.target.value,o=!P||P(a,w);ae(o?r:a);const i=X.parse(r);if(t=i,C&&o){const t={value:i,direction:ne.current<i?"up":"down"};isNaN(ne.current)&&isNaN(i)||C(e,t)}isNaN(ne.current)&&isNaN(J)||(ne.current=J),isNaN(J)&&isNaN(i)||ee(i)}if(j){if("number"===L)return void j(e,Q);const n=t??(te?X.parse(re):J);j(e,n)}},pattern:S,inputMode:g,readOnly:E,step:D,type:L,value:"number"===L?Q:re}),O?ke:o?(0,l.jsx)("div",{className:`${K}--number__input-inner-wrapper--decorator`,children:ke}):"",Ne?(0,l.jsx)(Ne,{className:ve}):null,!f&&(0,l.jsxs)("div",{className:`${K}--number__controls`,children:[(0,l.jsx)("button",{"aria-label":ge||b,className:`${K}--number__control-btn down-icon`,disabled:s||E,onClick:e=>_e(e,"down"),onBlur:_,tabIndex:-1,title:ge||b,type:"button",children:(0,l.jsx)(Ll.NA,{className:"down-icon"})}),(0,l.jsx)("div",{className:`${K}--number__rule-divider`}),(0,l.jsx)("button",{"aria-label":he||b,className:`${K}--number__control-btn up-icon`,disabled:s||E,onClick:e=>_e(e,"up"),onBlur:_,tabIndex:-1,title:he||b,type:"button",children:(0,l.jsx)(qr.OM,{className:"up-icon"})}),(0,l.jsx)("div",{className:`${K}--number__rule-divider`})]})]}),V&&(0,l.jsx)("hr",{className:`${K}--number-input__divider`}),be.validation?be.validation:(0,l.jsx)(Vl,{id:be.helperId,disabled:s,description:p})]})})});Hl.displayName="NumberInput",Hl.propTypes={allowEmpty:m().bool,className:m().string,decorator:m().node,defaultValue:m().oneOfType([m().number,m().string]),disableWheel:m().bool,disabled:m().bool,formatOptions:Al,helperText:m().node,hideLabel:m().bool,hideSteppers:m().bool,iconDescription:m().string,id:m().string.isRequired,inputMode:m().oneOf(["none","text","tel","url","email","numeric","decimal","search"]),invalid:m().bool,invalidText:m().node,label:m().node,light:I(m().bool,"The `light` prop for `NumberInput` is no longer needed and has been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release."),locale:m().string,max:m().number,min:m().number,stepStartValue:m().number,onBlur:m().func,onStepperBlur:m().func,onChange:m().func,onClick:m().func,onKeyUp:m().func,pattern:m().string,readOnly:m().bool,size:m().oneOf(["sm","md","lg"]),slug:I(m().node,"The `slug` prop for `NumberInput` is no longer needed and has been deprecated in v11 in favor of the new `decorator` prop. It will be moved in the next major release."),step:m().number,translateWithId:m().func,type:m().oneOf(["number","text"]),value:m().oneOfType([m().number,m().string]),warn:m().bool,warnText:m().node,validate:m().func};const Kl=({disabled:e,id:t,hideLabel:n,label:r})=>{const o=i(),s=(0,a.useRef)(null),c=u()({[`${o}--label`]:!0,[`${o}--label--disabled`]:e,[`${o}--visually-hidden`]:n});return ft(s,"The NumberInput component `label` prop must have no interactive content"),r?(0,l.jsx)(h,{as:"label",htmlFor:t,className:c,ref:s,children:r}):null},Vl=({disabled:e,description:t,id:n})=>{const r=i(),a=u()(`${r}--form__helper-text`,{[`${r}--form__helper-text--disabled`]:e});return t?(0,l.jsx)(h,{as:"div",id:n,className:a,children:t}):null};function Wl(e){e.preventDefault()}const Ul=e=>e instanceof HTMLElement&&e.offsetWidth<e.scrollWidth,Gl={red:"Red",magenta:"Magenta",purple:"Purple",blue:"Blue",cyan:"Cyan",teal:"Teal",green:"Green",gray:"Gray","cool-gray":"Cool-Gray","warm-gray":"Warm-Gray","high-contrast":"High-Contrast",outline:"Outline"},Yl={sm:"sm",md:"md",lg:"lg"},Ql=a.forwardRef(({children:e,className:t,decorator:n,id:r,type:o,filter:s,renderIcon:c,title:d="Clear filter",disabled:p,onClose:m,size:f,as:b,slug:g,...x},y)=>{const $=i(),w=(0,a.useRef)(null);s&&console.warn("The `filter` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead."),m&&console.warn("The `onClose` prop for Tag has been deprecated and will be removed in the next major version. Use DismissibleTag instead.");const N=Y([y,w]),T=j(),_=r??`tag-${T}`,[C,k]=(0,a.useState)(!1);v(()=>{const e=w.current?.getElementsByClassName(`${$}--tag__label`)[0],t=Ul(e);queueMicrotask(()=>k(t))},[$,w]);const I=[`${$}--tag--selectable`,`${$}--tag--filter`,`${$}--tag--operational`].some(e=>t?.includes(e)),E=u()(`${$}--tag`,t,{[`${$}--tag--disabled`]:p,[`${$}--tag--filter`]:s,[`${$}--tag--${f}`]:f,[`${$}--layout--size-${f}`]:f,[`${$}--tag--${o}`]:o,[`${$}--tag--interactive`]:x.onClick&&!I&&C}),R=void 0!==o&&o in Object.keys(Gl)?Gl[o]:"",O=g??n,D=G(O,Ze)&&!I?(0,a.cloneElement)(O,{size:"sm",kind:"inline"}):null;if(s)return(0,l.jsxs)(b??"div",{className:E,id:_,...x,children:[c&&"sm"!==f?(0,l.jsx)("div",{className:`${$}--tag__custom-icon`,children:(0,l.jsx)(c,{})}):"",(0,l.jsx)(h,{title:"string"==typeof e?e:void 0,className:`${$}--tag__label`,children:null!=e?e:R}),D,(0,l.jsx)("button",{type:"button",className:`${$}--tag__close-icon`,onClick:e=>{m&&(e.stopPropagation(),m(e))},disabled:p,"aria-label":d,title:d,children:(0,l.jsx)(S.bm,{})})]});const A=b??(x.onClick||t?.includes(`${$}--tag--operational`)?"button":"div"),L=u()({[`${$}--tag__label`]:!I});return(0,l.jsxs)(A,{ref:N,disabled:p,className:E,id:_,type:"button"===A?"button":void 0,...x,children:[c&&"sm"!==f?(0,l.jsx)("div",{className:`${$}--tag__custom-icon`,children:(0,l.jsx)(c,{})}):"",C&&!I?(0,l.jsx)(ye,{openOnHover:!1,definition:null!=e?e:R,className:`${$}--definition--tooltip--tag`,children:(0,l.jsx)(h,{title:null!=e&&"string"==typeof e?e:R,className:L,children:null!=e?e:R})}):(0,l.jsx)(h,{title:null!=e&&"string"==typeof e?e:R,className:L,children:null!=e?e:R}),g?D:n?(0,l.jsx)("div",{className:`${$}--tag__decorator`,children:D}):""]})});Ql.displayName="Tag";const Zl=Ql;Zl.propTypes={as:m().elementType,children:m().node,className:m().string,decorator:m().node,disabled:m().bool,filter:I(m().bool,"The `filter` prop has been deprecated and will be removed in the next major version. Use DismissibleTag instead."),id:m().string,onClose:I(m().func,"The `onClose` prop has been deprecated and will be removed in the next major version. Use DismissibleTag instead."),renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(Object.keys(Yl)),slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),title:I(m().string,"The `title` prop has been deprecated and will be removed in the next major version. Use DismissibleTag instead."),type:m().oneOf(Object.keys(Gl))},Object.keys(Gl);const Xl=(0,a.forwardRef)(({className:e,decorator:t,disabled:n,id:r,renderIcon:o,title:s="Dismiss",onClose:c,slug:d,size:p,text:m,tagTitle:f,type:b,dismissTooltipAlignment:g="bottom",dismissTooltipLabel:x="Dismiss tag",...y},$)=>{const w=i(),N=(0,a.useRef)(null),T=j(),_=r??`tag-${T}`,C=u()(`${w}--tag--filter`,e),[k,I]=(0,a.useState)(!1);v(()=>{const e=N.current?.getElementsByClassName(`${w}--tag__label`)[0],t=Ul(e);queueMicrotask(()=>I(t))},[w,N]);const E=At(N,$),R=d??t,O=G(R,Ze)?(0,a.cloneElement)(R,{size:"sm",kind:"inline"}):R,D=u()(`${w}--icon-tooltip`,`${w}--tag-label-tooltip`),{onClick:A,...L}=y,M=k?x:s;return(0,l.jsx)(Zl,{ref:E,type:b,size:p,renderIcon:o,disabled:n,className:C,id:_,...L,children:(0,l.jsxs)("div",{className:`${w}--interactive--tag-children`,children:[(0,l.jsx)(h,{title:f||m,className:`${w}--tag__label`,children:m}),d?O:t?(0,l.jsx)("div",{className:`${w}--tag__decorator`,children:O}):"",(0,l.jsx)(Ie,{label:M,align:g,className:D,leaveDelayMs:0,closeOnActivation:!0,children:(0,l.jsx)("button",{type:"button",className:`${w}--tag__close-icon`,onClick:e=>{c&&(e.stopPropagation(),c(e))},disabled:n,"aria-label":M,children:(0,l.jsx)(S.bm,{})})})]})})});
2Xl.displayName="DismissibleTag",Xl.propTypes={className:m().string,decorator:m().node,disabled:m().bool,dismissTooltipAlignment:m().oneOf(["top","bottom","left","right","top-start","top-end","bottom-start","bottom-end","left-end","left-start","right-end","right-start"]),dismissTooltipLabel:m().string,id:m().string,onClose:m().func,renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(Object.keys(Yl)),slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),text:m().string,tagTitle:m().string,title:m().string,type:m().oneOf(Object.keys(Gl))},Object.keys(Gl);const Jl={red:"Red",magenta:"Magenta",purple:"Purple",blue:"Blue",cyan:"Cyan",teal:"Teal",green:"Green",gray:"Gray","cool-gray":"Cool-Gray","warm-gray":"Warm-Gray"},es=(0,a.forwardRef)(({className:e,disabled:t,id:n,renderIcon:r,size:o,text:s,type:c="gray",...d},p)=>{const m=i(),f=(0,a.useRef)(null),b=j(),g=n??`tag-${b}`,x=u()(`${m}--tag--operational`,e),[y,$]=(0,a.useState)(!1);v(()=>{const e=f.current?.getElementsByClassName(`${m}--tag__label`)[0],t=Ul(e);queueMicrotask(()=>$(t))},[m,f]);const w=u()(`${m}--icon-tooltip`,`${m}--tag-label-tooltip`),N=At(f,p);return y?(0,l.jsx)(Ie,{label:s,align:"bottom",className:w,leaveDelayMs:0,onMouseEnter:()=>!1,closeOnActivation:!0,children:(0,l.jsx)(Zl,{ref:N,type:c,size:o,renderIcon:r,disabled:t,className:x,id:g,...d,children:(0,l.jsx)(h,{title:s,className:`${m}--tag__label`,children:s})})}):(0,l.jsx)(Zl,{ref:N,type:c,size:o,renderIcon:r,disabled:t,className:x,id:g,...d,children:(0,l.jsx)(h,{title:s,className:`${m}--tag__label`,children:s})})});es.displayName="OperationalTag",es.propTypes={className:m().string,disabled:m().bool,id:m().string,renderIcon:m().oneOfType([m().func,m().object]),size:m().oneOf(Object.keys(Yl)),text:m().string,type:m().oneOf(Object.keys(Jl))},Object.keys(Jl);const ts=(0,a.forwardRef)(({className:e,decorator:t,id:n,inline:r=!1,labelText:o="Select",disabled:s=!1,children:c,noLabel:d=!1,hideLabel:p=!1,invalid:m=!1,invalidText:f="",helperText:b,light:g=!1,readOnly:x,size:v,warn:y=!1,warnText:$,onChange:w,slug:N,...T},j)=>{const _=i(),{isFluid:C}=(0,a.useContext)(Pt),k=(0,a.useRef)(null),[I,E]=(0,a.useState)(!1),R=a.Children.toArray(c).filter(e=>a.isValidElement(e)),O=T?.value||T?.defaultValue,D=R.find(e=>e.props?.value===O),A=T?.title||D?.props?.text||R[0]?.props?.text||"",[L,M]=(0,a.useState)(A),P=mt({id:n,disabled:s,readOnly:x,invalid:m,invalidText:f,warn:y,warnText:$}),B=u()({[`${_}--select`]:!0,[`${_}--select--inline`]:r,[`${_}--select--light`]:g,[`${_}--select--invalid`]:P.invalid,[`${_}--select--disabled`]:P.disabled,[`${_}--select--readonly`]:x,[`${_}--select--warning`]:P.warn,[`${_}--select--fluid--invalid`]:C&&P.invalid,[`${_}--select--fluid--focus`]:C&&I,[`${_}--select--slug`]:N,[`${_}--select--decorator`]:t,[`${_}--select--${v}`]:v,[`${_}--layout--size-${v}`]:v}),F=u()(`${_}--label`,{[`${_}--visually-hidden`]:p,[`${_}--label--disabled`]:P.disabled}),z=u()({[`${_}--select-input`]:!0}),q=P.validation,H=u()(`${_}--form__helper-text`,{[`${_}--form__helper-text--disabled`]:P.disabled}),K=ut(b)?(0,l.jsx)(h,{as:"div",id:P.helperId,className:H,children:b}):null,V={};P.invalid?V["aria-describedby"]=P.invalidId:r||C||(V["aria-describedby"]=K?P.helperId:void 0);const W=e=>{E("focus"===e.type)},U={onMouseDown:e=>{x&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{x&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}},Y=N??t,Q=G(Y,Ze)?(0,a.cloneElement)(Y,{size:"mini"}):Y;ft(k,"The Select component `labelText` prop must have no interactive content");const Z=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("select",{...T,...V,id:n,className:z,disabled:P.disabled||void 0,"aria-invalid":P.invalid||void 0,"aria-readonly":x||void 0,title:L,onChange:vt([w,e=>{const t=e?.target?.options[e.target.selectedIndex];M(t?.text)}]),...U,ref:j,children:c}),(0,l.jsx)(S.yQ,{className:`${_}--select__arrow`}),P.invalid&&(0,l.jsx)(pt.BF,{className:`${_}--select__invalid-icon`}),!P.invalid&&P.warn&&(0,l.jsx)(pt.OR,{className:`${_}--select__invalid-icon ${_}--select__invalid-icon--warning`})]});return(0,l.jsx)("div",{className:u()(`${_}--form-item`,e),children:(0,l.jsxs)("div",{className:B,children:[!d&&(0,l.jsx)(h,{as:"label",htmlFor:n,className:F,ref:k,children:o}),r&&(0,l.jsxs)("div",{className:`${_}--select-input--inline__wrapper`,children:[(0,l.jsx)("div",{className:`${_}
2--select-input__wrapper`,"data-invalid":P.invalid||null,children:Z}),q]}),!r&&(0,l.jsxs)("div",{className:`${_}--select-input__wrapper`,"data-invalid":P.invalid||null,onFocus:W,onBlur:W,children:[Z,N?Q:t?(0,l.jsx)("div",{className:`${_}--select__inner-wrapper--decorator`,children:Q}):"",C&&(0,l.jsx)("hr",{className:`${_}--select__divider`}),C&&q?q:null]}),r||C||!q?K:q]})})});ts.displayName="Select",ts.propTypes={children:m().node,className:m().string,decorator:m().node,defaultValue:m().any,disabled:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,inline:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node,light:I(m().bool,"The `light` prop for `Select` is no longer needed and has been deprecated in v11 in favor of the new `Layer` component. It will be moved in the next major release."),noLabel:m().bool,onChange:m().func,readOnly:m().bool,size:m().oneOf(["xs","sm","md","lg"]),slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),warn:m().bool,warnText:m().node};const ns=({className:e,value:t="",disabled:n=!1,hidden:r=!1,text:a="",...o})=>{const s=i(),c=u()({[`${s}--select-option`]:!0,...e&&{[e]:e}});return(0,l.jsx)("option",{...o,className:c,value:t,disabled:n,hidden:r,children:a})};ns.propTypes={className:m().string,disabled:m().bool,hidden:m().bool,text:m().string.isRequired,value:m().any.isRequired};var rs=ts,as=ns;const os=(e,t)=>{if(!e){const e=t??10;return e>0?e:10}return void 0!==t&&e.some(e=>t===e.value)?t:e[0].value},is=a.forwardRef(({backwardText:e="Previous page",backwardTextTooltipPosition:t="top",className:n="",disabled:r=!1,forwardText:o="Next page",forwardTextTooltipPosition:s="top",id:c,isLastPage:d=!1,itemText:p=(e,t)=>`${e}–${t} items`,itemRangeText:m=(e,t,n)=>`${e}–${t} of ${n} items`,itemsPerPageText:f="Items per page:",onChange:b,pageNumberText:h,pageRangeText:g=(e,t)=>`of ${t} ${1===t?"page":"pages"}`,pageSelectLabelText:x=e=>`Page of ${e} ${1===e?"page":"pages"}`,page:v=1,pageInputDisabled:y,renderPageSelect:$,pageSize:w,pageSizeInputDisabled:N,pageSizes:T,pageText:j=e=>`page ${e}`,pagesUnknown:C=!1,size:k="md",totalItems:I,...S},E)=>{const R=i(),O=_(c?.toString()),D=(0,a.useRef)(null),A=(0,a.useRef)(null),L=(0,a.useRef)(null),M=(0,a.useMemo)(()=>(e=>e&&e.length?e.map(e=>"object"==typeof e?e:{text:String(e),value:e}):void 0)(T),[T]),P=Ei(w),B=Ei(M),[F,z]=(0,a.useState)(M),[q,H]=(0,a.useState)(v),[K,V]=(0,a.useState)(null),[W,U]=(0,a.useState)(()=>os(M,w)),G=u()({[`${R}--pagination`]:!0,[`${R}--pagination--${k}`]:k,[`${R}--layout--size-${k}`]:k,[n]:!!n}),Y=I?Math.max(Math.ceil(I/W),1):1,Q=r||1===q,Z=u()({[`${R}--pagination__button`]:!0,[`${R}--pagination__button--backward`]:!0,[`${R}--pagination__button--no-index`]:Q}),X=r||q===Y&&!C,J=u()({[`${R}--pagination__button`]:!0,[`${R}--pagination__button--forward`]:!0,[`${R}--pagination__button--no-index`]:X}),ee=$?[]:function(e){let t=1;const n=[];for(;t<=e;)n.push((0,l.jsx)(as,{value:t,text:String(t)},t)),t++;return n}(Y),te=C?null:$?.({currentPage:q,totalPages:Y,currentPageSize:W,pageSelectLabelText:x(Y),onSetPage:function(e){if(r||y)return;const t=Number(e);if(!Number.isInteger(t))return;const n=Bn(t,1,Y);n!==q&&(H(n),b&&b({page:n,pageSize:W}))}})??null,ne={backward:D,forward:A};return(0,a.useEffect)(()=>{K&&((e=>{const t=ne[e];t?.current&&!t.current.disabled&&t.current.focus()})(K),V(null))},[K]),(0,a.useEffect)(()=>{L.current&&b&&(b(L.current),L.current=null)},[b,q,W]),(0,a.useEffect)(()=>{H(v)},[v]),(0,a.useEffect)(()=>{if(bn()(B,M))return;if(!M){const e=os(void 0,w);return z(void 0),void U(e)}z(e=>bn()(M,e)?e:M);const e=os(M,w??W),t=M.some(e=>e.value===W),n=t?q:1,r=void 0!==w,a=!!r&&M.some(e=>e.value===w);t||H(n),e!==W&&U(e),!b||r&&a||n===q&&e===W||(L.current={page:n,pageSize:e})},[w,M,b,q,W,B]),(0,a.useEffect)(()=>{if(w===P)return;const e=os(M,w);U(e)},[w,M,P]),(0,l.jsxs)("div",{className:G,ref:E,...S,children:[(0,l.jsxs)("div",{className:u()(`${R}--pagination__left`,{[`${R}--pagination__left--no-sizer`]:!F}),children:[F&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("label",{id:`${R}-pagination-select-${O}-count-label`,className:`${R}--pagination__text`,htmlFor:`${R}-pagination-select-${O}`,children:f}),(0,l.jsx)(rs,{id:`${R}-pagination-select-${O}`,className:`${R}--select__item-count`,labelText:"",hideLabel:!0,noLabel:!0,inline:!0,onChange:function(e){const t={pageSize:Number(e.target.value),page:1};H(t.page),U(t.pageSize),b&&b(t)},disabled:N||r,value:W,children:F.map(e=>(0,l.jsx)(as,{value:e.value,text:String(e.text)},e.value))})]}),(0,l.jsx)("span",{className:`${R}--pagination__text ${R}--pagination__items-count`,children:C||!I?0===I?m(0,0,0):p(W*(q-1)+1,q*W):m(Math.min(W*(q-1)+1,I),Math.min(q*W,I),I)})]}),(0,l.jsxs)("div",{className:u()(`${R}--pagination__right`,{[`${R}--pagination__right--no-content`]:!C&&!!$}),children:[C?(0,l.jsx)("span",{className:`${R}--pagination__text ${R}--pagination__page-text ${R}--pagination__unknown-pages-text`,children:j(q)}):(0,l.jsxs)(l.Fragment,{children:[$?te:(0,l.jsx)(rs,{id:`${R}-pagination-select-${O}-right`,className:`${R}--select__page-number`,labelText:x(Y),inline:!0,hideLabel:!0,onChange:function(e){const t=Number(e.target.value);t>0&&I&&t<=Math.max(Math.ceil(I/W),1)&&(H(t),b&&b({page:t,pageSize:W}))},value:q,disabled:y||r,children:ee},q),(0,l.jsx)("span",{className:`${R}--pagination__text`,children:null==te&&$?`${q} ${g(q,Y)}`:g(q,Y)})]}),(0,l.jsxs)("div",{className:`${R}--pagination__control-buttons`,children:[(0,l.jsx)(Oe,{align:t,disabled:Q,kind:"ghost",className:Z,label:e,"aria-label":e,onClick:function(){const e=q-1;H(e),1===e&&V("forward"),b&&b({page:e,pageSize:W,ref:A})},ref:D,children:(0,l.jsx)(lt.ZK,{})}),(0,l.jsx)(Oe,{align:s,disabled:X||d,kind:"ghost",className:J,label:o,"aria-label":o,onClick:function(){const e=q+1;H(e),e===Y&&V("backward"),b&&b({page:e,pageSize:W,ref:D})},ref:A,children:(0,l.jsx)(lt.K3,{})})]})]})]})});is.displayName="Pagination",is.propTypes={backwardText:m().string,backwardTextTooltipPosition:m().oneOf(["top","right","bottom","left"]),className:m().string,disabled:m().bool,forwardText:m().string,forwardTextTooltipPosition:m().oneOf(["top","right","bottom","left"]),id:m().oneOfType([m().str
2ing,m().number]),isLastPage:m().bool,itemRangeText:m().func,itemText:m().func,itemsPerPageText:m().string,onChange:m().func,page:m().number,pageInputDisabled:m().bool,pageNumberText:m().string,pageRangeText:m().func,pageSelectLabelText:m().func,renderPageSelect:m().func,pageSize:m().number,pageSizeInputDisabled:m().bool,pageSizes:m().arrayOf(m().oneOfType([m().number,m().shape({text:m().string.isRequired,value:m().number.isRequired})])),pageText:m().func,pagesUnknown:m().bool,size:m().oneOf(["xs","sm","md","lg"]),totalItems:m().number};const ls=e=>({"data-invalid":!0,"aria-invalid":!0,"aria-errormessage":e}),ss=e=>({"aria-describedby":e}),cs=e=>({"aria-describedby":e}),ds=({sharedTextInputProps:e,invalid:t,invalidId:n,warn:r,warnId:a,hasHelper:o,helperId:i})=>({...e,...t?ls(n):{},...r?ss(a):{},...o?cs(i):{}}),us=(0,a.forwardRef)(({className:e,disabled:t=!1,helperText:n,hideLabel:r,hidePasswordLabel:o="Hide password",id:s,inline:c,invalid:d=!1,invalidText:p,labelText:m,light:f,onChange:b=()=>{},onClick:h=()=>{},onTogglePasswordVisibility:g,placeholder:x,readOnly:v,size:y,showPasswordLabel:$="Show password",tooltipPosition:w="bottom",tooltipAlignment:N="end",type:T="password",warn:j=!1,warnText:_,...C},k)=>{const[I,S]=(0,a.useState)(T),E=i(),R=mt({id:s,invalid:d,invalidText:p,warn:j,warnText:_,readOnly:v,disabled:t}),{isFluid:O}=(0,a.useContext)(Pt),D=a.useRef(null),A={id:s,onChange:e=>{t||b(e)},onClick:e=>{t||h(e)},placeholder:x,type:I,className:u()(`${E}--text-input`,`${E}--password-input`,e,{[`${E}--text-input--light`]:f,[`${E}--text-input--invalid`]:R.invalid,[`${E}--text-input--warning`]:R.warn,[`${E}--text-input--${y}`]:y}),readOnly:v,ref:k,...C},L=u()(`${E}--form-item`,`${E}--text-input-wrapper`,`${E}--password-input-wrapper`,{[`${E}--text-input-wrapper--readonly`]:v,[`${E}--text-input-wrapper--light`]:f,[`${E}--text-input-wrapper--inline`]:c,[`${E}--text-input-wrapper--inline--invalid`]:c&&R.invalid,[`${E}--text-input--fluid`]:O}),M=u()(`${E}--label`,{[`${E}--visually-hidden`]:r,[`${E}--label--disabled`]:t,[`${E}--label--inline`]:c,[`${E}--label--inline--${y}`]:c&&!!y}),P=u()(`${E}--form__helper-text`,{[`${E}--form__helper-text--disabled`]:t,[`${E}--form__helper-text--inline`]:c}),B=u()(`${E}--text-input__field-outer-wrapper`,{[`${E}--text-input__field-outer-wrapper--inline`]:c}),F=u()(`${E}--text-input__field-wrapper`,{[`${E}--text-input__field-wrapper--warning`]:R.warn,[`${E}--layout--size-${y}`]:y}),z=u()({[`${E}--text-input__invalid-icon`]:R.invalid||R.warn,[`${E}--text-input__invalid-icon--warning`]:R.warn}),q=null!=m&&(0,l.jsx)("label",{htmlFor:s,className:M,ref:D,children:m});ft(D,"The PasswordInput component `labelText` prop must have no interactive content");const H=ut(n)&&(0,l.jsx)("div",{id:R.helperId,className:P,children:n}),K="text"===I,V=K?(0,l.jsx)(pt.vZ,{className:`${E}--icon-visibility-off`}):(0,l.jsx)(pt.Ss,{className:`${E}--icon-visibility-on`}),W=u()(`${E}--text-input--password__visibility__toggle`,`${E}--btn`,`${E}--tooltip__trigger`,`${E}--tooltip--a11y`,{[`${E}--tooltip--${w}`]:w,[`${E}--tooltip--align-${N}`]:N}),U=u()(`${E}--toggle-password-tooltip`,`${E}--icon-tooltip`);let G;"top"!==w&&"bottom"!==w||("center"===N&&(G=w),"end"===N&&(G=`${w}-end`),"start"===N&&(G=`${w}-start`)),"right"!==w&&"left"!==w||(G=w),o&&""!==o.trim()?$&&""!==$.trim()||console.warn('Warning: The "showPasswordLabel" should not be blank.'):console.warn('Warning: The "hidePasswordLabel" should not be blank.');const Y=(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("input",{...ds({sharedTextInputProps:A,invalid:R.invalid,invalidId:R.invalidId,warn:R.warn,warnId:R.warnId,hasHelper:ut(n)&&!O&&(c||!c&&!R.validation),helperId:R.helperId}),disabled:t,"data-toggle-password-visibility":"password"===I}),O&&(0,l.jsx)("hr",{className:`${E}--text-input__divider`}),(0,l.jsx)(Ie,{align:G,className:U,label:K?o:$,children:(0,l.jsx)("button",{type:"button",className:W,disabled:t,onClick:e=>{S("password"===I?"text":"password"),g?.(e)},children:V})})]});(0,a.useEffect)(()=>{S(T)},[T]);const Q=R.icon;return(0,l.jsxs)("div",{className:L,children:[c?(0,l.jsx)("div",{className:`${E}--text-input__label-helper-wrapper`,children:q}):q,(0,l.jsxs)("div",{className:B,children:[(0,l.jsxs)("div",{className:F,"data-invalid":R.invalid||null,children:[Q&&(0,l.jsx)(Q,{className:z}),Y,O&&!c&&R.validation]}),!O&&!c&&(R.validation||H)]}),c&&!O&&(0,l.jsx)("div",{className:`${E}--text-input__label-helper-wrapper`,children:R.validation||H})]})});us.displayName="PasswordInput",us.propTypes={className:m().string,defaultValue:m().oneOfType([m().str
2ing,m().number]),disabled:m().bool,helperText:m().node,hideLabel:m().bool,hidePasswordLabel:m().string,id:m().string.isRequired,inline:m().bool,invalid:m().bool,readOnly:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:I(m().bool,"The `light` prop for `PasswordInput` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),onChange:m().func,onClick:m().func,onTogglePasswordVisibility:m().func,placeholder:m().string,showPasswordLabel:m().string,size:m().oneOf(["xs","sm","md","lg"]),tooltipAlignment:m().oneOf(["start","center","end"]),tooltipPosition:m().oneOf(["top","right","bottom","left"]),type:m().oneOf(["password","text"]),value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node};var ps=n(61940);const ms="carbon.progress-step.complete",fs="carbon.progress-step.incomplete",bs="carbon.progress-step.current",hs="carbon.progress-step.invalid",gs={[ms]:"Complete",[fs]:"Incomplete",[bs]:"Current",[hs]:"Invalid"},xs=e=>gs[e];function vs({children:e,className:t,currentIndex:n=0,onChange:r,spaceEqually:o,vertical:s,...c}){const d=i(),p=u()({[`${d}--progress`]:!0,[`${d}--progress--vertical`]:s,[`${d}--progress--space-equal`]:o&&!s,[t??""]:t});return(0,l.jsx)("ul",{className:p,...c,children:a.Children.map(e,(e,t)=>{if(!a.isValidElement(e))return null;const o=r?()=>r(t):void 0;return t===n?a.cloneElement(e,{complete:e.props.complete,current:!e.props.complete,index:t,onClick:o}):t<n?a.cloneElement(e,{complete:!0,index:t,onClick:o}):t>n?a.cloneElement(e,{complete:e.props.complete||!1,index:t,onClick:o}):null})})}function ys({label:e,description:t,className:n,current:r,complete:a,invalid:o,secondaryLabel:s,disabled:c,onClick:d,translateWithId:p=xs,...m}){const f=i(),b=u()({[`${f}--progress-step`]:!0,[`${f}--progress-step--current`]:r,[`${f}--progress-step--complete`]:a,[`${f}--progress-step--incomplete`]:!a&&!r,[`${f}--progress-step--disabled`]:c,[n??""]:n}),g=({complete:e,current:t,description:n,invalid:r,prefix:a})=>r?(0,l.jsx)(pt.N5,{className:`${a}--progress__warning`,children:(0,l.jsx)("title",{children:n})}):t?(0,l.jsx)(ps.nd,{children:(0,l.jsx)("title",{children:n})}):e?(0,l.jsx)(S.cR,{children:(0,l.jsx)("title",{children:n})}):(0,l.jsx)(S.Vg,{children:(0,l.jsx)("title",{children:n})});let x=p("carbon.progress-step.incomplete");return r&&(x=p("carbon.progress-step.current")),a&&(x=p("carbon.progress-step.complete")),o&&(x=p("carbon.progress-step.invalid")),(0,l.jsx)("li",{className:b,children:(0,l.jsxs)("button",{type:"button",className:u()(`${f}--progress-step-button`,{[`${f}--progress-step-button--unclickable`]:!d||r}),disabled:c,"aria-disabled":c,tabIndex:c?-1:0,onClick:r?void 0:d,onKeyDown:e=>{ce(e,[J,te])&&d&&d(e)},title:e,...m,children:[(0,l.jsx)(g,{complete:a,current:r,description:t,invalid:o,prefix:f}),(0,l.jsxs)("div",{className:`${f}--progress-text`,children:[(0,l.jsx)(h,{as:"span",className:`${f}--progress-label`,children:e}),null!=s?(0,l.jsx)(h,{as:"span",className:`${f}--progress-optional`,children:s}):null]}),(0,l.jsx)("span",{className:`${f}--assistive-text`,children:x}),(0,l.jsx)("span",{className:`${f}--progress-line`})]})})}vs.propTypes={children:m().node,className:m().string,currentIndex:m().number,onChange:m().func,spaceEqually:m().bool,vertical:m().bool},ys.propTypes={className:m().string,complete:m().bool,current:m().bool,description:m().string,disabled:m().bool,index:m().number,invalid:m().bool,label:m().node.isRequired,onClick:m().func,overflowTooltipProps:m().object,secondaryLabel:m().string,tooltipId:m().string,translateWithId:m().func},(0,a.createContext)(null);const $s=a.forwardRef((e,t)=>{const{children:n,className:r,decorator:o,defaultSelected:s,disabled:c,helperText:d,invalid:p=!1,invalidText:m,labelPosition:f="right",legendText:b,name:g,onChange:x=()=>{},orientation:v="horizontal",readOnly:y,valueSelected:$,warn:w=!1,warnText:N,slug:T,required:_,...C}=e,k=i(),[I,S]=(0,a.useState)($??s),E=(0,a.useRef)($),R=j();function O(e,t,n){y||e!==I&&(S(e),x(e,g,n))}(0,a.useEffect)(()=>{$!==E.current&&(S($),E.current=$)},[$]);const D=!y&&!c&&!p&&w,A=!p&&!c&&!w,L=u()(`${k}--form-item`,r),M=u()(`${k}--radio-button-group`,{[`${k}--radio-button-group--${v}`]:"vertical"===v,[`${k}--radio-button-group--label-${f}`]:f,[`${k}--radio-button-group--readonly`]:y,[`${k}--radio-button-group--invalid`]:!y&&!c&&p,[`${k}--radio-button-group--warning`]:D,[`${k}--radio-button-group--slug`]:T,[`${k}--radio-button-group--decorator`]:o}),P=u()(`${k}--form__helper-text`,{[`${k}--form__helper-text--disabled`]:c}
2),B=ut(d),F=B?`radio-button-group-helper-text-${R}`:void 0,z=B&&(0,l.jsx)("div",{id:F,className:P,children:d}),q=(0,a.useRef)(null),H=(0,a.useRef)(null),K=T??o,V=G(K,Ze)?(0,a.cloneElement)(K,{size:"mini",kind:"default"}):K;return ft(H,"The RadioButtonGroup component `legendText` prop must have no interactive content"),(0,l.jsxs)("div",{className:L,ref:At(q,t),children:[(0,l.jsxs)("fieldset",{className:M,disabled:c,"data-invalid":!!p||void 0,"aria-describedby":A&&B?F:void 0,...C,children:[b&&(0,l.jsx)(h,{as:"legend",className:`${k}--label`,ref:H,children:b}),b&&T?V:b&&o?(0,l.jsx)("div",{className:`${k}--radio-button-group-inner--decorator`,children:V}):null,a.Children.map(n,e=>{if(!G(e,_a))return e;const t={name:g,key:e.props.value,value:e.props.value,onChange:O,checked:e.props.value===I,required:_};return!I&&e.props.checked&&(t.checked=!0),(0,a.cloneElement)(e,t)})]}),(0,l.jsxs)("div",{className:`${k}--radio-button__validation-msg`,children:[!y&&!c&&p&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pt.BF,{className:`${k}--radio-button__invalid-icon`}),(0,l.jsx)("div",{className:`${k}--form-requirement`,children:m})]}),D&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)(pt.OR,{className:`${k}--radio-button__invalid-icon ${k}--radio-button__invalid-icon--warning`}),(0,l.jsx)("div",{className:`${k}--form-requirement`,children:N})]})]}),A&&z]})});$s.propTypes={children:m().node,className:m().string,decorator:m().node,defaultSelected:m().oneOfType([m().string,m().number]),disabled:m().bool,helperText:m().node,invalid:m().bool,invalidText:m().node,labelPosition:m().oneOf(["left","right"]),legendText:m().node,name:m().string.isRequired,onChange:m().func,orientation:m().oneOf(["horizontal","vertical"]),readOnly:m().bool,required:m().bool,slug:I(m().node,"The `slug` prop has been deprecated and will be removed in the next major version. Use the decorator prop instead."),valueSelected:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node},$s.displayName="RadioButtonGroup";const ws=({className:e,...t})=>{const n=i(),r=u()({[`${n}--skeleton__placeholder`]:!0},e);return(0,l.jsx)("div",{className:r,...t})};ws.propTypes={className:m().string};var Ns=n(6590);const Ts=Array.from({length:Ns.YK.length-1},(e,t)=>t+1),js=(0,a.forwardRef)((e,t)=>{const{as:n="div",children:r,className:a,gap:o,orientation:s="vertical",...c}=e,d=i(),p=u()(a,{[`${d}--stack-${s}`]:!0,[`${d}--stack-scale-${o}`]:"number"==typeof o}),m={...c.style};return"string"==typeof o&&(m[`--${d}-stack-gap`]=o),(0,l.jsx)(n,{...c,ref:t,className:p,style:m,children:r})});js.displayName="Stack",js.propTypes={as:m().elementType,children:m().node,className:m().string,gap:m().oneOfType([m().string,m().oneOf(Ts)]),orientation:m().oneOf(["horizontal","vertical"])};var _s=n(56991);const Cs=a.createContext(null),ks=a.createContext(null);function Is(e){const{children:t,selection:n,className:r,"aria-label":o="Structured list section",ariaLabel:s,isCondensed:c,isFlush:d,selectedInitialRow:p,...m}=e,f=i(),b=u()(`${f}--structured-list`,{[`${f}--structured-list--selection`]:n,[`${f}--structured-list--condensed`]:c,[`${f}--structured-list--flush`]:d&&!n},r),[h,g]=a.useState(p??null);return(0,l.jsx)(Cs.Provider,{value:h,children:(0,l.jsx)(ks.Provider,{value:g,children:(0,l.jsx)("div",{role:"table",className:b,...m,"aria-label":s||o,children:t})})})}function Ss(e){const{children:t,className:n,...r}=e,a=i(),o=u()(`${a}--structured-list-thead`,n);return(0,l.jsx)("div",{role:"rowgroup",className:o,...r,children:t})}function Es(e){const{children:t,className:n,...r}=e,a=i(),o=u()(`${a}--structured-list-tbody`,n);return(0,l.jsx)("div",{className:o,role:"rowgroup",...r,children:t})}Is.propTypes={"aria-label":m().string,ariaLabel:I(m().string,"This prop syntax has been deprecated. Please use the new `aria-label`."),children:m().node,className:m().string,isCondensed:m().bool,isFlush:m().bool,selection:m().bool,selectedInitialRow:m().string},Ss.propTypes={children:m().node,className:m().string},Es.propTypes={children:m().node,className:m().string,head:m().bool,onKeyDown:m().func};const Rs=a.createContext(null);function Os(e){const{onKeyDown:t,children:n,className:r,head:o,onClick:s,selection:c,id:d,...p}=e,[m,f]=(0,a.useState)(!1),b=j("grid-input"),h=d??b,g=a.useContext(Cs),x=a.useContext(ks),v=i(),y={id:h},$=u()(`${v}--structured-list-row`,{[`${v}--structured-list-row--header-row`]:o,[`${v}--structured-list-row--focused-within`]:m&&!c||m&&c&&(g===h||null===g),[`${v}--structured-list-row--selected`]:g===h},r),w=(0,a.useRef)(null);return Ua(w,()=>{f(!1)}),o?(0,l.jsxs)("div",{role:"row",...p,className:$,children:[c&&(0,l.jsx)(Ds,{head:!0}),n]}):(0,l.jsx)("div",{...p,role:"row",className:$,ref:w,onClick:e=>{x?.(h),s?.(e),c&&f(!0)},onFocus:e=>{(c||e.currentTarget===e.target)&&f(!0)},onBlur:()=>{f(!1)},onKeyDown:t,children:(0,l.jsxs)(Rs.Provider,{value:y,children:[c&&(0,l.jsx)(Ds,{children:g===h?(0,l.jsx)(_s.ly,{className:`${v}--structured-list__icon`}):(0,l.jsx)(_s.a,{className:`${v}--structured-list__icon`})}),n]})})}function Ds(e){const{children:t,className:n,head:r,noWrap:a,...o}=e,s=i(),c=u()({[`${s}--structured-list-th`]:r,[`${s}--structured-list-td`]:!r,[`${s}--structured-list-content--nowrap`]:a},n);return r?(0,l.jsx)(h,{className:c,role:"columnheader",...o,children:t}):(0,l.jsx)(h,{as:"div",className:c,role:"cell",...o,children:t})}function As({rowCount:e=5,className:t,...n}){const r=i(),a=u()(`${r}--skeleton`,`${r}--structured-list`,t),o=new Array(e).fill(null).map((e,t)=>(0,l.jsxs)("div",{className:`${r}--structured-list-row`,children:[(0,l.jsx)("div",{className:`${r}--structured-list-td`}),(0,l.jsx)("div",{className:`${r}--structured-list-td`}),(0,l.jsx)("div",{className:`${r}--structured-list-td`})]},t));return(0,l.jsxs)("div",{className:a,...n,children:[(0,l.jsx)("div",{className:`${r}--structured-list-thead`,children:(0,l.jsxs)("div",{className:`${r}--structured-list-row ${r}--structured-list-row--header-row`,children:[(0,l.jsx)("div",{className:`${r}--structured-list-th`,children:(0,l.jsx)("span",{})}),(0,l.jsx)("div",{className:`${r}--structured-list-th`,children:(0,l.jsx)("span",{})}),(0,l.jsx)("div",{className:`${r}--structured-list-th`,children:(0,l.jsx)("span",{})})]})}),(0,l.jsx)("div",{className:`${r}--structured-list-tbody`,children:o})]})}Os.propTypes={children:m().node,className:m().string,head:m().bool,label:I(m().bool,"\nThe `label` prop is no longer needed and will be removed in the next major version of Carbon."),onClick:m().func,onKeyDown:m().func,selection:m().bool,id:m().string}
2,m().string,I(m().bool,"\nThe prop `defaultChecked` is no longer needed and will be removed in the next major version of Carbon."),m().string,m().string,m().func,m().string,I(m().oneOfType([m().string,m().number]).isRequired,"\nThe prop `value` will be removed in the next major version of Carbon."),Ds.propTypes={children:m().node,className:m().string,head:m().bool,noWrap:m().bool},As.propTypes={className:m().string,rowCount:m().number};const Ls=(e,t=!1)=>{const[n,r]=(0,a.useState)(t);return(0,a.useEffect)(()=>{const t=e=>{r(e.matches)},n=window.matchMedia(e);return n.addEventListener("change",t),r(n.matches),()=>{n.removeEventListener("change",t)}},[e]),n},Ms=(e,{onPress:t,onPressIn:n,onPressOut:r,onLongPress:o,delayLongPressMs:i=500}={})=>{const l=(0,a.useRef)(t),s=(0,a.useRef)(n),c=(0,a.useRef)(r),d=(0,a.useRef)(o),[u,p]=(0,a.useState)(!1),[m,f]=(0,a.useState)(!1),b=(0,a.useRef)({longPress:!1});(0,a.useEffect)(()=>{l.current=t},[t]),(0,a.useEffect)(()=>{s.current=n},[n]),(0,a.useEffect)(()=>{c.current=r},[r]),(0,a.useEffect)(()=>{d.current=o},[o]),(0,a.useEffect)(()=>{const t=e.current;if(!t)return;const n=e=>{p(!0),s.current?.(),e.preventDefault()},r=()=>{p(!1),f(!1),c.current?.(b.current)},a=()=>{p(!1),f(!1),c.current?.(b.current),b.current.longPress=!1},o=()=>{p(!1),f(!1),c.current?.(b.current),b.current.longPress=!1},i=()=>{f(!1),p(!1),l.current?.(b.current),b.current.longPress=!1},d=e=>{e.preventDefault()};return t.addEventListener("pointerdown",n),t.addEventListener("pointerup",r),t.addEventListener("pointercancel",a),t.addEventListener("pointerleave",o),t.addEventListener("click",i),t.addEventListener("contextmenu",d),()=>{t.removeEventListener("pointerdown",n),t.removeEventListener("pointerup",r),t.removeEventListener("pointercancel",a),t.removeEventListener("pointerleave",o),t.removeEventListener("click",i),t.removeEventListener("contextmenu",d)}},[e]),(0,a.useEffect)(()=>{if(u){const e=setTimeout(()=>{p(!1),f(!0)},i);return()=>{clearTimeout(e)}}},[u,i]),(0,a.useEffect)(()=>{if(m)return b.current.longPress=!0,d.current?.()},[m])},Ps=a.createContext({baseId:"",activeIndex:0,defaultSelectedIndex:0,dismissable:!1,onTabCloseRequest(){},setActiveIndex(){},selectedIndex:0,setSelectedIndex(){}}),Bs=a.createContext({index:0,hasSecondaryLabel:!1}),Fs=`(min-width: ${Ns.fi.lg.width})`,zs=`(max-width: ${Ns.fi.md.width})`,qs=a.createContext(0);function Hs({children:e,defaultSelectedIndex:t=0,onChange:n,selectedIndex:r,dismissable:o,onTabCloseRequest:i}){const s=j("ccs");o&&!i&&console.error("dismissable property specified without also providing an onTabCloseRequest property.");const[c,d]=(0,a.useState)(t),[u,p]=it({value:r,defaultValue:t,onChange:e=>n?.({selectedIndex:e})}),m={baseId:s,activeIndex:c,defaultSelectedIndex:t,dismissable:o,onTabCloseRequest:i,setActiveIndex:d,selectedIndex:u,setSelectedIndex:p};return(0,l.jsx)(Ps.Provider,{value:m,children:e})}function Ks({activation:e="automatic","aria-label":t,children:n,className:r,contained:o=!1,fullWidth:s=!1,iconSize:c,leftOverflowButtonProps:d,light:p,rightOverflowButtonProps:m,scrollDebounceWait:f=200,scrollIntoView:b,size:h,...g}){const{activeIndex:x,selectedIndex:y,setSelectedIndex:$,setActiveIndex:w,dismissable:N}=a.useContext(Ps),T=i(),j=(0,a.useRef)(null),_=(0,a.useRef)(null),C=(0,a.useRef)(null),k=(0,a.useRef)(null),I=(0,a.useRef)(null),[E,R]=(0,a.useState)(!1),[O,D]=(0,a.useState)(0),A=(0,a.useCallback)(()=>!!j.current&&"rtl"===getComputedStyle(j.current).direction,[]),L=o&&a.Children.toArray(n).some(e=>G(e,Us)&&void 0!==e.props.secondaryLabel),M=Ls(Fs),P=s&&o&&M&&a.Children.toArray(n).length<9,B=u()(`${T}--tabs`,{[`${T}--tabs--contained`]:o,[`${T}--tabs--light`]:p,[`${T}--tabs__icon--default`]:"default"===c,[`${T}--tabs__icon--lg`]:"lg"===c,[`${T}--layout--size-lg`]:"lg"===c,[`${T}--layout--size-${h}`]:h&&!L&&(o||"sm"===h||"md"===h),[`${T}--tabs--tall`]:L,[`${T}--tabs--full-width`]:P,[`${T}--tabs--dismissable`]:N},r),[F,z]=(0,a.useState)(!!_.current&&O+_.current.clientWidth<_.current.scrollWidth),[q,H]=(0,a.useState)(!1),K=(0,a.useCallback)(()=>{if(!j.current||!_.current)return;const e=_.current.scrollWidth>j.current.clientWidth+1,t=A()?Math.abs(_.current.scrollLeft):_.current.scrollLeft;H(e&&t>0),z(e&&t+_.current.clientWidth+1<_.current.scrollWidth),R(e)},[A]),V=u()(`${T}--tab--overflow-nav-button`,`${T}--tab--overflow-nav-button--previous`,{[`${T}--tab--overflow-nav-button--hidden`]:!q}),W=u()(`${T}--tab--overflow-nav-button`,`${T}--tab--overflow-nav-button--next`,{[`${T}--tab--overflow-nav-button--hidden`]:!F}),U=(0,a.useRef)([]),Y=(0,a.useMemo)(()=>(0,yt.s)(()=>{_.current&&D(_.current.scrollLeft)},f),[f]);(0,a.useEffect)(()=>()=>{Y.cancel()},[Y]);const Q=(0,a.useCallback)(()=>{K(),Y()},[Y,K]);function Z(e){if(E&&_.current&&e){const{width:t}=e.getBoundingClientRect(),n=e.offsetLeft,r=e.offsetLeft+t,a=_.current.scrollLeft+44,o=_.current.scrollLeft+_.current.clientWidth-44;n<a&&D(n-44),r>o&&D(r+44-_.current.clientWidth)}}(0,a.useEffect)(()=>{const e=U.current[y];b&&e&&e.scrollIntoView({block:"nearest",inline:"nearest"})},[]),(0,a.useEffect)(()=>{K()},[n,O,K]),(0,a.useEffect)(()=>
2{if(U.current[y]?.disabled){const e=U.current.filter(e=>!e.disabled);if(e.length>0){const t=e[0];$(U.current.indexOf(t))}}},[]),v(()=>{const e=j.current;if(!e)return;K();const t=new ResizeObserver(()=>{null!==I.current&&cancelAnimationFrame(I.current),I.current=requestAnimationFrame(()=>{I.current=null,K()})});return t.observe(e),()=>{null!==I.current&&(cancelAnimationFrame(I.current),I.current=null),t.disconnect()}},[K]),v(()=>{null!==O&&_.current&&(_.current.scrollLeft=O)},[O]),v(()=>{Z("manual"===e?U.current[x]:U.current[y])},[e,x]),v(()=>{Z(U.current[y])},[y,E,n]),Ms(C,{onPress({longPress:e}){if(!e&&_.current){const e=_.current.scrollWidth/U.current.length*1.5;A()?D(Math.min(O+e,0)):D(Math.max(O-e,0))}},onLongPress:()=>Ws(_,A()?"forward":"backward",D)}),Ms(k,{onPress({longPress:e}){if(!e&&_.current){const e=_.current.scrollWidth/U.current.length*1.5,t=_.current.scrollWidth-_.current.clientWidth;A()?D(Math.max(O-e,-t)):D(Math.min(O+e,t))}},onLongPress:()=>Ws(_,A()?"backward":"forward",D)});const X=A(),J=X?S.c_:S.JG,ee=X?S.JG:S.c_;return(0,l.jsxs)("div",{ref:j,className:B,children:[(0,l.jsx)("button",{"aria-hidden":"true",tabIndex:-1,"aria-label":X?"Scroll right":"Scroll left",ref:C,className:V,type:"button",...d,children:(0,l.jsx)(J,{})}),(0,l.jsx)("div",{...g,"aria-label":t,ref:_,role:"tablist",className:`${T}--tab--list`,onScroll:Q,onKeyDown:function(t){if(ce(t,[ie,ae,re,ne])){t.preventDefault();const n=U.current.filter(e=>null!==e).filter(e=>!e.disabled),r=n.indexOf(U.current["automatic"===e?y:x]),a=U.current.indexOf(n[function(e,t,n){switch(!0){case de(e,ie):return(n+1)%t;case de(e,ae):return(t+n-1)%t;case de(e,re):return 0;case de(e,ne):return t-1;default:return n}}(t,n.length,r)]);"automatic"===e?$(a):"manual"===e&&w(a),U.current[a]?.focus()}},onBlur:function({relatedTarget:t}){_.current?.contains(t)||"manual"===e&&w(y)},children:a.Children.map(n,(e,t)=>(0,a.isValidElement)(e)?(0,l.jsx)(Bs.Provider,{value:{index:t,hasSecondaryLabel:L,contained:o},children:(0,a.cloneElement)(e,{ref:e=>{e&&(U.current[t]=e)}})}):null)}),(0,l.jsx)("button",{"aria-hidden":"true",tabIndex:-1,"aria-label":X?"Scroll left":"Scroll right",ref:k,className:W,type:"button",...m,children:(0,l.jsx)(ee,{})})]})}function Vs({activation:e="automatic","aria-label":t,children:n,className:r,scrollIntoView:o,size:s,...c}){const{activeIndex:d,selectedIndex:p,setSelectedIndex:m,setActiveIndex:f}=a.useContext(Ps),b=i(),h=(0,a.useRef)(null),[g,x]=(0,a.useState)(!1),[v,y]=(0,a.useState)(!1),$=Ls(zs),w=u()(`${b}--tabs`,`${b}--tabs--vertical`,`${b}--tabs--contained`,{[`${b}--layout--size-${s}`]:s},r),N=(0,a.useRef)([]);return(0,a.useEffect)(()=>{if(N.current[p]?.disabled){const e=N.current.filter(e=>!e.disabled);if(e.length>0){const t=e[0];m(N.current.indexOf(t))}}},[]),(0,a.useEffect)(()=>{function e(){const e=h.current?.offsetHeight,t=h.current?.getBoundingClientRect().top,n=N.current[p]?.getBoundingClientRect().top;t&&e&&(n-32<t||n-t+64+32>e)&&h.current?.scrollTo({top:64*(p-1),behavior:"smooth"})}return window.addEventListener("resize",e),e(),()=>{window.removeEventListener("resize",e)}},[p,o]),(0,a.useEffect)(()=>{const e=h.current;if(!e)return;const t=()=>{x(e.scrollTop+e.clientHeight+32<=e.scrollHeight),y(e.scrollTop>32)},n=new ResizeObserver(()=>t());return n.observe(e),e.addEventListener("scroll",t),()=>{n.disconnect(),e.removeEventListener("scroll",t)}}),$?(0,l.jsx)(Ks,{...c,"aria-label":t,contained:!0,size:"xl"===s?"lg":s,children:n}):(0,l.jsxs)("div",{className:w,children:[v&&(0,l.jsx)("div",{className:`${b}--tab--list-gradient_top`}),(0,l.jsx)("div",{...c,"aria-label":t,ref:h,role:"tablist",className:`${b}--tab--list`,onKeyDown:function(t){if(ce(t,[le,oe,re,ne])){t.preventDefault();const n=N.current.filter(e=>null!==e).filter(e=>!e.disabled),r=n.indexOf(N.current["automatic"===e?p:d]),a=N.current.indexOf(n[function(e,t,n){switch(!0){case de(e,le):return(n+1)%t;case de(e,oe):return(t+n-1)%t;case de(e,re):return 0;case de(e,ne):return t-1;default:return n}}(t,n.length,r)]);"automatic"===e?m(a):"manual"===e&&f(a),N.current[a]?.focus()}},onBlur:function({relatedTarget:t}){h.current?.contains(t)||"manual"===e&&f(p)},children:a.Children.map(n,(e,t)=>(0,a.isValidElement)(e)?(0,l.jsx)(Bs.Provider,{value:{index:t,hasSecondaryLabel:!1},children:(0,a.cloneElement)(e,{ref:e=>{e&&(N.current[t]=e)}})}):null)}),g&&(0,l.jsx)("div",{className:`${b}--tab--list-gradient_bottom`})]})}function Ws(e,t,n){const r=e.current;if(!r)return()=>{};const a=r?.style["scroll-behavior"];r.style["scroll-behavior"]="auto";const o="forward"===t?5:-5;let i=null;return i=requestAnimationFrame(function e(){r&&(r.scrollLeft=r.scrollLeft+o,i=requestAnimationFrame(e))}),()=>{r.style["scroll-behavior"]=a,n(r.scrollLeft),i&&cancelAnimationFrame(i)}}Hs.propTypes={children:m().node,defaultSelectedIndex:m().number,dismissable:m().bool,onCh
2ange:m().func,onTabCloseRequest:e=>{if(e.dismissable&&!e.onTabCloseRequest)return new Error("dismissable property specified without also providing an onTabCloseRequest property.")},selectedIndex:m().number},m().node,m().number,m().string,m().func,m().number,Ks.propTypes={activation:m().oneOf(["automatic","manual"]),"aria-label":m().string,children:m().node,className:m().string,contained:m().bool,fullWidth:m().bool,iconSize:m().oneOf(["default","lg"]),leftOverflowButtonProps:m().object,light:I(m().bool,"The `light` prop for `TabList` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),rightOverflowButtonProps:m().object,scrollDebounceWait:m().number,scrollIntoView:m().bool,size:m().oneOf(["sm","md","lg"])},Vs.propTypes={activation:m().oneOf(["automatic","manual"]),"aria-label":m().string,children:m().node,className:m().string,size:m().oneOf(["sm","md","lg","xl"])};const Us=(0,a.forwardRef)(({as:e="button",children:t,className:n,disabled:r,onClick:o,onKeyDown:s,secondaryLabel:c,renderIcon:d,...p},m)=>{const f=i(),{selectedIndex:b,setSelectedIndex:g,baseId:x,dismissable:y,onTabCloseRequest:$}=a.useContext(Ps),{index:w,hasSecondaryLabel:N,contained:T}=a.useContext(Bs),{badgeIndicator:j}=a.useContext(Gs)||{},_=(0,a.useRef)(null),C=(0,a.useRef)(null),k=Y([m,C]),[I,E]=(0,a.useState)(!1),R=`${x}-tab-${w}`,O=`${x}-tabpanel-${w}`,[D,A]=(0,a.useState)(!1),L=u()(`${f}--tabs__nav-item`,`${f}--tabs__nav-link`,{[`${f}--tabs__nav-item--selected`]:b===w,[`${f}--tabs__nav-item--disabled`]:r,[`${f}--tabs__nav-item--hover-off`]:I},n),M=e;Q(_,"mouseover",e=>{T&&C.current&&(e.stopPropagation(),E(!0),C.current.classList.add(`${f}--tabs__nav-item--hover-off`))}),Q(_,"mouseleave",()=>{T&&C.current&&(C.current.classList.remove(`${f}--tabs__nav-item--hover-off`),E(!1))}),v(()=>{function e(){const e=document.getElementById(`${R}`)||C.current;if(e?.closest(`.${f}--tabs--vertical`)){const n=e?.getElementsByClassName(`${f}--tabs__nav-item-label`)[0];A((t=n).offsetHeight<t.scrollHeight),t.offsetHeight,t.scrollHeight}var t}return e(),window.addEventListener("resize",e),()=>{window.removeEventListener("resize",e)}},[f,R]);const P=e=>{if(e.stopPropagation(),$?.(w),C.current&&C.current.parentElement){const e=Array.from(C.current.parentElement.childNodes).filter(e=>e instanceof HTMLElement&&e.classList.contains(`${f}--tabs__nav-link`)&&!e.classList.contains(`${f}--tabs__nav-item--disabled`)).length;if(C.current&&w+1!==e)C.current.focus();else{const t=2*(e-2),n=C.current.parentElement.childNodes[t];n instanceof HTMLElement&&n.focus()}}},B=e=>{y&&de(e,se)&&P(e),s?.(e)},F=(0,l.jsx)("div",{className:u()({[`${f}--tabs__nav-item--close`]:y,[`${f}--tabs__nav-item--close--hidden`]:!y}),children:(0,l.jsx)("button",{type:"button",tabIndex:-1,"aria-disabled":r,"aria-hidden":b===w&&y?"false":"true",disabled:r,className:u()({[`${f}--tabs__nav-item--close-icon`]:y,[`${f}--visually-hidden`]:!y,[`${f}--tabs__nav-item--close-icon--selected`]:b===w,[`${f}--tabs__nav-item--close-icon--disabled`]:r}),onClick:P,title:`Remove ${"string"==typeof t?t:""} tab`,ref:_,children:(0,l.jsx)(S.bm,{"aria-hidden":b===w&&y?"false":"true","aria-label":`Press delete to remove ${"string"==typeof t?t:""} tab`})})}),z=d??y;return D?(0,l.jsx)(Ie,{label:t,align:"top",leaveDelayMs:0,autoAlign:!0,onMouseEnter:()=>!1,closeOnActivation:!0,children:(0,l.jsxs)(M,{...p,"aria-controls":O,"aria-disabled":r,"aria-selected":b===w,ref:k,id:R,role:"tab",className:L,disabled:r,title:t,onClick:e=>{r||(g(w),o?.(e))},onKeyDown:B,tabIndex:b===w?"0":"-1",type:"button",children:[(0,l.jsx)("div",{className:`${f}--tabs__nav-item-label-wrapper`,children:(0,l.jsx)(h,{className:`${f}--tabs__nav-item-label`,children:t})}),N&&c&&(0,l.jsx)(h,{as:"div",className:`${f}--tabs__nav-item-secondary-label`,title:c,children:c})]})}):(0,l.jsxs)(l.Fragment,{children:[(0,l.jsxs)(M,{...p,"aria-controls":O,"aria-disabled":r,"aria-selected":b===w,ref:k,id:R,role:"tab",className:L,disabled:r,onClick:e=>{r||(g(w),o?.(e))},onKeyDown:B,tabIndex:b===w?"0":"-1",type:"button",children:[(0,l.jsxs)("div",{className:`${f}--tabs__nav-item-label-wrapper`,children:[y&&d&&(0,l.jsx)("div",{className:`${f}--tabs__nav-item--icon-left`,children:(0,l.jsx)(d,{size:16})}),(0,l.jsx)(h,{className:`${f}--tabs__nav-item-label`,children:t}),!y&&d&&(0,l.jsx)("div",{className:u()(`${f}--tabs__nav-item--icon`,{[`${f}--visually-hidden`]:!z}),children:!y&&d&&(0,l.jsx)(d,{size:16})})]}),N&&c&&(0,l.jsx)(h,{as:"div",className:`${f}--tabs__nav-item-secondary-label`,title:c,children:c}),!r&&j&&(0,l.jsx)(Ee,{})]}),F]})});
2Us.displayName="Tab",Us.propTypes={as:m().oneOfType([m().string,m().elementType]),children:m().node,className:m().string,disabled:m().bool,onClick:m().func,onKeyDown:m().func,renderButton:m().func,renderIcon:m().oneOfType([m().func,m().object]),secondaryLabel:m().string};const Gs=(0,a.createContext)(!1),Ys=a.forwardRef(({badgeIndicator:e,children:t,className:n,defaultOpen:r=!1,enterDelayMs:o,leaveDelayMs:s,label:c,...d},p)=>{const m=i(),f=(0,a.useMemo)(()=>({badgeIndicator:e}),[e]),b=(0,a.isValidElement)(t)&&(20===t.props.size||"20"===t.props.size),h=u()(`${m}--tabs__nav-item--icon-only`,n,{[`${m}--tabs__nav-item--icon-only__20`]:b});return(0,l.jsx)(Gs.Provider,{value:f,children:(0,l.jsx)(Ie,{align:"bottom",defaultOpen:r,className:`${m}--icon-tooltip`,enterDelayMs:o,label:c,leaveDelayMs:s??0,children:(0,l.jsx)(Us,{className:h,ref:p,...d,children:t})})})});Ys.displayName="IconTab",Ys.propTypes={badgeIndicator:m().bool,children:m().node,className:m().string,defaultOpen:m().bool,enterDelayMs:m().number,label:m().node.isRequired,leaveDelayMs:m().number};const Qs=a.forwardRef(({children:e,className:t,...n},r)=>{const o=i(),{selectedIndex:s,baseId:c}=a.useContext(Ps),d=a.useContext(qs),p=`${c}-tabpanel-${d}`,m=`${c}-tab-${d}`,f=u()(`${o}--tab-content`,t);return(0,l.jsx)("div",{...n,"aria-labelledby":m,id:p,className:f,ref:r,role:"tabpanel",hidden:s!==d,children:e})});function Zs({children:e}){const t=i(),n=(0,a.useRef)([]),r=(0,a.useRef)([]);return v(()=>{const e=n.current[0]?.previousElementSibling,a=e?.classList.contains(`${t}--tabs--vertical`),o=e?.parentElement?.style.height;if(a&&!o){r.current=n.current.map(e=>e?.hasAttribute("hidden")||!1),n.current.forEach(e=>{e&&(e.hidden=!1)});const t=n.current.map(e=>e?.offsetHeight||0),a=Math.max(...t);e instanceof HTMLElement&&(e.style.height=a+"px"),n.current.forEach((e,t)=>{e&&(e.hidden=r.current[t])})}}),(0,l.jsx)(l.Fragment,{children:a.Children.map(e,(e,t)=>(0,a.isValidElement)(e)?(0,l.jsx)(qs.Provider,{value:t,children:(0,a.cloneElement)(e,{ref:e=>{n.current[t]=e}})}):null)})}Qs.displayName="TabPanel",Qs.propTypes={children:m().node,className:m().string},Zs.propTypes={children:m().node};const Xs=(e,t,n="character",r="characters")=>{if(void 0===t)return null;const a=t-e;return a<=10&&a>0?`${a} ${1===a?n:r} left.`:a<=0?`Maximum ${r} reached.`:null},Js=(0,a.forwardRef)((e,t)=>{const{className:n,decorator:r,disabled:o=!1,id:s,labelText:c,hideLabel:d,onChange:p=dt,onClick:m=dt,onKeyDown:f=dt,invalid:b=!1,invalidText:g="",helperText:x,light:y,placeholder:$="",enableCounter:w=!1,maxCount:N,counterMode:T="character",warn:_=!1,warnText:C="",rows:k=4,slug:I,...S}=e,E=i(),{isFluid:R}=(0,a.useContext)(Pt),{defaultValue:O,value:D}=S,A=j(),L=(0,a.useRef)(null),M=(0,a.useRef)(null),P=(0,a.useRef)(null),B=(0,a.useRef)(null),F=(0,a.useRef)(null),z=(0,a.useRef)(null),q=Y([t,M]);function H(){const e=(O||D||M.current?.value||"").toString();return"character"===T?e.length:e.match(/\p{L}+/gu)?.length||0}const[K,V]=(0,a.useState)(H());(0,a.useEffect)(()=>{V(H())},[D,O,T]),v(()=>{if(S.cols&&M.current?(M.current.style.width="",M.current.style.resize="none"):M.current&&(M.current.style.width="100%"),!L.current)return;const e=new ResizeObserver(([e])=>{var t;t=e.contentRect.width,[B,F,z].forEach(e=>{e.current&&(e.current.style.maxWidth=`${t}px`,e.current.style.overflowWrap="break-word")})});return e.observe(L.current),()=>e&&e.disconnect()},[S.cols,b,_]);const W={id:s,onKeyDown:e=>{if(!o&&w&&"word"===T){const t=e.which;(N&&K>=N&&32===t||N&&K>=N&&13===t)&&e.preventDefault()}!o&&f&&f(e)},onPaste:e=>{if(!o&&"word"===T&&w&&void 0!==N&&null!==M.current){const t=M.current.value.match(/\p{L}+/gu)||[],n=e.clipboardData.getData("Text").match(/\p{L}+/gu)||[];if(t.length+n.length>N){e.preventDefault();const r=t.concat(n).slice(0,N);setTimeout(()=>{V(N)},0),M.current.value=r.join(" ")}}},onChange:e=>{if(!o){if("character"==T)e?.persist?.(),setTimeout(()=>{V(e.target?.value?.length)},0);else if("word"==T)if(e.target.value){if(w&&void 0!==N&&null!==M.current){const t=e.target?.value?.match(/\p{L}+/gu);t&&t.length<=N?(M.current.removeAttribute("maxLength"),setTimeout(()=>{V(t.length)},0)):t&&t.length>N&&setTimeout(()=>{V(t.length)},0)}}else setTimeout(()=>{V(0)},0);p&&p(e)}},onClick:e=>{!o&&m&&m(e)}},U=u()(`${E}--form-item`,n),Q=u()(`${E}--text-area__wrapper`,{[`${E}--text-area__wrapper--cols`]:S.cols,[`${E}--text-area__wrapper--readonly`]:S.readOnly,[`${E}--text-area__wrapper--warn`]:_,[`${E}--text-area__wrapper--slug`]:I,[`${E}--text-area__wrapper--decorator`]:r}),Z=u()(`${E}--label`,{[`${E}--visually-hidden`]:d&&!R,[`${E}--label--disabled`]:o}),X=u()(`${E}--text-area`,{[`${E}--text-area--light`]:y,[`${E}--text-area--invalid`]:b,[`${E}--text-area--warn`]:_}),J=u()(`${E}--label`,{[`${E}--label--disabled`]:o,[`${E}--text-area__label-counter`]:!0}),ee=u()(`${E}--form__helper-text`,{[`${E}--form__helper-text--disabled`]:o}),te=null!=c&&(0,l.jsx)(h,{as:"label",htmlFor:s,className:Z,ref:P,children:c});ft(P,"The TextArea component `labelText` prop must have no interactive content");const ne=w&&N&&("character"===T||"word"===T)?(0,l.jsx)(h,{as:"div",className:J,"aria-hidden":"true",children:`${K}/${N}`}):null,re=w&&N?`${s}
2-counter-desc`:void 0,ae=ut(x),oe=ae?`text-area-helper-text-${A}`:void 0,ie=ae&&(0,l.jsx)(h,{as:"div",id:oe,className:ee,ref:B,children:x}),le=s+"-error-msg",se=b?(0,l.jsxs)(h,{as:"div",role:"alert",className:`${E}--form-requirement`,id:le,ref:F,children:[g,R&&(0,l.jsx)(pt.BF,{className:`${E}--text-area__invalid-icon`})]}):null,ce=s+"-warn-msg",de=_?(0,l.jsxs)(h,{as:"div",role:"alert",className:`${E}--form-requirement`,id:ce,ref:z,children:[C,R&&(0,l.jsx)(pt.OR,{className:`${E}--text-area__invalid-icon ${E}--text-area__invalid-icon--warning`})]}):null;let ue,pe;if(b)pe=le;else if(_&&!R)ue=ce;else{const e=[];!R&&ae&&oe&&e.push(oe),re&&e.push(re),ue=e.length>0?e.join(" "):void 0}w&&"character"==T&&(W.maxLength=N);const me=(0,a.useRef)(null),[fe,be]=(0,a.useState)(""),he=Xs(K,N,"word"===T?"word":void 0,"word"===T?"words":void 0);(0,a.useEffect)(()=>{if(he&&he!==fe){const e=me.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=he,be(he))},"word"===T?2e3:1e3);return()=>{t&&clearTimeout(t)}}}},[he,fe,T]);const ge=(0,l.jsx)("textarea",{...S,...W,placeholder:$,"aria-readonly":S.readOnly,className:X,"aria-invalid":b,"aria-describedby":ue,"aria-errormessage":pe,disabled:o,rows:k,readOnly:S.readOnly,ref:q}),xe=I??r,ve=G(xe,Ze)?(0,a.cloneElement)(xe,{size:"mini"}):xe;return(0,l.jsxs)("div",{className:U,children:[(0,l.jsxs)("div",{className:`${E}--text-area__label-wrapper`,children:[te,ne]}),w&&N&&(0,l.jsx)("span",{id:re,className:`${E}--visually-hidden`,children:"word"===T?`Word limit ${N}`:`Character limit ${N}`}),(0,l.jsxs)("div",{ref:L,className:Q,"data-invalid":b||null,children:[b&&!R&&(0,l.jsx)(pt.BF,{className:`${E}--text-area__invalid-icon`}),_&&!b&&!R&&(0,l.jsx)(pt.OR,{className:`${E}--text-area__invalid-icon ${E}--text-area__invalid-icon--warning`}),ge,I?ve:r?(0,l.jsx)("div",{className:`${E}--text-area__inner-wrapper--decorator`,children:ve}):"",(0,l.jsx)("span",{className:`${E}--text-area__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:me,children:he}),R&&(0,l.jsx)("hr",{className:`${E}--text-area__divider`}),R&&b?se:null,R&&_&&!b?de:null]}),b||_||R?null:ie,b&&!R?se:null,!_||b||R?null:de]})});Js.displayName="TextArea",Js.propTypes={className:m().string,cols:m().number,counterMode:m().oneOf(["character","word"]),decorator:m().node,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,enableCounter:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:I(m().bool,"The `light` prop for `TextArea` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),maxCount:m().number,onChange:m().func,onClick:m().func,onKeyDown:m().func,placeholder:m().string,readOnly:m().bool,rows:m().number,slug:I(m().node,"The `slug` prop for `TextArea` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release."),value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node};const ec=(0,a.forwardRef)(({className:e,decorator:t,disabled:n=!1,helperText:r,hideLabel:o,id:s,inline:c=!1,invalid:d=!1,invalidText:p,labelText:m,light:f,onChange:b=()=>{},onClick:g=()=>{},placeholder:x,readOnly:v,size:y,type:$="text",warn:w=!1,warnText:N,enableCounter:T=!1,maxCount:j,slug:_,...C},k)=>{const I=i(),{defaultValue:S,value:E}=C,R=(0,a.useRef)(null),O=(0,a.useRef)(null),D=Y([k,R]);function A(){return(S||E||R.current?.value||"").toString().length}const[L,M]=(0,a.useState)(A());(0,a.useEffect)(()=>{M(A())},[E,S,T]);const P=mt({id:s,readOnly:v,disabled:n,invalid:d,invalidText:p,warn:w,warnText:N}),B={id:s,onChange:e=>{P.disabled||(M(e.target.value?.length),b(e))},onClick:e=>{P.disabled||g(e)},placeholder:x,type:$,ref:D,className:u()(`${I}--text-input`,{[`${I}--text-input--light`]:f,[`${I}--text-input--invalid`]:P.invalid,[`${I}--text-input--warning`]:P.warn,[`${I}--text-input--${y}`]:y,[`${I}--layout--size-${y}`]:y}),title:x,disabled:P.disabled,readOnly:v,"aria-describedby":ut(r)&&!P.invalid?P.helperId:void 0,...C};T&&(B.maxLength=j);const F=u()([u()(`${I}--form-item`,e)],`${I}--text-input-wrapper`,{[`${I}--text-input-wrapper--readonly`]:v,[`${I}--text-input-wrapper--light`]:f,[`${I}--text-input-wrapper--inline`]:c,[`${I}--text-input-wrapper--inline--invalid`]:c&&P.invalid}),z=u()(`${I}--label`,{[`${I}--visually-hidden`]:o,[`${I}--label--disabled`]:P.disabled,[`${I}--label--inline`]:c,[`${I}--label--inline--${y}`]:c&&!!y}),q=u()(`${I}--form__helper-text`,{[`${I}--form__helper-text--disabled`]:P.disabled,[`${I}--form__helper-text--inline`]:c}),H=u()(`${I}--text-input__field-outer-wrapper`,{[`${I}--text-input__field-outer-wrapper--inline`]:c}),K=u()(`${I}--text-input__field-wrapper`,{[`${I}--text-input__field-wrapper--warning`]:P.warn,[`${I}--text-input__field-wrapper--slug`]:_,[`${I}--text-input__field-wrapper--decorator`]:t}),V=u()({[`${I}
2--text-input__invalid-icon`]:P.invalid||P.warn,[`${I}--text-input__invalid-icon--warning`]:P.warn}),W=u()(`${I}--label`,{[`${I}--label--disabled`]:n,[`${I}--text-input__label-counter`]:!0}),U=T&&j?(0,l.jsx)(h,{as:"div",className:W,children:`${L}/${j}`}):null,Q=null!=m&&(0,l.jsx)(h,{as:"label",htmlFor:s,className:z,ref:O,children:m});ft(O,"The TextInput component `labelText` prop must have no interactive content");const Z=(0,l.jsxs)("div",{className:`${I}--text-input__label-wrapper`,children:[Q,U]}),X=ut(r)&&(0,l.jsx)(h,{as:"div",id:P.helperId,className:q,children:r}),J=(0,l.jsx)("input",{...ds({sharedTextInputProps:B,invalid:P.invalid,invalidId:P.invalidId,warn:P.warn,warnId:P.warnId})}),{isFluid:ee}=(0,a.useContext)(Pt),te=(0,a.useRef)(null),[ne,re]=(0,a.useState)(""),ae=Xs(L,j);(0,a.useEffect)(()=>{if(ae&&ae!==ne){const e=te.current;if(e){e.textContent="";const t=setTimeout(()=>{e&&(e.textContent=ae,re(ae))},1e3);return()=>{t&&clearTimeout(t)}}}},[ae,ne]);const oe=P.icon,ie=_??t,le=G(ie,Ze)?(0,a.cloneElement)(ie,{size:"mini"}):ie;return(0,l.jsxs)("div",{className:F,children:[c?(0,l.jsx)("div",{className:`${I}--text-input__label-helper-wrapper`,children:Z}):Z,(0,l.jsxs)("div",{className:H,children:[(0,l.jsxs)("div",{className:K,"data-invalid":P.invalid||null,children:[J,oe&&(0,l.jsx)(oe,{className:V}),_?le:t?(0,l.jsx)("div",{className:`${I}--text-input__field-inner-wrapper--decorator`,children:le}):"",(0,l.jsx)("span",{className:`${I}--text-input__counter-alert`,role:"alert","aria-live":"assertive","aria-atomic":"true",ref:te,children:ae}),ee&&(0,l.jsx)("hr",{className:`${I}--text-input__divider`}),ee&&!c&&P.validation]}),!ee&&!c&&(P.validation||X)]}),c&&!ee&&(0,l.jsx)("div",{className:`${I}--text-input__label-helper-wrapper`,children:P.validation||X})]})});ec.displayName="TextInput",ec.propTypes={className:m().string,decorator:m().node,defaultValue:m().oneOfType([m().string,m().number]),disabled:m().bool,enableCounter:m().bool,helperText:m().node,hideLabel:m().bool,id:m().string.isRequired,inline:m().bool,invalid:m().bool,invalidText:m().node,labelText:m().node.isRequired,light:I(m().bool,"The `light` prop for `TextInput` has been deprecated in favor of the new `Layer` component. It will be removed in the next major release."),maxCount:m().number,onChange:m().func,onClick:m().func,placeholder:m().string,readOnly:m().bool,size:m().oneOf(["xs","sm","md","lg"]),slug:I(m().node,"The `slug` prop for `TextInput` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release."),type:m().string,value:m().oneOfType([m().string,m().number]),warn:m().bool,warnText:m().node};const tc=a.forwardRef(({children:e,className:t,decorator:n,light:r=!1,slug:a,hasRoundedCorners:o=!1,...s},c)=>{const d=i(),p=u()(`${d}--tile`,{[`${d}--tile--light`]:r,[`${d}--tile--slug`]:a,[`${d}--tile--slug-rounded`]:a&&o,[`${d}--tile--decorator`]:n,[`${d}--tile--decorator-rounded`]:n&&o},t);return(0,l.jsxs)("div",{className:p,ref:c,...s,children:[e,a,n&&(0,l.jsx)("div",{className:`${d}--tile--inner-decorator`,children:n})]})});tc.displayName="Tile",tc.propTypes={children:m().node,className:m().string,decorator:m().node,hasRoundedCorners:m().bool,light:I(m().bool,"The `light` prop for `Tile` is no longer needed and has been deprecated. It will be removed in the next major release. Use the Layer component instead."),slug:I(m().node,"The `slug` prop for `Tile` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release.")};const nc=a.forwardRef(({children:e,className:t,clicked:n=!1,decorator:r,disabled:o,href:s,light:c,onClick:d=()=>{},onKeyDown:p=()=>{}
2,renderIcon:m,hasRoundedCorners:f,slug:b,...h},g)=>{const x=i(),v=u()(`${x}--tile`,`${x}--tile--clickable`,{[`${x}--tile--is-clicked`]:n,[`${x}--tile--light`]:c,[`${x}--tile--slug`]:b,[`${x}--tile--slug-rounded`]:b&&f,[`${x}--tile--decorator`]:r,[`${x}--tile--decorator-rounded`]:r&&f},t),y=V("enable-v12-tile-default-icons");y&&(m||(m=fa.Qp),o&&(m=Un.$D));const $=u()({[`${x}--tile--icon`]:!y||y&&!o,[`${x}--tile--disabled-icon`]:y&&o}),w=a.isValidElement(r),N=(0,l.jsxs)(B,{className:v,href:s,tabIndex:s||o?void 0:0,onClick:o?void 0:function(e){e?.persist?.(),d(e)},onKeyDown:function(e){e?.persist?.(),!s&&ce(e,[J,te])&&(e.preventDefault(),d(e)),p(e)},ref:g,disabled:o,...h,children:[b||r?(0,l.jsx)("div",{className:`${x}--tile-content`,children:e}):e,(!0===b||!0===r)&&(0,l.jsx)(qr.bE,{size:"24",className:`${x}--tile--ai-label-icon`}),m&&(0,l.jsx)(m,{className:$,"aria-hidden":"true"})]});return w?(0,l.jsxs)("div",{className:`${x}--clickable-tile__wrapper`,children:[N,(0,l.jsx)("div",{className:`${x}--tile--inner-decorator`,children:r})]}):N});nc.displayName="ClickableTile",nc.propTypes={children:m().node,className:m().string,clicked:m().bool,decorator:m().oneOfType([m().bool,m().node]),disabled:m().bool,hasRoundedCorners:m().bool,href:m().string,light:I(m().bool,"The `light` prop for `ClickableTile` is no longer needed and has been deprecated. It will be removed in the next major release. Use the Layer component instead."),onClick:m().func,onKeyDown:m().func,rel:m().string,renderIcon:m().oneOfType([m().func,m().object])};const rc=a.forwardRef(({children:e,className:t,decorator:n,disabled:r,id:o,light:s,onClick:c=()=>{},onChange:d=()=>{},onKeyDown:p=()=>{},selected:m=!1,tabIndex:f=0,title:b,slug:g,hasRoundedCorners:x,...v},y)=>{const $=i(),w=c,N=p,[T,j]=(0,a.useState)(m);(0,a.useEffect)(()=>{j(m)},[m]);const _=u()(`${$}--tile`,`${$}--tile--selectable`,{[`${$}--tile--is-selected`]:T,[`${$}--tile--light`]:s,[`${$}--tile--disabled`]:r,[`${$}--tile--slug`]:g,[`${$}--tile--slug-rounded`]:g&&x,[`${$}--tile--decorator`]:n,[`${$}--tile--decorator-rounded`]:n&&x},t),C=(0,a.useCallback)((e,t)=>{j(t),d(e,t,o)},[d,o]),k=(0,a.useRef)(null),I=g??n,E=G(I,Ze)?(0,a.cloneElement)(I,{size:"xs"}):I,R=u()(`${$}--selectable-tile__wrapper`,{[`${$}--selectable-tile__wrapper--slug`]:g,[`${$}--selectable-tile__wrapper--decorator`]:n}),O=g?E:n?(0,l.jsx)("div",{className:`${$}--tile--inner-decorator`,children:E}):null;ft(k,"The SelectableTile component `children` prop must have no interactive content");const D=(0,l.jsxs)("div",{className:_,onClick:r?void 0:function(e){e.preventDefault(),e?.persist?.(),C(e,!T),w(e)},role:"checkbox","aria-checked":T,onKeyDown:r?void 0:function(e){e?.persist?.(),ce(e,[J,te])&&(e.preventDefault(),C(e,!T)),N(e)},tabIndex:r?void 0:f,ref:y,id:o,title:b,...v,children:[(0,l.jsx)("span",{className:`${$}--tile__checkmark ${$}--tile__checkmark--persistent`,children:T?(0,l.jsx)(S.NW,{}):(0,l.jsx)(S.Sc,{})}),(0,l.jsx)(h,{as:"label",htmlFor:o,className:`${$}--tile-content`,ref:k,children:e})]});return O?(0,l.jsxs)("div",{className:R,children:[D,O]}):D});rc.displayName="SelectableTile",rc.propTypes={children:m().node,className:m().string,decorator:m().node,disabled:m().bool,hasRoundedCorners:m().bool,id:m().string,light:I(m().bool,"The `light` prop for `SelectableTile` is no longer needed and has been deprecated. It will be removed in the next major release. Use the Layer component instead."),name:I(m().string,"The `name` property is no longer used.  It will be removed in the next major release."),onChange:m().func,onClick:m().func,onKeyDown:m().func,selected:m().bool,slug:I(m().node,"The `slug` prop for `SelectableTile` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release."),tabIndex:m().number,title:m().string,value:I(m().oneOfType([m().string,m().number]),"The `value` property is no longer used.  It will be removed in the next major release.`")};const ac=(0,a.forwardRef)(({tabIndex:e=0,className:t,children:n,decorator:r,expanded:o=!1,tileMaxHeight:s=0,tilePadding:c=0,onClick:d,onKeyUp:p,tileCollapsedIconText:m="Interact to expand Tile",tileExpandedIconText:f="Interact to collapse Tile",tileCollapsedLabel:b,tileExpandedLabel:h,light:g,slug:x,hasRoundedCorners:y,...$},w)=>{const[N,T]=(0,a.useState)(0),[_,C]=(0,a.useState)(0),[k,I]=(0,a.useState)(o),[E,R]=(0,a.useState)(!0),O=(0,a.useRef)(null),D=(0,a.useRef)(null),A=(0,a.useRef)(null),L=(0,a.useRef)(null),M=(0,a.useRef)(null),P=Y([w,M]),B=i();(0,a.useEffect)(()=>{I(o)},[o]);const F=()=>{I(e=>!e)},z=e=>{e.target!==M.current&&e.target!==A.current&&ce(e,[J,te])&&e.preventDefault()},q=u()(`${B}--tile`,`${B}--tile--expandable`,{[`${B}--tile--is-expanded`]:k,[`${B}--tile--light`]:g},t),H=u()(q,`${B}--tile--expandable--interactive`,{[`${B}--tile--slug`]:x,[`${B}--tile--slug-rounded`]:x&&y,[`${B}--tile--decorator`]:r,[`${B}--tile--decorator-rounded`]:r&&y}),K=u()(`${B}--tile__chevron`,`${B}--tile__chevron--interactive`),V=a.Children.toArray(n);v(()=>{if(!M.current||!O.current)return;const e=window.getComputedStyle(M.current),t=parseInt(e.getPropertyValue("padding-top"),10)||0,n=parseInt(e.getPropertyValue("padding-bottom"),10)||0;C(t+n),T(O.current.scrollHeight)},[]),v(()=>{if(!O.current||!D.current)return;const e=Boolean(Te(O.current))||Boolean(_e(O.current))||Boolean(Te(D.current))||Boolean(_e(D.current))||Boolean(x||r);R(e)},[x,r,n]),v(()=>{if(!M.current)return;if(k)return void(M.current.style.maxHeight="");const e=N||O.current?.scrollHeight||0,t=s>0?s:e,n=c>0?c:_;M.current.style.maxHeight=`${t+n}px`},[k,s,c,N,_]),(0,a.useEffect)(()=>
2{if(!O.current)return;const e=new ResizeObserver(()=>{O.current&&T(O.current.scrollHeight)});return e.observe(O.current),()=>e.disconnect()},[]);const W=j(E?"expandable-tile-interactive":"expandable-tile"),U=x??r,Q=G(U,Ze)?(0,a.cloneElement)(U,{size:"xs"}):U;return E?(0,l.jsx)("div",{ref:P,className:H,...$,children:(0,l.jsxs)("div",{ref:L,children:[x?Q:r?(0,l.jsx)("div",{className:`${B}--tile--inner-decorator`,children:Q}):"",(0,l.jsx)("div",{ref:O,className:`${B}--tile-content`,children:V[0]}),(0,l.jsx)("button",{type:"button","aria-expanded":k,"aria-controls":W,onKeyUp:vt([p,z]),onClick:vt([d,F]),"aria-label":k?f:m,ref:A,className:K,children:(0,l.jsx)(S.yQ,{})}),(0,l.jsx)("div",{ref:D,className:`${B}--tile-content`,id:W,children:V[1]})]})}):(0,l.jsx)("button",{type:"button",ref:P,className:q,"aria-controls":W,"aria-expanded":k,title:k?f:m,...$,onKeyUp:vt([p,z]),onClick:vt([d,F]),tabIndex:e,children:(0,l.jsxs)("div",{ref:L,children:[(0,l.jsx)("div",{ref:O,className:`${B}--tile-content`,children:V[0]}),(0,l.jsxs)("div",{className:`${B}--tile__chevron`,children:[(0,l.jsx)("span",{children:k?h:b}),(0,l.jsx)(S.yQ,{})]}),(0,l.jsx)("div",{ref:D,id:W,className:`${B}--tile-content`,children:V[1]})]})})});ac.propTypes={children:m().node,className:m().string,decorator:m().node,expanded:m().bool,hasRoundedCorners:m().bool,id:m().string,light:I(m().bool,"The `light` prop for `ExpandableTile` is no longer needed and has been deprecated. It will be removed in the next major release. Use the Layer component instead."),onClick:m().func,onKeyUp:m().func,slug:I(m().node,"The `slug` prop for `ExpandableTile` has been deprecated in favor of the new `decorator` prop. It will be removed in the next major release."),tabIndex:m().number,tileCollapsedIconText:m().string,tileCollapsedLabel:m().string,tileExpandedIconText:m().string,tileExpandedLabel:m().string},ac.displayName="ExpandableTile";const oc=a.forwardRef(({children:e},t)=>{const n=i();return(0,l.jsx)("div",{ref:t,className:`${n}--tile-content__above-the-fold`,children:e})});oc.propTypes={children:m().node},oc.displayName="TileAboveTheFoldContent";const ic=a.forwardRef(({children:e},t)=>{const n=i();return(0,l.jsx)("div",{ref:t,className:`${n}--tile-content__below-the-fold`,children:e})});ic.propTypes={children:m().node},ic.displayName="TileBelowTheFoldContent";const lc=(0,a.forwardRef)((e,t)=>{const{"aria-describedby":n,children:r,className:o,inputClassName:s,pickerClassName:c,disabled:d=!1,hideLabel:p,id:m,invalidText:f="Error message goes here",invalid:b=!1,warningText:h="Warning message goes here",warning:g=!1,labelText:x,light:v=!1,maxLength:y=5,onChange:$=()=>{},onClick:w=()=>{},onBlur:N=()=>{},pattern:T="(1[012]|[1-9]):[0-5][0-9](\\s)?",placeholder:j="hh:mm",readOnly:_,size:C="md",type:k="text",value:I,...S}=e,E=i(),R=(0,a.useRef)(null),O=mt({id:m,readOnly:_,disabled:d,invalid:b,invalidText:f,warn:g,warnText:h}),D=u()(`${E}--time-picker__input-field`,`${E}--text-input`,[s],{[`${E}--text-input--light`]:v,[`${E}--time-picker__input-field-error`]:O.invalid||O.warn}),A=u()({[`${E}--time-picker`]:!0,[`${E}--time-picker--light`]:v,[`${E}--time-picker--invalid`]:O.invalid,[`${E}--time-picker--warning`]:O.warn,[`${E}--time-picker--readonly`]:_,[`${E}--time-picker--${C}`]:C,...c&&{[c]:!0}}),L=u()(`${E}--label`,{[`${E}--visually-hidden`]:p,[`${E}--label--disabled`]:d}),M=null!=x&&(0,l.jsx)("label",{htmlFor:m,className:L,ref:R,children:x});ft(R,"The TimePicker component `labelText` prop must have no interactive content");const P={readOnly:_},B=[O.invalid?O.invalidId:O.warn?O.warnId:null,n].filter(Boolean).join(" ")||void 0;return(0,l.jsxs)("div",{className:u()(`${E}--form-item`,o),children:[M,(0,l.jsxs)("div",{className:A,children:[(0,l.jsxs)("div",{className:`${E}--time-picker__input`,children:[(0,l.jsx)("input",{className:D,"data-invalid":!!O.invalid||void 0,disabled:O.disabled,id:m,maxLength:y,onClick:function(e){d||w(e)},onChange:function(e){d||_||$(e)},onBlur:function(e){d||N(e)},placeholder:j,pattern:T,ref:t,type:k,value:I,...S,...P,"aria-describedby":B,"aria-invalid":!!O.invalid||void 0}
2),(O.invalid||O.warn)&&O.icon&&(0,l.jsx)("div",{className:`${E}--time-picker__error__icon`,children:a.createElement(O.icon,{className:O.invalid?`${E}--checkbox__invalid-icon`:`${E}--text-input__invalid-icon--warning`,size:16})})]}),function(){const e={onMouseDown:e=>{_&&(e.preventDefault(),e.target.focus())},onKeyDown:e=>{_&&["ArrowDown","ArrowUp"," "].includes(e.key)&&e.preventDefault()}};return a.Children.map(r,t=>{const n=t;if(n)return a.cloneElement(n,{...n.props,disabled:n.props.disabled??d,readOnly:_,...e})})}()]}),O.validation]})});lc.propTypes={children:m().node,className:m().string,disabled:m().bool,hideLabel:m().bool,id:m().string.isRequired,invalid:m().bool,invalidText:m().node,labelText:m().node,light:I(m().bool,"The `light` prop for `TimePicker` is no longer needed and has been deprecated. It will be removed in the next major release. Use the `Layer` component instead."),maxLength:m().number,onBlur:m().func,onChange:m().func,onClick:m().func,pattern:m().string,placeholder:m().string,readOnly:m().bool,size:m().oneOf(["sm","md","lg"]),type:m().string,value:m().string,warning:m().bool,warningText:m().node};const sc=(0,a.forwardRef)((e,t)=>{const{"aria-label":n="open list of options",children:r,id:a,disabled:o=!1,className:s,...c}=e,d=i(),p=u()({[`${d}--select`]:!0,[`${d}--time-picker__select`]:!0,...s&&{[s]:!0}});return(0,l.jsxs)("div",{className:p,children:[(0,l.jsx)("select",{"aria-label":n,className:`${d}--select-input`,disabled:o,id:a,ref:t,...c,children:r}),(0,l.jsx)(S.yQ,{className:`${d}--select__arrow`,"aria-hidden":"true"})]})});function cc({"aria-labelledby":e,className:t,defaultToggled:n=!1,disabled:r=!1,hideLabel:o=!1,id:s,labelA:c="Off",labelB:d="On",labelText:p,onClick:m,onToggle:f,readOnly:b,size:g="md",toggled:x,...v}){const y=i(),$=(0,a.useRef)(null),[w,N]=it({value:x,onChange:f,defaultValue:n});function T(e){b||N(!w),m&&m(e)}const j="sm"===g,_=o?p:w?d:c,C=!(o&&!p),k=p?"label":"div",I=u()(`${y}--toggle`,{[`${y}--toggle--disabled`]:r,[`${y}--toggle--readonly`]:b},t),S=u()(`${y}--toggle__label-text`,{[`${y}--visually-hidden`]:o}),E=u()(`${y}--toggle__appearance`,{[`${y}--toggle__appearance--sm`]:j}),R=u()(`${y}--toggle__switch`,{[`${y}--toggle__switch--checked`]:w}),O=`${s}_label`;return(0,l.jsxs)("div",{className:I,onClick:p?void 0:e=>{$.current&&e.target!==$.current&&!r&&(T(e),$.current.focus())},children:[(0,l.jsx)("button",{...v,ref:$,id:s,className:`${y}--toggle__button`,role:"switch",type:"button","aria-checked":w,"aria-labelledby":e??(p?O:void 0),disabled:r,onClick:T}),(0,l.jsxs)(k,{id:O,htmlFor:e?void 0:s,className:`${y}--toggle__label`,children:[p&&(0,l.jsx)(h,{className:S,children:p}),(0,l.jsxs)("div",{className:E,children:[(0,l.jsx)("div",{className:R,children:j&&!b&&(0,l.jsx)("svg",{"aria-hidden":"true",focusable:"false",className:`${y}--toggle__check`,width:"6px",height:"5px",viewBox:"0 0 6 5",children:(0,l.jsx)("path",{d:"M2.2 2.7L5 0 6 1 2.2 5 0 2.7 1 1.5z"})})}),C&&(0,l.jsx)(h,{className:`${y}--toggle__text`,"aria-hidden":"true",children:_})]})]})]})}sc.propTypes={children:m().node,className:m().string,defaultValue:m().any,disabled:m().bool,id:m().string.isRequired},cc.propTypes={"aria-labelledby":m().string,className:m().string,defaultToggled:m().bool,disabled:m().bool,hideLabel:m().bool,id:m().string.isRequired,labelA:m().node,labelB:m().node,labelText:m().string,onClick:m().func,onToggle:m().func,readOnly:m().bool,size:m().oneOf(["sm","md"]),toggled:m().bool};const dc=({className:e,children:t,...n})=>{const r=i(),a=u()(`${r}--header`,e);return(0,l.jsx)("header",{...n,className:a,children:t})};function uc({render:e,isSideNavExpanded:t=!1,...n}){const[r,o]=(0,a.useState)(t);Z("keydown",e=>{de(e,ee)&&o(!1)});const i=(0,a.useCallback)(()=>{o(e=>!e)},[o]);return(0,l.jsx)(e,{...n,isSideNavExpanded:r,onClickSideNavExpand:i})}dc.propTypes={"aria-label":m().string,"aria-labelledby":m().string,className:m().string},uc.propTypes={isSideNavExpanded:m().bool,render:m().elementType.isRequired};const pc=(e=>{const t=Object.keys(e);return t.reduce((n,r)=>{return{...n,[r]:(a=e[r],(e,n,r,...o)=>t.every(t=>void 0===e[t])?new Error(`${r} requires one of the following props: ${t.join(", ")}`):a(e,n,r,...o))};var a},{})})({"aria-label":m().string,"aria-labelledby":m().string}),mc=a.forwardRef(({"aria-label":e,"aria-labelledby":t,children:n,className:r,onClick:a,tooltipHighContrast:o=!0,tooltipDropShadow:s,isActive:c,tooltipAlignment:d,...p},m)=>{const f=i(),b=u()({[r]:!!r,[`${f}--header__action`]:!0,[`${f}--header__action--active`]:c}),h={"aria-label":e,"aria-labelledby":t};return(0,l.jsx)(gt,{...p,...h,className:b,onClick:a,type:"button",hasIconOnly:!0,size:"lg",kind:"ghost",iconDescription:e,tooltipPosition:"bottom",tooltipAlignment:d,tooltipDropShadow:s,tooltipHighContrast:o,ref:m,children:n})});mc.propTypes={...pc,children:m().node.isRequired,className:m().string,isActive:m().bool,onClick:m().func,tooltipAlignment:m().oneOf(["start","center","end"]),tooltipDropShadow:m().bool,tooltipHighContrast:m().bool},mc.displayName="HeaderGlobalAction";const fc=Kr({name:"HeaderGlobalBar",className:e=>`${e}--header__global`,type:"div"}),bc=(0,a.forwardRef)((e,t)=>{const{element:n,as:r,isSideNavExpanded:a,...o}=e;return(0,l.jsx)(r??n??"a",{ref:t,...o}
2)}),hc={as:m().elementType,element:I(m().elementType,"The `element` prop for `Link` has been deprecated. Please use `as` instead. This will be removed in the next major release."),isSideNavExpanded:m().bool};bc.displayName="Link",bc.propTypes=hc;const gc=(0,a.forwardRef)(function({className:e,isActive:t,isCurrentPage:n,"aria-current":r,children:a,role:o,tabIndex:s,...c},d){const p=i(),m=s??0;n&&(t=n);const f=t&&"page"!==r,b=u()({[`${p}--header__menu-item`]:!0,[`${p}--header__menu-item--current`]:f});return(0,l.jsx)("li",{className:e,role:o,children:(0,l.jsx)(bc,{...c,"aria-current":!!f||r,className:b,ref:d,tabIndex:m,children:(0,l.jsx)("span",{className:`${p}--text-truncate--end`,children:a})})})});gc.displayName="HeaderMenuItem",gc.propTypes={...hc,children:m().node.isRequired,className:m().string,isActive:m().bool,isCurrentPage:I(m().bool,"The `isCurrentPage` prop for `HeaderMenuItem` has been deprecated. Please use `isActive` instead. This will be removed in the next major release."),role:m().string,tabIndex:m().number};const xc=(0,a.forwardRef)((e,t)=>{const{isActive:n,isCurrentPage:r,"aria-label":i,"aria-labelledby":s,className:c,children:d,renderMenuContent:p,menuLinkName:m,focusRef:f,onBlur:b,onClick:h,onKeyDown:g,...x}=e,v=(0,a.useContext)(o),[y,$]=(0,a.useState)(!1),w=(0,a.useRef)(null),N=(0,a.useRef)(null),T=(0,a.useRef)([]),j=Y([t,f,w]),_=e=>t=>{T.current[e]=t},C=e=>a.Children.toArray(e).some(e=>{if(!G(e,gc))return!1;const{isActive:t,isCurrentPage:n,children:r}=e.props;return t||n||Array.isArray(r)&&C(r)}),k={"aria-label":i,"aria-labelledby":s},I=u()({[`${v}--header__submenu`]:!0,[`${c}`]:!!c}),E=n||r,R=u()({[`${v}--header__menu-item`]:!0,[`${v}--header__menu-title`]:!0,[`${v}--header__menu-item--current`]:E||C(d)&&!y});return(0,l.jsxs)("li",{...x,className:I,onKeyDown:vt([g,e=>{ce(e,[ee])&&y&&(e.stopPropagation(),e.preventDefault(),$(!1),w.current&&w.current.focus())}]),onClick:vt([h,e=>{(!N.current||e.target instanceof Node&&!N.current.contains(e.target))&&e.preventDefault(),$(e=>!e)}]),onBlur:vt([b,e=>{const t=T.current.find(t=>t===e.relatedTarget),n=N.current?.contains(e.relatedTarget);t||n||$(!1)}]),ref:t,children:[(0,l.jsxs)("a",{"aria-haspopup":"menu","aria-expanded":y,className:R,href:"#",onKeyDown:e=>{if(ce(e,[J,te]))return e.stopPropagation(),e.preventDefault(),void $(e=>!e)},ref:j,tabIndex:0,...k,children:[m,p?(0,l.jsx)(p,{}):(0,l.jsx)(S.yQ,{className:`${v}--header__menu-arrow`})]}),(0,l.jsx)("ul",{...k,ref:N,className:`${v}--header__menu`,children:a.Children.map(d,(e,t)=>G(e,gc)?(0,a.cloneElement)(e,{ref:_(t)}):e)})]})});xc.displayName="HeaderMenu",xc.propTypes={...pc,className:m().string,focusRef:m().func,isActive:m().bool,isCurrentPage:I(m().bool,"The `isCurrentPage` prop for `HeaderMenu` has been deprecated. Please use `isActive` instead. This will be removed in the next major release."),menuLinkName:m().string.isRequired,onBlur:m().func,onClick:m().func,onKeyDown:m().func,renderMenuContent:m().func,tabIndex:m().number};var vc=n(60061);function yc({"aria-label":e,"aria-labelledby":t,className:n,renderMenuIcon:r,renderCloseIcon:a,isActive:o,isCollapsible:s,...c}){const d=i(),p=u()({..."string"==typeof n&&{[n]:!!n},[`${d}--header__action`]:!0,[`${d}--header__menu-trigger`]:!0,[`${d}--header__action--active`]:o,[`${d}--header__menu-toggle`]:!0,[`${d}--header__menu-toggle__hidden`]:!s}),m=r||(0,l.jsx)(vc.W1,{size:20}),f=a||(0,l.jsx)(S.bm,{size:20});return(0,l.jsx)("button",{...c,"aria-label":e,"aria-labelledby":t,className:p,title:e,type:"button",children:o?f:m})}function $c({children:e,className:t,prefix:n="IBM",...r}){const a=i(),o=u()(`${a}--header__name`,t);return(0,l.jsxs)(bc,{...r,className:o,children:[n&&(0,l.jsxs)(l.Fragment,{children:[(0,l.jsx)("span",{className:`${a}--header__name--prefix`,children:n})," "]}),(0,l.jsx)("span",{children:e})]})}function wc({"aria-label":e,"aria-labelledby":t,children:n,className:r,...a}){const o=i(),s=u()(`${o}--header__nav`,r);return(0,l.jsx)("nav",{...a,"aria-label":e,"aria-labelledby":t,className:s,children:(0,l.jsx)("ul",{className:`${o}--header__menu-bar`,children:n})})}yc.propTypes={...pc,className:m().string,isActive:m().bool,isCollapsible:m().bool,onClick:m().func},$c.propTypes={...hc,children:m().node.isRequired,className:m().string,href:m().string,prefix:m().string},wc.propTypes={...pc,children:m().node,className:m().string};const Nc=(0,a.forwardRef)((e,t)=>{const{"aria-label":n,"aria-labelledby":r,className:a,children:o,isSelected:s,expanded:c,tabIndex:d=(c?0:-1),index:p,handleSwitcherItemFocus:m,onKeyDown:f=()=>{},href:b,target:h,rel:g,...x}=e,v=i(),y=u()(`${v}--switcher__item`,{[a||""]:!!a}),$={"aria-label":n,"aria-labelledby":r},w=u()(`${v}--switcher__item-link`,{[`${v}--switcher__item-link--selected`]:s});return(0,l.jsx)("li",{className:y,children:(0,l.jsx)(bc,{onKeyDown:e=>{!function(e){de(e,le)&&(e.preventDefault(),m?.({currentIndex:p||-1,direction:1})),de(e,oe)&&(e.preventDefault(),m?.({currentIndex:p||-1,direction:-1}))}(e),f(e)},href:b,target:h,rel:g,ref:t,...x,className:w,tabIndex:d,...$,children:o})})});Nc.displayName="SwitcherItem",Nc.propTypes={...pc,children:m().node.isRequired,className:m().string,handleSwitcherItemFocus:m().func,href:m().string,index:m().number,onClick:m().func,onKeyDown:m().func,tabIndex:m().number,target:m().string,rel:m().string};const Tc=({className:e,...t})=>{const n=i(),r=u()(`${n}--switcher__item--divider`,{[e||""]:!!e});return(0,l.jsx)("li",{children:(0,l.jsx)("hr",{...t,className:r})})};Tc.propTypes={className:m().string};const jc=(0,a.forwardRef)((e,t)=>{const n=(0,a.useRef)(null),r=Y([n,t]),o=i(),{"aria-label":s,"aria-labelledby":c,className:d,children:p,expanded:m}=e,f={"aria-label":s,"aria-labelledby":c},b=u()(`${o}--switcher`,{[d||""]:!!d}),h=({currentIndex:e,direction:t})=>
2{const r=a.Children.toArray(p).reduce((e,t,n)=>(G(t,Nc)&&Object.keys(t.props).length&&e.push(n),e),[]),o=(()=>{const n=r.indexOf(e)+t;switch(r[n]){case void 0:return-1===t?r[r.length-1]:r[0];case 0:if(1===t)return r[1];default:return r[n]}})(),i=n.current?.children[o]?.children[0];i instanceof HTMLElement&&i.focus()},g=a.Children.toArray(p).map((e,t)=>G(e,Nc)?(0,a.cloneElement)(e,{handleSwitcherItemFocus:h,index:t,key:t,expanded:m}):G(e,Tc)?(0,a.cloneElement)(e,{key:t}):e);return(0,l.jsx)("ul",{ref:r,className:b,...f,children:g})});jc.displayName="Switcher",jc.propTypes={...pc,children:m().node.isRequired,className:m().string,expanded:m().bool};const _c=a.forwardRef(({children:e,className:t,expanded:n,addFocusListeners:r=!0,onHeaderPanelFocus:o=dt,href:s,...c},d)=>{const p=i(),m=(0,a.useRef)(null),f=Y([m,d]),b=(0,a.useRef)(void 0!==n).current,[h,g]=(0,a.useState)(n),x=b?n:h,[v,y]=(0,a.useState)(null),$=u()(`${p}--header-panel`,{[`${p}--header-panel--expanded`]:x,[t]:!!t}),w={};return r&&(w.onBlur=e=>{e.currentTarget.contains(e.relatedTarget)||v?.classList?.contains(`${p}--switcher__item-link`)||(g(!1),y(null),n&&o())},w.onKeyDown=e=>{de(e,ee)&&(g(!1),o(),s&&(window.location.href=s))}),Z("click",t=>{const{target:r}=t;r instanceof Element&&(y(r),!G(e,jc)||r.closest(`.${p}--header-panel--expanded`)||r.closest(`.${p}--header__action`)||m?.current?.classList.contains(`${p}--switcher`)||!n||(g(!1),o()))}),(0,l.jsx)("div",{...c,className:$,ref:f,...w,children:e})});function Cc({className:e,children:t,hasDivider:n=!1}){const r=i(),a=u()({[`${r}--side-nav__header-navigation`]:!0,[`${r}--side-nav__header-divider`]:n},e);return(0,l.jsx)("ul",{className:a,children:t})}function kc({children:e="Skip to main content",className:t,href:n="#main-content",tabIndex:r=0,...a}){const o=i(),s=u()(`${o}--skip-to-content`,t);return(0,l.jsx)("a",{...a,className:s,href:n,tabIndex:r,children:e})}_c.propTypes={addFocusListeners:m().bool,children:m().node,className:m().string,expanded:m().bool,href:m().string,onHeaderPanelFocus:m().func},_c.displayName="HeaderPanel",Cc.propTypes={children:m().node,className:m().string,hasDivider:m().bool},kc.propTypes={children:m().string,className:m().string,href:m().string,tabIndex:m().string};const Ic=(0,a.createContext)({}),Sc=({children:e,isRail:t,isSideNavExpanded:n})=>(0,l.jsx)(Ic.Provider,{value:{isRail:t,isSideNavExpanded:n},children:e}),Ec=(0,a.forwardRef)((e,t)=>{const{expanded:n,defaultExpanded:r=!1,isChildOfHeader:o=!0,"aria-label":s,"aria-labelledby":c,children:d,onToggle:p,className:m,href:f,isFixedNav:b=!1,isRail:h,isPersistent:g=!0,addFocusListeners:x=!0,addMouseListeners:v=!0,onOverlayClick:y,onSideNavBlur:$,enterDelayMs:w=100,...N}=e,T=i(),{current:j}=(0,a.useRef)(void 0!==n),[_,C]=$e(r),[k,I]=$e(r),S=j?n:_,E=(0,a.useRef)(null),R=Y([E,t]),O=(e,t=!S)=>{j||C(t,w),p&&p(e,t),(j||h)&&I(t,w)},D={"aria-label":s,"aria-labelledby":c},A=u()(m,{[`${T}--side-nav`]:!0,[`${T}--side-nav--expanded`]:S||k,[`${T}--side-nav--collapsed`]:!S&&b,[`${T}--side-nav--rail`]:h,[`${T}--side-nav--ux`]:o,[`${T}--side-nav--hidden`]:!g}),L=u()({[`${T}--side-nav__overlay`]:!0,[`${T}--side-nav__overlay-active`]:S||k}),M=j&&k||S,P={};x&&(P.onFocus=e=>{!e.currentTarget.contains(e.relatedTarget)&&h&&O(e,!0)},P.onBlur=e=>{e.currentTarget.contains(e.relatedTarget)||O(e,!1),e.currentTarget.contains(e.relatedTarget)||!S||b||$&&$()},P.onKeyDown=e=>{de(e,ee)&&(O(e,!1),f&&(window.location.href=f))}),v&&h&&(P.onMouseEnter=()=>{O(!0,!0)},P.onMouseLeave=()=>{C(!1),I(!1),O(!1,!1)},P.onClick=()=>{C(!0),I(!0),O(!0,!0)}),Z("keydown",e=>{const t=document.activeElement;de(e,X)&&S&&!b&&E.current&&t?.classList.contains(`${T}--header__menu-toggle`)&&!t.closest("nav")&&E.current.focus()});const B=`(min-width: ${Ns.fi.lg.width})`,F=Ls(B),z=!h&&!(S||F);return(0,a.useEffect)(()=>{const e=E.current;e&&(z?e.setAttribute("inert",""):e.removeAttribute("inert"))},[z]),(0,l.jsxs)(Sc,{isRail:h,isSideNavExpanded:M,children:[b?null:(0,l.jsx)("div",{className:L,onClick:y}),(0,l.jsx)("nav",{tabIndex:-1,ref:R,className:`${T}--side-nav__navigation ${A}`,...D,...P,...N,children:d})]})});Ec.displayName="SideNav",Ec.propTypes={...pc,addFocusListeners:m().bool,addMouseListeners:m().bool,className:m().string,defaultExpanded:m().bool,enterDelayMs:m().number,expanded:m().bool,href:m().string,isChildOfHeader:m().bool,isFixedNav:m().bool,isPersistent:m().bool,isRail:m().bool,onOverlayClick:m().func,onSideNavBlur:m().func,onToggle:m().func};const Rc=({className:e})=>{const t=i(),n=u()(`${t}--side-nav__divider`,e);return(0,l.jsx)("li",{className:n,children:(0,l.jsx)("hr",{})})};Rc.propTypes={className:m().string};const Oc=({children:e,className:t,small:n=!1})=>{const r=i(),a=u()({[`${r}--side-nav__icon`]:!0,[`${r}--side-nav__icon--small`]:n,[t]:!!t});return(0,l.jsx)("div",{className:a,children:e})};Oc.propTypes={children:m().node.isRequired,className:m().string,
2small:m().bool};const Dc=({className:e,children:t,large:n=!1})=>{const r=i(),a=u()({[`${r}--side-nav__item`]:!0,[`${r}--side-nav__item--large`]:n,[e]:!!e});return(0,l.jsx)("li",{className:a,children:t})};Dc.propTypes={children:m().node.isRequired,className:m().string,large:m().bool};const Ac=({className:e,children:t,isSideNavExpanded:n})=>{const r=i(),{isRail:o,isSideNavExpanded:s}=(0,a.useContext)(Ic),c=n??s,d=u()([`${r}--side-nav__items`],e);return(0,l.jsx)(Sc,{isRail:o,isSideNavExpanded:c,children:(0,l.jsx)("ul",{className:d,children:t})})};function Lc({className:e,children:t,...n}){const r=i(),a=u()(`${r}--side-nav__link-text`,e);return(0,l.jsx)("span",{...n,className:a,children:t})}function Mc({className:e,nested:t=!1,isExpressive:n=!1,...r}){const a=i(),o=u()(`${a}--list--unordered`,e,{[`${a}--list--nested`]:t,[`${a}--list--expressive`]:n});return(0,l.jsx)("ul",{className:o,...r})}function Pc({className:e,helperText:t,hideLabel:n,label:r,max:o=100,size:s="big",status:c="active",type:d="default",value:p}){const m=j("progress-bar"),f=j("progress-bar-helper"),b=j("progress-bar-helper-text"),h=i(),g="finished"===c,x="error"===c,y=!g&&!x&&null==p;let $=p;$&&$>o&&($=o),$&&$<0&&($=0),x?$=0:g&&($=o);const w=($??NaN)/o,N=u()(`${h}--progress-bar`,`${h}--progress-bar--${s}`,`${h}--progress-bar--${d}`,{[`${h}--progress-bar--indeterminate`]:y,[`${h}--progress-bar--finished`]:g,[`${h}--progress-bar--error`]:x},e),T=u()(`${h}--progress-bar__label`,{[`${h}--visually-hidden`]:n});let _=null;x?_=a.forwardRef(function(e,t){return(0,l.jsx)(Un.x,{ref:t,size:16,...e})}):g&&(_=a.forwardRef(function(e,t){return(0,l.jsx)(S._j,{ref:t,size:16,...e})}));const C=V("enable-v12-release"),k=(0,a.useRef)(null);return v(()=>{k.current&&(g||x?(k.current.style.transform="",k.current.style.inlineSize=""):C?k.current.style.inlineSize=100*w+"%":k.current.style.transform=`scaleX(${w})`)},[w,g,x,C]),(0,l.jsxs)("div",{className:N,children:[(0,l.jsxs)("div",{className:T,id:m,children:[(0,l.jsx)("span",{className:`${h}--progress-bar__label-text`,children:r}),_&&(0,l.jsx)(_,{className:`${h}--progress-bar__status-icon`})]}),(0,l.jsx)("div",{className:`${h}--progress-bar__track`,role:"progressbar","aria-busy":!g,"aria-invalid":x,"aria-labelledby":m,"aria-describedby":t?b:void 0,"aria-valuemin":y?void 0:0,"aria-valuemax":y?void 0:o,"aria-valuenow":y?void 0:$,children:(0,l.jsx)("div",{className:`${h}--progress-bar__bar`,ref:k})}),t&&(0,l.jsxs)("div",{id:b,className:`${h}--progress-bar__helper-text`,children:[t,(0,l.jsx)("div",{className:`${h}--visually-hidden`,"aria-live":"polite",id:f,children:g?"Done":"Loading"})]})]})}Ac.displayName="SideNavItems",Ac.propTypes={children:m().node.isRequired,className:m().string,isSideNavExpanded:m().bool},Lc.propTypes={children:m().node.isRequired,className:m().string},Mc.propTypes={children:m().node,className:m().string,isExpressive:m().bool,nested:m().bool},Pc.propTypes={className:m().string,helperText:m().string,hideLabel:m().bool,label:m().string.isRequired,max:m().number,size:m().oneOf(["small","big"]),status:m().oneOf(["active","finished","error"]),type:m().oneOf(["default","inline","indented"]),value:m().number};const Bc=a.createContext({theme:"white"}),Fc=a.forwardRef(({children:e,theme:t},n)=>{const r=(0,a.useMemo)(()=>({theme:t}),[t]),o=(0,a.isValidElement)(e)?(0,a.cloneElement)(e,{ref:n}):e;return(0,l.jsx)(Bc.Provider,{value:r,children:o})});function zc({as:e="div",className:t,theme:n,...r}){const o=i(),s=u()(t,{[`${o}--white`]:"white"===n,[`${o}--g10`]:"g10"===n,[`${o}--g90`]:"g90"===n,[`${o}--g100`]:"g100"===n,[`${o}--layer-one`]:!0}),c=a.useMemo(()=>({theme:n,isDark:n&&["g90","g100"].includes(n)}),[n]),d=e;return(0,l.jsx)(Bc.Provider,{value:c,children:(0,l.jsx)(Dn.Provider,{value:1,children:(0,l.jsx)(d,{...r,className:s})})})}Fc.displayName="GlobalTheme",Fc.propTypes={children:m().node,theme:m().oneOf(["white","g10","g90","g100"])},zc.propTypes={as:m().oneOfType([m().func,m().string,m().elementType]),children:m().node,className:m().string,theme:m().oneOf(["white","g10","g90","g100"])}},100(e){var t;t=function(){return function(){var e={686:function(e,t,n){"use strict";n.d(t,{default:function(){return y}});var r=n(279),a=n.n(r),o=n(370),i=n.n(o),l=n(817),s=n.n(l);function c(e){try{return document.execCommand(e)}catch(e){return!1}}var d=function(e){var t=s()(e);return c("cut"),t},u=function(e,t){var n=function(e){var t="rtl"===document.documentElement.getAttribute("dir"),n=document.createElement("textarea");n.style.fontSize="12pt",n.style.border="0",n.style.padding="0",n.style.margin="0",n.style.position="absolute",n.style[t?"right":"left"]="-9999px";var r=window.pageYOffset||document.documentElement.scrollTop;return n.style.top="".concat(r,"px"),n.setAttribute("readonly",""),n.value=e,n}(e);t.container.appendChild(n);var r=s()(n);return c("copy"),n.remove(),r},p=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body},n="";return"string"==typeof e?n=u(e,t):e instanceof HTMLInputElement&&!["text","search","url","tel","password"].includes(null==e?void 0:e.type)?n=u(e.value,t):(n=s()(e),c("copy")),n};function m(e){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},m(e)}function f(e){return f="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(e){return typeof e}:function(e){return e&&"function"==typeof Symbol&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},f(e)}function b(e,t){for(var n=0;n<t.length;n++){var r=t[n];r.enumerable=r.enumerable||!1,r.configurable=!0,"value"in r&&(r.writable=!0),Object.defineProperty(e,r.key,r)}}
vendor: 5,200 bytes, line 2
2function h(e,t){return h=Object.setPrototypeOf||function(e,t){return e.__proto__=t,e},h(e,t)}function g(e){return g=Object.setPrototypeOf?Object.getPrototypeOf:function(e){return e.__proto__||Object.getPrototypeOf(e)},g(e)}function x(e,t){var n="data-clipboard-".concat(e);if(t.hasAttribute(n))return t.getAttribute(n)}var v=function(e){!function(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Super expression must either be null or a function");e.prototype=Object.create(t&&t.prototype,{constructor:{value:e,writable:!0,configurable:!0}}),t&&h(e,t)}(s,e);var t,n,r,a,o,l=(a=s,o=function(){if("undefined"==typeof Reflect||!Reflect.construct)return!1;if(Reflect.construct.sham)return!1;if("function"==typeof Proxy)return!0;try{return Date.prototype.toString.call(Reflect.construct(Date,[],function(){})),!0}catch(e){return!1}}(),function(){var e,t=g(a);if(o){var n=g(this).constructor;e=Reflect.construct(t,arguments,n)}else e=t.apply(this,arguments);return function(e,t){return!t||"object"!==f(t)&&"function"!=typeof t?function(e){if(void 0===e)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return e}(e):t}(this,e)});function s(e,t){var n;return function(e,t){if(!(e instanceof t))throw new TypeError("Cannot call a class as a function")}(this,s),(n=l.call(this)).resolveOptions(t),n.listenClick(e),n}return t=s,n=[{key:"resolveOptions",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.action="function"==typeof e.action?e.action:this.defaultAction,this.target="function"==typeof e.target?e.target:this.defaultTarget,this.text="function"==typeof e.text?e.text:this.defaultText,this.container="object"===f(e.container)?e.container:document.body}},{key:"listenClick",value:function(e){var t=this;this.listener=i()(e,"click",function(e){return t.onClick(e)})}},{key:"onClick",value:function(e){var t=e.delegateTarget||e.currentTarget,n=this.action(t)||"copy",r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=e.action,n=void 0===t?"copy":t,r=e.container,a=e.target,o=e.text;if("copy"!==n&&"cut"!==n)throw new Error('Invalid "action" value, use either "copy" or "cut"');if(void 0!==a){if(!a||"object"!==m(a)||1!==a.nodeType)throw new Error('Invalid "target" value, use a valid Element');if("copy"===n&&a.hasAttribute("disabled"))throw new Error('Invalid "target" attribute. Please use "readonly" instead of "disabled" attribute');if("cut"===n&&(a.hasAttribute("readonly")||a.hasAttribute("disabled")))throw new Error('Invalid "target" attribute. You can\'t cut text from elements with "readonly" or "disabled" attributes')}return o?p(o,{container:r}):a?"cut"===n?d(a):p(a,{container:r}):void 0}({action:n,container:this.container,target:this.target(t),text:this.text(t)});this.emit(r?"success":"error",{action:n,text:r,trigger:t,clearSelection:function(){t&&t.focus(),window.getSelection().removeAllRanges()}})}},{key:"defaultAction",value:function(e){return x("action",e)}},{key:"defaultTarget",value:function(e){var t=x("target",e);if(t)return document.querySelector(t)}},{key:"defaultText",value:function(e){return x("text",e)}},{key:"destroy",value:function(){this.listener.destroy()}}],r=[{key:"copy",value:function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{container:document.body};return p(e,t)}},{key:"cut",value:function(e){return d(e)}},{key:"isSupported",value:function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:["copy","cut"],t="string"==typeof e?[e]:e,n=!!document.queryCommandSupported;return t.forEach(function(e){n=n&&!!document.queryCommandSupported(e)}),n}}],n&&b(t.prototype,n),r&&b(t,r),s}(a()),y=v},828:function(e){if("undefined"!=typeof Element&&!Element.prototype.matches){var t=Element.prototype;t.matches=t.matchesSelector||t.mozMatchesSelector||t.msMatchesSelector||t.oMatchesSelector||t.webkitMatchesSelector}e.exports=function(e,t){for(;e&&9!==e.nodeType;){if("function"==typeof e.matches&&e.matches(t))return e;e=e.parentNode}}},438:function(e,t,n){var r=n(828);function a(e,t,n,r,a){var i=o.apply(this,arguments);return e.addEventListener(n,i,a),{destroy:function(){e.removeEventListener(n,i,a)}}}function o(e,t,n,a){return function(n){n.delegateTarget=r(n.target,t),n.delegateTarget&&a.call(e,n)}}e.exports=function(e,t,n,r,o){return"function"==typeof e.addEventListener?a.apply(null,arguments):"function"==typeof n?a.bind(null,document).apply(null,arguments):("string"==typeof e&&(e=document.querySelectorAll(e)),Array.prototype.map.call(e,function(e){return a(e,t,n,r,o)}))}},879:function(e,t){t.node=function(e){return void 0!==e&&e instanceof HTMLElement&&1===e.nodeType},t.nodeList=function(e){var n=Object.prototype.toString.call(e);return void 0!==e&&("[object NodeList]"===n||"[object HTMLCollection]"===n)&&"length"in e&&(0===e.length||t.node(e[0]))},t.string=function(e){return"string"==typeof e||e instanceof String},t.fn=function(e){return"[object Function]"===Object.prototype.toString.call(e)}},370:function(e,t,n){var r=n(879),a=n(438);e.exports=function(e,t,n){if(!e&&!t&&!n)throw new Error("Missing required arguments");if(!r.string(t))throw new TypeError("Second argument must be a String");
2if(!r.fn(n))throw new TypeError("Third argument must be a Function");if(r.node(e))return function(e,t,n){return e.addEventListener(t,n),{destroy:function(){e.removeEventListener(t,n)}}}(e,t,n);if(r.nodeList(e))return function(e,t,n){return Array.prototype.forEach.call(e,function(e){e.addEventListener(t,n)}),{destroy:function(){Array.prototype.forEach.call(e,function(e){e.removeEventListener(t,n)})}}}(e,t,n);if(r.string(e))return function(e,t,n){return a(document.body,e,t,n)}(e,t,n);throw new TypeError("First argument must be a String, HTMLElement, HTMLCollection, or NodeList")}},817:function(e){e.exports=function(e){var t;if("SELECT"===e.nodeName)e.focus(),t=e.value;else if("INPUT"===e.nodeName||"TEXTAREA"===e.nodeName){var n=e.hasAttribute("readonly");n||e.setAttribute("readonly",""),e.select(),e.setSelectionRange(0,e.value.length),n||e.removeAttribute("readonly"),t=e.value}else{e.hasAttribute("contenteditable")&&e.focus();var r=window.getSelection(),a=document.createRange();a.selectNodeContents(e),r.removeAllRanges(),r.addRange(a),t=r.toString()}return t}},279:function(e){function t(){}t.prototype={on:function(e,t,n){var r=this.e||(this.e={});return(r[e]||(r[e]=[])).push({fn:t,ctx:n}),this},once:function(e,t,n){var r=this;function a(){r.off(e,a),t.apply(n,arguments)}return a._=t,this.on(e,a,n)},emit:function(e){for(var t=[].slice.call(arguments,1),n=((this.e||(this.e={}))[e]||[]).slice(),r=0,a=n.length;r<a;r++)n[r].fn.apply(n[r].ctx,t);return this},off:function(e,t){var n=this.e||(this.e={}),r=n[e],a=[];if(r&&t)for(var o=0,i=r.length;o<i;o++)r[o].fn!==t&&r[o].fn._!==t&&a.push(r[o]);return a.length?n[e]=a:delete n[e],this}},e.exports=t,e.exports.TinyEmitter=t}},t={};function n(r){if(t[r])return t[r].exports;var a=t[r]={exports:{}};return e[r](a,a.exports,n),a.exports}return n.n=function(e){var t=e&&e.__esModule?function(){return e.default}:function(){return e};return n.d(t,{a:t}),t},n.d=function(e,t){for(var r in t)n.o(t,r)&&!n.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},n.o=function(e,t){return Object.prototype.hasOwnProperty.call(e,t)},n(686)}().default},e.exports=t()},78784(e){function t(e){var n,r,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(n=0;n<o;n++)e[n]&&(r=t(e[n]))&&(a&&(a+=" "),a+=r)}else for(r in e)e[r]&&(a&&(a+=" "),a+=r);return a}function n(){for(var e,n,r=0,a="",o=arguments.length;r<o;r++)(e=arguments[r])&&(n=t(e))&&(a&&(a+=" "),a+=n);return a}e.exports=n,e.exports.clsx=n},4452(e,t){var n;!function(){"use strict";var r={}.hasOwnProperty;function a(){for(var e="",t=0;t<arguments.length;t++){var n=arguments[t];n&&(e=i(e,o(n)))}return e}function o(e){if("string"==typeof e||"number"==typeof e)return e;if("object"!=typeof e)return"";if(Array.isArray(e))return a.apply(null,e);if(e.toString!==Object.prototype.toString&&!e.toString.toString().includes("[native code]"))return e.toString();var t="";for(var n in e)r.call(e,n)&&e[n]&&(t=i(t,n));return t}function i(e,t){return t?e?e+" "+t:e+t:e}e.exports?(a.default=a,e.exports=a):void 0===(n=function(){return a}.apply(t,[]))||(e.exports=n)}()},11750(e,t,n){"use strict";function r(e){var t,n,a="";if("string"==typeof e||"number"==typeof e)a+=e;else if("object"==typeof e)if(Array.isArray(e)){var o=e.length;for(t=0;t<o;t++)e[t]&&(n=r(e[t]))&&(a&&(a+=" "),a+=n)}else for(n in e)e[n]&&(a&&(a+=" "),a+=n);return a}function a(){for(var e,t,n=0,a="",o=arguments.length;n<o;n++)(e=arguments[n])&&(t=r(e))&&(a&&(a+=" "),a+=t);return a}n.d(t,{$:()=>a});const o=a;n.d(t,["A",0,o])}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.