(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[6085],{6539:t=>{t.exports={button:"button-YKkCvwjV",content:"content-YKkCvwjV","icon-only":"icon-only-YKkCvwjV","color-brand":"color-brand-YKkCvwjV","variant-primary":"variant-primary-YKkCvwjV","variant-secondary":"variant-secondary-YKkCvwjV","color-gray":"color-gray-YKkCvwjV","color-green":"color-green-YKkCvwjV","color-red":"color-red-YKkCvwjV","size-xsmall":"size-xsmall-YKkCvwjV","size-small":"size-small-YKkCvwjV","size-medium":"size-medium-YKkCvwjV","size-large":"size-large-YKkCvwjV","size-xlarge":"size-xlarge-YKkCvwjV","with-start-icon":"with-start-icon-YKkCvwjV","with-end-icon":"with-end-icon-YKkCvwjV","start-icon-wrap":"start-icon-wrap-YKkCvwjV","end-icon-wrap":"end-icon-wrap-YKkCvwjV",animated:"animated-YKkCvwjV",stretch:"stretch-YKkCvwjV",grouped:"grouped-YKkCvwjV","adjust-position":"adjust-position-YKkCvwjV","first-row":"first-row-YKkCvwjV","first-col":"first-col-YKkCvwjV","no-corner-top-left":"no-corner-top-left-YKkCvwjV","no-corner-top-right":"no-corner-top-right-YKkCvwjV","no-corner-bottom-right":"no-corner-bottom-right-YKkCvwjV","no-corner-bottom-left":"no-corner-bottom-left-YKkCvwjV"}},21103:t=>{t.exports={container:"container-pgo9gj31","intent-default":"intent-default-pgo9gj31",focused:"focused-pgo9gj31",readonly:"readonly-pgo9gj31",disabled:"disabled-pgo9gj31","with-highlight":"with-highlight-pgo9gj31",grouped:"grouped-pgo9gj31","adjust-position":"adjust-position-pgo9gj31","first-row":"first-row-pgo9gj31","first-col":"first-col-pgo9gj31",stretch:"stretch-pgo9gj31","font-size-medium":"font-size-medium-pgo9gj31","font-size-large":"font-size-large-pgo9gj31","size-small":"size-small-pgo9gj31","size-medium":"size-medium-pgo9gj31","size-large":"size-large-pgo9gj31","intent-success":"intent-success-pgo9gj31","intent-warning":"intent-warning-pgo9gj31","intent-danger":"intent-danger-pgo9gj31","intent-primary":"intent-primary-pgo9gj31","border-none":"border-none-pgo9gj31","border-thin":"border-thin-pgo9gj31","border-thick":"border-thick-pgo9gj31","no-corner-top-left":"no-corner-top-left-pgo9gj31","no-corner-top-right":"no-corner-top-right-pgo9gj31","no-corner-bottom-right":"no-corner-bottom-right-pgo9gj31","no-corner-bottom-left":"no-corner-bottom-left-pgo9gj31",highlight:"highlight-pgo9gj31",shown:"shown-pgo9gj31"}},10306:t=>{t.exports={"inner-slot":"inner-slot-QpAAIiaV",interactive:"interactive-QpAAIiaV",icon:"icon-QpAAIiaV","inner-middle-slot":"inner-middle-slot-QpAAIiaV","before-slot":"before-slot-QpAAIiaV","after-slot":"after-slot-QpAAIiaV"}},66579:t=>{t.exports={input:"input-uGWFLwEy","with-start-slot":"with-start-slot-uGWFLwEy","with-end-slot":"with-end-slot-uGWFLwEy"}},91131:t=>{t.exports={"small-height-breakpoint":"screen and (max-height: 360px)",footer:"footer-xe9kH1lJ",submitButton:"submitButton-xe9kH1lJ",buttons:"buttons-xe9kH1lJ"}},66875:t=>{t.exports={errors:"errors-Cv6NxnRZ",show:"show-Cv6NxnRZ",error:"error-Cv6NxnRZ"}},93314:t=>{t.exports={"error-icon":"error-icon-llFIA0b4","intent-danger":"intent-danger-llFIA0b4",
"intent-warning":"intent-warning-llFIA0b4"}},88722:t=>{t.exports={wrap:"wrap-TyQYOCnx",input:"input-TyQYOCnx"}},24451:t=>{t.exports={icon:"icon-P882WPW5"}},52965:t=>{t.exports={"static-messages":"static-messages-Yp0dNSLN",errors:"errors-Yp0dNSLN",warnings:"warnings-Yp0dNSLN",message:"message-Yp0dNSLN"}},23576:t=>{t.exports={"tablet-small-breakpoint":"screen and (max-width: 428px)",item:"item-4TFSfyGO",hovered:"hovered-4TFSfyGO",isDisabled:"isDisabled-4TFSfyGO",isActive:"isActive-4TFSfyGO",shortcut:"shortcut-4TFSfyGO",toolbox:"toolbox-4TFSfyGO",withIcon:"withIcon-4TFSfyGO",icon:"icon-4TFSfyGO",labelRow:"labelRow-4TFSfyGO",label:"label-4TFSfyGO",showOnHover:"showOnHover-4TFSfyGO"}},94720:(t,e,n)=>{"use strict";n.d(e,{Button:()=>w});var o=n(59496),r=n(97754),s=n(95604),i=n(9745),a=n(6539),c=n.n(a);function l(t){const{color:e="brand",size:n="medium",variant:o="primary",stretch:i=!1,icon:a,startIcon:l,endIcon:u,iconOnly:h=!1,className:d,isGrouped:m,cellState:p,disablePositionAdjustment:f=!1}=t,g=function(t){let e="";return 0!==t&&(1&t&&(e=r(e,c()["no-corner-top-left"])),2&t&&(e=r(e,c()["no-corner-top-right"])),4&t&&(e=r(e,c()["no-corner-bottom-right"])),8&t&&(e=r(e,c()["no-corner-bottom-left"]))),e}((0,s.getGroupCellRemoveRoundBorders)(p));return r(d,c().button,c()["size-"+n],c()["color-"+e],c()["variant-"+o],i&&c().stretch,(a||l)&&c()["with-start-icon"],u&&c()["with-end-icon"],h&&c()["icon-only"],g,m&&c().grouped,m&&!f&&c()["adjust-position"],m&&p.isTop&&c()["first-row"],m&&p.isLeft&&c()["first-col"])}function u(t){const{size:e,startIcon:n,icon:r,iconOnly:s,children:a,endIcon:l}=t,u=null!=n?n:r;return o.createElement(o.Fragment,null,u&&"xsmall"!==e&&o.createElement(i.Icon,{icon:u,className:c()["start-icon-wrap"]}),a&&o.createElement("span",{className:c().content},a),l&&!s&&"xsmall"!==e&&o.createElement(i.Icon,{icon:l,className:c()["end-icon-wrap"]}))}var h=n(86332),d=n(90186);function m(t){const{className:e,color:n,variant:o,size:r,stretch:s,animated:i,icon:a,iconOnly:c,startIcon:l,endIcon:u,...h}=t;return{...h,...(0,d.filterDataProps)(t),...(0,d.filterAriaProps)(t)}}function p(t){const{reference:e,...n}=t,{isGrouped:r,cellState:s,disablePositionAdjustment:i}=(0,o.useContext)(h.ControlGroupContext),a=l({...n,isGrouped:r,cellState:s,disablePositionAdjustment:i});return o.createElement("button",{...m(n),className:a,ref:e},o.createElement(u,{...n}))}function f(t="default"){switch(t){case"default":return"primary";case"stroke":return"secondary"}}function g(t="primary"){switch(t){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function v(t="m"){switch(t){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}function b(t){const{intent:e,size:n,appearance:o,useFullWidth:r,icon:s,...i}=t;return{...i,color:g(e),size:v(n),variant:f(o),stretch:r,startIcon:s}}function w(t){return o.createElement(p,{...b(t)})}},86332:(t,e,n)=>{"use strict";n.d(e,{ControlGroupContext:()=>o});const o=n(59496).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,
isLeft:!0}})},95604:(t,e,n)=>{"use strict";function o(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:()=>o})},67029:(t,e,n)=>{"use strict";n.d(e,{ControlSkeleton:()=>b,InputClasses:()=>f});var o=n(59496),r=n(97754),s=n(88537),i=n(66092),a=n(90186),c=n(86332),l=n(95604);var u=n(21103),h=n.n(u);function d(t){let e="";return 0!==t&&(1&t&&(e=r(e,h()["no-corner-top-left"])),2&t&&(e=r(e,h()["no-corner-top-right"])),4&t&&(e=r(e,h()["no-corner-bottom-right"])),8&t&&(e=r(e,h()["no-corner-bottom-left"]))),e}function m(t,e,n,o){const{removeRoundBorder:s,className:i,intent:a="default",borderStyle:c="thin",size:u,highlight:m,disabled:p,readonly:f,stretch:g,noReadonlyStyles:v,isFocused:b}=t,w=d(null!=s?s:(0,l.getGroupCellRemoveRoundBorders)(n));return r(h().container,h()["intent-"+a],h()["border-"+c],u&&h()["size-"+u],w,m&&h()["with-highlight"],p&&h().disabled,f&&!v&&h().readonly,b&&h().focused,g&&h().stretch,e&&h().grouped,!o&&h()["adjust-position"],n.isTop&&h()["first-row"],n.isLeft&&h()["first-col"],i)}function p(t,e){const{highlight:n,highlightRemoveRoundBorder:o}=t;if(!n)return h().highlight;const s=d(null!=o?o:(0,l.getGroupCellRemoveRoundBorders)(e));return r(h().highlight,h().shown,s)}const f={FontSizeMedium:(0,s.ensureDefined)(h()["font-size-medium"]),FontSizeLarge:(0,s.ensureDefined)(h()["font-size-large"])},g={passive:!1};function v(t,e){const{id:n,role:r,onFocus:s,onBlur:l,onMouseOver:u,onMouseOut:h,onMouseDown:d,onMouseUp:f,onKeyDown:v,onClick:b,tabIndex:w,startSlot:C,middleSlot:E,endSlot:S,onWheel:y,onWheelNoPassive:k=null}=t,{isGrouped:x,cellState:M,disablePositionAdjustment:N=!1}=(0,o.useContext)(c.ControlGroupContext),A=function(t,e=null,n){const r=(0,o.useRef)(null),s=(0,o.useRef)(null),i=(0,o.useCallback)(()=>{if(null===r.current||null===s.current)return;const[t,e,n]=s.current;null!==e&&r.current.addEventListener(t,e,n)},[]),a=(0,o.useCallback)(()=>{if(null===r.current||null===s.current)return;const[t,e,n]=s.current;null!==e&&r.current.removeEventListener(t,e,n)},[]),c=(0,o.useCallback)(t=>{a(),r.current=t,i()},[]);return(0,o.useEffect)(()=>(s.current=[t,e,n],i(),a),[t,e,n]),c}("wheel",k,g);return o.createElement("span",{id:n,role:r,className:m(t,x,M,N),tabIndex:w,ref:(0,i.useMergedRefs)([e,A]),onFocus:s,onBlur:l,onMouseOver:u,onMouseOut:h,onMouseDown:d,onMouseUp:f,onKeyDown:v,onClick:b,onWheel:y,...(0,a.filterDataProps)(t),...(0,a.filterAriaProps)(t)},C,E,S,o.createElement("span",{className:p(t,M)}))}v.displayName="ControlSkeleton";const b=o.forwardRef(v)},78274:(t,e,n)=>{"use strict";n.d(e,{StartSlot:()=>a,MiddleSlot:()=>c,EndSlot:()=>l,AfterSlot:()=>u});var o=n(59496),r=n(97754),s=n(10306),i=n.n(s);function a(t){const{className:e,interactive:n=!0,icon:s=!1,children:a}=t;return o.createElement("span",{className:r(i()["inner-slot"],n&&i().interactive,s&&i().icon,e)},a)}function c(t){const{className:e,children:n}=t;return o.createElement("span",{
className:r(i()["inner-slot"],i()["inner-middle-slot"],e)},n)}function l(t){const{className:e,interactive:n=!0,icon:s=!1,children:a}=t;return o.createElement("span",{className:r(i()["inner-slot"],n&&i().interactive,s&&i().icon,e)},a)}function u(t){const{className:e,children:n}=t;return o.createElement("span",{className:r(i()["after-slot"],e)},n)}},31261:(t,e,n)=>{"use strict";n.d(e,{InputControl:()=>b});var o=n(59496),r=n(97754),s=n(90186),i=n(47201),a=n(48907),c=n(66092),l=n(48027),u=n(29202),h=n(45812),d=n(67029),m=n(78274),p=n(66579),f=n.n(p);function g(t){return!(0,s.isAriaAttribute)(t)&&!(0,s.isDataAttribute)(t)}function v(t){const{id:e,title:n,role:i,tabIndex:a,placeholder:c,name:l,type:u,value:h,defaultValue:p,draggable:v,autoComplete:b,autoFocus:w,maxLength:C,min:E,max:S,step:y,pattern:k,inputMode:x,onSelect:M,onFocus:N,onBlur:A,onKeyDown:R,onKeyUp:O,onKeyPress:F,onChange:j,onDragStart:z,size:B="medium",className:I,inputClassName:T,disabled:D,readonly:P,containerTabIndex:_,startSlot:K,endSlot:W,reference:V,containerReference:Y,onContainerFocus:L,...H}=t,G=(0,s.filterProps)(H,g),U={...(0,s.filterAriaProps)(H),...(0,s.filterDataProps)(H),id:e,title:n,role:i,tabIndex:a,placeholder:c,name:l,type:u,value:h,defaultValue:p,draggable:v,autoComplete:b,autoFocus:w,maxLength:C,min:E,max:S,step:y,pattern:k,inputMode:x,onSelect:M,onFocus:N,onBlur:A,onKeyDown:R,onKeyUp:O,onKeyPress:F,onChange:j,onDragStart:z};return o.createElement(d.ControlSkeleton,{...G,disabled:D,readonly:P,tabIndex:_,className:r(f().container,I),size:B,ref:Y,onFocus:L,startSlot:K,middleSlot:o.createElement(m.MiddleSlot,null,o.createElement("input",{...U,className:r(f().input,T,K&&f()["with-start-slot"],W&&f()["with-end-slot"]),disabled:D,readOnly:P,ref:V})),endSlot:W})}function b(t){t=(0,l.useControl)(t);const{disabled:e,autoSelectOnFocus:n,tabIndex:r=0,onFocus:s,onBlur:d,reference:m,containerReference:p=null}=t,f=(0,o.useRef)(null),g=(0,o.useRef)(null),[b,w]=(0,u.useFocus)(),C=e?void 0:b?-1:r,E=e?void 0:b?r:-1,{isMouseDown:S,handleMouseDown:y,handleMouseUp:k}=(0,h.useIsMouseDown)(),x=(0,i.createSafeMulticastEventHandler)(w.onFocus,(function(t){n&&!S.current&&(0,a.selectAllContent)(t.currentTarget)}),s),M=(0,i.createSafeMulticastEventHandler)(w.onBlur,d),N=(0,o.useCallback)(t=>{f.current=t,m&&("function"==typeof m&&m(t),"object"==typeof m&&(m.current=t))},[f,m]);return o.createElement(v,{...t,isFocused:b,containerTabIndex:C,tabIndex:E,onContainerFocus:function(t){g.current===t.target&&null!==f.current&&f.current.focus()},onFocus:x,onBlur:M,reference:N,containerReference:(0,c.useMergedRefs)([g,p]),onMouseDown:y,onMouseUp:k})}},48027:(t,e,n)=>{"use strict";n.d(e,{useControl:()=>s});var o=n(47201),r=n(29202);function s(t){const{onFocus:e,onBlur:n,intent:s,highlight:i,disabled:a}=t,[c,l]=(0,r.useFocus)(void 0,a),u=(0,o.createSafeMulticastEventHandler)(a?void 0:l.onFocus,e),h=(0,o.createSafeMulticastEventHandler)(a?void 0:l.onBlur,n);return{...t,intent:s||(c?"primary":"default"),highlight:null!=i?i:c,onFocus:u,onBlur:h}}},29202:(t,e,n)=>{"use strict"
;n.d(e,{useFocus:()=>r});var o=n(59496);function r(t,e){const[n,r]=(0,o.useState)(!1);(0,o.useEffect)(()=>{e&&n&&r(!1)},[e,n]);const s={onFocus:(0,o.useCallback)((function(e){void 0!==t&&t.current!==e.target||r(!0)}),[t]),onBlur:(0,o.useCallback)((function(e){void 0!==t&&t.current!==e.target||r(!1)}),[t])};return[n,s]}},45812:(t,e,n)=>{"use strict";n.d(e,{useIsMouseDown:()=>r});var o=n(59496);function r(){const t=(0,o.useRef)(!1),e=(0,o.useCallback)(()=>{t.current=!0},[t]),n=(0,o.useCallback)(()=>{t.current=!1},[t]);return{isMouseDown:t,handleMouseDown:e,handleMouseUp:n}}},66092:(t,e,n)=>{"use strict";n.d(e,{useMergedRefs:()=>r});var o=n(59496);function r(t){return(0,o.useCallback)(function(t){return e=>{t.forEach(t=>{"function"==typeof t?t(e):null!=t&&(t.current=e)})}}(t),t)}},48907:(t,e,n)=>{"use strict";function o(t){null!==t&&t.setSelectionRange(0,t.value.length)}n.d(e,{selectAllContent:()=>o})},47201:(t,e,n)=>{"use strict";function o(...t){return e=>{for(const n of t)void 0!==n&&n(e)}}n.d(e,{createSafeMulticastEventHandler:()=>o})},50182:(t,e,n)=>{"use strict";n.d(e,{AdaptiveConfirmDialog:()=>d});var o=n(59496),r=n(97754),s=n.n(r),i=n(94720),a=n(88537),c=n(28353),l=n(68335),u=n(85457),h=n(91131);class d extends o.PureComponent{constructor(){super(...arguments),this._dialogRef=o.createRef(),this._handleClose=()=>{const{defaultActionOnClose:t,onSubmit:e,onCancel:n,onClose:o}=this.props;switch(t){case"submit":e();break;case"cancel":n()}o()},this._handleCancel=()=>{this.props.onCancel(),this.props.onClose()},this._handleKeyDown=t=>{const{onSubmit:e,submitButtonDisabled:n,submitOnEnterKey:o}=this.props;13===(0,l.hashFromEvent)(t)&&o&&(t.preventDefault(),n||e())}}render(){const{render:t,onClose:e,onSubmit:n,onCancel:r,footerLeftRenderer:s,submitButtonText:i,submitButtonDisabled:a,defaultActionOnClose:c,submitOnEnterKey:l,...h}=this.props;return o.createElement(u.AdaptivePopupDialog,{...h,ref:this._dialogRef,onKeyDown:this._handleKeyDown,render:this._renderChildren(),onClose:this._handleClose})}focus(){(0,a.ensureNotNull)(this._dialogRef.current).focus()}_renderChildren(){return t=>{const{render:e,footerLeftRenderer:n,additionalButtons:r,submitButtonText:a,submitButtonDisabled:l,onSubmit:u,cancelButtonText:d,showCancelButton:m=!0,submitButtonClassName:p,cancelButtonClassName:f,buttonsWrapperClassName:g}=this.props;return o.createElement(o.Fragment,null,e(t),o.createElement("div",{className:h.footer},n&&n(t.isSmallWidth),o.createElement("div",{className:s()(h.buttons,g)},r,m&&o.createElement(i.Button,{className:f,name:"cancel",appearance:"stroke",onClick:this._handleCancel},null!=d?d:(0,c.t)("Cancel")),o.createElement("span",{className:h.submitButton},o.createElement(i.Button,{className:p,disabled:l,name:"submit",onClick:u,"data-name":"submit-button"},null!=a?a:(0,c.t)("Ok"))))))}}}d.defaultProps={defaultActionOnClose:"submit",submitOnEnterKey:!0}},27365:(t,e,n)=>{"use strict";n.d(e,{getTimezoneName:()=>o});n(10480);function o(t){const e=t.model().timezone();if("exchange"!==e)return e
;const n=t.model().mainSeries().symbolInfo();return null==n?void 0:n.timezone}},1405:(t,e,n)=>{"use strict";n.d(e,{anchors:()=>o});n(59496);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"}}}},70412:(t,e,n)=>{"use strict";n.d(e,{hoverMouseEventFilter:()=>s,useAccurateHover:()=>i,useHover:()=>r});var o=n(59496);function r(){const[t,e]=(0,o.useState)(!1);return[t,{onMouseOver:function(t){s(t)&&e(!0)},onMouseOut:function(t){s(t)&&e(!1)}}]}function s(t){return!t.currentTarget.contains(t.relatedTarget)}function i(t){const[e,n]=(0,o.useState)(!1);return(0,o.useEffect)(()=>{const e=e=>{if(null===t.current)return;const o=t.current.contains(e.target);n(o)};return document.addEventListener("mouseover",e),()=>document.removeEventListener("mouseover",e)},[]),e}},86623:(t,e,n)=>{"use strict";n.d(e,{FormInput:()=>l});var o=n(59496),r=n(31261),s=n(84275),i=n(78274),a=n(47201),c=n(66092);function l(t){var e;const{intent:n,onFocus:l,onBlur:u,onMouseOver:h,onMouseOut:d,containerReference:m=null,endSlot:p,hasErrors:f,hasWarnings:g,errors:v,warnings:b,alwaysShowAttachedErrors:w,iconHidden:C,messagesPosition:E,messagesAttachment:S,customErrorsAttachment:y,messagesRoot:k,inheritMessagesWidthFromTarget:x,disableMessagesRtlStyles:M,...N}=t,A=(0,s.useControlValidationLayout)({hasErrors:f,hasWarnings:g,errors:v,warnings:b,alwaysShowAttachedErrors:w,iconHidden:C,messagesPosition:E,messagesAttachment:S,customErrorsAttachment:y,messagesRoot:k,inheritMessagesWidthFromTarget:x,disableMessagesRtlStyles:M}),R=(0,a.createSafeMulticastEventHandler)(l,A.onFocus),O=(0,a.createSafeMulticastEventHandler)(u,A.onBlur),F=(0,a.createSafeMulticastEventHandler)(h,A.onMouseOver),j=(0,a.createSafeMulticastEventHandler)(d,A.onMouseOut);return o.createElement(o.Fragment,null,o.createElement(r.InputControl,{...N,intent:null!==(e=A.intent)&&void 0!==e?e:n,onFocus:R,onBlur:O,onMouseOver:F,onMouseOut:j,containerReference:(0,c.useMergedRefs)([m,A.containerReference]),endSlot:o.createElement(o.Fragment,null,A.icon&&o.createElement(i.EndSlot,{icon:!0},A.icon),p)}),A.renderedErrors)}},36565:(t,e,n)=>{"use strict";n.d(e,{TimeInput:()=>I});var o=n(49483),r=n(59496),s=n(97754),i=n.n(s),a=n(88537),c=n(47201),l=n(78274),u=n(31261),h=n(9745),d=n(24451),m=n(35692);function p(t){return r.createElement(h.Icon,{className:d.icon,icon:m})}var f=n(29202),g=n(88722);var v=n(58095),b=n(64514);const w={0:{pattern:/\d/},9:{pattern:/\d/,optional:!0},"#":{pattern:/\d/,recursive:!0},A:{pattern:/[a-zA-Z0-9]/},S:{pattern:/[a-zA-Z]/}};function C(t,e,n){const o=[],r=n;let s=0,i=0;const a=t.length,c=r.length;let l=-1,u=0;const h=[],d=a-1,m=[];let p;for(;s<a&&i<c;){
const n=t.charAt(s),a=r.charAt(i),c=w[n];c?(a.match(c.pattern)?(o.push(a),c.recursive&&(-1===l?l=s:s===d&&s!==l&&(s=l-1),d===l&&(s-=1)),s+=1):a===p?(u--,p=void 0):c.optional?(s+=1,i-=1):c.fallback?(o.push(c.fallback),s+=1,i-=1):m.push({p:i,v:a,e:c.pattern}),i+=1):(e||o.push(n),a===n?(h.push(i),i+=1):(p=n,h.push(i+u),u++),s+=1)}const f=t.charAt(d);a!==c+1||w[f]||o.push(f);const g=o.join("");return[g,function(t,e){const n={};for(let t=0;t<e.length;t++)n[e[t]+0]=1;return n}(0,h),m]}function E(t,e,n){const o=function(t){let e=!0;for(let n=0;n<t.length;n++){const o=w[t.charAt(n)];if(o&&o.recursive){e=!1;break}}return e?t.length:void 0}(t),[s,i]=C(t,!1,e),[c,l]=(0,r.useState)(s),[u,h]=(0,r.useState)(0),[d,m]=(0,r.useState)(!1),p=(0,r.useRef)(i),f=(0,r.useRef)(c);return(0,r.useEffect)(()=>{const[n,o]=C(t,!1,e);l(n),g(o)},[e,t]),(0,r.useLayoutEffect)(()=>{const t=(0,a.ensureNotNull)(n.current);d&&(t.setSelectionRange(u,u),m(!1)),h(S(t))},[d]),[e,f,{onChange:function(){const e=(0,a.ensureNotNull)(n.current),o=e.value,[r,s]=C(t,!1,o);l(r),f.current=r;const i=g(s),d=function(t,e,n,o,r,s){if(t!==e){const i=e.length,a=t.length;let c=0,l=0,u=0,h=0,d=0;for(d=o;d<i&&r[d];d++)l++;for(d=o-1;d>=0&&r[d];d--)c++;for(d=o-1;d>=0;d--)r[d]&&u++;for(d=n-1;d>=0;d--)s[d]&&h++;if(o>a)o=10*i;else if(n>=o&&n!==a){if(s[o]){const t=o;o-=h-u,r[o-=c]&&(o=t)}}else o>n&&(o+=u-h,o+=l)}return o}(c,r,u,S(e),s,i);h(d),m(!0)},onSelect:function(){const t=(0,a.ensureNotNull)(n.current);h(S(t))},maxLength:o}];function g(t){const e=p.current;return p.current=t,e}}function S(t){return t.selectionStart||0}function y(t){const{value:e,mask:n,onChange:o,...s}=t,i=(0,r.useRef)(null),[a,c,l]=E(n,e,i);return(0,r.useLayoutEffect)(()=>{void 0!==t.reference&&(t.reference.current=i.current)},[t.reference]),r.createElement(u.InputControl,{...s,maxLength:l.maxLength,value:a,autoComplete:"off",reference:function(t){i.current=t},onChange:function(){l.onChange(),o(c.current)},onSelect:l.onSelect})}var k=n(68335),x=n(50628),M=n(16396),N=n(55257);const A=(()=>{const t=[];for(let e=0;e<24;++e)for(let n=0;n<60;n+=15){const[o,r]=[z(e.toString()),z(n.toString())],s=`${o}:${r}`,i=F(s)?s:j(s);t.push(i)}return t})();function R(t){let e=!1;const n=(0,r.useRef)(null),o=(0,r.useRef)(null),s=(0,r.useRef)(null),c=(0,r.useRef)(null),[u,h]=(0,f.useFocus)(),[d,m]=(0,r.useState)(t.value),g=O(d),w=F(g)?g:j(g),[C,E]=(0,r.useState)(w),S=u||K().some(t=>null!==t&&t.contains(document.activeElement));(0,r.useLayoutEffect)(()=>m(t.value),[t.value]),(0,r.useLayoutEffect)(()=>E(w),[d,S]),(0,r.useEffect)(()=>W(C===w?"auto":"smooth"),[C]);const R=(0,N.lowerbound)(A,w,(t,e)=>t<e);let z=A;A[R]!==w&&(z=[...A],z.splice(R,0,w));const B=(0,v.useOutsideEvent)({mouseDown:!0,touchStart:!0,handler:function(t){null!==o.current&&S&&t.target instanceof Node&&null!==s.current&&!s.current.contains(t.target)&&o.current.blur()}});return r.createElement("div",{className:i()(t.className),onKeyDown:function(t){if(t.defaultPrevented)return;const e=(0,k.hashFromEvent)(t.nativeEvent);if(38===e){t.preventDefault()
;const e=(z.indexOf(C)+z.length-1)%z.length;E(z[e])}if(40===e){t.preventDefault();const e=(z.indexOf(C)+z.length+1)%z.length;E(z[e])}},onFocus:function(t){P(t)||h.onFocus(t)},onBlur:function(t){P(t)||h.onBlur(t)},ref:B},r.createElement(y,{disabled:t.disabled,name:t.name,endSlot:r.createElement(l.EndSlot,{icon:!0},r.createElement(p,null)),reference:o,containerReference:n,mask:"09:00",value:d,onFocus:function(t){setTimeout(V,0)},onBlur:function(t){P(t)||I(d)},onChange:function(e){m(e),t.onInput&&t.onInput(e)},onKeyDown:function(t){if(t.defaultPrevented)return;const e=(0,k.hashFromEvent)(t.nativeEvent);13===e&&(t.preventDefault(),I(C),(0,a.ensureNotNull)(o.current).blur());27===e&&(t.preventDefault(),(0,a.ensureNotNull)(o.current).blur())}}),r.createElement(x.PopupMenu,{onOpen:function(){W()},onClose:function(){},position:function(){const t=(0,a.ensureNotNull)(n.current).getBoundingClientRect(),e=window.innerHeight-t.bottom,o=t.top;let r=231,s=t.bottom;if(r>o&&r>e){const n=(0,b.clamp)(r,0,o),i=(0,b.clamp)(r,0,e);r=Math.max(n,i),s=n>i?t.top-n:t.bottom}else r>e&&(s=t.top-r);return{x:t.left,y:s,overrideWidth:t.width,overrideHeight:r}},closeOnClickOutside:!1,isOpened:S,tabIndex:-1,reference:s},z.map(t=>r.createElement(M.PopupMenuItem,{key:t,label:t,isActive:t===w,isHovered:t===C,reference:t===C?T:void 0,onClick:D,onClickArg:t}))));function I(n){const o=O(n),r=F(o)?o:j(o);m(r),e||(e=!0,t.onChange(r))}function T(t){c.current=t}function D(t){I((0,a.ensureDefined)(t)),(0,a.ensureNotNull)(s.current).blur()}function P(t){return u&&(null!==_(document.activeElement)||null!==_(t.relatedTarget))}function _(t){return t instanceof Node&&K().find(e=>null!==e&&e.contains(t))||null}function K(){return[s.current,o.current]}function W(t="auto"){if(null!==c.current){const e=(0,a.ensureNotNull)(s.current).getBoundingClientRect(),n=c.current.getBoundingClientRect();(e.top>n.top||e.bottom<n.bottom)&&c.current.scrollIntoView({behavior:t})}}function V(){const t=o.current;if(null!==t){const e=t.value||"";t.setSelectionRange(0,e.length)}}}function O(t){const[e="",n=""]=t.split(":"),[o,r]=[z(e),B(n)];return`${o}:${r}`}function F(t){return/^(0?[0-9]|1[0-9]|2[0-3]):[0-5][0-9]$/g.test(t)}function j(t){const[e,n]=t.split(":"),[o,r]=[(0,b.clamp)(parseInt(e),0,23),(0,b.clamp)(parseInt(n),0,59)],[s,i]=[z(o.toString()),B(r.toString())];return`${s}:${i}`}function z(t){return t.slice(0,2).padStart(2,"0")}function B(t){return t.slice(0,2).padEnd(2,"0")}const I=o.CheckMobile.any()?function(t){const{onChange:e,onFocus:n,value:o,className:s,...h}=t,d=(0,r.useRef)(null),[m,v]=(0,f.useFocus)(),b=(0,c.createSafeMulticastEventHandler)(v.onBlur,(function(){d.current&&o&&(d.current.defaultValue=o)}));return(0,r.useLayoutEffect)(()=>{d.current&&o&&(d.current.defaultValue=o)},[]),(0,r.useLayoutEffect)(()=>{d.current&&o&&(d.current.value=o)},[o]),r.createElement("div",{className:i()(g.wrap,s)},r.createElement(u.InputControl,{...h,type:"text",endSlot:r.createElement(l.EndSlot,{icon:!0},r.createElement(p,null)),value:o,highlight:m,intent:m?"primary":void 0,
onFocus:function(t){(0,a.ensureNotNull)(d.current).focus(),n&&n(t)},onChange:function(){}}),r.createElement("input",{...v,disabled:t.disabled,className:g.input,type:"time",onBlur:b,onChange:function(t){const{value:n}=t.currentTarget;e&&n&&e(n)},ref:d}))}:R},84275:(t,e,n)=>{"use strict";n.d(e,{MessagesPosition:()=>E,useControlValidationLayout:()=>O});var o=n(59496),r=n(97754),s=n(29202),i=n(70412),a=n(78274),c=n(1405),l=n(86431),u=n(87995);var h=n(66875),d=n(62820);class m extends o.PureComponent{render(){const{children:t=[],show:e=!1,customErrorClass:n,disableRtlStyles:s}=this.props,i=r(h.errors,{[h.show]:e},n),a=t.map((t,e)=>o.createElement("div",{className:h.error,key:e},t));let c={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,d.isRtl)()&&!s){const{left:t,right:e}=c;c={...c,left:e,right:t}}return o.createElement("div",{style:c,className:i},a)}}const p=(0,l.makeOverlapable)((f=m,(g=class extends o.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=u.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 o.createElement("div",{style:{position:"absolute",width:"100%",top:0,left:0}},o.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:o=!0,inheritMaxWidthFromTarget:r=!1}=this.props,s={width:o?e.width:n,maxWidth:r?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 o=t.getBoundingClientRect(),r=this._instanceElem.getBoundingClientRect(),s="parent"===this.props.root?this._getCoordsRelToParentEl(t,o):this._getCoordsRelToDocument(o);if(null===s)return null;const i=this._getDimensions(r),a=this._getDimensions(o).width;let c=0,l=0;switch(e.vertical){case"top":l=s[n.vertical];break;case"bottom":l=s[n.vertical]-i.height;break;case"middle":l=s[n.vertical]-i.height/2}switch(e.horizontal){case"left":c=s[n.horizontal];break;case"right":c=s[n.horizontal]-i.width;break;case"center":c=s[n.horizontal]-i.width/2}return"number"==typeof this.props.attachmentOffsetY&&(l+=this.props.attachmentOffsetY),"number"==typeof this.props.attachmentOffsetX&&(c+=this.props.attachmentOffsetX),{x:c,y:l,width:a}}_getCoordsRelToDocument(t){const e=pageYOffset,n=pageXOffset,o=t.top+e,r=t.bottom+e,s=t.left+n;return{top:o,bottom:r,left:s,right:t.right+n,middle:(o+t.height)/2,center:s+t.width/2}}_getCoordsRelToParentEl(t,e){const n=t.offsetParent;if(null===n)return null;const o=n.scrollTop,r=n.scrollLeft,s=t.offsetTop+o,i=t.offsetLeft+r,a=e.width+i;return{top:s,bottom:e.height+s,left:i,right:a,middle:(s+e.height)/2,center:(i+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",g));var f,g,v=n(9745),b=n(83546),w=n(93314);function C(t){const{intent:e="danger"}=t;return o.createElement(v.Icon,{icon:b,className:r(w["error-icon"],w["intent-"+e])})}var E,S,y=n(52965);!function(t){t[t.Attached=0]="Attached",t[t.Static=1]="Static",t[t.Hidden=2]="Hidden"}(E||(E={})),function(t){t.Top="top",t.Bottom="bottom"}(S||(S={}));const k={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 x(t){const{isOpened:e,target:n,errorAttachment:r=S.Top,customErrorsAttachment:s,root:i="parent",inheritWidthFromTarget:a=!1,disableRtlStyles:c,children:l}=t,{attachment:u,targetAttachment:h,attachmentOffsetY:d}=null!=s?s:k[r];return o.createElement(p,{isOpened:e,target:n,root:i,inheritWidthFromTarget:a,attachment:u,targetAttachment:h,attachmentOffsetY:d,disableRtlStyles:c,inheritMaxWidthFromTarget:!0,show:!0},l)}function M(t,e){return Boolean(t)&&void 0!==e&&e.length>0}function N(t,e,n){return t===E.Attached&&M(e,n)}function A(t,e,n){return t===E.Static&&M(e,n)}function R(t,e,n){const{hasErrors:o,hasWarnings:r,alwaysShowAttachedErrors:s,iconHidden:i,errors:a,warnings:c,messagesPosition:l=E.Static}=t,u=N(l,o,a),h=N(l,r,c),d=u&&(e||n||Boolean(s)),m=!d&&h&&(e||n),p=A(l,o,a),f=!p&&A(l,r,c),g=!i&&Boolean(o);return{hasAttachedErrorMessages:u,
hasAttachedWarningMessages:h,showAttachedErrorMessages:d,showAttachedWarningMessages:m,showStaticErrorMessages:p,showStaticWarningMessages:f,showErrorIcon:g,showWarningIcon:!i&&!g&&Boolean(r),intent:function(t,e){return Boolean(t)?"danger":Boolean(e)?"warning":void 0}(o,r)}}function O(t){var e,n;const{errors:c,warnings:l,messagesAttachment:u,customErrorsAttachment:h,messagesRoot:d,inheritMessagesWidthFromTarget:m,disableMessagesRtlStyles:p}=t,[f,g]=(0,s.useFocus)(),[v,b]=(0,i.useHover)(),w=(0,o.useRef)(null),{hasAttachedErrorMessages:E,hasAttachedWarningMessages:S,showAttachedErrorMessages:k,showAttachedWarningMessages:M,showStaticErrorMessages:N,showStaticWarningMessages:A,showErrorIcon:O,showWarningIcon:F,intent:j}=R(t,f,v),z=O||F?o.createElement(C,{intent:O?"danger":"warning"}):void 0,B=E?o.createElement(x,{errorAttachment:u,customErrorsAttachment:h,isOpened:k,target:w.current,root:d,inheritWidthFromTarget:m,disableRtlStyles:p,children:c}):void 0,I=S?o.createElement(x,{errorAttachment:u,isOpened:M,target:w.current,root:d,inheritWidthFromTarget:m,disableRtlStyles:p,children:l}):void 0,T=N?o.createElement(a.AfterSlot,{className:r(y["static-messages"],y.errors)},null==c?void 0:c.map((t,e)=>o.createElement("p",{key:e,className:y.message},t))):void 0,D=A?o.createElement(a.AfterSlot,{className:r(y["static-messages"],y.warnings)},null==l?void 0:l.map((t,e)=>o.createElement("p",{key:e,className:y.message},t))):void 0;return{icon:z,renderedErrors:null!==(n=null!==(e=null!=B?B:I)&&void 0!==e?e:T)&&void 0!==n?n:D,containerReference:w,intent:j,...g,...b}}},16396:(t,e,n)=>{"use strict";n.d(e,{DEFAULT_POPUP_MENU_ITEM_THEME:()=>l,PopupMenuItem:()=>d});var o=n(59496),r=n(97754),s=n(59064),i=n(51768),a=n(90186),c=n(23576);const l=c;function u(t){const{reference:e,...n}=t,r={...n,ref:e};return o.createElement(t.href?"a":"div",r)}function h(t){t.stopPropagation()}function d(t){const{id:e,role:n,"aria-selected":l,className:d,title:m,labelRowClassName:p,labelClassName:f,shortcut:g,forceShowShortcuts:v,icon:b,isActive:w,isDisabled:C,isHovered:E,appearAsDisabled:S,label:y,link:k,showToolboxOnHover:x,target:M,rel:N,toolbox:A,reference:R,onMouseOut:O,onMouseOver:F,suppressToolboxClick:j=!0,theme:z=c}=t,B=(0,a.filterDataProps)(t),I=(0,o.useRef)(null);return o.createElement(u,{...B,id:e,role:n,"aria-selected":l,className:r(d,z.item,b&&z.withIcon,{[z.isActive]:w,[z.isDisabled]:C||S,[z.hovered]:E}),title:m,href:k,target:M,rel:N,reference:function(t){I.current=t,"function"==typeof R&&R(t);"object"==typeof R&&(R.current=t)},onClick:function(e){const{dontClosePopup:n,onClick:o,onClickArg:r,trackEventObject:a}=t;if(C)return;a&&(0,i.trackEvent)(a.category,a.event,a.label);o&&o(r,e);n||(0,s.globalCloseMenu)()},onContextMenu:function(e){const{trackEventObject:n,trackRightClick:o}=t;n&&o&&(0,i.trackEvent)(n.category,n.event,n.label+"_rightClick")},onMouseUp:function(e){const{trackEventObject:n,trackMouseWheelClick:o}=t;if(1===e.button&&k&&n){let t=n.label;o&&(t+="_mouseWheelClick"),(0,i.trackEvent)(n.category,n.event,t)}},onMouseOver:F,onMouseOut:O
},void 0!==b&&o.createElement("div",{className:z.icon,dangerouslySetInnerHTML:{__html:b}}),o.createElement("div",{className:r(z.labelRow,p)},o.createElement("div",{className:r(z.label,f)},y)),(void 0!==g||v)&&o.createElement("div",{className:z.shortcut},(T=g)&&T.split("+").join(" + ")),void 0!==A&&o.createElement("div",{onClick:j?h:void 0,className:r(z.toolbox,{[z.showOnHover]:x})},A));var T}},50628:(t,e,n)=>{"use strict";n.d(e,{PopupMenu:()=>l});var o=n(59496),r=n(87995),s=n(65718),i=n(27317),a=n(29197),c=n(58095);function l(t){const{controller:e,children:n,isOpened:l,closeOnClickOutside:u=!0,doNotCloseOn:h,onClickOutside:d,onClose:m,...p}=t,f=(0,o.useContext)(a.CloseDelegateContext),g=(0,c.useOutsideEvent)({handler:function(t){d&&d(t);if(!u)return;if(h&&t.target instanceof Node){const e=r.findDOMNode(h);if(e instanceof Node&&e.contains(t.target))return}m()},mouseDown:!0,touchStart:!0});return l?o.createElement(s.Portal,{top:"0",left:"0",right:"0",bottom:"0",pointerEvents:"none"},o.createElement("span",{ref:g,style:{pointerEvents:"auto"}},o.createElement(i.Menu,{...p,onClose:m,onScroll:function(e){const{onScroll:n}=t;n&&n(e)},customCloseDelegate:f,ref:e},n))):null}},83546:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M8 15c3.866 0 7-3.134 7-7s-3.134-7-7-7-7 3.134-7 7 3.134 7 7 7zm0 1c4.418 0 8-3.582 8-8s-3.582-8-8-8-8 3.582-8 8 3.582 8 8 8zm-1-12c0-.552.448-1 1-1s1 .448 1 1v4c0 .552-.448 1-1 1s-1-.448-1-1v-4zm1 7c-.552 0-1 .448-1 1s.448 1 1 1 1-.448 1-1-.448-1-1-1z"/></svg>'},35692:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17"><path fill="currentColor" d="M1 8.5a7.5 7.5 0 1 1 15 0 7.5 7.5 0 0 1-15 0zM8.5 0a8.5 8.5 0 1 0 0 17 8.5 8.5 0 0 0 0-17zM9 9V3H8v5H5v1h4z"/></svg>'}}]);