(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[7502],{284316:e=>{e.exports={badge:"badge-PlSmolIm",content:"content-PlSmolIm","size-xsmall":"size-xsmall-PlSmolIm","size-small":"size-small-PlSmolIm","size-medium":"size-medium-PlSmolIm","size-large":"size-large-PlSmolIm","size-xlarge":"size-xlarge-PlSmolIm"}},422191:e=>{e.exports={label:"label-oHMFhnC8"}},493266:e=>{e.exports={priceLabel:"priceLabel-mpa2WWtU",list:"list-mpa2WWtU",item:"item-mpa2WWtU",selected:"selected-mpa2WWtU",input:"input-mpa2WWtU",wait:"wait-mpa2WWtU"}},556644:e=>{e.exports={absolutePriceDropdownItem:"absolutePriceDropdownItem-QDwbzjCO",price:"price-QDwbzjCO",labelsGroup:"labelsGroup-QDwbzjCO"}},647253:e=>{e.exports={container:"container-JQC67cD9",leverageButton:"leverageButton-JQC67cD9",disabledLeverageButton:"disabledLeverageButton-JQC67cD9"}},408178:e=>{e.exports={dialog:"dialog-mAVKt9Z3",dialogBody:"dialogBody-mAVKt9Z3"}},849071:e=>{e.exports={orderInfo:"orderInfo-ZCVq_FIR",title:"title-ZCVq_FIR",contentWrapper:"contentWrapper-ZCVq_FIR",right:"right-ZCVq_FIR"}},601235:e=>{e.exports={panelContainer:"panelContainer-qPQHH_hi",orderPanel:"orderPanel-qPQHH_hi"}},15425:e=>{e.exports={scrollWrapper:"scrollWrapper-XYi0nst9",content:"content-XYi0nst9",separator:"separator-XYi0nst9",controls:"controls-XYi0nst9",button:"button-XYi0nst9",warning:"warning-XYi0nst9",warning__icon:"warning__icon-XYi0nst9",error:"error-XYi0nst9"}},472804:e=>{e.exports={controlGroup:"controlGroup-HcMnXcBP",absolutePriceControl:"absolutePriceControl-HcMnXcBP",withRelative:"withRelative-HcMnXcBP",relativePriceControl:"relativePriceControl-HcMnXcBP"}},338043:e=>{e.exports={orderWidget:"orderWidget-F15FKlrH",header:"header-F15FKlrH",side:"side-F15FKlrH",doneButton:"doneButton-F15FKlrH",customField:"customField-F15FKlrH",duration:"duration-F15FKlrH",customFieldsWrapper:"customFieldsWrapper-F15FKlrH",separator:"separator-F15FKlrH",resizeHandler:"resizeHandler-F15FKlrH",orderTicket:"orderTicket-F15FKlrH",orderInfoAndSeparator:"orderInfoAndSeparator-F15FKlrH",topWrapper:"topWrapper-F15FKlrH",centerBlock:"centerBlock-F15FKlrH","brackets-wrapper":"brackets-wrapper-F15FKlrH",brackets:"brackets-F15FKlrH",quantityWrapper:"quantityWrapper-F15FKlrH",leverage:"leverage-F15FKlrH",screenWithKeyholeIcon:"screenWithKeyholeIcon-F15FKlrH",sadScreenIcon:"sadScreenIcon-F15FKlrH",emptyStateBlockWrapper:"emptyStateBlockWrapper-F15FKlrH",scrollWrapper:"scrollWrapper-F15FKlrH"}},48486:e=>{e.exports={priceLabel:"priceLabel-s5LgTmXf",ask:"ask-s5LgTmXf",bid:"bid-s5LgTmXf",last:"last-s5LgTmXf"}},954568:e=>{e.exports={progressBarContainer:"progressBarContainer-Zcxs1Uvi",marginsContainer:"marginsContainer-Zcxs1Uvi",margin:"margin-Zcxs1Uvi",title:"title-Zcxs1Uvi",price:"price-Zcxs1Uvi",usedMargin:"usedMargin-Zcxs1Uvi",progressBar:"progressBar-Zcxs1Uvi",track:"track-Zcxs1Uvi",progress:"progress-Zcxs1Uvi",fullFilled:"fullFilled-Zcxs1Uvi",marginOverflow:"marginOverflow-Zcxs1Uvi",wait:"wait-Zcxs1Uvi"}},115356:e=>{e.exports={calculator:"calculator-vLRZh3q9",
calculatorWithInput:"calculatorWithInput-vLRZh3q9",input:"input-vLRZh3q9",buttonsWrapper:"buttonsWrapper-vLRZh3q9",buttonWithOperation:"buttonWithOperation-vLRZh3q9",buttonIcon:"buttonIcon-vLRZh3q9"}},368173:e=>{e.exports={menuBox:"menuBox-rm7KgfIT"}},460337:e=>{e.exports={wrapper:"wrapper-IWgXIGoE",label:"label-IWgXIGoE",wait:"wait-IWgXIGoE",title:"title-IWgXIGoE",popupMenuItem:"popupMenuItem-IWgXIGoE",value:"value-IWgXIGoE"}},433199:e=>{e.exports={wrapper:"wrapper-Gt0vOpyz",control:"control-Gt0vOpyz",label:"label-Gt0vOpyz",units:"units-Gt0vOpyz",single:"single-Gt0vOpyz",calculatorIcon:"calculatorIcon-Gt0vOpyz",isOpened:"isOpened-Gt0vOpyz",risk:"risk-Gt0vOpyz",wait:"wait-Gt0vOpyz"}},78007:e=>{e.exports={pipsLabel:"pipsLabel-oAJwOoJe",openButton:"openButton-oAJwOoJe",iconWrapper:"iconWrapper-oAJwOoJe",openIcon:"openIcon-oAJwOoJe",wait:"wait-oAJwOoJe",opened:"opened-oAJwOoJe",list:"list-oAJwOoJe",item:"item-oAJwOoJe",selected:"selected-oAJwOoJe",input:"input-oAJwOoJe"}},968625:e=>{e.exports={relativePriceDropdownItem:"relativePriceDropdownItem-L1mdgTgI",price:"price-L1mdgTgI"}},698368:e=>{e.exports={restrictions:"restrictions-kbYnGQgu",restriction:"restriction-kbYnGQgu",hardToBorrow:"hardToBorrow-kbYnGQgu",halted:"halted-kbYnGQgu"}},120693:e=>{e.exports={restrictions:"restrictions-B5GOsH7j",smallPaddings:"smallPaddings-B5GOsH7j",sideControl:"sideControl-B5GOsH7j",section:"section-B5GOsH7j",active:"active-B5GOsH7j",sell:"sell-B5GOsH7j",buy:"buy-B5GOsH7j",title:"title-B5GOsH7j",typeSide:"typeSide-B5GOsH7j",value:"value-B5GOsH7j",valueNoData:"valueNoData-B5GOsH7j",spread:"spread-B5GOsH7j",isLongValue:"isLongValue-B5GOsH7j",disable:"disable-B5GOsH7j"}},672273:e=>{e.exports={tabsContainer:"tabsContainer-zC5M0yfs"}},860015:e=>{e.exports={wrap:"wrap-ne5qGlZh",icon:"icon-ne5qGlZh",text:"text-ne5qGlZh",disabled:"disabled-ne5qGlZh"}},982434:e=>{e.exports={scrollWrap:"scrollWrap-FaOvTD2r"}},252693:e=>{e.exports={container:"container-Tv7LSjUz",overlayScrollWrap:"overlayScrollWrap-Tv7LSjUz",wrapper:"wrapper-Tv7LSjUz"}},977253:e=>{e.exports={wrap:"wrap-vSb6C0Bj","wrap--horizontal":"wrap--horizontal-vSb6C0Bj",bar:"bar-vSb6C0Bj",barInner:"barInner-vSb6C0Bj","barInner--horizontal":"barInner--horizontal-vSb6C0Bj","bar--horizontal":"bar--horizontal-vSb6C0Bj"}},805184:(e,t,r)=>{"use strict";r.d(t,{Button:()=>c});var s=r(50959),o=r(171529);function n(e="default"){switch(e){case"default":return"primary";case"stroke":return"secondary"}}function i(e="primary"){switch(e){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function a(e="m"){switch(e){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}function l(e){const{intent:t,size:r,appearance:s,useFullWidth:o,icon:l,...c}=e;return{...c,color:i(t),size:a(r),variant:n(s),stretch:o,startIcon:l}}function c(e){return s.createElement(o.SquareButton,{...l(e)})}},463039:(e,t,r)=>{"use strict";r.d(t,{Label:()=>l});var s=r(50959),o=r(497754),n=r.n(o),i=r(102691),a=r(422191);function l(e){
const{htmlFor:t,children:r,className:o,id:l,...c}=e;return s.createElement(i.BeforeSlot,{...c,className:n()(a.label,o)},s.createElement("label",{id:l,htmlFor:t},r))}},252130:(e,t,r)=>{"use strict";r.d(t,{useIsMounted:()=>o});var s=r(50959);const o=()=>{const e=(0,s.useRef)(!1);return(0,s.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e}},129018:(e,t,r)=>{"use strict";r.d(t,{QuantityCalculator:()=>M});var s=r(50959),o=r(960521),n=r(624216),i=r(510618),a=r(493173),l=r(529719),c=r(497754),u=r.n(c),d=r(609838),p=r(180185),h=r(72571),m=r(463039),v=r(380327),f=r(99708),g=r(587125),b=r(600297),C=r(218666),y=r(96634),E=r(115589),_=r(672197),S=r(115356);const w={isGrouped:!1,cellState:{isTop:!1,isRight:!1,isBottom:!1,isLeft:!1}};function k(e){const{min:t,max:o,step:n,uiStep:i,reference:a,withInput:l,valueInput:c,onChangeValueInput:k,onClick:P,onClose:O,onInputClick:M}=e,[N,I]=(0,s.useState)(!1),[B,T]=(0,s.useState)(void 0),[x,D]=(0,s.useState)(!1),F=(0,s.useRef)(null),H=(0,s.useCallback)((e=>{const r={min:t,max:o,step:n},s=(0,f.checkQtyError)(r,e,!0),i=x||s.res,a=x?undefined:s.msg;I(i),T(a)}),[x,t,o,n]);function L(e,t){var r;null===(r=F.current)||void 0===r||r.blur(),P(e,t)}return(0,s.useEffect)((()=>{H(c)}),[H,c]),s.createElement("div",{className:u()(S.calculator,l&&S.calculatorWithInput),tabIndex:-1,ref:a,onKeyDown:e=>{c&&!N&&13===(0,p.hashFromEvent)(e)&&O()}},l&&s.createElement(s.Fragment,null,s.createElement(m.Label,{htmlFor:"calculator-input"},d.t(null,void 0,r(766596))),s.createElement(g.NumberInput,{id:"calculator-input",inputReference:e=>F.current=e,className:S.input,value:c,max:o,min:t,step:n,uiStep:i,mode:"float",error:N,errorMessage:B,errorHandler:function(e){D(e)},onValueChange:k,onClick:M,alwaysUpdateValueFromProps:!0})),s.createElement(v.ControlGroupContext.Provider,{value:w},s.createElement("div",{className:S.buttonsWrapper},s.createElement(b.Button,{value:-n,buttonType:b.ButtonType.IncDec,icon:s.createElement(h.Icon,{className:S.buttonIcon,icon:y}),onClick:L,className:S.buttonWithOperation}),s.createElement(b.Button,{value:n,buttonType:b.ButtonType.IncDec,icon:s.createElement(h.Icon,{className:S.buttonIcon,icon:C}),onClick:L,className:S.buttonWithOperation}),s.createElement(b.Button,{value:1,buttonType:b.ButtonType.PlusValue,onClick:L}),s.createElement(b.Button,{value:5,buttonType:b.ButtonType.PlusValue,onClick:L}),s.createElement(b.Button,{value:25,buttonType:b.ButtonType.PlusValue,onClick:L}),s.createElement(b.Button,{value:100,buttonType:b.ButtonType.PlusValue,onClick:L}),s.createElement(b.Button,{value:500,buttonType:b.ButtonType.PlusValue,onClick:L}),s.createElement(b.Button,{value:1e3,buttonType:b.ButtonType.PlusValue,onClick:L}),s.createElement(b.Button,{value:0,buttonType:b.ButtonType.Clear,icon:s.createElement(h.Icon,{className:S.buttonIcon,icon:E}),onClick:L}),s.createElement(b.Button,{value:t||n,buttonType:b.ButtonType.Default,icon:s.createElement(h.Icon,{className:S.buttonIcon,icon:_}),onClick:L}))))}var P=r(368173);const O=(0,a.mergeThemes)(i.DEFAULT_MENU_THEME,{menuBox:P.menuBox})
;class M extends s.PureComponent{constructor(e){super(e),this._setCalcRef=e=>{this.props.calcReference&&this.props.calcReference(e)},this._calculatorStepHandler=(e,t)=>{const{min:r,max:s,uiStep:n,trackEventTarget:i,trackEvent:a}=this.props;if(void 0!==a&&void 0!==i&&a(i,"Calculator Button",(0,l.prepareCalculatorEventText)(e,t)),t===b.ButtonType.Clear||t===b.ButtonType.Default)return this._updateValueByCalc(e);const c=this.props.valueGetter();if(null===c)return;let u=Number((0,o.Big)(c).plus(e));if((u<r||s<u)&&t!==b.ButtonType.IncDec)return this._updateValueByCalc(c);if(t===b.ButtonType.IncDec){if(u=this._calcByStep(c,e,r,n),s<u)return this._updateValueByCalc(s);if(u<r)return this._updateValueByCalc(r)}return this._updateValueByCalc(u)},this._updateValueByCalc=e=>{var t,r;this._handlerValueInput(e),this.props.onValueChange(e,!0),void 0!==this.props.errorHandler&&this.props.errorHandler(!1),this.props.calculatorUsedStat&&this.props.calculatorUsedStat(),null===(r=(t=this.props).onFocus)||void 0===r||r.call(t)},this._onInputClick=()=>{const{trackEventTarget:e,trackEvent:t}=this.props;void 0!==t&&void 0!==e&&t(e,"Calculator Input","Quantity input field")},this.state={valueInput:e.valueGetter()},this._handlerValueInput=this._handlerValueInput.bind(this)}render(){const{min:e,max:t,step:r,uiStep:o,withInput:i,targetEl:a,position:l,onClose:c,onClickOutside:u,onKeyboardClose:d}=this.props;return s.createElement(n.PopupMenu,{isOpened:!0,onClose:c,onClickOutside:u,onKeyboardClose:d,position:l,doNotCloseOn:a,theme:O},s.createElement(k,{min:e,max:t,step:r,uiStep:o,withInput:i,reference:this._setCalcRef,valueInput:this.state.valueInput,onChangeValueInput:this._updateValueByCalc,onClick:this._calculatorStepHandler,onClose:c,onInputClick:this._onInputClick}))}_calcByStep(e,t,r,s){const n=Math.sign(t),i=Math.abs(null!=s?s:t),a=new o.Big(e),l=a.minus(r).mod(t);let c=a.plus(n*i);return l.eq(0)||(c=c.plus((n>0?0:1)*i).minus(l)),c.toNumber()}_handlerValueInput(e){this.setState({valueInput:e})}}},27950:(e,t,r)=>{"use strict";r.d(t,{EditButton:()=>l});var s=r(50959),o=r(497754),n=r(72571),i=r(610600),a=r(860015);function l(e){const{value:t,onClick:r,className:l,startSlot:c,disabled:u=!1}=e;return s.createElement("div",{className:o(a.wrap,u&&a.disabled,l),onClick:r,"data-name":"edit-button"},s.createElement("div",{className:o(a.text,"apply-overflow-tooltip")},void 0!==c&&c,s.createElement("span",null,t)),s.createElement(n.Icon,{icon:i,className:a.icon}))}},73288:(e,t,r)=>{"use strict";r.d(t,{OverlayScrollContainer:()=>v});var s=r(50959),o=r(497754),n=r.n(o),i=r(710263),a=r(650151),l=r(44681);const c=r(977253),u={0:{isHorizontal:!1,isNegative:!1,sizePropName:"height",minSizePropName:"minHeight",startPointPropName:"top",currentMousePointPropName:"clientY",progressBarTransform:"translateY"},1:{isHorizontal:!0,isNegative:!1,sizePropName:"width",minSizePropName:"minWidth",startPointPropName:"left",currentMousePointPropName:"clientX",progressBarTransform:"translateX"},2:{isHorizontal:!0,isNegative:!0,sizePropName:"width",
minSizePropName:"minWidth",startPointPropName:"right",currentMousePointPropName:"clientX",progressBarTransform:"translateX"}},d=40;function p(e){const{size:t,scrollSize:r,clientSize:o,scrollProgress:i,onScrollProgressChange:p,scrollMode:h,theme:m=c,onDragStart:v,onDragEnd:f,minBarSize:g=d}=e,b=(0,s.useRef)(null),C=(0,s.useRef)(null),[y,E]=(0,s.useState)(!1),_=(0,s.useRef)(0),{isHorizontal:S,isNegative:w,sizePropName:k,minSizePropName:P,startPointPropName:O,currentMousePointPropName:M,progressBarTransform:N}=u[h];(0,s.useEffect)((()=>{const e=(0,a.ensureNotNull)(b.current).ownerDocument;return y?(v&&v(),e&&(e.addEventListener("mousemove",W),e.addEventListener("mouseup",V))):f&&f(),()=>{e&&(e.removeEventListener("mousemove",W),e.removeEventListener("mouseup",V))}}),[y]);const I=t/r||0,B=o*I||0,T=Math.max(B,g),x=(t-T)/(t-B),D=r-t,F=w?-D:0,H=w?0:D,L=z((0,l.clamp)(i,F,H))||0;return s.createElement("div",{ref:b,className:n()(m.wrap,S&&m["wrap--horizontal"]),style:{[k]:t},onMouseDown:function(e){if(e.isDefaultPrevented())return;e.preventDefault();const t=R(e.nativeEvent,(0,a.ensureNotNull)(b.current)),r=Math.sign(t),s=(0,a.ensureNotNull)(C.current).getBoundingClientRect();_.current=r*s[k]/2;let o=Math.abs(t)-Math.abs(_.current);const n=z(D);o<0?(o=0,_.current=t):o>n&&(o=n,_.current=t-r*n);p(K(r*o)),E(!0)}},s.createElement("div",{ref:C,className:n()(m.bar,S&&m["bar--horizontal"]),style:{[P]:g,[k]:T,transform:`${N}(${L}px)`},onMouseDown:function(e){e.preventDefault(),_.current=R(e.nativeEvent,(0,a.ensureNotNull)(C.current)),E(!0)}},s.createElement("div",{className:n()(m.barInner,S&&m["barInner--horizontal"])})));function W(e){const t=R(e,(0,a.ensureNotNull)(b.current))-_.current;p(K(t))}function V(){E(!1)}function R(e,t){const r=t.getBoundingClientRect()[O];return e[M]-r}function z(e){return e*I*x}function K(e){return e/I/x}}var h=r(522224),m=r(982434);function v(e){const{reference:t,className:r,containerHeight:n=0,containerWidth:a=0,contentHeight:l=0,contentWidth:c=0,scrollPosTop:u=0,scrollPosLeft:d=0,onVerticalChange:v,onHorizontalChange:f,visible:g}=e,[b,C]=(0,h.useHover)(),[y,E]=(0,s.useState)(!1),_=n<l,S=a<c,w=_&&S?8:0;return s.createElement("div",{...C,ref:t,className:o(r,m.scrollWrap),style:{visibility:g||b||y?"visible":"hidden"}},_&&s.createElement(p,{size:n-w,scrollSize:l-w,clientSize:n-w,scrollProgress:u,onScrollProgressChange:function(e){v&&v(e)},onDragStart:k,onDragEnd:P,scrollMode:0}),S&&s.createElement(p,{size:a-w,scrollSize:c-w,clientSize:a-w,scrollProgress:d,onScrollProgressChange:function(e){f&&f(e)},onDragStart:k,onDragEnd:P,scrollMode:(0,i.isRtl)()?2:1}));function k(){E(!0)}function P(){E(!1)}}},109955:(e,t,r)=>{"use strict";r.d(t,{OverlayScrollWrapper:()=>c});var s=r(50959),o=r(497754),n=r.n(o),i=r(73288),a=r(139043),l=r(252693);function c(e){const{children:t,className:r,reference:o,hasCustomTouchScrollAnimation:c,scrollContainerRef:u,isForceVisible:d,...p}=e,[h,m,v,f]=(0,a.useOverlayScroll)(u,c);return(0,s.useImperativeHandle)(o,(()=>({updateScrollState:f}))),s.createElement("div",{...p,...m,
className:n()(l.container,r)},s.createElement(i.OverlayScrollContainer,{...h,visible:null!=d?d:h.visible,className:l.overlayScrollWrap}),s.createElement("div",{className:l.wrapper,ref:v,onScroll:f},t))}},139043:(e,t,r)=>{"use strict";r.d(t,{useOverlayScroll:()=>l});var s=r(50959),o=r(650151),n=r(522224),i=r(601227);const a={onMouseOver:()=>{},onMouseOut:()=>{}};function l(e,t=i.CheckMobile.any()){const r=(0,s.useRef)(null),l=e||(0,s.useRef)(null),[c,u]=(0,n.useHover)(),[d,p]=(0,s.useState)({reference:r,containerHeight:0,containerWidth:0,contentHeight:0,contentWidth:0,scrollPosTop:0,scrollPosLeft:0,onVerticalChange:function(e){p((t=>({...t,scrollPosTop:e}))),(0,o.ensureNotNull)(l.current).scrollTop=e},onHorizontalChange:function(e){p((t=>({...t,scrollPosLeft:e}))),(0,o.ensureNotNull)(l.current).scrollLeft=e},visible:c}),h=(0,s.useCallback)((()=>{if(!l.current)return;const{clientHeight:e,scrollHeight:t,scrollTop:s,clientWidth:o,scrollWidth:n,scrollLeft:i}=l.current,a=r.current?r.current.offsetTop:0;p((r=>({...r,containerHeight:e-a,contentHeight:t-a,scrollPosTop:s,containerWidth:o,contentWidth:n,scrollPosLeft:i})))}),[]);function m(){p((e=>({...e,scrollPosTop:(0,o.ensureNotNull)(l.current).scrollTop,scrollPosLeft:(0,o.ensureNotNull)(l.current).scrollLeft})))}return(0,s.useEffect)((()=>{c&&h(),p((e=>({...e,visible:c})))}),[c]),(0,s.useEffect)((()=>{const e=l.current;return e&&e.addEventListener("scroll",m),()=>{e&&e.removeEventListener("scroll",m)}}),[l]),[d,t?a:u,l,h]}},327871:(e,t,r)=>{"use strict";r.d(t,{KeyCode:()=>s,makeKeyboardListener:()=>i});var s,o=r(50959);!function(e){e[e.Enter=13]="Enter",e[e.Space=32]="Space",e[e.Backspace=8]="Backspace",e[e.DownArrow=40]="DownArrow",e[e.UpArrow=38]="UpArrow",e[e.RightArrow=39]="RightArrow",e[e.LeftArrow=37]="LeftArrow",e[e.Escape=27]="Escape",e[e.Tab=9]="Tab"}(s||(s={}));class n{constructor(){this._handlers=new Map}registerHandlers(e){Object.keys(e).forEach((t=>{const r=parseInt(t);let s=e[r];if(Array.isArray(s)||(s=[s]),this._handlers.has(r)){const e=this._handlers.get(r);e&&s.forEach((t=>e.add(t)))}else this._handlers.set(r,new Set(s))}))}unregisterHandlers(e){Object.keys(e).forEach((t=>{const r=parseInt(t);let s=e[r];if(Array.isArray(s)||(s=[s]),this._handlers.has(r)){const e=this._handlers.get(r);e&&s.forEach((t=>e.delete(t)))}}))}deleteAllHandlers(){this._handlers=new Map}registerHandler(e,t){if(this._handlers.has(e)){const r=this._handlers.get(e);r&&r.add(t)}else this._handlers.set(e,new Set([t]))}unregisterHandler(e,t){if(this._handlers.has(e)){const r=this._handlers.get(e);r&&r.delete(t)}}listen(e){if(this._handlers.has(e.keyCode)){const t=this._handlers.get(e.keyCode);t&&t.forEach((t=>t(e)))}}}function i(e){var t,r,s;return(s=class extends o.PureComponent{constructor(e){super(e),this._keyboardListener=new n,this._listener=this._keyboardListener.listen.bind(this._keyboardListener)}componentDidMount(){this._registerHandlers(this.props.keyboardEventHandlers)}componentDidUpdate(e){
e.keyboardEventHandlers!==this.props.keyboardEventHandlers&&this._registerHandlers(this.props.keyboardEventHandlers)}render(){const{keyboardEventHandlers:t,...r}=this.props;return o.createElement(e,{...r,onKeyDown:this._listener})}_registerHandlers(e){e&&(this._keyboardListener.deleteAllHandlers(),this._keyboardListener.registerHandlers(e))}}).displayName=`KeyboardListener(${null!==(r=null!==(t=e.displayName)&&void 0!==t?t:e.name)&&void 0!==r?r:"Component"})`,s}},618997:(e,t,r)=>{"use strict";r.r(t),r.d(t,{closeOrderDialog:()=>Gt,mountOrderPanel:()=>qt,showOrderDialog:()=>Zt,unmountOrderPanel:()=>Ut});var s,o=r(50959),n=r(500962),i=r(497754),a=r.n(i),l=r(870122),c=r(586639),u=r(601227),d=r(171529),p=r(273388),h=r(650151),m=r(662941),v=r(661851),f=r(901317),g=r(180185),b=r(609838),C=r(156963),y=r(6835),E=r(322625),_=r(363111);!function(e){e.XSmall="xsmall",e.Small="small",e.Medium="medium",e.Large="large",e.XLarge="xlarge"}(s||(s={}));var S=r(284316),w=r.n(S);function k(e){const{size:t=s.Medium,className:r,isPaidBadge:o}=e;return a()(!o&&w().badge,t&&w()[`size-${t}`],r)}function P(e){const{children:t,contentClassName:r}=e;return o.createElement("span",{className:a()(w().content,r)},t)}function O(e){const{size:t=s.Medium,children:r,className:n,contentClassName:i,...a}=e;return o.createElement("span",{...a,className:k({size:t,className:n})},o.createElement(P,{contentClassName:i},r))}var M=r(656846),N=r(698368);function I(e){return e===M.RestrictionType.HardToBorrow?N.hardToBorrow:e===M.RestrictionType.Halted?N.halted:null}function B(e){return o.createElement("div",{className:N.restrictions},e.restrictionTypes.map(((e,t)=>o.createElement(O,{key:t,size:s.XSmall,className:a()(N.restriction,I(e))},e))))}var T=r(120693);const x=b.t(null,void 0,r(392553)),D=b.t(null,void 0,r(618156)),F=b.t(null,void 0,r(93875));class H extends o.PureComponent{constructor(e){super(e),this._isLongValue=!1,this._maxDigitsNumber=7,this._createClickHandler=e=>()=>this.props.onSideChanged(e),this._isLongValue=Boolean(this.props.quotes.spread&&this.props.quotes.spread.toString().length>this._maxDigitsNumber||this.props.quotes.ask&&this.props.quotes.ask.toString().length>this._maxDigitsNumber)}render(){const e=i(T.sideControl,[_.OrderPanelStatus.Editing,_.OrderPanelStatus.Preview].includes(this.props.status)&&T.disable),t=i(T.section,T.sell,this.props.status!==_.OrderPanelStatus.Wait&&-1===this.props.side&&T.active),r=i(T.section,T.buy,this.props.status!==_.OrderPanelStatus.Wait&&1===this.props.side&&T.active),s=this.props.quotes.bid?o.createElement("div",null,this.props.quotes.bid):o.createElement("div",{className:T.valueNoData},F),n=this.props.quotes.ask?o.createElement("div",null,this.props.quotes.ask):o.createElement("div",{className:T.valueNoData},F);return o.createElement(o.Fragment,null,0!==this.props.restrictionTypes.length&&o.createElement("div",{className:i(T.restrictions,T.smallPaddings)},o.createElement(B,{restrictionTypes:this.props.restrictionTypes})),o.createElement("div",{className:e},o.createElement("div",{className:t,
onClick:this._createClickHandler(-1),tabIndex:-1,"data-name":"side-control-sell"},o.createElement("div",{className:T.title},o.createElement("span",{className:this.props.currencyForCrypto&&T.typeSide},x),this.props.currencyForCrypto&&o.createElement("span",null,this.props.currencyForCrypto)),o.createElement("div",{className:T.value},s)),o.createElement("div",{className:r,onClick:this._createClickHandler(1),tabIndex:-1,"data-name":"side-control-buy"},o.createElement("div",{className:T.title},o.createElement("span",{className:this.props.currencyForCrypto&&T.typeSide},D),this.props.currencyForCrypto&&o.createElement("span",{className:T.typeSide},this.props.currencyForCrypto)),o.createElement("div",{className:T.value},n)),this.props.quotes.spread&&o.createElement("div",{className:i(T.spread,this._isLongValue&&T.isLongValue),"data-name":"side-control-spread"},this.props.quotes.spread)))}}function L(e){const{model:t,disabled:r}=e,s=(0,v.useObservable)(t.value$,t.getValue()),n=(0,v.useObservable)(t.formattedQuotes$,t.getFormattedQuotes()),i=(0,v.useObservable)(t.restrictionTypes$,t.getRestrictionTypes()),[a]=(0,f.useWatchedValue)(t.status);return o.createElement(H,{quotes:n,side:s,status:a,restrictionTypes:i,currencyForCrypto:t.baseCurrency,onSideChanged:e=>{r||(t.setValue(e),t.onControlFocused.fire())}})}var W=r(72571),V=r(805184),R=r(564245),z=r(109955),K=r(297265),A=r(15425),Z=r(364366);const G={cancel:b.t(null,void 0,r(620036)),sendOrder:b.t(null,void 0,r(493472))};function q(e){const t=(0,o.useRef)(null),r=(0,K.useWatchedValueReadonly)({watchedValue:e.loading}),s=(0,K.useWatchedValueReadonly)({watchedValue:e.model.infoTableQuotesData()});(0,o.useEffect)((()=>{var e;return null===(e=t.current)||void 0===e?void 0:e.focus()}),[r]);const n=o.createElement(R.InfoTable,{rows:s.rows,header:s.header}),i=o.createElement(R.InfoTable,{rows:e.model.infoTableOrderData().rows,header:e.model.infoTableOrderData().header}),a=e.model.infoTableCustomData().map(((e,t)=>o.createElement(R.InfoTable,{key:`custom-${t}`,rows:e.rows,header:e.header}))),l=0!==e.model.warnings.length&&o.createElement("div",{className:A.warning},o.createElement(W.Icon,{className:A.warning__icon,icon:Z}),o.createElement("div",null,e.model.warnings.map((e=>o.createElement("div",{key:e},e))))),c=0!==e.model.errors.length,u=c&&o.createElement("div",{className:A.error},e.model.errors.map((e=>o.createElement("div",{key:e},e))));return o.createElement(o.Fragment,null,o.createElement(z.OverlayScrollWrapper,{className:A.scrollWrapper},o.createElement("div",{className:A.content},n,o.createElement("div",{className:A.separator}),i,0!==a.length&&o.createElement("div",{className:A.separator}),a,u,l)),o.createElement("div",{className:A.controls},o.createElement("div",{className:A.button},o.createElement(V.Button,{useFullWidth:!0,size:"l",intent:-1===e.side?"danger":"primary",onClick:e.model.onPlaceClick,reference:t,disabled:c||r},G.sendOrder)),o.createElement("div",{className:A.button},o.createElement(V.Button,{useFullWidth:!0,size:"l",intent:"default",appearance:"stroke",
onClick:e.model.onCancelClick},G.cancel))))}var U=r(873637),$=r(672273);const Q=b.t(null,void 0,r(359758)),j=b.t(null,void 0,r(398157)),X=b.t(null,void 0,r(905023)),Y=b.t(null,void 0,r(802654)),J={Market:2,Limit:1,Stop:3,StopLimit:4};function ee(e){const{orderType:t,setOrderType:r,disabled:s,supportMarketOrders:n,supportLimitOrders:i,supportStopOrders:a,supportStopLimitOrders:l}=e,c=(0,o.useMemo)((()=>function(e){const{supportMarketOrders:t,supportLimitOrders:r,supportStopOrders:s,supportStopLimitOrders:o}=e,n=[];return t&&n.push({id:"Market",label:Q}),r&&n.push({id:"Limit",label:j}),s&&n.push({id:"Stop",label:X}),o&&n.push({id:"StopLimit",label:Y}),n}({supportMarketOrders:n,supportLimitOrders:i,supportStopOrders:a,supportStopLimitOrders:l})),[n,i,a,l]),u=(0,o.useCallback)((e=>J[e.id]===t),[t]);return o.createElement("div",{className:$.tabsContainer,tabIndex:-1},o.createElement(U.UnderlineButtonTabs,{id:"order-type-tabs",items:c,isActive:u,onActivate:e=>r(J[e.id]),size:"xsmall",disabled:s,overflowBehaviour:"none",stretchTabs:!0,equalTabSize:!0}))}var te=r(788865),re=r(380327),se=r(587125),oe=r(476853),ne=r(738036),ie=r(129018),ae=r(972535),le=r(914987),ce=r(433199);class ue extends o.PureComponent{constructor(e){super(e),this._control=null,this._input=null,this._calc=null,this._getCurrentValue=()=>this.props.value||0,this._getDropdownPosition=()=>(0,oe.getPopupPositioner)(this._control,{horizontalAttachEdge:oe.HorizontalAttachEdge.Right,horizontalDropDirection:oe.HorizontalDropDirection.FromRightToLeft}),this._handleCalculatorFocus=()=>{ae.mobiletouch||null===this._input||this._input.focus()},this._setRef=e=>{this._control=e},this._setCalcRef=e=>{this._calc=e},this._setInputRef=e=>{this._input=e},this._onKeyDown=e=>{!this.state.isOpened||13!==e.keyCode&&27!==e.keyCode||(e.stopPropagation(),this.setState({isOpened:!1})),Object.values(_.CalculatorDecKeyCodes).includes(e.keyCode)||Object.values(_.CalculatorIncKeyCodes).includes(e.keyCode)||this.setState({isOpened:!1}),this.props.onKeyDown&&this.props.onKeyDown(e)},this._onClickOutside=e=>{this._calc&&!this._calc.contains(e.target)&&this.setState({isOpened:!1})},this._updateValue=e=>{this.props.onValueChange(e)},this._toggle=()=>{this.setState((e=>({isOpened:!e.isOpened})))},this._setInputFocus=e=>{null!==e&&(e.focus(),e.setSelectionRange(e.value.length,e.value.length))},this.state={isOpened:!1}}componentDidMount(){5===this.props.focus&&this._setInputFocus(this._input)}render(){const{min:e,max:t,step:r,uiStep:s,error:n,errorMessage:a,className:l,errorHandler:c,highlight:u,highlightRemoveRoundBorder:d,intent:p,fontSizeStyle:h,...m}=this.props,v=o.createElement(W.Icon,{icon:le,className:i(ce.calculatorIcon,this.state.isOpened&&ce.isOpened),onClick:this._toggle});return o.createElement(ne.OutsideEvent,{click:!0,mouseDown:!0,touchStart:!0,handler:this._onClickOutside},(i=>o.createElement("span",{ref:i},o.createElement(se.NumberInput,{value:this.props.value||0,alwaysUpdateValueFromProps:!0,shouldApplyValueOnBlur:!1,formatter:this.props.formatter,className:l,
containerReference:this._setRef,inputReference:this._setInputRef,button:v,onValueChange:this._updateValue,onFocus:this.props.onFocus,onBlur:this.props.onBlur,onKeyDown:this._onKeyDown,error:n,errorMessage:a,errorHandler:c,min:e,max:t,step:r,uiStep:s,controlDecKeyCodes:this.state.isOpened?[_.CalculatorDecKeyCodes.Minus,_.CalculatorDecKeyCodes.NumMinus,_.CalculatorDecKeyCodes.FirefoxMinus]:void 0,controlIncKeyCodes:this.state.isOpened?[_.CalculatorIncKeyCodes.Plus,_.CalculatorIncKeyCodes.NumPlus,_.CalculatorIncKeyCodes.FirefoxPlus]:void 0,highlight:u,highlightRemoveRoundBorder:d,intent:p,fontSizeStyle:h}),this.state.isOpened&&o.createElement(ie.QuantityCalculator,{...m,min:e,max:t,step:r,uiStep:s,valueGetter:this._getCurrentValue,position:this._getDropdownPosition(),targetEl:this._control,calcReference:this._setCalcRef,onClose:this._toggle,onFocus:this._handleCalculatorFocus,errorHandler:c,trackEventTarget:"Order Ticket"}))))}}function de(e){const{control:t,focus:r,min:s,max:n,step:a,uiStep:l,type:c,error:u,errorMessage:d,errorHandler:p,label:h,formatter:m,className:f,status:g,trackEvent:b,highlight:C,highlightRemoveRoundBorder:y,intent:E,fontSizeStyle:S}=e,w=(0,v.useObservable)(t.value$,t.getValue()),k=()=>{e.onFocus&&e.onFocus(c)},P={value:w||0,step:a,uiStep:l,className:i(ce.input,g===_.OrderPanelStatus.Wait&&ce.wait),error:u,errorMessage:d,errorHandler:p,onFocus:k,formatter:m,onValueChange:e=>{k(),t.setValue(e),t.onModifiedCallback()},calculatorUsedStat:()=>t.calculatorUsedStat(),highlight:C,highlightRemoveRoundBorder:y,intent:E,fontSizeStyle:S},O=n||9e15,M=0===c?o.createElement(ue,{...P,focus:r,min:s||a,max:O,trackEvent:b}):o.createElement(se.NumberInput,{...P,step:.01,min:s,max:O});return o.createElement("div",{className:i(f,ce.control)},o.createElement("div",{className:ce.label}," ",h," "),M)}var pe=r(895318);const he=b.t(null,void 0,r(563833)),me=b.t(null,void 0,r(125933)),ve=b.t(null,void 0,r(357653));class fe extends o.PureComponent{constructor(e){super(e),this._subscriptions=[],this._onFocus=e=>{e!==this.props.model.getFocusedControl()&&this.props.model.setFocusedControl(e),this.props.model.onControlFocused.fire()},this._errorHandler=e=>{this.props.model.setControlError(e)},this._callback=()=>this.forceUpdate()}componentDidMount(){this._subscribeToModel(this.props.model)}componentWillUnmount(){this._unsubscribeFromModel()}render(){var e;const t=this.context,{model:r,symbolHasLotSize:s,status:n,trackEvent:a,focus:l}=this.props,c=r.getError(),u={errorHandler:this._errorHandler,error:c,status:n,onFocus:this._onFocus,trackEvent:a,fontSizeStyle:"medium"},d=Boolean(c&&c.res),p=c&&c.msg,h=r.showRiskControls&&r.isRiskAvailable()&&(t.showPercentRiskInQty||t.showCurrencyRiskInQty);return o.createElement(o.Fragment,null,o.createElement(re.ControlGroupContext.Provider,{value:this._getGroupContextValue(!0,!h)},o.createElement(de,{...u,...this._generateHighlightProps(0),control:r.quantity,min:r.qty.min,max:r.qty.max,step:r.qty.step,uiStep:r.qty.uiStep,type:0,formatter:r.formatter,
label:null!==(e=r.units)&&void 0!==e?e:s?ve:me,className:i(!h&&ce.single,ce.units),focus:l,error:d&&this._isSelectedControl(0),errorMessage:p})),h&&o.createElement("div",{className:ce.risk},r.riskInCurrency&&t.showCurrencyRiskInQty&&o.createElement(re.ControlGroupContext.Provider,{value:this._getGroupContextValue(!1,!t.showPercentRiskInQty)},o.createElement(de,{...u,...this._generateHighlightProps(1),control:r.riskInCurrency,step:r.riskStep,type:1,formatter:r.riskInCurrencyFormatter,label:r.currency+" "+he,error:d&&this._isSelectedControl(1),errorMessage:p})),r.riskInPercent&&t.showPercentRiskInQty&&o.createElement(re.ControlGroupContext.Provider,{value:this._getGroupContextValue(!1,!0)},o.createElement(de,{...u,...this._generateHighlightProps(2),control:r.riskInPercent,step:r.riskStep,type:2,formatter:r.riskInPercentFormatter,label:"% "+he,error:d&&this._isSelectedControl(2),errorMessage:p}))))}_generateHighlightProps(e){const t=this.props.model.getError(),r=this.props.model.isRiskAvailable()?this._isSelectedControl(e):void 0;return{highlight:(this.context.showCurrencyRiskInQty||this.context.showPercentRiskInQty)&&(0===e?r:this._isSelectedControl(e)),intent:Boolean(t&&t.res)&&this._isSelectedControl(e)?"danger":void 0}}_isSelectedControl(e){return this.props.status!==_.OrderPanelStatus.Wait&&this.props.model.getFocusedControl()===e}_subscribeToModel(e){this._subscriptions=[e.focusedControl$.subscribe(this._callback),e.isRiskAvailable$.subscribe(this._callback),e.error$.subscribe(this._callback)]}_unsubscribeFromModel(){this._subscriptions.forEach((e=>e.unsubscribe()))}_getGroupContextValue(e,t){return{isGrouped:!0,disablePositionAdjustment:!0,cellState:{isTop:!0,isRight:t,isBottom:!0,isLeft:e}}}}fe.contextType=pe.SettingsContext;var ge=r(493455),be=r(960521),Ce=r(624216),ye=r(192063),Ee=r(364228),_e=r(460337);const Se=[1,5,10,25,50,75,100];function we(e){const{control:t,controlType:r,error:s,side:n,focusedControl:a,setFocusedControl:l}=e,c=(0,o.useRef)(null),u=(0,o.useRef)(null),d=(0,v.useObservable)(t.value$,t.getValue()),p=(0,v.useObservable)(e.balanceValue$,null),[m,f]=(0,o.useState)(!1),[b,C]=(0,o.useState)(0),y=Boolean(s&&s.res),E=s&&s.msg;return(0,o.useEffect)((()=>{var t;5===e.initialFocus&&null!==(t=u.current)&&(t.focus(),t.setSelectionRange(t.value.length,t.value.length))}),[]),o.createElement(o.Fragment,null,o.createElement(se.NumberInput,{...function(e){const t={};k(e)&&(t.highlight=!0);Boolean(s&&s.res)&&k(e)&&(t.intent="danger");return t}(r),value:d,onBlur:e.forceRoundByStep?function(){if(null!==d&&void 0!==e.step){const t=new be.Big(d),r=t.mod(e.step);if(!r.eq(0)){S(t.minus(r).toNumber())}}}:void 0,onValueChange:S,min:e.min,step:e.step,formatter:e.formatter,errorMessage:E,errorHandler:e.setControlError,error:y&&k(r),inputReference:function(e){u.current=e},innerLabel:m?void 0:o.createElement("span",{className:_e.label},e.label),onFocus:()=>(l(r),void e.onControlFocused.fire()),className:i(_e.input,e.status===_.OrderPanelStatus.Wait&&_e.wait),button:w()?o.createElement(Ee.CaretButton,{isDropped:m,
onClick:function(){f(!m)}}):o.createElement(o.Fragment,null),containerReference:function(e){c.current=e},alwaysUpdateValueFromProps:e.forceRoundByStep,fontSizeStyle:e.fontSizeStyle}),w()&&null!==p&&o.createElement(Ce.PopupMenu,{position:function(){const e=(0,h.ensureNotNull)(c.current).getBoundingClientRect();return C(e.width),{x:e.left,y:e.top+e.height+1}},onClose:P,isOpened:m,doNotCloseOn:c.current,onKeyDown:function(e){if(27===(0,g.hashFromEvent)(e))m&&(e.preventDefault(),P())},minWidth:b},Se.map((r=>{const s=function(e){return(0,be.Big)((0,h.ensureNotNull)(p)).mul(.01).mul(e).toNumber()}(r),n=o.createElement(o.Fragment,null,r+"%  ",o.createElement("span",{className:_e.value},"("+e.formatter.format(s)+" "+e.label+")"));return o.createElement(ye.PopupMenuItem,{key:r.toString(),className:_e.popupMenuItem,label:n,onClick:()=>t.setValue(s)})}))));function S(r){t.setValue(r),e.onModifiedCallback()}function w(){return null!==p&&p>0&&(-1===n?3===r:4===r)}function k(t){return e.status!==_.OrderPanelStatus.Wait&&a===t}function P(){f(!1),(0,h.ensureNotNull)(c.current).focus()}}function ke(e){const{model:t,className:s,status:n}=e,a=(0,v.useObservable)(t.quoteCurrencyUiParams$),l=(0,v.useObservable)(t.error$,t.getError()),c=(0,v.useObservable)(t.focusedControl$,t.getFocusedControl()),u={side:(0,v.useObservable)(t.side$,t.getSide()),status:n,formatter:t.formatter,error:l,focusedControl:c,setFocusedControl:t.setFocusedControl,onControlFocused:t.onControlFocused,setControlError:t.setControlError,fontSizeStyle:"medium"};return o.createElement(o.Fragment,null,o.createElement("div",{className:_e.title},b.t(null,void 0,r(125933))),o.createElement(ge.ControlGroup,{cols:1,rows:2,className:i(s,_e.wrapper)},o.createElement(we,{...u,control:t.quantity,onModifiedCallback:t.quantity.onModifiedCallback,label:t.info.baseCurrency,controlType:3,balanceValue$:t.baseCurrencyCryptoBalanceValue$,initialFocus:e.focus,forceRoundByStep:!0,step:t.info.qty.step,min:t.info.qty.min}),o.createElement(we,{...u,control:t.quoteCurrencyQuantity,onModifiedCallback:t.quoteCurrencyQuantity.onModifiedCallback,label:t.info.quoteCurrency,controlType:4,balanceValue$:t.quoteCurrencyCryptoBalanceValue$,step:null==a?void 0:a.step,min:null==a?void 0:a.min})))}var Pe=r(481330),Oe=r(327871),Me=r(101614),Ne=r(48486);function Ie(e){const t=i(Ne.priceLabel,Ne[e.modifier.toLowerCase()]);return o.createElement("span",{className:i(t)},e.modifier)}var Be=r(556644);function Te(e){const t=e.price===e.ask,r=e.price===e.bid,s=e.price===e.last,n=(t||r)&&e.ask===e.bid;let i,a;return e.displayPriceLabel&&(n&&1===e.side?i=o.createElement(Ie,{modifier:"Ask"}):n&&-1===e.side?i=o.createElement(Ie,{modifier:"Bid"}):t?i=o.createElement(Ie,{modifier:"Ask"}):r&&(i=o.createElement(Ie,{modifier:"Bid"})),a=o.createElement("div",{className:Be.labelsGroup},i,s&&o.createElement(Ie,{modifier:"Last"}))),o.createElement("div",{className:Be.absolutePriceDropdownItem},o.createElement("div",{className:Be.price},e.price),a)}var xe=r(794087),De=r(958198);function Fe(e,t){
return e.findIndex((e=>e.priceIndex===t))}function He(e,t,r){const s=function(){0;return"phone"!==De.mediaState.device&&"phone-vertical"!==De.mediaState.device?6:4}(),o=[Le(e,t,r)];for(let n=1;n<=s;n++)o.push(Le(e-n,t,r)),o.unshift(Le(e+n,t,r));return o}function Le(e,t,r){return{priceIndex:e,displayPrice:t.format(r(e))}}var We=r(493266);const Ve=(0,Oe.makeKeyboardListener)(xe.InputWithError);class Re extends o.PureComponent{constructor(e){super(e),this._priceControl=null,this._priceInput=null,this._dropdown=null,this._setDropdownRef=e=>{this._dropdown=e},this._setInitialFocus=()=>{!ae.mobiletouch&&this._priceInput&&(1===this.props.priceType&&1===this.props.focus||2===this.props.priceType&&2===this.props.focus)&&(this._priceInput.setSelectionRange(this.props.displayPrice.length,this.props.displayPrice.length),this._priceInput.focus())},this._onCaretButtonFocus=()=>{var e;null===(e=this._priceInput)||void 0===e||e.focus()},this._onFocus=e=>{this.props.onControlFocused&&this.props.onControlFocused(0)},this._onOutsideClick=e=>{if(document.activeElement===this._priceInput&&this.props.status!==_.OrderPanelStatus.Wait&&!this.props.error){const e=this.props.priceFormatter.parse(this.props.displayPrice);if(e.res){const t=this.props.priceFormatter.format(e.value>=0?e.value:Math.abs(e.value));this._onPriceSelected(t)}}this.state.isOpened&&this._dropdown&&!this._dropdown.contains(e.target)&&this._closeDropdown()},this._onInputChange=e=>{const t=e.target.value;this._onModifiedCallback(),this._onPriceSelected(t)},this._onTouchStart=e=>{this._swipeState.y=e.touches[0].clientY},this._onTouchMove=e=>{var t;if(e.changedTouches&&e.changedTouches.length&&null!==this._swipeState.y){const r=e.changedTouches[0].clientY-this._swipeState.y,s=null!==(t=this._swipeState.prevDiff)&&void 0!==t?t:0;if(Math.abs(r-s)<10)return;this._swipeState.direction=r>s?"up":"down",this._swipeState.prevDiff=r,"up"===this._swipeState.direction?this._prependPriceOnDropdown():"down"===this._swipeState.direction&&this._appendPriceOnDropdown()}},this._onTouchEnd=e=>{this._resetSwipeState()},this._onDropdownWheelNoPassive=e=>{e.preventDefault(),e.stopPropagation(),e.deltaY<0?this._prependPriceOnDropdown():this._appendPriceOnDropdown()},this._onInputMouseWheel=e=>{e.preventDefault(),e.stopPropagation(),this.props.isSelected&&(this._onModifiedCallback(),e.deltaY<0?this._changeValueByStep(1):this._changeValueByStep(-1))},this._onSelect=(e,t)=>{this.setState({selected:e},(()=>{this._onModifiedCallback(),this._closeDropdown(),this._onPriceSelected(t.displayPrice)}))},this._onNavigate=()=>{const e=this.state.command&&"prev"===this.state.command.name,t=this.state.command&&"next"===this.state.command.name;e?this._changeValueByStep(1):t&&this._changeValueByStep(-1)},this._onMouseOver=()=>{this.setState({mouseOver:!0})},this._onMouseOut=()=>{this.setState({mouseOver:!1})},this._onCaretButtonClick=e=>{var t;e.stopPropagation(),this.state.isOpened?this._closeDropdown():(this._openDropdown(),
ae.mobiletouch||null===(t=this._priceInput)||void 0===t||t.setSelectionRange(this.props.displayPrice.length,this.props.displayPrice.length))},this._setPriceInput=e=>{this._priceInput=e},this._setPriceControl=e=>{this._priceControl=e},this._scrollPriceByArrow=e=>{e.preventDefault(),this._onModifiedCallback();const t=e.keyCode===Oe.KeyCode.UpArrow?1:-1;this._changeValueByStep(t)},this._selectPrev=e=>{e.preventDefault(),this._onModifiedCallback(),this.setState({command:{name:"prev"}})},this._selectNext=e=>{e.preventDefault(),this._onModifiedCallback(),this.setState({command:{name:"next"}})},this._openDropdown=()=>{this.setState({isOpened:!0,keyboardEventHandlers:this._getKeyboardEventHandlers("open")})},this._closeDropdownWithStopPropagation=e=>{e&&(e.stopPropagation(),e.nativeEvent.stopImmediatePropagation()),this._closeDropdown()},this._closeDropdown=()=>{const e=He(this.props.priceIndex,this.props.priceFormatter,this.props.indexToPrice);this.setState({isOpened:!1,keyboardEventHandlers:this._getKeyboardEventHandlers("close"),priceList:e,selected:Fe(e,this.props.priceIndex)})};const t=He(e.priceIndex,e.priceFormatter,e.indexToPrice);this.state={priceList:t,selected:Fe(t,e.priceIndex),isOpened:!1,mouseOver:!1,keyboardEventHandlers:this._getKeyboardEventHandlers("close")},this._resetSwipeState()}componentDidMount(){this._setInitialFocus()}render(){const e=i(We.absolutePriceControl,this.props.className),t=o.createElement("span",{className:We.priceLabel},this.props.priceLabel),r=o.createElement(Ee.CaretButton,{isDropped:this.state.isOpened,onFocus:this._onCaretButtonFocus,onClick:this._onCaretButtonClick});return o.createElement(ne.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:this._onOutsideClick},(s=>o.createElement("span",{className:e,ref:s},t,o.createElement(Ve,{className:i(We.input,this.props.status===_.OrderPanelStatus.Wait&&We.wait),containerReference:this._setPriceControl,inputReference:this._setPriceInput,keyboardEventHandlers:this.state.keyboardEventHandlers,value:this.props.displayPrice,warning:this.props.warning,error:this.props.error,errorMessage:this.props.errorMessage,onChange:this._onInputChange,onFocus:this._onFocus,onBlur:this.props.onBlur,onMouseOver:this._onMouseOver,onMouseOut:this._onMouseOut,onWheelNoPassive:this._onInputMouseWheel,highlight:this.props.highlight,highlightRemoveRoundBorder:this.props.highlightRemoveRoundBorder,fontSizeStyle:this.props.fontSizeStyle,button:r,intent:this.props.intent}),o.createElement(Me.DropdownList,{anchor:"bottom",root:"document",reference:this._setDropdownRef,className:We.list,command:this.state.command,isOpened:this.state.isOpened,items:this._makeListItems(),itemsClassName:We.item,width:this._getDropdownWidth(),selected:this.state.selected,selectedClassName:We.selected,target:null!==this._priceControl?this._priceControl:void 0,attachmentOffsetY:3,inheritWidthFromTarget:!1,shouldScrollIfNotVisible:!1,onSelect:this._onSelect,onNavigate:this._onNavigate,onDropdownTouchStart:this._onTouchStart,onDropdownTouchMove:this._onTouchMove,
onDropdownTouchEnd:this._onTouchEnd,onDropdownWheelNoPassive:this._onDropdownWheelNoPassive}))))}componentDidUpdate(e,t){if(this.props.priceIndex===e.priceIndex)return;const r=He(this.props.priceIndex,this.props.priceFormatter,this.props.indexToPrice);this.setState({priceList:r,selected:Fe(r,this.props.priceIndex)})}_onPriceSelected(e){const t=this.props.priceFormatter.parse(e);t.res?this.props.errorHandler(!1):this.props.errorHandler(!0,t.error),this.props.onPriceSelected(e)}_resetSwipeState(){this._swipeState={direction:null,y:null,prevDiff:null}}_getKeyboardEventHandlers(e){return"close"===e?{[Oe.KeyCode.UpArrow]:this._scrollPriceByArrow,[Oe.KeyCode.DownArrow]:this._scrollPriceByArrow}:{[Oe.KeyCode.Enter]:this._closeDropdownWithStopPropagation,[Oe.KeyCode.Escape]:this._closeDropdownWithStopPropagation,[Oe.KeyCode.UpArrow]:this._selectPrev,[Oe.KeyCode.DownArrow]:this._selectNext}}_makeListItems(){return this.state.priceList.map((e=>({...e,elem:o.createElement(Te,{price:e.displayPrice,ask:this.props.priceFormatter.format(this.props.ask),bid:this.props.priceFormatter.format(this.props.bid),last:this.props.priceFormatter.format(this.props.last),side:this.props.side,displayPriceLabel:!0})})))}_prependPriceOnDropdown(){const e=[Le(this.state.priceList[0].priceIndex+1,this.props.priceFormatter,this.props.indexToPrice)].concat(this.state.priceList.slice(0,-1));this.setState({priceList:e,selected:Fe(e,this.props.priceIndex)})}_appendPriceOnDropdown(){const e=this.state.priceList.length-1,t=Le(this.state.priceList[e].priceIndex-1,this.props.priceFormatter,this.props.indexToPrice),r=this.state.priceList.slice(1).concat(t);this.setState({priceList:r,selected:Fe(r,this.props.priceIndex)})}_changeValueByStep(e){const t=this.props.priceIndex+e,r=this.props.indexToPrice(t);var s,o;this._onPriceSelected((s=r,o=this.props.priceFormatter,null!==s?o.format(s):""))}_getDropdownWidth(){if(this.state.isOpened&&null!==this._priceControl&&(this.context.mode===_.OrderEditorDisplayMode.Popup||this.state.priceList[0].displayPrice.length<=7)){return parseFloat(window.getComputedStyle(this._priceControl,null).getPropertyValue("width"))+2}}_onModifiedCallback(){this.props.onModifiedCallback&&this.props.onModifiedCallback()}}Re.contextType=_.Context,Re.defaultProps={className:"",inputClassName:""};var ze=r(761248);function Ke(e,t){return e.findIndex((e=>e.displayValue===t))}const Ae=/^[-+]?[0-9]*\.?[0-9]+$/;function Ze(e,t){const r=(0,ze.capitalizeFirstLetter)(e);return t>0?`${r} + ${Math.abs(t)}`:t<0?`${r} - ${Math.abs(t)}`:`${r}`}function Ge(e){return String(e)}function qe(e,t){const r=e.offset;return s=e.base,o=function(e,t){return(Math.abs(e)>=1?e:0)+(1===t?1:-1)}(r,t),{displayValue:Ze(s,o),base:s,offset:o};var s,o}function Ue(e,t,r){const s=[],o=[],n={displayValue:Ze(t,e),base:t,offset:e};for(let e=0;e<r;e++)s.unshift(qe(0===e?n:s[0],1)),o.push(qe(0===e?n:o[e-1],-1));return[...s,n,...o]}function $e(){return"phone"!==De.mediaState.device&&"phone-vertical"!==De.mediaState.device?6:4}var Qe=r(968625);function je(e){
return o.createElement("div",{className:Qe.relativePriceDropdownItem},o.createElement("div",{className:Qe.price},e.price))}var Xe=r(78007);const Ye=(0,Oe.makeKeyboardListener)(xe.InputWithError),Je=b.t(null,{context:"price"},r(172639)),et=b.t(null,void 0,r(332061));class tt extends o.PureComponent{constructor(e){super(e),this._priceInput=null,this._priceControl=null,this._dropdown=null,this._setDropdownRef=e=>{this._dropdown=e},this._onMouseOver=e=>{this.setState({mouseOver:!0})},this._onMouseOut=()=>{this.setState({mouseOver:!1})},this._onOutsideClick=e=>{var t;this.state.isOpened&&this._dropdown&&!this._dropdown.contains(e.target)&&(this._closeDropdown(),null===(t=this._priceInput)||void 0===t||t.blur())},this._onCaretButtonFocus=()=>{var e;null===(e=this._priceInput)||void 0===e||e.focus()},this._onFocus=()=>{this.setState({isEditing:!0,displayValue:this.state.displayValue===Ze(this.props.base,this.props.offset)?Ge(this.props.offset):this.state.displayValue},(()=>{var e,t;ae.mobiletouch||null===this._priceInput||(e=this._priceInput,t=this.state.displayValue.length,e.setSelectionRange&&(e.focus(),e.setSelectionRange(0,t),e.select()))})),this.props.onControlFocused&&this.props.onControlFocused(1)},this._onBlur=()=>{this.props.error||this.setState({isEditing:!1,displayValue:Ze(this.props.base,this.props.offset)},(()=>{this._trackExitEditingModeEvent(this.props.offset)}))},this._onInputChange=e=>{this._onModifiedCallback();const t=e.currentTarget.value;var r;r=t,Ae.test(r)?this.setState({displayValue:t},(()=>{this._onPriceOffsetSelected(Number(t))})):(this.setState({displayValue:t}),this.props.errorHandler(!0,et))},this._onTouchStart=e=>{this._swipeState.y=e.touches[0].clientY},this._onTouchMove=e=>{var t;if(e.changedTouches&&e.changedTouches.length&&null!==this._swipeState.y){const r=e.changedTouches[0].clientY-this._swipeState.y,s=null!==(t=this._swipeState.prevDiff)&&void 0!==t?t:0;if(Math.abs(r-s)<10)return;this._swipeState.direction=r>s?"up":"down",this._swipeState.prevDiff=r,"up"===this._swipeState.direction?this._prependPriceOnTouchMove():"down"===this._swipeState.direction&&this._appendPriceOnTouchMove()}},this._onTouchEnd=e=>{this._resetSwipeState()},this._onDropdownWheelNoPassive=e=>{e.preventDefault(),e.stopPropagation(),e.deltaY<0?this._prependPriceOnWheel():this._appendPriceOnWheel()},this._onInputMouseWheel=e=>{e.preventDefault(),e.stopPropagation(),this.props.isSelected&&(this._onModifiedCallback(),e.deltaY<0?this._changeValueByStep(1):this._changeValueByStep(-1))},this._onSelect=(e,t)=>{this.setState({displayValue:t.text,selected:e},(()=>{this._onModifiedCallback(),this._closeDropdown(),this._onPriceOffsetSelected()}))},this._onNavigate=(e,t)=>{const r=this.state.command&&"prev"===this.state.command.name,s=this.state.command&&"next"===this.state.command.name;r?this._changeValueByStep(1):s&&this._changeValueByStep(-1)},this._onCaretButtonClick=e=>{e.preventDefault(),e.stopPropagation(),this.state.isOpened?this._closeDropdown():(this._openDropdown(),
!ae.mobiletouch&&this._priceInput&&this._priceInput.setSelectionRange(this.state.displayValue.length,this.state.displayValue.length))},this._switchEditingMode=e=>{var t;e.preventDefault();const r=Number(this.state.displayValue);if(Number.isInteger(r)||this.props.error)null===(t=this._priceInput)||void 0===t||t.blur();else{const e=Math.round(r),t=Ue(e,this.props.base,$e()),s=Ke(t,Ze(this.props.base,e));this.setState({displayValue:String(e),prices:t,selected:s,isEditing:!1},(()=>{var e;this._onPriceOffsetSelected(),null===(e=this._priceInput)||void 0===e||e.blur()}))}},this._setPriceInput=e=>{this._priceInput=e},this._setPriceControl=e=>{this._priceControl=e},this._scrollPriceByArrow=e=>{e.preventDefault(),this._onModifiedCallback();const t=e.keyCode===Oe.KeyCode.UpArrow?1:-1;this._changeValueByStep(t)},this._selectPrev=e=>{e.preventDefault(),this._onModifiedCallback(),this.setState({command:{name:"prev"}})},this._selectNext=e=>{e.preventDefault(),this._onModifiedCallback(),this.setState({command:{name:"next"}})},this._openDropdown=()=>{this.setState({isOpened:!0,keyboardEventHandlers:this._getKeyboardEventHandlers("open")})},this._closeDropdownOnKeyDown=e=>{var t;e.preventDefault(),this._closeDropdown(),null===(t=this._priceInput)||void 0===t||t.blur()},this._closeDropdown=()=>{const e=Ze(this.props.base,this.props.offset),t=Ue(this.props.offset,this.props.base,$e()),r=Ke(t,e);this.setState({isOpened:!1,keyboardEventHandlers:this._getKeyboardEventHandlers("close"),prices:t,selected:r})},this._trackExitEditingModeEvent=e=>{this.props.trackEvent&&this.props.trackEvent("Order Ticket","Relative Price - Exit Editing Mode",String(e))};const t=Ze(e.base,e.offset),r=Ue(e.offset,e.base,$e()),s=Ke(r,t);this.state={displayValue:t,prices:r,selected:s,isOpened:!1,isEditing:!1,mouseOver:!1,keyboardEventHandlers:this._getKeyboardEventHandlers("close")},this._resetSwipeState()}render(){const e=o.createElement(Ee.CaretButton,{isDropped:this.state.isOpened,onFocus:this._onCaretButtonFocus,onClick:this._onCaretButtonClick});return o.createElement(ne.OutsideEvent,{mouseDown:!0,touchStart:!0,handler:this._onOutsideClick},(t=>o.createElement("span",{className:this.props.className,ref:t},o.createElement("span",{className:Xe.pipsLabel},Je),o.createElement(Ye,{className:i(Xe.input,this.props.status===_.OrderPanelStatus.Wait&&Xe.wait),keyboardEventHandlers:this.state.keyboardEventHandlers,value:this.state.displayValue,error:this.props.error,errorMessage:this.props.errorMessage,button:e,containerReference:this._setPriceControl,inputReference:this._setPriceInput,onFocus:this._onFocus,onBlur:this._onBlur,onChange:this._onInputChange,onWheelNoPassive:this._onInputMouseWheel,onMouseOver:this._onMouseOver,onMouseOut:this._onMouseOut,noReadonlyStyles:!0,highlight:this.props.highlight,highlightRemoveRoundBorder:this.props.highlightRemoveRoundBorder,fontSizeStyle:this.props.fontSizeStyle,intent:this.props.intent}),o.createElement(Me.DropdownList,{anchor:"bottom",root:"document",reference:this._setDropdownRef,className:Xe.list,
command:this.state.command,isOpened:this.state.isOpened,items:this._makeListItems(),itemsClassName:Xe.item,selected:this.state.selected,selectedClassName:Xe.selected,target:null!==this._priceControl?this._priceControl:void 0,attachmentOffsetY:3,inheritWidthFromTarget:!0,shouldScrollIfNotVisible:!1,onSelect:this._onSelect,onNavigate:this._onNavigate,onDropdownTouchStart:this._onTouchStart,onDropdownTouchMove:this._onTouchMove,onDropdownTouchEnd:this._onTouchEnd,onDropdownWheelNoPassive:this._onDropdownWheelNoPassive}))))}componentDidUpdate(e){if(this.props.offset!==e.offset||this.props.base!==e.base){const e=Ze(this.props.base,this.props.offset),t=Ue(this.props.offset,this.props.base,$e()),r=Ke(t,e);this.setState({prices:t,selected:r})}this.state.isEditing&&this.props.isSelected||this.props.offset===e.offset&&this.props.base===e.base&&this.props.error===e.error||this.setState({displayValue:Ze(this.props.base,this.props.offset),isEditing:!1})}_onPriceOffsetSelected(e){const t=void 0!==e?e:this.state.prices[this.state.selected].offset;this.props.errorHandler(!1),this.props.onPriceOffsetSelected(t)}_onModifiedCallback(){this.props.onModifiedCallback&&this.props.onModifiedCallback()}_resetSwipeState(){this._swipeState={direction:null,y:null,prevDiff:null}}_getKeyboardEventHandlers(e){return"close"===e?{[Oe.KeyCode.UpArrow]:this._scrollPriceByArrow,[Oe.KeyCode.DownArrow]:this._scrollPriceByArrow,[Oe.KeyCode.Enter]:this._switchEditingMode}:{[Oe.KeyCode.Enter]:this._closeDropdownOnKeyDown,[Oe.KeyCode.Escape]:this._closeDropdownOnKeyDown,[Oe.KeyCode.UpArrow]:this._selectPrev,[Oe.KeyCode.DownArrow]:this._selectNext}}_makeListItems(){return this.state.prices.map(((e,t)=>({base:e.base,offset:e.offset,text:e.displayValue,elem:o.createElement(je,{price:e.displayValue})})))}_prependPriceOnWheel(){const e=qe(this.state.prices[0],1);this.setState((t=>({prices:[e].concat(t.prices.slice(0,-1)),selected:0===t.selected?1:t.selected+1})))}_appendPriceOnWheel(){const e=this.state.prices.length-1,t=qe(this.state.prices[e],-1);this.setState((r=>({prices:r.prices.slice(1).concat(t),selected:r.selected===e?e-1:r.selected-1})))}_prependPriceOnTouchMove(){const e=this.state.prices[0],t=[];t.unshift(qe(e,1)),this.setState((e=>({prices:t.concat(e.prices.slice(0,this.state.prices.length-1)),selected:0===e.selected?1:e.selected+1})))}_appendPriceOnTouchMove(){const e=this.state.prices.length-1,t=this.state.prices[e],r=[];r.push(qe(t,-1)),this.setState((t=>({prices:t.prices.slice(1).concat(r),selected:t.selected===e?e-1:t.selected-1})))}_changeValueByStep(e){const t=this.props.offset+e,r=this.state.isEditing?Ge(t):Ze(this.props.base,t);this.setState({displayValue:r},(()=>{this._onPriceOffsetSelected(t)}))}}var rt=r(472804);function st(e){const{model:t,priceType:r,focus:s,priceLabel:n,trackEvent:a}=e,l=o.useContext(pe.SettingsContext),c=(0,v.useObservable)(t.priceControlData$,t.getPriceControlData()),u=(0,v.useObservable)(t.focusedControl$,t.getFocusedControl()),d=(0,v.useObservable)(t.error$,t.getError()),p=(0,v.useObservable)(t.quotes$,{ask:0,bid:0,
trade:0}),h=(0,v.useObservable)(t.side$),m=(0,v.useObservable)(t.status$,_.OrderPanelStatus.Wait),f="medium",g=l.showRelativePriceControl&&!t.isRelativePriceControlHidden,b=d.msg,C=m!==_.OrderPanelStatus.Wait&&d.res&&"warning"===d.severity,y=S(0),E=S(1);return o.createElement(ge.ControlGroup,{cols:g?2:1,rows:1,className:rt.controlGroup},o.createElement(Re,{...w(0),className:i(rt.absolutePriceControl,g&&rt.withRelative),priceType:r,isSelected:y,status:m,priceIndex:c?c.index:0,displayPrice:c?c.absolutePrice:"",ask:(0,Pe.getAsk)(p),bid:(0,Pe.getBid)(p),last:(0,Pe.getLast)(p),side:h,priceFormatter:t.formatter,warning:C,error:d.res&&"error"===d.severity&&y,errorMessage:b,errorHandler:k,onControlFocused:P,onPriceSelected:t.setAbsolutePrice,trackEvent:a,onModifiedCallback:t.modifiedAbsolutePriceControlStat,focus:s,fontSizeStyle:f,priceLabel:n,indexToPrice:t.indexToPrice}),g&&o.createElement(tt,{...w(1),isSelected:E,offset:c?c.offset:0,base:c?c.base:"",className:rt.relativePriceControl,status:m,error:d.res&&"error"===d.severity&&E,errorMessage:b,errorHandler:k,fontSizeStyle:f,onControlFocused:P,onPriceOffsetSelected:t.setPriceOffset,trackEvent:a,onModifiedCallback:t.modifiedRelativePriceControlStat}));function S(e){return m!==_.OrderPanelStatus.Wait&&u===e}function w(e){const t={};return S(e)&&(t.highlight=!0),d.res&&"error"===d.severity&&S(e)&&(t.intent="danger"),t}function k(e,r){t.setControlError(e,r)}function P(e){e!==t.getFocusedControl()&&(t.setFocusedControl(e),t.setControlError(!1)),t.onControlFocused.fire()}}function ot(e){const{model:t,trackEvent:s,focus:n}=e,i=(0,v.useObservable)(t.orderType$),a=4===i;return o.createElement(o.Fragment,null,3===i||a?o.createElement(st,{key:t.stopPriceModel.id,model:t.stopPriceModel,priceType:t.stopPriceModel.priceType,trackEvent:s,focus:n,priceLabel:a?b.t(null,void 0,r(722028)):b.t(null,void 0,r(25684))}):null,1===i||a?o.createElement(st,{key:t.limitPriceModel.id,model:t.limitPriceModel,priceType:t.limitPriceModel.priceType,trackEvent:s,focus:n,priceLabel:a?b.t(null,void 0,r(627262)):b.t(null,void 0,r(25684))}):null)}var nt=r(447538),it=r(657947);class at extends o.PureComponent{constructor(e){super(e),this._orderTypeSubscription=null,this.onDurationChanged=e=>{this.props.model.currentDuration.setValue(e),this.props.model.onModifiedCallback()},this._onControlFocused=()=>{this.props.model.onControlFocused.fire()},this._callback=()=>this.forceUpdate()}componentDidMount(){this.props.model.currentDuration.subscribe(this._callback),this._orderTypeSubscription=this.props.model.orderType$.subscribe(this._callback)}componentWillUnmount(){var e;this.props.model.currentDuration.unsubscribe(this._callback),null===(e=this._orderTypeSubscription)||void 0===e||e.unsubscribe()}render(){const e=this.props.model.currentDuration.value();return null===e?null:o.createElement(it.DurationControl,{currentDuration:e,durationMetaInfoList:this._getDurationMetaInfoList(),onDurationChanged:this.onDurationChanged,onClose:this.props.onClose,onControlFocused:this._onControlFocused,
onError:this.props.model.setError,showErrorMessages:!0})}_getDurationMetaInfoList(){const e=this.props.model.getOrderType(),t=this.props.model.durationMetaInfoList;return(0,Pe.filterDurationsByOrderType)(t,e)}}var lt=r(973044);const ct=o.lazy((async()=>({default:(await Promise.all([r.e(3426),r.e(6112)]).then(r.bind(r,958006))).LeverageDialog}))),ut=(0,lt.withDialogLazyLoad)(ct);var dt=r(27950),pt=r(647253);function ht(e){const{leverage:t,onClick:s,onControlFocused:n,blocked:i,forceDisabled:l=!1,onBlockedClick:c}=e,u=void 0===t;let d=b.t(null,{replace:{value:String(t)}},r(304389));return u&&(d=b.t(null,void 0,r(65124))),i&&(d=b.t(null,void 0,r(405849))),o.createElement("div",{className:pt.container,onClick:function(){if(i)return n.fire(),void c()}},o.createElement(dt.EditButton,{disabled:u||l||i,value:d,startSlot:u||i?void 0:"x",onClick:function(){s(),n.fire()},className:a()(pt.leverageButton,l&&pt.disabledLeverageButton)}))}function mt(e){const{model:t}=e,r=(0,v.useObservable)(t.leverageInfo$,t.leverageInfo()),s=(0,v.useObservable)(t.blocked$,t.getBlocked()),n=t.leveragePreviewResult(),[i,a]=(0,o.useState)(!1),[l,c]=(0,o.useState)(null==r?void 0:r.leverage);return(0,o.useEffect)((()=>{c(null==r?void 0:r.leverage)}),[r]),o.createElement(o.Fragment,null,o.createElement(ht,{onClick:u,leverage:l,forceDisabled:i,blocked:s,onControlFocused:t.onControlFocused,onBlockedClick:t.onBlockedClick}),null!==r&&i&&void 0!==l&&o.createElement(ut,{symbol:t.symbol,displaySymbol:t.displaySymbol,leverage:l,brokerName:t.brokerName,orderType:t.orderType,side:t.side,isOpen:i,onClose:u,onLeverageSet:t.setLeverage,onLeveragePreview:t.previewLeverage,title:r.title,min:r.min,max:r.max,step:r.step,customFields:t.customFields,infos:null==n?void 0:n.infos,warnings:null==n?void 0:n.warnings,errors:null==n?void 0:n.errors,onSetLeverageValueInOrderWidget:function(e){c(e)}}));function u(){i||t.getLeverageInfo({symbol:t.symbol,orderType:t.orderType,side:t.side,customFields:t.customFields}),a((e=>!e))}}var vt=r(975228);function ft(e){const{scrollContainerRef:t,...r}=e,s=(0,vt.useAccurateHover)(t);return o.createElement(z.OverlayScrollWrapper,{...r,scrollContainerRef:t,isForceVisible:s})}var gt=r(529719),bt=r(954568);class Ct extends o.PureComponent{constructor(e){super(e),this._callback=()=>this.forceUpdate()}componentDidMount(){this.context.resizerWidth&&this.context.resizerWidth.subscribe(this._callback)}componentWillUnmount(){this.context.resizerWidth&&this.context.resizerWidth.unsubscribe(this._callback)}render(){const e={width:`${this.props.progress}%`},t=i(bt.progress,100===this.props.progress&&bt.fullFilled,this.props.usedMargin>this.props.availableMargin&&bt.marginOverflow);return o.createElement("div",{className:i(bt.progressBarContainer,this.props.wait&&bt.wait)},o.createElement("div",{className:bt.marginsContainer},o.createElement("div",{className:i(bt.margin,bt.usedMargin)},o.createElement("div",{className:bt.title},b.t(null,void 0,r(969992))),o.createElement("span",{className:bt.price},(0,
gt.formatInfoValue)(this.props.usedMargin))),o.createElement("div",{className:i(bt.margin),"data-name":"availableMargin"},o.createElement("span",{className:bt.price},(0,gt.formatInfoValue)(this.props.availableMargin)))),o.createElement("div",{className:bt.progressBar},o.createElement("div",{className:bt.track},o.createElement("div",{className:t,style:e}))))}}Ct.contextType=_.Context;var yt=r(849071);function Et(e){const{model:t,infoTableData:r,orderPanelStatus:s}=e,n=(0,v.useObservable)(t.usedMargin$,0),i=(0,v.useObservable)(t.availableMargin$,0),a=t.hasMarginMeter()?o.createElement(Ct,{usedMargin:n,availableMargin:i,progress:(0,gt.calculatedMarginRatio)(n,i),wait:s===_.OrderPanelStatus.Wait}):void 0;return o.createElement("div",{className:yt.orderInfo},o.createElement("div",{className:yt.title},t.title()),o.createElement("div",{className:yt.contentWrapper},a,o.createElement(R.InfoTable,{rows:r.rows,header:r.header,disabled:s===_.OrderPanelStatus.Wait,rightAlignedValues:!0})))}var _t=r(372605),St=r(853177),wt=r(40176),kt=r(795820),Pt=r(338043);const Ot=(0,y.getLogger)("Trading.OrderPanel"),Mt=b.t(null,void 0,r(69208));b.t(null,void 0,r(184568)),b.t(null,void 0,r(708169)),b.t(null,void 0,r(312690)),b.t(null,void 0,r(200890)),b.t(null,void 0,r(436598));function Nt(){document.activeElement instanceof HTMLElement?document.activeElement.blur():Ot.logWarn("Failed to deselect: active element is not HTMLElement")}const It=(0,o.forwardRef)(((e,t)=>{const{model:r,focus:s,trackEvent:n,orderPanelStatus:a,orderType:l,setOrderType:c,isNoQuotes:d,orderWidgetRef:m}=e,v=a===_.OrderPanelStatus.Wait||u.CheckMobile.any()?void 0:s,f=function(e,t){return Boolean(2!==t&&(!e.existingOrder||e.existingOrder&&e.supportModifyOrderPrice))}(r,l),g=function(e,t){const r=2!==t||e.supportMarketBrackets();return Boolean(e.supportBrackets()&&r)}(r,l)||function(e){return Boolean(e.supportCryptoBrackets)}(r),b=function(e){return Boolean(e.durationModel&&(!e.existingOrder||e.existingOrder&&e.supportModifyDuration)&&e.durationModel.isDurationsAvailable())}(r),C=function(e){return Boolean(e.supportLeverageButton)}(r),y=f||r.supportModifyQuantity||C,E=f||r.supportModifyQuantity||C||g,S=[_.OrderPanelStatus.Active,_.OrderPanelStatus.Wait].includes(a),w=r.customFieldsModel.getCustomFieldsModels(),k=[],P=(0,o.useRef)(null);function O(){null!==m.current&&m.current.focus()}return S&&k.push({id:"symbol-specific-warning",warningMessageSource:r.symbolSpecificWarningMessage}),o.createElement(o.Fragment,null,r.sideModel&&o.createElement("div",{className:Pt.side},o.createElement(L,{model:r.sideModel,disabled:r.existingOrder})),r.limitPriceModel&&r.stopPriceModel&&o.createElement(ee,{orderType:l,setOrderType:c,disabled:r.existingOrder&&!r.supportModifyOrderType,supportMarketOrders:r.supportMarketOrders(),supportLimitOrders:r.supportLimitOrders(),supportStopOrders:r.supportStopOrders(),supportStopLimitOrders:r.supportStopLimitOrders()}),o.createElement(ft,{className:Pt.scrollWrapper,scrollContainerRef:P
},r.limitPriceModel&&r.stopPriceModel&&r.quantityModel&&o.createElement("div",{className:i(Pt.centerBlock),ref:P},f&&o.createElement(ot,{model:r,trackEvent:n,focus:v}),r.supportModifyQuantity&&o.createElement("div",{className:Pt.quantityWrapper},r.supportCryptoExchangeOrderTicket()?o.createElement(ke,{model:r.quantityModel,status:a,focus:v}):o.createElement(fe,{model:r.quantityModel,symbolHasLotSize:r.symbolHasLotSize,status:a,trackEvent:n,focus:v})),g&&o.createElement("div",{className:Pt["brackets-wrapper"]},y&&o.createElement("div",{className:Pt.separator}),o.createElement("div",{className:Pt.brackets},o.createElement(te.BracketControlGroup,{model:r,focus:v}))),b&&o.createElement("div",{className:Pt.duration},o.createElement(at,{onClose:O,model:(0,h.ensureDefined)(r.durationModel)})),w.length>0&&o.createElement("div",{className:Pt.customFieldsWrapper},E&&o.createElement("div",{className:Pt.separator}),o.createElement(wt.CustomFields,{customFieldModels:w,orderPanelStatus:a,onClose:O})),C&&o.createElement("div",{className:Pt.leverage},o.createElement(mt,{model:(0,h.ensureDefined)(r.leverageModel)})))),void 0!==r.buttonModel&&o.createElement("div",{className:Pt.doneButton},o.createElement(nt.PlaceAndModifyButton,{model:r,reference:(0,p.isomorphicRef)(t),buttonModel:r.buttonModel})),o.createElement(St.TradingPanelWarningInformersContainer,{warningInformersItems:k}))}));function Bt(e){const{model:t}=e,r=t.tradableSolution?o.createElement(d.SquareButton,{onClick:t.tradableSolution.apply,size:"small"},t.tradableSolution.title):void 0;return o.createElement("div",{className:Pt.emptyStateBlockWrapper},o.createElement(m.EmptyStateBlock,{iconClass:Pt.sadScreenIcon,title:Mt,titleSize:"normal",text:(0,h.ensureDefined)(t.notTradableText),action:r}))}function Tt(e){var t,r;const{model:s,settings:n,popupController:a}=e,[d,p]=(0,o.useState)(null),[m,b]=(0,o.useState)(),[y,S]=(0,o.useState)(),[w]=(0,f.useWatchedValue)(s.status),[k]=(0,f.useWatchedValue)(s.isNoQuotes),P=(0,v.useObservable)(null!==(r=null===(t=s.orderInfoModel)||void 0===t?void 0:t.infoTableData$)&&void 0!==r?r:(0,c.of)(null),null),O=(0,v.useObservable)(s.orderType$,s.getOrderType()),M=(0,o.useRef)(null),N=(0,o.useRef)(null),I=(0,o.useRef)(null),B=function(e){return e.status.value()===_.OrderPanelStatus.Preview&&null!==e.orderPreviewModel}(s),T=function(e){var t;const r=e.status.value(),s=(null===(t=e.orderInfoModel)||void 0===t?void 0:t.getOrderInfoTableRowsCount())||0;return!e.needSignIn&&!e.noBroker&&!e.notTradableText&&e.mode.value()===_.OrderEditorDisplayMode.Panel&&s>0&&r!==_.OrderPanelStatus.Preview&&C.enabled("order_info")}(s)&&null!==P;(0,o.useEffect)((()=>{const e=setTimeout((()=>{void 0!==m&&0!==m&&(0,_t.isInteger)(m)&&l.setValue(E.settingsKeys.PANEL_HEIGHT,m)}),100);return()=>clearTimeout(e)}),[m]),(0,o.useEffect)((()=>{var e;w===_.OrderPanelStatus.Wait&&(null===(e=M.current)||void 0===e?void 0:e.contains(document.activeElement))&&Nt()}),[w]),(0,o.useEffect)((()=>{var e;const t=null===(e=M.current)||void 0===e?void 0:e.clientHeight
;B&&void 0!==t&&void 0!==m&&m!==t&&(S(t-m),b(t)),T&&void 0!==t&&m===t&&void 0!==y&&b(t-y);const r=parseInt(l.getValue(E.settingsKeys.PANEL_HEIGHT,""));return T&&void 0===m&&!isNaN(r)&&b(r),B&&s.mode.value()===_.OrderEditorDisplayMode.Popup&&(null==a||a.centerAndFit()),()=>{B&&void 0!==t&&void 0!==y&&l.setValue(E.settingsKeys.PANEL_HEIGHT,t-y)}}),[w,P]),(0,o.useEffect)((()=>{if(null!==d)return d.addEventListener("mousedown",F,{passive:!1}),d.addEventListener("touchstart",F,{passive:!1}),()=>{d.removeEventListener("mousedown",F),d.removeEventListener("touchstart",F)}}),[d]);const x=(0,o.useCallback)((e=>{null!==e&&p(e)}),[]),D={};function F(e){var t,r;if(e.defaultPrevented||!e.cancelable)return;e.preventDefault();const s=Math.max(null!==(r=null===(t=N.current)||void 0===t?void 0:t.clientHeight)&&void 0!==r?r:0,0);let o;o="touches"in e?e.touches[0].clientY:e.clientY;const n=e=>{let t;e.preventDefault(),t="touches"in e?e.touches[0].clientY:e.clientY;let r=s+(t-o);r<320&&(r=320),b(r)},i=()=>{document.removeEventListener("mousemove",n),document.removeEventListener("touchmove",n),document.removeEventListener("mouseup",i),document.removeEventListener("touchend",i)};document.addEventListener("mousemove",n),document.addEventListener("touchmove",n,{passive:!1}),document.addEventListener("mouseup",i),document.addEventListener("touchend",i,{passive:!1})}return(s.needSignIn||s.noBroker||s.notTradableText)&&(D.flexGrow=1),T&&void 0!==m&&0!==m&&(D.height=m),o.createElement(pe.OrderTicketSettingsProvider,{settings:n},o.createElement("div",{className:i(Pt.orderWidget),onKeyDown:function(e){const t=(0,g.hashFromEvent)(e);if(!(13!==t&&t!==g.hashShiftPlusEnter||s.disabled.value()||null===I.current)){if(u.CheckMobile.any())return Nt();I.current.focus(),e.defaultPrevented||I.current.click()}},tabIndex:-1,ref:M},o.createElement("div",{ref:N,className:Pt.orderTicket,style:D},s.mode.value()===_.OrderEditorDisplayMode.Popup&&o.createElement(kt.HeaderContainer,{...e.model.headerStateValue}),!1,!1,s.notTradableText&&o.createElement(Bt,{model:s}),!s.needSignIn&&!s.noBroker&&!s.notTradableText&&(B?o.createElement(q,{model:(0,h.ensureNotNull)(s.orderPreviewModel),side:s.side(),loading:s.loading}):o.createElement(It,{...e,ref:I,orderType:O,setOrderType:s.setOrderType,orderPanelStatus:w,isNoQuotes:k,orderWidgetRef:M}))),T&&o.createElement("div",{className:Pt.orderInfoAndSeparator},o.createElement("div",{className:Pt.separator}),o.createElement("div",{className:Pt.resizeHandler,ref:x}),o.createElement(Et,{"data-name":"order-info",model:(0,h.ensureNotNull)(s.orderInfoModel),infoTableData:P,orderPanelStatus:w}))))}var xt=r(601235);class Dt extends o.PureComponent{constructor(e){super(e),this._onKeyDown=e=>{27===e.keyCode&&this.props.onCancel&&this.props.onCancel()}}render(){return o.createElement("div",{"data-name":"order-panel",className:xt.orderPanel,onKeyDown:this._onKeyDown},o.createElement(Tt,{model:this.props.model,settings:this.props.settings,key:this.props.model.id,trackEvent:this.props.trackEvent,focus:this.props.focus}))}}
var Ft=r(930894),Ht=r(40766),Lt=r(930052),Wt=r(910549),Vt=r(996038),Rt=r(274837),zt=r(408178);const Kt=o.memo((e=>{const{model:t,isOpened:r,settings:s,onClose:n,trackEvent:i,focus:a,onOpen:l}=e;return(0,Rt.useCommonDialogHandlers)({isOpened:r,onOpen:l,onClose:n}),o.createElement(Lt.MatchMedia,{rule:Vt.DialogBreakpoints.TabletSmall},(e=>o.createElement(Ht.PopupDialog,{className:zt.dialog,isOpened:r,onKeyDown:u,fullscreen:e,rounded:!e,"data-name":"order-dialog-popup"},o.createElement(Ft.Body,{className:zt.dialogBody},o.createElement(Wt.PopupContext.Consumer,null,c)))));function c(e){return o.createElement(Tt,{settings:s,model:t,key:t.id,trackEvent:i,focus:a,popupController:e})}function u(e){27===e.keyCode&&(null==t||t.onDoneButtonClicked.resolve(!1),null==n||n())}}));let At=null;function Zt(e){const{viewModel:t,settings:r,onClose:s,onOpen:i,focus:a,trackEvent:l}=e;Gt(s);const c={model:t,settings:r,isOpened:!0,onOpen:i,onClose:()=>{Gt(s),void 0!==c.onClose&&(t.headerModel.pinButtonClicked().unsubscribe(null,c.onClose),t.headerModel.closeButtonClicked().unsubscribe(null,c.onClose))},trackEvent:l,focus:a||$t(t.getOrderType())};!function(e){At=document.createElement("div"),document.body.appendChild(At),n.render(o.createElement(_.Context.Provider,{value:{mode:e.model.mode.value(),supportTrailingStop:Boolean(e.model.supportTrailingStop())}},o.createElement(Kt,{...e})),At)}(c),void 0!==c.onClose&&(t.headerModel.pinButtonClicked().subscribe(null,c.onClose),t.headerModel.closeButtonClicked().subscribe(null,c.onClose))}function Gt(e){At&&(n.unmountComponentAtNode(At),At=null,null==e||e())}function qt(e,t,r,s,i,a){Ut(r);const l={model:e,settings:t,onClose:()=>{Ut(r),l.model.headerModel&&(l.model.headerModel.pinButtonClicked().unsubscribe(null,l.onClose),l.model.headerModel.closeButtonClicked().unsubscribe(null,l.onClose))},onCancel:()=>{l.model.headerModel&&l.model.headerModel.cancel()},trackEvent:a,focus:i||$t(e.getOrderType())};l.model.headerModel&&(l.model.headerModel.pinButtonClicked().subscribe(null,l.onClose),l.model.headerModel.closeButtonClicked().subscribe(null,l.onClose)),function(e,t,r){const s=o.createElement(_.Context.Provider,{value:{resizerWidth:r||null,mode:e.model.mode.value(),supportTrailingStop:Boolean(e.model.supportTrailingStop())}},o.createElement(Dt,{...e}));n.render(s,t)}(l,r,s)}function Ut(e){n.unmountComponentAtNode(e)}function $t(e){let t;switch(e){case 2:t=5;break;case 1:case 4:t=1;break;case 3:t=2;break;default:t=void 0}return t}},973044:(e,t,r)=>{"use strict";r.d(t,{withDialogLazyLoad:()=>n});var s=r(50959),o=r(252130);function n(e){return t=>{const r=(0,o.useIsMounted)();return((e=>{const[t,r]=(0,s.useState)(!1);return(0,s.useEffect)((()=>{!t&&e&&r(!0)}),[e]),t})(t.isOpen)||t.isOpen)&&r?s.createElement(s.Suspense,{fallback:null},s.createElement(e,{...t})):null}}},761248:(e,t,r)=>{"use strict";function s(e){return e.charAt(0).toUpperCase()+e.substring(1)}r.d(t,{capitalizeFirstLetter:()=>s})},115589:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M9.36 5a4.44 4.44 0 0 0-4.39 4.5c0 2.49 1.97 4.5 4.39 4.5 1.62 0 3.04-.9 3.8-2.25l.84.5A5.33 5.33 0 0 1 9.36 15 5.43 5.43 0 0 1 4 9.5C4 6.46 6.4 4 9.36 4c1.98 0 3.71 1.1 4.64 2.75l-.84.5A4.36 4.36 0 0 0 9.36 5Z"/></svg>'},96634:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M5 9h9v1H5V9Z"/></svg>'},218666:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M9.5 4.5h-1v4h-4v1h4v4h1v-4h4v-1h-4v-4Z"/></svg>'},610600:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path stroke="currentColor" d="M13.5 7l1.65-1.65a.5.5 0 0 0 0-.7l-1.8-1.8a.5.5 0 0 0-.7 0L11 4.5M13.5 7L11 4.5M13.5 7l-8.35 8.35a.5.5 0 0 1-.36.15H2.5v-2.3a.5.5 0 0 1 .15-.35L11 4.5"/></svg>'},672197:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18"><path fill="currentColor" d="M10 6.13V8L6 5.5 10 3v2.1A5 5 0 1 1 4 10a.5.5 0 0 1 1 0 4 4 0 1 0 5-3.87Z"/></svg>'},914987:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><mask width="17" height="20" fill="#000" x="6" y="4" maskUnits="userSpaceOnUse" id="aayofezey"><path fill="#fff" d="M6 4h17v20H6z"/><path fill-rule="evenodd" d="M9 5a2 2 0 0 0-2 2v14c0 1.1.9 2 2 2h11a2 2 0 0 0 2-2V7a2 2 0 0 0-2-2H9Zm1 2a1 1 0 0 0-1 1v2a1 1 0 0 0 1 1h9a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1h-9Zm2 8.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm2.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm5.5-1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0ZM10.5 21a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Zm5.5-1.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0Zm2.5 1.5a1.5 1.5 0 1 0 0-3 1.5 1.5 0 0 0 0 3Z"/></mask><path fill="currentcolor" d="M8 7a1 1 0 0 1 1-1V4a3 3 0 0 0-3 3h2Zm0 14V7H6v14h2Zm1 1a1 1 0 0 1-1-1H6a3 3 0 0 0 3 3v-2Zm11 0H9v2h11v-2Zm1-1a1 1 0 0 1-1 1v2a3 3 0 0 0 3-3h-2Zm0-14v14h2V7h-2Zm-1-1a1 1 0 0 1 1 1h2a3 3 0 0 0-3-3v2ZM9 6h11V4H9v2Zm1 2V6a2 2 0 0 0-2 2h2Zm0 2V8H8v2h2Zm0 0H8c0 1.1.9 2 2 2v-2Zm9 0h-9v2h9v-2Zm0 0v2a2 2 0 0 0 2-2h-2Zm0-2v2h2V8h-2Zm0 0h2a2 2 0 0 0-2-2v2Zm-9 0h9V6h-9v2Zm.5 10a2.5 2.5 0 0 0 2.5-2.5h-2a.5.5 0 0 1-.5.5v2ZM8 15.5a2.5 2.5 0 0 0 2.5 2.5v-2a.5.5 0 0 1-.5-.5H8Zm2.5-2.5A2.5 2.5 0 0 0 8 15.5h2c0-.28.22-.5.5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2c.28 0 .5.22.5.5h2Zm2 0a.5.5 0 0 1-.5.5v2a2.5 2.5 0 0 0 2.5-2.5h-2Zm-.5-.5c.28 0 .5.22.5.5h2a2.5 2.5 0 0 0-2.5-2.5v2Zm-.5.5c0-.28.22-.5.5-.5v-2a2.5 2.5 0 0 0-2.5 2.5h2Zm.5.5a.5.5 0 0 1-.5-.5h-2a2.5 2.5 0 0 0 2.5 2.5v-2Zm4 2a2.5 2.5 0 0 0 2.5-2.5h-2a.5.5 0 0 1-.5.5v2ZM16 15.5a2.5 2.5 0 0 0 2.5 2.5v-2a.5.5 0 0 1-.5-.5h-2Zm2.5-2.5a2.5 2.5 0 0 0-2.5 2.5h2c0-.28.22-.5.5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2c.28 0 .5.22.5.5h2Zm-10 4a.5.5 0 0 1-.5.5v2a2.5 2.5 0 0 0 2.5-2.5h-2Zm-.5-.5c.28 0 .5.22.5.5h2a2.5 2.5 0 0 0-2.5-2.5v2Zm-.5.5c0-.28.22-.5.5-.5v-2A2.5 2.5 0 0 0 8 19.5h2Zm.5.5a.5.5 0 0 1-.5-.5H8a2.5 2.5 0 0 0 2.5 2.5v-2Zm4 2a2.5 2.5 0 0 0 2.5-2.5h-2a.5.5 0 0 1-.5.5v2ZM12 19.5a2.5 2.5 0 0 0 2.5 2.5v-2a.5.5 0 0 1-.5-.5h-2Zm2.5-2.5a2.5 2.5 0 0 0-2.5 2.5h2c0-.28.22-.5.5-.5v-2Zm2.5 2.5a2.5 2.5 0 0 0-2.5-2.5v2c.28 0 .5.22.5.5h2Zm2 0a.5.5 0 0 1-.5.5v2a2.5 2.5 0 0 0 2.5-2.5h-2Zm-.5-.5c.28 0 .5.22.5.5h2a2.5 2.5 0 0 0-2.5-2.5v2Zm-.5.5c0-.28.22-.5.5-.5v-2a2.5 2.5 0 0 0-2.5 2.5h2Zm.5.5a.5.5 0 0 1-.5-.5h-2a2.5 2.5 0 0 0 2.5 2.5v-2Z" mask="url(#aayofezey)"/></svg>'},364366:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="#FB8C00" d="M0 9a9 9 0 1 1 18 0A9 9 0 0 1 0 9z"/><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9 4c-.79 0-1.38.7-1.25 1.48l.67 4.03a.59.59 0 0 0 1.16 0l.67-4.03A1.27 1.27 0 0 0 9 4zm0 8a1 1 0 1 0 0 2 1 1 0 0 0 0-2z"/></svg>'}}]);