(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4963],{638446:e=>{e.exports={wrapper:"wrapper-VB9J73Gf",focused:"focused-VB9J73Gf",readonly:"readonly-VB9J73Gf",disabled:"disabled-VB9J73Gf","size-small":"size-small-VB9J73Gf","size-medium":"size-medium-VB9J73Gf","size-large":"size-large-VB9J73Gf","font-size-small":"font-size-small-VB9J73Gf","font-size-medium":"font-size-medium-VB9J73Gf","font-size-large":"font-size-large-VB9J73Gf","border-none":"border-none-VB9J73Gf",shadow:"shadow-VB9J73Gf","border-thin":"border-thin-VB9J73Gf","border-thick":"border-thick-VB9J73Gf","intent-default":"intent-default-VB9J73Gf","intent-success":"intent-success-VB9J73Gf","intent-warning":"intent-warning-VB9J73Gf","intent-danger":"intent-danger-VB9J73Gf","intent-primary":"intent-primary-VB9J73Gf","corner-top-left":"corner-top-left-VB9J73Gf","corner-top-right":"corner-top-right-VB9J73Gf","corner-bottom-right":"corner-bottom-right-VB9J73Gf","corner-bottom-left":"corner-bottom-left-VB9J73Gf",childrenContainer:"childrenContainer-VB9J73Gf"}},436547:e=>{e.exports={defaultSelect:"defaultSelect-OM7V5ndi"}},14619:e=>{e.exports={itemWrap:"itemWrap-srH7jxJB",item:"item-srH7jxJB",icon:"icon-srH7jxJB",selected:"selected-srH7jxJB",label:"label-srH7jxJB"}},807625:e=>{e.exports={lineEndSelect:"lineEndSelect-gw7ESiZg",right:"right-gw7ESiZg"}},666220:e=>{e.exports={lineStyleSelect:"lineStyleSelect-GcXENVb4",multipleStyles:"multipleStyles-GcXENVb4"}},299118:e=>{e.exports={lineWidthSelect:"lineWidthSelect-EUDB1YgB",bar:"bar-EUDB1YgB",isActive:"isActive-EUDB1YgB",item:"item-EUDB1YgB"}},168089:e=>{e.exports={container:"container-dhpv13DH",active:"active-dhpv13DH",disabled:"disabled-dhpv13DH",icon:"icon-dhpv13DH"}},945707:e=>{e.exports={wrap:"wrap-b6_0ORMg",disabled:"disabled-b6_0ORMg"}},203115:e=>{e.exports={dropdown:"dropdown-gZlS9p6t",dropdownMenu:"dropdownMenu-gZlS9p6t",firstColorPicker:"firstColorPicker-gZlS9p6t"}},847543:e=>{e.exports={row:"row-nGXZ4vJz",empty:"empty-nGXZ4vJz",wrap:"wrap-nGXZ4vJz",breakpointNormal:"breakpointNormal-nGXZ4vJz",breakpointMedium:"breakpointMedium-nGXZ4vJz",breakpointSmall:"breakpointSmall-nGXZ4vJz"}},750540:e=>{e.exports={coordinates:"coordinates-mb1bDWNb",input:"input-mb1bDWNb",selectionCoordinates:"selectionCoordinates-mb1bDWNb",selectionCoordinates__inputs:"selectionCoordinates__inputs-mb1bDWNb",selectionCoordinates__description:"selectionCoordinates__description-mb1bDWNb",hintButton:"hintButton-mb1bDWNb"}},835199:e=>{e.exports={wrapper:"wrapper-NVcHMTVy",checkbox:"checkbox-NVcHMTVy",colorSelect:"colorSelect-NVcHMTVy",hintButton:"hintButton-NVcHMTVy"}},422497:e=>{e.exports={withoutPadding:"withoutPadding-KtEcG0Q0"}},754970:e=>{e.exports={input:"input-mIsHGNhw",control:"control-mIsHGNhw",item:"item-mIsHGNhw",cell:"cell-mIsHGNhw",fragmentCell:"fragmentCell-mIsHGNhw",largeWidth:"largeWidth-mIsHGNhw",withTitle:"withTitle-mIsHGNhw",title:"title-mIsHGNhw"}},689232:e=>{e.exports={line:"line-j5rMaiWF",control:"control-j5rMaiWF",valueInput:"valueInput-j5rMaiWF",valueUnit:"valueUnit-j5rMaiWF",
input:"input-j5rMaiWF"}},76739:e=>{e.exports={unit:"unit-ZtRdVxiD",input:"input-ZtRdVxiD",normal:"normal-ZtRdVxiD",big:"big-ZtRdVxiD",dropdown:"dropdown-ZtRdVxiD",dropdownMenu:"dropdownMenu-ZtRdVxiD"}},22332:e=>{e.exports={optionalTwoColors:"optionalTwoColors-LDRcAXEV",colorPicker:"colorPicker-LDRcAXEV",dropdown:"dropdown-LDRcAXEV",dropdownMenu:"dropdownMenu-LDRcAXEV"}},213784:e=>{e.exports={dropdown:"dropdown-RxdEkbF0",normal:"normal-RxdEkbF0",big:"big-RxdEkbF0",dropdownMenu:"dropdownMenu-RxdEkbF0"}},766586:e=>{e.exports={range:"range-GLEBGed4",valueInput:"valueInput-GLEBGed4",rangeSlider:"rangeSlider-GLEBGed4",rangeSlider_mixed:"rangeSlider_mixed-GLEBGed4",input:"input-GLEBGed4",hintButton:"hintButton-GLEBGed4"}},585357:e=>{e.exports={select:"select-hJtsYZ3G",wrap:"wrap-hJtsYZ3G",colorsWrap:"colorsWrap-hJtsYZ3G"}},642793:e=>{e.exports={colorPicker:"colorPicker-VK3h8amb",fontStyleButton:"fontStyleButton-VK3h8amb",dropdown:"dropdown-VK3h8amb",dropdownMenu:"dropdownMenu-VK3h8amb",hintButton:"hintButton-VK3h8amb"}},81364:e=>{e.exports={twoColors:"twoColors-C2hZXnYv",colorPicker:"colorPicker-C2hZXnYv"}},727394:e=>{e.exports={dropdown:"dropdown-eLkGg0Ft",menu:"menu-eLkGg0Ft"}},764104:e=>{e.exports={desktopSize:"desktopSize-icygBqe7",drawer:"drawer-icygBqe7",menuBox:"menuBox-icygBqe7"}},858516:e=>{e.exports={btnContent:"btnContent-ivexqeZZ",contentPart:"contentPart-ivexqeZZ"}},354583:e=>{e.exports={checkbox:"checkbox-aOSYFxuH"}},579849:e=>{e.exports={range:"range-mFgGeMmT",disabled:"disabled-mFgGeMmT",rangeSlider:"rangeSlider-mFgGeMmT",rangeSliderMiddleWrap:"rangeSliderMiddleWrap-mFgGeMmT",rangeSliderMiddle:"rangeSliderMiddle-mFgGeMmT",dragged:"dragged-mFgGeMmT",pointer:"pointer-mFgGeMmT",rangePointerWrap:"rangePointerWrap-mFgGeMmT"}},927306:e=>{e.exports={button:"button-iLKiGOdQ",hovered:"hovered-iLKiGOdQ",disabled:"disabled-iLKiGOdQ",active:"active-iLKiGOdQ",hidden:"hidden-iLKiGOdQ"}},408525:(e,t,n)=>{"use strict";n.d(t,{FontSizeSelect:()=>c});var o=n(50959),i=n(497754),r=n.n(i),l=n(529631),a=n(800417),s=n(436547);function c(e){const{id:t,fontSize:n,fontSizes:i=[],className:c,disabled:d,fontSizeChange:u}=e;return o.createElement(l.Select,{id:t,disabled:d,className:r()(c,s.defaultSelect),menuClassName:s.defaultSelect,items:(p=i,p.map((e=>({value:e.value,content:e.title})))),value:n,onChange:u,...(0,a.filterDataProps)(e)});var p}},865588:(e,t,n)=>{"use strict";n.d(t,{DisplayItem:()=>d,DropItem:()=>u,IconDropdown:()=>c});var o=n(50959),i=n(497754),r=n.n(i),l=n(529631),a=n(72571),s=n(14619);function c(e){const{menuItemClassName:t,...n}=e;return o.createElement(l.Select,{...n,menuItemClassName:r()(t,s.itemWrap)})}function d(e){return o.createElement("div",{className:r()(s.item,s.selected,e.className)},o.createElement(a.Icon,{className:s.icon,icon:e.icon}))}function u(e){return o.createElement("div",{className:s.item},o.createElement(a.Icon,{className:r()(s.icon,e.iconClassName),icon:e.icon}),o.createElement("div",{className:s.label},e.label))}},796855:(e,t,n)=>{"use strict";n.d(t,{LineStyleSelect:()=>f})
;var o=n(609838),i=n(50959),r=n(497754),l=n.n(r),a=n(549696),s=n(865588),c=n(200501),d=n(123851),u=n(357740),p=n(780427),m=n(666220);const h=[{type:a.LINESTYLE_SOLID,icon:c,label:o.t(null,void 0,n(301277))},{type:a.LINESTYLE_DASHED,icon:d,label:o.t(null,void 0,n(459317))},{type:a.LINESTYLE_DOTTED,icon:u,label:o.t(null,void 0,n(842973))}];class f extends i.PureComponent{render(){const{id:e,lineStyle:t,className:n,lineStyleChange:o,disabled:r,additionalItems:a,allowedLineStyles:c}=this.props;let d=function(e){let t=[...h];return void 0!==e&&(t=t.filter((t=>e.includes(t.type)))),t.map((e=>({value:e.type,selectedContent:i.createElement(s.DisplayItem,{icon:e.icon}),content:i.createElement(s.DropItem,{icon:e.icon,label:e.label})})))}(c);return a&&(d=[{readonly:!0,content:a},...d]),i.createElement(s.IconDropdown,{id:e,disabled:r,className:l()(m.lineStyleSelect,n),hideArrowButton:!0,items:d,value:t,onChange:o,"data-name":"line-style-select",addPlaceholderToItems:!1,placeholder:i.createElement(s.DisplayItem,{icon:p,className:m.multipleStyles})})}}},554393:(e,t,n)=>{"use strict";n.d(t,{LineWidthSelect:()=>d});var o=n(50959),i=n(497754),r=n(529631),l=n(299118);const a=[1,2,3,4];function s(e){const{id:t,value:n,items:s=a,disabled:c,onChange:d}=e;return o.createElement(r.Select,{id:t,disabled:c,hideArrowButton:!0,className:l.lineWidthSelect,items:(u=s,u.map((e=>({value:e,selectedContent:p(e,!0),content:p(e)})))),value:n,onChange:d,"data-name":"line-width-select"});var u;function p(e,t){const r={borderTopWidth:e};return o.createElement("div",{className:l.item},o.createElement("div",{className:i(l.bar,{[l.isActive]:e===n&&!t}),style:r}," "))}}var c=n(771586);function d(e){const{property:t}=e,[n,i]=(0,c.useDefinitionProperty)({property:t});return o.createElement(s,{...e,value:n,onChange:i})}},633064:(e,t,n)=>{"use strict";n.d(t,{ControlCustomHeightContext:()=>r,ControlCustomWidthContext:()=>i});var o=n(50959);const i=o.createContext({}),r=o.createContext({})},951612:(e,t,n)=>{"use strict";n.d(t,{Section:()=>qt});var o=n(50959),i=n(308954),r=n(193315),l=n(771586),a=n(955261);function s(e){const{definition:{id:t,properties:{checked:n,disabled:i,visible:r},title:s,solutionId:c},offset:d}=e,[u]=(0,l.useDefinitionProperty)({property:i,defaultValue:!1}),[p]=(0,l.useDefinitionProperty)({property:r,defaultValue:!0});return p?o.createElement(a.CommonSection,{id:t,offset:d,checked:n,title:s,solutionId:c,disabled:e.disabled||u}):null}var c=n(497754),d=n.n(c),u=n(414823),p=n(796855);function m(e){const{property:t}=e,[n,i]=(0,l.useDefinitionProperty)({property:t});return o.createElement(p.LineStyleSelect,{...e,lineStyle:n,lineStyleChange:i})}var h=n(554393),f=n(960521),b=n(650151);function v(e){return"mixed"===e}function y(e,t,n){const[i,r]=(0,o.useState)(e),l=(0,o.useRef)(i);return(0,o.useEffect)((()=>{r(e)}),[e,n]),[i,function(e){l.current=e,r(e)},function(){t(l.current)},function(){l.current=e,r(e)}]}var g=n(180185),E=n(576805),w=n(44681),C=n(424030),D=n(601227);function S(e){const{property:t,...n}=e,[i,r]=(0,
o.useState)(performance.now()),[a,s]=(0,l.useDefinitionProperty)({property:t,handler:()=>r(performance.now())}),c=y(a,s,i);return o.createElement(V,{...n,valueHash:i,sharedBuffer:c})}function V(e){const{sharedBuffer:t,min:n,max:i,step:r,...l}=e,[a,s,c,d]=t,u=(0,o.useRef)(null),p=(0,o.useRef)(null),m={flushed:!1};return o.createElement(x,{...l,ref:p,onValueChange:function(e,t){s(e),"step"!==t||m.flushed||(c(),m.flushed=!0)},onKeyDown:function(e){if(e.defaultPrevented||m.flushed)return;switch((0,g.hashFromEvent)(e.nativeEvent)){case 27:d(),m.flushed=!0;break;case 13:e.preventDefault();const t=(0,b.ensureNotNull)(p.current).getClampedValue();null!==t&&(s(t),c(),m.flushed=!0)}},onBlur:function(e){const t=(0,b.ensureNotNull)(u.current);if(!t.contains(document.activeElement)&&!t.contains(e.relatedTarget)){const e=(0,b.ensureNotNull)(p.current).getClampedValue();null===e||m.flushed||(s(e),c(),m.flushed=!0)}},value:a,roundByStep:!1,containerReference:function(e){u.current=e},inputMode:D.CheckMobile.iOS()?void 0:"numeric",min:n,max:i,step:r,stretch:!1})}const P={mode:"float",min:-Number.MAX_VALUE,max:Number.MAX_VALUE,step:1,precision:0,inheritPrecisionFromStep:!0};class x extends o.PureComponent{constructor(e){super(e),this._selection=null,this._restoreSelection=!1,this._input=null,this._handleSelectionChange=()=>{this._restoreSelection||document.activeElement!==(0,b.ensureNotNull)(this._input)||this._saveSelection((0,b.ensureNotNull)(this._input))},this._handleInputReference=e=>{this._input=e,this.props.inputReference&&this.props.inputReference(e)},this._onFocus=e=>{this._saveSelection((0,b.ensureNotNull)(this._input)),this.setState({focused:!0}),this.props.onFocus&&this.props.onFocus(e)},this._onBlur=e=>{this._selection=null,this.setState({displayValue:k(this.props,this.props.value,I(this.props)),focused:!1}),this.props.onBlur&&this.props.onBlur(e)},this._onValueChange=e=>{const t=e.currentTarget,n=t.value,o=function(e,t,n){switch(n){case"integer":return N.test(t)?t:e;case"float":return t=t.replace(/,/g,"."),T.test(t)?t:e}}(this.state.displayValue,n,this.props.mode),i=M(o),r=this._checkValueBoundaries(i);var l,a;this.setState({displayValue:o}),o!==n&&(l=this.state.displayValue,a=(a=o).replace(/,/g,"."),(l=l.replace(/,/g,".")).includes(".")||!a.includes("."))?(this._restoreSelection=!0,this.forceUpdate()):this._saveSelection(t),r.value&&k(this.props,i)===o&&this.props.onValueChange(i,"input")},this._onValueByStepChange=e=>{const{roundByStep:t=!0,step:n=1}=this.props,o=M(this.state.displayValue);let i;if(isNaN(o)){const{defaultValue:e}=this.props;if(void 0===e)return;i=e}else{const r=new f.Big(o),l=new f.Big(n),a=r.mod(l);let s=r.plus(e*n);!a.eq(0)&&t&&(s=s.plus((e>0?0:1)*n).minus(a)),i=s.toNumber()}this._checkValueBoundaries(i).value&&(this.setState({displayValue:k(this.props,i,I(this.props))}),this.props.onValueChange(i,"step"))},this.state={value:B(this.props.value),displayValue:k(this.props,this.props.value,I(this.props)),focused:!1,valueHash:this.props.valueHash}}componentDidMount(){
document.addEventListener("selectionchange",this._handleSelectionChange)}componentWillUnmount(){document.removeEventListener("selectionchange",this._handleSelectionChange)}componentDidUpdate(){const e=(0,b.ensureNotNull)(this._input),t=this._selection;if(null!==t&&this._restoreSelection&&document.activeElement===e){const{start:n,end:o,direction:i}=t;e.setSelectionRange(n,o,i)}this._restoreSelection=!1}render(){return o.createElement(E.NumberInputView,{type:"text",inputMode:this.props.inputMode,name:this.props.name,fontSizeStyle:"medium",value:this.state.displayValue,className:this.props.className,placeholder:this.props.placeholder,forceShowControls:this.props.forceShowControls,disabled:this.props.disabled,stretch:this.props.stretch,error:Boolean(this.props.error),errorMessage:this.props.error,onValueChange:this._onValueChange,onValueByStepChange:this._onValueByStepChange,containerReference:this.props.containerReference,inputReference:this._handleInputReference,onClick:this.props.onClick,onFocus:this._onFocus,onBlur:this._onBlur,onKeyDown:this.props.onKeyDown,autoSelectOnFocus:!0,"data-name":this.props["data-name"],highlight:this.props.highlight})}getClampedValue(){const{min:e,max:t}=this.props,n=M(this.state.displayValue);return isNaN(n)?null:(0,w.clamp)(n,e,t)}static getDerivedStateFromProps(e,t){const{valueHash:n}=e,o=B(e.value);if(t.value!==o||t.valueHash!==n){return{value:o,valueHash:n,displayValue:k(e,o,t.focused&&t.valueHash===n?void 0:I(e))}}return null}_saveSelection(e){const{selectionStart:t,selectionEnd:n,selectionDirection:o}=e;null!==t&&null!==n&&null!==o&&(this._selection={start:t,end:n,direction:o})}_checkValueBoundaries(e){const{min:t,max:n}=this.props,o=function(e,t,n){const o=e>=t,i=e<=n;return{passMin:o,passMax:i,pass:o&&i,clamped:(0,w.clamp)(e,t,n)}}(e,t,n);return{value:o.pass}}}x.defaultProps=P;const N=/^-?[0-9]*$/,T=/^(-?([0-9]+\.?[0-9]*)|(-?[0-9]*))$/;function k(e,t,n){return v(t=B(t))?"—":(null!==t&&void 0!==n&&(n=Math.max(_(t),n)),function(e,t){if(null===e)return"";return new C.NumericFormatter(t).format(e)}(t,n))}function I(e){let t=0;return e.inheritPrecisionFromStep&&e.step<=1&&(t=_(e.step)),Math.max(e.precision,t)||void 0}function _(e){const t=Math.trunc(e).toString();return(0,w.clamp)(C.NumericFormatter.formatNoE(e).length-t.length-1,0,15)}function M(e,t){return new C.NumericFormatter(t).parse(e)}function B(e){return"number"==typeof e&&Number.isFinite(e)||v(e)?e:null}var R=n(724377),L=n(552315),A=n(32240);function F(e){const{color:t,thickness:n,thicknessItems:i,noAlpha:r}=e,[a,s]=(0,l.useDefinitionProperty)({property:t}),[c,d]=(0,l.useDefinitionProperty)(n?{property:n}:{defaultValue:void 0});return o.createElement(L.ColorSelect,{...e,color:function(){if(!a)return null;if("mixed"===a)return"mixed";return(0,R.rgbToHexString)((0,R.parseRgb)(a))}(),onColorChange:function(e){const t=a&&"mixed"!==a?(0,A.alphaToTransparency)((0,R.parseRgba)(a)[3]):0;s((0,A.generateColor)(String(e),t,!0))},thickness:c,thicknessItems:i,onThicknessChange:d,opacity:r?void 0:a&&"mixed"!==a?(0,
R.parseRgba)(a)[3]:void 0,onOpacityChange:r?void 0:function(e){s((0,A.generateColor)(a,(0,A.alphaToTransparency)(e),!0))}})}var W=n(609838),G=n(243939),z=n(865588),O=n(800417),H=n(443382),J=n(666242),Z=n(807625);const j=[{type:G.LineEnd.Normal,icon:H,label:W.t(null,void 0,n(855362))},{type:G.LineEnd.Arrow,icon:J,label:W.t(null,void 0,n(696237))}];class K extends o.PureComponent{constructor(e){super(e),this._items=[],this._items=j.map((t=>({value:t.type,selectedContent:o.createElement(z.DisplayItem,{icon:t.icon}),content:o.createElement(z.DropItem,{icon:t.icon,iconClassName:d()(e.isRight&&Z.right),label:t.label})})))}render(){const{id:e,lineEnd:t,className:n,lineEndChange:i,isRight:r,disabled:l}=this.props;return o.createElement(z.IconDropdown,{id:e,disabled:l,className:d()(Z.lineEndSelect,r&&Z.right,n),items:this._items,value:t,onChange:i,hideArrowButton:!0,...(0,O.filterDataProps)(this.props)})}}function Y(e){const{property:t}=e,[n,i]=(0,l.useDefinitionProperty)({property:t});return o.createElement(K,{...e,lineEnd:n,lineEndChange:i})}var U=n(720911),X=n(847543);function $(e){const{children:t,className:n,breakPoint:i="Normal"}=e;return o.createElement(U.CellWrap,{className:c(X.wrap,n,X[`breakpoint${i}`])},o.Children.map(t,(e=>o.isValidElement(e)?o.createElement("span",{key:null===e.key?void 0:e.key,className:c(X.row,r(e)&&X.empty)},e):e)));function r(e){return!(!o.isValidElement(e)||e.type!==o.Fragment||!Array.isArray(e.props.children))&&e.props.children.every((e=>null===e))}}const q={1:"float",0:"integer"};var Q=n(297265),ee=n(689232);function te(e){const{definition:{id:t,properties:{checked:n,disabled:i,visible:r,leftEnd:s,rightEnd:d,value:p,extendLeft:f,extendRight:b},title:v,valueMin:y,valueMax:g,valueStep:E,valueUnit:w,extendLeftTitle:C,extendRightTitle:D,solutionId:V},offset:P}=e,[x]=(0,l.useDefinitionProperty)({property:n,defaultValue:!0}),[N]=(0,l.useDefinitionProperty)({property:i,defaultValue:!1}),[T]=(0,l.useDefinitionProperty)({property:r,defaultValue:!0}),k=(0,Q.useWatchedValueReadonly)({watchedValue:y,defaultValue:void 0}),I=(0,Q.useWatchedValueReadonly)({watchedValue:g,defaultValue:void 0}),_=(0,Q.useWatchedValueReadonly)({watchedValue:E,defaultValue:void 0}),M=(0,Q.useWatchedValueReadonly)({watchedValue:w,defaultValue:void 0}),B=e.disabled||!x;return T?o.createElement(o.Fragment,null,o.createElement(a.CommonSection,{id:t,offset:P,checked:n,title:v,solutionId:V,disabled:e.disabled||N},o.createElement($,{className:ee.line,breakPoint:"Small"},o.createElement(o.Fragment,null,function(){const{definition:{properties:{color:n,width:i},widthValues:r}}=e;if(n)return o.createElement("span",{className:ee.control},o.createElement(F,{color:n,thickness:i,disabled:B,thicknessItems:r}));return i&&o.createElement("span",{className:ee.control},o.createElement(h.LineWidthSelect,{id:(0,u.createDomId)(t,"line-width-select"),items:r,property:i,disabled:B}))}(),function(){const{definition:{properties:{style:n}}}=e;return n&&o.createElement("span",{className:ee.control},o.createElement(m,{id:(0,
u.createDomId)(t,"line-style-select"),property:n,disabled:B}))}()),(s||d||p)&&o.createElement(o.Fragment,null,o.createElement(o.Fragment,null,s&&o.createElement(Y,{id:(0,u.createDomId)(t,"left-end-select"),"data-name":"left-end-select",className:ee.control,property:s,disabled:B}),d&&o.createElement(Y,{id:(0,u.createDomId)(t,"right-end-select"),"data-name":"right-end-select",className:ee.control,property:d,disabled:B,isRight:!0})),function(){const{definition:{valueType:t}}=e;return p&&o.createElement("span",{className:c(ee.valueInput,ee.control)},o.createElement(S,{className:ee.input,property:p,min:k,max:I,step:_,disabled:B,mode:void 0!==t?q[t]:void 0,name:"line-value-input"}),o.createElement("span",{className:ee.valueUnit},M))}()))),f&&o.createElement(a.CommonSection,{id:`${t}ExtendLeft`,offset:P,checked:f,title:C,disabled:e.disabled||N}),b&&o.createElement(a.CommonSection,{id:`${t}ExtendRight`,offset:P,checked:b,title:D,disabled:e.disabled||N})):null}var ne=n(952797),oe=n(529631),ie=n(585938);function re(e){const{property:t,options:n,...i}=e,[r,a]=(0,l.useDefinitionProperty)({property:t}),s=(0,ie.useForceUpdate)();return(0,o.useEffect)((()=>{const e=()=>s();return Array.isArray(n)||n.subscribe(e),()=>{Array.isArray(n)||n.unsubscribe(e)}}),[]),o.createElement(oe.Select,{...i,onChange:a,value:r,items:(Array.isArray(n)?n:n.value()).map((e=>e.readonly?{content:e.title,readonly:e.readonly}:{content:e.title,value:e.value,disabled:e.disabled,id:e.id}))})}var le=n(203115);const ae=[{title:W.t(null,void 0,n(735637)),value:ne.ColorType.Solid},{title:W.t(null,void 0,n(16079)),value:ne.ColorType.Gradient}];function se(e){const{id:t,disabled:n,noAlpha:i,properties:r}=e,{color:a,gradientColor1:s,gradientColor2:c,type:d}=r,[p]=(0,l.useDefinitionProperty)({property:d,defaultValue:ne.ColorType.Solid});return o.createElement($,null,o.createElement(re,{id:(0,u.createDomId)(t,"background-type-options-dropdown"),"data-name":"background-type-options-dropdown",className:le.dropdown,menuClassName:le.dropdownMenu,disabled:n,property:d,options:ae}),p===ne.ColorType.Solid?o.createElement(F,{color:a,disabled:n,noAlpha:i}):o.createElement(o.Fragment,null,o.createElement(F,{className:le.firstColorPicker,color:s,disabled:n,noAlpha:i}),o.createElement(F,{color:c,disabled:n,noAlpha:i})))}function ce(e){const{definition:{id:t,properties:n,title:i,noAlpha:r,solutionId:s},offset:c}=e,{color:d,checked:u,disabled:p,visible:m}=n,[h]=(0,l.useDefinitionProperty)({property:u,defaultValue:!0}),[f]=(0,l.useDefinitionProperty)({property:p,defaultValue:!1}),[b]=(0,l.useDefinitionProperty)({property:m,defaultValue:!0}),v=e.disabled||!h;return b?o.createElement(a.CommonSection,{id:t,offset:c,checked:u,title:i,solutionId:s,disabled:e.disabled||f},o.createElement(U.CellWrap,null,n.hasOwnProperty("type")?o.createElement(se,{id:t,properties:n,disabled:v,noAlpha:r}):o.createElement(F,{color:d,disabled:v,noAlpha:r}))):null}var de=n(939075),ue=n(149962),pe=n(945707);function me(e){const{value:t,disabled:n,onChange:i,className:r}=e;return o.createElement("div",{
className:c(pe.wrap,r,{[pe.disabled]:n})},o.createElement(de.Opacity,{hideInput:!0,color:ue.colorsPalette["color-tv-blue-500"],opacity:1-t/100,onChange:function(e){n||i(100-100*e)},disabled:n}))}function he(e){const{property:t,...n}=e,[i,r]=(0,l.useDefinitionProperty)({property:t});return o.createElement(me,{...n,value:i,onChange:r})}function fe(e){const{definition:{id:t,properties:{transparency:n,checked:i,disabled:r,visible:s},title:c,solutionId:d},offset:u}=e,[p]=(0,l.useDefinitionProperty)({property:i,defaultValue:!0}),[m]=(0,l.useDefinitionProperty)({property:r,defaultValue:!1}),[h]=(0,l.useDefinitionProperty)({property:s,defaultValue:!0}),f=e.disabled||!p;return h?o.createElement(a.CommonSection,{id:t,offset:u,checked:i,title:c,solutionId:d,disabled:e.disabled||m},o.createElement(U.CellWrap,null,o.createElement(he,{property:n,disabled:f}))):null}var be=n(81364);function ve(e){const{definition:{id:t,properties:{color1:n,color2:i,checked:r,disabled:s,visible:c},title:d,noAlpha1:u,noAlpha2:p,solutionId:m},offset:h}=e,[f]=(0,l.useDefinitionProperty)({property:r,defaultValue:!0}),[b]=(0,l.useDefinitionProperty)({property:s,defaultValue:!1}),[v]=(0,l.useDefinitionProperty)({property:c,defaultValue:!0}),y=e.disabled||!f||b;return v?o.createElement(a.CommonSection,{id:t,offset:h,checked:r,solutionId:m,title:d,disabled:e.disabled||b},o.createElement(U.CellWrap,{className:be.twoColors},g(n,u),g(i,p))):null;function g(e,t){return o.createElement("span",{className:be.colorPicker},o.createElement(F,{color:e,disabled:y,noAlpha:t}))}}var ye=n(633064),ge=n(76739);function Ee(e){const{definition:{id:t,properties:{checked:n,value:i,unitOptionsValue:r,disabled:s,visible:d},min:p,max:m,step:h,title:f,unit:v,unitOptions:y,type:g,solutionId:E},offset:w}=e,[C]=(0,l.useDefinitionProperty)({property:n,defaultValue:!0}),[D]=(0,l.useDefinitionProperty)({property:s,defaultValue:!1}),[V]=(0,l.useDefinitionProperty)({property:d,defaultValue:!0}),P=(0,Q.useWatchedValueReadonly)({watchedValue:p,defaultValue:void 0}),x=(0,Q.useWatchedValueReadonly)({watchedValue:m,defaultValue:void 0}),N=(0,Q.useWatchedValueReadonly)({watchedValue:h,defaultValue:void 0}),T=(0,Q.useWatchedValueReadonly)({watchedValue:v,defaultValue:void 0}),k=(0,o.useContext)(ye.ControlCustomWidthContext),I=e.disabled||!C;return V?o.createElement(a.CommonSection,{id:t,offset:w,checked:n,title:f,solutionId:E,disabled:e.disabled||D},o.createElement(U.CellWrap,null,o.createElement($,null,o.createElement(S,{className:c(ge.input,k[t]&&ge[k[t]]),property:i,min:P,max:x,step:N,disabled:I,mode:q[g],name:"number-input","data-name":t}),r&&o.createElement(re,{id:(0,u.createDomId)(t,"unit-options-dropdown"),"data-name":"unit-options-dropdown",className:ge.dropdown,menuClassName:ge.dropdownMenu,disabled:I,property:r,options:(0,b.ensureDefined)(y)})),T&&o.createElement("span",{className:ge.unit},T))):null}function we(e){const{definition:{id:t,properties:{checked:n,disabled:i,visible:r},childrenDefinitions:s,title:c},offset:d}=e,[u]=(0,l.useDefinitionProperty)({property:n,defaultValue:!0
}),[p]=(0,l.useDefinitionProperty)({property:i,defaultValue:!1}),[m]=(0,l.useDefinitionProperty)({property:r,defaultValue:!0}),h=e.disabled||!u;return m?o.createElement(o.Fragment,null,o.createElement(a.CommonSection,{id:t,offset:d,checked:n,title:c,disabled:e.disabled||p}),s.map((e=>o.createElement(qt,{key:e.id,disabled:h,definition:e,offset:!0})))):null}var Ce=n(408525);function De(e){const{property:t}=e,[n,i]=(0,l.useDefinitionProperty)({property:t});return o.createElement(Ce.FontSizeSelect,{...e,fontSize:n,fontSizeChange:i,"data-name":"font-size-select"})}var Se=n(72571),Ve=n(168089);function Pe(e){const{className:t,checked:n,icon:i,disabled:r,onClick:l}=e;return o.createElement("div",{className:d()(t,Ve.container,n&&!r&&Ve.active,r&&Ve.disabled),onClick:r?void 0:l,"data-role":"button",...(0,O.filterDataProps)(e)},o.createElement(Se.Icon,{className:Ve.icon,icon:i}))}function xe(e){const{icon:t,className:n,property:i,disabled:r}=e,[a,s]=(0,l.useDefinitionProperty)({property:i});return o.createElement(Pe,{className:n,icon:t,checked:a,onClick:function(){s(!a)},disabled:r,...(0,O.filterDataProps)(e)})}var Ne=n(34735),Te=n(459837),ke=n(558213);function Ie(e){const{property:t,...n}=e,[i,r]=(0,l.useDefinitionProperty)({property:t}),a=(0,o.useCallback)((e=>r(e.target.value)),[r]);return o.createElement(ke.Textarea,{...n,value:i,onChange:a})}var _e=n(8295),Me=n(429285),Be=n(642793);const Re=e=>({content:e.title,title:e.title,value:e.value,id:e.id}),Le=e=>({content:e.title,title:e.title,value:e.value,id:e.id});function Ae(e){const{definition:{id:t,properties:{color:n,size:i,checked:r,disabled:s,bold:c,italic:d,text:p,alignmentHorizontal:m,alignmentVertical:h,orientation:f,backgroundVisible:b,backgroundColor:v,borderVisible:y,borderColor:g,borderWidth:E,wrap:w},title:C,solutionId:D,sizeItems:S,alignmentTitle:V,alignmentHorizontalItems:P,alignmentVerticalItems:x,orientationTitle:N,orientationItems:T,backgroundTitle:k,borderTitle:I,borderWidthItems:_,wrapTitle:M},offset:B}=e,R=(0,o.useContext)(ye.ControlCustomHeightContext),[L]=(0,l.useDefinitionProperty)({property:r,defaultValue:!0}),[A]=(0,l.useDefinitionProperty)({property:s,defaultValue:!1}),[W,G]=(0,l.useDefinitionProperty)({property:h,defaultValue:void 0}),[z,O]=(0,l.useDefinitionProperty)({property:f,defaultValue:"horizontal"}),[H,J]=(0,l.useDefinitionProperty)({property:m,defaultValue:void 0}),[Z]=(0,l.useDefinitionProperty)({property:b,defaultValue:!1}),[j]=(0,l.useDefinitionProperty)({property:y,defaultValue:!1}),K=e.disabled||!L;return o.createElement(o.Fragment,null,function(){if(C)return o.createElement(a.CommonSection,{id:t,offset:B,checked:r,title:C,solutionId:D,disabled:e.disabled||A},o.createElement($,{breakPoint:"Small"},q(),Q()));return o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{placement:"first",colSpan:2,offset:B,"data-section-name":t},q(),Q(),D&&!1))}(),p&&o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{placement:"first",colSpan:2,offset:B,"data-section-name":t},o.createElement(Ie,{
className:Ne.InputClasses.FontSizeMedium,rows:(Y=R[t],"big"===Y?9:5),stretch:!0,property:p,disabled:K,onFocus:function(e){e.target.select()},name:"text-input"}))),(m||h)&&o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:B,"data-section-name":t},o.createElement(U.CellWrap,null,V)),o.createElement(Te.PropertyTable.Cell,{placement:"last",verticalAlign:"adaptive","data-section-name":t},o.createElement($,{breakPoint:"Small"},void 0!==W&&void 0!==x&&o.createElement(oe.Select,{id:(0,u.createDomId)(t,"alignment-vertical-select"),"data-name":"alignment-vertical-select",className:Be.dropdown,menuClassName:Be.dropdownMenu,disabled:K,value:W,items:x.map(Re),onChange:G}),void 0!==H&&void 0!==P&&o.createElement(oe.Select,{id:(0,u.createDomId)(t,"alignment-horizontal-select"),"data-name":"alignment-horizontal-select",className:Be.dropdown,menuClassName:Be.dropdownMenu,disabled:K,value:H,items:P.map(Re),onChange:J})))),void 0!==f&&void 0!==T&&o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:B,"data-section-name":t},o.createElement(U.CellWrap,null,N)),o.createElement(Te.PropertyTable.Cell,{placement:"last",verticalAlign:"adaptive","data-section-name":t},o.createElement($,{breakPoint:"Small"},o.createElement(oe.Select,{id:(0,u.createDomId)(t,"orientation-select"),"data-name":"orientation-select",className:Be.dropdown,menuClassName:Be.dropdownMenu,disabled:K,value:z,items:T.map(Le),onChange:O})))),ee(k,b,v,!!b&&!Z),ee(I,y,g,!!y&&!j,E,_),w&&o.createElement(a.CommonSection,{id:`${t}Wrap`,offset:B,checked:w,title:M,disabled:e.disabled||A}));var Y;function X(e,t,n){return e?o.createElement(xe,{className:Be.fontStyleButton,icon:t,property:e,disabled:K,"data-name":n}):null}function q(){return o.createElement(o.Fragment,null,n&&o.createElement("div",{className:Be.colorPicker},o.createElement(F,{color:n,disabled:K})),i&&S&&o.createElement(De,{id:(0,u.createDomId)(t,"font-size-select"),property:i,fontSizes:S,disabled:K}))}function Q(){return o.createElement(o.Fragment,null,X(c,_e,"toggle-bold"),X(d,Me,"toggle-italic"))}function ee(e,n,i,r,l,s){return i||n?o.createElement(a.CommonSection,{id:`${t}ColorSelect`,offset:B,checked:n,title:e,disabled:K},i&&o.createElement(F,{color:i,thickness:l,thicknessItems:s,disabled:K||r})):null}}var Fe=n(481476),We=n(372605);function Ge(e){const{property:t,mathOperations:n="+/*",mode:i="float",disabled:r,...a}=e,[s,c]=(0,o.useState)(performance.now()),[d,u]=(0,l.useDefinitionProperty)({property:t,handler:()=>c(performance.now())}),[p,m,h,f]=y(d,u,s),b=(0,o.useMemo)((()=>{const e=new RegExp(`^[${n.split("").join("\\")}-]?(${"float"===i?"(\\d+\\.\\d*)|":""}(\\d*))$`);return t=>(0,We.isString)(t)&&e.test(t)}),[n,i]);return o.createElement(Fe.FormInput,{...a,type:"text",value:p,onChange:function(e){const{value:t}=e.currentTarget;m(b(t)?t:p)},onKeyDown:function(e){if(e.defaultPrevented)return;switch((0,g.hashFromEvent)(e.nativeEvent)){case 27:f();break
;case 13:v()}},onBlur:function(){v()},disabled:r,stretch:!1,autoSelectOnFocus:!0});function v(){p.length&&h()}}var ze=n(750540);function Oe(e){const{definition:{properties:{x:t,y:n,disabled:i},id:r,title:l,solutionId:a},definition:s,offset:c}=e,d=i&&i.value()||e.disabled;return o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{verticalAlign:"top",placement:"first",offset:c,"data-section-name":r},o.createElement("span",{className:ze.coordinates},l)),(t||n)&&o.createElement(Te.PropertyTable.Cell,{placement:"last",offset:c,"data-section-name":r},o.createElement($,{breakPoint:"Medium"},"coordinates"===s.propType?o.createElement(He,{definition:s,disabled:d}):o.createElement(Je,{definition:s,disabled:d})),a&&!1))}function He(e){const{definition:{properties:{x:t,y:n},minX:i,maxX:r,stepX:l,minY:a,maxY:s,stepY:c,typeX:d,typeY:u},disabled:p}=e,m=(0,Q.useWatchedValueReadonly)({watchedValue:i,defaultValue:void 0}),h=(0,Q.useWatchedValueReadonly)({watchedValue:r,defaultValue:void 0}),f=(0,Q.useWatchedValueReadonly)({watchedValue:l,defaultValue:void 0}),b=(0,Q.useWatchedValueReadonly)({watchedValue:a,defaultValue:void 0}),v=(0,Q.useWatchedValueReadonly)({watchedValue:s,defaultValue:void 0}),y=(0,Q.useWatchedValueReadonly)({watchedValue:c,defaultValue:void 0});return o.createElement(o.Fragment,null,n&&o.createElement(S,{className:ze.input,property:n,min:b,max:v,step:y,disabled:p,name:"y-input",mode:void 0!==u?q[u]:"integer"}),t&&o.createElement(S,{className:ze.input,property:t,min:m,max:h,step:f,disabled:p,name:"x-input",mode:void 0!==d?q[d]:"integer"}))}function Je(e){const{definition:{properties:{x:t,y:i},mathOperationsX:r,mathOperationsY:l,modeX:a,modeY:s},disabled:c}=e;return o.createElement("div",{className:ze.selectionCoordinates},o.createElement("div",{className:ze.selectionCoordinates__inputs},i&&o.createElement(Ge,{property:i,mathOperations:l,mode:s,disabled:c,className:ze.input,placeholder:W.t(null,void 0,n(495166))}),t&&o.createElement(Ge,{property:t,mathOperations:r,mode:a,disabled:c,className:ze.input,placeholder:W.t(null,void 0,n(976080))})),o.createElement("div",{className:ze.selectionCoordinates__description},W.t(null,void 0,n(578019))))}var Ze=n(213784);function je(e){const{definition:{id:t,properties:{checked:n,option:i,disabled:r,visible:s},title:c,solutionId:p,options:m},offset:h}=e,[f]=(0,l.useDefinitionProperty)({property:n,defaultValue:!0}),[b]=(0,l.useDefinitionProperty)({property:r,defaultValue:!1}),[v]=(0,l.useDefinitionProperty)({property:s,defaultValue:!0}),y=(0,o.useContext)(ye.ControlCustomWidthContext),g=e.disabled||!f;return v?o.createElement(a.CommonSection,{id:t,offset:h,checked:n,title:c,solutionId:p,disabled:e.disabled||b},o.createElement(U.CellWrap,null,o.createElement(re,{id:(0,u.createDomId)(t,"options-dropdown"),"data-name":"options-dropdown",className:d()(Ze.dropdown,y[t]&&Ze[y[t]]),menuClassName:d()(Ze.dropdownMenu,y[t]&&Ze[y[t]]),disabled:g||b,property:i,options:m}))):null}var Ke=n(653898);var Ye=n(710263),Ue=n(579849);class Xe extends o.PureComponent{
constructor(e){super(e),this._container=null,this._pointer=null,this._rafPosition=null,this._rafDragStop=null,this._refContainer=e=>{this._container=e},this._refPointer=e=>{this._pointer=e},this._handlePosition=e=>{null!==this._rafPosition||this.props.disabled||(this._rafPosition=requestAnimationFrame((()=>{const{from:t,to:n,min:o,max:i}=this.props,r=this._getNewPosition(e),l=1===this._detectPointerMode(e),a=l?(0,w.clamp)(r,o,n):t,s=l?n:(0,w.clamp)(r,t,i);a<=s&&this._handleChange(a,s),this._rafPosition=null})))},this._handleDragStop=()=>{null!==this._rafDragStop||this.props.disabled||(this._rafDragStop=requestAnimationFrame((()=>{this.setState({pointerDragMode:0}),this._rafDragStop=null,this.props.onCommit()})))},this._onSliderClick=e=>{D.CheckMobile.any()||(this._handlePosition(e.nativeEvent),this._dragSubscribe())},this._mouseUp=e=>{this._dragUnsubscribe(),this._handlePosition(e),this._handleDragStop()},this._mouseMove=e=>{this._handlePosition(e)},this._onTouchStart=e=>{this._handlePosition(e.nativeEvent.touches[0])},this._handleTouch=e=>{this._handlePosition(e.nativeEvent.touches[0])},this._handleTouchEnd=()=>{this._handleDragStop()},this.state={pointerDragMode:0}}componentWillUnmount(){null!==this._rafPosition&&(cancelAnimationFrame(this._rafPosition),this._rafPosition=null),null!==this._rafDragStop&&(cancelAnimationFrame(this._rafDragStop),this._rafDragStop=null),this._dragUnsubscribe()}render(){const{className:e,disabled:t,from:n,to:i,min:r,max:l}=this.props,{pointerDragMode:a}=this.state,s=0!==a,d=l-r,u=0===d?r:(n-r)/d,p=0===d?l:(i-r)/d,m=(0,Ye.isRtl)()?"right":"left";return o.createElement("div",{className:c(e,Ue.range,t&&Ue.disabled)},o.createElement("div",{className:Ue.rangeSlider,ref:this._refContainer,onMouseDown:this._onSliderClick,onTouchStart:this._onTouchStart,onTouchMove:this._handleTouch,onTouchEnd:this._handleTouchEnd},o.createElement("div",{className:Ue.rangeSliderMiddleWrap},o.createElement("div",{className:c(Ue.rangeSliderMiddle,s&&Ue.dragged),style:{[m]:100*u+"%",width:100*(p-u)+"%"}})),o.createElement("div",{className:Ue.rangePointerWrap},o.createElement("div",{className:c(Ue.pointer,s&&Ue.dragged),style:{[m]:100*u+"%"},ref:this._refPointer})),o.createElement("div",{className:Ue.rangePointerWrap},o.createElement("div",{className:c(Ue.pointer,s&&Ue.dragged),style:{[m]:100*p+"%"}}))))}_dragSubscribe(){const e=(0,b.ensureNotNull)(this._container).ownerDocument;e&&(e.addEventListener("mouseup",this._mouseUp),e.addEventListener("mousemove",this._mouseMove))}_dragUnsubscribe(){const e=(0,b.ensureNotNull)(this._container).ownerDocument;e&&(e.removeEventListener("mousemove",this._mouseMove),e.removeEventListener("mouseup",this._mouseUp))}_getNewPosition(e){const{min:t,max:n}=this.props,o=n-t,i=(0,b.ensureNotNull)(this._container),r=(0,b.ensureNotNull)(this._pointer),l=i.getBoundingClientRect(),a=r.offsetWidth;let s=e.clientX-a/2-l.left;return(0,Ye.isRtl)()&&(s=l.width-s-a),(0,w.clamp)(s/(l.width-a),0,1)*o+t}_detectPointerMode(e){const{from:t,to:n}=this.props,{pointerDragMode:o}=this.state
;if(0!==o)return o;const i=this._getNewPosition(e),r=Math.abs(t-i),l=Math.abs(n-i),a=r===l?i<t?1:2:r<l?1:2;return this.setState({pointerDragMode:a}),a}_handleChange(e,t){const{from:n,to:o,onChange:i}=this.props;e===n&&t===o||i(e,t)}}var $e=n(930052),qe=n(766586);function Qe(e){const{definition:{id:t,properties:{checked:n,disabled:i,from:r,to:s},title:c,solutionId:u,max:p,min:m},offset:h,disabled:f}=e,[b]=(0,l.useDefinitionProperty)({property:n,defaultValue:!0}),[g]=(0,l.useDefinitionProperty)({property:i,defaultValue:!1}),E=(0,Q.useWatchedValueReadonly)({watchedValue:m,defaultValue:void 0}),w=(0,Q.useWatchedValueReadonly)({watchedValue:p,defaultValue:void 0}),[C,D]=(0,l.useDefinitionProperty)({property:r}),[S,P]=(0,l.useDefinitionProperty)({property:s}),x=v(C)||v(S),N=y(x?"mixed":C,(function(e){if(D(e),v(M)){const e=w||100;B(e),P(e)}})),[T,k,I]=N,_=y(x?"mixed":S,(function(e){if(P(e),v(T)){const e=E||0;k(e),D(e)}})),[M,B,R]=_,L=v(T)||v(M),A=f||v(b)||!b,F={flushed:!1};return o.createElement(a.CommonSection,{id:t,offset:h,checked:n,title:c,disabled:f||g},o.createElement(U.CellWrap,{className:qe.range},function(){if(!E||!w)return null;return o.createElement($e.MatchMedia,{rule:"screen and (max-width: 460px)"},(e=>o.createElement($,{breakPoint:"Medium"},o.createElement(o.Fragment,null,o.createElement("span",{className:qe.valueInput},o.createElement(V,{className:qe.input,sharedBuffer:N,min:E,max:v(M)?w:M,step:1,disabled:A,name:"from-input",mode:"integer",defaultValue:E}),e?o.createElement("span",{className:qe.rangeSlider},"—"):o.createElement(Xe,{className:d()(qe.rangeSlider,L&&qe.rangeSlider_mixed),from:L?E:T,to:L?w:M,min:E,max:w,onChange:W,onCommit:G,disabled:A}))),o.createElement(o.Fragment,null,o.createElement("span",{className:qe.valueInput},o.createElement(V,{className:qe.input,sharedBuffer:_,min:v(T)?E:T,max:w,step:1,disabled:A,name:"to-input",mode:"integer",defaultValue:w}),u&&!1)))))}()));function W(e,t){k(Math.round(e)),B(Math.round(t))}function G(){F.flushed||(I(),R(),F.flushed=!0)}}var et=n(852830),tt=n(76882),nt=n(754970);function ot(e){const{definitions:t,name:n,offset:i}=e,r=d()(nt.cell,nt.fragmentCell,t.some((e=>void 0!==e.solutionId))&&nt.largeWidth);return o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{className:r,offset:i,placement:"first",verticalAlign:"adaptive",colSpan:2,"data-section-name":n,checkableTitle:!0},t.map((e=>o.createElement("div",{className:nt.item,key:e.id,"data-section-name":e.id},o.createElement(rt,{definition:e}))))))}function it(e){const{definition:t,offset:n}=e;return o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{className:nt.cell,offset:n,placement:"first",verticalAlign:"adaptive",colSpan:2,checkableTitle:!0},o.createElement(rt,{definition:t})))}function rt(e){const{definition:{id:t,properties:{disabled:n,checked:i,color:r,level:a,width:s,style:c},solutionId:p,title:h,widthValues:f,styleValues:b}}=e,[v]=(0,l.useDefinitionProperty)({property:i,defaultValue:!0}),[y]=(0,l.useDefinitionProperty)({property:n,
defaultValue:!1}),g=y||!v;return o.createElement(o.Fragment,null,o.createElement(tt.CheckableTitle,{name:`is-enabled-${t}`,className:d()(h&&nt.withTitle),title:h&&o.createElement("span",{className:nt.title},h),property:i,disabled:y}),a&&o.createElement(S,{className:d()(nt.input,nt.control),property:a,disabled:g}),r&&o.createElement(F,{className:nt.control,disabled:g,color:r,thickness:s,thicknessItems:f}),c&&o.createElement(m,{id:(0,u.createDomId)(t,"leveled-line-style-select"),className:nt.control,property:c,disabled:g,allowedLineStyles:b}),p&&!1)}var lt=n(727394);function at(e){const{definition:{id:t,properties:{option1:n,option2:i,checked:r,disabled:s},title:c,solutionId:d,optionsItems1:p,optionsItems2:m},offset:h}=e,[f]=(0,l.useDefinitionProperty)({property:r,defaultValue:!0}),[b]=(0,l.useDefinitionProperty)({property:s,defaultValue:!1}),v=e.disabled||!f;return o.createElement(a.CommonSection,{id:t,offset:h,checked:r,title:c,solutionId:d,disabled:e.disabled||b},o.createElement($,{className:lt.twoOptions},o.createElement(re,{id:(0,u.createDomId)(t,"two-options-dropdown-1"),"data-name":"two-options-dropdown-1",className:lt.dropdown,menuClassName:lt.menu,property:n,disabled:v,options:p}),o.createElement(re,{id:(0,u.createDomId)(t,"two-options-dropdown-2"),"data-name":"two-options-dropdown-2",className:lt.dropdown,menuClassName:lt.menu,property:i,disabled:v,options:m})))}var st=n(22332);function ct(e){const{definition:{id:t,properties:{color1:n,color2:i,option:r},options:l,color1Visible:s,color2Visible:c,title:p,noAlpha1:m,noAlpha2:h,solutionId:f},offset:b}=e,v=(0,Q.useWatchedValueReadonly)({watchedValue:s,defaultValue:!1}),y=(0,Q.useWatchedValueReadonly)({watchedValue:c,defaultValue:!1}),g=(0,o.useContext)(ye.ControlCustomWidthContext);return o.createElement(a.CommonSection,{id:t,offset:b,solutionId:f,title:p},o.createElement(U.CellWrap,{className:st.optionalTwoColors},o.createElement($,null,o.createElement(re,{id:(0,u.createDomId)(t,"options-dropdown"),"data-name":"options-dropdown",className:d()(st.dropdown,g[t]&&st[g[t]]),menuClassName:d()(st.dropdownMenu,g[t]&&st[g[t]]),property:r,options:l}),o.createElement(o.Fragment,null,v&&E(n,m),y&&E(i,h)))));function E(e,t){return o.createElement("span",{className:st.colorPicker},o.createElement(F,{color:e,noAlpha:t}))}}var dt=n(355217),ut=n(422497);function pt(e){const{source:t,inputs:n,model:i,inputsTabProperty:r,studyMetaInfo:l}=e.definition;return o.createElement(dt.InputsTabContent,{className:ut.withoutPadding,property:r,model:i,study:t,studyMetaInfo:l,inputs:n})}var mt=n(870122),ht=n(499547),ft=n(134640),bt=n(611005);var vt=n(624216),yt=n(163694),gt=n(759339),Et=n(510618),wt=n(493173);function Ct(e){!function(e,t){(0,o.useEffect)((()=>{const n=t||document;return n.addEventListener("scroll",e),()=>n.removeEventListener("scroll",e)}),[e])}(e,document)}var Dt=n(476853),St=n(996038),Vt=n(638446);function Pt(e){const{children:t,highlight:n,disabled:i,reference:r,...l}=e,a=n?"primary":"default";return o.createElement("div",{...l,ref:r,
className:d()(Vt.wrapper,Vt[`intent-${a}`],Vt["border-thin"],Vt["size-medium"],n&&Vt.highlight,n&&Vt.focused,i&&Vt.disabled),"data-role":"button"},o.createElement("div",{className:d()(Vt.childrenContainer,i&&Vt.disabled)},t),n&&o.createElement("span",{className:Vt.shadow}))}var xt=n(764104);const Nt=()=>null,Tt=(0,wt.mergeThemes)(Et.DEFAULT_MENU_THEME,{menuBox:xt.menuBox});function kt(e){const{value:t,disabled:n,onSelect:i}=e,r=(0,o.useRef)(null),{current:l}=(0,o.useRef)(mt.getJSON("RecentlyUsedEmojis",[t])),[a,s]=(0,o.useState)(l),[c,d]=(0,o.useState)(!1),u=(0,o.useCallback)((()=>d(!1)),[]);Ct(u);const p=(0,o.useCallback)((e=>{const t=Array.from(new Set([e,...a])).slice(0,18);mt.setJSON("RecentlyUsedEmojis",t),s(t),i(e),u()}),[a,i]),m=(h=a,(0,o.useMemo)((()=>(bt.emojiGroups[0].emojis=h,[...bt.emojiGroups])),[h]));var h;return o.createElement(o.Fragment,null,o.createElement(Pt,{reference:r,highlight:c,disabled:n,"data-name":"emoji-picker"},o.createElement(ft.EmojiWrap,{emoji:t,onClick:function(){n||d(!0)}})),o.createElement($e.MatchMedia,{rule:St.DialogBreakpoints.TabletSmall},(e=>c&&o.createElement(yt.DrawerManager,null,e?o.createElement(gt.Drawer,{className:xt.drawer,position:"Bottom",onClose:u},o.createElement(ht.EmojiList,{emojis:m,onSelect:p,height:378})):o.createElement(vt.PopupMenu,{theme:Tt,isOpened:!0,position:(0,Dt.getPopupPositioner)(r.current,{horizontalDropDirection:Dt.HorizontalDropDirection.FromLeftToRight,horizontalAttachEdge:Dt.HorizontalAttachEdge.Left}),onClickOutside:u,onClose:Nt},o.createElement(ht.EmojiList,{className:xt.desktopSize,emojis:m,onSelect:p,height:378}))))))}var It=n(835199);function _t(e){const{definition:{id:t,title:n,properties:i,solutionId:r},offset:s}=e,{checked:c,emoji:d,backgroundColor:u}=i,[p]=(0,l.useDefinitionProperty)({property:c,defaultValue:!1}),[m,h]=(0,l.useDefinitionProperty)({property:d,defaultValue:"🙂"}),[f,b]=(0,l.useDefinitionProperty)({property:u,defaultValue:ue.colorsPalette["color-tv-blue-a600"]}),[v]=(0,l.useDefinitionProperty)({property:i.disabled,defaultValue:!1}),y=e.disabled||!p;return o.createElement(a.CommonSection,{id:t,offset:s,checked:c,title:n,solutionId:r,disabled:e.disabled||v},o.createElement(kt,{value:m,disabled:y,onSelect:h}),o.createElement(L.ColorSelect,{className:It.colorSelect,disabled:y,color:function(){if("mixed"===f)return f;return(0,R.rgbToHexString)((0,R.parseRgb)(f))}(),opacity:f&&"mixed"!==f?(0,R.parseRgba)(f)[3]:void 0,onColorChange:function(e){const t=f&&"mixed"!==f?(0,A.alphaToTransparency)((0,R.parseRgba)(f)[3]):0;b((0,A.generateColor)(String(e),t,!0))},onOpacityChange:function(e){b((0,A.generateColor)(f,(0,A.alphaToTransparency)(e),!0))}}))}function Mt(e){const{definition:{id:t,properties:{disabled:n,visible:i},childrenDefinitions:r,title:s},offset:c}=e,[d]=(0,l.useDefinitionProperty)({property:n,defaultValue:!1}),[u]=(0,l.useDefinitionProperty)({property:i,defaultValue:!0}),p=e.disabled;return u?o.createElement(o.Fragment,null,s&&o.createElement(a.CommonSection,{id:t,offset:c,title:s,disabled:e.disabled||d
}),r.map((e=>o.createElement(qt,{key:e.id,disabled:p,definition:e,offset:Boolean(s)})))):null}var Bt=n(525388),Rt=n(942544),Lt=n(930202),At=n(953517),Ft=n(444144),Wt=n(865266),Gt=n(892932),zt=n(379266),Ot=n(381091);function Ht(e){const[t,n]=(0,Wt.useRovingTabindexElement)(null);return o.createElement(zt.PopupMenuItemToggle,{...e,className:Ot.item,checkboxClassName:Ot.checkbox,checkboxReference:t,checkboxTabIndex:n,checkboxDataRole:Gt.PLATFORM_ACCESSIBILITY_ENABLED?"menuitem":void 0,onKeyDown:function(e){if(!Gt.PLATFORM_ACCESSIBILITY_ENABLED)return;const n=(0,Lt.hashFromEvent)(e);13!==n&&32!==n||(e.preventDefault(),t.current instanceof HTMLElement&&t.current.click())},"aria-disabled":Gt.PLATFORM_ACCESSIBILITY_ENABLED&&e.isDisabled||void 0})}var Jt=n(179807),Zt=n(858516);function jt(e){return!e.readonly&&!e.disabled}function Kt(e){const{selectedItems:t,placeholder:n}=e;if(!t.length)return o.createElement("span",null,n);const i=t.map((e=>{var t,n,o;return null!==(n=null!==(t=e.selectedContent)&&void 0!==t?t:e.content)&&void 0!==n?n:null===(o=e.value)||void 0===o?void 0:o.toString()})).reduce(((e,t,n)=>t?(e.push(o.createElement("span",{key:n,className:Zt.contentPart},t)),e.push(o.createElement("span",{key:`separator_${n}`},","," ")),e):e),[]);return i.length&&i.splice(-1),o.createElement("span",{className:Zt.btnContent},i)}function Yt(e,t){const{id:n,items:i,menuClassName:r,menuItemClassName:l,tabIndex:a,disabled:s,highlight:c,intent:d,hideArrowButton:p,placeholder:m,value:h,"aria-labelledby":f,onFocus:b,onBlur:v,onClick:y,onChange:g,onKeyDown:E,openMenuOnEnter:w=!0,"aria-describedby":C,"aria-invalid":D,...S}=e,{listboxId:V,isOpened:P,isFocused:x,buttonTabIndex:N,highlight:T,intent:k,open:I,onOpen:_,close:M,toggle:B,buttonFocusBindings:R,onButtonClick:L,buttonRef:A,listboxRef:F,listboxTabIndex:W,buttonAria:G}=(0,Rt.useControlDisclosure)({id:n,disabled:s,buttonTabIndex:a,intent:d,highlight:c,onFocus:b,onBlur:v,onClick:y}),z=i.filter(jt).filter((e=>h.some((t=>e.value===t)))),O=(0,u.joinDomIds)(f,n),H=O.length>0?O:void 0,J=(0,o.useMemo)((()=>({role:"listbox","aria-labelledby":f})),[f]),Z=(0,At.useKeyboardToggle)(B,P||w),j=(0,At.useKeyboardOpen)(P,I),K=(0,At.useKeyboardEventHandler)([Z,j]),Y=(0,Bt.useMergedRefs)([A,t]);return o.createElement(Ft.ControlDisclosureView,{...S,...G,...R,id:n,role:"button",tabIndex:N,"aria-owns":G["aria-controls"],"aria-haspopup":"listbox","aria-labelledby":H,disabled:s,hideArrowButton:p,isFocused:x,isOpened:P,highlight:T,intent:k,ref:Y,onClick:L,onClose:M,onKeyDown:K,onOpen:_,listboxTabIndex:W,listboxId:V,listboxClassName:r,listboxAria:J,"aria-describedby":C,"aria-invalid":D,listboxReference:F,onListboxKeyDown:function(e){switch((0,Lt.hashFromEvent)(e)){case 27:case 9:return void(P&&(e.preventDefault(),M()))}(0,Jt.handleAccessibleMenuKeyDown)(e)},onListboxFocus:e=>(0,Jt.handleAccessibleMenuFocus)(e,A),buttonChildren:o.createElement(Kt,{selectedItems:null!=z?z:null,placeholder:m})},i.map(((e,t)=>{var i,r,a;if(e.readonly)return o.createElement(o.Fragment,{key:`readonly_item_${t}`},e.content)
;const s=function(e,t){var n;return null!==(n=null==t?void 0:t.id)&&void 0!==n?n:(0,u.createDomId)(e,"item",null==t?void 0:t.value)}(n,e);return o.createElement(Ht,{key:s,id:s,className:l,"aria-selected":h===e.value,isChecked:h.includes(e.value),label:null!==(a=null!==(i=e.content)&&void 0!==i?i:null===(r=e.value)||void 0===r?void 0:r.toString())&&void 0!==a?a:"",onClick:()=>function(e){const t=new Set(h);t.has(e)?t.delete(e):t.add(e);g(Array.from(t))}(e.value),isDisabled:e.disabled})})))}Yt.displayName="Multiselect";const Ut=o.forwardRef(Yt);var Xt=n(585357);function $t(e){const{definition:t}=e,{checkableListOptions:r,definitions:l}=t,[a,s]=(0,o.useState)(p());(0,o.useEffect)((()=>{const e={},t=()=>{const e=p();s(e)};return t(),r.forEach((n=>{var o;n.properties.checked&&(null===(o=n.properties.checked)||void 0===o||o.subscribe(e,t))})),()=>{r.forEach((n=>{var o;n.properties.checked&&(null===(o=n.properties.checked)||void 0===o||o.unsubscribe(e,t))}))}}),[t]);const c=[],d=[],u=[];return l.value().forEach((e=>{(0,i.isPropertyDefinition)(e)&&((0,i.isColorDefinition)(e)?c.push(e):(0,i.isLineDefinition)(e)?d.push(e):(0,i.isOptionsDefinition)(e)&&u.push(e))})),o.createElement(o.Fragment,null,o.createElement(Te.PropertyTable.Row,null,o.createElement(Te.PropertyTable.Cell,{verticalAlign:"topCenter",placement:"first"},t.title),o.createElement(Te.PropertyTable.Cell,{placement:"last"},o.createElement("div",{className:Xt.wrap},o.createElement(Ut,{className:Xt.select,placeholder:W.t(null,void 0,n(745044)),onChange:function(e){const t=new Set(e);r.forEach((e=>{var n,o;!t.has(e.id)||(null===(n=e.properties.checked)||void 0===n?void 0:n.value())?!t.has(e.id)&&(null===(o=e.properties.checked)||void 0===o?void 0:o.value())&&e.properties.checked.setValue(!1):(0,b.ensureDefined)(e.properties.checked).setValue(!0)}))},value:a,matchButtonAndListboxWidths:!0,items:r.map((e=>({id:e.id,content:(0,b.ensureDefined)(e.title),value:e.id})))}),c.length||d.length?o.createElement("div",{className:Xt.colorsWrap},d.map((e=>o.createElement(F,{key:e.id,color:(0,b.ensureDefined)(e.properties.color),thickness:e.properties.width,thicknessItems:e.widthValues}))),c.map((e=>o.createElement(F,{key:e.id,color:e.properties.color})))):null))),u.map((e=>o.createElement(Te.PropertyTable.Row,{key:e.id},o.createElement(Te.PropertyTable.Cell,{placement:"first"}),o.createElement(Te.PropertyTable.Cell,{placement:"last"},o.createElement(re,{className:Xt.select,property:e.properties.option,options:e.options}))))));function p(){return r.filter((e=>{var t;return(0,b.ensureDefined)(null===(t=e.properties)||void 0===t?void 0:t.checked).value()})).map((e=>e.id))}}function qt(e){const{definition:t,offset:n,disabled:l}=e;if(function(e){(0,o.useEffect)((()=>{if(void 0===e)return;const t={...e.properties};return Object.entries(t).forEach((([n,o])=>{void 0!==o&&o.subscribe(t,(()=>Ke.logger.logNormal(`Property "${n}" in definition "${e.id}" was updated to value "${o.value()}"`)))})),()=>{Object.entries(t).forEach((([,e])=>{null==e||e.unsubscribeAll(t)}))}}),[e])}((0,
i.isPropertyDefinitionsGroup)(t)?void 0:t),(0,i.isPropertyDefinitionsGroup)(t))return o.createElement(Qt,{definition:t,offset:n,disabled:l});switch(t.propType){case"line":return o.createElement(te,{...e,definition:t});case"checkable":return o.createElement(s,{...e,definition:t});case"color":return o.createElement(ce,{...e,definition:t});case"transparency":return o.createElement(fe,{...e,definition:t});case"twoColors":return o.createElement(ve,{...e,definition:t});case"optionalTwoColors":return o.createElement(ct,{...e,definition:t});case"fourColors":case"soundSelect":case"image":default:return null;case"number":return o.createElement(Ee,{...e,definition:t});case"symbol":return o.createElement(r.SymbolInputsButton,{...e,definition:t});case"text":return o.createElement(Ae,{...e,definition:t});case"checkableSet":return o.createElement(we,{...e,definition:t});case"set":return o.createElement(Mt,{...e,definition:t});case"options":return o.createElement(je,{...e,definition:t});case"range":return o.createElement(Qe,{...e,definition:t});case"coordinates":case"selectionCoordinates":return o.createElement(Oe,{...e,definition:t});case"twoOptions":return o.createElement(at,{...e,definition:t});case"leveledLine":return o.createElement(it,{...e,definition:t});case"emoji":return o.createElement(_t,{...e,definition:t});case"studyInputs":return o.createElement(pt,{...e,definition:t})}}function Qt(e){const{definition:t}=e,n=(0,Q.useWatchedValueReadonly)({watchedValue:t.definitions});return(0,Q.useWatchedValueReadonly)({watchedValue:t.visible,defaultValue:!0})?(0,i.isCheckableListOptionsDefinition)(t)?o.createElement($t,{definition:t}):o.createElement(o.Fragment,null,t.title&&o.createElement(et.GroupTitleSection,{title:t.title,name:t.id}),n&&function(e){const t=[];return e.reduce(((e,t)=>{if((0,i.isPropertyDefinitionsGroup)(t)||"leveledLine"!==t.propType)e.push(t);else{const n=e[e.length-1];Array.isArray(n)?n.push(t):e.push([t])}return e}),t)}(n).map((n=>Array.isArray(n)?o.createElement(ot,{key:n[0].id,name:t.id,definitions:n}):o.createElement(qt,{key:n.id,...e,definition:n}))),"general"===t.groupType&&o.createElement(Te.PropertyTable.GroupSeparator,{size:1})):null}},299120:(e,t,n)=>{"use strict";n.d(t,{ControlDisclosure:()=>d});var o=n(50959),i=n(525388),r=n(953517),l=n(444144),a=n(942544),s=n(180185),c=n(366986);const d=o.forwardRef(((e,t)=>{const{id:n,tabIndex:d,disabled:u,highlight:p,intent:m,children:h,onClick:f,onFocus:b,onBlur:v,listboxAria:y,onListboxKeyDown:g,...E}=e,w=(0,o.useRef)({"aria-labelledby":n}),{listboxId:C,isOpened:D,isFocused:S,buttonTabIndex:V,listboxTabIndex:P,highlight:x,intent:N,onOpen:T,close:k,toggle:I,buttonFocusBindings:_,onButtonClick:M,buttonRef:B,listboxRef:R,buttonAria:L}=(0,a.useControlDisclosure)({id:n,disabled:u,buttonTabIndex:d,intent:m,highlight:p,onFocus:b,onBlur:v,onClick:f}),A=(0,r.useKeyboardToggle)(I),F=(0,r.useKeyboardClose)(D,k),W=(0,r.useKeyboardEventHandler)([A,F]);return o.createElement(l.ControlDisclosureView,{...E,..._,...L,id:n,role:"button",tabIndex:V,disabled:u,isOpened:D,
isFocused:S,ref:(0,i.useMergedRefs)([B,t]),highlight:x,intent:N,onClose:k,onOpen:T,onClick:M,onKeyDown:W,listboxId:C,listboxTabIndex:P,listboxReference:R,listboxAria:null!=y?y:w.current,onListboxKeyDown:function(e){if(27===(0,s.hashFromEvent)(e))return e.preventDefault(),void k();null==g||g(e)}},h,o.createElement("span",{className:c.invisibleFocusHandler,tabIndex:0,"aria-hidden":!0,onFocus:()=>k()}))}));d.displayName="ControlDisclosure"},379266:(e,t,n)=>{"use strict";n.d(t,{PopupMenuItemToggle:()=>s});var o=n(50959),i=n(497754),r=n(192063),l=n(302946),a=n(354583);function s(e){const{isDisabled:t,hint:n,label:s,isChecked:c,checkboxClassName:d,labelClassName:u,indeterminate:p,isActive:m,checkboxTabIndex:h,checkboxReference:f,checkboxDataRole:b,...v}=e;return o.createElement(r.PopupMenuItem,{...v,isDisabled:t,shortcut:n,dontClosePopup:!0,labelRowClassName:u,label:o.createElement(l.Checkbox,{reference:f,disabled:t,label:s,checked:c,indeterminate:p,className:i(a.checkbox,d),tabIndex:h,"data-role":b})})}},72621:(e,t,n)=>{"use strict";n.d(t,{RemoveButton:()=>c});var o=n(609838),i=n(50959),r=n(497754),l=n(72571),a=n(333765),s=n(927306);function c(e){const{className:t,isActive:c,onClick:d,onMouseDown:u,title:p,hidden:m,"data-name":h="remove-button",...f}=e;return i.createElement(l.Icon,{...f,"data-name":h,className:r(s.button,"apply-common-tooltip",c&&s.active,m&&s.hidden,t),icon:a,onClick:d,onMouseDown:u,title:p||o.t(null,void 0,n(734596))})}},381091:e=>{e.exports={checkbox:"checkbox-hcyAOCXc",item:"item-hcyAOCXc"}},476853:(e,t,n)=>{"use strict";n.d(t,{HorizontalAttachEdge:()=>i,HorizontalDropDirection:()=>l,VerticalAttachEdge:()=>o,VerticalDropDirection:()=>r,getPopupPositioner:()=>c});var o,i,r,l,a=n(650151);!function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom",e[e.AutoStrict=2]="AutoStrict"}(o||(o={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(i||(i={})),function(e){e[e.FromTopToBottom=0]="FromTopToBottom",e[e.FromBottomToTop=1]="FromBottomToTop"}(r||(r={})),function(e){e[e.FromLeftToRight=0]="FromLeftToRight",e[e.FromRightToLeft=1]="FromRightToLeft"}(l||(l={}));const s={verticalAttachEdge:o.Bottom,horizontalAttachEdge:i.Left,verticalDropDirection:r.FromTopToBottom,horizontalDropDirection:l.FromLeftToRight,verticalMargin:0,horizontalMargin:0,matchButtonAndListboxWidths:!1};function c(e,t){return n=>{var c,d;const{contentWidth:u,contentHeight:p,availableHeight:m}=n,h=(0,a.ensureNotNull)(e).getBoundingClientRect(),{horizontalAttachEdge:f=s.horizontalAttachEdge,horizontalDropDirection:b=s.horizontalDropDirection,horizontalMargin:v=s.horizontalMargin,verticalMargin:y=s.verticalMargin,matchButtonAndListboxWidths:g=s.matchButtonAndListboxWidths}=t;let E=null!==(c=t.verticalAttachEdge)&&void 0!==c?c:s.verticalAttachEdge,w=null!==(d=t.verticalDropDirection)&&void 0!==d?d:s.verticalDropDirection;E===o.AutoStrict&&(m<h.y+h.height+y+p?(E=o.Top,w=r.FromBottomToTop):(E=o.Bottom,w=r.FromTopToBottom));const C=E===o.Top?-1*y:y,D=f===i.Right?h.right:h.left,S=E===o.Top?h.top:h.bottom,V={x:D-(b===l.FromRightToLeft?u:0)+v,
y:S-(w===r.FromBottomToTop?p:0)+C};return g&&(V.overrideWidth=h.width),V}}},444474:(e,t,n)=>{"use strict";n.d(t,{convertToDefinitionProperty:()=>r,makeProxyDefinitionProperty:()=>i});var o=n(32133);function i(e,t,n){const o=new Map,i=void 0!==t?t[0]:e=>e,r=void 0!==t?void 0!==t[1]?t[1]:t[0]:e=>e,l={value:()=>i(e.value()),setValue:t=>{e.setValue(r(t))},subscribe:(t,n)=>{const i=e=>{n(l)};o.set(n,i),e.subscribe(t,i)},unsubscribe:(t,n)=>{const i=o.get(n);i&&(e.unsubscribe(t,i),o.delete(n))},unsubscribeAll:t=>{e.unsubscribeAll(t),o.clear()},destroy:()=>{e.release(),null==n||n()}};return l}function r(e,t,n,r,l,a,s){const c=i(t.weakReference(),r,a),d=void 0!==r?void 0!==r[1]?r[1]:r[0]:e=>e,u=null!=l?l:o=>e.setProperty(t,d(o),n);return c.setValue=e=>{var t;s&&(0,o.trackEvent)(s.category,s.event,null===(t=s.label)||void 0===t?void 0:t.call(s,e)),u(e)},c}},52167:(e,t,n)=>{"use strict";n.d(t,{createLinePropertyDefinition:()=>s});var o=n(243939),i=n(549696);const r=[i.LINESTYLE_SOLID,i.LINESTYLE_DOTTED,i.LINESTYLE_DASHED],l=[1,2,3,4],a=[o.LineEnd.Normal,o.LineEnd.Arrow];function s(e,t){const n={propType:"line",properties:e,...t};return void 0!==n.properties.style&&(n.styleValues=r),void 0!==n.properties.width&&(n.widthValues=l),void 0===n.properties.leftEnd&&void 0===n.properties.rightEnd||void 0!==n.endsValues||(n.endsValues=a),void 0!==n.properties.value&&void 0===n.valueType&&(n.valueType=1),n}},308954:(e,t,n)=>{"use strict";function o(e,t){return{propType:"checkable",properties:e,...t}}function i(e,t,n){return{propType:"checkableSet",properties:e,childrenDefinitions:n,...t}}function r(e,t){return{propType:"color",properties:e,noAlpha:!1,...t}}n.d(t,{convertFromReadonlyWVToDefinitionProperty:()=>W,convertFromWVToDefinitionProperty:()=>F,convertToDefinitionProperty:()=>L.convertToDefinitionProperty,createCheckablePropertyDefinition:()=>o,createCheckableSetPropertyDefinition:()=>i,createColorPropertyDefinition:()=>r,createCoordinatesPropertyDefinition:()=>V,createEmojiPropertyDefinition:()=>I,createLeveledLinePropertyDefinition:()=>d,createLinePropertyDefinition:()=>l.createLinePropertyDefinition,createNumberPropertyDefinition:()=>u,createOptionalTwoColorsPropertyDefinition:()=>S,createOptionsPropertyDefinition:()=>p,createPropertyDefinitionsGeneralGroup:()=>B,createPropertyDefinitionsLeveledLinesGroup:()=>R,createRangePropertyDefinition:()=>x,createSelectionCoordinatesPropertyDefinition:()=>P,createSessionPropertyDefinition:()=>k,createStudyInputsPropertyDefinition:()=>_,createSymbolPropertyDefinition:()=>T,createTextPropertyDefinition:()=>C,createTransparencyPropertyDefinition:()=>N,createTwoColorsPropertyDefinition:()=>D,createTwoOptionsPropertyDefinition:()=>m,destroyDefinitions:()=>te,getColorDefinitionProperty:()=>K,getLockPriceScaleDefinitionProperty:()=>z,getPriceScaleSelectionStrategyDefinitionProperty:()=>G,getScaleRatioDefinitionProperty:()=>O,getSymbolDefinitionProperty:()=>Y,isCheckableListOptionsDefinition:()=>ee,isColorDefinition:()=>q,isLineDefinition:()=>$,isOptionsDefinition:()=>Q,isPropertyDefinition:()=>U,
isPropertyDefinitionsGroup:()=>X,makeProxyDefinitionProperty:()=>L.makeProxyDefinitionProperty});var l=n(52167),a=n(549696);const s=[a.LINESTYLE_SOLID,a.LINESTYLE_DOTTED,a.LINESTYLE_DASHED],c=[1,2,3,4];function d(e,t){const n={propType:"leveledLine",properties:e,...t};return void 0!==n.properties.style&&(n.styleValues=s),void 0!==n.properties.width&&(n.widthValues=c),n}function u(e,t){return{propType:"number",properties:e,type:1,...t}}function p(e,t){return{propType:"options",properties:e,...t}}function m(e,t){return{propType:"twoOptions",properties:e,...t}}var h=n(609838);const f=[{id:"bottom",value:"bottom",title:h.t(null,void 0,n(865994))},{id:"middle",value:"middle",title:h.t(null,void 0,n(876476))},{id:"top",value:"top",title:h.t(null,void 0,n(691757))}],b=[{id:"left",value:"left",title:h.t(null,void 0,n(619286))},{id:"center",value:"center",title:h.t(null,void 0,n(72171))},{id:"right",value:"right",title:h.t(null,void 0,n(221141))}],v=[{id:"horizontal",value:"horizontal",title:h.t(null,void 0,n(577405))},{id:"vertical",value:"vertical",title:h.t(null,void 0,n(944085))}],y=[10,11,12,14,16,20,24,28,32,40].map((e=>({title:String(e),value:e}))),g=[1,2,3,4],E=h.t(null,void 0,n(792960)),w=h.t(null,void 0,n(390581));function C(e,t){const n={propType:"text",properties:e,...t,isEditable:t.isEditable||!1};return void 0!==n.properties.size&&void 0===n.sizeItems&&(n.sizeItems=y),void 0!==n.properties.alignmentVertical&&void 0===n.alignmentVerticalItems&&(n.alignmentVerticalItems=f),void 0!==n.properties.alignmentHorizontal&&void 0===n.alignmentHorizontalItems&&(n.alignmentHorizontalItems=b),(n.alignmentVerticalItems||n.alignmentHorizontalItems)&&void 0===n.alignmentTitle&&(n.alignmentTitle=E),void 0!==n.properties.orientation&&(void 0===n.orientationItems&&(n.orientationItems=v),void 0===n.orientationTitle&&(n.orientationTitle=w)),void 0!==n.properties.borderWidth&&void 0===n.borderWidthItems&&(n.borderWidthItems=g),n}function D(e,t){return{propType:"twoColors",properties:e,noAlpha1:!1,noAlpha2:!1,...t}}function S(e,t){return{propType:"optionalTwoColors",properties:e,noAlpha1:!1,noAlpha2:!1,...t}}function V(e,t){return{propType:"coordinates",properties:e,...t}}function P(e,t){return{propType:"selectionCoordinates",properties:e,...t}}function x(e,t){return{propType:"range",properties:e,...t}}function N(e,t){return{propType:"transparency",properties:e,...t}}function T(e,t){return{propType:"symbol",properties:e,...t}}function k(e,t){return{propType:"session",properties:e,...t}}function I(e,t){return{propType:"emoji",properties:e,...t}}function _(e,t){return{propType:"studyInputs",properties:e,...t}}var M=n(650802);function B(e,t,n,o){return{id:t,title:n,visible:o,groupType:"general",definitions:new M.WatchedValue(e)}}function R(e,t,n){return{id:t,title:n,groupType:"leveledLines",definitions:new M.WatchedValue(e)}}var L=n(444474);function A(e,t,n){const o=new Map,i=void 0!==t?t[0]:e=>e,r=void 0!==t?void 0!==t[1]?t[1]:t[0]:e=>e,l={value:()=>i(e.value()),setValue:t=>{var n;null===(n=e.setValue)||void 0===n||n.call(e,r(t))},
subscribe:(t,n)=>{const i=()=>{n(l)};let r=o.get(t);void 0===r?(r=new Map,r.set(n,i),o.set(t,r)):r.set(n,i),e.subscribe(i)},unsubscribe:(t,n)=>{const i=o.get(t);if(void 0!==i){const t=i.get(n);void 0!==t&&(e.unsubscribe(t),i.delete(n))}},unsubscribeAll:t=>{const n=o.get(t);void 0!==n&&(n.forEach(((t,n)=>{e.unsubscribe(t)})),n.clear())}};return n&&(l.destroy=()=>n()),l}function F(e,t,n,o){const i=A(t,o),r=void 0!==o?void 0!==o[1]?o[1]:o[0]:e=>e;return i.setValue=o=>e.setWatchedValue(t,r(o),n),i}function W(e,t){return function(e,t,n,o){const i=new Map;return A({subscribe:(n,o)=>{const r=e=>n(t(e));i.set(n,r),e.subscribe(r,o)},unsubscribe:t=>{if(t){const n=i.get(t);n&&(e.unsubscribe(n),i.delete(t))}else i.clear(),e.unsubscribe()},value:()=>t(e.value())},n,o)}(e,(e=>e),t,(()=>e.release()))}function G(e,t){const n=(0,L.makeProxyDefinitionProperty)(t.weakReference());return n.setValue=t=>e.setPriceScaleSelectionStrategy(t),n}function z(e,t,n,o){const i=(0,L.makeProxyDefinitionProperty)(t.weakReference());return i.setValue=t=>{const i={lockScale:t};e.setPriceScaleMode(i,n,o)},i}function O(e,t,n,o){const i=(0,L.makeProxyDefinitionProperty)(t.weakReference(),o);return i.setValue=o=>{e.setScaleRatioProperty(t,o,n)},i}var H=n(724377),J=n(32240),Z=n(648067);function j(e,t){if((0,J.isHexColor)(e)){const n=(0,H.parseRgb)(e);return(0,H.rgbaToString)((0,H.rgba)(n,(100-t)/100))}return e}function K(e,t,n,o,i){let r;if(null!==n){const e=(0,Z.combineProperty)(j,t.weakReference(),n.weakReference());r=(0,L.makeProxyDefinitionProperty)(e.ownership())}else r=(0,L.makeProxyDefinitionProperty)(t.weakReference(),[()=>j(t.value(),0),e=>e]);return r.setValue=n=>{i&&e.beginUndoMacro(o),e.setProperty(t,n,o),i&&e.endUndoMacro()},r}function Y(e,t,n,o,i,r){const l=[(a=n,s=t,e=>{const t=a(s);if(e===s.value()&&null!==t){const e=t.ticker||t.full_name;if(e)return e}return e}),e=>e];var a,s;const c=(0,L.convertToDefinitionProperty)(e,t,i,l);r&&(c.setValue=r);const d=new Map;c.subscribe=(e,n)=>{const o=e=>{n(c)};d.set(n,o),t.subscribe(e,o)},c.unsubscribe=(e,n)=>{const o=d.get(n);o&&(t.unsubscribe(e,o),d.delete(n))};const u={};return o.subscribe(u,(()=>{d.forEach(((e,t)=>{t(c)}))})),c.destroy=()=>{o.unsubscribeAll(u),d.clear()},c}function U(e){return e.hasOwnProperty("propType")}function X(e){return e.hasOwnProperty("groupType")}function $(e){return"line"===e.propType}function q(e){return"color"===e.propType}function Q(e){return"options"===e.propType}function ee(e){return"checkableListOptions"===e.groupType}function te(e){e.forEach((e=>{var t;if(U(e)){Object.keys(e.properties).forEach((t=>{const n=e.properties[t];void 0!==n&&void 0!==n.destroy&&n.destroy()}))}else te(e.definitions.value()),null===(t=e.visible)||void 0===t||t.destroy()}))}},844996:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path fill="currentColor" fillRule="evenodd" clipRule="evenodd" d="M7.5 13a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM5 14.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0zm9.5-1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM12 14.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0zm9.5-1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM19 14.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0z"/></svg>'},333765:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18"><path fill="currentColor" d="M9.707 9l4.647-4.646-.707-.708L9 8.293 4.354 3.646l-.708.708L8.293 9l-4.647 4.646.708.708L9 9.707l4.646 4.647.708-.707L9.707 9z"/></svg>'},123851: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>'},357740:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="currentColor"><circle cx="9" cy="14" r="1"/><circle cx="4" cy="14" r="1"/><circle cx="14" cy="14" r="1"/><circle cx="19" cy="14" r="1"/><circle cx="24" cy="14" r="1"/></svg>'},780427:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M5.5 7a.5.5 0 0 0 0 1h17a.5.5 0 0 0 0-1h-17Zm0 6a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3Zm7 0a.5.5 0 0 0 0 1h3a.5.5 0 0 0 0-1h-3Zm6.5.5c0-.28.22-.5.5-.5h3a.5.5 0 0 1 0 1h-3a.5.5 0 0 1-.5-.5ZM7 20a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm4 0a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2Zm5-1a1 1 0 1 1-2 0 1 1 0 0 1 2 0Zm3 1a1 1 0 1 0 0-2 1 1 0 0 0 0 2Z"/></svg>'},200501:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path stroke="currentColor" d="M4 13.5h20"/></svg>'},666242:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M4.5 13.5H24m-19.5 0L8 17m-3.5-3.5L8 10"/></svg>'},443382:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M8.5 13.5a2 2 0 1 1-4 0 2 2 0 0 1 4 0zm0 0H24"/></svg>'},8295:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M14 21h-3a1 1 0 0 1-1-1V8a1 1 0 0 1 1-1h3c2 0 4 1 4 3 0 1 0 2-1.5 3 1.5.5 2.5 2 2.5 4 0 2.75-2.638 4-5 4zM12 9l.004 3c.39.026.82 0 1.25 0C14.908 12 16 11.743 16 10.5c0-1.1-.996-1.5-2.5-1.5-.397 0-.927-.033-1.5 0zm0 5v5h1.5c1.5 0 3.5-.5 3.5-2.5S15 14 13.5 14c-.5 0-.895-.02-1.5 0z"/></svg>'},429285:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M12.143 20l1.714-12H12V7h5v1h-2.143l-1.714 12H15v1h-5v-1h2.143z"/></svg>'}}]);