feat: add local tradingview

This commit is contained in:
2026-01-14 21:55:53 +07:00
parent 580a7d3165
commit a8d3810657
1953 changed files with 7155 additions and 17 deletions

View File

@@ -0,0 +1,25 @@
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[3489],{10555: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"}},61425:e=>{e.exports={defaultSelect:"defaultSelect-OM7V5ndi"}},14272:e=>{e.exports={itemWrap:"itemWrap-srH7jxJB",item:"item-srH7jxJB",icon:"icon-srH7jxJB",selected:"selected-srH7jxJB",label:"label-srH7jxJB"}},54159:e=>{e.exports={lineEndSelect:"lineEndSelect-gw7ESiZg",right:"right-gw7ESiZg"}},69552:e=>{e.exports={lineStyleSelect:"lineStyleSelect-GcXENVb4",multipleStyles:"multipleStyles-GcXENVb4"}},27391:e=>{e.exports={lineWidthSelect:"lineWidthSelect-EUDB1YgB",bar:"bar-EUDB1YgB",isActive:"isActive-EUDB1YgB",item:"item-EUDB1YgB"}},46558:e=>{e.exports={container:"container-dhpv13DH",active:"active-dhpv13DH",disabled:"disabled-dhpv13DH",icon:"icon-dhpv13DH"}},50219:e=>{e.exports={wrap:"wrap-b6_0ORMg",disabled:"disabled-b6_0ORMg"}},97546:e=>{e.exports={dropdown:"dropdown-gZlS9p6t",dropdownMenu:"dropdownMenu-gZlS9p6t",gradientColor:"gradientColor-gZlS9p6t",lineWidthSelect:"lineWidthSelect-gZlS9p6t"}},84001:e=>{e.exports={row:"row-nGXZ4vJz",empty:"empty-nGXZ4vJz",noMargins:"noMargins-nGXZ4vJz",wrap:"wrap-nGXZ4vJz",breakpointNormal:"breakpointNormal-nGXZ4vJz",breakpointMedium:"breakpointMedium-nGXZ4vJz",breakpointSmall:"breakpointSmall-nGXZ4vJz"}},46741: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"}},79965:e=>{e.exports={wrapper:"wrapper-NVcHMTVy",checkbox:"checkbox-NVcHMTVy",colorSelect:"colorSelect-NVcHMTVy",hintButton:"hintButton-NVcHMTVy"}},97995:e=>{e.exports={withoutPadding:"withoutPadding-KtEcG0Q0"}},80509: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",hidden:"hidden-mIsHGNhw"}},37458:e=>{e.exports={line:"line-j5rMaiWF",control:"control-j5rMaiWF",
valueInput:"valueInput-j5rMaiWF",valueUnit:"valueUnit-j5rMaiWF",input:"input-j5rMaiWF"}},6289:e=>{e.exports={unit:"unit-ZtRdVxiD",input:"input-ZtRdVxiD",normal:"normal-ZtRdVxiD",big:"big-ZtRdVxiD",dropdown:"dropdown-ZtRdVxiD",dropdownMenu:"dropdownMenu-ZtRdVxiD"}},69982:e=>{e.exports={optionalTwoColors:"optionalTwoColors-LDRcAXEV",colorPicker:"colorPicker-LDRcAXEV",dropdown:"dropdown-LDRcAXEV",dropdownMenu:"dropdownMenu-LDRcAXEV"}},11131:e=>{e.exports={dropdown:"dropdown-RxdEkbF0",normal:"normal-RxdEkbF0",big:"big-RxdEkbF0",dropdownMenu:"dropdownMenu-RxdEkbF0"}},35498:e=>{e.exports={range:"range-GLEBGed4",valueInput:"valueInput-GLEBGed4",rangeSlider:"rangeSlider-GLEBGed4",rangeSlider_mixed:"rangeSlider_mixed-GLEBGed4",input:"input-GLEBGed4",hintButton:"hintButton-GLEBGed4"}},74782:e=>{e.exports={select:"select-hJtsYZ3G",preContent:"preContent-hJtsYZ3G",wrap:"wrap-hJtsYZ3G",colorsWrap:"colorsWrap-hJtsYZ3G"}},63907:e=>{e.exports={colorPicker:"colorPicker-VK3h8amb",fontStyleButton:"fontStyleButton-VK3h8amb",dropdown:"dropdown-VK3h8amb",dropdownMenu:"dropdownMenu-VK3h8amb",hintButton:"hintButton-VK3h8amb",title:"title-VK3h8amb"}},95442:e=>{e.exports={twoColors:"twoColors-C2hZXnYv",colorPicker:"colorPicker-C2hZXnYv"}},26302:e=>{e.exports={dropdown:"dropdown-eLkGg0Ft",menu:"menu-eLkGg0Ft"}},27061:e=>{e.exports={buttonWrap:"buttonWrap-icygBqe7",desktopSize:"desktopSize-icygBqe7",drawer:"drawer-icygBqe7",menuBox:"menuBox-icygBqe7"}},1774:e=>{e.exports={btnContent:"btnContent-ivexqeZZ",contentPart:"contentPart-ivexqeZZ"}},40638:e=>{e.exports={checkbox:"checkbox-aOSYFxuH"}},73188: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"}},35990:e=>{e.exports={button:"button-iLKiGOdQ",hovered:"hovered-iLKiGOdQ",disabled:"disabled-iLKiGOdQ",focused:"focused-iLKiGOdQ",active:"active-iLKiGOdQ",hidden:"hidden-iLKiGOdQ"}},66045:(e,t,n)=>{"use strict";n.d(t,{FontSizeSelect:()=>c});var o=n(50959),i=n(97754),r=n.n(i),a=n(90405),l=n(90186),s=n(61425);function c(e){const{id:t,fontSize:n,fontSizes:i=[],className:c,disabled:d,fontSizeChange:u}=e;return o.createElement(a.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,l.filterDataProps)(e)});var p}},94697:(e,t,n)=>{"use strict";n.d(t,{DisplayItem:()=>d,DropItem:()=>u,IconDropdown:()=>c});var o=n(50959),i=n(97754),r=n.n(i),a=n(90405),l=n(9745),s=n(14272);function c(e){const{menuItemClassName:t,...n}=e;return o.createElement(a.Select,{...n,menuItemClassName:r()(t,s.itemWrap)})}function d(e){return o.createElement("div",{className:r()(s.item,s.selected,e.className)},o.createElement(l.Icon,{className:s.icon,icon:e.icon}))}function u(e){return o.createElement("div",{className:s.item},o.createElement(l.Icon,{
className:r()(s.icon,e.iconClassName),icon:e.icon}),o.createElement("div",{className:s.label},e.label))}},53598:(e,t,n)=>{"use strict";n.d(t,{LineStyleSelect:()=>d});var o=n(50959),i=n(97754),r=n.n(i),a=n(94697),l=n(6245),s=n(80427),c=n(69552);class d extends o.PureComponent{render(){const{id:e,lineStyle:t,className:n,lineStyleChange:i,disabled:d,additionalItems:u,allowedLineStyles:p}=this.props;let m=function(e){let t=[...l.lineStyleItemValues];return void 0!==e&&(t=t.filter((t=>e.includes(t.type)))),t.map((e=>({value:e.type,selectedContent:o.createElement(a.DisplayItem,{icon:e.icon}),content:o.createElement(a.DropItem,{icon:e.icon,label:e.label})})))}(p);return u&&(m=[{readonly:!0,content:u},...m]),o.createElement(a.IconDropdown,{id:e,disabled:d,className:r()(c.lineStyleSelect,n),hideArrowButton:!0,items:m,value:t,onChange:i,"data-name":"line-style-select",addPlaceholderToItems:!1,placeholder:o.createElement(a.DisplayItem,{icon:s,className:c.multipleStyles})})}}},88601:(e,t,n)=>{"use strict";n.d(t,{Transparency:()=>s});var o=n(50959),i=n(97754),r=n(54368),a=n(19625),l=n(50219);function s(e){const{value:t,disabled:n,onChange:s,className:c}=e;return o.createElement("div",{className:i(l.wrap,c,{[l.disabled]:n})},o.createElement(r.Opacity,{hideInput:!0,color:a.colorsPalette["color-tv-blue-500"],opacity:1-t/100,onChange:function(e){n||s(100-100*e)},disabled:n}))}},74670:(e,t,n)=>{"use strict";n.d(t,{useActiveDescendant:()=>r});var o=n(50959),i=n(39416);function r(e,t=[]){const[n,r]=(0,o.useState)(!1),a=(0,i.useFunctionalRefObject)(e);return(0,o.useLayoutEffect)((()=>{const e=a.current;if(null===e)return;const t=e=>{switch(e.type){case"active-descendant-focus":r(!0);break;case"active-descendant-blur":r(!1)}};return e.addEventListener("active-descendant-focus",t),e.addEventListener("active-descendant-blur",t),()=>{e.removeEventListener("active-descendant-focus",t),e.removeEventListener("active-descendant-blur",t)}}),t),[a,n]}},50890:(e,t,n)=>{"use strict";n.d(t,{LineWidthSelect:()=>d});var o=n(50959),i=n(97754),r=n(90405),a=n(27391);const l=[1,2,3,4];function s(e){const{id:t,value:n,items:s=l,disabled:c,onChange:d,className:u}=e;return o.createElement(r.Select,{id:t,disabled:c,hideArrowButton:!0,className:i(a.lineWidthSelect,u),items:(p=s,p.map((e=>({value:e,selectedContent:m(e,!0),content:m(e)})))),value:n,onChange:d,"data-name":"line-width-select"});var p;function m(e,t){const r={borderTopWidth:e};return o.createElement("div",{className:a.item},o.createElement("div",{className:i(a.bar,{[a.isActive]:e===n&&!t}),style:r}," "))}}var c=n(45560);function d(e){const{property:t}=e,[n,i]=(0,c.useDefinitionProperty)({property:t});return o.createElement(s,{...e,value:n,onChange:i})}},66849:(e,t,n)=>{"use strict";n.d(t,{ControlCustomHeightContext:()=>l,ControlCustomWidthContext:()=>r});var o,i=n(50959);!function(e){e.Small="small",e.Normal="normal",e.Big="big"}(o||(o={}));const r=i.createContext({});var a;!function(e){e.Normal="normal",e.Big="big"}(a||(a={}));const l=i.createContext({})},68215:(e,t,n)=>{"use strict";n.d(t,{
Section:()=>Ot});var o=n(50959),i=n(32097),r=n(48897),a=n(45560),l=n(31356);function s(e){const{definition:{id:t,properties:{checked:n,disabled:i,visible:r},title:s,solutionId:c,infoTooltip:d},offset:u}=e,[p]=(0,a.useDefinitionProperty)({property:i,defaultValue:!1}),[m]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0});return m?o.createElement(l.CommonSection,{id:t,offset:u,checked:n,title:s,solutionId:c,infoTooltip:d,disabled:e.disabled||p}):null}var c=n(97754),d=n.n(c),u=n(22064),p=n(53598);function m(e){const{property:t}=e,[n,i]=(0,a.useDefinitionProperty)({property:t});return o.createElement(p.LineStyleSelect,{...e,lineStyle:n,lineStyleChange:i})}var f=n(50890),h=n(60521),b=n(50151);function v(e){return"mixed"===e}function y(e,t,n){const[i,r]=(0,o.useState)(e),a=(0,o.useRef)(i);return(0,o.useEffect)((()=>{r(e)}),[e,n]),[i,function(e){a.current=e,r(e)},function(){t(a.current)},function(){a.current=e,r(e)}]}var g,E=n(68335),w=n(92399),C=n(9859),D=n(59623),S=n(49483);function V(e){const{property:t,...n}=e,[i,r]=(0,o.useState)(performance.now()),[l,s]=(0,a.useDefinitionProperty)({property:t,handler:()=>r(performance.now())}),c=y(l,s,i);return o.createElement(P,{...n,valueHash:i,sharedBuffer:c})}function P(e){const{sharedBuffer:t,min:n,max:i,step:r,...a}=e,[l,s,c,d]=t,u=(0,o.useRef)(null),p=(0,o.useRef)(null),m={flushed:!1};return o.createElement(k,{...a,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,E.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:l,roundByStep:!1,containerReference:function(e){u.current=e},inputMode:S.CheckMobile.iOS()?void 0:"numeric",min:n,max:i,step:r,stretch:!1})}!function(e){e.Input="input",e.Step="step"}(g||(g={}));const N={mode:"float",min:-Number.MAX_VALUE,max:Number.MAX_VALUE,step:1,precision:0,inheritPrecisionFromStep:!0};class k 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:M(this.props,this.props.value,_(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 x.test(t)?t:e;case"float":return t=t.replace(/,/g,"."),T.test(t)?t:e;case"fractional":return I.test(t)?t:e}}(this.state.displayValue,n,this.props.mode),i=L(o),r=this._checkValueBoundaries(i);var a,l;this.setState({displayValue:o}),o!==n&&(a=this.state.displayValue,l=(l=o).replace(/,/g,"."),(a=a.replace(/,/g,".")).includes(".")||!l.includes("."))?(this._restoreSelection=!0,this.forceUpdate()):this._saveSelection(t),r.value&&M(this.props,i)===o&&this.props.onValueChange(i,"input")},this._onValueByStepChange=e=>{const{roundByStep:t=!0,step:n=1}=this.props,o=L(this.state.displayValue);let i;if(isNaN(o)){const{defaultValue:e}=this.props;if(void 0===e)return;i=e}else{const r=new h.Big(o),a=new h.Big(n),l=r.mod(a);let s=r.plus(e*n);!l.eq(0)&&t&&(s=s.plus((e>0?0:1)*n).minus(l)),i=s.toNumber()}this._checkValueBoundaries(i).value&&(this.setState({displayValue:M(this.props,i,_(this.props))}),this.props.onValueChange(i,"step"))},this.state={value:R(this.props.value),displayValue:M(this.props,this.props.value,_(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(w.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=L(this.state.displayValue);return isNaN(n)?null:(0,C.clamp)(n,e,t)}static getDerivedStateFromProps(e,t){const{valueHash:n}=e,o=R(e.value);if(t.value!==o||t.valueHash!==n){return{value:o,valueHash:n,displayValue:M(e,o,t.focused&&t.valueHash===n?void 0:_(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,C.clamp)(e,t,n)}}(e,t,n);return{value:o.pass}}}k.defaultProps=N;const x=/^-?[0-9]*$/,T=/^(-?([0-9]+\.?[0-9]*)|(-?[0-9]*))$/,I=/^(-?([0-9]+'?[0-9]*([0-9]+'?)[0-9]*)|(-?[0-9]*))$/
;function M(e,t,n){return v(t=R(t))?"—":(null!==t&&void 0!==n&&(n=Math.max(B(t),n)),function(e,t){if(null===e)return"";return new D.NumericFormatter({precision:t}).format(e,{ignoreLocaleNumberFormat:!0})}(t,n))}function _(e){let t=0;return e.inheritPrecisionFromStep&&e.step<=1&&(t=B(e.step)),Math.max(e.precision,t)||void 0}function B(e){const t=Math.trunc(e).toString();return(0,C.clamp)(D.NumericFormatter.formatNoE(e).length-t.length-1,0,15)}function L(e,t){const n=new D.NumericFormatter({precision:t}).parse(e,{ignoreLocaleNumberFormat:!0});return n.res?n.value:NaN}function R(e){return"number"==typeof e&&Number.isFinite(e)||v(e)?e:null}var A=n(24377),F=n(26540),W=n(19063),z=n(6245);function G(e){const{color:t,thickness:n,thicknessItems:i,noAlpha:r,lineStyle:l,allowedLineStyles:s}=e,[c,d]=(0,a.useDefinitionProperty)({property:t}),[u,p]=(0,a.useDefinitionProperty)(n?{property:n}:{defaultValue:void 0}),[m,f]=(0,a.useDefinitionProperty)(l?{property:l}:{defaultValue:void 0}),h=(0,o.useMemo)((()=>s?z.defaultLineStyleItems.filter((e=>s.includes(e))):z.defaultLineStyleItems),[s]);return o.createElement(F.ColorSelect,{...e,color:function(){if(!c)return null;if("mixed"===c)return"mixed";return(0,A.rgbToHexString)((0,A.parseRgb)(c))}(),onColorChange:function(e){const t=c&&"mixed"!==c?(0,W.alphaToTransparency)((0,A.parseRgba)(c)[3]):0;d((0,W.generateColor)(String(e),t,!0))},thickness:u,lineStyle:m,thicknessItems:i,lineStyleItems:h,onThicknessChange:p,onLineStyleChange:f,opacity:r?void 0:c&&"mixed"!==c?(0,A.parseRgba)(c)[3]:void 0,onOpacityChange:r?void 0:function(e){d((0,W.generateColor)(c,(0,W.alphaToTransparency)(e),!0))}})}var O=n(11542),H=n(49857),J=n(94697),Z=n(90186),j=n(43382),K=n(98853),U=n(54159);const X=[{type:H.LineEnd.Normal,icon:j,label:O.t(null,void 0,n(65353))},{type:H.LineEnd.Arrow,icon:K,label:O.t(null,void 0,n(11858))}];class Y extends o.PureComponent{constructor(e){super(e),this._items=[],this._items=X.map((t=>({value:t.type,selectedContent:o.createElement(J.DisplayItem,{icon:t.icon}),content:o.createElement(J.DropItem,{icon:t.icon,iconClassName:d()(e.isRight&&U.right),label:t.label})})))}render(){const{id:e,lineEnd:t,className:n,lineEndChange:i,isRight:r,disabled:a}=this.props;return o.createElement(J.IconDropdown,{id:e,disabled:a,className:d()(U.lineEndSelect,r&&U.right,n),items:this._items,value:t,onChange:i,hideArrowButton:!0,...(0,Z.filterDataProps)(this.props)})}}function $(e){const{property:t}=e,[n,i]=(0,a.useDefinitionProperty)({property:t});return o.createElement(Y,{...e,lineEnd:n,lineEndChange:i})}var q,Q=n(78260),ee=n(84001);function te(e){const{children:t,className:n,breakPoint:i="Normal"}=e;return o.createElement(Q.CellWrap,{className:c(ee.wrap,n,ee[`breakpoint${i}`])},o.Children.map(t,(e=>o.isValidElement(e)?o.createElement("span",{key:null===e.key?void 0:e.key,className:c(ee.row,r(e)&&ee.empty,a(e)&&ee.noMargins)},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))}function a(e){
return o.isValidElement(e)&&Boolean(e.props?.["data-no-margins"])}}!function(e){e.MobileNormal="Normal",e.MobileMedium="Medium",e.MobileSmall="Small"}(q||(q={}));const ne={1:"float",0:"integer"};var oe=n(77975),ie=n(37458);function re(e){const{definition:{id:t,properties:{checked:n,disabled:i,visible:r,leftEnd:s,rightEnd:d,value:p,extendLeft:h,extendRight:b,style:v,width:y,color:g},title:E,valueMin:w,valueMax:C,valueStep:D,valueUnit:S,extendLeftTitle:P,extendRightTitle:N,solutionId:k,widthValues:x},offset:T}=e,[I]=(0,a.useDefinitionProperty)({property:n,defaultValue:!0}),[M]=(0,a.useDefinitionProperty)({property:i,defaultValue:!1}),[_]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0}),B=(0,oe.useWatchedValueReadonly)({watchedValue:w,defaultValue:void 0}),L=(0,oe.useWatchedValueReadonly)({watchedValue:C,defaultValue:void 0}),R=(0,oe.useWatchedValueReadonly)({watchedValue:D,defaultValue:void 0}),A=(0,oe.useWatchedValueReadonly)({watchedValue:S,defaultValue:void 0}),F=e.disabled||!I;return _?o.createElement(o.Fragment,null,o.createElement(l.CommonSection,{id:t,offset:T,checked:n,title:E,solutionId:k,disabled:e.disabled||M},o.createElement(te,{className:ie.line,breakPoint:"Small"},g&&o.createElement("span",{className:ie.control},o.createElement(G,{color:g,thickness:y,disabled:F,thicknessItems:x,lineStyle:v})),!g&&y&&o.createElement("span",{className:ie.control},o.createElement(f.LineWidthSelect,{id:(0,u.createDomId)(t,"line-width-select"),items:x,property:y,disabled:F})),!g&&v&&o.createElement("span",{className:ie.control},o.createElement(m,{id:(0,u.createDomId)(t,"line-style-select"),property:v,disabled:F})),(s||d||p)&&o.createElement(o.Fragment,null,o.createElement(o.Fragment,null,s&&o.createElement($,{id:(0,u.createDomId)(t,"left-end-select"),"data-name":"left-end-select",className:ie.control,property:s,disabled:F}),d&&o.createElement($,{id:(0,u.createDomId)(t,"right-end-select"),"data-name":"right-end-select",className:ie.control,property:d,disabled:F,isRight:!0})),function(){const{definition:{valueType:t}}=e;return p&&o.createElement("span",{className:c(ie.valueInput,ie.control)},o.createElement(V,{className:ie.input,property:p,min:B,max:L,step:R,disabled:F,mode:void 0!==t?ne[t]:void 0,name:"line-value-input"}),o.createElement("span",{className:ie.valueUnit},A))}()))),h&&o.createElement(l.CommonSection,{id:`${t}ExtendLeft`,offset:T,checked:h,title:P,disabled:e.disabled||M}),b&&o.createElement(l.CommonSection,{id:`${t}ExtendRight`,offset:T,checked:b,title:N,disabled:e.disabled||M})):null}function ae(e){return o.createElement(G,{...e})}var le=n(46088),se=n(90405),ce=n(36947);function de(e){const{property:t,options:n,...i}=e,[r,l]=(0,a.useDefinitionProperty)({property:t}),s=(0,ce.useForceUpdate)();return(0,o.useEffect)((()=>{const e=()=>s();return Array.isArray(n)||n.subscribe(e),()=>{Array.isArray(n)||n.unsubscribe(e)}}),[]),o.createElement(se.Select,{...i,onChange:l,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 ue=n(97546);const pe=[{title:O.t(null,void 0,n(88686)),value:le.ColorType.Solid},{title:O.t(null,void 0,n(68043)),value:le.ColorType.Gradient}],me=[1,2,3,4];function fe(e){const{id:t,disabled:n,noAlpha:i,properties:r}=e,{color:l,gradientColor1:s,gradientColor2:c,type:d,width:p}=r,[m]=(0,a.useDefinitionProperty)({property:d,defaultValue:le.ColorType.Solid});return o.createElement(te,null,d&&o.createElement(de,{id:(0,u.createDomId)(t,"background-type-options-dropdown"),"data-name":"background-type-options-dropdown",className:ue.dropdown,menuClassName:ue.dropdownMenu,disabled:n,property:d,options:pe}),m!==le.ColorType.Solid&&m&&s&&c?o.createElement("div",{className:ue.gradientColor},o.createElement(ae,{color:s,disabled:n,noAlpha:i}),o.createElement(ae,{color:c,disabled:n,noAlpha:i}),p&&o.createElement(f.LineWidthSelect,{className:ue.lineWidthSelect,property:p,items:me,disabled:!!n})):o.createElement(G,{color:l,disabled:n,noAlpha:i,thickness:p,thicknessItems:me}))}function he(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,[f]=(0,a.useDefinitionProperty)({property:u,defaultValue:!0}),[h]=(0,a.useDefinitionProperty)({property:p,defaultValue:!1}),[b]=(0,a.useDefinitionProperty)({property:m,defaultValue:!0}),v=e.disabled||!f;return b?o.createElement(l.CommonSection,{id:t,offset:c,checked:u,title:i,solutionId:s,disabled:e.disabled||h},o.createElement(Q.CellWrap,null,n.hasOwnProperty("type")?o.createElement(fe,{id:t,properties:n,disabled:v,noAlpha:r}):o.createElement(ae,{color:d,disabled:v,noAlpha:r}))):null}var be=n(88601);function ve(e){const{property:t,...n}=e,[i,r]=(0,a.useDefinitionProperty)({property:t});return o.createElement(be.Transparency,{...n,value:i,onChange:r})}function ye(e){const{definition:{id:t,properties:{transparency:n,checked:i,disabled:r,visible:s},title:c,solutionId:d},offset:u}=e,[p]=(0,a.useDefinitionProperty)({property:i,defaultValue:!0}),[m]=(0,a.useDefinitionProperty)({property:r,defaultValue:!1}),[f]=(0,a.useDefinitionProperty)({property:s,defaultValue:!0}),h=e.disabled||!p;return f?o.createElement(l.CommonSection,{id:t,offset:u,checked:i,title:c,solutionId:d,disabled:e.disabled||m},o.createElement(Q.CellWrap,null,o.createElement(ve,{property:n,disabled:h}))):null}var ge=n(95442);function Ee(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:f}=e,[h]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0}),[b]=(0,a.useDefinitionProperty)({property:s,defaultValue:!1}),[v]=(0,a.useDefinitionProperty)({property:c,defaultValue:!0}),y=e.disabled||!h||b;return v?o.createElement(l.CommonSection,{id:t,offset:f,checked:r,solutionId:m,title:d,disabled:e.disabled||b},o.createElement(Q.CellWrap,{className:ge.twoColors},g(n,u),g(i,p))):null;function g(e,t){return o.createElement("span",{className:ge.colorPicker},o.createElement(ae,{color:e,disabled:y,noAlpha:t}))}}var we=n(66849),Ce=n(6289);function De(e){
const{definition:{id:t,properties:{checked:n,value:i,unitOptionsValue:r,disabled:s,visible:d},min:p,max:m,step:f,title:h,unit:v,unitOptions:y,type:g,solutionId:E},offset:w}=e,[C]=(0,a.useDefinitionProperty)({property:n,defaultValue:!0}),[D]=(0,a.useDefinitionProperty)({property:s,defaultValue:!1}),[S]=(0,a.useDefinitionProperty)({property:d,defaultValue:!0}),P=(0,oe.useWatchedValueReadonly)({watchedValue:p,defaultValue:void 0}),N=(0,oe.useWatchedValueReadonly)({watchedValue:m,defaultValue:void 0}),k=(0,oe.useWatchedValueReadonly)({watchedValue:f,defaultValue:void 0}),x=(0,oe.useWatchedValueReadonly)({watchedValue:v,defaultValue:void 0}),T=(0,o.useContext)(we.ControlCustomWidthContext),I=D||e.disabled||!C;return S?o.createElement(l.CommonSection,{id:t,offset:w,checked:n,title:h,solutionId:E,disabled:e.disabled||D},o.createElement(Q.CellWrap,null,o.createElement(te,null,o.createElement(V,{className:c(Ce.input,T[t]&&Ce[T[t]]),property:i,min:P,max:N,step:k,disabled:I,mode:ne[g],name:"number-input","data-name":t}),r&&o.createElement(de,{id:(0,u.createDomId)(t,"unit-options-dropdown"),"data-name":"unit-options-dropdown",className:Ce.dropdown,menuClassName:Ce.dropdownMenu,disabled:I,property:r,options:(0,b.ensureDefined)(y)})),x&&o.createElement("span",{className:Ce.unit},x))):null}function Se(e){const{definition:{id:t,properties:{checked:n,disabled:i,visible:r},childrenDefinitions:s,title:c},offset:d}=e,[u]=(0,a.useDefinitionProperty)({property:n,defaultValue:!0}),[p]=(0,a.useDefinitionProperty)({property:i,defaultValue:!1}),[m]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0}),f=e.disabled||!u;return m?o.createElement(o.Fragment,null,o.createElement(l.CommonSection,{id:t,offset:d,checked:n,title:c,disabled:e.disabled||p}),s.map((e=>o.createElement(Ot,{key:e.id,disabled:f,definition:e,offset:!0})))):null}var Ve=n(66045);function Pe(e){const{property:t}=e,[n,i]=(0,a.useDefinitionProperty)({property:t});return o.createElement(Ve.FontSizeSelect,{...e,fontSize:n,fontSizeChange:i,"data-name":"font-size-select"})}var Ne=n(9745),ke=n(46558);function xe(e){const{className:t,checked:n,icon:i,disabled:r,onClick:a}=e;return o.createElement("div",{className:d()(t,ke.container,n&&!r&&ke.active,r&&ke.disabled),onClick:r?void 0:a,"data-role":"button",...(0,Z.filterDataProps)(e)},o.createElement(Ne.Icon,{className:ke.icon,icon:i}))}function Te(e){const{icon:t,className:n,property:i,disabled:r}=e,[l,s]=(0,a.useDefinitionProperty)({property:i});return o.createElement(xe,{className:n,icon:t,checked:l,onClick:function(){s(!l)},disabled:r,...(0,Z.filterDataProps)(e)})}var Ie=n(67029),Me=n(71891),_e=n(2568);function Be(e){const{property:t,...n}=e,[i,r]=(0,a.useDefinitionProperty)({property:t}),l=(0,o.useCallback)((e=>r(e.target.value)),[r]);return o.createElement(_e.Textarea,{...n,value:i,onChange:l})}var Le=n(8295),Re=n(29285),Ae=n(63907);const Fe=e=>({content:e.title,title:e.title,value:e.value,id:e.id}),We=e=>({content:e.title,title:e.title,value:e.value,id:e.id});function ze(e){
const{definition:{id:t,properties:{color:n,size:i,checked:r,disabled:s,bold:c,italic:d,text:p,alignmentHorizontal:m,alignmentVertical:f,orientation:h,backgroundVisible:b,backgroundColor:v,borderVisible:y,borderColor:g,borderWidth:E,wrap:w},title:C,solutionId:D,sizeItems:S,alignmentTitle:V,alignmentHorizontalItems:P,alignmentVerticalItems:N,orientationTitle:k,orientationItems:x,backgroundTitle:T,borderTitle:I,borderWidthItems:M,wrapTitle:_},offset:B}=e,L=(0,o.useContext)(we.ControlCustomHeightContext),[R]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0}),[A]=(0,a.useDefinitionProperty)({property:s,defaultValue:!1}),[F,W]=(0,a.useDefinitionProperty)({property:f,defaultValue:void 0}),[z,O]=(0,a.useDefinitionProperty)({property:h,defaultValue:"horizontal"}),[H,J]=(0,a.useDefinitionProperty)({property:m,defaultValue:void 0}),[Z]=(0,a.useDefinitionProperty)({property:b,defaultValue:!1}),[j]=(0,a.useDefinitionProperty)({property:y,defaultValue:!1}),K=e.disabled||!R;return o.createElement(o.Fragment,null,function(){if(C)return o.createElement(l.CommonSection,{id:t,offset:B,checked:r,title:C,solutionId:D,disabled:e.disabled||A},o.createElement(te,{breakPoint:"Small"},Y(),$()));return o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.PropertyTable.Cell,{placement:"first",colSpan:2,offset:B,"data-section-name":t},Y(),$(),D&&!1))}(),p&&o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.PropertyTable.Cell,{placement:"first",colSpan:2,offset:B,"data-section-name":t},o.createElement(Be,{className:Ie.InputClasses.FontSizeMedium,rows:(U=L[t],"big"===U?9:5),stretch:!0,property:p,disabled:K,onFocus:function(e){e.target.select()},name:"text-input"}))),(m||f)&&o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:B,"data-section-name":t},o.createElement(Q.CellWrap,null,o.createElement("span",{className:Ae.title},V))),o.createElement(Me.PropertyTable.Cell,{placement:"last",verticalAlign:"adaptive","data-section-name":t},o.createElement(te,{breakPoint:"Small"},void 0!==F&&void 0!==N&&o.createElement(se.Select,{id:(0,u.createDomId)(t,"alignment-vertical-select"),"data-name":"alignment-vertical-select",className:Ae.dropdown,menuClassName:Ae.dropdownMenu,disabled:K,value:F,items:N.map(Fe),onChange:W}),void 0!==H&&void 0!==P&&o.createElement(se.Select,{id:(0,u.createDomId)(t,"alignment-horizontal-select"),"data-name":"alignment-horizontal-select",className:Ae.dropdown,menuClassName:Ae.dropdownMenu,disabled:K,value:H,items:P.map(Fe),onChange:J})))),void 0!==h&&void 0!==x&&o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.PropertyTable.Cell,{placement:"first",verticalAlign:"adaptive",offset:B,"data-section-name":t},o.createElement(Q.CellWrap,null,o.createElement("span",{className:Ae.title},k))),o.createElement(Me.PropertyTable.Cell,{placement:"last",verticalAlign:"adaptive","data-section-name":t},o.createElement(te,{breakPoint:"Small"},o.createElement(se.Select,{id:(0,u.createDomId)(t,"orientation-select"),
"data-name":"orientation-select",className:Ae.dropdown,menuClassName:Ae.dropdownMenu,disabled:K,value:z,items:x.map(We),onChange:O})))),q(T,b,v,!!b&&!Z),q(I,y,g,!!y&&!j,E,M),w&&o.createElement(l.CommonSection,{id:`${t}Wrap`,offset:B,checked:w,title:_,disabled:e.disabled||A}));var U;function X(e,t,n){return e?o.createElement(Te,{className:Ae.fontStyleButton,icon:t,property:e,disabled:K,"data-name":n}):null}function Y(){return o.createElement(o.Fragment,null,n&&o.createElement("div",{className:Ae.colorPicker},o.createElement(ae,{color:n,disabled:K})),i&&S&&o.createElement(Pe,{id:(0,u.createDomId)(t,"font-size-select"),property:i,fontSizes:S,disabled:K}))}function $(){return o.createElement(o.Fragment,null,X(c,Le,"toggle-bold"),X(d,Re,"toggle-italic"))}function q(e,n,i,r,a,s){return i||n?o.createElement(l.CommonSection,{id:`${t}ColorSelect`,offset:B,checked:n,title:e,disabled:K},i&&o.createElement(G,{color:i,thickness:a,thicknessItems:s,disabled:K||r})):null}}var Ge=n(86623),Oe=n(37265);function He(e){const{property:t,mathOperations:n="+/*",mode:i="float",disabled:r,...l}=e,[s,c]=(0,o.useState)(performance.now()),[d,u]=(0,a.useDefinitionProperty)({property:t,handler:()=>c(performance.now())}),[p,m,f,h]=y(d,u,s),b=(0,o.useMemo)((()=>{const e=new RegExp(`^[${n.split("").join("\\")}-]?(${"float"===i?"(\\d+\\.\\d*)|":""}(\\d*))$`);return t=>(0,Oe.isString)(t)&&e.test(t)}),[n,i]);return o.createElement(Ge.FormInput,{...l,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,E.hashFromEvent)(e.nativeEvent)){case 27:h();break;case 13:v()}},onBlur:function(){v()},disabled:r,stretch:!1,autoSelectOnFocus:!0});function v(){p.length&&f()}}var Je=n(46741);function Ze(e){const{definition:{properties:{x:t,y:n,disabled:i},id:r,title:a,solutionId:l},definition:s,offset:c}=e,d=i&&i.value()||e.disabled;return o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.PropertyTable.Cell,{verticalAlign:"top",placement:"first",offset:c,"data-section-name":r},o.createElement("span",{className:Je.coordinates},a)),(t||n)&&o.createElement(Me.PropertyTable.Cell,{placement:"last",offset:c,"data-section-name":r},o.createElement(te,{breakPoint:"Medium"},"coordinates"===s.propType?o.createElement(je,{definition:s,disabled:d}):o.createElement(Ke,{definition:s,disabled:d})),l&&!1))}function je(e){const{definition:{properties:{x:t,y:n},minX:i,maxX:r,stepX:a,minY:l,maxY:s,stepY:c,typeX:d,typeY:u},disabled:p}=e,m=(0,oe.useWatchedValueReadonly)({watchedValue:i,defaultValue:void 0}),f=(0,oe.useWatchedValueReadonly)({watchedValue:r,defaultValue:void 0}),h=(0,oe.useWatchedValueReadonly)({watchedValue:a,defaultValue:void 0}),b=(0,oe.useWatchedValueReadonly)({watchedValue:l,defaultValue:void 0}),v=(0,oe.useWatchedValueReadonly)({watchedValue:s,defaultValue:void 0}),y=(0,oe.useWatchedValueReadonly)({watchedValue:c,defaultValue:void 0});return o.createElement(o.Fragment,null,n&&o.createElement(V,{className:Je.input,property:n,min:b,max:v,step:y,disabled:p,name:"y-input",
mode:void 0!==u?ne[u]:"integer"}),t&&o.createElement(V,{className:Je.input,property:t,min:m,max:f,step:h,disabled:p,name:"x-input",mode:void 0!==d?ne[d]:"integer"}))}function Ke(e){const{definition:{properties:{x:t,y:i},mathOperationsX:r,mathOperationsY:a,modeX:l,modeY:s},disabled:c}=e;return o.createElement("div",{className:Je.selectionCoordinates},o.createElement("div",{className:Je.selectionCoordinates__inputs},i&&o.createElement(He,{property:i,mathOperations:a,mode:s,disabled:c,className:Je.input,placeholder:O.t(null,void 0,n(49957))}),t&&o.createElement(He,{property:t,mathOperations:r,mode:l,disabled:c,className:Je.input,placeholder:O.t(null,void 0,n(406))})),o.createElement("div",{className:Je.selectionCoordinates__description},O.t(null,void 0,n(13748))))}var Ue=n(11131);function Xe(e){const{definition:{id:t,properties:{checked:n,option:i,disabled:r,visible:s,color:c},title:p,solutionId:m,options:f,infoTooltip:h},offset:b}=e,[v]=(0,a.useDefinitionProperty)({property:n,defaultValue:!0}),[y]=(0,a.useDefinitionProperty)({property:r,defaultValue:!1}),[g]=(0,a.useDefinitionProperty)({property:s,defaultValue:!0}),E=(0,o.useContext)(we.ControlCustomWidthContext),w=e.disabled||!v;return g?o.createElement(l.CommonSection,{id:t,offset:b,checked:n,title:p,solutionId:m,disabled:e.disabled||y,infoTooltip:h},o.createElement(Q.CellWrap,null,o.createElement(te,null,o.createElement(de,{id:(0,u.createDomId)(t,"options-dropdown"),"data-name":"options-dropdown",className:d()(Ue.dropdown,E[t]&&Ue[E[t]]),menuClassName:d()(Ue.dropdownMenu,E[t]&&Ue[E[t]]),disabled:w||y,property:i,options:f}),c&&o.createElement(ae,{color:c,disabled:w})))):null}var Ye=n(71953);var $e,qe=n(63273),Qe=n(73188);!function(e){e[e.None=0]="None",e[e.From=1]="From",e[e.To=2]="To"}($e||($e={}));class et 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),a=1===this._detectPointerMode(e),l=a?(0,C.clamp)(r,o,n):t,s=a?n:(0,C.clamp)(r,t,i);l<=s&&this._handleChange(l,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=>{S.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:a}=this.props,{pointerDragMode:l}=this.state,s=0!==l,d=a-r,u=0===d?r:(n-r)/d,p=0===d?a:(i-r)/d,m=(0,qe.isRtl)()?"right":"left";return o.createElement("div",{className:c(e,Qe.range,t&&Qe.disabled)},o.createElement("div",{className:Qe.rangeSlider,ref:this._refContainer,onMouseDown:this._onSliderClick,onTouchStart:this._onTouchStart,onTouchMove:this._handleTouch,onTouchEnd:this._handleTouchEnd},o.createElement("div",{className:Qe.rangeSliderMiddleWrap},o.createElement("div",{className:c(Qe.rangeSliderMiddle,s&&Qe.dragged),style:{[m]:100*u+"%",width:100*(p-u)+"%"}})),o.createElement("div",{className:Qe.rangePointerWrap},o.createElement("div",{className:c(Qe.pointer,s&&Qe.dragged),style:{[m]:100*u+"%"},ref:this._refPointer})),o.createElement("div",{className:Qe.rangePointerWrap},o.createElement("div",{className:c(Qe.pointer,s&&Qe.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),a=i.getBoundingClientRect(),l=r.offsetWidth;let s=e.clientX-l/2-a.left;return(0,qe.isRtl)()&&(s=a.width-s-l),(0,C.clamp)(s/(a.width-l),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),a=Math.abs(n-i),l=r===a?i<t?1:2:r<a?1:2;return this.setState({pointerDragMode:l}),l}_handleChange(e,t){const{from:n,to:o,onChange:i}=this.props;e===n&&t===o||i(e,t)}}var tt=n(90692),nt=n(35498);function ot(e){const{definition:{id:t,properties:{checked:n,disabled:i,from:r,to:s},title:c,solutionId:u,max:p,min:m},offset:f,disabled:h}=e,[b]=(0,a.useDefinitionProperty)({property:n,defaultValue:!0}),[g]=(0,a.useDefinitionProperty)({property:i,defaultValue:!1}),E=(0,oe.useWatchedValueReadonly)({watchedValue:m,defaultValue:void 0}),w=(0,oe.useWatchedValueReadonly)({watchedValue:p,defaultValue:void 0}),[C,D]=(0,a.useDefinitionProperty)({property:r}),[S,V]=(0,a.useDefinitionProperty)({property:s}),N=v(C)||v(S),k=y(N?"mixed":C,(function(e){if(D(e),v(_)){const e=w||100;B(e),V(e)}})),[x,T,I]=k,M=y(N?"mixed":S,(function(e){if(V(e),v(x)){const e=E||0;T(e),D(e)}})),[_,B,L]=M,R=v(x)||v(_),A=h||v(b)||!b,F={flushed:!1};return o.createElement(l.CommonSection,{id:t,offset:f,checked:n,title:c,disabled:h||g},o.createElement(Q.CellWrap,{className:nt.range},function(){if(!E||!w)return null;return o.createElement(tt.MatchMedia,{rule:"(max-width: 460px)"
},(e=>o.createElement(te,{breakPoint:"Medium"},o.createElement(o.Fragment,null,o.createElement("span",{className:nt.valueInput},o.createElement(P,{className:nt.input,sharedBuffer:k,min:E,max:v(_)?w:_,step:1,disabled:A,name:"from-input",mode:"integer",defaultValue:E}),e?o.createElement("span",{className:nt.rangeSlider},"—"):o.createElement(et,{className:d()(nt.rangeSlider,R&&nt.rangeSlider_mixed),from:R?E:x,to:R?w:_,min:E,max:w,onChange:W,onCommit:z,disabled:A}))),o.createElement(o.Fragment,null,o.createElement("span",{className:nt.valueInput},o.createElement(P,{className:nt.input,sharedBuffer:M,min:v(x)?E:x,max:w,step:1,disabled:A,name:"to-input",mode:"integer",defaultValue:w}),u&&!1)))))}()));function W(e,t){T(Math.round(e)),B(Math.round(t))}function z(){F.flushed||(I(),L(),F.flushed=!0)}}var it=n(86067),rt=n(53424),at=n(80509);function lt(e){const{definitions:t,name:n,offset:i}=e,r=d()(at.cell,at.fragmentCell,t.some((e=>void 0!==e.solutionId))&&at.largeWidth);return o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.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:at.item,key:e.id,"data-section-name":e.id},o.createElement(ct,{definition:e}))))))}function st(e){const{definition:t,offset:n}=e;return o.createElement(Me.PropertyTable.Row,null,o.createElement(Me.PropertyTable.Cell,{className:at.cell,offset:n,placement:"first",verticalAlign:"adaptive",colSpan:2,checkableTitle:!0},o.createElement(ct,{definition:t})))}function ct(e){const{definition:{id:t,properties:{disabled:n,checked:i,color:r,level:l,width:s,style:c},solutionId:p,title:f,widthValues:h,styleValues:b,locked:v}}=e,[y]=(0,a.useDefinitionProperty)({property:i,defaultValue:!0}),[g]=(0,a.useDefinitionProperty)({property:n,defaultValue:!1}),E=g||!y;return o.createElement(o.Fragment,null,o.createElement(rt.CheckableTitle,{name:`is-enabled-${t}`,className:d()(f&&at.withTitle,v&&at.hidden),title:f&&o.createElement("span",{className:at.title},f),property:i,disabled:g}),l&&o.createElement(V,{className:d()(at.input,at.control),property:l,disabled:E}),r&&o.createElement(G,{className:at.control,disabled:E,color:r,thickness:s,thicknessItems:h,lineStyle:c,allowedLineStyles:b}),!r&&c&&o.createElement(m,{id:(0,u.createDomId)(t,"leveled-line-style-select"),className:at.control,property:c,disabled:E,allowedLineStyles:b}),p&&!1)}var dt=n(26302);function ut(e){const{definition:{id:t,properties:{option1:n,option2:i,checked:r,disabled:s},title:c,solutionId:d,optionsItems1:p,optionsItems2:m},offset:f}=e,[h]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0}),[b]=(0,a.useDefinitionProperty)({property:s,defaultValue:!1}),v=e.disabled||!h;return o.createElement(l.CommonSection,{id:t,offset:f,checked:r,title:c,solutionId:d,disabled:e.disabled||b},o.createElement(te,{className:dt.twoOptions},o.createElement(de,{id:(0,u.createDomId)(t,"two-options-dropdown-1"),"data-name":"two-options-dropdown-1",className:dt.dropdown,menuClassName:dt.menu,
property:n,disabled:v,options:p}),o.createElement(de,{id:(0,u.createDomId)(t,"two-options-dropdown-2"),"data-name":"two-options-dropdown-2",className:dt.dropdown,menuClassName:dt.menu,property:i,disabled:v,options:m})))}var pt=n(69982);function mt(e){const{definition:{id:t,properties:{color1:n,color2:i,option:r},options:a,color1Visible:s,color2Visible:c,title:p,noAlpha1:m,noAlpha2:f,solutionId:h},offset:b}=e,v=(0,oe.useWatchedValueReadonly)({watchedValue:s,defaultValue:!1}),y=(0,oe.useWatchedValueReadonly)({watchedValue:c,defaultValue:!1}),g=(0,o.useContext)(we.ControlCustomWidthContext);return o.createElement(l.CommonSection,{id:t,offset:b,solutionId:h,title:p},o.createElement(Q.CellWrap,{className:pt.optionalTwoColors},o.createElement(te,null,o.createElement(de,{id:(0,u.createDomId)(t,"options-dropdown"),"data-name":"options-dropdown",className:d()(pt.dropdown,g[t]&&pt[g[t]]),menuClassName:d()(pt.dropdownMenu,g[t]&&pt[g[t]]),property:r,options:a}),o.createElement(o.Fragment,null,v&&E(n,m),y&&E(i,f)))));function E(e,t){return o.createElement("span",{className:pt.colorPicker},o.createElement(ae,{color:e,noAlpha:t}))}}var ft=n(33900),ht=n(97995);function bt(e){const{source:t,inputs:n,model:i,inputsTabProperty:r,studyMetaInfo:a}=e.definition;return o.createElement(ft.InputsTabContent,{className:ht.withoutPadding,property:r,model:i,study:t,studyMetaInfo:a,inputs:n})}var vt=n(19625),yt=n(82930),gt=n(79965);function Et(e){const{definition:{id:t,title:n,properties:i,solutionId:r},offset:s}=e,{checked:c,emoji:d,backgroundColor:u}=i,[p]=(0,a.useDefinitionProperty)({property:c,defaultValue:!1}),[m,f]=(0,a.useDefinitionProperty)({property:d,defaultValue:"🙂"}),[h,b]=(0,a.useDefinitionProperty)({property:u,defaultValue:vt.colorsPalette["color-tv-blue-a600"]}),[v]=(0,a.useDefinitionProperty)({property:i.disabled,defaultValue:!1}),y=e.disabled||!p;return o.createElement(l.CommonSection,{id:t,offset:s,checked:c,title:n,solutionId:r,disabled:e.disabled||v},o.createElement(yt.EmojiPicker,{value:m,disabled:y,onSelect:f}),o.createElement(F.ColorSelect,{className:gt.colorSelect,disabled:y,color:function(){if("mixed"===h)return h;return(0,A.rgbToHexString)((0,A.parseRgb)(h))}(),opacity:h&&"mixed"!==h?(0,A.parseRgba)(h)[3]:void 0,onColorChange:function(e){const t=h&&"mixed"!==h?(0,W.alphaToTransparency)((0,A.parseRgba)(h)[3]):0;b((0,W.generateColor)(String(e),t,!0))},onOpacityChange:function(e){b((0,W.generateColor)(h,(0,W.alphaToTransparency)(e),!0))}}))}function wt(e){const{definition:{id:t,properties:{disabled:n,visible:i},childrenDefinitions:r,title:s},offset:c}=e,[d]=(0,a.useDefinitionProperty)({property:n,defaultValue:!1}),[u]=(0,a.useDefinitionProperty)({property:i,defaultValue:!0}),p=e.disabled;return u?o.createElement(o.Fragment,null,s&&o.createElement(l.CommonSection,{id:t,offset:c,title:s,disabled:e.disabled||d}),r.map((e=>o.createElement(Ot,{key:e.id,disabled:p,definition:e,offset:e.offset??Boolean(s)})))):null}var Ct=n(38528),Dt=n(36104),St=n(3343),Vt=n(26597),Pt=n(59054),Nt=n(50238),kt=n(16396),xt=n(15294),Tt=n(40638)
;function It(e){const{isDisabled:t,hint:n,label:i,isChecked:r,checkboxClassName:a,labelClassName:l,indeterminate:s,isActive:d,checkboxTabIndex:u,checkboxReference:p,checkboxDataRole:m,checkboxDataName:f,...h}=e;return o.createElement(kt.PopupMenuItem,{...h,isDisabled:t,shortcut:n,dontClosePopup:!0,labelRowClassName:l,label:o.createElement(xt.Checkbox,{reference:p,disabled:t,label:i,checked:r,indeterminate:s,className:c(Tt.checkbox,a),tabIndex:u,"data-role":m,"data-name":f})})}var Mt=n(13631);function _t(e){const[t,n]=(0,Nt.useRovingTabindexElement)(null);return o.createElement(It,{...e,className:Mt.item,checkboxClassName:Mt.checkbox,checkboxReference:t,checkboxTabIndex:n,checkboxDataRole:"menuitem",onKeyDown:function(e){const n=(0,St.hashFromEvent)(e);13!==n&&32!==n||(e.preventDefault(),t.current instanceof HTMLElement&&t.current.click())},"aria-disabled":e.isDisabled||void 0})}var Bt=n(20243),Lt=n(1774);function Rt(e){return!e.readonly&&!e.disabled}function At(e){const{selectedItems:t,placeholder:n}=e;if(!t.length)return o.createElement("span",null,n);const i=t.map((e=>e.selectedContent??e.content??e.value?.toString())).reduce(((e,t,n)=>t?(e.push(o.createElement("span",{key:n,className:Lt.contentPart},t)),e.push(o.createElement("span",{key:`separator_${n}`},","," ")),e):e),[]);return i.length&&i.splice(-1),o.createElement("span",{className:Lt.btnContent},i)}function Ft(e,t){const{id:n,items:i,menuClassName:r,menuItemClassName:a,tabIndex:l,disabled:s,highlight:c,intent:d,hideArrowButton:p,placeholder:m,value:f,"aria-labelledby":h,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:N,buttonTabIndex:k,highlight:x,intent:T,open:I,onOpen:M,close:_,toggle:B,buttonFocusBindings:L,onButtonClick:R,buttonRef:A,listboxRef:F,listboxTabIndex:W,buttonAria:z}=(0,Dt.useControlDisclosure)({id:n,disabled:s,buttonTabIndex:l,intent:d,highlight:c,onFocus:b,onBlur:v,onClick:y}),G=i.filter(Rt).filter((e=>f.some((t=>e.value===t)))),O=(0,u.joinDomIds)(h,n),H=O.length>0?O:void 0,J=(0,o.useMemo)((()=>({role:"listbox","aria-labelledby":h})),[h]),Z=(0,Vt.useKeyboardToggle)(B,P||w),j=(0,Vt.useKeyboardOpen)(P,I),K=(0,Vt.useKeyboardEventHandler)([Z,j]),U=(0,Ct.useMergedRefs)([A,t]);return o.createElement(Pt.ControlDisclosureView,{...S,...z,...L,id:n,role:"button",tabIndex:k,"aria-owns":z["aria-controls"],"aria-haspopup":"listbox","aria-labelledby":H,disabled:s,hideArrowButton:p,isFocused:N,isOpened:P,highlight:x,intent:T,ref:U,onClick:R,onClose:_,onKeyDown:K,onOpen:M,listboxTabIndex:W,listboxId:V,listboxClassName:r,listboxAria:J,"aria-describedby":C,"aria-invalid":D,listboxReference:F,onListboxKeyDown:function(e){switch((0,St.hashFromEvent)(e)){case 27:case 9:return void(P&&(e.preventDefault(),_()))}(0,Bt.handleAccessibleMenuKeyDown)(e)},onListboxFocus:e=>(0,Bt.handleAccessibleMenuFocus)(e,A),buttonChildren:o.createElement(At,{selectedItems:G??null,placeholder:m})},i.map(((e,t)=>{if(e.readonly)return o.createElement(o.Fragment,{
key:`readonly_item_${t}`},e.content);const i=function(e,t){return t?.id??(0,u.createDomId)(e,"item",t?.value)}(n,e);return o.createElement(_t,{key:i,id:i,className:a,"aria-selected":f===e.value,isChecked:f.includes(e.value),label:e.content??e.value?.toString()??"",onClick:()=>function(e){const t=new Set(f);t.has(e)?t.delete(e):t.add(e);g(Array.from(t))}(e.value),isDisabled:e.disabled})})))}Ft.displayName="Multiselect";const Wt=o.forwardRef(Ft);var zt=n(74782);function Gt(e){const{definition:t}=e,{checked:r,checkableListOptions:l,definitions:s}=t,[c,d]=(0,o.useState)(y()),[u]=(0,a.useDefinitionProperty)({property:r,defaultValue:!0});(0,o.useEffect)((()=>{const e={},t=()=>{const e=y();d(e)};return t(),l.forEach((n=>{n.properties.checked&&n.properties.checked?.subscribe(e,t)})),()=>{l.forEach((n=>{n.properties.checked&&n.properties.checked?.unsubscribe(e,t)}))}}),[t]);const p=[],m=[],f=[],h=[];s.value().forEach((e=>{(0,i.isPropertyDefinition)(e)&&((0,i.isColorDefinition)(e)?p.push(e):(0,i.isTwoColorDefinition)(e)?m.push(e):(0,i.isLineDefinition)(e)?f.push(e):(0,i.isOptionsDefinition)(e)&&h.push(e))}));const v=!u||0===c.length;return o.createElement(o.Fragment,null,o.createElement(Me.PropertyTable.Row,null,o.createElement(rt.CheckableTitle,{name:`is-enabled-${t.id}`,title:t.title,property:r}),o.createElement(Me.PropertyTable.Cell,{placement:"last"},o.createElement("div",{className:zt.wrap},o.createElement(Wt,{className:zt.select,placeholder:O.t(null,void 0,n(8854)),disabled:!u,onChange:function(e){const t=new Set(e);l.forEach((e=>{!t.has(e.id)||e.properties.checked?.value()?!t.has(e.id)&&e.properties.checked?.value()&&e.properties.checked.setValue(!1):(0,b.ensureDefined)(e.properties.checked).setValue(!0)}))},value:c,matchButtonAndListboxWidths:!0,items:l.map((e=>({id:e.id,content:e.notFormatedTitle?o.createElement("span",{className:zt.preContent},(0,b.ensureDefined)(e.title)):(0,b.ensureDefined)(e.title),value:e.id})))}),p.length||f.length?o.createElement("div",{className:zt.colorsWrap},f.map((e=>o.createElement(G,{key:e.id,color:(0,b.ensureDefined)(e.properties.color),thickness:e.properties.width,thicknessItems:e.widthValues,disabled:v}))),p.map((e=>o.createElement(ae,{key:e.id,color:e.properties.color,disabled:v})))):null,m.length?m.map((e=>o.createElement("div",{key:e.id,className:zt.colorsWrap},o.createElement(ae,{color:e.properties.color1,disabled:v,noAlpha:e.noAlpha1}),o.createElement(ae,{color:e.properties.color2,disabled:v,noAlpha:e.noAlpha2})))):null))),h.map((e=>o.createElement(Me.PropertyTable.Row,{key:e.id},o.createElement(Me.PropertyTable.Cell,{placement:"first"}),o.createElement(Me.PropertyTable.Cell,{placement:"last"},o.createElement(de,{className:zt.select,property:e.properties.option,options:e.options,disabled:v}))))));function y(){return l.filter((e=>(0,b.ensureDefined)(e.properties?.checked).value())).map((e=>e.id))}}function Ot(e){const{definition:t,offset:n,disabled:a}=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,(()=>Ye.logger.logNormal(`Property "${n}" in definition "${e.id}" was updated to value "${o.value()}"`)))})),()=>{Object.entries(t).forEach((([,e])=>{e?.unsubscribeAll(t)}))}}),[e])}((0,i.isPropertyDefinitionsGroup)(t)?void 0:t),(0,i.isPropertyDefinitionsGroup)(t))return o.createElement(Ht,{definition:t,offset:n,disabled:a});switch(t.propType){case"line":return o.createElement(re,{...e,definition:t});case"checkable":return o.createElement(s,{...e,definition:t});case"color":return o.createElement(he,{...e,definition:t});case"transparency":return o.createElement(ye,{...e,definition:t});case"twoColors":return o.createElement(Ee,{...e,definition:t});case"optionalTwoColors":return o.createElement(mt,{...e,definition:t});case"fourColors":case"session":case"soundSelect":case"soundVolume":case"image":default:return null;case"number":return o.createElement(De,{...e,definition:t});case"symbol":return o.createElement(r.SymbolInputsButton,{...e,definition:t});case"text":return o.createElement(ze,{...e,definition:t});case"checkableSet":return o.createElement(Se,{...e,definition:t});case"set":return o.createElement(wt,{...e,definition:t});case"options":return o.createElement(Xe,{...e,definition:t});case"range":return o.createElement(ot,{...e,definition:t});case"coordinates":case"selectionCoordinates":return o.createElement(Ze,{...e,definition:t});case"twoOptions":return o.createElement(ut,{...e,definition:t});case"leveledLine":return o.createElement(st,{...e,definition:t});case"emoji":return o.createElement(Et,{...e,definition:t});case"studyInputs":return o.createElement(bt,{...e,definition:t})}}function Ht(e){const{definition:t}=e,n=(0,oe.useWatchedValueReadonly)({watchedValue:t.definitions});return(0,oe.useWatchedValueReadonly)({watchedValue:t.visible,defaultValue:!0})?(0,i.isCheckableListOptionsDefinition)(t)?o.createElement(Gt,{definition:t}):o.createElement(o.Fragment,null,t.title&&o.createElement(it.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(lt,{key:n[0].id,name:t.id,definitions:n}):o.createElement(Ot,{key:n.id,...e,definition:n}))),"general"===t.groupType&&o.createElement(Me.PropertyTable.GroupSeparator,{size:1})):null}},95276:(e,t,n)=>{"use strict";n.d(t,{ControlDisclosure:()=>d});var o=n(50959),i=n(38528),r=n(26597),a=n(59054),l=n(36104),s=n(68335),c=n(99505);const d=o.forwardRef(((e,t)=>{const{id:n,tabIndex:d,disabled:u,highlight:p,intent:m,children:f,onClick:h,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:N,intent:k,onOpen:x,close:T,toggle:I,buttonFocusBindings:M,onButtonClick:_,buttonRef:B,listboxRef:L,buttonAria:R}=(0,l.useControlDisclosure)({id:n,disabled:u,buttonTabIndex:d,intent:m,highlight:p,onFocus:b,
onBlur:v,onClick:h}),A=(0,r.useKeyboardToggle)(I),F=(0,r.useKeyboardClose)(D,T),W=(0,r.useKeyboardEventHandler)([A,F]);return o.createElement(a.ControlDisclosureView,{...E,...M,...R,id:n,role:"button",tabIndex:V,disabled:u,isOpened:D,isFocused:S,ref:(0,i.useMergedRefs)([B,t]),highlight:N,intent:k,onClose:T,onOpen:x,onClick:_,onKeyDown:W,listboxId:C,listboxTabIndex:P,listboxReference:L,listboxAria:y??w.current,onListboxKeyDown:function(e){if(27===(0,s.hashFromEvent)(e))return e.preventDefault(),void T();g?.(e)}},f,o.createElement("span",{className:c.invisibleFocusHandler,tabIndex:0,"aria-hidden":!0,onFocus:()=>T()}))}));d.displayName="ControlDisclosure"},82930:(e,t,n)=>{"use strict";n.d(t,{EmojiPicker:()=>x});var o=n(50959),i=n(56840),r=n(38297),a=n(43790),l=n(173);var s=n(20520),c=n(37558),d=n(41590),u=n(27317),p=n(3343),m=n(40173),f=n(90692);function h(e){!function(e,t){(0,o.useEffect)((()=>{const n=t||document;return n.addEventListener("scroll",e),()=>n.removeEventListener("scroll",e)}),[e])}(e,document)}var b=n(78135),v=n(24437),y=n(97754),g=n.n(y),E=n(10555);function w(e){const{children:t,highlight:n,disabled:i,reference:r,...a}=e,l=n?"primary":"default";return o.createElement("div",{...a,ref:r,className:g()(E.wrapper,E[`intent-${l}`],E["border-thin"],E["size-medium"],n&&E.highlight,n&&E.focused,i&&E.disabled),"data-role":"button"},o.createElement("div",{className:g()(E.childrenContainer,i&&E.disabled)},t),n&&o.createElement("span",{className:E.shadow}))}var C=n(88160),D=n(27061);const S=()=>null,V=(0,m.mergeThemes)(u.DEFAULT_MENU_THEME,{menuBox:D.menuBox}),P=378,N=18,k=200;function x(e){const{value:t,disabled:n,onSelect:a,onClose:u,canBeEmpty:m,renderButton:y=T}=e,g=(0,o.useRef)(null),{current:E}=(0,o.useRef)((w=t,i.getJSON("RecentlyUsedEmojis",[w]).filter((e=>e!==C.EMPTY_EMOJI))));var w;const x=(0,o.useRef)(null),[I,M]=(0,o.useState)(E),[_,B]=(0,o.useState)(!1),L=(0,o.useCallback)((()=>{B(!1),u?.()}),[u]),R=(0,o.useRef)(0);h((0,o.useCallback)((()=>{Date.now()-R.current<k||L()}),[L]));const A=(0,o.useCallback)((e=>{if(e!==C.EMPTY_EMOJI){const t=Array.from(new Set([e,...I])).slice(0,N);i.setJSON("RecentlyUsedEmojis",t),M(t)}a(e),L()}),[I,a]),F=(0,o.useMemo)((()=>m?[C.EMPTY_EMOJI,...I].slice(0,N):I),[I,m]),W=(z=F,(0,o.useMemo)((()=>{const e=(0,l.emojiGroups)();return e[0].emojis=z,e}),[z]));var z;return o.createElement(o.Fragment,null,o.createElement("div",{ref:g,className:D.buttonWrap},y({emoji:t,isOpened:_,disabled:n,onClick:function(){if(_)return void L();n||(B(!0),R.current=Date.now())}})),o.createElement(f.MatchMedia,{rule:v.DialogBreakpoints.TabletSmall},(e=>_&&o.createElement(c.DrawerManager,null,e?o.createElement(d.Drawer,{className:D.drawer,position:"Bottom",onClose:L},o.createElement(r.EmojiList,{emojis:W,onSelect:A,height:P})):o.createElement(s.PopupMenu,{theme:V,onKeyDown:O,isOpened:!0,position:(0,b.getPopupPositioner)(g.current,{horizontalDropDirection:b.HorizontalDropDirection.FromLeftToRight,horizontalAttachEdge:b.HorizontalAttachEdge.Left}),closeOnClickOutside:!1,onClickOutside:H,onClose:S,
controller:x,onOpen:G,tabIndex:-1},o.createElement(r.EmojiList,{className:D.desktopSize,emojis:W,onSelect:A,height:P}))))));function G(){x.current?.focus()}function O(e){27===(0,p.hashFromEvent)(e)&&(e.preventDefault(),e.stopPropagation(),L())}function H(e){const t=e.target;t instanceof Node&&g.current?.contains(t)||L()}}function T(e){const{emoji:t,isOpened:n,disabled:i,onClick:r}=e;return o.createElement(w,{highlight:n,disabled:i,"data-name":"emoji-picker"},o.createElement(a.EmojiWrap,{emoji:t,onClick:r}))}},96040:(e,t,n)=>{"use strict";n.d(t,{RemoveButton:()=>u});var o=n(11542),i=n(50959),r=n(97754),a=n.n(r),l=n(9745),s=n(74670),c=n(33765),d=n(35990);function u(e){const{className:t,isActive:r,onClick:u,onMouseDown:p,title:m,hidden:f,"data-name":h="remove-button",icon:b,...v}=e,[y,g]=(0,s.useActiveDescendant)(null);return i.createElement(l.Icon,{...v,"data-name":h,className:a()(d.button,"apply-common-tooltip",r&&d.active,f&&d.hidden,g&&d.focused,t),icon:b||c,onClick:u,onMouseDown:p,title:m??o.t(null,void 0,n(67410)),ariaLabel:m??o.t(null,void 0,n(67410)),ref:y})}},13631:e=>{e.exports={checkbox:"checkbox-hcyAOCXc",item:"item-hcyAOCXc"}},20243:(e,t,n)=>{"use strict";n.d(t,{focusFirstMenuItem:()=>d,handleAccessibleMenuFocus:()=>s,handleAccessibleMenuKeyDown:()=>c,queryMenuElements:()=>m});var o=n(19291),i=n(57177),r=n(68335),a=n(15754);const l=[37,39,38,40];function s(e,t){if(!e.target)return;const n=e.relatedTarget?.getAttribute("aria-activedescendant");if(e.relatedTarget!==t.current){const e=n&&document.getElementById(n);if(!e||e!==t.current)return}d(e.target)}function c(e){if(e.defaultPrevented)return;const t=(0,r.hashFromEvent)(e);if(!l.includes(t))return;const n=document.activeElement;if(!(document.activeElement instanceof HTMLElement))return;const a=m(e.currentTarget).sort(o.navigationOrderComparator);if(0===a.length)return;const s=document.activeElement.closest('[data-role="menuitem"]')||document.activeElement.parentElement?.querySelector('[data-role="menuitem"]');if(!(s instanceof HTMLElement))return;const c=a.indexOf(s);if(-1===c)return;const d=f(s),h=d.indexOf(document.activeElement),b=-1!==h,v=e=>{n&&(0,i.becomeSecondaryElement)(n),(0,i.becomeMainElement)(e),e.focus()};switch((0,o.mapKeyCodeToDirection)(t)){case"inlinePrev":if(!d.length)return;e.preventDefault(),v(0===h?a[c]:b?u(d,h,-1):d[d.length-1]);break;case"inlineNext":if(!d.length)return;e.preventDefault(),h===d.length-1?v(a[c]):v(b?u(d,h,1):d[0]);break;case"blockPrev":{e.preventDefault();const t=u(a,c,-1);if(b){const e=p(t,h);v(e||t);break}v(t);break}case"blockNext":{e.preventDefault();const t=u(a,c,1);if(b){const e=p(t,h);v(e||t);break}v(t)}}}function d(e){const[t]=m(e);t&&((0,i.becomeMainElement)(t),t.focus())}function u(e,t,n){return e[(t+e.length+n)%e.length]}function p(e,t){const n=f(e);return n.length?n[(t+n.length)%n.length]:null}function m(e){return Array.from(e.querySelectorAll('[data-role="menuitem"]:not([disabled]):not([aria-disabled])')).filter((0,a.createScopedVisibleElementFilter)(e))}function f(e){
return Array.from(e.querySelectorAll("[tabindex]:not([disabled]):not([aria-disabled])")).filter((0,a.createScopedVisibleElementFilter)(e))}},78135:(e,t,n)=>{"use strict";n.d(t,{HorizontalAttachEdge:()=>i,HorizontalDropDirection:()=>a,VerticalAttachEdge:()=>o,VerticalDropDirection:()=>r,getPopupPositioner:()=>c});var o,i,r,a,l=n(50151);!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"}(a||(a={}));const s={verticalAttachEdge:o.Bottom,horizontalAttachEdge:i.Left,verticalDropDirection:r.FromTopToBottom,horizontalDropDirection:a.FromLeftToRight,verticalMargin:0,horizontalMargin:0,matchButtonAndListboxWidths:!1};function c(e,t){return n=>{const{contentWidth:c,contentHeight:d,availableHeight:u}=n,p=(0,l.ensureNotNull)(e).getBoundingClientRect(),{horizontalAttachEdge:m=s.horizontalAttachEdge,horizontalDropDirection:f=s.horizontalDropDirection,horizontalMargin:h=s.horizontalMargin,verticalMargin:b=s.verticalMargin,matchButtonAndListboxWidths:v=s.matchButtonAndListboxWidths}=t;let y=t.verticalAttachEdge??s.verticalAttachEdge,g=t.verticalDropDirection??s.verticalDropDirection;y===o.AutoStrict&&(u<p.y+p.height+b+d?(y=o.Top,g=r.FromBottomToTop):(y=o.Bottom,g=r.FromTopToBottom));const E=y===o.Top?-1*b:b,w=m===i.Right?p.right:p.left,C=y===o.Top?p.top:p.bottom,D={x:w-(f===a.FromRightToLeft?c:0)+h,y:C-(g===r.FromBottomToTop?d:0)+E};return v&&(D.overrideWidth=p.width),D}}},23351:(e,t,n)=>{"use strict";n.d(t,{convertToDefinitionProperty:()=>r,makeProxyDefinitionProperty:()=>i});var o=n(51768);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,a={value:()=>i(e.value()),setValue:t=>{e.setValue(r(t))},subscribe:(t,n)=>{const i=e=>{n(a)};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(),n?.()}};return a}function r(e,t,n,r,a,l,s){const c=i(t.weakReference(),r,l),d=void 0!==r?void 0!==r[1]?r[1]:r[0]:e=>e,u=a??(o=>e.setProperty(t,d(o),n));return c.setValue=e=>{s&&(0,o.trackEvent)(s.category,s.event,s.label?.(e)),u(e)},c}},59411:(e,t,n)=>{"use strict";n.d(t,{createLinePropertyDefinition:()=>s});var o=n(49857),i=n(51056);const r=[i.LINESTYLE_SOLID,i.LINESTYLE_DOTTED,i.LINESTYLE_DASHED],a=[1,2,3,4],l=[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=a),void 0===n.properties.leftEnd&&void 0===n.properties.rightEnd||void 0!==n.endsValues||(n.endsValues=l),void 0!==n.properties.value&&void 0===n.valueType&&(n.valueType=1),n}},14608:(e,t,n)=>{"use strict";var o;function i(e,t){return{propType:"number",properties:e,type:1,...t}}
n.d(t,{createNumberPropertyDefinition:()=>i}),function(e){e[e.Integer=0]="Integer",e[e.Float=1]="Float"}(o||(o={}))},14139:(e,t,n)=>{"use strict";function o(e,t){return{propType:"options",properties:e,...t}}n.d(t,{createOptionsPropertyDefinition:()=>o})},32097:(e,t,n)=>{"use strict";function o(e,t){return{propType:"checkable",properties:e,notFormatedTitle:!1,...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:()=>H,convertFromWVToDefinitionProperty:()=>O,convertToDefinitionProperty:()=>z.convertToDefinitionProperty,createCheckablePropertyDefinition:()=>o,createCheckableSetPropertyDefinition:()=>i,createColorPropertyDefinition:()=>r,createCoordinatesPropertyDefinition:()=>N,createEmojiPropertyDefinition:()=>B,createImagePropertyDefinition:()=>_,createLeveledLinePropertyDefinition:()=>d,createLinePropertyDefinition:()=>a.createLinePropertyDefinition,createNumberPropertyDefinition:()=>u.createNumberPropertyDefinition,createOptionalTwoColorsPropertyDefinition:()=>P,createOptionsPropertyDefinition:()=>p.createOptionsPropertyDefinition,createPropertyDefinitionsCheckableListOptionsGroup:()=>F,createPropertyDefinitionsGeneralGroup:()=>A,createPropertyDefinitionsLeveledLinesGroup:()=>W,createRangePropertyDefinition:()=>x,createSelectionCoordinatesPropertyDefinition:()=>k,createSessionPropertyDefinition:()=>M,createStudyInputsPropertyDefinition:()=>L,createSymbolPropertyDefinition:()=>I,createTextPropertyDefinition:()=>S,createTransparencyPropertyDefinition:()=>T,createTwoColorsPropertyDefinition:()=>V,createTwoOptionsPropertyDefinition:()=>m,destroyDefinitions:()=>ae,getColorDefinitionProperty:()=>$,getLockPriceScaleDefinitionProperty:()=>Z,getPriceScaleSelectionStrategyDefinitionProperty:()=>J,getScaleRatioDefinitionProperty:()=>j,getSymbolDefinitionProperty:()=>q,isCheckableListOptionsDefinition:()=>re,isColorDefinition:()=>ne,isLineDefinition:()=>te,isOptionsDefinition:()=>ie,isPropertyDefinition:()=>Q,isPropertyDefinitionsGroup:()=>ee,isTwoColorDefinition:()=>oe,makeProxyDefinitionProperty:()=>z.makeProxyDefinitionProperty});var a=n(59411),l=n(51056);const s=[l.LINESTYLE_SOLID,l.LINESTYLE_DOTTED,l.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}var u=n(14608),p=n(14139);function m(e,t){return{propType:"twoOptions",properties:e,...t}}var f,h=n(11542),b=n(30699);!function(e){e.Horizontal="horizontal",e.Vertical="vertical"}(f||(f={}));const v=[{id:b.VerticalAlign.Top,value:b.VerticalAlign.Bottom,title:h.t(null,void 0,n(97118))},{id:b.VerticalAlign.Middle,value:b.VerticalAlign.Middle,title:h.t(null,void 0,n(68833))},{id:b.VerticalAlign.Bottom,value:b.VerticalAlign.Top,title:h.t(null,void 0,n(27567))}],y=[{id:b.HorizontalAlign.Left,value:b.HorizontalAlign.Left,title:h.t(null,void 0,n(11626))},{
id:b.HorizontalAlign.Center,value:b.HorizontalAlign.Center,title:h.t(null,void 0,n(24197))},{id:b.HorizontalAlign.Right,value:b.HorizontalAlign.Right,title:h.t(null,void 0,n(50421))}],g=[{id:"horizontal",value:"horizontal",title:h.t(null,void 0,n(95406))},{id:"vertical",value:"vertical",title:h.t(null,void 0,n(69526))}],E=[8,10,11,12,14,16,18,20,22,24,28,32,40].map((e=>({title:String(e),value:e}))),w=[1,2,3,4],C=h.t(null,void 0,n(25485)),D=h.t(null,void 0,n(67781));function S(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=E),void 0!==n.properties.alignmentVertical&&void 0===n.alignmentVerticalItems&&(n.alignmentVerticalItems=v),void 0!==n.properties.alignmentHorizontal&&void 0===n.alignmentHorizontalItems&&(n.alignmentHorizontalItems=y),(n.alignmentVerticalItems||n.alignmentHorizontalItems)&&void 0===n.alignmentTitle&&(n.alignmentTitle=C),void 0!==n.properties.orientation&&(void 0===n.orientationItems&&(n.orientationItems=g),void 0===n.orientationTitle&&(n.orientationTitle=D)),void 0!==n.properties.borderWidth&&void 0===n.borderWidthItems&&(n.borderWidthItems=w),n}function V(e,t){return{propType:"twoColors",properties:e,noAlpha1:!1,noAlpha2:!1,...t}}function P(e,t){return{propType:"optionalTwoColors",properties:e,noAlpha1:!1,noAlpha2:!1,...t}}function N(e,t){return{propType:"coordinates",properties:e,...t}}function k(e,t){return{propType:"selectionCoordinates",properties:e,...t}}function x(e,t){return{propType:"range",properties:e,...t}}function T(e,t){return{propType:"transparency",properties:e,...t}}function I(e,t){return{propType:"symbol",properties:e,...t}}function M(e,t){return{propType:"session",properties:e,...t}}function _(e,t){return{propType:"image",properties:e,...t}}function B(e,t){return{propType:"emoji",properties:e,...t}}function L(e,t){return{propType:"studyInputs",properties:e,...t}}var R=n(64147);function A(e,t,n,o){return{id:t,title:n,visible:o,groupType:"general",definitions:new R.WatchedValue(e)}}function F(e,t,n,o,i,r){return{id:o,title:i,visible:r,groupType:"checkableListOptions",checked:t,definitions:new R.WatchedValue(n),checkableListOptions:e}}function W(e,t,n){return{id:t,title:n,groupType:"leveledLines",definitions:new R.WatchedValue(e)}}var z=n(23351);function G(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,a={value:()=>i(e.value()),setValue:t=>{e.setValue?.(r(t))},subscribe:(t,n)=>{const i=()=>{n(a)};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&&(a.destroy=()=>n()),a}function O(e,t,n,o){const i=G(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 H(e,t){return function(e,t,n,o){const i=new Map,r={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())};return G(r,n,o)}(e,(e=>e),t,(()=>e.release()))}function J(e,t){const n=(0,z.makeProxyDefinitionProperty)(t.weakReference());return n.setValue=t=>e.setPriceScaleSelectionStrategy(t),n}function Z(e,t,n,o){const i=(0,z.makeProxyDefinitionProperty)(t.weakReference());return i.setValue=t=>{const i={lockScale:t};e.setPriceScaleMode(i,n,o)},i}function j(e,t,n,o){const i=(0,z.makeProxyDefinitionProperty)(t.weakReference(),o);return i.setValue=o=>{e.setScaleRatioProperty(t,o,n)},i}var K=n(24377),U=n(19063),X=n(84425);function Y(e,t){if((0,U.isHexColor)(e)){const n=(0,K.parseRgb)(e);return(0,K.rgbaToString)((0,K.rgba)(n,(100-t)/100))}return e}function $(e,t,n,o,i){let r;if(null!==n){const e=(0,X.combineProperty)(Y,t.weakReference(),n.weakReference());r=(0,z.makeProxyDefinitionProperty)(e.ownership())}else r=(0,z.makeProxyDefinitionProperty)(t.weakReference(),[()=>Y(t.value(),0),e=>e]);return r.setValue=n=>{i&&e.beginUndoMacro(o),e.setProperty(t,n,o),i&&e.endUndoMacro()},r}function q(e,t,n,o,i,r){const a=[(l=n,s=t,e=>{const t=l(s);if(e===s.value()&&null!==t){const e=t.ticker||t.full_name;if(e)return e}return e}),e=>e];var l,s;const c=(0,z.convertToDefinitionProperty)(e,t,i,a);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 Q(e){return e.hasOwnProperty("propType")}function ee(e){return e.hasOwnProperty("groupType")}function te(e){return"line"===e.propType}function ne(e){return"color"===e.propType}function oe(e){return"twoColors"===e.propType}function ie(e){return"options"===e.propType}function re(e){return"checkableListOptions"===e.groupType}function ae(e){e.forEach((e=>{if(Q(e)){Object.keys(e.properties).forEach((t=>{const n=e.properties[t];void 0!==n&&void 0!==n.destroy&&n.destroy()}))}else ae(e.definitions.value()),e.visible?.destroy()}))}},60925:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M12 4h3v1h-1.04l-.88 9.64a1.5 1.5 0 0 1-1.5 1.36H6.42a1.5 1.5 0 0 1-1.5-1.36L4.05 5H3V4h3v-.5C6 2.67 6.67 2 7.5 2h3c.83 0 1.5.67 1.5 1.5V4ZM7.5 3a.5.5 0 0 0-.5.5V4h4v-.5a.5.5 0 0 0-.5-.5h-3ZM5.05 5l.87 9.55a.5.5 0 0 0 .5.45h5.17a.5.5 0 0 0 .5-.45L12.94 5h-7.9Z"/></svg>'},44996: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>'},33765: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>'},80427:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M23 8H5V7h18v1ZM9 14H5v-1h4v1Zm3 0h4v-1h-4v1Zm11 0h-4v-1h4v1ZM7 19H5v2h2v-2Zm2 0h2v2H9v-2Zm6 0h-2v2h2v-2Zm2 0h2v2h-2v-2Zm6 0h-2v2h2v-2Z"/></svg>'},98853: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>'},43382: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>'},29285: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>'}}]);