9 lines
26 KiB
JavaScript
9 lines
26 KiB
JavaScript
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4804],{36136:e=>{e.exports={"nav-button":"nav-button-znwuaSC1",link:"link-znwuaSC1",background:"background-znwuaSC1",icon:"icon-znwuaSC1","flip-icon":"flip-icon-znwuaSC1","size-large":"size-large-znwuaSC1","preserve-paddings":"preserve-paddings-znwuaSC1","size-medium":"size-medium-znwuaSC1","size-small":"size-small-znwuaSC1","size-xsmall":"size-xsmall-znwuaSC1","size-xxsmall":"size-xxsmall-znwuaSC1","visually-hidden":"visually-hidden-znwuaSC1"}},68976:e=>{e.exports={button:"button-D4RPB3ZC",content:"content-D4RPB3ZC",iconOnly:"iconOnly-D4RPB3ZC",link:"link-D4RPB3ZC",brand:"brand-D4RPB3ZC",primary:"primary-D4RPB3ZC",secondary:"secondary-D4RPB3ZC",gray:"gray-D4RPB3ZC",green:"green-D4RPB3ZC",red:"red-D4RPB3ZC",black:"black-D4RPB3ZC","black-friday":"black-friday-D4RPB3ZC","cyber-monday":"cyber-monday-D4RPB3ZC",xsmall:"xsmall-D4RPB3ZC",startIconWrap:"startIconWrap-D4RPB3ZC",endIconWrap:"endIconWrap-D4RPB3ZC",withStartIcon:"withStartIcon-D4RPB3ZC",withEndIcon:"withEndIcon-D4RPB3ZC",small:"small-D4RPB3ZC",medium:"medium-D4RPB3ZC",large:"large-D4RPB3ZC",xlarge:"xlarge-D4RPB3ZC",animated:"animated-D4RPB3ZC",stretch:"stretch-D4RPB3ZC",grouped:"grouped-D4RPB3ZC",adjustPosition:"adjustPosition-D4RPB3ZC",firstRow:"firstRow-D4RPB3ZC",firstCol:"firstCol-D4RPB3ZC","no-corner-top-left":"no-corner-top-left-D4RPB3ZC","no-corner-top-right":"no-corner-top-right-D4RPB3ZC","no-corner-bottom-right":"no-corner-bottom-right-D4RPB3ZC","no-corner-bottom-left":"no-corner-bottom-left-D4RPB3ZC",textWrap:"textWrap-D4RPB3ZC",multilineContent:"multilineContent-D4RPB3ZC",secondaryText:"secondaryText-D4RPB3ZC",primaryText:"primaryText-D4RPB3ZC"}},74581:e=>{e.exports={container:"container-WDZ0PRNh","container-xxsmall":"container-xxsmall-WDZ0PRNh","container-xsmall":"container-xsmall-WDZ0PRNh","container-small":"container-small-WDZ0PRNh","container-medium":"container-medium-WDZ0PRNh","container-large":"container-large-WDZ0PRNh","intent-default":"intent-default-WDZ0PRNh",focused:"focused-WDZ0PRNh",readonly:"readonly-WDZ0PRNh",disabled:"disabled-WDZ0PRNh","with-highlight":"with-highlight-WDZ0PRNh",grouped:"grouped-WDZ0PRNh","adjust-position":"adjust-position-WDZ0PRNh","first-row":"first-row-WDZ0PRNh","first-col":"first-col-WDZ0PRNh",stretch:"stretch-WDZ0PRNh","font-size-medium":"font-size-medium-WDZ0PRNh","font-size-large":"font-size-large-WDZ0PRNh","no-corner-top-left":"no-corner-top-left-WDZ0PRNh","no-corner-top-right":"no-corner-top-right-WDZ0PRNh","no-corner-bottom-right":"no-corner-bottom-right-WDZ0PRNh","no-corner-bottom-left":"no-corner-bottom-left-WDZ0PRNh","size-xxsmall":"size-xxsmall-WDZ0PRNh","size-xsmall":"size-xsmall-WDZ0PRNh","size-small":"size-small-WDZ0PRNh","size-medium":"size-medium-WDZ0PRNh","size-large":"size-large-WDZ0PRNh","intent-success":"intent-success-WDZ0PRNh","intent-warning":"intent-warning-WDZ0PRNh","intent-danger":"intent-danger-WDZ0PRNh","intent-primary":"intent-primary-WDZ0PRNh","border-none":"border-none-WDZ0PRNh","border-thin":"border-thin-WDZ0PRNh",
|
|
"border-thick":"border-thick-WDZ0PRNh",highlight:"highlight-WDZ0PRNh",shown:"shown-WDZ0PRNh"}},81329:e=>{e.exports={"inner-slot":"inner-slot-W53jtLjw",interactive:"interactive-W53jtLjw",icon:"icon-W53jtLjw","inner-middle-slot":"inner-middle-slot-W53jtLjw","before-slot":"before-slot-W53jtLjw","after-slot":"after-slot-W53jtLjw"}},55315:e=>{e.exports={input:"input-RUSovanF","size-xxsmall":"size-xxsmall-RUSovanF","size-xsmall":"size-xsmall-RUSovanF","size-small":"size-small-RUSovanF","size-medium":"size-medium-RUSovanF","size-large":"size-large-RUSovanF","with-start-slot":"with-start-slot-RUSovanF","with-end-slot":"with-end-slot-RUSovanF"}},49844:e=>{e.exports={loader:"loader-UL6iwcBa",static:"static-UL6iwcBa",item:"item-UL6iwcBa","tv-button-loader":"tv-button-loader-UL6iwcBa",medium:"medium-UL6iwcBa",small:"small-UL6iwcBa",black:"black-UL6iwcBa",white:"white-UL6iwcBa",gray:"gray-UL6iwcBa",primary:"primary-UL6iwcBa"}},53330: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: 430px)"}},39289:e=>{e.exports={autocomplete:"autocomplete-uszkUMOz",caret:"caret-uszkUMOz",icon:"icon-uszkUMOz",suggestions:"suggestions-uszkUMOz",suggestion:"suggestion-uszkUMOz",noResults:"noResults-uszkUMOz",selected:"selected-uszkUMOz",opened:"opened-uszkUMOz"}},62794:e=>{e.exports={icon:"icon-WB2y0EnP",dropped:"dropped-WB2y0EnP"}},94720:(e,t,n)=>{"use strict";var r,s,o;function i(e="default"){switch(e){case"default":return"primary";case"stroke":return"secondary"}}function a(e="primary"){switch(e){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function l(e="m"){switch(e){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}n.d(t,{Button:()=>D}),function(e){e.Primary="primary",e.Success="success",e.Default="default",e.Danger="danger"}(r||(r={})),function(e){e.Small="s",e.Medium="m",e.Large="l"}(s||(s={})),function(e){e.Default="default",e.Stroke="stroke"}(o||(o={}));var c=n(50959),u=n(97754),d=n(95604),p=n(9745),h=n(68976),m=n.n(h);const g="apply-overflow-tooltip apply-overflow-tooltip--check-children-recursively apply-overflow-tooltip--allow-text apply-common-tooltip";function f(e){const{color:t="brand",size:n="medium",variant:r="primary",stretch:s=!1,icon:o,startIcon:i,endIcon:a,iconOnly:l=!1,className:c,isGrouped:p,cellState:h,disablePositionAdjustment:f=!1,primaryText:y,secondaryText:v,isAnchor:w=!1}=e,b=function(e){let t="";return 0!==e&&(1&e&&(t=u(t,m()["no-corner-top-left"])),2&e&&(t=u(t,m()["no-corner-top-right"])),4&e&&(t=u(t,m()["no-corner-bottom-right"])),8&e&&(t=u(t,m()["no-corner-bottom-left"]))),t}((0,d.getGroupCellRemoveRoundBorders)(h));return u(c,m().button,m()[n],m()[t],m()[r],s&&m().stretch,(o||i)&&m().withStartIcon,a&&m().withEndIcon,l&&m().iconOnly,b,p&&m().grouped,p&&!f&&m().adjustPosition,p&&h.isTop&&m().firstRow,p&&h.isLeft&&m().firstCol,y&&v&&m().multilineContent,w&&m().link,g)}function y(e){
|
|
const{startIcon:t,icon:n,iconOnly:r,children:s,endIcon:o,primaryText:i,secondaryText:a}=e,l=null!=t?t:n,d=!(t||n||o||r)&&!s&&i&&a;return c.createElement(c.Fragment,null,l&&c.createElement(p.Icon,{icon:l,className:m().startIconWrap}),s&&c.createElement("span",{className:m().content},s),o&&!r&&c.createElement(p.Icon,{icon:o,className:m().endIconWrap}),d&&function(e){return e.primaryText&&e.secondaryText&&c.createElement("div",{className:u(m().textWrap,g)},c.createElement("span",{className:m().primaryText}," ",e.primaryText," "),"string"==typeof e.secondaryText?c.createElement("span",{className:m().secondaryText}," ",e.secondaryText," "):c.createElement("span",{className:m().secondaryText},c.createElement("span",null,e.secondaryText.firstLine),c.createElement("span",null,e.secondaryText.secondLine)))}(e))}var v=n(34094),w=n(86332),b=n(90186);function C(e){const{className:t,color:n,variant:r,size:s,stretch:o,animated:i,icon:a,iconOnly:l,startIcon:c,endIcon:u,primaryText:d,secondaryText:p,...h}=e;return{...h,...(0,b.filterDataProps)(e),...(0,b.filterAriaProps)(e)}}function R(e){const{reference:t,tooltipText:n,...r}=e,{isGrouped:s,cellState:o,disablePositionAdjustment:i}=(0,c.useContext)(w.ControlGroupContext),a=f({...r,isGrouped:s,cellState:o,disablePositionAdjustment:i});return c.createElement("button",{...C(r),className:a,ref:t,"data-overflow-tooltip-text":null!=n?n:e.primaryText?[e.primaryText,e.secondaryText].join(" "):(0,v.getTextForTooltip)(e.children)},c.createElement(y,{...r}))}n(78572);function x(e){const{intent:t,size:n,appearance:r,useFullWidth:s,icon:o,...c}=e;return{...c,color:a(t),size:l(n),variant:i(r),stretch:s,startIcon:o}}function D(e){return c.createElement(R,{...x(e)})}},64388:(e,t,n)=>{"use strict";n.d(t,{NavButton:()=>c});var r=n(50959),s=n(97754),o=n(9745),i=(n(78572),n(36136));function a(e){const{size:t="large",preservePaddings:n,isLink:r,flipIconOnRtl:o,className:a}=e;return s(i["nav-button"],i[`size-${t}`],n&&i["preserve-paddings"],o&&i["flip-icon"],r&&i.link,a)}function l(e){const{children:t,icon:n}=e;return r.createElement(r.Fragment,null,r.createElement("span",{className:i.background}),r.createElement(o.Icon,{icon:n,className:i.icon,"aria-hidden":!0}),t&&r.createElement("span",{className:i["visually-hidden"]},t))}const c=(0,r.forwardRef)(((e,t)=>{const{icon:n,type:s="button",preservePaddings:o,flipIconOnRtl:i,size:c,"aria-label":u,...d}=e;return r.createElement("button",{...d,className:a({...e,children:u}),ref:t,type:s},r.createElement(l,{icon:n},u))}));c.displayName="NavButton";var u=n(21593),d=n(53017);(0,r.forwardRef)(((e,t)=>{const{icon:n,renderComponent:s,"aria-label":o,...i}=e,c=null!=s?s:u.CustomComponentDefaultLink;return r.createElement(c,{...i,className:a({...e,children:o,isLink:!0}),reference:(0,d.isomorphicRef)(t)},r.createElement(l,{icon:n},o))})).displayName="NavAnchorButton"},78572:(e,t,n)=>{"use strict";var r,s,o,i;!function(e){e.Primary="primary",e.QuietPrimary="quiet-primary",e.Secondary="secondary",e.Ghost="ghost"}(r||(r={})),function(e){e.XXSmall="xxsmall",
|
|
e.XSmall="xsmall",e.Small="small",e.Medium="medium",e.Large="large",e.XLarge="xlarge",e.XXLarge="xxlarge"}(s||(s={})),function(e){e.Brand="brand",e.Gray="gray",e.LightGray="light-gray",e.Green="green",e.Red="red",e.Black="black",e.Gradient="gradient",e.BlackFriday="black-friday",e.CyberMonday="cyber-monday"}(o||(o={})),function(e){e.Semibold18px="semibold18px",e.Semibold16px="semibold16px",e.Semibold14px="semibold14px",e.Medium16px="medium16px",e.Regular16px="regular16px",e.Regular14px="regular14px"}(i||(i={}))},86332:(e,t,n)=>{"use strict";n.d(t,{ControlGroupContext:()=>r});const r=n(50959).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},95604:(e,t,n)=>{"use strict";function r(e){let t=0;return e.isTop&&e.isLeft||(t+=1),e.isTop&&e.isRight||(t+=2),e.isBottom&&e.isLeft||(t+=8),e.isBottom&&e.isRight||(t+=4),t}n.d(t,{getGroupCellRemoveRoundBorders:()=>r})},67029:(e,t,n)=>{"use strict";n.d(t,{ControlSkeleton:()=>v,InputClasses:()=>g});var r=n(50959),s=n(97754),o=n(50151),i=n(38528),a=n(90186),l=n(86332),c=n(95604);var u=n(74581),d=n.n(u);function p(e){let t="";return 0!==e&&(1&e&&(t=s(t,d()["no-corner-top-left"])),2&e&&(t=s(t,d()["no-corner-top-right"])),4&e&&(t=s(t,d()["no-corner-bottom-right"])),8&e&&(t=s(t,d()["no-corner-bottom-left"]))),t}function h(e,t,n,r){const{removeRoundBorder:o,className:i,intent:a="default",borderStyle:l="thin",size:u,highlight:h,disabled:m,readonly:g,stretch:f,noReadonlyStyles:y,isFocused:v}=e,w=p(null!=o?o:(0,c.getGroupCellRemoveRoundBorders)(n));return s(d().container,d()[`container-${u}`],d()[`intent-${a}`],d()[`border-${l}`],u&&d()[`size-${u}`],w,h&&d()["with-highlight"],m&&d().disabled,g&&!y&&d().readonly,v&&d().focused,f&&d().stretch,t&&d().grouped,!r&&d()["adjust-position"],n.isTop&&d()["first-row"],n.isLeft&&d()["first-col"],i)}function m(e,t,n){const{highlight:r,highlightRemoveRoundBorder:o}=e;if(!r)return d().highlight;const i=p(null!=o?o:(0,c.getGroupCellRemoveRoundBorders)(t));return s(d().highlight,d().shown,d()[`size-${n}`],i)}const g={FontSizeMedium:(0,o.ensureDefined)(d()["font-size-medium"]),FontSizeLarge:(0,o.ensureDefined)(d()["font-size-large"])},f={passive:!1};function y(e,t){const{style:n,id:s,role:o,onFocus:c,onBlur:u,onMouseOver:d,onMouseOut:p,onMouseDown:g,onMouseUp:y,onKeyDown:v,onClick:w,tabIndex:b,startSlot:C,middleSlot:R,endSlot:x,onWheel:D,onWheelNoPassive:P=null,size:S}=e,{isGrouped:E,cellState:_,disablePositionAdjustment:N=!1}=(0,r.useContext)(l.ControlGroupContext),z=function(e,t=null,n){const s=(0,r.useRef)(null),o=(0,r.useRef)(null),i=(0,r.useCallback)((()=>{if(null===s.current||null===o.current)return;const[e,t,n]=o.current;null!==t&&s.current.addEventListener(e,t,n)}),[]),a=(0,r.useCallback)((()=>{if(null===s.current||null===o.current)return;const[e,t,n]=o.current;null!==t&&s.current.removeEventListener(e,t,n)}),[]),l=(0,r.useCallback)((e=>{a(),s.current=e,i()}),[]);return(0,r.useEffect)((()=>(o.current=[e,t,n],i(),a)),[e,t,n]),l}("wheel",P,f);return r.createElement("span",{style:n,id:s,role:o,className:h(e,E,_,N),
|
|
tabIndex:b,ref:(0,i.useMergedRefs)([t,z]),onFocus:c,onBlur:u,onMouseOver:d,onMouseOut:p,onMouseDown:g,onMouseUp:y,onKeyDown:v,onClick:w,onWheel:D,...(0,a.filterDataProps)(e),...(0,a.filterAriaProps)(e)},C,R,x,r.createElement("span",{className:m(e,_,S)}))}y.displayName="ControlSkeleton";const v=r.forwardRef(y)},78274:(e,t,n)=>{"use strict";n.d(t,{AfterSlot:()=>u,EndSlot:()=>c,MiddleSlot:()=>l,StartSlot:()=>a});var r=n(50959),s=n(97754),o=n(81329),i=n.n(o);function a(e){const{className:t,interactive:n=!0,icon:o=!1,children:a}=e;return r.createElement("span",{className:s(i()["inner-slot"],n&&i().interactive,o&&i().icon,t)},a)}function l(e){const{className:t,children:n}=e;return r.createElement("span",{className:s(i()["inner-slot"],i()["inner-middle-slot"],t)},n)}function c(e){const{className:t,interactive:n=!0,icon:o=!1,children:a}=e;return r.createElement("span",{className:s(i()["inner-slot"],n&&i().interactive,o&&i().icon,t)},a)}function u(e){const{className:t,children:n}=e;return r.createElement("span",{className:s(i()["after-slot"],t)},n)}},31261:(e,t,n)=>{"use strict";n.d(t,{InputControl:()=>v});var r=n(50959),s=n(97754),o=n(90186),i=n(47201),a=n(48907),l=n(38528),c=n(48027),u=n(29202),d=n(45812),p=n(67029),h=n(78274),m=n(55315),g=n.n(m);function f(e){return!(0,o.isAriaAttribute)(e)&&!(0,o.isDataAttribute)(e)}function y(e){const{id:t,title:n,role:i,tabIndex:a,placeholder:l,name:c,type:u,value:d,defaultValue:m,draggable:y,autoComplete:v,autoFocus:w,maxLength:b,min:C,max:R,step:x,pattern:D,inputMode:P,onSelect:S,onFocus:E,onBlur:_,onKeyDown:N,onKeyUp:z,onKeyPress:k,onChange:B,onDragStart:Z,size:I="small",className:W,inputClassName:M,disabled:O,readonly:U,containerTabIndex:T,startSlot:F,endSlot:L,reference:A,containerReference:V,onContainerFocus:j,...q}=e,G=(0,o.filterProps)(q,f),K={...(0,o.filterAriaProps)(q),...(0,o.filterDataProps)(q),id:t,title:n,role:i,tabIndex:a,placeholder:l,name:c,type:u,value:d,defaultValue:m,draggable:y,autoComplete:v,autoFocus:w,maxLength:b,min:C,max:R,step:x,pattern:D,inputMode:P,onSelect:S,onFocus:E,onBlur:_,onKeyDown:N,onKeyUp:z,onKeyPress:k,onChange:B,onDragStart:Z};return r.createElement(p.ControlSkeleton,{...G,disabled:O,readonly:U,tabIndex:T,className:s(g().container,W),size:I,ref:V,onFocus:j,startSlot:F,middleSlot:r.createElement(h.MiddleSlot,null,r.createElement("input",{...K,className:s(g().input,g()[`size-${I}`],M,F&&g()["with-start-slot"],L&&g()["with-end-slot"]),disabled:O,readOnly:U,ref:A})),endSlot:L})}function v(e){e=(0,c.useControl)(e);const{disabled:t,autoSelectOnFocus:n,tabIndex:s=0,onFocus:o,onBlur:p,reference:h,containerReference:m=null}=e,g=(0,r.useRef)(null),f=(0,r.useRef)(null),[v,w]=(0,u.useFocus)(),b=t?void 0:v?-1:s,C=t?void 0:v?s:-1,{isMouseDown:R,handleMouseDown:x,handleMouseUp:D}=(0,d.useIsMouseDown)(),P=(0,i.createSafeMulticastEventHandler)(w.onFocus,(function(e){n&&!R.current&&(0,a.selectAllContent)(e.currentTarget)}),o),S=(0,i.createSafeMulticastEventHandler)(w.onBlur,p),E=(0,r.useCallback)((e=>{g.current=e,h&&("function"==typeof h&&h(e),
|
|
"object"==typeof h&&(h.current=e))}),[g,h]);return r.createElement(y,{...e,isFocused:v,containerTabIndex:b,tabIndex:C,onContainerFocus:function(e){f.current===e.target&&null!==g.current&&g.current.focus()},onFocus:P,onBlur:S,reference:E,containerReference:(0,l.useMergedRefs)([f,m]),onMouseDown:x,onMouseUp:D})}},38952:(e,t,n)=>{"use strict";function r(e){const{reference:t,...n}=e;return{...n,ref:t}}n.d(t,{renameRef:()=>r})},21593:(e,t,n)=>{"use strict";n.d(t,{CustomComponentDefaultLink:()=>o});var r=n(50959),s=n(38952);function o(e){return r.createElement("a",{...(0,s.renameRef)(e)})}r.PureComponent},48027:(e,t,n)=>{"use strict";n.d(t,{useControl:()=>o});var r=n(47201),s=n(29202);function o(e){const{onFocus:t,onBlur:n,intent:o,highlight:i,disabled:a}=e,[l,c]=(0,s.useFocus)(void 0,a),u=(0,r.createSafeMulticastEventHandler)(a?void 0:c.onFocus,t),d=(0,r.createSafeMulticastEventHandler)(a?void 0:c.onBlur,n);return{...e,intent:o||(l?"primary":"default"),highlight:null!=i?i:l,onFocus:u,onBlur:d}}},29202:(e,t,n)=>{"use strict";n.d(t,{useFocus:()=>s});var r=n(50959);function s(e,t){const[n,s]=(0,r.useState)(!1);(0,r.useEffect)((()=>{t&&n&&s(!1)}),[t,n]);const o={onFocus:(0,r.useCallback)((function(t){void 0!==e&&e.current!==t.target||s(!0)}),[e]),onBlur:(0,r.useCallback)((function(t){void 0!==e&&e.current!==t.target||s(!1)}),[e])};return[n,o]}},45812:(e,t,n)=>{"use strict";n.d(t,{useIsMouseDown:()=>s});var r=n(50959);function s(){const e=(0,r.useRef)(!1),t=(0,r.useCallback)((()=>{e.current=!0}),[e]),n=(0,r.useCallback)((()=>{e.current=!1}),[e]);return{isMouseDown:e,handleMouseDown:t,handleMouseUp:n}}},38528:(e,t,n)=>{"use strict";n.d(t,{useMergedRefs:()=>o});var r=n(50959),s=n(53017);function o(e){return(0,r.useCallback)((0,s.mergeRefs)(e),e)}},26996:(e,t,n)=>{"use strict";n.d(t,{Loader:()=>l});var r,s=n(50959),o=n(97754),i=n(49844),a=n.n(i);function l(e){const{className:t,size:n="medium",staticPosition:r,color:i="black"}=e,l=o(a().item,a()[i],a()[n]);return s.createElement("span",{className:o(a().loader,r&&a().static,t)},s.createElement("span",{className:l}),s.createElement("span",{className:l}),s.createElement("span",{className:l}))}!function(e){e.Medium="medium",e.Small="small"}(r||(r={}))},34094:(e,t,n)=>{"use strict";n.d(t,{getTextForTooltip:()=>i});var r=n(50959);const s=e=>(0,r.isValidElement)(e)&&Boolean(e.props.children),o=e=>null==e||"boolean"==typeof e||"{}"===JSON.stringify(e)?"":e.toString()+" ",i=e=>Array.isArray(e)||(0,r.isValidElement)(e)?r.Children.toArray(e).reduce(((e,t)=>{let n="";return n=(0,r.isValidElement)(t)&&s(t)?i(t.props.children):(0,r.isValidElement)(t)&&!s(t)?"":o(t),e.concat(n)}),"").trim():o(e)},48907:(e,t,n)=>{"use strict";function r(e){null!==e&&e.setSelectionRange(0,e.value.length)}n.d(t,{selectAllContent:()=>r})},47201:(e,t,n)=>{"use strict";function r(...e){return t=>{for(const n of e)void 0!==n&&n(t)}}n.d(t,{createSafeMulticastEventHandler:()=>r})},24437:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>s});var r=n(53330);const s={SmallHeight:r["small-height-breakpoint"],
|
|
TabletSmall:r["tablet-small-breakpoint"],TabletNormal:r["tablet-normal-breakpoint"]}},21788:(e,t,n)=>{"use strict";n.d(t,{Autocomplete:()=>m});var r,s=n(11542),o=n(50959),i=n(97754),a=n(10381),l=n(78274),c=n(31261),u=n(52778);!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"}(r||(r={}));var d=n(42842),p=n(39289);function h(e,t){return""===e||-1!==t.toLowerCase().indexOf(e.toLowerCase())}class m extends o.PureComponent{constructor(e){if(super(e),this._containerInputElement=null,this._raf=null,this._resize=()=>{null===this._raf&&(this._raf=requestAnimationFrame((()=>{this.setState({appearingWidth:void 0,appearingPosition:void 0,isMeasureValid:void 0}),this._raf=null})))},this._handleMeasure=()=>{if(this.state.isMeasureValid||!this.props.suggestionsInPortal||!this._containerInputElement)return;const{bottom:e,left:t,width:n}=this._containerInputElement.getBoundingClientRect();this.setState({appearingWidth:n,appearingPosition:{x:t,y:e},isMeasureValid:!0})},this._setInputRef=e=>{e&&(this._inputElement=e,this.props.setupHTMLInput&&this.props.setupHTMLInput(e),this._inputElement.addEventListener("keyup",this._handleKeyUpEnter))},this._setContainerInputRef=e=>{this._containerInputElement=e},this._handleCaretClick=()=>{this.state.isOpened?(this._close(),this.props.preventOnFocusOpen&&this._focus()):this.props.preventOnFocusOpen?this._open():this._focus()},this._handleOutsideClick=()=>{const{allowUserDefinedValues:e,value:t,onChange:n}=this.props,{queryValue:r}=this.state;e?n&&r!==t&&n(r):this.setState(this._valueToQuery(t)),this._close()},this._handleFocus=e=>{this.props.preventOnFocusOpen||this._open(),this.props.onFocus&&this.props.onFocus(e)},this._handleChange=e=>{const{preventSearchOnEmptyQuery:t,allowUserDefinedValues:n,onChange:r,onSuggestionsOpen:s,onSuggestionsClose:o}=this.props,i=e.currentTarget.value;if(t&&""===i)this.setState({queryValue:i,isOpened:!1,active:void 0}),o&&o();else{const e=this._suggestions(i),t=Object.keys(e).length>0;this.setState({queryValue:i,isOpened:t,active:n?void 0:this._getActiveKeyByValue(i)}),t&&s&&s()}n&&r&&r(i)},this._handleItemClick=e=>{const t=e.currentTarget.id;this.setState({queryValue:g(this.props.source)[t]}),this.props.onChange&&this.props.onChange(t),this._close()},this._handleKeyDown=e=>{if(-1===[r.DownArrow,r.UpArrow,r.Enter,r.Escape].indexOf(e.which))return;const{allowUserDefinedValues:t,value:n,onChange:s,onSuggestionsOpen:o}=this.props,{active:i,isOpened:a,queryValue:l}=this.state;a&&(e.preventDefault(),e.stopPropagation());const c=this._suggestions(l);switch(e.which){case r.DownArrow:case r.UpArrow:const u=Object.keys(c);if(!a&&u.length&&e.which===r.DownArrow){this.setState({isOpened:!0,active:u[0]}),o&&o();break}let d;if(void 0===i){if(e.which===r.UpArrow){this._close();break}d=0}else d=u.indexOf(i)+(e.which===r.UpArrow?-1:1);d<0&&(d=0),d>u.length-1&&(d=u.length-1);const p=u[d]
|
|
;this.setState({active:p});const h=document.getElementById(p);h&&this._scrollIfNotVisible(h,this._suggestionsElement);break;case r.Escape:this._close(),a||this._blur();break;case r.Enter:let m=i;t&&(a&&m?this.setState(this._valueToQuery(m)):m=l),void 0!==m&&(this._close(),a||this._blur(),m!==n?s&&s(m):this.setState(this._valueToQuery(m)))}},this._setSuggestionsRef=e=>{e&&(this._suggestionsElement=e)},this._scrollIfNotVisible=(e,t)=>{const n=t.scrollTop,r=t.scrollTop+t.clientHeight,s=e.offsetTop,o=s+e.clientHeight;s<=n?e.scrollIntoView(!0):o>=r&&e.scrollIntoView(!1)},!(e=>Array.isArray(e.source)||!e.allowUserDefinedValues)(e))throw new Error("allowUserDefinedProps === true cay only be used if source is array");this.state={valueFromProps:e.value,isOpened:!1,active:e.value,queryValue:g(e.source)[e.value]||(e.allowUserDefinedValues?e.value:"")}}componentDidMount(){this.props.suggestionsInPortal&&window.addEventListener("resize",this._resize)}componentDidUpdate(){this.state.isOpened&&this._handleMeasure()}componentWillUnmount(){this._inputElement&&this._inputElement.removeEventListener("keyup",this._handleKeyUpEnter),null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),window.removeEventListener("resize",this._resize)}render(){return o.createElement(u.OutsideEvent,{handler:this._handleOutsideClick,click:!0},(e=>o.createElement("div",{className:i(p.autocomplete,"js-dialog-skip-escape"),ref:e},o.createElement(c.InputControl,{id:this.props.id,name:this.props.name,endSlot:Object.keys(this._suggestions(this.state.queryValue)).length?o.createElement(l.EndSlot,null,o.createElement("span",{className:p.caret,onClick:this._handleCaretClick,tabIndex:-1},o.createElement(a.ToolWidgetCaret,{className:p.icon,dropped:this.state.isOpened}))):void 0,maxLength:this.props.maxLength,reference:this._setInputRef,containerReference:this._setContainerInputRef,stretch:!0,placeholder:this.props.placeholder,value:this.state.queryValue,intent:this.props.error?"danger":void 0,onChange:this._handleChange,onFocus:this._handleFocus,onBlur:this.props.onBlur,onMouseOver:this.props.onMouseOver,onMouseOut:this.props.onMouseOut,onKeyDown:this._handleKeyDown,autoComplete:"off",size:this.props.size}),this._renderSuggestions())))}static getDerivedStateFromProps(e,t){const{allowUserDefinedValues:n,value:r,source:s}=e;if(r===t.valueFromProps&&t.isOpened)return null;const o=n?r:""===r?"":g(s)[r]||t.queryValue;return{...t,valueFromProps:r,active:r,queryValue:o}}_renderSuggestions(){return this.props.suggestionsInPortal?this.state.isOpened?this._renderPortalSuggestions():null:this._renderSuggestionsItems()}_renderPortalSuggestions(){return o.createElement(d.Portal,null,this._renderSuggestionsItems())}_focus(){this._inputElement.focus()}_blur(){this._inputElement.blur()}_open(){const{onSuggestionsOpen:e}=this.props;this._focus(),this.setState({isOpened:!0,active:this.props.value}),e&&e()}_close(){const{onSuggestionsClose:e}=this.props;this.setState({isOpened:!1,active:void 0}),e&&e()}_suggestions(e){
|
|
const{filter:t=h}=this.props,n=g(this.props.source),r={};return Object.keys(n).filter((r=>t(e,n[r]))).forEach((e=>r[e]=n[e])),r}_renderSuggestionsItems(){const e=this._suggestions(this.state.queryValue),t=Object.keys(e).map((t=>{const n=i(p.suggestion,this.state.active===t&&p.selected);return o.createElement("li",{id:t,key:t,className:n,onClick:this._handleItemClick},e[t])})),r=o.createElement("li",{className:p.noResults},s.t(null,void 0,n(85888)));if(!t.length&&this.props.noEmptyText)return null;const{appearingPosition:a,appearingWidth:l}=this.state;return o.createElement("ul",{className:i(p.suggestions,this.state.isOpened&&p.opened),ref:this._setSuggestionsRef,style:{left:a&&a.x,top:a&&a.y,width:l&&l}},t.length?t:r)}_handleKeyUpEnter(e){e.which===r.Enter&&e.stopImmediatePropagation()}_getActiveKeyByValue(e){const{filter:t=h}=this.props,n=this._suggestions(e),r=Object.keys(n);for(const s of r)if(t(e,n[s]))return s;return r[0]}_valueToQuery(e){return{queryValue:g(this.props.source)[e]||""}}}function g(e){let t={};return Array.isArray(e)?e.forEach((e=>{t[e]=e})):t=e,t}},90692:(e,t,n)=>{"use strict";n.d(t,{MatchMedia:()=>s});var r=n(50959);class s extends r.PureComponent{constructor(e){super(e),this._handleChange=()=>{this.forceUpdate()},this.state={query:window.matchMedia(this.props.rule)}}componentDidMount(){this._subscribe(this.state.query)}componentDidUpdate(e,t){this.state.query!==t.query&&(this._unsubscribe(t.query),this._subscribe(this.state.query))}componentWillUnmount(){this._unsubscribe(this.state.query)}render(){return this.props.children(this.state.query.matches)}static getDerivedStateFromProps(e,t){return e.rule!==t.query.media?{query:window.matchMedia(e.rule)}:null}_subscribe(e){e.addEventListener("change",this._handleChange)}_unsubscribe(e){e.removeEventListener("change",this._handleChange)}}},50655:(e,t,n)=>{"use strict";n.d(t,{Slot:()=>r.Slot,SlotContext:()=>r.SlotContext});var r=n(99663)},10381:(e,t,n)=>{"use strict";n.d(t,{ToolWidgetCaret:()=>l});var r=n(50959),s=n(97754),o=n(9745),i=n(62794),a=n(578);function l(e){const{dropped:t,className:n}=e;return r.createElement(o.Icon,{className:s(n,i.icon,{[i.dropped]:t}),icon:a})}},4237:(e,t,n)=>{"use strict";var r=n(32227);t.createRoot=r.createRoot,r.hydrateRoot},578: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>'},25931:(e,t,n)=>{"use strict";n.d(t,{nanoid:()=>r});let r=(e=21)=>crypto.getRandomValues(new Uint8Array(e)).reduce(((e,t)=>e+=(t&=63)<36?t.toString(36):t<62?(t-26).toString(36).toUpperCase():t>62?"-":"_"),"")}}]); |