(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[8093],{24044:t=>{t.exports={positioner:"positioner-lATuqHRX",invisible:"invisible-lATuqHRX"}},12440:(t,e,n)=>{"use strict";function r(t,e){return{start:t,length:e}}function i(t){return r(t.x,t.width)}function o(t){return r(t.y,t.height)}n.d(e,{createHorizontalInterval:()=>i,createInterval:()=>r,createVerticalInterval:()=>o})},11670:(t,e,n)=>{"use strict";n.d(e,{ifNonePlacementRuleMatchedToImpl:()=>o});const r={horizontal:t=>t[0].overflow.x,vertical:t=>t[0].overflow.y,area:function(t){const e=t[0].contentRect,n=function(t,e){const n=Math.max(t.x,e.x),r=Math.max(t.y,e.y),i=Math.min(t.x+t.width,e.x+e.width),o=Math.min(t.y+t.height,e.y+e.height);if(!(n>i||r>o))return{x:n,y:r,width:i-n,height:o-r}}(e,{...t[0].screenRect});return n?e.width*e.height-n.width*n.height:Number.POSITIVE_INFINITY}};var i=n(12440);function o(t){return{pickRule:function(t){switch(t?.by){case"smallest-overlap":return n=t.criteria,e=r[n],t=>function(t,e){return function(t,e){let n=t[0],r=e(n);for(let i=1;i<t.length;i++){const o=t[i],a=e(o);a<r&&(r=a,n=o)}return n}(t,e)}(t,e);case"name":return e=>function(t,e){return t.find((t=>t[1].name===e.name))??t[0]}(e,t);default:return t=>function(t){return t[0]}(t)}var e;var n}(t.pickRule),vertical:l(t.vertical),horizontal:l(t.horizontal)}}const a={keepNonFitting:function(t){return(0,i.createInterval)(t.start,t.length)},cropSlideToFit:function(t,e,n){if(e.start+e.length>=n.start&&e.start<=n.start+n.length){if(t.start<n.start)return(0,i.createInterval)(n.start,t.length+t.start-n.start);return t.start+t.length>n.start+n.length?(0,i.createInterval)(t.start,n.start+n.length-t.start):(0,i.createInterval)(t.start,t.length)}{const r=e.start+e.length<=n.start,o=Math.min(t.length,n.length);return r?(0,i.createInterval)(n.start,o):(0,i.createInterval)(n.length-o,o)}},slideToFit:function(t,e,n){return t.start<n.start?(0,i.createInterval)(n.start,t.length):t.start+t.length>n.start+n.length?(0,i.createInterval)(n.start+n.length-t.length,t.length):(0,i.createInterval)(t.start,t.length)}},c="keepNonFitting";function l(t){return a[t??c]}},62764:(t,e,n)=>{"use strict";n.d(e,{RectanglePositioner:()=>m,RectanglePositionerContext:()=>y});var r=n(50959),i=n(97754),o=n.n(i),a=n(19250),c=n(540);function l(t,e){return{x:e?-t.x:1-t.x,y:t.y}}function s(t,e){return t.map((t=>function(t,e){return{name:e&&t.rtlName||t.name,anchorPoint:l(t.anchorPoint),contentPoint:l(t.contentPoint),offset:t.offset?l(t.offset,!0):void 0}}(t,e)))}var h=n(12440);function u(t,e,n,r){const i=r.horizontal((0,h.createHorizontalInterval)(t),(0,h.createHorizontalInterval)(e),(0,h.createHorizontalInterval)(n)),o=r.vertical((0,h.createVerticalInterval)(t),(0,h.createVerticalInterval)(e),(0,h.createVerticalInterval)(n));return{x:i.start,y:o.start,width:i.length,height:o.length}}function f(t,e){const n=t.start+t.length,r=e.start+e.length;return t.start<e.start?{overflow:e.start-t.start,correction:e.start-t.start}:n>r?{overflow:n-r,correction:r-n}:{overflow:0,correction:0}}function d(t,e,n,r){
const i=function(t,e,n){const{anchorPoint:r,contentPoint:i,offset:o}=n;return{x:t.x+t.width*r.x-e.width*i.x+(o?.x??0),y:t.y+t.height*r.y-e.height*i.y+(o?.y??0)}}(t,e,n),o=(0,h.createInterval)(i.x,e.width),a=(0,h.createHorizontalInterval)(r),{overflow:c}=f(o,a),l=(0,h.createInterval)(i.y,e.height),s=(0,h.createVerticalInterval)(r),{overflow:u}=f(l,s);return{contentRect:{x:i.x,y:i.y,...e},screenRect:r,overflow:{x:c,y:u}}}function g(){return{x:0,y:0,width:document.documentElement.clientWidth,height:document.documentElement.clientHeight}}var p=n(24044),v=n.n(p);const x={width:0,height:0};function m(t){const{isRtl:e,anchoredAt:n,isOpen:i,placementRules:l,ifNonePlacementRuleMatched:h,anchorPositionerCardAppearanceClassname:f,refObjectToContentWrapperElement:p,children:m,onPlacementRuleSelected:P,getRootRect:w=g,idOfContentWrapperElement:I,ariaLabelledby:b,ariaMultiselectable:E,role:N,width:T,height:R,...C}=t,M=C,[_,A]=(0,r.useState)(void 0),L=(0,r.useCallback)((t=>{const e=Math.ceil(t.width),n=Math.ceil(t.height);A((t=>t?.width!==e||t?.height!==n?{width:e,height:n}:t))}),[A]),k=(0,r.useCallback)(((t,e)=>{L({width:t,height:e})}),[L]);(0,r.useEffect)((()=>{i||A(void 0)}),[i]);const[z,H]=(0,r.useMemo)((()=>function(t,e,n,r,i,o=!1){const a=o?s(r,o):r,c=[];for(const r of a){const i=d(t,e,r,n);if(0===i.overflow.x&&0===i.overflow.y)return[i.contentRect,r];c.push([i,r])}const l=i.pickRule(c);return[u(l[0].contentRect,t,n,i),l[1]]}(n,_??x,w(),l,h,e)),[n,_,w,l,h,e]);if((0,r.useEffect)((()=>{if(H&&P)return P(H)}),[H,P]),!i)return null;const O=[],G={},F={};for(const e of["width","height"]){const r=t[e];(Array.isArray(r)?r:[r]).filter((t=>!!t)).forEach((t=>{if("content"===t.by)return;if("class"===t.by)return void O.push(t.className);const r=t.type??"exact";("exact"===r?G:F)["--ui-lib-positioner-anchor-"+r+"-"+e]=n[e]+"px"}))}const V=[f,v().positioner],S={...G,...F,"--ui-lib-positioner-anchor-width":n.width+"px","--ui-lib-positioner-anchor-height":n.height+"px","--ui-lib-positioner-content-point-y":H.contentPoint.y,"--ui-lib-positioner-content-point-x":H.contentPoint.x,"--ui-lib-positioner-anchor-top":n.y+"px","--ui-lib-positioner-anchor-left":n.x+"px"},W=r.createElement(y.Provider,{value:{onContentResized:k}},m);return r.createElement(a.Portal,null,void 0===_?r.createElement("div",{className:o()(v().invisible,...O,...V),style:S},W):r.createElement("div",{className:o()(...V,...O),style:{"--ui-lib-positioner-calculated-left":z.x+"px","--ui-lib-positioner-calculated-top":z.y+"px","--ui-lib-positioner-calculated-height":z.height+"px","--ui-lib-positioner-calculated-width":z.width+"px",...S},...(0,c.contentProps)(I,b,E,N),...M,ref:p},W))}const y=(0,r.createContext)({onContentResized:()=>{}})},540:(t,e,n)=>{"use strict";function r(t,e,n,r){return{role:r,"aria-labelledby":e,"aria-multiselectable":n,id:t}}n.d(e,{contentProps:()=>r})},60179:(t,e,n)=>{"use strict";n.d(e,{PLACEMENT_BOTTOM_ALIGN_LEFT:()=>r,PLACEMENT_BOTTOM_ALIGN_RIGHT:()=>i,PLACEMENT_LEFT_ALIGN_CENTER:()=>l,PLACEMENT_RIGHT_ALIGN_CENTER:()=>c,PLACEMENT_TOP_ALIGN_LEFT:()=>o,
PLACEMENT_TOP_ALIGN_RIGHT:()=>a});const r={name:"bottom-left",rtlName:"bottom-right",anchorPoint:{x:0,y:1},contentPoint:{x:0,y:0}},i={name:"bottom-right",rtlName:"bottom-left",anchorPoint:{x:1,y:1},contentPoint:{x:1,y:0}},o={name:"top-left",rtlName:"top-right",anchorPoint:{x:0,y:0},contentPoint:{x:0,y:1}},a={name:"top-right",rtlName:"top-left",anchorPoint:{x:1,y:0},contentPoint:{x:1,y:1}},c={name:"right",rtlName:"left",anchorPoint:{x:1,y:.5},contentPoint:{x:0,y:.5}},l={name:"left",rtlName:"right",anchorPoint:{x:0,y:.5},contentPoint:{x:1,y:.5}}}}]);