Files
ai/charting_library/bundles/currency-label-menu.ccab0620dccaa2883306.js
2023-02-02 13:31:14 +00:00

9 lines
27 KiB
JavaScript

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2704],{50789:e=>{e.exports={summary:"summary-hk3Mmxts",hovered:"hovered-hk3Mmxts",caret:"caret-hk3Mmxts"}},96746:e=>{e.exports={"tablet-normal-breakpoint":"screen and (max-width: 768px)","small-height-breakpoint":"screen and (max-height: 360px)","tablet-small-breakpoint":"screen and (max-width: 428px)"}},67179:e=>{e.exports={dialog:"dialog-HExheUfY",wrapper:"wrapper-HExheUfY",separator:"separator-HExheUfY"}},91441:e=>{e.exports={"small-height-breakpoint":"screen and (max-height: 360px)",container:"container-tuOy5zvD",unsetAlign:"unsetAlign-tuOy5zvD",title:"title-tuOy5zvD",subtitle:"subtitle-tuOy5zvD",ellipsis:"ellipsis-tuOy5zvD",close:"close-tuOy5zvD"}},28712:e=>{e.exports={container:"container-CcsqUMct",inputContainer:"inputContainer-CcsqUMct",withCancel:"withCancel-CcsqUMct",input:"input-CcsqUMct",icon:"icon-CcsqUMct",cancel:"cancel-CcsqUMct"}},17147:e=>{e.exports={scrollWrap:"scrollWrap-wu0oD0zz"}},75193:e=>{e.exports={container:"container-bD7VSobf",separator:"separator-bD7VSobf",section:"section-bD7VSobf"}},61936:e=>{e.exports={action:"action-cwmjKW8F",hovered:"hovered-cwmjKW8F",active:"active-cwmjKW8F",label:"label-cwmjKW8F",description:"description-cwmjKW8F",selected:"selected-cwmjKW8F",small:"small-cwmjKW8F",withDescription:"withDescription-cwmjKW8F",action__favoriteIcon:"action__favoriteIcon-cwmjKW8F",action__favoriteIcon_active:"action__favoriteIcon_active-cwmjKW8F",labelAndDescription:"labelAndDescription-cwmjKW8F",icon:"icon-cwmjKW8F",fakeIcon:"fakeIcon-cwmjKW8F",highlighted:"highlighted-cwmjKW8F"}},94953:e=>{e.exports={menu:"menu-CW6VX2O6",withDescriptions:"withDescriptions-CW6VX2O6",header:"header-CW6VX2O6",title:"title-CW6VX2O6",container:"container-CW6VX2O6",icon:"icon-CW6VX2O6",clear:"clear-CW6VX2O6",input:"input-CW6VX2O6",highlighted:"highlighted-CW6VX2O6",active:"active-CW6VX2O6",section:"section-CW6VX2O6"}},71091:()=>{},16842:e=>{e.exports={favorite:"favorite-JVQQsDQk",disabled:"disabled-JVQQsDQk",active:"active-JVQQsDQk",checked:"checked-JVQQsDQk"}},81524:e=>{e.exports={highlighted:"highlighted-YWUtZHTy"}},91626:e=>{e.exports={separator:"separator-jtAq6E4V"}},524:e=>{e.exports={separator:"separator-GzmeVcFo",small:"small-GzmeVcFo",normal:"normal-GzmeVcFo",large:"large-GzmeVcFo"}},40367:e=>{e.exports={icon:"icon-AL2odtws",dropped:"dropped-AL2odtws"}},90186:(e,t,n)=>{"use strict";function i(e){return o(e,s)}function r(e){return o(e,a)}function o(e,t){const n=Object.entries(e).filter(t),i={};for(const[e,t]of n)i[e]=t;return i}function s(e){const[t,n]=e;return 0===t.indexOf("data-")&&"string"==typeof n}function a(e){return 0===e[0].indexOf("aria-")}n.d(t,{filterDataProps:()=>i,filterAriaProps:()=>r,filterProps:()=>o,isDataAttribute:()=>s,isAriaAttribute:()=>a})},26005:(e,t,n)=>{"use strict";n.d(t,{CollapsibleSection:()=>c});var i=n(59496),r=n(97754),o=n.n(r),s=n(10381),a=n(50789);function c(e){return i.createElement(i.Fragment,null,i.createElement("div",{className:o()(e.className,a.summary),onClick:function(){
e.onStateChange&&e.onStateChange(!e.open)},"data-open":e.open},e.summary,i.createElement(s.ToolWidgetCaret,{className:a.caret,dropped:Boolean(e.open)})),e.open&&e.children)}},40233:(e,t,n)=>{"use strict";n.d(t,{VerticalAttachEdge:()=>i,HorizontalAttachEdge:()=>r,VerticalDropDirection:()=>o,HorizontalDropDirection:()=>s,getPopupPositioner:()=>l});var i,r,o,s,a=n(88537);!function(e){e[e.Top=0]="Top",e[e.Bottom=1]="Bottom"}(i||(i={})),function(e){e[e.Left=0]="Left",e[e.Right=1]="Right"}(r||(r={})),function(e){e[e.FromTopToBottom=0]="FromTopToBottom",e[e.FromBottomToTop=1]="FromBottomToTop"}(o||(o={})),function(e){e[e.FromLeftToRight=0]="FromLeftToRight",e[e.FromRightToLeft=1]="FromRightToLeft"}(s||(s={}));const c={verticalAttachEdge:i.Bottom,horizontalAttachEdge:r.Left,verticalDropDirection:o.FromTopToBottom,horizontalDropDirection:s.FromLeftToRight,verticalMargin:0,horizontalMargin:0,matchButtonAndListboxWidths:!1};function l(e,t){return(n,l)=>{const d=(0,a.ensureNotNull)(e).getBoundingClientRect(),{verticalAttachEdge:u=c.verticalAttachEdge,verticalDropDirection:h=c.verticalDropDirection,horizontalAttachEdge:m=c.horizontalAttachEdge,horizontalDropDirection:p=c.horizontalDropDirection,horizontalMargin:v=c.horizontalMargin,verticalMargin:g=c.verticalMargin,matchButtonAndListboxWidths:f=c.matchButtonAndListboxWidths}=t,C=u===i.Top?-1*g:g,E=m===r.Right?d.right:d.left,w=u===i.Top?d.top:d.bottom,x={x:E-(p===s.FromRightToLeft?n:0)+v,y:w-(h===o.FromBottomToTop?l:0)+C};return f&&(x.overrideWidth=d.width),x}}},11507:(e,t,n)=>{"use strict";n.r(t),n.d(t,{currencyActions:()=>a});var i=n(88537),r=n(28353),o=n(82629),s=n(19868);function a(e,t,n){if(null===t||t.readOnly)return[];const a=[],c=t=>{e.setPriceScaleCurrency(n,t)},l=t.selectedCurrency,d=t.originalCurrencies,u=t.baseCurrencies,h=t.displayedValues,m=s.favoriteCurrencyUnitConversionService.get().currencies,p={id:"first_section",actions:[]};if(d.size>1){const e=(0,o.createAction)("Mixed",(0,r.t)("Mixed"),void 0,void 0,null===t.selectedCurrency,()=>c(null));p.actions.push(e)}const v=e.model().availableCurrencies();if(null!==l){const e=(0,i.ensureNotNull)(v.item(l)),t=(0,o.createAction)(l,(0,i.ensureDefined)(h.get(l)),e.logoUrl,e.description,!0,()=>{},m.has(l),()=>s.favoriteCurrencyUnitConversionService.toggle("currencies",l));p.actions.push(t)}const g=v.filterConvertible(u,e=>e!==l&&d.has(e));for(const e of g){const n=(0,i.ensureNotNull)(v.item(e.id));p.actions.push((0,o.createAction)(e.id,e.code,n.logoUrl,n.description,t.selectedCurrency===e.id,()=>c(e.id),m.has(e.id),()=>s.favoriteCurrencyUnitConversionService.toggle("currencies",e.id)))}p.actions.length>0&&a.push(p);const f=v.filterConvertible(u,e=>e!==l&&!d.has(e)),C=[],E=[];for(const e of f){const n=(0,i.ensureNotNull)(v.item(e.id)),r=m.has(e.id),a=(0,o.createAction)(e.id,e.code,n.logoUrl,n.description,t.selectedCurrency===e.id,()=>c(e.id),r,()=>s.favoriteCurrencyUnitConversionService.toggle("currencies",e.id));r?C.push(a):E.push(a)}return(E.length>0||C.length>0)&&a.push({id:"second_section",actions:C.concat(E)}),a}},
19868:(e,t,n)=>{"use strict";n.d(t,{favoriteCurrencyUnitConversionService:()=>a});var i=n(56840),r=n(21097),o=n(9127);class s extends o.AbstractJsonStoreService{constructor(e,t){super(e,t,"FAVORITE_CURRENCY_UNIT_CONVERSION_CHANGED","currencyUnitConversion.favorites",{currencies:new Set,units:new Set})}add(e,t){const n=this.get();n[e].add(t),this.set(n)}remove(e,t){const n=this.get();n[e].delete(t)&&this.set(n)}toggle(e,t){this.get()[e].has(t)?this.remove(e,t):this.add(e,t)}_serialize(e){return[[...e.currencies],[...e.units]]}_deserialize(e){return{currencies:new Set(e[0]),units:new Set(e[1])}}}const a=new s(r.TVXWindowEvents,i)},53997:(e,t,n)=>{"use strict";n.r(t),n.d(t,{unitActions:()=>a});var i=n(88537),r=n(28353),o=n(82629),s=n(19868);function a(e,t,n){if(null===t||0===t.availableGroups.size)return[];const a=[],c=t=>{e.setPriceScaleUnit(n,t)},l=t.selectedUnit,d=t.originalUnits,u=t.names,h=t.descriptions,m=s.favoriteCurrencyUnitConversionService.get().units,p={actions:[],id:"first_section"};if(d.size>1){const e=(0,o.createAction)("Mixed",(0,r.t)("Mixed"),void 0,void 0,null===t.selectedUnit,()=>c(null));p.actions.push(e)}const v=e.model().availableUnits();if(null!==l){const e=(0,o.createAction)(l,(0,i.ensureDefined)(u.get(l)),void 0,(0,i.ensureDefined)(h.get(l)),!0,()=>{},m.has(l),()=>s.favoriteCurrencyUnitConversionService.toggle("units",l));p.actions.push(e)}const g=v.unitsByGroups(t.availableGroups),f=[],C=[];for(const e of g)for(const t of e.units){const e=m.has(t.id);if(t.id===l||!e&&!d.has(t.id))continue;const n=(0,o.createAction)(t.id,t.name,void 0,t.description,!1,()=>c(t.id),e,()=>s.favoriteCurrencyUnitConversionService.toggle("units",t.id));e?C.push(n):f.push(n)}(f.length>0||C.length>0)&&p.actions.push(...C.sort((e,t)=>e.label.toLowerCase().localeCompare(t.label.toLowerCase())),...f),p.actions.length>0&&a.push(p);const E=l&&v.unitGroupById(l);if(null!==E)for(const e of g){if(e.name!==E)continue;const t=[];for(const n of e.units)n.id===l||d.has(n.id)||m.has(n.id)||t.push((0,o.createAction)(n.id,n.name,void 0,n.description,!1,()=>c(n.id),!1,()=>s.favoriteCurrencyUnitConversionService.toggle("units",n.id)));t.length>0&&a.push({id:e.name,name:e.name,actions:t})}for(const e of g){if(e.name===E)continue;const t=[];for(const n of e.units)n.id===l||d.has(n.id)||m.has(n.id)||t.push((0,o.createAction)(n.id,n.name,void 0,n.description,!1,()=>c(n.id),!1,()=>s.favoriteCurrencyUnitConversionService.toggle("units",n.id)));t.length>0&&a.push({id:e.name,name:e.name,actions:t})}return a}},82629:(e,t,n)=>{"use strict";function i(e,t,n,i,r,o,s,a){return{id:e,label:t,icon:n,description:i,isActive:r,onClick:o,isFavorite:s,onFavoriteClick:a}}n.d(t,{createAction:()=>i})},24437:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>r});var i=n(96746);const r={SmallHeight:i["small-height-breakpoint"],TabletSmall:i["tablet-small-breakpoint"],TabletNormal:i["tablet-normal-breakpoint"]}},85457:(e,t,n)=>{"use strict";n.d(t,{AdaptivePopupDialog:()=>_});var i=n(59496),r=n(88537)
;var o=n(97754),s=n.n(o),a=n(68335),c=n(35749),l=n(81e3),d=n(1109),u=n(24437),h=n(90692),m=n(95711),p=n(52092),v=n(76422),g=n(9745);const f=i.createContext({setHideClose:()=>{}});var C=n(37257),E=n(91441);function w(e){const{title:t,subtitle:n,showCloseIcon:r=!0,onClose:o,renderBefore:a,renderAfter:c,draggable:l,className:d,unsetAlign:u}=e,[h,m]=(0,i.useState)(!1);return i.createElement(f.Provider,{value:{setHideClose:m}},i.createElement("div",{className:s()(E.container,d,(n||u)&&E.unsetAlign)},a,i.createElement("div",{"data-dragg-area":l,className:E.title},i.createElement("div",{className:E.ellipsis},t),n&&i.createElement("div",{className:s()(E.ellipsis,E.subtitle)},n)),c,r&&!h&&i.createElement(g.Icon,{className:E.close,icon:C,onClick:o,"data-name":"close","data-role":"button"})))}var x=n(67179);const y={vertical:20},b={vertical:0};class _ extends i.PureComponent{constructor(){super(...arguments),this._controller=null,this._reference=null,this._orientationMediaQuery=null,this._renderChildren=(e,t)=>(this._controller=e,this.props.render({requestResize:this._requestResize,centerAndFit:this._centerAndFit,isSmallWidth:t})),this._handleReference=e=>this._reference=e,this._handleClose=()=>{this.props.onClose()},this._handleOpen=()=>{void 0!==this.props.onOpen&&this.props.isOpened&&this.props.onOpen(this.props.fullScreen||window.matchMedia(u.DialogBreakpoints.TabletSmall).matches)},this._handleKeyDown=e=>{var t;if(!e.defaultPrevented)switch(this.props.onKeyDown&&this.props.onKeyDown(e),(0,a.hashFromEvent)(e)){case 27:if(e.defaultPrevented)return;if(this.props.forceCloseOnEsc&&this.props.forceCloseOnEsc())return void this._handleClose();const{activeElement:n}=document,i=(0,r.ensureNotNull)(this._reference);if(null!==n){if(e.preventDefault(),"true"===(t=n).getAttribute("data-haspopup")&&"true"!==t.getAttribute("data-expanded"))return void this._handleClose();if((0,c.isTextEditingField)(n))return void i.focus();if(i.contains(n))return void this._handleClose()}}},this._requestResize=()=>{null!==this._controller&&this._controller.recalculateBounds()},this._centerAndFit=()=>{null!==this._controller&&this._controller.centerAndFit()}}componentDidMount(){var e,t;v.subscribe(p.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),this._handleOpen(),void 0!==this.props.onOpen&&(this._orientationMediaQuery=window.matchMedia("(orientation: portrait)"),e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.addEventListener)?e.addEventListener("change",t):e.addListener(t))}componentWillUnmount(){var e,t;v.unsubscribe(p.CLOSE_POPUPS_AND_DIALOGS_COMMAND,this._handleClose,null),null!==this._orientationMediaQuery&&(e=this._orientationMediaQuery,t=this._handleOpen,(null==e?void 0:e.removeEventListener)?e.removeEventListener("change",t):e.removeListener(t))}focus(){(0,r.ensureNotNull)(this._reference).focus()}getElement(){return this._reference}contains(e){var t,n;return null!==(n=null===(t=this._reference)||void 0===t?void 0:t.contains(e))&&void 0!==n&&n}render(){
const{className:e,wrapperClassName:t,headerClassName:n,isOpened:r,title:o,dataName:a,onClickOutside:c,additionalElementPos:p,additionalHeaderElement:v,backdrop:g,shouldForceFocus:f=!0,showSeparator:C,subtitle:E,draggable:_=!0,fullScreen:D=!1,showCloseIcon:S=!0,rounded:N=!0,isAnimationEnabled:A,growPoint:k,dialogTooltip:F,unsetHeaderAlign:O,onDragStart:z,dataDialogName:M}=this.props,I="after"!==p?v:void 0,L="after"===p?v:void 0,U="string"==typeof o?o:M||"";return i.createElement(h.MatchMedia,{rule:u.DialogBreakpoints.SmallHeight},p=>i.createElement(h.MatchMedia,{rule:u.DialogBreakpoints.TabletSmall},u=>i.createElement(l.PopupDialog,{rounded:!(u||D)&&N,className:s()(x.dialog,e),isOpened:r,reference:this._handleReference,onKeyDown:this._handleKeyDown,onClickOutside:c,onClickBackdrop:c,fullscreen:u||D,guard:p?b:y,boundByScreen:u||D,shouldForceFocus:f,backdrop:g,draggable:_,isAnimationEnabled:A,growPoint:k,name:this.props.dataName,dialogTooltip:F,onDragStart:z},i.createElement("div",{className:s()(x.wrapper,t),"data-name":a,"data-dialog-name":U},void 0!==o&&i.createElement(w,{draggable:_&&!(u||D),onClose:this._handleClose,renderAfter:L,renderBefore:I,subtitle:E,title:o,showCloseIcon:S,className:n,unsetAlign:O}),C&&i.createElement(d.Separator,{className:x.separator}),i.createElement(m.PopupContext.Consumer,null,e=>this._renderChildren(e,u||D))))))}}},69654:(e,t,n)=>{"use strict";n.d(t,{DialogSearch:()=>d});var i=n(59496),r=n(97754),o=n.n(r),s=n(28353),a=n(9745),c=n(5639),l=n(28712);function d(e){const{children:t,renderInput:n,onCancel:r,...d}=e;return i.createElement("div",{className:l.container},i.createElement("div",{className:o()(l.inputContainer,r&&l.withCancel)},n||i.createElement(u,{...d})),t,i.createElement(a.Icon,{className:l.icon,icon:c}),r&&i.createElement("div",{className:l.cancel,onClick:r},(0,s.t)("Cancel")))}function u(e){const{className:t,reference:n,value:r,onChange:s,onFocus:a,onBlur:c,onKeyDown:d,onSelect:u,placeholder:h,...m}=e;return i.createElement("input",{...m,ref:n,type:"text",className:o()(t,l.input),autoComplete:"off","data-role":"search",placeholder:h,value:r,onChange:s,onFocus:a,onBlur:c,onSelect:u,onKeyDown:d})}},71834:(e,t,n)=>{"use strict";n.r(t),n.d(t,{UnitConversionRenderer:()=>P});var i=n(59496),r=n(87995),o=n(19868),s=n(90692),a=n(19785),c=n(68335);var l=n(24437),d=n(40233),u=n(97754),h=n.n(u),m=n(28353),p=n(9745),v=n(50628),g=n(27317),f=n(40173),C=n(51613),E=n(26005),w=n(36189);n(71091);function x(e){var t,n;const r=(o=e.size,s=e.className,u("tv-circle-logo","tv-circle-logo--"+o,s));var o,s;const a=null!==(n=null!==(t=e.alt)&&void 0!==t?t:e.title)&&void 0!==n?n:"";return function(e){return"logoUrl"in e&&void 0!==e.logoUrl&&0!==e.logoUrl.length}(e)?i.createElement("img",{className:r,src:e.logoUrl,alt:a,title:e.title,loading:e.loading}):i.createElement("span",{className:r,title:e.title},e.placeholderLetter)}var y=n(24637),b=n(61936);const _=i.memo((function(e){
const{label:t,icon:n,rules:r,search:o,description:s,onClick:a,onClose:c,isActive:l,isSmallSize:d,isSelected:u,selectedRef:m,hasDescriptions:p,hasIcons:v,isFavorite:g,onFavoriteClick:f}=e,C=(0,i.useCallback)(()=>{a(),c&&c()},[a,c]),E=d&&b.small;return i.createElement("div",{className:h()(b.action,l&&b.active,E,p&&b.withDescription,u&&b.selected),onClick:C,ref:m},v&&(void 0!==n?i.createElement(x,{logoUrl:n,size:p?"xsmall":"xxsmall",className:h()(b.icon,E)}):i.createElement("span",{className:h()(b.fakeIcon,E)})),i.createElement("div",{className:h()(b.labelAndDescription,E)},i.createElement("span",{className:h()(b.label,E)},_(t)),p&&i.createElement("br",null),p&&i.createElement("span",{className:h()(b.description,E)},s?_(s):"")),void 0!==g&&i.createElement("div",{className:h()(b.action__favoriteIcon,g&&b.action__favoriteIcon_active)},i.createElement(w.FavoriteButton,{isActive:l,isFilled:g,onClick:function(e){e.stopPropagation(),null==f||f()}})));function _(e){return i.createElement(y.HighlightedText,{text:e,rules:r,queryString:o,className:h()(l&&b.highlighted,l&&b.active)})}}),(e,t)=>Object.keys(t).filter(e=>!["onClick","onClose","onFavoriteClick"].includes(e)).every(n=>t[n]===e[n]));var D=n(21031),S=n(74471),N=n(94953),A=n(17147);const k=(0,f.mergeThemes)(g.DEFAULT_MENU_THEME,A);function F(e){const{title:t,sections:n,onClose:r,selectedId:o,selectedRef:s,search:a,setSearch:c,items:l,rules:d,searchRef:u,hasDescriptions:g,hasIcons:f,...w}=e,[x,y]=(0,i.useState)(()=>n.reduce((e,t,n)=>(t.name&&(e[t.id]=!0),e),{}));function b(e){const{id:t,...n}=e;return i.createElement(_,{key:t,rules:d,search:a,onClose:r,isSmallSize:!0,isSelected:t===o,selectedRef:t===o?s:void 0,hasDescriptions:g,hasIcons:f,...n})}return i.createElement(v.PopupMenu,{...w,onClose:r,className:h()(N.menu,g&&N.withDescriptions),theme:k,maxHeight:g?313:280,noMomentumBasedScroll:!0,isOpened:!0,onOpen:function(){var e;null===(e=u.current)||void 0===e||e.focus()}},i.createElement("div",{className:N.header},i.createElement("div",{className:N.title},t),i.createElement("div",{className:N.container},i.createElement(p.Icon,{icon:D,className:N.icon}),i.createElement("input",{size:1,type:"text",className:N.input,placeholder:(0,m.t)("Search"),autoComplete:"off","data-role":"search",onChange:function(e){c(e.target.value)},value:a,ref:u}),Boolean(a)&&i.createElement(p.Icon,{icon:S,className:N.clear,onClick:function(){c("")}}))),a?l.map(b):n.map((e,t)=>i.createElement(i.Fragment,{key:e.id},Boolean(t)&&i.createElement(C.PopupMenuSeparator,null),e.name?i.createElement(E.CollapsibleSection,{summary:e.name,className:N.section,open:x[e.id],onStateChange:t=>y({...x,[e.id]:t})},e.actions.map(b)):e.actions.map(b))))}var O=n(85457),z=n(69654),M=n(75193);function I(e){const{title:t,onClose:n,sections:r,selectedId:o,selectedRef:s,search:a,setSearch:c,items:l,rules:d,searchRef:u,hasIcons:h,hasDescriptions:p}=e;return i.createElement(O.AdaptivePopupDialog,{title:t,onClose:n,render:function(){return i.createElement(i.Fragment,null,i.createElement(z.DialogSearch,{placeholder:(0,
m.t)("Search"),onChange:v,reference:u}),i.createElement("div",{className:M.container},a?l.map(e=>{const{id:t,isActive:r,...c}=e;return i.createElement(_,{key:t,isActive:r,onClose:n,rules:d,search:a,isSelected:t===o,selectedRef:t===o?s:void 0,hasIcons:h,hasDescriptions:p,...c})}):r.map((e,t)=>i.createElement(i.Fragment,{key:e.id},e.name&&i.createElement("div",{className:M.section},e.name),e.actions.map((c,l)=>{const{id:u,...m}=c,v=l===e.actions.length-1,g=t===r.length-1;return i.createElement(i.Fragment,{key:u},i.createElement(_,{rules:d,search:a,onClose:n,isSelected:u===o,selectedRef:u===o?s:void 0,hasIcons:h,hasDescriptions:p,...m}),!g&&v&&i.createElement("div",{className:M.separator}))})))))},dataName:"unit-conversion-dialog",draggable:!1,fullScreen:!0,isOpened:!0});function v(e){c(e.target.value)}}const L={horizontalAttachEdge:d.HorizontalAttachEdge.Right,horizontalDropDirection:d.HorizontalDropDirection.FromRightToLeft};function U(e){const{element:t,...n}=e,[r,o]=(0,i.useState)(E()),[u,h]=(0,i.useState)(""),m=(0,i.useRef)(null),p=(0,i.useRef)(null),v=(0,i.useMemo)(()=>(0,a.createRegExpList)(u),[u]),{activeIdx:g,setActiveIdx:f}=function(e,t,n,r="keydown"){const[o,s]=(0,i.useState)(-1);return(0,i.useEffect)(()=>{if(!e)return;const n=e=>{switch((0,c.hashFromEvent)(e)){case 40:if(o===t.length-1)break;e.preventDefault(),s(o+1);break;case 38:if(o<=0)break;e.preventDefault(),s(o-1);break}};return e.addEventListener("keydown",n),()=>{e.removeEventListener("keydown",n)}},[e,o,t]),(0,i.useEffect)(()=>{if(!e||!n)return;const i=e=>{var i;e.repeat||13===(0,c.hashFromEvent)(e)&&n(null!==(i=t[o])&&void 0!==i?i:null,e)};return e.addEventListener(r,i),()=>{e.removeEventListener(r,i)}},[e,o,t,n,r]),{activeIdx:o,setActiveIdx:s}}(m.current,r,(function(e){e&&(e.onClick(),n.onClose())}));!function(e,t=[]){(0,i.useEffect)(()=>{e(-1)},[...t])}(f,[r]),function(e,t){(0,i.useEffect)(()=>{var n;t>=0&&(null===(n=e.current)||void 0===n||n.scrollIntoView({block:"nearest"}))},[t])}(p,g),(0,i.useEffect)(()=>{o(u?function(e,t,n){const i=e.reduce((e,t)=>[...e,...t.actions],[]);return(0,a.rankedSearch)({data:i,rules:n,queryString:t,primaryKey:"label",secondaryKey:"description"})}(n.sections,u,v):E())},[u,n.sections,v]);const C=(0,i.useMemo)(()=>({selectedId:Boolean(g>=0&&r[g])?r[g].id:"",selectedRef:p,search:u,setSearch:h,searchRef:m,items:r,rules:v,hasIcons:r.some(e=>void 0!==e.icon),hasDescriptions:r.some(e=>void 0!==e.description)}),[g,p,u,h,m,r,v]);return i.createElement(s.MatchMedia,{rule:l.DialogBreakpoints.TabletSmall},e=>e?i.createElement(I,{...n,...C}):i.createElement(F,{...n,...C,position:(0,d.getPopupPositioner)(t,L),doNotCloseOn:t}));function E(){return n.sections.reduce((e,t)=>(e.push(...t.actions),e),[])}}class P{constructor(e,t,n){this._rootElem=document.createElement("div"),this.close=()=>{null!==this._rootElem&&(r.unmountComponentAtNode(this._rootElem),o.favoriteCurrencyUnitConversionService.getOnChange().unsubscribe(this,this._render),this._rootElem=null)},this.isOpened=()=>null!==this._rootElem,this._title=e,this._element=t,
this._sectionsGetter=n,this._render(),o.favoriteCurrencyUnitConversionService.getOnChange().subscribe(this,this._render)}_render(){const e={title:this._title,sections:this._sectionsGetter(),element:this._element,onClose:this.close};r.render(i.createElement(U,{...e}),this._rootElem)}}},36189:(e,t,n)=>{"use strict";n.d(t,{FavoriteButton:()=>u});var i=n(28353),r=n(59496),o=n(97754),s=n(9745),a=n(20614),c=n(55783),l=n(16842);const d={add:(0,i.t)("Add to favorites"),remove:(0,i.t)("Remove from favorites")};function u(e){const{className:t,isFilled:n,isActive:i,onClick:u,...h}=e;return r.createElement(s.Icon,{...h,className:o(l.favorite,"apply-common-tooltip",n&&l.checked,i&&l.active,t),icon:n?a:c,onClick:u,title:n?d.remove:d.add})}},19785:(e,t,n)=>{"use strict";n.d(t,{rankedSearch:()=>r,createRegExpList:()=>o,getHighlightedChars:()=>s});var i=n(80643);function r(e){const{data:t,rules:n,queryString:r,isPreventedFromFiltering:o,primaryKey:s,secondaryKey:a=s,optionalPrimaryKey:c}=e;return t.map(e=>{const t=c&&e[c]?e[c]:e[s],o=e[a];let l,d=0;return n.forEach(e=>{var n,s,a,c;const{re:u,fullMatch:h}=e;return u.lastIndex=0,t&&t.toLowerCase()===r.toLowerCase()?(d=3,void(l=null===(n=t.match(h))||void 0===n?void 0:n.index)):(0,i.isString)(t)&&h.test(t)?(d=2,void(l=null===(s=t.match(h))||void 0===s?void 0:s.index)):(0,i.isString)(o)&&h.test(o)?(d=1,void(l=null===(a=o.match(h))||void 0===a?void 0:a.index)):void((0,i.isString)(o)&&u.test(o)&&(d=1,l=null===(c=o.match(u))||void 0===c?void 0:c.index))}),{matchPriority:d,matchIndex:l,item:e}}).filter(e=>o||e.matchPriority).sort((e,t)=>{if(e.matchPriority<t.matchPriority)return 1;if(e.matchPriority>t.matchPriority)return-1;if(e.matchPriority===t.matchPriority){if(void 0===e.matchIndex||void 0===t.matchIndex)return 0;if(e.matchIndex>t.matchIndex)return 1;if(e.matchIndex<t.matchIndex)return-1}return 0}).map(({item:e})=>e)}function o(e,t){const n=[],i=e.toLowerCase(),r=e.split("").map((e,t)=>`(${0!==t?"[/\\s-]"+a(e):a(e)})`).join("(.*?)")+"(.*)";return n.push({fullMatch:new RegExp(`(${a(e)})`,"i"),re:new RegExp("^"+r,"i"),reserveRe:new RegExp(r,"i"),fuzzyHighlight:!0}),t&&t.hasOwnProperty(i)&&n.push({fullMatch:t[i],re:t[i],fuzzyHighlight:!1}),n}function s(e,t,n){const i=[];return e&&n?(n.forEach(e=>{const{fullMatch:n,re:r,reserveRe:o}=e;n.lastIndex=0,r.lastIndex=0;const s=n.exec(t),a=s||r.exec(t)||o&&o.exec(t);if(e.fuzzyHighlight=!s,a)if(e.fuzzyHighlight){let e=a.index;for(let t=1;t<a.length;t++){const n=a[t],r=a[t].length;if(t%2){const t=n.startsWith(" ")||n.startsWith("/")||n.startsWith("-");i[t?e+1:e]=!0}e+=r}}else for(let e=0;e<a[0].length;e++)i[a.index+e]=!0}),i):i}function a(e){return e.replace(/[!-/[-^{-}]/g,"\\$&")}},24637:(e,t,n)=>{"use strict";n.d(t,{HighlightedText:()=>a});var i=n(59496),r=n(97754),o=n(19785),s=n(81524);function a(e){const{queryString:t,rules:n,text:a,className:c}=e,l=(0,i.useMemo)(()=>(0,o.getHighlightedChars)(t,a,n),[t,n,a]);return i.createElement(i.Fragment,null,l.length?a.split("").map((e,t)=>i.createElement(i.Fragment,{key:t},l[t]?i.createElement("span",{
className:r(s.highlighted,c)},e):i.createElement("span",null,e))):a)}},1109:(e,t,n)=>{"use strict";n.d(t,{Separator:()=>s});var i=n(59496),r=n(97754),o=n(91626);function s(e){return i.createElement("div",{className:r(o.separator,e.className)})}},76594:(e,t,n)=>{"use strict";n.d(t,{OutsideEvent:()=>r});var i=n(58095);function r(e){const{children:t,...n}=e;return t((0,i.useOutsideEvent)(n))}},86431:(e,t,n)=>{"use strict";n.d(t,{makeOverlapable:()=>o});var i=n(59496),r=n(65718);function o(e){return class extends i.PureComponent{render(){const{isOpened:t,root:n}=this.props;if(!t)return null;const o=i.createElement(e,{...this.props,zIndex:150});return"parent"===n?o:i.createElement(r.Portal,null,o)}}}},51613:(e,t,n)=>{"use strict";n.d(t,{PopupMenuSeparator:()=>a});var i=n(59496),r=n(97754),o=n.n(r),s=n(524);function a(e){const{size:t="normal",className:n}=e;return i.createElement("div",{className:o()(s.separator,"small"===t&&s.small,"normal"===t&&s.normal,"large"===t&&s.large,n)})}},10381:(e,t,n)=>{"use strict";n.d(t,{ToolWidgetCaret:()=>c});var i=n(59496),r=n(97754),o=n(9745),s=n(40367),a=n(81268);function c(e){const{dropped:t,className:n}=e;return i.createElement(o.Icon,{className:r(n,s.icon,{[s.dropped]:t}),icon:a})}},81268:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 8" width="16" height="8"><path fill="currentColor" d="M0 1.475l7.396 6.04.596.485.593-.49L16 1.39 14.807 0 7.393 6.122 8.58 6.12 1.186.08z"/></svg>'},37257:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 17" width="17" height="17" fill="currentColor"><path d="m.58 1.42.82-.82 15 15-.82.82z"/><path d="m.58 15.58 15-15 .82.82-15 15z"/></svg>'},74471:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M9.7 9l4.65-4.65-.7-.7L9 8.29 4.35 3.65l-.7.7L8.29 9l-4.64 4.65.7.7L9 9.71l4.65 4.64.7-.7L9.71 9z"/></svg>'},21031: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="M11.85 11.93A5.48 5.48 0 0 0 8 2.5a5.5 5.5 0 1 0 3.85 9.43zm0 0L16 16"/></svg>'},5639:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M12.4 12.5a7 7 0 1 0-4.9 2 7 7 0 0 0 4.9-2zm0 0l5.101 5"/></svg>'},20614:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 18" width="18" height="18" fill="none"><path fill="currentColor" d="M9 1l2.35 4.76 5.26.77-3.8 3.7.9 5.24L9 13l-4.7 2.47.9-5.23-3.8-3.71 5.25-.77L9 1z"/></svg>'},55783: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="M9 2.13l1.903 3.855.116.236.26.038 4.255.618-3.079 3.001-.188.184.044.259.727 4.237-3.805-2L9 12.434l-.233.122-3.805 2.001.727-4.237.044-.26-.188-.183-3.079-3.001 4.255-.618.26-.038.116-.236L9 2.13z"/></svg>'}}]);