Files
riwa-ionic/public/charting_library/bundles/9443.ff39ce6ae6512d53851b.js
2026-01-14 21:55:53 +07:00

36 lines
105 KiB
JavaScript
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[9443,2544],{61442:e=>{e.exports={button:"button-PYEOTd6i",disabled:"disabled-PYEOTd6i",hidden:"hidden-PYEOTd6i",icon:"icon-PYEOTd6i",dropped:"dropped-PYEOTd6i"}},11362:e=>{e.exports={wrapper:"wrapper-GZajBGIm",input:"input-GZajBGIm",view:"view-GZajBGIm",danger:"danger-GZajBGIm"}},4052:e=>{e.exports={box:"box-ywH2tsV_",noOutline:"noOutline-ywH2tsV_",disabled:"disabled-ywH2tsV_","intent-danger":"intent-danger-ywH2tsV_",checked:"checked-ywH2tsV_",check:"check-ywH2tsV_",icon:"icon-ywH2tsV_",dot:"dot-ywH2tsV_",disableActiveStyles:"disableActiveStyles-ywH2tsV_"}},65592:e=>{e.exports={checkbox:"checkbox-vyj6oJxw",reverse:"reverse-vyj6oJxw",label:"label-vyj6oJxw",baseline:"baseline-vyj6oJxw"}},61853:e=>{e.exports={"textarea-container":"textarea-container-x5KHDULU","change-highlight":"change-highlight-x5KHDULU",focused:"focused-x5KHDULU","resize-vertical":"resize-vertical-x5KHDULU","resize-horizontal":"resize-horizontal-x5KHDULU","resize-both":"resize-both-x5KHDULU",textarea:"textarea-x5KHDULU","with-icon":"with-icon-x5KHDULU",endslot:"endslot-x5KHDULU"}},46105:e=>{e.exports={default:"default-EZuD3gZZ",danger:"danger-EZuD3gZZ",warning:"warning-EZuD3gZZ",success:"success-EZuD3gZZ",neutral:"neutral-EZuD3gZZ","neutral-light":"neutral-light-EZuD3gZZ",small:"small-EZuD3gZZ",medium:"medium-EZuD3gZZ",large:"large-EZuD3gZZ",iconWrapper:"iconWrapper-EZuD3gZZ",icon:"icon-EZuD3gZZ"}},93139:e=>{e.exports={radioButtonView:"radioButtonView-zzLJI6BH",checked:"checked-zzLJI6BH",disabled:"disabled-zzLJI6BH"}},33560:e=>{e.exports={radio:"radio-ALqkCUvs",reverse:"reverse-ALqkCUvs",label:"label-ALqkCUvs",wrapper:"wrapper-ALqkCUvs",input:"input-ALqkCUvs",box:"box-ALqkCUvs",disabled:"disabled-ALqkCUvs"}},99864:e=>{e.exports={wrap:"wrap-g_7HJ1Y8",item:"item-g_7HJ1Y8",checked:"checked-g_7HJ1Y8",accessible:"accessible-g_7HJ1Y8",focusVisible:"focusVisible-g_7HJ1Y8",radio:"radio-g_7HJ1Y8",paddingCompact:"paddingCompact-g_7HJ1Y8"}},11224:e=>{e.exports={innerLabel:"innerLabel-DjbvBF5Y"}},93236:e=>{e.exports={controlWrapper:"controlWrapper-DBTazUk2",hidden:"hidden-DBTazUk2",control:"control-DBTazUk2",controlIncrease:"controlIncrease-DBTazUk2",controlDecrease:"controlDecrease-DBTazUk2",controlIcon:"controlIcon-DBTazUk2",title:"title-DBTazUk2"}},15931:e=>{e.exports={wrap:"wrap-ne5qGlZh",icon:"icon-ne5qGlZh",text:"text-ne5qGlZh",disabled:"disabled-ne5qGlZh"}},74997:e=>{e.exports={container:"container-zTsGmQlA",title:"title-zTsGmQlA",lineContainer:"lineContainer-zTsGmQlA",lineSegment:"lineSegment-zTsGmQlA",checked:"checked-zTsGmQlA"}},98406:e=>{e.exports={colorPickerWrap:"colorPickerWrap-Sw_a4qpB",focused:"focused-Sw_a4qpB",readonly:"readonly-Sw_a4qpB",disabled:"disabled-Sw_a4qpB","size-small":"size-small-Sw_a4qpB","size-medium":"size-medium-Sw_a4qpB","size-large":"size-large-Sw_a4qpB","font-size-small":"font-size-small-Sw_a4qpB","font-size-medium":"font-size-medium-Sw_a4qpB","font-size-large":"font-size-large-Sw_a4qpB","border-none":"border-none-Sw_a4qpB",shadow:"shadow-Sw_a4qpB",
"border-thin":"border-thin-Sw_a4qpB","border-thick":"border-thick-Sw_a4qpB","intent-default":"intent-default-Sw_a4qpB","intent-success":"intent-success-Sw_a4qpB","intent-warning":"intent-warning-Sw_a4qpB","intent-danger":"intent-danger-Sw_a4qpB","intent-primary":"intent-primary-Sw_a4qpB","corner-top-left":"corner-top-left-Sw_a4qpB","corner-top-right":"corner-top-right-Sw_a4qpB","corner-bottom-right":"corner-bottom-right-Sw_a4qpB","corner-bottom-left":"corner-bottom-left-Sw_a4qpB",colorPicker:"colorPicker-Sw_a4qpB",swatch:"swatch-Sw_a4qpB",placeholderContainer:"placeholderContainer-Sw_a4qpB",placeholder:"placeholder-Sw_a4qpB",mixedColor:"mixedColor-Sw_a4qpB",white:"white-Sw_a4qpB",opacitySwatch:"opacitySwatch-Sw_a4qpB",colorLine:"colorLine-Sw_a4qpB",multiWidth:"multiWidth-Sw_a4qpB",lineStyleSelect:"lineStyleSelect-Sw_a4qpB",overflowContainer:"overflowContainer-Sw_a4qpB",linePropertyContainer:"linePropertyContainer-Sw_a4qpB",whiteContainer:"whiteContainer-Sw_a4qpB",multiProperty:"multiProperty-Sw_a4qpB",lineItem:"lineItem-Sw_a4qpB",lineSegment:"lineSegment-Sw_a4qpB"}},69211:e=>{e.exports={thicknessContainer:"thicknessContainer-C05zSid7",thicknessTitle:"thicknessTitle-C05zSid7",bar:"bar-C05zSid7",checked:"checked-C05zSid7"}},58851:e=>{e.exports={hasTooltip:"hasTooltip-DcvaoxPU",uppercase:"uppercase-DcvaoxPU"}},92492:e=>{e.exports={wrap:"wrap-Q2NZ0gvI"}},52257:e=>{e.exports={checkbox:"checkbox-FG0u1J5p",title:"title-FG0u1J5p"}},7208:e=>{e.exports={hintButton:"hintButton-qEI9XsjF",infoTooltip:"infoTooltip-qEI9XsjF"}},71035:e=>{e.exports={titleWrap:"titleWrap-SexRbl__",title:"title-SexRbl__"}},63460:e=>{e.exports={button:"button-HBcDEU4c",accessible:"accessible-HBcDEU4c"}},60387:e=>{e.exports={container:"container-mdcOkvbj",sectionTitle:"sectionTitle-mdcOkvbj",separator:"separator-mdcOkvbj",customButton:"customButton-mdcOkvbj",accessible:"accessible-mdcOkvbj"}},75187:e=>{e.exports={container:"container-iiEYaqPD",form:"form-iiEYaqPD",swatch:"swatch-iiEYaqPD",white:"white-iiEYaqPD",inputWrap:"inputWrap-iiEYaqPD",inputHash:"inputHash-iiEYaqPD",input:"input-iiEYaqPD",buttonWrap:"buttonWrap-iiEYaqPD",hueSaturationWrap:"hueSaturationWrap-iiEYaqPD",saturation:"saturation-iiEYaqPD",hue:"hue-iiEYaqPD"}},58065:e=>{e.exports={hue:"hue-r4uo5Wn6",pointer:"pointer-r4uo5Wn6",accessible:"accessible-r4uo5Wn6",pointerContainer:"pointerContainer-r4uo5Wn6"}},94085:e=>{e.exports={opacity:"opacity-EnWts7Xu",opacitySlider:"opacitySlider-EnWts7Xu",opacitySliderGradient:"opacitySliderGradient-EnWts7Xu",pointer:"pointer-EnWts7Xu",dragged:"dragged-EnWts7Xu",opacityPointerWrap:"opacityPointerWrap-EnWts7Xu",opacityInputWrap:"opacityInputWrap-EnWts7Xu",opacityInput:"opacityInput-EnWts7Xu",opacityInputPercent:"opacityInputPercent-EnWts7Xu",accessible:"accessible-EnWts7Xu"}},87109:e=>{e.exports={saturation:"saturation-NFNfqP2w",pointer:"pointer-NFNfqP2w",accessible:"accessible-NFNfqP2w"}},11992:e=>{e.exports={swatches:"swatches-sfn7Lezv",swatch:"swatch-sfn7Lezv",hover:"hover-sfn7Lezv",empty:"empty-sfn7Lezv",white:"white-sfn7Lezv",
selected:"selected-sfn7Lezv",contextItem:"contextItem-sfn7Lezv",row:"row-sfn7Lezv"}},99505:e=>{e.exports={button:"button-tFul0OhX","button-children":"button-children-tFul0OhX",hiddenArrow:"hiddenArrow-tFul0OhX",invisibleFocusHandler:"invisibleFocusHandler-tFul0OhX"}},41140:e=>{e.exports={"icon-wrapper":"icon-wrapper-dikdewwx","with-link":"with-link-dikdewwx","with-tooltip":"with-tooltip-dikdewwx","no-active-state":"no-active-state-dikdewwx"}},65630:e=>{e.exports={placeholder:"placeholder-V6ceS6BN"}},67797:e=>{e.exports={menuWrap:"menuWrap-Kq3ruQo8",isMeasuring:"isMeasuring-Kq3ruQo8",scrollWrap:"scrollWrap-Kq3ruQo8",momentumBased:"momentumBased-Kq3ruQo8",menuBox:"menuBox-Kq3ruQo8",isHidden:"isHidden-Kq3ruQo8"}},70673:(e,t,n)=>{"use strict";n.d(t,{CheckboxInput:()=>c});var o=n(50959),s=n(97754),r=n(90186),a=n(5811),i=n(11362),l=n.n(i);function c(e){const t=s(l().wrapper,e.className);return o.createElement("span",{className:t,title:e.title,style:e.style},o.createElement("input",{id:e.id,tabIndex:e.tabIndex,className:s(e.intent&&l()[e.intent],l().input),type:"checkbox",name:e.name,checked:e.checked,disabled:e.disabled,value:e.value,autoFocus:e.autoFocus,role:e.role,onChange:function(){e.onChange?.(e.value)},ref:e.reference,"aria-required":e["aria-required"],"aria-describedby":e["aria-describedby"],"aria-invalid":e["aria-invalid"],...(0,r.filterDataProps)(e)}),o.createElement(a.CheckboxView,{className:l().view,indeterminate:e.indeterminate,checked:e.checked,disabled:e.disabled,intent:e.intent,tabIndex:e.tabIndex}))}},5811:(e,t,n)=>{"use strict";n.d(t,{CheckboxView:()=>c});var o=n(50959),s=n(97754),r=n(9745),a=n(65890),i=n(4052),l=n.n(i);function c(e){const{indeterminate:t,checked:n,tabIndex:i,className:c,disabled:u,disableActiveStyles:d,intent:p,hideIcon:h,...m}=e,g=t||!n||h?"":a,v=s(l().box,l()[`intent-${p}`],!t&&l().check,!!t&&l().dot,-1===i&&l().noOutline,c,n&&l().checked,u&&l().disabled,d&&l().disableActiveStyles);return o.createElement("span",{className:v,...m},o.createElement(r.Icon,{icon:g,className:l().icon}))}},15294:(e,t,n)=>{"use strict";n.d(t,{Checkbox:()=>c});var o=n(50959),s=n(97754),r=n(59416),a=n(70673),i=n(65592),l=n.n(i);class c extends o.PureComponent{render(){const{inputClassName:e,labelClassName:t,...n}=this.props,r=s(this.props.className,l().checkbox,{[l().reverse]:Boolean(this.props.labelPositionReverse),[l().baseline]:Boolean(this.props.labelAlignBaseline)}),i=s(l().label,t,{[l().disabled]:this.props.disabled});let c=null;return this.props.label&&(c=o.createElement("span",{className:i,title:this.props.title},this.props.label)),o.createElement("label",{className:r},o.createElement(a.CheckboxInput,{...n,className:e}),c)}}c.defaultProps={value:"on"};(0,r.makeSwitchGroupItem)(c);n(5811)},2568:(e,t,n)=>{"use strict";n.d(t,{Textarea:()=>y});var o,s=n(50959),r=n(97754),a=n(38528),i=n(29202),l=n(48027),c=n(45812),u=n(47201),d=n(48907),p=n(67029),h=n(78274),m=n(61853),g=n.n(m);!function(e){e.None="none",e.Vertical="vertical",e.Horizontal="horizontal",e.Both="both"}(o||(o={}));const v=s.forwardRef(((e,t)=>{
const{id:n,title:o,tabIndex:a,containerTabIndex:i,role:l,inputClassName:c,autoComplete:u,autoFocus:d,cols:m,disabled:v,isFocused:f,form:b,maxLength:y,minLength:C,name:x,placeholder:_,readonly:w,required:E,rows:S,value:T,defaultValue:N,wrap:I,containerReference:k,onChange:P,onSelect:D,onFocus:B,onContainerFocus:M,onBlur:O,onPaste:R,"aria-describedby":V,"aria-required":L,"aria-invalid":F,hasIcon:W,endSlot:A,hasAttachImage:H,...q}=e,z={id:n,title:o,tabIndex:a,role:l,autoComplete:u,autoFocus:d,cols:m,disabled:v,form:b,maxLength:y,minLength:C,name:x,placeholder:_,readOnly:w,required:E,rows:S,value:T,defaultValue:N,wrap:I,onChange:P,onSelect:D,onFocus:B,onBlur:O,onPaste:R,"aria-describedby":V,"aria-required":L,"aria-invalid":F};return s.createElement(p.ControlSkeleton,{...q,tabIndex:i,disabled:v,readonly:w,isFocused:f,ref:k,onFocus:M,middleSlot:s.createElement(h.MiddleSlot,null,s.createElement("textarea",{...z,className:r(g().textarea,c,A&&g().endslot),ref:t})),...A&&{endSlot:s.createElement("span",{className:r(!H&&g()["with-icon"])},A)}})}));v.displayName="TextareaView";const f=(e,t,n)=>t?void 0:e?-1:n,b=(e,t,n)=>t?void 0:e?n:-1,y=s.forwardRef(((e,t)=>{e=(0,l.useControl)(e);const{className:n,disabled:p,autoSelectOnFocus:h,tabIndex:m=0,borderStyle:y,highlight:C,resize:x,containerReference:_=null,onFocus:w,onBlur:E,hasIcon:S,...T}=e,N=(0,s.useRef)(null),I=(0,s.useRef)(null),{isMouseDown:k,handleMouseDown:P,handleMouseUp:D}=(0,c.useIsMouseDown)(),[B,M]=(0,i.useFocus)(),O=(0,u.createSafeMulticastEventHandler)(M.onFocus,(function(e){h&&!k.current&&(0,d.selectAllContent)(e.currentTarget)}),w),R=(0,u.createSafeMulticastEventHandler)(M.onBlur,E),V=void 0!==x&&x!==o.None,L=y??(V?C?"thick":"thin":void 0),F=C??(!V&&void 0);return s.createElement(v,{...T,className:r(g()["textarea-container"],V&&g()["change-highlight"],x&&x!==o.None&&g()[`resize-${x}`],B&&g().focused,n),disabled:p,isFocused:B,containerTabIndex:f(B,p,m),tabIndex:b(B,p,m),borderStyle:L,highlight:F,onContainerFocus:function(e){I.current===e.target&&null!==N.current&&N.current.focus()},onFocus:O,onBlur:R,onMouseDown:P,onMouseUp:D,ref:function(e){N.current=e,"function"==typeof t?t(e):t&&(t.current=e)},containerReference:(0,a.useMergedRefs)([_,I]),hasIcon:S})}));y.displayName="Textarea"},36104:(e,t,n)=>{"use strict";n.d(t,{useControlDisclosure:()=>s});var o=n(7953);function s(e){const{intent:t,highlight:n,...s}=e,{isFocused:r,...a}=(0,o.useDisclosure)(s);return{...a,isFocused:r,highlight:n??r,intent:t??(r?"primary":"default")}}},43010:(e,t,n)=>{"use strict";n.d(t,{useIsomorphicLayoutEffect:()=>s});var o=n(50959);function s(e,t){("undefined"==typeof window?o.useEffect:o.useLayoutEffect)(e,t)}},36383:(e,t,n)=>{"use strict";n.d(t,{useOutsideEvent:()=>a});var o=n(50959),s=n(43010),r=n(27267);function a(e){const{click:t,mouseDown:n,touchEnd:a,touchStart:i,handler:l,reference:c}=e,u=(0,o.useRef)(null),d=(0,o.useRef)("undefined"==typeof window?0:new window.CustomEvent("timestamp").timeStamp);return(0,s.useIsomorphicLayoutEffect)((()=>{const e={click:t,mouseDown:n,touchEnd:a,
touchStart:i},o=c?c.current:u.current;return(0,r.addOutsideEventListener)(d.current,o,l,document,e)}),[t,n,a,i,l]),c||u}},9745:(e,t,n)=>{"use strict";n.d(t,{Icon:()=>s});var o=n(50959);const s=o.forwardRef(((e,t)=>{const{icon:n="",title:s,ariaLabel:r,ariaLabelledby:a,ariaHidden:i,...l}=e,c=!!(s||r||a);return o.createElement("span",{role:"img",...l,ref:t,"aria-label":r,"aria-labelledby":a,"aria-hidden":i||!c,title:s,dangerouslySetInnerHTML:{__html:n}})}))},83021:(e,t,n)=>{"use strict";n.d(t,{SubmenuContext:()=>s,SubmenuHandler:()=>r});var o=n(50959);const s=o.createContext(null);function r(e){const[t,n]=(0,o.useState)(null),r=(0,o.useRef)(null),a=(0,o.useRef)(new Map);return(0,o.useEffect)((()=>()=>{null!==r.current&&clearTimeout(r.current)}),[]),o.createElement(s.Provider,{value:{current:t,setCurrent:function(e){null!==r.current&&(clearTimeout(r.current),r.current=null);null===t?n(e):r.current=setTimeout((()=>{r.current=null,n(e)}),100)},registerSubmenu:function(e,t){return a.current.set(e,t),()=>{a.current.delete(e)}},isSubmenuNode:function(e){return Array.from(a.current.values()).some((t=>t(e)))}}},e.children)}},99663:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>s,SlotContext:()=>r});var o=n(50959);class s extends o.Component{shouldComponentUpdate(){return!1}render(){return o.createElement("div",{style:{position:"fixed",zIndex:150,left:0,top:0},ref:this.props.reference})}}const r=o.createContext(null)},59416:(e,t,n)=>{"use strict";n.d(t,{SwitchGroup:()=>a,makeSwitchGroupItem:()=>i});var o=n(50959),s=n(55883);const r=(0,o.createContext)({getName:()=>"",getValues:()=>[],getOnChange:()=>s.default,subscribe:s.default,unsubscribe:s.default});class a extends o.PureComponent{constructor(e){super(e),this._subscriptions=new Set,this._getName=()=>this.props.name,this._getValues=()=>this.props.values,this._getOnChange=()=>this.props.onChange,this._subscribe=e=>{this._subscriptions.add(e)},this._unsubscribe=e=>{this._subscriptions.delete(e)},this.state={switchGroupContext:{getName:this._getName,getValues:this._getValues,getOnChange:this._getOnChange,subscribe:this._subscribe,unsubscribe:this._unsubscribe}}}render(){return o.createElement(r.Provider,{value:this.state.switchGroupContext},this.props.children)}componentDidUpdate(e){this._notify(this._getUpdates(this.props.values,e.values))}_notify(e){this._subscriptions.forEach((t=>t(e)))}_getUpdates(e,t){return[...t,...e].filter((n=>t.includes(n)?!e.includes(n):e.includes(n)))}}function i(e){var t;return t=class extends o.PureComponent{constructor(){super(...arguments),this._onChange=e=>{this.context.getOnChange()(e)},this._onUpdate=e=>{e.includes(this.props.value)&&this.forceUpdate()}}componentDidMount(){this.context.subscribe(this._onUpdate)}render(){return o.createElement(e,{...this.props,name:this._getName(),onChange:this._onChange,checked:this._isChecked()})}componentWillUnmount(){this.context.unsubscribe(this._onUpdate)}_getName(){return this.context.getName()}_isChecked(){return this.context.getValues().includes(this.props.value)}},t.contextType=r,t}},67961:(e,t,n)=>{
"use strict";n.d(t,{OverlapManager:()=>a,getRootOverlapManager:()=>l});var o=n(50151),s=n(34811);class r{constructor(){this._storage=[]}add(e){this._storage.push(e)}remove(e){this._storage=this._storage.filter((t=>e!==t))}has(e){return this._storage.includes(e)}getItems(){return this._storage}}class a{constructor(e=document){this._storage=new r,this._windows=new Map,this._index=0,this._document=e,this._container=e.createDocumentFragment()}setContainer(e){const t=this._container,n=null===e?this._document.createDocumentFragment():e;!function(e,t){Array.from(e.childNodes).forEach((e=>{e.nodeType===Node.ELEMENT_NODE&&t.appendChild(e)}))}(t,n),this._container=n}registerWindow(e){this._storage.has(e)||this._storage.add(e)}ensureWindow(e,t={position:"fixed",direction:"normal"}){const n=this._windows.get(e);if(void 0!==n)return n;this.registerWindow(e);const o=this._document.createElement("div");if(o.style.position=t.position,o.style.zIndex=this._index.toString(),o.dataset.id=e,void 0!==t.index){const e=this._container.childNodes.length;if(t.index>=e)this._container.appendChild(o);else if(t.index<=0)this._container.insertBefore(o,this._container.firstChild);else{const e=this._container.childNodes[t.index];this._container.insertBefore(o,e)}}else"reverse"===t.direction?this._container.insertBefore(o,this._container.firstChild):this._container.appendChild(o);return this._windows.set(e,o),++this._index,o}unregisterWindow(e){this._storage.remove(e);const t=this._windows.get(e);void 0!==t&&(null!==t.parentElement&&t.parentElement.removeChild(t),this._windows.delete(e))}getZindex(e){const t=this.ensureWindow(e);return parseInt(t.style.zIndex||"0")}moveLastWindowToTop(){const e=this._storage.getItems(),t=e[e.length-1];t&&this.moveToTop(t)}moveToTop(e){if(this.getZindex(e)!==this._index){const t=this.ensureWindow(e);this._windows.forEach(((e,n)=>{e.hasAttribute(s.FOCUS_TRAP_DATA_ATTRIBUTE)&&e.setAttribute(s.FOCUS_TRAP_DATA_ATTRIBUTE,e===t?"true":"false")})),t.style.zIndex=(++this._index).toString()}}removeWindow(e){this.unregisterWindow(e)}}const i=new WeakMap;function l(e=document){const t=e.getElementById("overlap-manager-root");if(null!==t)return(0,o.ensureDefined)(i.get(t));{const t=new a(e),n=function(e){const t=e.createElement("div");return t.style.position="absolute",t.style.zIndex=150..toString(),t.style.top="0px",t.style.left="0px",t.id="overlap-manager-root",t}(e);return i.set(n,t),t.setContainer(n),e.body.appendChild(n),t}}var c;!function(e){e[e.BaseZindex=150]="BaseZindex"}(c||(c={}))},92399:(e,t,n)=>{"use strict";n.d(t,{NumberInputView:()=>P});var o,s=n(50959),r=n(32563),a=n(97754),i=n(67029),l=n(78274),c=n(86623),u=n(1140),d=n(1405),p=n(11224);!function(e){e.Large="large",e.Medium="medium"}(o||(o={}));const h={large:i.InputClasses.FontSizeLarge,medium:i.InputClasses.FontSizeMedium},m={attachment:d.anchors.top.attachment,targetAttachment:d.anchors.top.targetAttachment,attachmentOffsetY:-4};function g(e){
const{className:t,inputClassName:n,stretch:o=!0,errorMessage:r,fontSizeStyle:i="large",endSlot:d,button:g,error:v,warning:f,innerLabel:b,inputReference:y,children:C,customErrorsAttachment:x,..._}=e,w=v&&void 0!==r?[r]:void 0,E=f&&void 0!==r?[r]:void 0,S=a(p.inputContainer,h[i],t),T=b?s.createElement(l.StartSlot,{className:p.innerLabel,interactive:!1},b):void 0,N=d||g||C?s.createElement(l.EndSlot,null,d,g,C):void 0;return s.createElement(c.FormInput,{..._,className:S,inputClassName:n,errors:w,warnings:E,hasErrors:v,hasWarnings:f,messagesPosition:u.MessagesPosition.Attached,customErrorsAttachment:{...m,...x},messagesRoot:"document",inheritMessagesWidthFromTarget:!0,disableMessagesRtlStyles:!0,iconHidden:!0,stretch:o,reference:y,startSlot:T,endSlot:N})}var v=n(38528),f=n(11542),b=n(9745),y=n(14729),C=n(2948),x=n(93236);function _(e){const t=a(x.control,x.controlIncrease),o=a(x.control,x.controlDecrease);return s.createElement(s.Fragment,null,void 0!==e.title&&s.createElement("div",{className:x.title},e.title),s.createElement("div",{className:x.controlWrapper},(e.defaultButtonsVisible||e.title)&&s.createElement(s.Fragment,null,s.createElement("button",{type:"button",tabIndex:-1,"aria-label":f.t(null,void 0,n(39832)),className:t,onClick:e.increaseValue,onMouseDown:y.preventDefault},s.createElement(b.Icon,{icon:C,className:x.controlIcon})),s.createElement("button",{type:"button",tabIndex:-1,"aria-label":f.t(null,void 0,n(55319)),className:o,onClick:e.decreaseValue,onMouseDown:y.preventDefault},s.createElement(b.Icon,{icon:C,className:x.controlIcon})))))}var w=n(70412),E=n(29202),S=n(47201),T=n(68335);const N=[38],I=[40];var k;function P(e){const[t,n]=(0,w.useHover)(),[o,a]=(0,E.useFocus)(),i=(0,s.useRef)(null),l=(0,S.createSafeMulticastEventHandler)(a.onFocus,e.onFocus),c=(0,S.createSafeMulticastEventHandler)(a.onBlur,e.onBlur),u=(0,s.useCallback)((t=>{!e.disabled&&o&&(t.preventDefault(),t.deltaY<0?e.onValueByStepChange(1):e.onValueByStepChange(-1))}),[o,e.disabled,e.onValueByStepChange]);return s.createElement(g,{...n,id:e.id,name:e.name,pattern:e.pattern,borderStyle:e.borderStyle,fontSizeStyle:e.fontSizeStyle,value:e.value,className:e.className,inputClassName:e.inputClassName,autoComplete:e.autoComplete,button:function(){const{button:n,forceShowControls:a,disabled:i,title:l}=e,c=!i&&!r.mobiletouch&&(a||o||t);return i?void 0:s.createElement(s.Fragment,null,n??s.createElement(_,{increaseValue:d,decreaseValue:p,defaultButtonsVisible:c,title:l}))}(),disabled:e.disabled,placeholder:e.placeholder,innerLabel:e.innerLabel,endSlot:e.endSlot,containerReference:(0,v.useMergedRefs)([i,e.containerReference]),inputReference:e.inputReference,inputMode:e.inputMode,type:e.type,warning:e.warning,error:e.error,errorMessage:e.errorMessage,onClick:e.onClick,onFocus:l,onBlur:c,onChange:e.onValueChange,onKeyDown:function(t){if(e.disabled||0!==(0,T.modifiersFromEvent)(t.nativeEvent))return;let n=N,o=I;e.controlDecKeyCodes&&(o=o.concat(e.controlDecKeyCodes));e.controlIncKeyCodes&&(n=n.concat(e.controlIncKeyCodes))
;(o.includes(t.keyCode)||n.includes(t.keyCode))&&(t.preventDefault(),e.onValueByStepChange(o.includes(t.keyCode)?-1:1));e.onKeyDown&&e.onKeyDown(t)},onWheelNoPassive:u,stretch:e.stretch,intent:e.intent,highlight:e.highlight,highlightRemoveRoundBorder:e.highlightRemoveRoundBorder,autoSelectOnFocus:e.autoSelectOnFocus,customErrorsAttachment:e.customErrorsAttachment,tabIndex:e.tabIndex,"data-property-id":e["data-name"],"aria-current":e["aria-current"],"aria-controls":e["aria-controls"],readonly:e.readonly,noReadonlyStyles:e.noReadonlyStyles,"data-name":e["data-name"]});function d(){e.disabled||(i.current?.focus(),e.onValueByStepChange(1))}function p(){e.disabled||(i.current?.focus(),e.onValueByStepChange(-1))}}!function(e){e[e.Dec=-1]="Dec",e[e.Inc=1]="Inc"}(k||(k={}))},99054:(e,t,n)=>{"use strict";n.d(t,{setFixedBodyState:()=>c});const o=(()=>{let e;return()=>{if(void 0===e){const t=document.createElement("div"),n=t.style;n.visibility="hidden",n.width="100px",n.msOverflowStyle="scrollbar",document.body.appendChild(t);const o=t.offsetWidth;t.style.overflow="scroll";const s=document.createElement("div");s.style.width="100%",t.appendChild(s);const r=s.offsetWidth;t.parentNode?.removeChild(t),e=o-r}return e}})();function s(e,t,n){null!==e&&e.style.setProperty(t,n)}function r(e,t){return getComputedStyle(e,null).getPropertyValue(t)}function a(e,t){return parseInt(r(e,t))}let i=0,l=!1;function c(e){const{body:t}=document,n=t.querySelector(".widgetbar-wrap");if(e&&1==++i){const e=r(t,"overflow"),i=a(t,"padding-right");"hidden"!==e.toLowerCase()&&t.scrollHeight>t.offsetHeight&&(s(n,"right",`${o()}px`),t.style.paddingRight=`${i+o()}px`,l=!0),t.classList.add("i-no-scroll")}else if(!e&&i>0&&0==--i&&(t.classList.remove("i-no-scroll"),l)){s(n,"right","0px");let e=0;0,t.scrollHeight<=t.clientHeight&&(e-=o()),t.style.paddingRight=(e<0?0:e)+"px",l=!1}}},26540:(e,t,n)=>{"use strict";n.d(t,{ColorSelect:()=>F});var o=n(50959),s=n(97754),r=n.n(s),a=n(50151),i=n(68335),l=n(20520),c=n(29202),u=n(16697),d=n(64706),p=n(19291),h=n(57177),m=n(63460);function g(e){const{button:t,children:n,className:s,onPopupClose:g,"data-name":v,onColorChange:f,disabled:b,...y}=e,[C,x]=(0,o.useState)(!1),[_,w]=(0,o.useState)(!1),[E,S]=(0,c.useFocus)(),T=(0,o.useRef)(null),N=(0,o.useRef)(null),I=(0,o.useRef)(null);return o.createElement("div",{className:s,"data-name":v},o.createElement("button",{className:r()(m.button,m.accessible),tabIndex:b?-1:0,ref:I,onClick:function(){if(e.disabled)return;w((e=>!e)),x(!1)},onFocus:S.onFocus,onBlur:S.onBlur,disabled:b},"function"==typeof t?t(_,E):t),o.createElement(l.PopupMenu,{reference:N,controller:T,onFocus:function(e){if(!e.target||e.target!==e.currentTarget||C)return;const t=e.currentTarget,n=(0,a.ensureNotNull)((o=e.target,o.querySelector('[data-role="swatch"]:not([disabled]):not([aria-disabled])')));var o;(0,h.becomeMainElement)(n),setTimeout((()=>{if(document.activeElement!==t||!e.target.matches(":focus-visible"))return;const[n]=(0,p.queryTabbableElements)(t).sort(p.navigationOrderComparator);n&&n.focus()}))},
isOpened:_,onClose:k,position:function(){const e=(0,a.ensureNotNull)(I.current).getBoundingClientRect();return{x:e.left,y:e.top+e.height}},doNotCloseOn:I.current,onKeyDown:function(e){if(27===(0,i.hashFromEvent)(e))_&&(e.preventDefault(),k())},onOpen:function(){T.current?.focus()},tabIndex:-1},o.createElement(d.MenuContext.Consumer,null,(e=>o.createElement(u.ColorPicker,{...y,onColorChange:f,onToggleCustom:x,menu:e}))),!C&&n));function k(){w(!1),(0,a.ensureNotNull)(I.current).focus(),g&&g()}}var v=n(56512),f=n(19063),b=n(6914),y=n(11542),C=n(59416),x=n(99864);const _=(0,C.makeSwitchGroupItem)(class extends o.PureComponent{constructor(e){super(e),this._onChange=()=>{this.props.onChange&&this.props.onChange(this.props.value)},this._handleFocus=e=>{e.target.matches(":focus-visible")&&this.setState({isFocusVisible:!0})},this._handleBlur=()=>{this.state.isFocusVisible&&this.setState({isFocusVisible:!1})},this.state={isFocusVisible:!1}}render(){const{name:e,checked:t,value:n,renderItemContent:r,className:a}=this.props,i=s(x.item,x.accessible,{[x.checked]:t,[x.focusVisible]:this.state.isFocusVisible},a);return o.createElement("div",{className:i},o.createElement("input",{type:"radio",className:x.radio,name:e,value:n,onChange:this._onChange,onFocus:this._handleFocus,onBlur:this._handleBlur,checked:t}),r(parseInt(n),t))}});function w(e){const{name:t,values:n,selectedValues:r,onChange:a,renderItemContent:i}=e,l=n.map(((e,t)=>o.createElement(_,{key:t,value:e.toString(),renderItemContent:i,className:s(n.length>3&&x.paddingCompact)}))),c=r.map((e=>e.toString()));return o.createElement("div",{className:x.wrap},o.createElement(C.SwitchGroup,{name:t,onChange:e=>{a(parseInt(e))},values:c},l))}var E=n(69211);const S=y.t(null,void 0,n(54971));function T(e){const{value:t,items:n,onChange:s}=e;return o.createElement("div",{className:E.thicknessContainer},o.createElement("div",{className:E.thicknessTitle},S),o.createElement(w,{name:"color_picker_thickness_select",onChange:s,values:n,selectedValues:"mixed"===t?[]:[t],renderItemContent:(e,t)=>o.createElement("div",{className:r()(E.bar,t&&E.checked),style:{borderTopWidth:e}})}))}var N=n(51056);function I(e,t,n,o,s,r){return{repeat:e,width:t,height:n,segmentsGap:o,marginTop:s,segmentsGaps:r}}const k={"style-SOLID_thickness-1":I(1,"30px","1px"),"style-DASHED_thickness-1":I(4,"5px","1px","3px"),"style-DOTTED_thickness-1":I(6,"2px","2px","3px"),"style-SOLID_thickness-2":I(1,"30px","2px"),"style-DASHED_thickness-2":I(4,"5px","2px","3px"),"style-DOTTED_thickness-2":I(5,"3px","3px","3px"),"style-SOLID_thickness-3":I(1,"30px","3px"),"style-DASHED_thickness-3":I(4,"5px","3px","3px"),"style-DOTTED_thickness-3":I(5,"4px","4px","2px"),"style-SOLID_thickness-4":I(1,"30px","4px"),"style-DASHED_thickness-4":I(4,"5px","4px","3px"),"style-DOTTED_thickness-4":I(4,"5px","5px","3px")},P={...k,"style-mixed_thickness-large":I(1,"30px","16px"),"style-mixed_thickness-1":[I(1,"27px","1px"),I(4,"4px","1px","4px","5px",{3:"3px"}),I(6,"2px","2px","3px","5px")],
"style-mixed_thickness-2":[I(1,"27px","2px"),I(4,"4px","2px","4px","4px",{3:"3px"}),I(6,"2px","2px","3px","4px")],"style-mixed_thickness-3":[I(1,"27px","3px"),I(4,"4px","3px","4px","3px",{3:"3px"}),I(6,"2px","2px","3px","3px")],"style-mixed_thickness-4":[I(1,"27px","4px"),I(4,"4px","4px","4px","3px",{3:"3px"}),I(6,"2px","2px","3px","3px")],"style-SOLID_thickness-mixed":[I(1,"30px","3px",void 0,"4px"),I(1,"30px","2px",void 0,"4px"),I(1,"30px","1px",void 0,"4px")],"style-DASHED_thickness-mixed":[I(4,"5px","3px","3px"),I(4,"5px","2px","3px","4px"),I(4,"5px","1px","3px","4px")],"style-DOTTED_thickness-mixed":[I(5,"3px","3px","3px"),I(5,"3px","2px","3px","4px"),I(6,"2px","2px","3px","4px")],"style-mixed_thickness-mixed":[I(1,"30px","3px"),I(4,"6px","2px","2px","4px"),I(5,"2px","2px","5px","4px")]};function D(e,t){if(!t)return[];const n=e??N.LINESTYLE_SOLID;if("mixed"!==t&&t>4)return P["style-mixed_thickness-large"]||[];const o="mixed"===n?"mixed":B(n);return P[`style-${o}_thickness-${"mixed"===t?"mixed":t}`]||[]}function B(e){switch(e){case N.LINESTYLE_SOLID:return"SOLID";case N.LINESTYLE_DOTTED:return"DOTTED";case N.LINESTYLE_DASHED:return"DASHED";default:return"UNKNOWN"}}var M=n(63273),O=n(74997);function R(e){const{value:t,items:s,onChange:a,className:i}=e;return o.createElement("div",{className:r()(O.container,i)},o.createElement("div",{className:O.title},y.t(null,void 0,n(28603))),o.createElement(w,{name:"color_picker_line_style_select",onChange:a,values:s,selectedValues:"mixed"===t?[]:[t],renderItemContent:V}))}function V(e,t){const n=function(e,t=1){const n=B(e);return k[`style-${n}_thickness-${t}`]||null}(e,1);return n?o.createElement("div",{className:O.lineContainer},Array.from({length:n.repeat}).map(((e,s)=>{const a=n?.segmentsGaps?.[s]||n?.segmentsGap;return o.createElement("div",{key:s,className:r()(O.lineSegment,t&&O.checked),style:{width:n.width,height:n.height,...0!==s&&{[(0,M.isRtl)()?"marginRight":"marginLeft"]:a}}})}))):null}var L=n(98406);function F(e){const{className:t,selectOpacity:n=void 0!==e.opacity,thickness:s,lineStyle:a,color:i,disabled:l,opacity:c=1,onColorChange:u,onOpacityChange:d,onThicknessChange:p,onLineStyleChange:h,thicknessItems:m,lineStyleItems:f,onPopupClose:b,"data-name":y}=e,[C,x,_]=(0,v.useCustomColors)(),w=s&&m&&m.length>0;return o.createElement(g,{className:t,disabled:l,color:"mixed"!==i?i:null,selectOpacity:n,opacity:c,selectCustom:!0,customColors:C,onColorChange:u,onOpacityChange:i?d:void 0,onAddColor:x,onRemoveCustomColor:_,button:function(e,t){const n=e||t,u=n?"primary":"default";return o.createElement("div",{className:r()(L.colorPickerWrap,L[`intent-${u}`],L["border-thin"],L["size-medium"],n&&L.highlight,n&&L.focused,l&&L.disabled),"data-role":"button","data-name":s?"color-with-thickness-select":"color-select"},o.createElement("div",{className:r()(L.colorPicker,l&&L.disabled)},i&&"mixed"!==i?function(){const e=W(i,c),t=c>=.95&&A(i);return o.createElement("div",{className:L.opacitySwatch},o.createElement("div",{style:{backgroundColor:e},className:r()(L.swatch,t&&L.white)}))
}():o.createElement("div",{className:L.placeholderContainer},o.createElement("div",{className:"mixed"===i?L.mixedColor:L.placeholder})),(void 0!==a||s)&&function(){const e=i&&"mixed"!==i?W(i,c):void 0;if(void 0===a&&!s)return null;const t=D(a,s);if(!t||Array.isArray(t)&&!t.length)return null;if(Array.isArray(t))return o.createElement("div",{className:L.overflowContainer},o.createElement("div",{className:r()(L.linePropertyContainer,L.multiProperty,A(i)&&L.whiteContainer)},t.map(((t,n)=>o.createElement("div",{key:n,className:L.lineItem,style:{marginTop:A(i)&&t?.marginTop?`calc(${t.marginTop} - 2px)`:t?.marginTop}},E(t,e))))));return o.createElement("div",{className:L.overflowContainer},o.createElement("div",{className:r()(L.linePropertyContainer,A(i)&&L.whiteContainer)},E(t,e)))}()),n&&o.createElement("span",{className:L.shadow}))},onPopupClose:b,"data-name":y},w&&o.createElement(T,{value:s,items:m,onChange:function(e){p?.(e)}}),void 0!==a&&f&&f?.length>0&&o.createElement(R,{className:r()(w&&L.lineStyleSelect),value:a,items:f,onChange:function(e){h?.(e)}}));function E(e,t){return Array.from({length:e.repeat}).map(((n,s)=>{const a=e?.segmentsGaps?.[s]||e?.segmentsGap,l=A(i)&&a?`calc(${a} - 2px)`:a;return o.createElement("div",{key:s,className:r()(L.lineSegment,A(i)&&L.white),style:{width:e.width,height:e.height,backgroundColor:t,...0!==s&&{[(0,M.isRtl)()?"marginRight":"marginLeft"]:l}}})}))}}function W(e,t){return e?(0,f.generateColor)(e,(0,f.alphaToTransparency)(t),!0):"#000000"}function A(e){return!!e&&e.toLowerCase()===b.white}},6245:(e,t,n)=>{"use strict";n.d(t,{defaultLineStyleItems:()=>c,lineStyleItemValues:()=>l});var o=n(7029),s=n(51056),r=n(501),a=n(23851),i=n(57740);const l=[{type:s.LINESTYLE_SOLID,icon:r,label:o.t(null,void 0,n(3554))},{type:s.LINESTYLE_DASHED,icon:a,label:o.t(null,void 0,n(88123))},{type:s.LINESTYLE_DOTTED,icon:i,label:o.t(null,void 0,n(27390))}],c=l.map((e=>e.type))},48897:(e,t,n)=>{"use strict";n.d(t,{SymbolInputsButton:()=>E});var o=n(50959),s=n(97754),r=n.n(s),a=n(11542),i=n(50151),l=n(50655),c=n(95711),u=n(56570),d=n(16604),p=n(94664),h=n(1861),m=n(9745),g=n(10600),v=n(15931);function f(e){const{value:t,onClick:n,className:r,startSlot:a,disabled:i=!1}=e;return o.createElement("div",{className:s(v.wrap,i&&v.disabled,r),onClick:n,"data-name":"edit-button"},o.createElement("div",{className:s(v.text,"apply-overflow-tooltip")},void 0!==a&&a,o.createElement("span",null,t)),o.createElement(m.Icon,{icon:g,className:v.icon}))}var b=n(31356),y=n(78260),C=n(44254),x=n(82708),_=n(58851);function w(e){const{symbol:t,onSymbolChanged:s,disabled:i,className:d}=e,[m,g]=(0,o.useState)(t),v=(0,o.useContext)(l.SlotContext),b=(0,o.useContext)(c.PopupContext);let y;return u.enabled("symbol_search_option_chain_selector")&&({quotes:y}=useSymbolQuotes(matchesOptionPattern(m)?m:null)),o.createElement(f,{value:m,onClick:function(){const e=function(e){const t=(0,C.tokenize)(e);return(0,C.isSpread)(t)}(m)?m:(0,
x.safeShortName)(m),t="option"===y?.type,o=y?.["underlying-symbol"],r=u.enabled("symbol_search_option_chain_selector")&&t&&o?{type:"option",value:m,underlying:o}:e,i=(0,p.getSymbolSearchCompleteOverrideFunction)();(0,h.showSymbolSearchItemsDialog)({onSearchComplete:e=>{i(e[0].symbol,e[0].result).then((e=>{s(e.symbol),g(e.name)}))},dialogTitle:a.t(null,void 0,n(63245)),defaultValue:r,manager:v,onClose:()=>{b&&b.focus()},searchInitiationPoint:"indicatorInputs",enableOptionsChain:u.enabled("symbol_search_option_chain_selector"),showSpreadActions:u.enabled("show_spread_operators")&&u.enabled("studies_symbol_search_spread_operators")})},disabled:i,className:r()(d,u.enabled("uppercase_instrument_names")&&_.uppercase)})}function E(e){if("definition"in e){const{propType:t,properties:n,id:s,title:r="",solutionId:a}=e.definition,l=n[t],c=l.value()||"",u=e=>{l.setValue(e)};return o.createElement(b.CommonSection,{id:s,title:r,solutionId:a},o.createElement(y.CellWrap,null,o.createElement(w,{symbol:(0,i.ensureDefined)(c),onSymbolChanged:u})))}{const{study:t,value:n,input:{id:s,name:a},onChange:l,disabled:c,hasTooltip:u}=e,p=e=>{const n=(0,d.getInternalSymbolName)(e,t);l(n,s,a)};return o.createElement(w,{symbol:(0,i.ensureDefined)(n),onSymbolChanged:p,disabled:c,className:r()(u&&_.hasTooltip)})}}},1861:(e,t,n)=>{"use strict";n.d(t,{showSymbolSearchItemsDialog:()=>l});var o=n(50959),s=n(50655),r=n(51826),a=n(73280),i=n(87896);function l(e){const{symbolTypeFilter:t,initialMode:n="symbolSearch",autofocus:l=!0,defaultValue:c,showSpreadActions:u,selectSearchOnInit:d,onSearchComplete:p,dialogTitle:h,placeholder:m,fullscreen:g,initialScreen:v,wrapper:f,dialog:b,contentItem:y,onClose:C,onOpen:x,footer:_,symbolTypes:w,searchInput:E,emptyState:S,hideMarkedListFlag:T,dialogWidth:N="auto",manager:I,shouldReturnFocus:k,onSymbolFiltersParamsChange:P,onEmptyResults:D,customSearchSymbols:B,enableOptionsChain:M,searchInitiationPoint:O}=e;if(r.dialogsOpenerManager.isOpened("SymbolSearch")||r.dialogsOpenerManager.isOpened("ChangeIntervalDialog"))return;const R=document.createElement("div"),V=o.createElement(s.SlotContext.Provider,{value:I??null},o.createElement(a.SymbolSearchItemsDialog,{symbolTypeFilter:t,onClose:F,initialMode:n,defaultValue:c,showSpreadActions:u,hideMarkedListFlag:T,selectSearchOnInit:d,onSearchComplete:p,dialogTitle:h,placeholder:m,fullscreen:g,initialScreen:v,wrapper:f,dialog:b,contentItem:y,footer:_,symbolTypes:w,searchInput:E,emptyState:S,autofocus:l,dialogWidth:N,shouldReturnFocus:k,onSymbolFiltersParamsChange:P,onEmptyResults:D,customSearchSymbols:B,enableOptionsChain:M,searchInitiationPoint:O})),L=(0,i.createReactRoot)(V,R);function F(){L.unmount(),r.dialogsOpenerManager.setAsClosed("SymbolSearch"),C&&C()}return r.dialogsOpenerManager.setAsOpened("SymbolSearch"),x&&x(),{close:F}}},73146:(e,t,n)=>{"use strict";n.d(t,{createAdapter:()=>a,doesStudyLikeAffectSave:()=>i});var o=n(32755),s=n(85719),r=n(79036);function a(e){if((0,o.isLineTool)(e))return{isPine:()=>!1,isStandardPine:()=>!1,canOverrideMinTick:()=>!1,
resolvedSymbolInfoBySymbol:()=>{throw new TypeError("Only study is supported.")},symbolsResolved:()=>{throw new TypeError("Only study is supported.")},parentSources:()=>{throw new TypeError("Only study is supported.")},getAllChildren:()=>[],sourceId:()=>{throw new TypeError("Only study is supported.")},inputs:()=>({}),parentSourceForInput:()=>{throw new TypeError("Only study is supported.")}};if((0,r.isStudy)(e))return e;if("isInputsStudy"in e)return e;throw new TypeError("Unsupported source type.")}function i(e){return(0,r.isStudy)(e)||!s.lineToolsDoNotAffectChartInvalidation}},45560:(e,t,n)=>{"use strict";n.d(t,{useDefinitionProperty:()=>r});var o=n(50959),s=n(71953);const r=e=>{const t="property"in e?e.property:void 0,n="defaultValue"in e?e.defaultValue:e.property.value(),[r,a]=(0,o.useState)(t?t.value():n);(0,o.useEffect)((()=>{if(t){const n={};return a(t.value()),t.subscribe(n,(t=>{const n=t.value();e.handler&&e.handler(n),a(n)})),()=>{t.unsubscribeAll(n)}}return()=>{}}),[t]);return[r,e=>{if(void 0!==t){const n=t.value();s.logger.logNormal(`Changing property value from "${n}" to "${e}"`),t.setValue(e)}}]}},78260:(e,t,n)=>{"use strict";n.d(t,{CellWrap:()=>i});var o=n(50959),s=n(97754),r=n.n(s),a=n(92492);function i(e){return o.createElement("div",{className:r()(a.wrap,e.className)},e.children)}},53424:(e,t,n)=>{"use strict";n.d(t,{CheckableTitle:()=>c});var o=n(50959),s=n(15294),r=n(45560);function a(e){const{property:t,...n}=e,[a,i]=(0,r.useDefinitionProperty)({property:t}),l="mixed"===a;return o.createElement(s.Checkbox,{...n,name:"toggle-enabled",checked:l||a,indeterminate:l,onChange:function(){i("mixed"===a||!a)}})}var i=n(78260),l=n(52257);function c(e){const{property:t,disabled:n,title:s,className:r,name:c}=e,u=o.createElement("span",{className:l.title},s);return o.createElement(i.CellWrap,{className:r},t?o.createElement(a,{name:c,className:l.checkbox,property:t,disabled:n,label:u,labelAlignBaseline:!0}):u)}},31356:(e,t,n)=>{"use strict";n.d(t,{CommonSection:()=>a});var o=n(50959),s=n(71891),r=n(53424);n(7208);function a(e){const{id:t,offset:n,disabled:a,checked:i,title:l,children:c,solutionId:u,infoTooltip:d}=e;return o.createElement(s.PropertyTable.Row,null,o.createElement(s.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:n,"data-section-name":t,colSpan:Boolean(c)?void 0:2,checkableTitle:!0},o.createElement(r.CheckableTitle,{name:`is-enabled-${t}`,title:l,disabled:a,property:i}),u&&!Boolean(c)&&!1,d&&!Boolean(c)&&!1),Boolean(c)&&o.createElement(s.PropertyTable.Cell,{placement:"last","data-section-name":t},c,u&&!1,d&&!1))}},86067:(e,t,n)=>{"use strict";n.d(t,{GroupTitleSection:()=>i});var o=n(50959),s=n(71891),r=n(53424),a=n(71035);function i(e){return o.createElement(s.PropertyTable.Row,null,o.createElement(s.PropertyTable.Cell,{className:a.titleWrap,placement:"first",verticalAlign:"adaptive",colSpan:2,"data-section-name":e.name,checkableTitle:!0},o.createElement(r.CheckableTitle,{title:e.title,name:`is-enabled-${e.name}`,className:a.title})))}},71953:(e,t,n)=>{"use strict";n.d(t,{
logger:()=>o});const o=(0,n(9343).getLogger)("Platform.GUI.PropertyDefinitionTrace")},16697:(e,t,n)=>{"use strict";n.d(t,{ColorPicker:()=>q});var o=n(50959),s=n(97754),r=n.n(s),a=n(11542),i=n(59369),l=n(82665),c=n(24377),u=n(50151),d=n(49483),p=n(20520),h=n(16396),m=n(6914),g=n(50238),v=n(93544),f=n(11992);const b=4;function y(e){const{color:t,selected:r,onSelect:i,onSwatchRemove:l}=e,[c,y]=(0,o.useState)(!1),[C,x]=(0,g.useRovingTabindexElement)(null),_=Boolean(l)&&!d.CheckMobile.any();return o.createElement(o.Fragment,null,o.createElement("button",{ref:C,style:t?{color:t}:void 0,className:s(f.swatch,c&&f.hover,r&&f.selected,!t&&f.empty,String(t).toLowerCase()===m.white&&f.white),onClick:function(){i(t)},onContextMenu:_?w:void 0,tabIndex:x,"data-role":"swatch"}),_&&o.createElement(p.PopupMenu,{isOpened:c,onClose:w,position:function(){const e=(0,u.ensureNotNull)(C.current).getBoundingClientRect();return{x:e.left,y:e.top+e.height+b}},onClickOutside:w},o.createElement(h.PopupMenuItem,{className:f.contextItem,label:a.t(null,void 0,n(89984)),icon:v,onClick:function(){w(),(0,u.ensureDefined)(l)()},dontClosePopup:!0})));function w(){y(!c)}}const C=10;function x(e){const{colors:t,color:n,children:s,onSelect:r,onRemoveCustomColor:a}=e;if(!t)return null;const i=n?(0,c.parseRgb)(String(n)):void 0,u=(0,l.default)(t,C);return o.createElement("div",{className:f.swatches},u.map(((e,t)=>o.createElement("div",{className:f.row,"data-role":"row",key:t},e.map(((e,n)=>o.createElement(y,{key:String(e)+n,color:e,selected:i&&(0,c.areEqualRgb)(i,(0,c.parseRgb)(String(e))),onSelect:d,onSwatchRemove:a?()=>function(e,t){const n=e*C+t;a?.(n)}(t,n):void 0})))))),s);function d(e){r&&r(e)}}var _=n(54368),w=n(67248);function E(e){const t=`Invalid RGB color: ${e}`;if(null===e)throw new Error(t);const n=e.match(/^#?([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i);if(null===n)throw new Error(t);const[,o,s,r]=n;if(!o||!s||!r)throw new Error(t);const a=parseInt(o,16)/255,i=parseInt(s,16)/255,l=parseInt(r,16)/255,c=Math.max(a,i,l),u=Math.min(a,i,l);let d;const p=c,h=c-u,m=0===c?0:h/c;if(c===u)d=0;else{switch(c){case a:d=(i-l)/h+(i<l?6:0);break;case i:d=(l-a)/h+2;break;case l:d=(a-i)/h+4;break;default:d=0}d/=6}return{h:d,s:m,v:p}}var S=n(20057),T=n(68335),N=n(9859),I=n(87109);const k=[37,39,38,40],P=.01;class D extends o.PureComponent{constructor(){super(...arguments),this._container=null,this._refContainer=e=>{this._container=e},this._handlePosition=e=>{const{hsv:{h:t},onChange:n}=this.props;if(!n)return;const o=(0,u.ensureNotNull)(this._container).getBoundingClientRect(),s=e.clientX-o.left,r=e.clientY-o.top;n({h:t,s:(0,N.clamp)(s/o.width,0,1),v:(0,N.clamp)(1-r/o.height,0,1)})},this._handleKeyDown=e=>{const{hsv:{h:t,s:n,v:o},onChange:s}=this.props,r=(0,T.hashFromEvent)(e);if(!s||!k.includes(r))return;if(37===r||39===r){return void s({h:t,s:(0,N.clamp)(37===r?n-P:n+P,0,1),v:o})}s({h:t,s:n,v:(0,N.clamp)(40===r?o-P:o+P,0,1)})},this._mouseDown=e=>{window.addEventListener("mouseup",this._mouseUp),window.addEventListener("mousemove",this._mouseMove)},
this._mouseUp=e=>{window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._handlePosition(e)},this._mouseMove=(0,S.default)(this._handlePosition,100),this._handleTouch=e=>{this._handlePosition(e.nativeEvent.touches[0])}}render(){const{className:e,hsv:{h:t,s:n,v:s}}=this.props,a=`hsl(${360*t}, 100%, 50%)`;return o.createElement("div",{tabIndex:0,className:r()(I.accessible,e),onKeyDown:this._handleKeyDown},o.createElement("div",{className:I.saturation,style:{backgroundColor:a},ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},o.createElement("div",{className:I.pointer,style:{left:100*n+"%",top:100*(1-s)+"%"}})))}}var B=n(58065);class M extends o.PureComponent{constructor(){super(...arguments),this._container=null,this._refContainer=e=>{this._container=e},this._handlePosition=e=>{const{hsv:{s:t,v:n},onChange:o}=this.props;if(!o)return;const s=(0,u.ensureNotNull)(this._container).getBoundingClientRect(),r=e.clientY-s.top;o({h:(0,N.clamp)(r/s.height,0,1),s:t,v:n})},this._handleKeyDown=e=>{const{hsv:{h:t,s:n,v:o},onChange:s}=this.props,r=(0,T.hashFromEvent)(e);if(!s||38!==r&&40!==r)return;s({h:(0,N.clamp)(38===r?t-.01:t+.01,0,1),s:n,v:o})},this._mouseDown=e=>{window.addEventListener("mouseup",this._mouseUp),window.addEventListener("mousemove",this._mouseMove)},this._mouseUp=e=>{window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._handlePosition(e)},this._mouseMove=(0,S.default)(this._handlePosition,100),this._handleTouch=e=>{this._handlePosition(e.nativeEvent.touches[0])}}render(){const{className:e,hsv:{h:t}}=this.props;return o.createElement("div",{className:r()(B.hue,B.accessible,e),tabIndex:0,onKeyDown:this._handleKeyDown},o.createElement("div",{className:B.pointerContainer,ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},o.createElement("div",{className:B.pointer,style:{top:100*t+"%"}})))}}var O=n(75187);const R="#000000",V=a.t(null,{context:"Color Picker"},n(55517));class L extends o.PureComponent{constructor(e){super(e),this._inputRef=o.createRef(),this._handleHSV=e=>{const t=function(e){const{h:t,s:n,v:o}=e;let s,r,a;const i=Math.floor(6*t),l=6*t-i,c=o*(1-n),u=o*(1-l*n),d=o*(1-(1-l)*n);switch(i%6){case 0:s=o,r=d,a=c;break;case 1:s=u,r=o,a=c;break;case 2:s=c,r=o,a=d;break;case 3:s=c,r=u,a=o;break;case 4:s=d,r=c,a=o;break;case 5:s=o,r=c,a=u;break;default:s=0,r=0,a=0}return"#"+[255*s,255*r,255*a].map((e=>("0"+Math.round(e).toString(16)).replace(/.+?([a-f0-9]{2})$/i,"$1"))).join("")}(e)||R;this.setState({color:t,inputColor:F(t),hsv:e}),this.props.onSelect(t)},this._handleInput=e=>{const t=F(e.currentTarget.value);try{const e=E(t),n=`#${t}`;this.setState({color:n,inputColor:t,hsv:e}),this.props.onSelect(n)}catch(e){this.setState({inputColor:t})}},this._handleAddColor=()=>this.props.onAdd(this.state.color);const t=e.color||R;this.state={color:t,inputColor:F(t),hsv:E(t)}}
componentDidMount(){d.CheckMobile.any()||this._inputRef.current?.focus()}render(){const{color:e,hsv:t,inputColor:n}=this.state;return o.createElement("div",{className:O.container},o.createElement("div",{className:O.form},o.createElement("div",{className:r()(O.swatch,String(e).toLowerCase()===m.white&&O.white),style:{backgroundColor:e}}),o.createElement("div",{className:O.inputWrap},o.createElement("span",{className:O.inputHash},"#"),o.createElement("input",{ref:this._inputRef,type:"text",className:O.input,value:n,onChange:this._handleInput})),o.createElement("div",{className:O.buttonWrap},o.createElement(w.Button,{size:"s",onClick:this._handleAddColor},V))),o.createElement("div",{className:O.hueSaturationWrap},o.createElement(D,{className:O.saturation,hsv:t,onChange:this._handleHSV}),o.createElement(M,{className:O.hue,hsv:t,onChange:this._handleHSV})))}}function F(e){return e.replace(/^#/,"")}var W=n(60387);const A=a.t(null,{context:"Color Picker"},n(29619)),H=a.t(null,{context:"Color Picker"},n(80936));function q(e){const{color:t,opacity:n,selectCustom:s,selectOpacity:a,customColors:l,onRemoveCustomColor:c,onToggleCustom:u,onOpacityChange:d,menu:p}=e,[h,g]=(0,o.useState)(!1),v="number"==typeof n?n:1,[f,b]=(0,i.useRowsNavigation)();return(0,o.useLayoutEffect)((()=>{p&&p.update()}),[a,p]),h?o.createElement(L,{color:t,onSelect:y,onAdd:function(t){g(!1),u?.(!1);const{onAddColor:n}=e;n&&n(t)}}):o.createElement("div",{className:W.container},o.createElement("div",{ref:f,onKeyDown:b},o.createElement(x,{colors:m.basic,color:t,onSelect:y}),o.createElement(x,{colors:m.extended,color:t,onSelect:y}),o.createElement("div",{className:W.separator}),o.createElement(x,{colors:l,color:t,onSelect:y,onRemoveCustomColor:c},s&&o.createElement(o.Fragment,null,l?.length?o.createElement("button",{title:A,onClick:C,className:r()(W.customButton,W.accessible,"apply-common-tooltip"),tabIndex:-1}):o.createElement("div",{"data-role":"row"},o.createElement("button",{title:A,onClick:C,className:r()(W.customButton,W.accessible,"apply-common-tooltip"),tabIndex:-1}))))),a&&o.createElement(o.Fragment,null,o.createElement("div",{className:W.sectionTitle},H),o.createElement(_.Opacity,{color:t,opacity:v,onChange:function(e){d&&d(e)}})));function y(t){const{onColorChange:n}=e;n&&n(t,h)}function C(e){g(!0),u?.(!0)}}},54368:(e,t,n)=>{"use strict";n.d(t,{Opacity:()=>c});var o=n(50959),s=n(97754),r=n(50151),a=n(9859),i=n(68335),l=n(94085);class c extends o.PureComponent{constructor(e){super(e),this._container=null,this._pointer=null,this._raf=null,this._refContainer=e=>{this._container=e},this._refPointer=e=>{this._pointer=e},this._handlePosition=e=>{null===this._raf&&(this._raf=requestAnimationFrame((()=>{const t=(0,r.ensureNotNull)(this._container),n=(0,r.ensureNotNull)(this._pointer),o=t.getBoundingClientRect(),s=n.offsetWidth,i=e.clientX-s/2-o.left,l=(0,a.clamp)(i/(o.width-s),0,1);this.setState({inputOpacity:Math.round(100*l).toString()}),this.props.onChange(l),this._raf=null})))},this._onSliderClick=e=>{this._handlePosition(e.nativeEvent),
this._dragSubscribe()},this._mouseUp=e=>{this.setState({isPointerDragged:!1}),this._dragUnsubscribe(),this._handlePosition(e)},this._mouseMove=e=>{this.setState({isPointerDragged:!0}),this._handlePosition(e)},this._onTouchStart=e=>{this._handlePosition(e.nativeEvent.touches[0])},this._handleTouch=e=>{this.setState({isPointerDragged:!0}),this._handlePosition(e.nativeEvent.touches[0])},this._handleTouchEnd=()=>{this.setState({isPointerDragged:!1})},this._handleInput=e=>{const t=e.currentTarget.value,n=Number(t)/100;this.setState({inputOpacity:t}),Number.isNaN(n)||n>1||this.props.onChange(n)},this._handleKeyDown=e=>{const t=(0,i.hashFromEvent)(e);if(37!==t&&39!==t)return;e.preventDefault();const n=Number(this.state.inputOpacity);37===t&&0!==n&&this._changeOpacity(n-1),39===t&&100!==n&&this._changeOpacity(n+1)},this.state={inputOpacity:Math.round(100*e.opacity).toString(),isPointerDragged:!1}}componentWillUnmount(){null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),this._dragUnsubscribe()}render(){const{color:e,opacity:t,hideInput:n,disabled:r}=this.props,{inputOpacity:a,isPointerDragged:i}=this.state,c={color:e||void 0};return o.createElement("div",{className:l.opacity},o.createElement("div",{className:s(l.opacitySlider,l.accessible),style:c,tabIndex:r?-1:0,ref:this._refContainer,onMouseDown:this._onSliderClick,onTouchStart:this._onTouchStart,onTouchMove:this._handleTouch,onTouchEnd:this._handleTouchEnd,onKeyDown:this._handleKeyDown,"aria-disabled":r},o.createElement("div",{className:l.opacitySliderGradient,style:{backgroundImage:`linear-gradient(90deg, transparent, ${e})`}}),o.createElement("div",{className:l.opacityPointerWrap},o.createElement("div",{className:s(l.pointer,i&&l.dragged),style:{left:100*t+"%"},ref:this._refPointer}))),!n&&o.createElement("div",{className:l.opacityInputWrap},o.createElement("input",{type:"text",className:l.opacityInput,value:a,onChange:this._handleInput}),o.createElement("span",{className:l.opacityInputPercent},"%")))}_dragSubscribe(){const e=(0,r.ensureNotNull)(this._container).ownerDocument;e&&(e.addEventListener("mouseup",this._mouseUp),e.addEventListener("mousemove",this._mouseMove))}_dragUnsubscribe(){const e=(0,r.ensureNotNull)(this._container).ownerDocument;e&&(e.removeEventListener("mousemove",this._mouseMove),e.removeEventListener("mouseup",this._mouseUp))}_changeOpacity(e){this.setState({inputOpacity:e.toString()}),this.props.onChange(e/100)}}},6914:(e,t,n)=>{"use strict";n.d(t,{basic:()=>i,extended:()=>c,white:()=>s});var o=n(19625);const s=o.colorsPalette["color-white"],r=["ripe-red","tan-orange","banana-yellow","iguana-green","minty-green","sky-blue","tv-blue","deep-blue","grapes-purple","berry-pink"],a=[200,300,400,500,600,700,800,900].map((e=>`color-cold-gray-${e}`));a.unshift("color-white"),a.push("color-black"),r.forEach((e=>{a.push(`color-${e}-500`)}));const i=a.map((e=>o.colorsPalette[e])),l=[];[100,200,300,400,700,900].forEach((e=>{r.forEach((t=>{l.push(`color-${t}-${e}`)}))}));const c=l.map((e=>o.colorsPalette[e]))},59054:(e,t,n)=>{"use strict"
;n.d(t,{ControlDisclosureView:()=>v});var o=n(50959),s=n(97754),r=n.n(s),a=n(38528),i=n(67029),l=n(78274),c=n(4523),u=n(9745),d=n(2948),p=n(61442);function h(e){const{isDropped:t}=e;return o.createElement(u.Icon,{className:r()(p.icon,t&&p.dropped),icon:d})}function m(e){const{className:t,disabled:n,isDropped:s}=e;return o.createElement("span",{className:r()(p.button,n&&p.disabled,t)},o.createElement(h,{isDropped:s}))}var g=n(99505);const v=o.forwardRef(((e,t)=>{const{listboxId:n,className:s,listboxClassName:u,listboxTabIndex:d,hideArrowButton:p,matchButtonAndListboxWidths:h,popupPosition:v,disabled:f,isOpened:b,scrollWrapReference:y,repositionOnScroll:C,closeOnHeaderOverlap:x,listboxReference:_,size:w="small",onClose:E,onOpen:S,onListboxFocus:T,onListboxBlur:N,onListboxKeyDown:I,buttonChildren:k,children:P,caretClassName:D,buttonContainerClassName:B,listboxAria:M,...O}=e,R=(0,o.useRef)(null),V=!p&&o.createElement(l.EndSlot,null,o.createElement(m,{isDropped:b,disabled:f,className:D}));return o.createElement(c.PopupMenuDisclosureView,{buttonRef:R,listboxId:n,listboxClassName:u,listboxTabIndex:d,isOpened:b,onClose:E,onOpen:S,listboxReference:_,scrollWrapReference:y,onListboxFocus:T,onListboxBlur:N,onListboxKeyDown:I,listboxAria:M,matchButtonAndListboxWidths:h,popupPosition:v,button:o.createElement(i.ControlSkeleton,{...O,"data-role":"listbox",disabled:f,className:r()(g.button,s),size:w,ref:(0,a.useMergedRefs)([R,t]),middleSlot:o.createElement(l.MiddleSlot,null,o.createElement("span",{className:r()(g["button-children"],p&&g.hiddenArrow,B)},k)),endSlot:V}),popupChildren:P,repositionOnScroll:C,closeOnHeaderOverlap:x})}));v.displayName="ControlDisclosureView"},56512:(e,t,n)=>{"use strict";n.d(t,{useCustomColors:()=>c});var o=n(50959),s=n(56840),r=n(76422);function a(e,t){(0,o.useEffect)((()=>(r.subscribe(e,t,null),()=>{r.unsubscribe(e,t,null)})),[e,t])}var i,l=n(24377);function c(){const[e,t]=(0,o.useState)((0,s.getJSON)("pickerCustomColors",[]));a("add_new_custom_color",(n=>t(u(n,e)))),a("remove_custom_color",(n=>t(d(n,e))));const n=(0,o.useCallback)((t=>{const n=t?(0,l.parseRgb)(t):null;e.some((e=>null!==e&&null!==n&&(0,l.areEqualRgb)((0,l.parseRgb)(e),n)))||(r.emit("add_new_custom_color",t),(0,s.setJSON)("pickerCustomColors",u(t,e)))}),[e]),i=(0,o.useCallback)((t=>{(t>=0||t<e.length)&&(r.emit("remove_custom_color",t),(0,s.setJSON)("pickerCustomColors",d(t,e)))}),[e]);return[e,n,i]}function u(e,t){const n=t.slice();return n.push(e),n.length>29&&n.shift(),n}function d(e,t){return t.filter(((t,n)=>e!==n))}!function(e){e.SettingsKey="pickerCustomColors",e.GlobalAddEventName="add_new_custom_color",e.GlobalRemoveEventName="remove_custom_color",e[e.MaxColors=29]="MaxColors"}(i||(i={}))},90405:(e,t,n)=>{"use strict";n.d(t,{Select:()=>C});var o=n(50959),s=n(43010),r=n(22064),a=n(38528),i=n(16921),l=n(16396),c=n(90484),u=n(20057);var d=n(36762),p=n(26597),h=n(59054),m=n(36104),g=n(63273),v=n(65630);function f(e){return!e.readonly}function b(e,t){return t?.id??(0,r.createDomId)(e,"item",t?.value)}function y(e){
const{selectedItem:t,placeholder:n}=e;if(!t)return o.createElement("span",{className:v.placeholder},n);const s=t.selectedContent??t.content??t.value;return o.createElement("span",null,s)}const C=o.forwardRef(((e,t)=>{const{id:n,menuClassName:v,menuItemClassName:C,tabIndex:x,disabled:_,highlight:w,intent:E,hideArrowButton:S,placeholder:T,addPlaceholderToItems:N=!1,value:I,"aria-labelledby":k,onFocus:P,onBlur:D,onClick:B,onChange:M,onKeyDown:O,repositionOnScroll:R=!0,openMenuOnEnter:V=!0,"aria-describedby":L,"aria-invalid":F,...W}=e;let{items:A}=e;if(T&&N){A=[{value:void 0,content:T,id:(0,r.createDomId)(n,"placeholder")},...A]}const{listboxId:H,isOpened:q,isFocused:z,buttonTabIndex:U,listboxTabIndex:Z,highlight:G,intent:K,open:Y,onOpen:$,close:j,toggle:J,buttonFocusBindings:Q,onButtonClick:X,buttonRef:ee,listboxRef:te,buttonAria:ne}=(0,m.useControlDisclosure)({id:n,disabled:_,buttonTabIndex:x,intent:E,highlight:w,onFocus:P,onBlur:D,onClick:B}),oe=A.filter(f),se=oe.find((e=>e.value===I)),[re,ae]=o.useState(T&&N?oe[0].value:se?.value),[ie,le,ce]=(0,i.useKeepActiveItemIntoView)({activeItem:se});(0,s.useIsomorphicLayoutEffect)((()=>ae(se?.value)),[I]);const ue=(0,r.joinDomIds)(k,n),de=ue.length>0?ue:void 0,pe=(0,o.useMemo)((()=>({role:"listbox","aria-labelledby":k,"aria-activedescendant":b(n,se)})),[k,se]),he=(0,o.useCallback)((e=>e.value===re),[re]),me=(0,o.useCallback)((()=>(j(),M&&M(re))),[j,M,re]),ge=(0,d.useItemsKeyboardNavigation)("vertical",g.isRtl,oe,he,(e=>{ae(e.value)}),!1,{next:[40],previous:[38]}),ve=(0,p.useKeyboardToggle)(J,q||V),fe=(0,p.useKeyboardToggle)(me),be=(0,p.useKeyboardClose)(q,Ee),ye=(0,p.useKeyboardOpen)(q,Y),Ce=(0,p.useKeyboardEventHandler)([ve,be,ye]),xe=(0,p.useKeyboardEventHandler)([ge,fe,be]),_e=function(e){const t=(0,o.useRef)(""),n=(0,o.useMemo)((()=>(0,c.default)((()=>{t.current=""}),500)),[]),s=(0,o.useMemo)((()=>(0,u.default)(e,200)),[e]);return(0,o.useCallback)((e=>{e.key.length>0&&e.key.length<3&&(t.current+=e.key,s(t.current,e),n())}),[n,s])}(((t,n)=>{const o=function(e,t,n){return e.find((e=>{const o=t.toLowerCase();return!e.readonly&&(n?n(e).toLowerCase().startsWith(o):!e.readonly&&("string"==typeof e.content&&e.content.toLowerCase().startsWith(o)||"string"==typeof e.textContent&&e.textContent.toLowerCase().startsWith(o)||String(e.value??"").toLowerCase().startsWith(o)))}))}(oe,t,e.getSearchKey);void 0!==o&&M&&(n.stopPropagation(),q||Y(),M(o.value))}));return o.createElement(h.ControlDisclosureView,{...W,...ne,...Q,id:n,role:"button",tabIndex:U,"aria-owns":ne["aria-controls"],"aria-haspopup":"listbox","aria-labelledby":de,disabled:_,hideArrowButton:S,isFocused:z,isOpened:q,highlight:G,intent:K,ref:(0,a.useMergedRefs)([ee,t]),onClick:X,onOpen:function(){ce(se,{duration:0}),$()},onClose:Ee,onKeyDown:function(e){Ce(e),O&&O(e);e.defaultPrevented||_e(e)},listboxId:H,listboxTabIndex:Z,listboxClassName:v,listboxAria:pe,"aria-describedby":L,"aria-invalid":F,listboxReference:te,scrollWrapReference:ie,onListboxKeyDown:function(e){xe(e),e.defaultPrevented||_e(e)},
buttonChildren:o.createElement(y,{selectedItem:se??null,placeholder:T}),repositionOnScroll:R},A.map(((e,t)=>{if(e.readonly)return o.createElement(o.Fragment,{key:`readonly_item_${t}`},e.content);const s=b(n,e);return o.createElement(l.PopupMenuItem,{key:s,id:s,className:C,role:"option","aria-selected":I===e.value,isActive:re===e.value,label:e.content??e.value,onClick:we,onClickArg:e.value,isDisabled:e.disabled,reference:t=>le(e,t)})})));function we(e){M&&(M(e),ae(e))}function Ee(){ae(se?.value),j()}}));C.displayName="Select"},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>s});var o=n(50959);class s extends o.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addEventListener("change",this._handleChange)}_unsubscribe(e){e.removeEventListener("change",this._handleChange)}}},64706:(e,t,n)=>{"use strict";n.d(t,{MenuContext:()=>o});const o=n(50959).createContext(null)},27317:(e,t,n)=>{"use strict";n.d(t,{DEFAULT_MENU_THEME:()=>v,Menu:()=>b});var o=n(50959),s=n(97754),r=n.n(s),a=n(50151),i=n(9859),l=n(14729),c=n(50655),u=n(59064),d=n(67961),p=n(26709),h=n(83021),m=n(64706),g=n(67797);const v=g;var f;!function(e){e[e.IndentFromWindow=0]="IndentFromWindow"}(f||(f={}));class b extends o.PureComponent{constructor(e){super(e),this._containerRef=null,this._scrollWrapRef=null,this._raf=null,this._scrollRaf=null,this._scrollTimeout=void 0,this._manager=new d.OverlapManager,this._hotkeys=null,this._scroll=0,this._handleContainerRef=e=>{this._containerRef=e,this.props.reference&&("function"==typeof this.props.reference&&this.props.reference(e),"object"==typeof this.props.reference&&(this.props.reference.current=e))},this._handleScrollWrapRef=e=>{this._scrollWrapRef=e,"function"==typeof this.props.scrollWrapReference&&this.props.scrollWrapReference(e),"object"==typeof this.props.scrollWrapReference&&(this.props.scrollWrapReference.current=e)},this._handleCustomRemeasureDelegate=()=>{this._resizeForced(),this._handleMeasure()},this._handleMeasure=({callback:e,forceRecalcPosition:t}={})=>{if(this.state.isMeasureValid&&!t)return;const{position:n}=this.props,o=(0,a.ensureNotNull)(this._containerRef);let s=o.getBoundingClientRect();const r=document.documentElement.clientHeight,l=document.documentElement.clientWidth,c=this.props.closeOnScrollOutsideOffset??0;let u=r-0-c;const d=s.height>u;if(d){(0,a.ensureNotNull)(this._scrollWrapRef).style.overflowY="scroll",s=o.getBoundingClientRect()}const{width:p,height:h}=s,m="function"==typeof n?n({contentWidth:p,contentHeight:h,availableWidth:l,availableHeight:r
}):n,g=m?.indentFromWindow?.left??0,v=l-(m.overrideWidth??p)-(m?.indentFromWindow?.right??0),f=(0,i.clamp)(m.x,g,Math.max(g,v)),b=(m?.indentFromWindow?.top??0)+c,y=r-(m.overrideHeight??h)-(m?.indentFromWindow?.bottom??0);let C=(0,i.clamp)(m.y,b,Math.max(b,y));if(m.forbidCorrectYCoord&&C<m.y&&(u-=m.y-C,C=m.y),t&&void 0!==this.props.closeOnScrollOutsideOffset&&m.y<=this.props.closeOnScrollOutsideOffset)return void this._handleGlobalClose(!0);const x=m.overrideHeight??(d?u:void 0);this.setState({appearingMenuHeight:t?this.state.appearingMenuHeight:x,appearingMenuWidth:t?this.state.appearingMenuWidth:m.overrideWidth,appearingPosition:{x:f,y:C},isMeasureValid:!0},(()=>{this.props.doNotRestorePosition||this._restoreScrollPosition(),e&&e()}))},this._restoreScrollPosition=()=>{const e=document.activeElement,t=(0,a.ensureNotNull)(this._containerRef);if(null!==e&&t.contains(e))try{e.scrollIntoView()}catch(e){}else(0,a.ensureNotNull)(this._scrollWrapRef).scrollTop=this._scroll},this._resizeForced=()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0})},this._resize=()=>{null===this._raf&&(this._raf=requestAnimationFrame((()=>{this.setState({appearingMenuHeight:void 0,appearingMenuWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0}),this._raf=null})))},this._handleGlobalClose=e=>{this.props.onClose(e)},this._handleSlot=e=>{this._manager.setContainer(e)},this._handleScroll=()=>{this._scroll=(0,a.ensureNotNull)(this._scrollWrapRef).scrollTop},this._handleScrollOutsideEnd=()=>{clearTimeout(this._scrollTimeout),this._scrollTimeout=setTimeout((()=>{this._handleMeasure({forceRecalcPosition:!0})}),80)},this._handleScrollOutside=e=>{e.target!==this._scrollWrapRef&&(this._handleScrollOutsideEnd(),null===this._scrollRaf&&(this._scrollRaf=requestAnimationFrame((()=>{this._handleMeasure({forceRecalcPosition:!0}),this._scrollRaf=null}))))},this.state={}}componentDidMount(){this._handleMeasure({callback:this.props.onOpen});const{customCloseDelegate:e=u.globalCloseDelegate,customRemeasureDelegate:t}=this.props;e.subscribe(this,this._handleGlobalClose),t?.subscribe(null,this._handleCustomRemeasureDelegate),window.addEventListener("resize",this._resize);const n=null!==this.context;this._hotkeys||n||(this._hotkeys=p.createGroup({desc:"Popup menu"}),this._hotkeys.add({desc:"Close",hotkey:27,handler:()=>{this.props.onKeyboardClose&&this.props.onKeyboardClose(),this._handleGlobalClose()}})),this.props.repositionOnScroll&&window.addEventListener("scroll",this._handleScrollOutside,{capture:!0})}componentDidUpdate(){this._handleMeasure()}componentWillUnmount(){const{customCloseDelegate:e=u.globalCloseDelegate,customRemeasureDelegate:t}=this.props;e.unsubscribe(this,this._handleGlobalClose),t?.unsubscribe(null,this._handleCustomRemeasureDelegate),window.removeEventListener("resize",this._resize),window.removeEventListener("scroll",this._handleScrollOutside,{capture:!0}),this._hotkeys&&(this._hotkeys.destroy(),this._hotkeys=null),null!==this._raf&&(cancelAnimationFrame(this._raf),
this._raf=null),null!==this._scrollRaf&&(cancelAnimationFrame(this._scrollRaf),this._scrollRaf=null),this._scrollTimeout&&clearTimeout(this._scrollTimeout)}render(){const{id:e,role:t,"aria-label":n,"aria-labelledby":s,"aria-activedescendant":a,"aria-hidden":i,"aria-describedby":u,"aria-invalid":d,children:p,minWidth:v,theme:f=g,className:b,maxHeight:C,onMouseOver:x,onMouseOut:_,onKeyDown:w,onFocus:E,onBlur:S}=this.props,{appearingMenuHeight:T,appearingMenuWidth:N,appearingPosition:I,isMeasureValid:k}=this.state,P={"--ui-kit-menu-max-width":`${I&&I.x}px`,maxWidth:"calc(100vw - var(--ui-kit-menu-max-width) - 6px)"};return o.createElement(m.MenuContext.Provider,{value:this},o.createElement(h.SubmenuHandler,null,o.createElement(c.SlotContext.Provider,{value:this._manager},o.createElement("div",{id:e,role:t,"aria-label":n,"aria-labelledby":s,"aria-activedescendant":a,"aria-hidden":i,"aria-describedby":u,"aria-invalid":d,className:r()(b,f.menuWrap,!k&&f.isMeasuring),style:{height:T,left:I&&I.x,minWidth:v,position:"fixed",top:I&&I.y,width:N,...this.props.limitMaxWidth&&P},"data-name":this.props["data-name"],"data-tooltip-show-on-focus":this.props["data-tooltip-show-on-focus"],ref:this._handleContainerRef,onScrollCapture:this.props.onScroll,onContextMenu:l.preventDefaultForContextMenu,tabIndex:this.props.tabIndex,onMouseOver:x,onMouseOut:_,onKeyDown:w,onFocus:E,onBlur:S},o.createElement("div",{className:r()(f.scrollWrap,!this.props.noMomentumBasedScroll&&f.momentumBased),style:{overflowY:void 0!==T?"scroll":"auto",maxHeight:C},onScrollCapture:this._handleScroll,ref:this._handleScrollWrapRef},o.createElement(y,{className:f.menuBox},p)))),o.createElement(c.Slot,{reference:this._handleSlot})))}update(e){e?this._resizeForced():this._resize()}focus(e){this._containerRef?.focus(e)}blur(){this._containerRef?.blur()}}function y(e){const t=(0,a.ensureNotNull)((0,o.useContext)(h.SubmenuContext)),n=o.useRef(null);return o.createElement("div",{ref:n,className:e.className,onMouseOver:function(e){if(!(null!==t.current&&e.target instanceof Node&&(o=e.target,n.current?.contains(o))))return;var o;t.isSubmenuNode(e.target)||t.setCurrent(null)},"data-name":"menu-inner"},e.children)}b.contextType=h.SubmenuContext},29197:(e,t,n)=>{"use strict";n.d(t,{CloseDelegateContext:()=>r});var o=n(50959),s=n(59064);const r=o.createContext(s.globalCloseDelegate)},42842:(e,t,n)=>{"use strict";n.d(t,{Portal:()=>c,PortalContext:()=>u});var o=n(50959),s=n(32227),r=n(55698),a=n(67961),i=n(34811),l=n(99663);class c extends o.PureComponent{constructor(){super(...arguments),this._uuid=(0,r.nanoid)()}componentWillUnmount(){this._manager().removeWindow(this._uuid)}render(){const e=this._manager().ensureWindow(this._uuid,this.props.layerOptions);e.style.top=this.props.top||"",e.style.bottom=this.props.bottom||"",e.style.left=this.props.left||"",e.style.right=this.props.right||"",e.style.pointerEvents=this.props.pointerEvents||"";const t=this.props.className;return t&&("string"==typeof t?e.classList.add(t):e.classList.add(...t)),
this.props.shouldTrapFocus&&!e.hasAttribute(i.FOCUS_TRAP_DATA_ATTRIBUTE)&&e.setAttribute(i.FOCUS_TRAP_DATA_ATTRIBUTE,"true"),this.props["aria-hidden"]&&e.setAttribute("aria-hidden","true"),s.createPortal(o.createElement(u.Provider,{value:this},this.props.children),e)}moveToTop(){this._manager().moveToTop(this._uuid)}_manager(){return null===this.context?(0,a.getRootOverlapManager)():this.context}}c.contextType=l.SlotContext;const u=o.createContext(null)},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>o.Slot,SlotContext:()=>o.SlotContext});var o=n(99663)},27246:e=>{e.exports={titleWrap:"titleWrap-Izz3hpJc",groupFooter:"groupFooter-Izz3hpJc"}},92359:e=>{e.exports={wrapper:"wrapper-JXHzsa7P"}},48286:e=>{e.exports={inlineRow:"inlineRow-D8g11qqA"}},80779:e=>{e.exports={container:"container-QyF09i7Y",hasTooltip:"hasTooltip-QyF09i7Y",datePickerWrapper:"datePickerWrapper-QyF09i7Y",timePickerWrapper:"timePickerWrapper-QyF09i7Y"}},97650:e=>{e.exports={input:"input-ZOx_CVY3",symbol:"symbol-ZOx_CVY3",checkbox:"checkbox-ZOx_CVY3",label:"label-ZOx_CVY3",dropdownMenu:"dropdownMenu-ZOx_CVY3",sessionStart:"sessionStart-ZOx_CVY3",sessionEnd:"sessionEnd-ZOx_CVY3",sessionInputContainer:"sessionInputContainer-ZOx_CVY3",sessionDash:"sessionDash-ZOx_CVY3",inputGroup:"inputGroup-ZOx_CVY3",textarea:"textarea-ZOx_CVY3",inlineGroup:"inlineGroup-ZOx_CVY3",hasTooltip:"hasTooltip-ZOx_CVY3"}},85027:e=>{e.exports={content:"content-tBgV1m0B",cell:"cell-tBgV1m0B",inner:"inner-tBgV1m0B",first:"first-tBgV1m0B",inlineCell:"inlineCell-tBgV1m0B",fill:"fill-tBgV1m0B",top:"top-tBgV1m0B",topCenter:"topCenter-tBgV1m0B",offset:"offset-tBgV1m0B",inlineRow:"inlineRow-tBgV1m0B",grouped:"grouped-tBgV1m0B",separator:"separator-tBgV1m0B",groupSeparator:"groupSeparator-tBgV1m0B",big:"big-tBgV1m0B",adaptive:"adaptive-tBgV1m0B",checkableTitle:"checkableTitle-tBgV1m0B"}},30584:e=>{e.exports={wrap:"wrap-QutFvTLS",labelWrap:"labelWrap-QutFvTLS",label:"label-QutFvTLS",hasTooltip:"hasTooltip-QutFvTLS"}},60090:(e,t,n)=>{"use strict";n.d(t,{bind:()=>a,setter:()=>i});var o=n(50959),s=n(27032),r=n(27365);function a(e){var t;return t=class extends o.PureComponent{constructor(){super(...arguments),this._onChange=(e,t,n)=>{const{setValue:o}=this.context,{onChange:s}=this.props;i(o,s)(e,t,n)}}render(){const{input:t}=this.props,{values:n,model:s}=this.context;return o.createElement(e,{...this.props,value:n[t.id],tzName:(0,r.getTimezoneName)(s),onChange:this._onChange})}},t.contextType=s.PropertyContext,t}function i(e,t){return(n,o,s)=>{e(o,n,s),t&&t(n,o,s)}}},27032:(e,t,n)=>{"use strict";n.d(t,{PropertyContainer:()=>m,PropertyContext:()=>h});var o=n(50959),s=n(50151),r=n(9343),a=n(11542),i=n(45126),l=n(79036),c=n(85719),u=n(56530);const d=(0,r.getLogger)("Platform.GUI.StudyInputPropertyContainer"),p=new i.TranslatedString("change {propertyName} property",a.t(null,void 0,n(25167))),h=o.createContext(null);class m extends o.PureComponent{constructor(e){super(e),this._setValue=(e,t,n)=>{const{property:o,model:r,study:a}=this.props,h=!(0,l.isStudy)(a),m=(0,s.ensureDefined)(o.child(e))
;d.logNormal(`Changing property "${e}" value from "${o.value()}" to "${t}"`);const g=new i.TranslatedString(n,(0,u.getTranslatedInputTitle)(n));r.setProperty(m,t,p.format({propertyName:g}),h&&c.lineToolsDoNotAffectChartInvalidation)};const{property:t}=e,n={};t.childNames().forEach((e=>{const o=(0,s.ensureDefined)(t.child(e));n.hasOwnProperty(e)||(n[e]=o.value())})),this.state=n}componentDidMount(){const{property:e,onStudyInputChange:t}=this.props;e.childNames().forEach((n=>{(0,s.ensureDefined)(e.child(n)).subscribe(this,(e=>{const o=e.value();d.logNormal(`Property "${n}" updated to value "${o}"`),this.setState({[n]:o}),t?.(o,n)}))}))}componentWillUnmount(){const{property:e}=this.props;e.childNames().forEach((t=>{(0,s.ensureDefined)(e.child(t)).unsubscribeAll(this)}))}render(){const{study:e,model:t,children:n}=this.props,s={study:e,model:t,values:this.state,setValue:this._setValue};return o.createElement(h.Provider,{value:s},n)}}},28117:(e,t,n)=>{"use strict";n.d(t,{ModelContext:()=>s,bindModel:()=>r});var o=n(50959);const s=o.createContext(null);function r(e,t){return o.createElement(s.Consumer,null,(n=>n?o.createElement(e,{...Object.assign({model:n},t)}):null))}},353:(e,t,n)=>{"use strict";n.d(t,{StylePropertyContainer:()=>a,StylePropertyContext:()=>r,bindPropertyContext:()=>i});var o=n(50959),s=n(28117);const r=o.createContext(null);class a extends o.PureComponent{constructor(){super(...arguments),this._setValue=(e,t,n)=>{const{model:o,affectSave:s}=this.props;Array.isArray(e)?o.setProperties(e,e.map((()=>t)),n,s):o.setProperty(e,t,n,!s)}}componentDidMount(){const{property:e}=this.props;e.subscribe(this,(()=>this.forceUpdate()))}componentWillUnmount(){const{property:e}=this.props;e.unsubscribeAll(this)}render(){const e={setValue:this._setValue};return o.createElement(r.Provider,{value:e},this.props.children)}}function i(e,t,n){return(0,s.bindModel)((({model:s})=>o.createElement(a,{model:s,affectSave:n,property:t.property},o.createElement(e,{...t}))),t)}},12750:(e,t,n)=>{"use strict";n.d(t,{IconGroupWrapper:()=>r});var o=n(50959),s=n(92359);function r(e){const{children:t}=e;return o.createElement("div",{className:s.wrapper},t)}},8394:(e,t,n)=>{"use strict";n.d(t,{InputTooltip:()=>P});var o,s=n(50959),r=n(97754),a=n.n(r),i=n(90186),l=n(9745),c=n(82353),u=n(27941),d=n(99084),p=n(30162),h=n(46105),m=n.n(h);!function(e){e.Small="small",e.Medium="medium",e.Large="large"}(o||(o={}));const g="small";var v,f;!function(e){e.Default="default",e.Danger="danger",e.Warning="warning",e.Success="success",e.Neutral="neutral",e.NeutralLight="neutral-light"}(v||(v={})),function(e){e.Info="info",e.Question="question",e.Check="check",e.Exclamation="exclamation"}(f||(f={}));const b={info:u,question:c,check:d,exclamation:p},y=s.forwardRef(((e,t)=>s.createElement("span",{...e,ref:t,className:a()(e.className,m()["no-active-state"])}))),C=s.forwardRef(((e,t)=>{const{icon:n="exclamation",intent:o="default",ariaLabel:r,tooltip:c,className:u,renderComponent:d=y,tabIndex:p=0,size:h=g,onFocus:v,onBlur:f,onClick:C,...x}=e,_=b[n]??n
;return s.createElement(d,{className:a()(u,m().iconWrapper,m()[o],m()[h]),title:c,"aria-label":r,ref:t,tabIndex:p,onFocus:v,onBlur:f,onClick:C,...(0,i.filterDataProps)(x)},s.createElement(l.Icon,{"aria-hidden":!0,icon:_,className:m().icon}))}));var x=n(75774);var _=n(39416);function w(e,t=null){const{showTooltip:n,hideTooltip:o,onClick:r,doNotShowTooltipOnTouch:a=!1}=e,i=(0,_.useFunctionalRefObject)(t),l=function(){const[e,t]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{t(x.mobiletouch)}),[]),e}(),c=l&&a?void 0:e.tooltip;(0,s.useEffect)((()=>{const e=()=>o&&o();return document.addEventListener("scroll",e,!0),()=>document.removeEventListener("scroll",e,!0)}),[i,o]);return{onBlur:(0,s.useCallback)((e=>{o&&o()}),[o]),onFocus:(0,s.useCallback)((e=>{!e.target.matches(":hover")&&n&&e.target.matches(":focus-visible")&&n(e.currentTarget,{tooltipDelay:200})}),[n]),onClick:(0,s.useCallback)((e=>{l&&i?.current?.focus(),r&&r(e)}),[r,i,l]),tooltip:c,className:void 0!==c?"apply-common-tooltip":void 0,ref:i}}var E=n(38780),S=n(41140),T=n.n(S);function N(){document.removeEventListener("scroll",N),document.removeEventListener("touchstart",N),document.removeEventListener("mouseout",N),(0,E.hide)()}const I=e=>{(0,E.showOnElement)(e.currentTarget,{tooltipDelay:0}),document.addEventListener("scroll",N),document.addEventListener("touchstart",N),document.addEventListener("mouseout",N)},k=(0,s.forwardRef)(((e,t)=>{const{className:n,onClick:o=I,doNotShowTooltipOnTouch:a,size:i,...l}=e,{tooltip:c,className:u,...d}=w({tooltip:e.tooltip,doNotShowTooltipOnTouch:!1,showTooltip:E.showOnElement,hideTooltip:E.hide,onClick:o},t);return s.createElement(C,{className:r(n,T()["icon-wrapper"],c&&T()["with-tooltip"],u),tooltip:c,size:i,...l,...d})}));(0,s.forwardRef)(((e,t)=>{const{className:n,href:o,rel:a,target:i,...l}=e,c=(0,s.useMemo)((()=>(0,s.forwardRef)(((e,t)=>s.createElement("a",{href:o,rel:a,target:i,ref:t,...e})))),[o,a,i]);return s.createElement(k,{...l,className:r(n,T()["with-link"]),renderComponent:c,ref:t,doNotShowTooltipOnTouch:!0})})),(0,s.forwardRef)(((e,t)=>{const{className:n,withActiveState:o,...a}=e,i=(0,s.useMemo)((()=>(0,s.forwardRef)(((e,t)=>s.createElement("button",{...e,ref:t,type:"button"})))),[]);return s.createElement(k,{...a,className:r(n,!o&&T()["no-active-state"]),renderComponent:i,ref:t})}));function P(e){const{className:t,title:n}=e;return s.createElement(k,{icon:"info",className:t,ariaLabel:n,tooltip:n,tabIndex:-1})}},78839:(e,t,n)=>{"use strict";n.d(t,{getInputGroups:()=>i,isGroup:()=>r,isInputInlines:()=>a});var o,s=n(50151);function r(e){return e.hasOwnProperty("groupType")}function a(e){return r(e)&&"inline"===e.groupType}function i(e){const t=[],n=new Map,o=new Map;return o.set(void 0,new Map),e.forEach((e=>{const{group:r,inline:a}=e;if(void 0!==r||void 0!==a)if(void 0!==r)if(void 0!==a)if(n.has(r)){const t=(0,s.ensureDefined)(n.get(r));let i;o.has(t)?i=(0,s.ensureDefined)(o.get(t)):(i=new Map,o.set(t,i)),l(e,"inline",a,i,t.children)}else{const s={id:a,groupType:"inline",children:[e]},i={id:r,groupType:"group",
children:[s]},l=new Map;l.set(a,s),o.set(i,l),n.set(r,i),t.push(i)}else l(e,"group",r,n,t);else{const n=(0,s.ensureDefined)(o.get(void 0));l(e,"inline",(0,s.ensureDefined)(a),n,t)}else t.push(e)})),t}function l(e,t,n,o,r){if(o.has(n))(0,s.ensureDefined)(o.get(n)).children.push(e);else{const s={id:n,groupType:t,children:[e]};o.set(n,s),r.push(s)}}!function(e){e.Inline="inline",e.Group="group"}(o||(o={}))},24980:(e,t,n)=>{"use strict";n.d(t,{InputRow:()=>re});var o=n(50959),s=n(50151),r=n(65383),a=n(55297),i=n(91699),l=n(30582),c=n(97754),u=n.n(c),d=n(31261),p=n(60090),h=n(22221),m=n(97650);class g extends o.PureComponent{constructor(){super(...arguments),this._onChange=e=>{const{input:{id:t,name:n},onChange:o}=this.props;o(e.currentTarget.value,t,n)}}render(){const{input:{defval:e},value:t,disabled:n,onBlur:s,onKeyDown:r,hasTooltip:a}=this.props;return o.createElement(d.InputControl,{className:u()(m.input,a&&m.hasTooltip),value:void 0===t?e:t,onChange:this._onChange,onBlur:s,onKeyDown:r,disabled:n,maxLength:4096})}}const v=(0,h.debounced)(g),f=(0,p.bind)(v);var b=n(16604),y=n(71891);function C(e){const{className:t}=e,n=(0,o.useContext)(y.PropertyTable.InlineRowContext);return o.createElement("div",{className:c(m.inputGroup,n&&m.inlineGroup,t)},e.children)}var x=n(36565);function _(e=""){const[,t="",n="",o="",s=""]=Array.from(e.match(/^(\d\d)(\d\d)-(\d\d)(\d\d)/)||[]);return[`${t}:${n}`,`${o}:${s}`]}class w extends o.PureComponent{constructor(e){super(e),this._onStartPick=e=>{this.setState({startTime:e},this._onChange)},this._onEndPick=e=>{this.setState({endTime:e},this._onChange)},this._onChange=()=>{const{input:{id:e,name:t},onChange:n}=this.props,{startTime:o,endTime:s}=this.state;n(o.replace(":","")+"-"+s.replace(":",""),e,t)};const t=e.value||e.input.defval,[n,o]=_(t);this.state={prevValue:t,startTime:n,endTime:o}}render(){const{startTime:e,endTime:t}=this.state,{hasTooltip:n,disabled:r}=this.props;return o.createElement(C,{className:u()(n&&m.hasTooltip)},o.createElement("div",{className:m.sessionStart},o.createElement(x.TimeInput,{className:u()(m.input,m.sessionInputContainer),name:"start",value:(0,s.ensureDefined)(e),onChange:this._onStartPick,disabled:r}),o.createElement("span",{className:m.sessionDash}," — ")),o.createElement("div",{className:m.sessionEnd},o.createElement(x.TimeInput,{className:u()(m.input,m.sessionInputContainer),name:"end",value:(0,s.ensureDefined)(t),onChange:this._onEndPick,disabled:r})))}static getDerivedStateFromProps(e,t){if(e.value===t.prevValue)return t;const[n,o]=_(e.value);return{prevValue:e.value,startTime:n,endTime:o}}}const E=(0,p.bind)(w);var S=n(11542),T=n(56570),N=n(68159),I=n(19466),k=n(27032),P=n(90405),D=n(56530);class B extends o.PureComponent{constructor(){super(...arguments),this._onChange=e=>{const{input:{id:t,name:n},onChange:o}=this.props;o(e,t,n)}}render(){const{input:{id:e,defval:t,options:n,optionsTitles:s},value:r,disabled:a,hasTooltip:i}=this.props,l=n.map((e=>{const t=s&&s[e]?s[e]:e;return{value:e,content:(0,D.getTranslatedInputTitle)(t)}
})),c=void 0!==r&&n.includes(r)?r:t;return o.createElement(P.Select,{id:e,className:u()(m.input,i&&m.hasTooltip),menuClassName:m.dropdownMenu,value:c,items:l,onChange:this._onChange,disabled:a})}}const M=(0,p.bind)(B);var O=n(73146),R=n(79036);const V={open:S.t(null,void 0,n(83584)),high:S.t(null,void 0,n(59319)),low:S.t(null,void 0,n(41902)),close:S.t(null,void 0,n(5741)),hl2:S.t(null,void 0,n(96008)),hlc3:S.t(null,void 0,n(91189)),ohlc4:S.t(null,void 0,n(52793)),hlcc4:S.t(null,void 0,n(49242))};class L extends o.PureComponent{render(){const{input:e}=this.props,{study:t,model:n}=this.context;let a={...V};delete a.hlcc4;const i=(0,O.createAdapter)(t);if(t&&this._isStudy(t)&&t.isChildStudy()){const t=(0,r.getInputValue)(i.inputs()[e.id]),n=i.parentSourceForInput(t);if(n&&(0,R.isStudy)(n)){const t=n.title(I.TitleDisplayTarget.StatusLine),o=N.StudyMetaInfo.getChildSourceInputTitles(e,n.metaInfo(),t);a={...a,...o}}}if(T.enabled("study_on_study")&&t&&this._isStudy(t)&&(t.isChildStudy()||N.StudyMetaInfo.canBeChild(t.metaInfo()))){const e=[t,...i.getAllChildren()];n.model().allStudies().filter((t=>t.canHaveChildren()&&!e.includes(t))).forEach((e=>{const t=e.title(I.TitleDisplayTarget.StatusLine,!0,void 0,!0),n=e.id(),o=e.metaInfo(),r=o.styles,i=o.plots||[];if(1===i.length)a[n+"$0"]=t;else if(i.length>1){const e=i.reduce(((e,o,a)=>{if(!N.StudyMetaInfo.canPlotBeSourceOfChildStudy(o.type))return e;let i;try{i=(0,s.ensureDefined)((0,s.ensureDefined)(r)[o.id]).title}catch(e){i=o.id}return{...e,[`${n}$${a}`]:`${t}: ${i}`}}),{});a={...a,...e}}}))}const l={...e,type:"text",options:Object.keys(a),optionsTitles:a};return o.createElement(M,{...this.props,input:l})}_isStudy(e){return!e.hasOwnProperty("isInputsStudy")}}L.contextType=k.PropertyContext;var F=n(85049),W=n(10074),A=n(1819);const H=void 0,q=["1","3","5","15","30","45","60","120","180","240","1D","1W","1M","3M","6M","12M"],z=["1S","5S","10S","15S","30S"],U=["1T","10T","100T","1000T"];class Z extends o.PureComponent{constructor(){super(...arguments),this._onChange=e=>{const{input:{id:t,name:n},onChange:o}=this.props;o(e,t,n)}}render(){const{input:e,value:t,disabled:s,hasTooltip:r}=this.props,a=F.Interval.parse(void 0===t?e.defval:t),i=a.isValid()?a.value():t,l=H?H.get().filter((e=>!F.Interval.parse(e).isRange())):[],c=(0,W.mergeResolutions)(q,(0,W.isSecondsEnabled)()?z:[],(0,A.isTicksEnabled)()?U:[],l);return c.unshift(""),o.createElement(P.Select,{id:e.id,className:u()(m.input,m.resolution,r&&m.hasTooltip),menuClassName:u()(m.dropdownMenu,m.resolution),items:(d=c,d.map((e=>({value:e,content:""===e?S.t(null,void 0,n(54613)):(0,W.getTranslatedResolutionModel)(e).hint})))),value:i,onChange:this._onChange,disabled:s});var d}}const G=(0,p.bind)(Z);var K=n(87125),Y=n(353);class $ extends o.PureComponent{render(){return o.createElement(k.PropertyContext.Consumer,null,(e=>e?this._getColorInputWithContext(e):null))}_getColorInputWithContext(e){const{input:{id:t},disabled:n,hasTooltip:s}=this.props,{model:r,study:a}=e;if("properties"in a||"tempProperties"in a){
const e="properties"in a?a.properties().inputs[t]:a.tempProperties?.inputs.child(t);return o.createElement(Y.StylePropertyContainer,{model:r,affectSave:!0,property:e},o.createElement(K.BasicColorSelect,{className:u()(s&&m.hasTooltip),color:e,disabled:n}))}return null}}var j=n(85528),J=n(76056),Q=n(23935),X=n(27365),ee=n(80779);const te=(0,p.bind)((function(e){const{value:t,onChange:n,input:s,tzName:r,hasTooltip:a}=e,{id:i,name:l,defval:c}=s,d=(0,o.useMemo)((()=>Number(t??c)),[t,c]),p=(0,o.useMemo)((()=>(0,X.getChartTimezoneOffsetMs)(d,r)),[d,r]),h=(0,o.useMemo)((()=>{const e=new Date(d+p+g(d));return e.setSeconds(0),e}),[d,p]),m=(0,o.useMemo)((()=>(0,Q.twoDigitsFormat)(h.getHours())+":"+(0,Q.twoDigitsFormat)(h.getMinutes())),[h]);return o.createElement("div",{className:u()(ee.container,a&&ee.hasTooltip)},o.createElement("div",{className:ee.datePickerWrapper},o.createElement(j.DatePicker,{InputComponent:J.DateInput,initial:h,onPick:function(e){if(null===e)return;const t=new Date(h);t.setFullYear(e.getFullYear()),t.setMonth(e.getMonth()),t.setDate(e.getDate()),n(v(t),i,l)},revertInvalidData:!0})),o.createElement("div",{className:ee.timePickerWrapper},o.createElement(x.TimeInput,{value:m,onChange:function(e){const[t,o]=e.split(":"),s=new Date(h);s.setHours(Number(t)),s.setMinutes(Number(o)),n(v(s),i,l)}})));function g(e){return 60*new Date(e).getTimezoneOffset()*1e3}function v(e){return e.valueOf()-p-g(d)}}));class ne extends o.PureComponent{render(){const{input:e,disabled:t,onChange:n,tzName:s,hasTooltip:c}=this.props;if((0,r.isStudyInputOptionsInfo)(e))return o.createElement(M,{input:e,disabled:t,onChange:n,hasTooltip:c});switch(e.type){case"integer":return o.createElement(a.IntegerInput,{input:e,disabled:t,onChange:n,hasTooltip:c});case"float":case"price":return o.createElement(i.FloatInput,{input:e,disabled:t,onChange:n,hasTooltip:c});case"bool":return o.createElement(l.BoolInput,{input:e,disabled:t,onChange:n,hasTooltip:c});case"text":return o.createElement(f,{input:e,disabled:t,onChange:n,hasTooltip:c});case"symbol":return o.createElement(b.SymbolInput,{input:e,disabled:t,onChange:n,hasTooltip:c});case"session":return o.createElement(E,{input:e,disabled:t,onChange:n,hasTooltip:c});case"source":return o.createElement(L,{input:e,disabled:t,onChange:n,hasTooltip:c});case"resolution":return o.createElement(G,{input:e,disabled:t,onChange:n,hasTooltip:c});case"time":return o.createElement(te,{input:e,tzName:s,onChange:n,hasTooltip:c});case"color":return o.createElement($,{input:e,disabled:t,onChange:n,hasTooltip:c});default:return null}}}var oe=n(8394),se=n(12750);class re extends o.PureComponent{render(){const{label:e,children:t,input:n,disabled:r,onChange:a,labelAlign:i,grouped:l,tooltip:c,solutionId:u,offset:d}=this.props,p=Boolean(c);return o.createElement(y.PropertyTable.Row,null,o.createElement(y.PropertyTable.Cell,{"data-study-input-name":n?.id&&`${n.id}-label`,placement:"first",verticalAlign:i,grouped:l,offset:d},void 0!==e?e:(0,D.getTranslatedInputTitle)((0,
s.ensureDefined)(n).name)),o.createElement(y.PropertyTable.Cell,{"data-study-input-name":n?.id&&`${n.id}-input`,placement:"last",grouped:l},t||o.createElement(ne,{input:(0,s.ensureDefined)(n),onChange:a,disabled:r,hasTooltip:p}),p&&o.createElement(se.IconGroupWrapper,null,c&&o.createElement(oe.InputTooltip,{title:c}),!1)))}}},33900:(e,t,n)=>{"use strict";n.d(t,{InputsTabContent:()=>q});var o=n(50959),s=n(50151),r=n(11542),a=n(27032),i=n(71891),l=n(56530),c=n(59416),u=n(97754),d=n.n(u),p=n(93139);function h(e){const{disabled:t,checked:n}=e;return o.createElement("span",{className:d()(p.radioButtonView,t&&p.disabled,n&&p.checked)})}var m=n(33560),g=n.n(m);const v=(0,c.makeSwitchGroupItem)((e=>{const{disabled:t,checked:n,label:s,value:r="on",name:a,onChange:i,className:l,id:c,title:d,labelPositionReverse:p,reference:m,ariaDescribedby:v,"data-name":f}=e,b=u(l,g().radio,p&&g().reverse),y=u(g().label,t&&g().disabled);return o.createElement("label",{className:b},o.createElement("span",{className:u(g().wrapper,t&&g().disabled),title:d},o.createElement("input",{type:"radio",id:c,className:g().input,name:a,checked:n,disabled:t,value:r,onChange:()=>i?.(r),ref:m,"aria-describedby":v,"data-name":f}),o.createElement("span",{className:u(g().box,n&&g().checked)},o.createElement(h,{checked:n,disabled:t}))),s&&o.createElement("span",{className:y},s))}));var f=n(16604),b=n(60090),y=n(8394),C=n(12750),x=n(97650);function _(e){const{children:t,input:l,disabled:u,onChange:d,grouped:p,tooltip:h,solutionId:m}=e,g=(0,o.useContext)(a.PropertyContext),{values:_,setValue:w}=(0,s.ensureNotNull)(g),E=_[l.id],[S,T]=(0,o.useState)(E?"another-symbol":"main-symbol"),[N,I]=(0,o.useState)(E),k=Boolean(h);return(0,o.useEffect)((()=>{E&&I(E)}),[E]),o.createElement(c.SwitchGroup,{name:`symbol-source-${l.id}`,values:[S],onChange:function(e){T(e),"main-symbol"===e?(0,b.setter)(w)("",l.id,l.name):"another-symbol"===e&&N&&(0,b.setter)(w,d)(N,l.id,l.name)}},o.createElement(i.PropertyTable.Row,null,o.createElement(i.PropertyTable.Cell,{colSpan:2,placement:"first",grouped:p,"data-study-input-name":l?.id&&`${l.id}-main-symbol`},o.createElement(v,{value:"main-symbol",className:x.checkbox,disabled:u,label:o.createElement("span",{className:x.label},r.t(null,{context:"input"},n(94849)))}))),o.createElement(i.PropertyTable.Row,null,o.createElement(i.PropertyTable.Cell,{placement:"first",grouped:p,"data-study-input-name":l?.id&&`${l.id}-another-symbol-label`},o.createElement(v,{value:"another-symbol",className:x.checkbox,disabled:u,label:o.createElement("span",{className:x.label},r.t(null,{context:"input"},n(24716)))})),o.createElement(i.PropertyTable.Cell,{placement:"last",grouped:p,"data-study-input-name":l?.id&&`${l.id}-another-symbol-input`},t||o.createElement(f.SymbolInput,{input:(0,s.ensureDefined)(l),onChange:d,disabled:u||"main-symbol"===S,hasTooltip:k}),k&&o.createElement(C.IconGroupWrapper,null,h&&o.createElement(y.InputTooltip,{title:h}),!1))))}var w=n(30582);class E extends o.PureComponent{render(){
const{label:e,input:t,tooltip:n,solutionId:s}=this.props,r=Boolean(n);return o.createElement(i.PropertyTable.Row,null,o.createElement(i.PropertyTable.Cell,{placement:"first",colSpan:2,"data-study-input-name":t?.id&&`${t.id}-checkbox`},o.createElement(w.BoolInput,{label:e,input:t,hasTooltip:r}),r&&o.createElement(C.IconGroupWrapper,null,n&&o.createElement(y.InputTooltip,{title:n}),!1)))}}var S=n(24980),T=n(2568),N=n(67029),I=n(22221);class k extends o.PureComponent{constructor(){super(...arguments),this._onChange=e=>{const{input:{id:t,name:n},onChange:o}=this.props;o(e.currentTarget.value,t,n)}}render(){const{input:{defval:e},value:t,disabled:n,onBlur:s,onKeyDown:r}=this.props;return o.createElement(T.Textarea,{className:d()(x.input,x.textarea,N.InputClasses.FontSizeMedium),value:void 0===t?e:t,onChange:this._onChange,onBlur:s,onKeyDown:r,disabled:n,maxLength:4096})}}const P=(0,I.debounced)(k),D=(0,b.bind)(P);var B=n(30584);function M(e){const{input:t,label:n,tooltip:s,solutionId:r}=e,a=Boolean(s);return o.createElement(i.PropertyTable.Row,null,o.createElement(i.PropertyTable.Cell,{placement:"first",colSpan:2,className:B.wrap,"data-study-input-name":t?.id&&`${t.id}-textarea`},o.createElement("div",{className:B.labelWrap},o.createElement("span",{className:d()(B.label,a&&B.hasTooltip)},n),a&&o.createElement(C.IconGroupWrapper,null,s&&o.createElement(y.InputTooltip,{title:s}),!1)),o.createElement(D,{input:t})))}function O(e){const{input:t,tooltip:n,solutionId:s}=e;return"symbol"===t.type&&t.optional?o.createElement(_,{input:t,tooltip:n,solutionId:s}):"bool"===t.type?o.createElement(E,{label:(0,l.getTranslatedInputTitle)(t.name),input:t,tooltip:n,solutionId:s}):"text_area"===t.type?o.createElement(M,{label:(0,l.getTranslatedInputTitle)(t.name),input:t,tooltip:n,solutionId:s}):o.createElement(S.InputRow,{labelAlign:function(e){switch(e){case"session":return"adaptive";case"time":return"topCenter";default:return}}(t.type),input:t,tooltip:n,solutionId:s})}var R=n(86067),V=n(48286);function L(e){const{content:t}=e;let n;return o.createElement(i.PropertyTable.InlineRowContext.Provider,{value:!0},o.createElement("div",{className:V.inlineRow},t.children.map(((e,s)=>(void 0!==e.tooltip&&(n=e.tooltip),o.createElement(O,{key:e.id,input:e,tooltip:s===t.children.length-1?n:void 0}))))))}var F=n(78839),W=n(27246);function A(e){const{content:t}=e;return(0,F.isGroup)(t)?(0,F.isInputInlines)(t)?o.createElement(L,{content:t}):o.createElement(o.Fragment,null,o.createElement("div",{className:W.titleWrap},o.createElement(R.GroupTitleSection,{title:(0,l.getTranslatedInputTitle)(t.id),name:t.id})),t.children.map((e=>(0,F.isGroup)(e)?o.createElement(L,{key:e.id,content:e}):o.createElement(O,{key:e.id,input:e,tooltip:e.tooltip,solutionId:e.solutionId}))),o.createElement("div",{className:W.groupFooter})):o.createElement(O,{input:t,tooltip:t.tooltip,solutionId:t.solutionId})}const H={offset:r.t(null,void 0,n(55450))};class q extends o.PureComponent{render(){
const{reference:e,inputs:t,property:n,study:r,studyMetaInfo:a,model:l,onStudyInputChange:c,className:u}=this.props,{offset:d,offsets:p}=n;return o.createElement(i.PropertyTable,{reference:e,className:u},o.createElement(U,{study:r,model:l,property:n.inputs,inputs:t,onStudyInputChange:c}),d&&this._createOffsetSection(d,(0,s.ensureDefined)(a.offset)),p&&p.childNames().map((e=>{const t=p.childs()[e];return this._createOffsetSection(t,(0,s.ensureDefined)(a.offsets?.[e]))})))}_createOffsetSection(e,t){const n=e.childs();return o.createElement(U,{key:`offset_${t.title}`,study:this.props.study,model:this.props.model,inputs:[G(n,t)],property:e})}}const z=e=>!1;function U(e){const{study:t,model:n,inputs:s,property:r,onStudyInputChange:i}=e,l=z(t)?s.filter(Z):s,c=(0,o.useMemo)((()=>(0,F.getInputGroups)(l)),[l]);return o.createElement(a.PropertyContainer,{property:r,study:t,model:n,onStudyInputChange:i},!1,!1,c.map((e=>o.createElement(o.Fragment,{key:e.id},o.createElement(A,{content:e}),!1))))}function Z(e){return!defaultCustomSessionIds.has(e.id)&&!vbpAnchorPeriodInputsIds.has(e.id)&&!tpoCustomRowSizeIds.has(e.id)}function G(e,t){return{id:"val",name:t.title||H.offset,defval:e.val.value(),type:"integer",min:t.min,max:t.max}}},30582:(e,t,n)=>{"use strict";n.d(t,{BoolInput:()=>u,BoolInputComponent:()=>c});var o=n(50959),s=n(15294),r=n(97754),a=n.n(r),i=n(60090),l=n(97650);class c extends o.PureComponent{constructor(){super(...arguments),this._onChange=()=>{const{input:{id:e,name:t},value:n,onChange:o}=this.props;o(!n,e,t)}}render(){const{input:{defval:e},value:t,disabled:n,label:r,hasTooltip:i}=this.props,c=void 0===t?e:t;return o.createElement(s.Checkbox,{className:a()(l.checkbox,i&&l.hasTooltip),disabled:n,checked:c,onChange:this._onChange,label:o.createElement("span",{className:l.label},r),labelAlignBaseline:!0})}}const u=(0,i.bind)(c)},22221:(e,t,n)=>{"use strict";n.d(t,{debounced:()=>r});var o=n(50959);const s={blur:0,commit:0,change:1/0};function r(e,t=s){return class extends o.PureComponent{constructor(e){super(e),this._onChange=(e,n,o)=>{const s=t.change;s?(clearTimeout(this._timeout),this.setState({value:e},(()=>{s!==1/0&&(this._timeout=setTimeout((()=>this._flush()),s))}))):this._flush(e)},this._onBlur=()=>{this._debounce(t.blur);const{onBlur:e}=this.props;e&&e()},this._onKeyDown=e=>{13===e.keyCode&&this._debounce(t.commit)},this.state={prevValue:e.value,value:e.value}}componentWillUnmount(){this._flush()}render(){const{value:t}=this.state;return o.createElement(e,{...this.props,value:t,onChange:this._onChange,onBlur:this._onBlur,onKeyDown:this._onKeyDown})}static getDerivedStateFromProps(e,t){return e.value===t.prevValue?t:{prevValue:e.value,value:e.value}}_debounce(e){e?(clearTimeout(this._timeout),e!==1/0&&(this._timeout=setTimeout((()=>this._flush()),e))):this.setState((e=>{this._flush(e.value)}))}_flush(e){const{input:{id:t,name:n},onChange:o}=this.props,{prevValue:s,value:r}=this.state;clearTimeout(this._timeout);const a=void 0!==e?e:r;void 0!==a&&a!==s&&o(a,t,n)}}}},91699:(e,t,n)=>{"use strict";n.d(t,{
FloatInput:()=>p,FloatInputComponent:()=>d});var o=n(50959),s=n(97754),r=n.n(s),a=n(90035),i=n(60090),l=n(22221),c=n(97650);class u extends o.PureComponent{render(){const{hasTooltip:e}=this.props;return o.createElement(a.NumericInput,{...this.props,className:r()(c.input,e&&c.hasTooltip),stretch:!1})}}const d=(0,l.debounced)(u,{change:1/0,commit:0,blur:0}),p=(0,i.bind)(d)},55297:(e,t,n)=>{"use strict";n.d(t,{IntegerInput:()=>p,IntegerInputComponent:()=>d});var o=n(50959),s=n(97754),r=n.n(s),a=n(60090),i=n(22221),l=n(90035),c=n(97650);class u extends o.PureComponent{render(){const{hasTooltip:e}=this.props;return o.createElement(l.NumericInput,{...this.props,mode:"integer",className:r()(c.input,e&&c.hasTooltip),stretch:!1})}}const d=(0,i.debounced)(u,{change:1/0,commit:0,blur:0}),p=(0,a.bind)(d)},90035:(e,t,n)=>{"use strict";n.d(t,{NumericInput:()=>w});var o=n(50959),s=n(50151),r=n(11542),a=n(60521),i=n(49483),l=n(92399),c=n(59623),u=n(9859),d=n(63273);const p=9e15;function h(e){const{value:t,min:o=-1/0,max:s=p,boundariesErrorMessages:a}=e,i=function(e,t,n){const o=e>=t,s=e<=n;return{passMin:o,passMax:s,pass:o&&s,clamped:(0,u.clamp)(e,t,n)}}(t,o,s);let l;return i.passMax||(l=a?.greaterThanMax??r.t(null,{replace:{max:String(s)}},n(31331))),i.passMin||(l=a?.lessThanMin??r.t(null,{replace:{min:String(o)}},n(24216))),{isPassed:i.pass,msg:l,clampedValue:i.clamped}}var m,g;!function(e){e.Integer="integer",e.Float="float",e.Fractional="fractional"}(m||(m={})),function(e){e.Input="input",e.Step="step"}(g||(g={}));const v=new c.NumericFormatter({ignoreLocaleNumberFormat:!0}),f=/^[-]?[0-9]*$/,b=/^([-]?([0-9]+\.?[0-9]*)|([-]?[0-9]*))$/,y=/^([-]?([0-9]+'?[0-9]*([0-9]+'?)[0-9]*)|([-]?[0-9]*))$/;class C extends o.PureComponent{constructor(e){super(e),this._onFocus=e=>{this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus(e)},this._onBlur=e=>{this.setState({focused:!1}),!1!==this.props.shouldApplyValueOnBlur&&(this.setState({displayValue:x(this.props,this.props.value)}),this.props.errorHandler&&this.props.errorHandler(!1)),this.props.onBlur&&this.props.onBlur(e)},this._onValueChange=e=>{const t=e.target.value,n=(0,d.stripLTRMarks)(t);if(void 0!==this.props.onEmptyString&&""===t&&this.props.onEmptyString(),"fractional"===this.props.mode&&!y.test(n))return;if("float"===this.props.mode&&!b.test(n))return;if("integer"===this.props.mode&&!f.test(n))return;const o=_(t,this.props.formatter),s=o.res?this._checkValueBoundaries(o.value):{isPassed:!1,msg:void 0},r=o.res&&!s.isPassed,a=o.res&&o.suggest&&!this.state.focused?o.suggest:t,i=r&&s.msg?s.msg:this._errMsg;this.setState({displayValue:a,errorMsg:i}),o.res&&s.isPassed&&this.props.onValueChange(o.value,"input"),this.props.errorHandler&&this.props.errorHandler(!o.res||r)},this._onValueByStepChange=e=>{const{roundByStep:t=!0,step:n=1,uiStep:o,min:s=n,formatter:r}=this.props,i=_(this.state.displayValue,r),l=o??n;let c=n;if(i.res){const o=new a.Big(i.value),r=o.minus(s).mod(n);let u=o.plus(e*l);!r.eq(0)&&t&&(u=u.plus((e>0?0:1)*l).minus(r)),c=u.toNumber()}
const{isPassed:u,clampedValue:d}=this._checkValueBoundaries(c);c=u?c:d,this.setState({displayValue:x(this.props,c)}),this.props.onValueChange(c,"step"),this.props.errorHandler&&this.props.errorHandler(!1)};const{value:t}=e;this._errMsg=r.t(null,void 0,n(71300)),this.state={value:t,displayValue:x(e,t),focused:!1,errorMsg:this._errMsg}}render(){const{inputMode:e,errorMessage:t,autoSelectOnFocus:n,...s}=this.props;return o.createElement(l.NumberInputView,{...s,inputMode:e??this.state.inputMode,value:(0,d.startWithLTR)((0,d.stripLTRMarks)(this.state.displayValue)),errorMessage:t||this.state.errorMsg,onValueChange:this._onValueChange,onValueByStepChange:this._onValueByStepChange,onFocus:this._onFocus,onBlur:this._onBlur,autoSelectOnFocus:void 0!==n?n:!i.CheckMobile.any()})}componentDidMount(){this.setState({inputMode:i.CheckMobile.iOS()?void 0:"numeric"})}componentDidUpdate(e){this.props.shouldApplyValueOnFormatterChange&&e.formatter!==this.props.formatter&&this.setState({displayValue:x(this.props,this.props.value)})}getClampedValue(){const{min:e=-1/0,max:t=p}=this.props,n=_(this.state.displayValue,this.props.formatter);return n.res?(0,u.clamp)(n.value,e,t):null}static getDerivedStateFromProps(e,t){const{alwaysUpdateValueFromProps:n,value:o,forceApplyValueFromProps:s}=e;return t.focused&&!n||t.value===o&&!s?null:{value:o,displayValue:x(e,o)}}_checkValueBoundaries(e){const{min:t,max:n,boundariesErrorMessages:o}=this.props;return h({value:e,min:t,max:n,boundariesErrorMessages:o})}}function x(e,t){const{useFormatter:n=!0,formatter:o,mode:s}=e;return n&&"integer"!==s?function(e,t=v){return null!==e?t.format(e):""}(t,o):function(e){if(null===e)return"";return c.NumericFormatter.formatNoE(e)}(t)}function _(e,t=v){return t.parse?t.parse(e):{res:!1,error:"Formatter does not support parse"}}class w extends o.PureComponent{constructor(){super(...arguments),this._container=null,this._handleContainerRef=e=>this._container=e,this._onChange=(e,t)=>{const{input:{id:n,name:o},onChange:s,onBlur:r}=this.props;s(e,n,o),"step"===t&&r&&r()},this._onBlur=e=>{const{onBlur:t}=this.props;if(t){const n=(0,s.ensureNotNull)(this._container);n.contains(document.activeElement)||n.contains(e.relatedTarget)||t()}}}render(){const{input:{defval:e,min:t,max:n,step:s},value:r,disabled:a,onKeyDown:i,className:l,mode:c,stretch:u}=this.props;return o.createElement(C,{className:l,value:Number(void 0===r?e:r),min:t,max:n,step:s,mode:c,onBlur:this._onBlur,onValueChange:this._onChange,onKeyDown:i,disabled:a,containerReference:this._handleContainerRef,fontSizeStyle:"medium",roundByStep:!1,stretch:u})}}},16604:(e,t,n)=>{"use strict";n.d(t,{SymbolInput:()=>d,getInternalSymbolName:()=>c});var o=n(50959),s=n(50151),r=n(27032),a=n(60090),i=n(73146),l=n(48897);function c(e,t){const n=(0,i.createAdapter)(t).resolvedSymbolInfoBySymbol(e);return n&&(n.ticker||n.full_name)?n.ticker||n.full_name:e}function u(e,t){const n=(0,i.createAdapter)(t).resolvedSymbolInfoBySymbol(e);return null===n?e:n.name}const d=(0,a.bind)((function(e){const t=(0,
o.useContext)(r.PropertyContext),{study:n}=(0,s.ensureNotNull)(t),{input:{defval:a},value:i}=e;return o.createElement(l.SymbolInputsButton,{...e,value:u(i||a||"",n),study:n})}))},87125:(e,t,n)=>{"use strict";n.d(t,{BasicColorSelect:()=>r});var o=n(50959),s=n(67565);function r(e){return o.createElement(s.ColorWithLinePropertySelect,{...e})}},67565:(e,t,n)=>{"use strict";n.d(t,{ColorWithLinePropertySelect:()=>b});var o=n(50959),s=n(24377),r=n(11542),a=n(45126),i=n(19063),l=n(353),c=n(26540),u=n(49794),d=n(51768),p=n(6245);const h=new a.TranslatedString("change thickness",r.t(null,void 0,n(73281))),m=new a.TranslatedString("change color",r.t(null,void 0,n(31675))),g=new a.TranslatedString("change opacity",r.t(null,void 0,n(29426))),v=new a.TranslatedString("change line style",r.t(null,void 0,n(28818))),f=[1,2,3,4];class b extends o.PureComponent{constructor(){super(...arguments),this._trackEventLabel=null,this._getTransparencyValue=()=>{const{transparency:e}=this.props;return e?e.value():0},this._getOpacityValue=()=>{const{color:e}=this.props,t=(0,u.getPropertyValue)(e);if(t)return(0,i.isHexColor)(t)?(0,i.transparencyToAlpha)(this._getTransparencyValue()):(0,s.parseRgba)(t)[3]},this._getColorValueInHex=()=>{const{color:e}=this.props,t=(0,u.getPropertyValue)(e);return t?(0,i.isHexColor)(t)?t:(0,s.rgbToHexString)((0,s.parseRgb)(t)):null},this._onThicknessChange=e=>{const{thickness:t}=this.props;void 0!==t&&this._setProperty(t,e,h)},this._onLineStyleChange=e=>{const{lineStyle:t}=this.props;void 0!==t&&this._setProperty(t,e,v)},this._onColorChange=e=>{const{color:t,isPaletteColor:n}=this.props,o=(0,u.getPropertyValue)(t);let r=0;o&&(r=(0,i.isHexColor)(o)?this._getTransparencyValue():(0,i.alphaToTransparency)((0,s.parseRgba)(o)[3])),this._setProperty(t,(0,i.generateColor)(String(e),r,!0),m),this._trackEventLabel="Plot color > "+(n?"Palette":"Single")},this._onOpacityChange=e=>{const{color:t}=this.props,n=(0,u.getPropertyValue)(t);this._setProperty(t,(0,i.generateColor)(n,(0,i.alphaToTransparency)(e),!0),g)},this._onPopupClose=()=>{this._trackEventLabel&&((0,d.trackEvent)("GUI","Study settings",this._trackEventLabel),this._trackEventLabel=null)}}componentWillUnmount(){this._onPopupClose()}render(){const{selectOpacity:e=!0,disabled:t,className:n}=this.props;return o.createElement(c.ColorSelect,{className:n,disabled:t,color:this._getColorValueInHex(),selectOpacity:e,opacity:this._getOpacityValue(),thickness:this._getThicknessValue(),lineStyle:this._getLineStyleValue(),thicknessItems:f,lineStyleItems:p.defaultLineStyleItems,onColorChange:this._onColorChange,onOpacityChange:this._onOpacityChange,onThicknessChange:this._onThicknessChange,onLineStyleChange:this._onLineStyleChange,onPopupClose:this._onPopupClose})}_getThicknessValue(){const{thickness:e}=this.props;return e?(0,u.getPropertyValue)(e):void 0}_getLineStyleValue(){const{lineStyle:e}=this.props;return e?(0,u.getPropertyValue)(e):void 0}_setProperty(e,t,n){const{setValue:o}=this.context;o(e,t,n)}}b.contextType=l.StylePropertyContext},71891:(e,t,n)=>{"use strict";n.d(t,{
PropertyTable:()=>l});var o=n(50959),s=n(97754),r=n(90186),a=n(85027);const i=o.createContext(!1);class l extends o.PureComponent{render(){return o.createElement("div",{ref:this.props.reference,className:s(a.content,this.props.className)},this.props.children)}}var c,u,d;l.InlineRowContext=i,l.Row=function(e){const{children:t}=e;return(0,o.useContext)(i)?o.createElement("span",{className:a.inlineRow},t):o.createElement(o.Fragment,null,t)},function(e){e.Top="top",e.TopCenter="topCenter",e.Middle="middle",e.Adaptive="adaptive"}(c||(c={})),function(e){e.First="first",e.Last="last"}(u||(u={})),l.Cell=function(e){const t=(0,o.useContext)(i),n=s(a.cell,e.offset&&a.offset,e.grouped&&a.grouped,t&&a.inlineCell,"top"===e.verticalAlign&&a.top,"topCenter"===e.verticalAlign&&a.topCenter,"adaptive"===e.verticalAlign&&a.adaptive,e.checkableTitle&&a.checkableTitle,2===e.colSpan&&a.fill,"first"===e.placement&&2!==e.colSpan&&a.first,"last"===e.placement&&2!==e.colSpan&&a.last),l=(0,r.filterDataProps)(e);return o.createElement("div",{...l,className:n},o.createElement("div",{className:s(a.inner,e.className)},e.children))},l.Separator=function(e){return o.createElement(l.Row,null,o.createElement("div",{className:s(a.cell,a.separator,a.fill)}))},function(e){e[e.Small=0]="Small",e[e.Big=1]="Big"}(d||(d={})),l.GroupSeparator=function(e){const t=e.size||0;return o.createElement(l.Row,null,o.createElement("div",{className:s(a.cell,a.groupSeparator,a.fill,1===t&&a.big)}))}},49794:(e,t,n)=>{"use strict";function o(e){return Array.isArray(e)?e[0].value():e.value()}n.d(t,{getPropertyValue:()=>o})},10600:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M11.44 3.34a1.5 1.5 0 0 1 2.12 0l1.09 1.09a1.5 1.5 0 0 1 0 2.12l-7 7a1.5 1.5 0 0 1-1.06.44H4V11.4c0-.4.16-.78.44-1.06l7-7Zm1.41.7a.5.5 0 0 0-.7 0l-.7.7 1.8 1.79.69-.7a.5.5 0 0 0 0-.7l-1.09-1.08Zm-.3 3.2-1.8-1.8-5.6 5.6a.5.5 0 0 0-.15.36v1.59h1.59a.5.5 0 0 0 .35-.15l5.6-5.6Z"/></svg>'},99084:e=>{e.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 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm4-9.97L11.9 6 8.3 9.82 6.1 7.46 4.99 8.5 8.32 12 13 7.03Z"/></svg>'},30162:e=>{e.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 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16ZM9 4c-.79 0-1.38.7-1.25 1.48l.67 4.03a.59.59 0 0 0 1.16 0l.67-4.03A1.27 1.27 0 0 0 9 4Zm0 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>'},27941:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M9 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm1-12a1 1 0 1 1-2 0 1 1 0 0 1 2 0ZM8.5 9.5H7V8h3v6H8.5V9.5Z"/></svg>'},82353:e=>{
e.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 17A8 8 0 1 0 9 1a8 8 0 0 0 0 16Zm-1-4a1 1 0 1 0 2 0 1 1 0 0 0-2 0Zm2.83-3.52c-.49.43-.97.85-1.06 1.52H8.26c.08-1.18.74-1.69 1.32-2.13.49-.38.92-.71.92-1.37C10.5 6.67 9.82 6 9 6s-1.5.67-1.5 1.5V8H6v-.5a3 3 0 1 1 6 0c0 .96-.6 1.48-1.17 1.98Z"/></svg>'},65890:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 9" width="11" height="9" fill="none"><path stroke="currentColor" stroke-width="2" d="M0.999878 4L3.99988 7L9.99988 1"/></svg>'},23851:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" d="M4 13h5v1H4v-1zM12 13h5v1h-5v-1zM20 13h5v1h-5v-1z"/></svg>'},57740:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M3 13h2v2H3v-2Zm5 0h2v2H8v-2Zm7 0h-2v2h2v-2Zm3 0h2v2h-2v-2Zm7 0h-2v2h2v-2Z"/></svg>'},501:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path stroke="currentColor" d="M4 13.5h20"/></svg>'},55883:(e,t,n)=>{"use strict";n.d(t,{default:()=>o});const o=function(){}}}]);