(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9928],{70168:t=>{t.exports={button:"button-D4RPB3ZC",iconOnly:"iconOnly-D4RPB3ZC",withStartSlot:"withStartSlot-D4RPB3ZC",withEndSlot:"withEndSlot-D4RPB3ZC",startSlotWrap:"startSlotWrap-D4RPB3ZC",endSlotWrap:"endSlotWrap-D4RPB3ZC",xsmall:"xsmall-D4RPB3ZC",small:"small-D4RPB3ZC",medium:"medium-D4RPB3ZC",large:"large-D4RPB3ZC",xlarge:"xlarge-D4RPB3ZC",content:"content-D4RPB3ZC",link:"link-D4RPB3ZC",blue:"blue-D4RPB3ZC",primary:"primary-D4RPB3ZC",secondary:"secondary-D4RPB3ZC",gray:"gray-D4RPB3ZC",green:"green-D4RPB3ZC",red:"red-D4RPB3ZC",black:"black-D4RPB3ZC",slot:"slot-D4RPB3ZC",stretch:"stretch-D4RPB3ZC",grouped:"grouped-D4RPB3ZC",adjustPosition:"adjustPosition-D4RPB3ZC",firstRow:"firstRow-D4RPB3ZC",firstCol:"firstCol-D4RPB3ZC","no-corner-top-left":"no-corner-top-left-D4RPB3ZC","no-corner-top-right":"no-corner-top-right-D4RPB3ZC","no-corner-bottom-right":"no-corner-bottom-right-D4RPB3ZC","no-corner-bottom-left":"no-corner-bottom-left-D4RPB3ZC",textWrap:"textWrap-D4RPB3ZC",multilineContent:"multilineContent-D4RPB3ZC",primaryText:"primaryText-D4RPB3ZC",secondaryText:"secondaryText-D4RPB3ZC"}},10553:t=>{t.exports={container:"container-WDZ0PRNh","container-xxsmall":"container-xxsmall-WDZ0PRNh","container-xsmall":"container-xsmall-WDZ0PRNh","container-small":"container-small-WDZ0PRNh","container-medium":"container-medium-WDZ0PRNh","container-large":"container-large-WDZ0PRNh","intent-default":"intent-default-WDZ0PRNh",focused:"focused-WDZ0PRNh",readonly:"readonly-WDZ0PRNh",disabled:"disabled-WDZ0PRNh","with-highlight":"with-highlight-WDZ0PRNh",grouped:"grouped-WDZ0PRNh","adjust-position":"adjust-position-WDZ0PRNh","first-row":"first-row-WDZ0PRNh","first-col":"first-col-WDZ0PRNh",stretch:"stretch-WDZ0PRNh","font-size-medium":"font-size-medium-WDZ0PRNh","font-size-large":"font-size-large-WDZ0PRNh","no-corner-top-left":"no-corner-top-left-WDZ0PRNh","no-corner-top-right":"no-corner-top-right-WDZ0PRNh","no-corner-bottom-right":"no-corner-bottom-right-WDZ0PRNh","no-corner-bottom-left":"no-corner-bottom-left-WDZ0PRNh","size-xxsmall":"size-xxsmall-WDZ0PRNh","size-xsmall":"size-xsmall-WDZ0PRNh","size-small":"size-small-WDZ0PRNh","size-medium":"size-medium-WDZ0PRNh","size-large":"size-large-WDZ0PRNh","intent-success":"intent-success-WDZ0PRNh","intent-warning":"intent-warning-WDZ0PRNh","intent-danger":"intent-danger-WDZ0PRNh","intent-primary":"intent-primary-WDZ0PRNh","border-none":"border-none-WDZ0PRNh","border-thin":"border-thin-WDZ0PRNh","border-thick":"border-thick-WDZ0PRNh",highlight:"highlight-WDZ0PRNh",shown:"shown-WDZ0PRNh"}},42130:t=>{t.exports={"inner-slot":"inner-slot-W53jtLjw",interactive:"interactive-W53jtLjw",icon:"icon-W53jtLjw","inner-middle-slot":"inner-middle-slot-W53jtLjw","before-slot":"before-slot-W53jtLjw","after-slot":"after-slot-W53jtLjw"}},94288:t=>{t.exports={input:"input-RUSovanF","size-xxsmall":"size-xxsmall-RUSovanF","size-xsmall":"size-xsmall-RUSovanF","size-small":"size-small-RUSovanF","size-medium":"size-medium-RUSovanF",
"size-large":"size-large-RUSovanF","with-start-slot":"with-start-slot-RUSovanF","with-end-slot":"with-end-slot-RUSovanF"}},78195:t=>{t.exports={"small-height-breakpoint":"(max-height: 360px)",footer:"footer-PhMf7PhQ",submitButton:"submitButton-PhMf7PhQ",buttons:"buttons-PhMf7PhQ"}},73893:t=>{t.exports={errors:"errors-UKx97h9K",show:"show-UKx97h9K",error:"error-UKx97h9K","visually-hidden":"visually-hidden-UKx97h9K"}},41765:t=>{t.exports={"error-icon":"error-icon-UhKAouIg","intent-danger":"intent-danger-UhKAouIg","intent-warning":"intent-warning-UhKAouIg"}},83317:t=>{t.exports={"static-messages":"static-messages-cF4vS9J8",errors:"errors-cF4vS9J8",warnings:"warnings-cF4vS9J8","success-mesages":"success-mesages-cF4vS9J8","input-description":"input-description-cF4vS9J8",message:"message-cF4vS9J8"}},97737:(t,e,n)=>{"use strict";var r,o,s;function a(t="default"){switch(t){case"default":return"primary";case"stroke":return"secondary"}}function i(t="primary"){switch(t){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function l(t="m"){switch(t){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}n.d(e,{Button:()=>h}),function(t){t.Primary="primary",t.Success="success",t.Default="default",t.Danger="danger"}(r||(r={})),function(t){t.Small="s",t.Medium="m",t.Large="l"}(o||(o={})),function(t){t.Default="default",t.Stroke="stroke"}(s||(s={}));var c=n(50959),u=n(43814);function d(t){const{intent:e,size:n,appearance:r,useFullWidth:o,icon:s,...c}=t;return{...c,color:i(e),size:l(n),variant:a(r),stretch:o}}function h(t){return c.createElement(u.SquareButton,{...d(t)})}},43814:(t,e,n)=>{"use strict";n.d(e,{SquareButton:()=>b});var r=n(50959),o=n(97754),s=n.n(o),a=n(95604),i=n(70168),l=n.n(i);const c="apply-overflow-tooltip apply-overflow-tooltip--check-children-recursively apply-overflow-tooltip--allow-text apply-common-tooltip";function u(t){const{size:e="medium",variant:n="primary",color:r="brand",stretch:o=!1,startSlot:i,endSlot:u,iconOnly:d=!1,className:h,isGrouped:m,cellState:p,disablePositionAdjustment:g=!1,primaryText:f,secondaryText:b,isAnchor:v=!1}=t,w="brand"===r?"black":r,R=function(t){let e="";return 0!==t&&(1&t&&(e=s()(e,l()["no-corner-top-left"])),2&t&&(e=s()(e,l()["no-corner-top-right"])),4&t&&(e=s()(e,l()["no-corner-bottom-right"])),8&t&&(e=s()(e,l()["no-corner-bottom-left"]))),e}((0,a.getGroupCellRemoveRoundBorders)(p)),C=d&&(i||u);return s()(h,l().button,l()[e],l()[w],l()[n],o&&l().stretch,i&&l().withStartIcon,u&&l().withEndIcon,C&&l().iconOnly,R,m&&l().grouped,m&&!g&&l().adjustPosition,m&&p.isTop&&l().firstRow,m&&p.isLeft&&l().firstCol,f&&b&&l().multilineContent,v&&l().link,c)}function d(t){const{startSlot:e,iconOnly:n,children:o,endSlot:a,primaryText:i,secondaryText:u}=t;if(e&&a&&n)return r.createElement("span",{className:s()(l().slot,l().startSlotWrap)},e);const d=n&&(e??a),h=!e&&!a&&!n&&!o&&i&&u;return r.createElement(r.Fragment,null,e&&r.createElement("span",{className:s()(l().slot,l().startSlotWrap)},e),o&&!d&&r.createElement("span",{
className:l().content},o),a&&r.createElement("span",{className:s()(l().slot,l().endSlotWrap)},a),h&&!d&&function(t){return t.primaryText&&t.secondaryText&&r.createElement("div",{className:s()(l().textWrap,c)},r.createElement("span",{className:l().primaryText}," ",t.primaryText," "),"string"==typeof t.secondaryText?r.createElement("span",{className:l().secondaryText}," ",t.secondaryText," "):r.createElement("span",{className:l().secondaryText},r.createElement("span",null,t.secondaryText.firstLine),r.createElement("span",null,t.secondaryText.secondLine)))}(t))}var h=n(34094),m=n(86332),p=n(90186);function g(t,e){return n=>{if(e)return n.preventDefault(),void n.stopPropagation();t?.(n)}}function f(t){const{className:e,color:n,variant:r,size:o,stretch:s,iconOnly:a,startSlot:i,endSlot:l,primaryText:c,secondaryText:u,...d}=t;return{...d,...(0,p.filterDataProps)(t),...(0,p.filterAriaProps)(t)}}function b(t){const{reference:e,tooltipText:n,disabled:o,onClick:s,onMouseOver:a,onMouseOut:i,onMouseDown:l,onMouseEnter:c,"aria-disabled":p,...b}=t,{isGrouped:v,cellState:w,disablePositionAdjustment:R}=(0,r.useContext)(m.ControlGroupContext),C=u({...b,isGrouped:v,cellState:w,disablePositionAdjustment:R}),y=n??(t.primaryText?[t.primaryText,t.secondaryText].join(" "):(0,h.getTextForTooltip)(t.children));return r.createElement("button",{...f(b),"aria-disabled":o||p,tabIndex:t.tabIndex??(o?-1:0),className:C,ref:e,onClick:g(s,o),onMouseDown:g(l,o),onMouseOver:g(a,o),onMouseOut:g(i,o),onMouseEnter:g(c,o),"data-overflow-tooltip-text":y},r.createElement(d,{...b}))}n(49406)},95604:(t,e,n)=>{"use strict";function r(t){let e=0;return t.isTop&&t.isLeft||(e+=1),t.isTop&&t.isRight||(e+=2),t.isBottom&&t.isLeft||(e+=8),t.isBottom&&t.isRight||(e+=4),e}n.d(e,{getGroupCellRemoveRoundBorders:()=>r})},67029:(t,e,n)=>{"use strict";n.d(e,{ControlSkeleton:()=>w,InputClasses:()=>f});var r=n(50959),o=n(97754),s=n.n(o),a=n(50151),i=n(38528),l=n(90186),c=n(86332),u=n(95604);var d=n(10553),h=n.n(d);function m(t){let e="";return 0!==t&&(1&t&&(e=s()(e,h()["no-corner-top-left"])),2&t&&(e=s()(e,h()["no-corner-top-right"])),4&t&&(e=s()(e,h()["no-corner-bottom-right"])),8&t&&(e=s()(e,h()["no-corner-bottom-left"]))),e}function p(t,e,n,r){const{removeRoundBorder:o,className:a,intent:i="default",borderStyle:l="thin",size:c,highlight:d,disabled:p,readonly:g,stretch:f,noReadonlyStyles:b,isFocused:v}=t,w=m(o??(0,u.getGroupCellRemoveRoundBorders)(n));return s()(h().container,h()[`container-${c}`],h()[`intent-${i}`],h()[`border-${l}`],c&&h()[`size-${c}`],w,d&&h()["with-highlight"],p&&h().disabled,g&&!b&&h().readonly,v&&h().focused,f&&h().stretch,e&&h().grouped,!r&&h()["adjust-position"],n.isTop&&h()["first-row"],n.isLeft&&h()["first-col"],a)}function g(t,e,n){const{highlight:r,highlightRemoveRoundBorder:o}=t;if(!r)return h().highlight;const a=m(o??(0,u.getGroupCellRemoveRoundBorders)(e));return s()(h().highlight,h().shown,h()[`size-${n}`],a)}const f={FontSizeMedium:(0,a.ensureDefined)(h()["font-size-medium"]),FontSizeLarge:(0,a.ensureDefined)(h()["font-size-large"])},b={
passive:!1};function v(t,e){const{style:n,id:o,role:s,onFocus:a,onBlur:u,onMouseOver:d,onMouseOut:h,onMouseDown:m,onMouseUp:f,onKeyDown:v,onClick:w,tabIndex:R,startSlot:C,middleSlot:y,endSlot:S,onWheel:P,onWheelNoPassive:D=null,size:E,tag:x="span",type:B}=t,{isGrouped:M,cellState:W,disablePositionAdjustment:N=!1}=(0,r.useContext)(c.ControlGroupContext),Z=function(t,e=null,n){const o=(0,r.useRef)(null),s=(0,r.useRef)(null),a=(0,r.useCallback)((()=>{if(null===o.current||null===s.current)return;const[t,e,n]=s.current;null!==e&&o.current.addEventListener(t,e,n)}),[]),i=(0,r.useCallback)((()=>{if(null===o.current||null===s.current)return;const[t,e,n]=s.current;null!==e&&o.current.removeEventListener(t,e,n)}),[]),l=(0,r.useCallback)((t=>{i(),o.current=t,a()}),[]);return(0,r.useEffect)((()=>(s.current=[t,e,n],a(),i)),[t,e,n]),l}("wheel",D,b),A=x;return r.createElement(A,{type:B,style:n,id:o,role:s,className:p(t,M,W,N),tabIndex:R,ref:(0,i.useMergedRefs)([e,Z]),onFocus:a,onBlur:u,onMouseOver:d,onMouseOut:h,onMouseDown:m,onMouseUp:f,onKeyDown:v,onClick:w,onWheel:P,...(0,l.filterDataProps)(t),...(0,l.filterAriaProps)(t)},C,y,S,r.createElement("span",{className:g(t,W,E)}))}v.displayName="ControlSkeleton";const w=r.forwardRef(v)},78274:(t,e,n)=>{"use strict";n.d(e,{AfterSlot:()=>d,EndSlot:()=>u,MiddleSlot:()=>c,StartSlot:()=>l});var r=n(50959),o=n(97754),s=n.n(o),a=n(42130),i=n.n(a);function l(t){const{className:e,interactive:n=!0,icon:o=!1,children:a}=t;return r.createElement("span",{className:s()(i()["inner-slot"],n&&i().interactive,o&&i().icon,e)},a)}function c(t){const{className:e,children:n}=t;return r.createElement("span",{className:s()(i()["inner-slot"],i()["inner-middle-slot"],e)},n)}function u(t){const{className:e,interactive:n=!0,icon:o=!1,children:a,dataQaId:l}=t;return r.createElement("span",{className:s()(i()["inner-slot"],n&&i().interactive,o&&i().icon,e),"data-qa-id":l},a)}function d(t){const{className:e,children:n,dataQaId:o}=t;return r.createElement("span",{className:s()(i()["after-slot"],e),"data-qa-id":o},n)}},31261:(t,e,n)=>{"use strict";n.d(e,{InputControl:()=>R});var r=n(50959),o=n(97754),s=n.n(o),a=n(94489),i=n(90186),l=n(47201),c=n(48907),u=n(38528),d=n(48027),h=n(29202),m=n(45812),p=n(67029),g=n(78274),f=n(94288),b=n.n(f);function v(t){return!(0,i.isAriaAttribute)(t)&&!(0,i.isDataAttribute)(t)}function w(t){const{id:e,title:n,role:o,tabIndex:l,placeholder:c,name:u,type:d,value:h,defaultValue:m,draggable:f,autoComplete:w,autoFocus:R,autoCapitalize:C,autoCorrect:y,maxLength:S,min:P,max:D,step:E,pattern:x,inputMode:B,onSelect:M,onFocus:W,onBlur:N,onKeyDown:Z,onKeyUp:A,onKeyPress:I,onChange:F,onDragStart:T,size:k="small",className:z,inputClassName:O,disabled:_,readonly:K,containerTabIndex:L,startSlot:j,endSlot:U,reference:Q,containerReference:H,onContainerFocus:q,dataQaId:G,...$}=t,Y=(0,i.filterProps)($,v),J={...(0,i.filterAriaProps)($),...(0,i.filterDataProps)($),id:e,title:n,role:o,tabIndex:l,placeholder:c,name:u,type:d,value:h,defaultValue:m,draggable:f,autoComplete:w,autoFocus:R,autoCapitalize:C,
autoCorrect:y,maxLength:S,min:P,max:D,step:E,pattern:x,inputMode:B,onSelect:M,onFocus:W,onBlur:N,onKeyDown:Z,onKeyUp:A,onKeyPress:I,onChange:F,onDragStart:T};return r.createElement(p.ControlSkeleton,{...Y,disabled:_,readonly:K,tabIndex:L,className:s()(b().container,z),size:k,ref:H,onFocus:q,startSlot:j,middleSlot:r.createElement(g.MiddleSlot,null,r.createElement("input",{...J,className:s()(b().input,b()[`size-${k}`],O,j&&b()["with-start-slot"],U&&b()["with-end-slot"]),disabled:_,readOnly:K,ref:Q,"data-qa-id":(0,a.dataQaIds)("ui-lib-Input-input",G?`${G}-input`:void 0)})),endSlot:U,"data-qa-id":(0,a.dataQaIds)("ui-lib-Input",G)})}function R(t){t=(0,d.useControl)(t);const{disabled:e,autoSelectOnFocus:n,tabIndex:o=0,onFocus:s,onBlur:a,reference:i,containerReference:p=null,dataQaId:g}=t,f=(0,r.useRef)(null),b=(0,r.useRef)(null),[v,R]=(0,h.useFocus)(),C=e?void 0:v?-1:o,y=e?void 0:v?o:-1,{isMouseDown:S,handleMouseDown:P,handleMouseUp:D}=(0,m.useIsMouseDown)(),E=(0,l.createSafeMulticastEventHandler)(R.onFocus,(function(t){n&&!S.current&&(0,c.selectAllContent)(t.currentTarget)}),s),x=(0,l.createSafeMulticastEventHandler)(R.onBlur,a),B=(0,r.useCallback)((t=>{f.current=t,i&&("function"==typeof i&&i(t),"object"==typeof i&&(i.current=t))}),[f,i]);return r.createElement(w,{...t,isFocused:v,containerTabIndex:C,tabIndex:y,onContainerFocus:function(t){b.current===t.target&&null!==f.current&&f.current.focus()},onFocus:E,onBlur:x,reference:B,containerReference:(0,u.useMergedRefs)([b,p]),onMouseDown:P,onMouseUp:D,dataQaId:g})}},48027:(t,e,n)=>{"use strict";n.d(e,{useControl:()=>s});var r=n(47201),o=n(29202);function s(t){const{onFocus:e,onBlur:n,intent:s,highlight:a,disabled:i}=t,[l,c]=(0,o.useFocus)(void 0,i),u=(0,r.createSafeMulticastEventHandler)(i?void 0:c.onFocus,e),d=(0,r.createSafeMulticastEventHandler)(i?void 0:c.onBlur,n);return{...t,intent:s||(l?"primary":"default"),highlight:a??l,onFocus:u,onBlur:d}}},45812:(t,e,n)=>{"use strict";n.d(e,{useIsMouseDown:()=>o});var r=n(50959);function o(){const t=(0,r.useRef)(!1),e=(0,r.useCallback)((()=>{t.current=!0}),[t]),n=(0,r.useCallback)((()=>{t.current=!1}),[t]);return{isMouseDown:t,handleMouseDown:e,handleMouseUp:n}}},48907:(t,e,n)=>{"use strict";function r(t){null!==t&&t.setSelectionRange(0,t.value.length)}n.d(e,{selectAllContent:()=>r})},50182:(t,e,n)=>{"use strict";n.d(e,{AdaptiveConfirmDialog:()=>m});var r,o=n(50959),s=n(97754),a=n.n(s),i=n(97737),l=n(50151),c=n(11542),u=n(68335),d=n(79418),h=n(78195);!function(t){t.Submit="submit",t.Cancel="cancel",t.None="none"}(r||(r={}));class m extends o.PureComponent{constructor(){super(...arguments),this._dialogRef=o.createRef(),this._handleClose=()=>{const{defaultActionOnClose:t,onSubmit:e,onCancel:n,onClose:r}=this.props;switch(t){case"submit":e();break;case"cancel":n()}r()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=t=>{const{onSubmit:e,submitButtonDisabled:n,submitOnEnterKey:r}=this.props;13===(0,u.hashFromEvent)(t)&&r&&(t.preventDefault(),n||e())}}render(){
const{render:t,onClose:e,onSubmit:n,onCancel:r,footerLeftRenderer:s,submitButtonText:a,submitButtonDisabled:i,defaultActionOnClose:l,submitOnEnterKey:c,...u}=this.props;return o.createElement(d.AdaptivePopupDialog,{...u,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,l.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return t=>{const{render:e,footerLeftRenderer:r,additionalButtons:s,submitButtonText:l,submitButtonDisabled:u,onSubmit:d,cancelButtonText:m,showCancelButton:p=!0,showSubmitButton:g=!0,submitButtonClassName:f,cancelButtonClassName:b,buttonsWrapperClassName:v}=this.props;return o.createElement(o.Fragment,null,e(t),o.createElement("div",{className:h.footer},r&&r(t.isSmallWidth),o.createElement("div",{className:a()(h.buttons,v)},s,p&&o.createElement(i.Button,{className:b,name:"cancel",appearance:"stroke",onClick:this._handleCancel},m??c.t(null,void 0,n(4543))),g&&o.createElement("span",{className:h.submitButton},o.createElement(i.Button,{className:f,disabled:u,name:"submit",onClick:d,"data-name":"submit-button"},l??c.t(null,void 0,n(19295)))))))}}}m.defaultProps={defaultActionOnClose:"submit",submitOnEnterKey:!0}},1405:(t,e,n)=>{"use strict";n.d(e,{anchors:()=>o});var r;n(50959);!function(t){t.Top="top",t.Bottom="bottom",t.TopRight="topRight"}(r||(r={}));const o={bottom:{attachment:{horizontal:"left",vertical:"top"},targetAttachment:{horizontal:"left",vertical:"bottom"}},top:{attachment:{horizontal:"left",vertical:"bottom"},targetAttachment:{horizontal:"left",vertical:"top"}},topRight:{attachment:{horizontal:"right",vertical:"bottom"},targetAttachment:{horizontal:"right",vertical:"top"}},bottomRight:{attachment:{horizontal:"right",vertical:"top"},targetAttachment:{horizontal:"right",vertical:"bottom"}}}},26597:(t,e,n)=>{"use strict";n.d(e,{useKeyboardActionHandler:()=>r.useKeyboardActionHandler,useKeyboardClose:()=>r.useKeyboardClose,useKeyboardEventHandler:()=>r.useKeyboardEventHandler,useKeyboardOpen:()=>r.useKeyboardOpen,useKeyboardToggle:()=>r.useKeyboardToggle});var r=n(66686)},86623:(t,e,n)=>{"use strict";n.d(e,{FormInput:()=>c});var r=n(50959),o=n(31261),s=n(1140),a=n(78274),i=n(47201),l=n(38528);function c(t){const{intent:e,onFocus:n,onBlur:c,onMouseOver:u,onMouseOut:d,containerReference:h=null,endSlot:m,hasErrors:p,hasWarnings:g,hasSuccessMessages:f,errors:b,warnings:v,successMessages:w,alwaysShowAttachedErrors:R,iconHidden:C,messagesPosition:y,messagesAttachment:S,customErrorsAttachment:P,messagesRoot:D,inheritMessagesWidthFromTarget:E,disableMessagesRtlStyles:x,"aria-required":B,"aria-invalid":M,"aria-label":W,inputDescription:N,dataQaId:Z,...A}=t,I=(0,s.useControlValidationLayout)({hasErrors:p,hasWarnings:g,hasSuccessMessages:f,errors:b,warnings:v,successMessages:w,alwaysShowAttachedErrors:R,iconHidden:C,messagesPosition:y,messagesAttachment:S,customErrorsAttachment:P,messagesRoot:D,inheritMessagesWidthFromTarget:E,disableMessagesRtlStyles:x,inputDescription:N}),F=(0,
i.createSafeMulticastEventHandler)(n,I.onFocus),T=(0,i.createSafeMulticastEventHandler)(c,I.onBlur),k=(0,i.createSafeMulticastEventHandler)(u,I.onMouseOver),z=(0,i.createSafeMulticastEventHandler)(d,I.onMouseOut);return r.createElement(r.Fragment,null,r.createElement(o.InputControl,{...A,intent:I.intent??e,onFocus:F,onBlur:T,onMouseOver:k,onMouseOut:z,containerReference:(0,l.useMergedRefs)([h,I.containerReference]),endSlot:r.createElement(r.Fragment,null,I.icon&&r.createElement(a.EndSlot,{dataQaId:"validation-input-icon",icon:!0},I.icon),m),"aria-required":B,"aria-invalid":M,"aria-describedby":I.ariaIds,"aria-label":W,dataQaId:Z}),I.renderedErrors)}},1140:(t,e,n)=>{"use strict";n.d(e,{MessagesPosition:()=>P,useControlValidationLayout:()=>A});var r=n(50959),o=n(97754);function s(t,e){(0,r.useEffect)((()=>(e&&e(t),()=>{e&&e(t)})),[])}var a=n(29202),i=n(70412),l=n(78274),c=n(1405),u=n(86431),d=n(32227);var h=n(73893),m=n(24640);class p extends r.PureComponent{render(){const{children:t=[],show:e=!1,customErrorClass:n,disableRtlStyles:s,messageIdCallback:a,dataQaId:i}=this.props,l=o(h.errors,{[h.show]:e},n),c=t.map(((t,e)=>r.createElement(v,{key:e,messageIdCallback:a},t)));let u={position:"absolute",top:this.props.top,width:this.props.width,height:this.props.height,bottom:void 0!==this.props.bottom?this.props.bottom:"100%",right:void 0!==this.props.right?this.props.right:0,left:this.props.left,zIndex:this.props.zIndex,maxWidth:this.props.maxWidth};if((0,m.isRtl)()&&!s){const{left:t,right:e}=u;u={...u,left:e,right:t}}return r.createElement("div",{"data-qa-id":i,style:u,className:l},c)}}const g=(0,u.makeOverlapable)((f=p,(b=class extends r.PureComponent{constructor(t){super(t),this._getComponentInstance=t=>{this._instance=t},this._throttleCalcProps=()=>{requestAnimationFrame((()=>this.setState(this._calcProps(this.props))))},this.state=this._getStateFromProps()}componentDidMount(){this._instanceElem=d.findDOMNode(this._instance),this.props.attachOnce||this._subscribe(),this.setState(this._calcProps(this.props))}componentDidUpdate(t){t.children===this.props.children&&t.top===this.props.top&&t.left===this.props.left&&t.width===this.props.width||this.setState(this._getStateFromProps(),(()=>this.setState(this._calcProps(this.props))))}render(){return r.createElement("div",{style:{position:"absolute",width:"100%",top:0,left:0}},r.createElement(f,{...this.props,ref:this._getComponentInstance,top:this.state.top,bottom:void 0!==this.state.bottom?this.state.bottom:"auto",right:void 0!==this.state.right?this.state.right:"auto",left:this.state.left,width:this.state.width,maxWidth:this.state.maxWidth},this.props.children))}componentWillUnmount(){this._unsubsribe()}_getStateFromProps(){return{bottom:this.props.bottom,left:this.props.left,right:this.props.right,top:void 0!==this.props.top?this.props.top:-1e4,width:this.props.inheritWidthFromTarget?this.props.target&&this.props.target.getBoundingClientRect().width:this.props.width,
maxWidth:this.props.inheritMaxWidthFromTarget&&this.props.target&&this.props.target.getBoundingClientRect().width}}_calcProps(t){if(t.target&&t.attachment&&t.targetAttachment){const e=this._calcTargetProps(t.target,t.attachment,t.targetAttachment);if(null===e)return{};const{width:n,inheritWidthFromTarget:r=!0,inheritMaxWidthFromTarget:o=!1}=this.props,s={width:r?e.width:n,maxWidth:o?e.width:void 0};switch(t.attachment.vertical){case"bottom":case"middle":s.top=e.y;break;default:s[t.attachment.vertical]=e.y}switch(t.attachment.horizontal){case"right":case"center":s.left=e.x;break;default:s[t.attachment.horizontal]=e.x}return s}return{}}_calcTargetProps(t,e,n){const r=t.getBoundingClientRect(),o=this._instanceElem.getBoundingClientRect(),s="parent"===this.props.root?this._getCoordsRelToParentEl(t,r):this._getCoordsRelToDocument(r);if(null===s)return null;const a=this._getDimensions(o),i=this._getDimensions(r).width;let l=0,c=0;switch(e.vertical){case"top":c=s[n.vertical];break;case"bottom":c=s[n.vertical]-a.height;break;case"middle":c=s[n.vertical]-a.height/2}switch(e.horizontal){case"left":l=s[n.horizontal];break;case"right":l=s[n.horizontal]-a.width;break;case"center":l=s[n.horizontal]-a.width/2}return"number"==typeof this.props.attachmentOffsetY&&(c+=this.props.attachmentOffsetY),"number"==typeof this.props.attachmentOffsetX&&(l+=this.props.attachmentOffsetX),{x:l,y:c,width:i}}_getCoordsRelToDocument(t){const e=pageYOffset,n=pageXOffset,r=t.top+e,o=t.bottom+e,s=t.left+n;return{top:r,bottom:o,left:s,right:t.right+n,middle:(r+t.height)/2,center:s+t.width/2}}_getCoordsRelToParentEl(t,e){const n=t.offsetParent;if(null===n)return null;const r=n.scrollTop,o=n.scrollLeft,s=t.offsetTop+r,a=t.offsetLeft+o,i=e.width+a;return{top:s,bottom:e.height+s,left:a,right:i,middle:(s+e.height)/2,center:(a+e.width)/2}}_getDimensions(t){return{height:t.height,width:t.width}}_subscribe(){"document"===this.props.root&&(window.addEventListener("scroll",this._throttleCalcProps,!0),window.addEventListener("resize",this._throttleCalcProps))}_unsubsribe(){window.removeEventListener("scroll",this._throttleCalcProps,!0),window.removeEventListener("resize",this._throttleCalcProps)}}).displayName="Attachable Component",b));var f,b;function v(t){const{children:e,messageIdCallback:n,...o}=t;return r.createElement("div",{...o,className:h.error},e)}function w(t){const{children:e,messageIdCallback:n,...o}=t,a=r.useId();return s(a,n),r.createElement("span",{...o,className:h["visually-hidden"],id:a},e)}var R=n(9745),C=n(16658),y=n(41765);function S(t){const{intent:e="danger"}=t;return r.createElement(R.Icon,{icon:C,className:o(y["error-icon"],y[`intent-${e}`])})}var P,D,E=n(83317);!function(t){t[t.Attached=0]="Attached",t[t.Static=1]="Static",t[t.Hidden=2]="Hidden"}(P||(P={})),function(t){t.Top="top",t.Bottom="bottom"}(D||(D={}));const x={top:{attachment:c.anchors.topRight.attachment,targetAttachment:c.anchors.topRight.targetAttachment,attachmentOffsetY:-4},bottom:{attachment:c.anchors.bottomRight.attachment,
targetAttachment:c.anchors.bottomRight.targetAttachment,attachmentOffsetY:4}};function B(t){const{isOpened:e,target:n,errorAttachment:o=D.Top,customErrorsAttachment:s,root:a="parent",inheritWidthFromTarget:i=!1,disableRtlStyles:l,children:c,messageIdCallback:u,dataQaId:d}=t,{attachment:h,targetAttachment:m,attachmentOffsetY:p}=s??x[o];return r.createElement(r.Fragment,null,r.createElement(g,{isOpened:e,target:s?.target??n,root:a,inheritWidthFromTarget:i,attachment:h,targetAttachment:m,attachmentOffsetY:p,disableRtlStyles:l,messageIdCallback:u,inheritMaxWidthFromTarget:!0,show:!0,dataQaId:d},c),r.createElement(w,{messageIdCallback:u},c))}function M(t,e){return Boolean(t)&&void 0!==e&&e.length>0}function W(t,e,n){return t===P.Attached&&M(e,n)}function N(t,e,n){return t===P.Static&&M(e,n)}function Z(t,e,n){const{hasErrors:r,hasWarnings:o,hasSuccessMessages:s,alwaysShowAttachedErrors:a,iconHidden:i,errors:l,warnings:c,successMessages:u,messagesPosition:d=P.Static}=t,h=W(d,r,l),m=W(d,o,c),p=h&&(e||n||Boolean(a)),g=!p&&m&&(e||n),f=N(d,r,l),b=!f&&N(d,o,c),v=!f&&!b&&N(d,s,u),w=!i&&Boolean(r),R=!i&&!w&&Boolean(o),C=function(t,e,n){return Boolean(n)?"success":Boolean(t)?"danger":Boolean(e)?"warning":void 0}(r,o,s);return{hasAttachedErrorMessages:h,hasAttachedWarningMessages:m,showAttachedErrorMessages:p,showAttachedWarningMessages:g,showStaticErrorMessages:f,showStaticWarningMessages:b,showStaticSuccessMessages:v,showErrorIcon:w,showWarningIcon:R,intent:C}}function A(t){const{errors:e,warnings:n,successMessages:s,messagesAttachment:c,customErrorsAttachment:u,messagesRoot:d,inheritMessagesWidthFromTarget:h,disableMessagesRtlStyles:m,inputDescription:p}=t,[g,f]=(0,a.useFocus)(),[b,v]=(0,i.useHoverDeprecated)(),w=(0,r.useRef)(null),[R,C]=r.useState(void 0),y=(0,r.useRef)(new Map),P=r.useCallback((t=>{if(!t)return;const e=y.current;e.has(t)?e.delete(t):e.set(t,t),0!==e.size?C(Array.from(e.keys()).join(" ")):C(void 0)}),[C,y.current]),{hasAttachedErrorMessages:D,hasAttachedWarningMessages:x,showAttachedErrorMessages:M,showAttachedWarningMessages:W,showStaticErrorMessages:N,showStaticWarningMessages:A,showStaticSuccessMessages:F,showErrorIcon:T,showWarningIcon:k,intent:z}=Z(t,g,b),O=T||k?r.createElement(S,{intent:T?"danger":"warning"}):void 0,_=D?r.createElement(B,{errorAttachment:c,customErrorsAttachment:u,isOpened:M,target:w.current,root:d,inheritWidthFromTarget:h,disableRtlStyles:m,children:e,messageIdCallback:P,dataQaId:"attached-error-box"}):void 0,K=x?r.createElement(B,{errorAttachment:c,isOpened:W,target:w.current,root:d,inheritWidthFromTarget:h,disableRtlStyles:m,children:n,messageIdCallback:P,dataQaId:"attached-warning-box"}):void 0,L=N?r.createElement(l.AfterSlot,{dataQaId:"static-errors",className:o(E["static-messages"],E.errors)},e?.map(((t,e)=>r.createElement(I,{key:e,messageIdCallback:P},t)))):void 0,j=A?r.createElement(l.AfterSlot,{dataQaId:"static-warnings",className:o(E["static-messages"],E.warnings)},n?.map(((t,e)=>r.createElement(I,{key:e,messageIdCallback:P},t)))):void 0,U=F?r.createElement(l.AfterSlot,{
dataQaId:"success-message",className:o(E["static-messages"],E["success-mesages"])},s?.map(((t,e)=>r.createElement(I,{key:e,messageIdCallback:P},t)))):void 0,Q=!N&&!A&&!F&&p?r.createElement(l.AfterSlot,{dataQaId:"success-messages",className:o(E["static-messages"],E["input-description"])},r.createElement(I,{messageIdCallback:P},p)):void 0;return{ariaIds:R,icon:O,renderedErrors:_??K??L??j??U??Q,containerReference:w,intent:z,...f,...v}}function I(t){const{children:e,messageIdCallback:n,...o}=t,a=r.useId();return s(a,n),r.createElement("span",{...o,className:E.message,"aria-live":"assertive",id:a},e)}},16658:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" fill-rule="evenodd" d="M9 16A7 7 0 1 0 9 2a7 7 0 0 0 0 14Zm0 1A8 8 0 1 0 9 1a8 8 0 0 0 0 16ZM8 5a1 1 0 0 1 2 0v4a1 1 0 1 1-2 0V5Zm1 7a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>'}}]);