42 lines
122 KiB
JavaScript
42 lines
122 KiB
JavaScript
(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[2306],{97754:(t,e)=>{var o;!function(){"use strict";var i={}.hasOwnProperty;function n(){for(var t=[],e=0;e<arguments.length;e++){var o=arguments[e];if(o){var r=typeof o;if("string"===r||"number"===r)t.push(o);else if(Array.isArray(o)&&o.length){var s=n.apply(null,o);s&&t.push(s)}else if("object"===r)for(var a in o)i.call(o,a)&&o[a]&&t.push(a)}}return t.join(" ")}t.exports?(n.default=n,t.exports=n):void 0===(o=function(){return n}.apply(e,[]))||(t.exports=o)}()},66783:t=>{"use strict";var e=Object.prototype.hasOwnProperty;function o(t,e){return t===e?0!==t||0!==e||1/t==1/e:t!=t&&e!=e}t.exports=function(t,i){if(o(t,i))return!0;if("object"!=typeof t||null===t||"object"!=typeof i||null===i)return!1;var n=Object.keys(t),r=Object.keys(i);if(n.length!==r.length)return!1;for(var s=0;s<n.length;s++)if(!e.call(i,n[s])||!o(t[n[s]],i[n[s]]))return!1;return!0}},70168:t=>{t.exports={button:"button-D4RPB3ZC",iconOnly:"iconOnly-D4RPB3ZC",withStartSlot:"withStartSlot-D4RPB3ZC",withEndSlot:"withEndSlot-D4RPB3ZC",startSlotWrap:"startSlotWrap-D4RPB3ZC",endSlotWrap:"endSlotWrap-D4RPB3ZC",xsmall:"xsmall-D4RPB3ZC",small:"small-D4RPB3ZC",medium:"medium-D4RPB3ZC",large:"large-D4RPB3ZC",xlarge:"xlarge-D4RPB3ZC",content:"content-D4RPB3ZC",link:"link-D4RPB3ZC",blue:"blue-D4RPB3ZC",primary:"primary-D4RPB3ZC",secondary:"secondary-D4RPB3ZC",gray:"gray-D4RPB3ZC",green:"green-D4RPB3ZC",red:"red-D4RPB3ZC",black:"black-D4RPB3ZC",slot:"slot-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",primaryText:"primaryText-D4RPB3ZC",secondaryText:"secondaryText-D4RPB3ZC"}},54188:t=>{t.exports={}},413:t=>{t.exports={}},2539:t=>{t.exports={}},51284:t=>{t.exports={"tablet-normal-breakpoint":"(max-width: 768px)","small-height-breakpoint":"(max-height: 360px)","tablet-small-breakpoint":"(max-width: 440px)"}},37408:t=>{t.exports={wrap:"wrap-Nn3SCuEL",icon:"icon-Nn3SCuEL",colorBg:"colorBg-Nn3SCuEL",color:"color-Nn3SCuEL",multicolor:"multicolor-Nn3SCuEL",white:"white-Nn3SCuEL"}},16465:t=>{t.exports={button:"button-BuUjli6L"}},46189:t=>{t.exports={item:"item-WWrZ1MEn",buttonWrap:"buttonWrap-WWrZ1MEn",small:"small-WWrZ1MEn",buttonLabel:"buttonLabel-WWrZ1MEn"}},79951:t=>{t.exports={item:"item-KdWj36gM",withIcon:"withIcon-KdWj36gM",icon:"icon-KdWj36gM",labelRow:"labelRow-KdWj36gM",multiWidth:"multiWidth-KdWj36gM",buttonWrap:"buttonWrap-KdWj36gM",buttonLabel:"buttonLabel-KdWj36gM"}},30329:t=>{t.exports={container:"container-mdcOkvbj",sectionTitle:"sectionTitle-mdcOkvbj",separator:"separator-mdcOkvbj",customButton:"customButton-mdcOkvbj",accessible:"accessible-mdcOkvbj"}},55778:t=>{t.exports={
|
|
container:"container-iiEYaqPD",form:"form-iiEYaqPD",swatch:"swatch-iiEYaqPD",white:"white-iiEYaqPD",inputWrap:"inputWrap-iiEYaqPD",inputHash:"inputHash-iiEYaqPD",input:"input-iiEYaqPD",buttonWrap:"buttonWrap-iiEYaqPD",hueSaturationWrap:"hueSaturationWrap-iiEYaqPD",saturation:"saturation-iiEYaqPD",hue:"hue-iiEYaqPD"}},61483:t=>{t.exports={hue:"hue-r4uo5Wn6",pointer:"pointer-r4uo5Wn6",accessible:"accessible-r4uo5Wn6",pointerContainer:"pointerContainer-r4uo5Wn6"}},98182:t=>{t.exports={opacity:"opacity-EnWts7Xu",opacitySlider:"opacitySlider-EnWts7Xu",opacitySliderGradient:"opacitySliderGradient-EnWts7Xu",pointer:"pointer-EnWts7Xu",dragged:"dragged-EnWts7Xu",opacityPointerWrap:"opacityPointerWrap-EnWts7Xu",opacityInputWrap:"opacityInputWrap-EnWts7Xu",opacityInput:"opacityInput-EnWts7Xu",opacityInputPercent:"opacityInputPercent-EnWts7Xu",accessible:"accessible-EnWts7Xu"}},49339:t=>{t.exports={saturation:"saturation-NFNfqP2w",pointer:"pointer-NFNfqP2w",accessible:"accessible-NFNfqP2w"}},69825:t=>{t.exports={swatches:"swatches-sfn7Lezv",swatch:"swatch-sfn7Lezv",hover:"hover-sfn7Lezv",empty:"empty-sfn7Lezv",white:"white-sfn7Lezv",selected:"selected-sfn7Lezv",contextItem:"contextItem-sfn7Lezv",row:"row-sfn7Lezv"}},97737:(t,e,o)=>{"use strict";var i,n,r;function s(t="default"){switch(t){case"default":return"primary";case"stroke":return"secondary"}}function a(t="primary"){switch(t){case"primary":return"brand";case"success":return"green";case"default":return"gray";case"danger":return"red"}}function l(t="m"){switch(t){case"s":return"xsmall";case"m":return"small";case"l":return"large"}}o.d(e,{Button:()=>u}),function(t){t.Primary="primary",t.Success="success",t.Default="default",t.Danger="danger"}(i||(i={})),function(t){t.Small="s",t.Medium="m",t.Large="l"}(n||(n={})),function(t){t.Default="default",t.Stroke="stroke"}(r||(r={}));var c=o(50959),h=o(43814);function d(t){const{intent:e,size:o,appearance:i,useFullWidth:n,icon:r,...c}=t;return{...c,color:a(e),size:l(o),variant:s(i),stretch:n}}function u(t){return c.createElement(h.SquareButton,{...d(t)})}},43814:(t,e,o)=>{"use strict";o.d(e,{SquareButton:()=>_});var i=o(50959),n=o(97754),r=o.n(n),s=o(95604),a=o(70168),l=o.n(a);const c="apply-overflow-tooltip apply-overflow-tooltip--check-children-recursively apply-overflow-tooltip--allow-text apply-common-tooltip";function h(t){const{size:e="medium",variant:o="primary",color:i="brand",stretch:n=!1,startSlot:a,endSlot:h,iconOnly:d=!1,className:u,isGrouped:p,cellState:m,disablePositionAdjustment:g=!1,primaryText:v,secondaryText:_,isAnchor:f=!1}=t,w="brand"===i?"black":i,y=function(t){let e="";return 0!==t&&(1&t&&(e=r()(e,l()["no-corner-top-left"])),2&t&&(e=r()(e,l()["no-corner-top-right"])),4&t&&(e=r()(e,l()["no-corner-bottom-right"])),8&t&&(e=r()(e,l()["no-corner-bottom-left"]))),e}((0,s.getGroupCellRemoveRoundBorders)(m)),b=d&&(a||h)
|
|
;return r()(u,l().button,l()[e],l()[w],l()[o],n&&l().stretch,a&&l().withStartIcon,h&&l().withEndIcon,b&&l().iconOnly,y,p&&l().grouped,p&&!g&&l().adjustPosition,p&&m.isTop&&l().firstRow,p&&m.isLeft&&l().firstCol,v&&_&&l().multilineContent,f&&l().link,c)}function d(t){const{startSlot:e,iconOnly:o,children:n,endSlot:s,primaryText:a,secondaryText:h}=t;if(e&&s&&o)return i.createElement("span",{className:r()(l().slot,l().startSlotWrap)},e);const d=o&&(e??s),u=!e&&!s&&!o&&!n&&a&&h;return i.createElement(i.Fragment,null,e&&i.createElement("span",{className:r()(l().slot,l().startSlotWrap)},e),n&&!d&&i.createElement("span",{className:l().content},n),s&&i.createElement("span",{className:r()(l().slot,l().endSlotWrap)},s),u&&!d&&function(t){return t.primaryText&&t.secondaryText&&i.createElement("div",{className:r()(l().textWrap,c)},i.createElement("span",{className:l().primaryText}," ",t.primaryText," "),"string"==typeof t.secondaryText?i.createElement("span",{className:l().secondaryText}," ",t.secondaryText," "):i.createElement("span",{className:l().secondaryText},i.createElement("span",null,t.secondaryText.firstLine),i.createElement("span",null,t.secondaryText.secondLine)))}(t))}var u=o(34094),p=o(86332),m=o(90186);function g(t,e){return o=>{if(e)return o.preventDefault(),void o.stopPropagation();t?.(o)}}function v(t){const{className:e,color:o,variant:i,size:n,stretch:r,iconOnly:s,startSlot:a,endSlot:l,primaryText:c,secondaryText:h,...d}=t;return{...d,...(0,m.filterDataProps)(t),...(0,m.filterAriaProps)(t)}}function _(t){const{reference:e,tooltipText:o,disabled:n,onClick:r,onMouseOver:s,onMouseOut:a,onMouseDown:l,onMouseEnter:c,"aria-disabled":m,..._}=t,{isGrouped:f,cellState:w,disablePositionAdjustment:y}=(0,i.useContext)(p.ControlGroupContext),b=h({..._,isGrouped:f,cellState:w,disablePositionAdjustment:y}),C=o??(t.primaryText?[t.primaryText,t.secondaryText].join(" "):(0,u.getTextForTooltip)(t.children));return i.createElement("button",{...v(_),"aria-disabled":n||m,tabIndex:t.tabIndex??(n?-1:0),className:b,ref:e,onClick:g(r,n),onMouseDown:g(l,n),onMouseOver:g(s,n),onMouseOut:g(a,n),onMouseEnter:g(c,n),"data-overflow-tooltip-text":C},i.createElement(d,{..._}))}o(49406)},49406:(t,e,o)=>{"use strict";var i,n,r,s;!function(t){t.Primary="primary",t.QuietPrimary="quiet-primary",t.Secondary="secondary",t.Ghost="ghost"}(i||(i={})),function(t){t.XXSmall="xxsmall",t.XSmall="xsmall",t.Small="small",t.Medium="medium",t.Large="large",t.XLarge="xlarge",t.XXLarge="xxlarge"}(n||(n={})),function(t){t.Brand="brand",t.Blue="blue",t.Gray="gray",t.LightGray="light-gray",t.Green="green",t.Red="red",t.Black="black",t.Gradient="gradient",t.BlackFriday="black-friday",t.CyberMonday="cyber-monday",t.Coupon="coupon",t.Offer="offer",t.Space="space"}(r||(r={})),function(t){t.Semibold18px="semibold18px",t.Semibold16px="semibold16px",t.Semibold14px="semibold14px",t.Medium16px="medium16px",t.Regular16px="regular16px",t.Regular14px="regular14px",t.Regular12px="regular12px"}(s||(s={}))},86332:(t,e,o)=>{"use strict";o.d(e,{ControlGroupContext:()=>i})
|
|
;const i=o(50959).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},95604:(t,e,o)=>{"use strict";function i(t){let e=0;return t.isTop&&t.isLeft||(e+=1),t.isTop&&t.isRight||(e+=2),t.isBottom&&t.isLeft||(e+=8),t.isBottom&&t.isRight||(e+=4),e}o.d(e,{getGroupCellRemoveRoundBorders:()=>i})},56073:(t,e,o)=>{"use strict";function i(t,e=!1){const o=getComputedStyle(t),i=[o.height];return"border-box"!==o.boxSizing&&i.push(o.paddingTop,o.paddingBottom,o.borderTopWidth,o.borderBottomWidth),e&&i.push(o.marginTop,o.marginBottom),i.reduce(((t,e)=>t+(parseFloat(e)||0)),0)}function n(t,e=!1){const o=getComputedStyle(t),i=[o.width];return"border-box"!==o.boxSizing&&i.push(o.paddingLeft,o.paddingRight,o.borderLeftWidth,o.borderRightWidth),e&&i.push(o.marginLeft,o.marginRight),i.reduce(((t,e)=>t+(parseFloat(e)||0)),0)}o.d(e,{outerHeight:()=>i,outerWidth:()=>n})},34094:(t,e,o)=>{"use strict";o.d(e,{getTextForTooltip:()=>s});var i=o(50959);const n=t=>(0,i.isValidElement)(t)&&Boolean(t.props.children),r=(t,e=!0)=>null==t||"boolean"==typeof t||"{}"===JSON.stringify(t)?"":t.toString()+(e?" ":""),s=t=>Array.isArray(t)||(0,i.isValidElement)(t)?i.Children.toArray(t).reduce(((t,e)=>{let o="";return o=(0,i.isValidElement)(e)&&n(e)?s(e.props.children):(0,i.isValidElement)(e)&&!n(e)?"":r(e),t.concat(o)}),"").trim():r(t,!1)},52778:(t,e,o)=>{"use strict";o.d(e,{OutsideEvent:()=>n});var i=o(36383);function n(t){const{children:e,...o}=t;return e((0,i.useOutsideEvent)(o))}},73986:(t,e,o)=>{"use strict";o.d(e,{DialogBreakpoints:()=>n});var i=o(51284);const n={SmallHeight:i["small-height-breakpoint"],TabletSmall:i["tablet-small-breakpoint"],TabletNormal:i["tablet-normal-breakpoint"]}},43576:(t,e,o)=>{"use strict";o.d(e,{usePromise:()=>r});var i=o(50959),n=o(95406);function r(t,e,o){const[r,s]=(0,i.useState)(null);return(0,i.useEffect)((()=>{const o=new AbortController;let i=null;return(0,n.respectAbort)(o.signal,t()).then((t=>s(i=t))).catch(n.skipAbortError),()=>{o.abort(),i&&e&&e(i)}}),o?[...o]:void 0),r}},43982:(t,e,o)=>{"use strict";o.d(e,{useProperty:()=>n});var i=o(50959);const n=t=>{const[e,o]=(0,i.useState)(t.value());return(0,i.useEffect)((()=>{const e=t=>{o(t.value())};e(t);const i={};return t.subscribe(i,e),()=>t.unsubscribe(i,e)}),[t]),e}},59369:(t,e,o)=>{"use strict";o.d(e,{useRowsNavigation:()=>d});var i=o(50959),n=o(50151),r=o(22692),s=o(68335),a=o(33647),l=o(15754),c=o(43010);const h=[37,39,38,40];function d(t){const e=(0,i.useRef)(null);return(0,c.useIsomorphicLayoutEffect)((()=>{const t=(0,n.ensureNotNull)(e.current),o=()=>{const o=(0,r.queryTabbableElements)(t).sort(r.navigationOrderComparator);if(0===o.length||o[0].parentElement&&!m(o[0].parentElement,(0,n.ensureNotNull)(e.current))){const i=function(t){const o=p(t).sort(r.navigationOrderComparator),i=o.find((t=>m(t,(0,n.ensureNotNull)(e.current))));if(!i)return null;const s=Array.from(i.children);if(!s.length)return null;return s[0]}(t);if(null===i)return;if((0,a.becomeMainElement)(i),o.length>0)for(const t of o)(0,a.becomeSecondaryElement)(t)}}
|
|
;return window.addEventListener("keyboard-navigation-activation",o),o(),()=>window.removeEventListener("keyboard-navigation-activation",o)}),[]),[e,function(e){if(e.defaultPrevented)return;const o=(0,s.hashFromEvent)(e);if(!h.includes(o))return;const i=document.activeElement;if(!(i instanceof HTMLElement))return;const n=e.currentTarget;let a,c;if(t){const t=i.parentElement;a=t?Array.from(t.children):[],c=a.indexOf(i)}else a=(d=n,Array.from(d.querySelectorAll("button:not([disabled]):not([aria-disabled])")).filter((0,l.createScopedVisibleElementFilter)(d))).sort(r.navigationOrderComparator),c=a.indexOf(i);var d;if(0===a.length||-1===c)return;const m=(0,r.mapKeyCodeToDirection)(o);switch(m){case"inlinePrev":if(e.preventDefault(),!t&&0===c)break;g(u(a,c,-1));break;case"inlineNext":if(e.preventDefault(),!t&&c===a.length-1)break;g(u(a,c,1));break;case"blockPrev":case"blockNext":(o=>{if(!document.activeElement)return;const i=p(n),r=document.activeElement.parentElement;if(!r)return;const s=Array.from(r.children).indexOf(document.activeElement);if(-1===s)return;const a=i["blockNext"===o?i.indexOf(r)+1:i.indexOf(r)-1];if(!a)return;e.preventDefault();const l=Array.from(a.children);l.length&&(!t&&s<=l.length-1?g(l[s]):g(l[0]))})(m)}}]}function u(t,e,o){return t[(e+t.length+o)%t.length]}function p(t){return Array.from(t.querySelectorAll('[data-role="row"]')).filter((0,l.createScopedVisibleElementFilter)(t))}function m(t,e){const o=(0,n.ensureNotNull)(t.parentElement).offsetTop,i=o+(0,n.ensureNotNull)(t.parentElement).clientHeight,r=e.scrollTop,s=r+e.clientHeight;return o>=r&&i<=s}function g(t){document.activeElement&&(0,a.becomeSecondaryElement)(document.activeElement),(0,a.becomeMainElement)(t),t.focus()}},16697:(t,e,o)=>{"use strict";o.d(e,{ColorPicker:()=>H});var i=o(50959),n=o(97754),r=o.n(n),s=o(11542),a=o(59369),l=o(82665),c=o(24377),h=o(50151),d=o(49483),u=o(20520),p=o(16396),m=o(6914),g=o(50238),v=o(93544),_=o(69825);const f=4;function w(t){const{color:e,selected:r,onSelect:a,onSwatchRemove:l}=t,[c,w]=(0,i.useState)(!1),[y,b]=(0,g.useRovingTabindexElement)(null),C=Boolean(l)&&!d.CheckMobile.any();return i.createElement(i.Fragment,null,i.createElement("button",{ref:y,style:e?{color:e}:void 0,className:n(_.swatch,c&&_.hover,r&&_.selected,!e&&_.empty,String(e).toLowerCase()===m.white&&_.white),onClick:function(){a(e)},onContextMenu:C?T:void 0,tabIndex:b,"data-role":"swatch"}),C&&i.createElement(u.PopupMenu,{isOpened:c,onClose:T,position:function(){const t=(0,h.ensureNotNull)(y.current).getBoundingClientRect();return{x:t.left,y:t.top+t.height+f}},onClickOutside:T},i.createElement(p.PopupMenuItem,{className:_.contextItem,label:s.t(null,void 0,o(89984)),icon:v,onClick:function(){T(),(0,h.ensureDefined)(l)()},dontClosePopup:!0})));function T(){w(!c)}}const y=10;function b(t){const{colors:e,color:o,children:n,onSelect:r,onRemoveCustomColor:s}=t;if(!e)return null;const a=o?(0,c.parseRgb)(String(o)):void 0,h=(0,l.default)(e,y);return i.createElement("div",{className:_.swatches},h.map(((t,e)=>i.createElement("div",{className:_.row,
|
|
"data-role":"row",key:e},t.map(((t,o)=>i.createElement(w,{key:String(t)+o,color:t,selected:a&&(0,c.areEqualRgb)(a,(0,c.parseRgb)(String(t))),onSelect:d,onSwatchRemove:s?()=>function(t,e){const o=t*y+e;s?.(o)}(e,o):void 0})))))),n);function d(t){r&&r(t)}}var C=o(54368),T=o(97737);function x(t){const e=`Invalid RGB color: ${t}`;if(null===t)throw new Error(e);const o=t.match(/^#?([a-f0-9]{2})([a-f0-9]{2})([a-f0-9]{2})$/i);if(null===o)throw new Error(e);const[,i,n,r]=o;if(!i||!n||!r)throw new Error(e);const s=parseInt(i,16)/255,a=parseInt(n,16)/255,l=parseInt(r,16)/255,c=Math.max(s,a,l),h=Math.min(s,a,l);let d;const u=c,p=c-h,m=0===c?0:p/c;if(c===h)d=0;else{switch(c){case s:d=(a-l)/p+(a<l?6:0);break;case a:d=(l-s)/p+2;break;case l:d=(s-a)/p+4;break;default:d=0}d/=6}return{h:d,s:m,v:u}}var S=o(20057),L=o(68335),P=o(77914),E=o(49339);const B=[37,39,38,40],D=.01;class A extends i.PureComponent{constructor(){super(...arguments),this._container=null,this._refContainer=t=>{this._container=t},this._handlePosition=t=>{const{hsv:{h:e},onChange:o}=this.props;if(!o)return;const i=(0,h.ensureNotNull)(this._container).getBoundingClientRect(),n=t.clientX-i.left,r=t.clientY-i.top;o({h:e,s:(0,P.clamp)(n/i.width,0,1),v:(0,P.clamp)(1-r/i.height,0,1)})},this._handleKeyDown=t=>{const{hsv:{h:e,s:o,v:i},onChange:n}=this.props,r=(0,L.hashFromEvent)(t);if(!n||!B.includes(r))return;if(37===r||39===r){return void n({h:e,s:(0,P.clamp)(37===r?o-D:o+D,0,1),v:i})}n({h:e,s:o,v:(0,P.clamp)(40===r?i-D:i+D,0,1)})},this._mouseDown=t=>{window.addEventListener("mouseup",this._mouseUp),window.addEventListener("mousemove",this._mouseMove)},this._mouseUp=t=>{window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._handlePosition(t)},this._mouseMove=(0,S.default)(this._handlePosition,100),this._handleTouch=t=>{this._handlePosition(t.nativeEvent.touches[0])}}render(){const{className:t,hsv:{h:e,s:o,v:n}}=this.props,s=`hsl(${360*e}, 100%, 50%)`;return i.createElement("div",{tabIndex:0,className:r()(E.accessible,t),onKeyDown:this._handleKeyDown},i.createElement("div",{className:E.saturation,style:{backgroundColor:s},ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},i.createElement("div",{className:E.pointer,style:{left:100*o+"%",top:100*(1-n)+"%"}})))}}var M=o(61483);class W extends i.PureComponent{constructor(){super(...arguments),this._container=null,this._refContainer=t=>{this._container=t},this._handlePosition=t=>{const{hsv:{s:e,v:o},onChange:i}=this.props;if(!i)return;const n=(0,h.ensureNotNull)(this._container).getBoundingClientRect(),r=t.clientY-n.top;i({h:(0,P.clamp)(r/n.height,0,1),s:e,v:o})},this._handleKeyDown=t=>{const{hsv:{h:e,s:o,v:i},onChange:n}=this.props,r=(0,L.hashFromEvent)(t);if(!n||38!==r&&40!==r)return;n({h:(0,P.clamp)(38===r?e-.01:e+.01,0,1),s:o,v:i})},this._mouseDown=t=>{window.addEventListener("mouseup",this._mouseUp),window.addEventListener("mousemove",this._mouseMove)},this._mouseUp=t=>{
|
|
window.removeEventListener("mousemove",this._mouseMove),window.removeEventListener("mouseup",this._mouseUp),this._handlePosition(t)},this._mouseMove=(0,S.default)(this._handlePosition,100),this._handleTouch=t=>{this._handlePosition(t.nativeEvent.touches[0])}}render(){const{className:t,hsv:{h:e}}=this.props;return i.createElement("div",{className:r()(M.hue,M.accessible,t),tabIndex:0,onKeyDown:this._handleKeyDown},i.createElement("div",{className:M.pointerContainer,ref:this._refContainer,onMouseDown:this._mouseDown,onTouchStart:this._handleTouch,onTouchMove:this._handleTouch},i.createElement("div",{className:M.pointer,style:{top:100*e+"%"}})))}}var k=o(55778);const z="#000000",N=s.t(null,{context:"Color Picker"},o(55517));class I extends i.PureComponent{constructor(t){super(t),this._inputRef=i.createRef(),this._handleHSV=t=>{const e=function(t){const{h:e,s:o,v:i}=t;let n,r,s;const a=Math.floor(6*e),l=6*e-a,c=i*(1-o),h=i*(1-l*o),d=i*(1-(1-l)*o);switch(a%6){case 0:n=i,r=d,s=c;break;case 1:n=h,r=i,s=c;break;case 2:n=c,r=i,s=d;break;case 3:n=c,r=h,s=i;break;case 4:n=d,r=c,s=i;break;case 5:n=i,r=c,s=h;break;default:n=0,r=0,s=0}return"#"+[255*n,255*r,255*s].map((t=>("0"+Math.round(t).toString(16)).replace(/.+?([a-f0-9]{2})$/i,"$1"))).join("")}(t)||z;this.setState({color:e,inputColor:R(e),hsv:t}),this.props.onSelect(e)},this._handleInput=t=>{const e=R(t.currentTarget.value);try{const t=x(e),o=`#${e}`;this.setState({color:o,inputColor:e,hsv:t}),this.props.onSelect(o)}catch(t){this.setState({inputColor:e})}},this._handleAddColor=()=>this.props.onAdd(this.state.color);const e=t.color||z;this.state={color:e,inputColor:R(e),hsv:x(e)}}componentDidMount(){d.CheckMobile.any()||this._inputRef.current?.focus()}render(){const{color:t,hsv:e,inputColor:o}=this.state;return i.createElement("div",{className:k.container},i.createElement("div",{className:k.form},i.createElement("div",{className:r()(k.swatch,String(t).toLowerCase()===m.white&&k.white),style:{backgroundColor:t}}),i.createElement("div",{className:k.inputWrap},i.createElement("span",{className:k.inputHash},"#"),i.createElement("input",{ref:this._inputRef,type:"text",className:k.input,value:o,onChange:this._handleInput})),i.createElement("div",{className:k.buttonWrap},i.createElement(T.Button,{size:"s",onClick:this._handleAddColor},N))),i.createElement("div",{className:k.hueSaturationWrap},i.createElement(A,{className:k.saturation,hsv:e,onChange:this._handleHSV}),i.createElement(W,{className:k.hue,hsv:e,onChange:this._handleHSV})))}}function R(t){return t.replace(/^#/,"")}var F=o(30329);const V=s.t(null,{context:"Color Picker"},o(29619)),O=s.t(null,{context:"Color Picker"},o(80936));function H(t){const{color:e,opacity:o,selectCustom:n,selectOpacity:s,customColors:l,onRemoveCustomColor:c,onToggleCustom:h,onOpacityChange:d,menu:u}=t,[p,g]=(0,i.useState)(!1),v="number"==typeof o?o:1,[_,f]=(0,a.useRowsNavigation)();return(0,i.useLayoutEffect)((()=>{u&&u.update()}),[s,u]),p?i.createElement(I,{color:e,onSelect:w,onAdd:function(e){g(!1),h?.(!1);const{onAddColor:o}=t;o&&o(e)}
|
|
}):i.createElement("div",{className:F.container},i.createElement("div",{ref:_,onKeyDown:f},i.createElement(b,{colors:m.basic,color:e,onSelect:w}),i.createElement(b,{colors:m.extended,color:e,onSelect:w}),i.createElement("div",{className:F.separator}),i.createElement(b,{colors:l,color:e,onSelect:w,onRemoveCustomColor:c},n&&i.createElement(i.Fragment,null,l?.length?i.createElement("button",{title:V,onClick:y,className:r()(F.customButton,F.accessible,"apply-common-tooltip"),tabIndex:-1}):i.createElement("div",{"data-role":"row"},i.createElement("button",{title:V,onClick:y,className:r()(F.customButton,F.accessible,"apply-common-tooltip"),tabIndex:-1}))))),s&&i.createElement(i.Fragment,null,i.createElement("div",{className:F.sectionTitle},O),i.createElement(C.Opacity,{color:e,opacity:v,onChange:function(t){d&&d(t)}})));function w(e){const{onColorChange:o}=t;o&&o(e,p)}function y(t){g(!0),h?.(!0)}}},54368:(t,e,o)=>{"use strict";o.d(e,{Opacity:()=>c});var i=o(50959),n=o(97754),r=o(50151),s=o(77914),a=o(68335),l=o(98182);class c extends i.PureComponent{constructor(t){super(t),this._container=null,this._pointer=null,this._raf=null,this._refContainer=t=>{this._container=t},this._refPointer=t=>{this._pointer=t},this._handlePosition=t=>{null===this._raf&&(this._raf=requestAnimationFrame((()=>{const e=(0,r.ensureNotNull)(this._container),o=(0,r.ensureNotNull)(this._pointer),i=e.getBoundingClientRect(),n=o.offsetWidth,a=t.clientX-n/2-i.left,l=(0,s.clamp)(a/(i.width-n),0,1);this.setState({inputOpacity:Math.round(100*l).toString()}),this.props.onChange(l),this._raf=null})))},this._onSliderClick=t=>{this._handlePosition(t.nativeEvent),this._dragSubscribe()},this._mouseUp=t=>{this.setState({isPointerDragged:!1}),this._dragUnsubscribe(),this._handlePosition(t)},this._mouseMove=t=>{this.setState({isPointerDragged:!0}),this._handlePosition(t)},this._onTouchStart=t=>{this._handlePosition(t.nativeEvent.touches[0])},this._handleTouch=t=>{this.setState({isPointerDragged:!0}),this._handlePosition(t.nativeEvent.touches[0])},this._handleTouchEnd=()=>{this.setState({isPointerDragged:!1})},this._handleInput=t=>{const e=t.currentTarget.value,o=Number(e)/100;this.setState({inputOpacity:e}),Number.isNaN(o)||o>1||this.props.onChange(o)},this._handleKeyDown=t=>{const e=(0,a.hashFromEvent)(t);if(37!==e&&39!==e)return;t.preventDefault();const o=Number(this.state.inputOpacity);37===e&&0!==o&&this._changeOpacity(o-1),39===e&&100!==o&&this._changeOpacity(o+1)},this.state={inputOpacity:Math.round(100*t.opacity).toString(),isPointerDragged:!1}}componentWillUnmount(){null!==this._raf&&(cancelAnimationFrame(this._raf),this._raf=null),this._dragUnsubscribe()}render(){const{color:t,opacity:e,hideInput:o,disabled:r}=this.props,{inputOpacity:s,isPointerDragged:a}=this.state,c={color:t||void 0};return i.createElement("div",{className:l.opacity},i.createElement("div",{className:n(l.opacitySlider,l.accessible),style:c,tabIndex:r?-1:0,ref:this._refContainer,onMouseDown:this._onSliderClick,onTouchStart:this._onTouchStart,onTouchMove:this._handleTouch,
|
|
onTouchEnd:this._handleTouchEnd,onKeyDown:this._handleKeyDown,"aria-disabled":r},i.createElement("div",{className:l.opacitySliderGradient,style:{backgroundImage:`linear-gradient(90deg, transparent, ${t})`}}),i.createElement("div",{className:l.opacityPointerWrap},i.createElement("div",{className:n(l.pointer,a&&l.dragged),style:{left:100*e+"%"},ref:this._refPointer}))),!o&&i.createElement("div",{className:l.opacityInputWrap},i.createElement("input",{type:"text",className:l.opacityInput,value:s,onChange:this._handleInput}),i.createElement("span",{className:l.opacityInputPercent},"%")))}_dragSubscribe(){const t=(0,r.ensureNotNull)(this._container).ownerDocument;t&&(t.addEventListener("mouseup",this._mouseUp),t.addEventListener("mousemove",this._mouseMove))}_dragUnsubscribe(){const t=(0,r.ensureNotNull)(this._container).ownerDocument;t&&(t.removeEventListener("mousemove",this._mouseMove),t.removeEventListener("mouseup",this._mouseUp))}_changeOpacity(t){this.setState({inputOpacity:t.toString()}),this.props.onChange(t/100)}}},6914:(t,e,o)=>{"use strict";o.d(e,{basic:()=>a,extended:()=>c,white:()=>n});var i=o(58978);const n=i.colorsPalette["color-white"],r=["ripe-red","tan-orange","banana-yellow","iguana-green","minty-green","sky-blue","tv-blue","deep-blue","grapes-purple","berry-pink"],s=[200,300,400,500,600,700,800,900].map((t=>`color-cold-gray-${t}`));s.unshift("color-white"),s.push("color-black"),r.forEach((t=>{s.push(`color-${t}-500`)}));const a=s.map((t=>i.colorsPalette[t])),l=[];[100,200,300,400,700,900].forEach((t=>{r.forEach((e=>{l.push(`color-${e}-${t}`)}))}));const c=l.map((t=>i.colorsPalette[t]))},56512:(t,e,o)=>{"use strict";o.d(e,{useCustomColors:()=>c});var i=o(50959),n=o(1765),r=o(76422);function s(t,e){(0,i.useEffect)((()=>(r.subscribe(t,e,null),()=>{r.unsubscribe(t,e,null)})),[t,e])}var a,l=o(24377);function c(){const[t,e]=(0,i.useState)((0,n.getJSON)("pickerCustomColors",[]));s("add_new_custom_color",(o=>e(h(o,t)))),s("remove_custom_color",(o=>e(d(o,t))));const o=(0,i.useCallback)((e=>{const o=e?(0,l.parseRgb)(e):null;t.some((t=>null!==t&&null!==o&&(0,l.areEqualRgb)((0,l.parseRgb)(t),o)))||(r.emit("add_new_custom_color",e),(0,n.setJSON)("pickerCustomColors",h(e,t)))}),[t]),a=(0,i.useCallback)((e=>{(e>=0||e<t.length)&&(r.emit("remove_custom_color",e),(0,n.setJSON)("pickerCustomColors",d(e,t)))}),[t]);return[t,o,a]}function h(t,e){const o=e.slice();return o.push(t),o.length>29&&o.shift(),o}function d(t,e){return e.filter(((e,o)=>t!==o))}!function(t){t.SettingsKey="pickerCustomColors",t.GlobalAddEventName="add_new_custom_color",t.GlobalRemoveEventName="remove_custom_color",t[t.MaxColors=29]="MaxColors"}(a||(a={}))},77975:(t,e,o)=>{"use strict";o.d(e,{useWatchedValueReadonly:()=>n});var i=o(50959);const n=(t,e=!1,o=[])=>{const n="watchedValue"in t?t.watchedValue:void 0,r="defaultValue"in t?t.defaultValue:t.watchedValue.value(),[s,a]=(0,i.useState)(n?n.value():r);return(e?i.useLayoutEffect:i.useEffect)((()=>{if(n){a(n.value());const t=t=>a(t);return n.subscribe(t),()=>n.unsubscribe(t)}return()=>{}}),[n,...o]),s
|
|
}},84877:(t,e,o)=>{"use strict";o.d(e,{MatchMediaMap:()=>s});var i=o(50959),n=o(66783),r=o.n(n);class s extends i.Component{constructor(t){super(t),this._handleMediaChange=()=>{const t=l(this.state.queries,((t,e)=>e.matches));let e=!1;for(const o in t)if(t.hasOwnProperty(o)&&this.state.matches[o]!==t[o]){e=!0;break}e&&this.setState({matches:t})};const{rules:e}=this.props;this.state=a(e)}shouldComponentUpdate(t,e){return!r()(t,this.props)||(!r()(e.rules,this.state.rules)||!r()(e.matches,this.state.matches))}componentDidMount(){this._migrate(null,this.state.queries)}componentDidUpdate(t,e){r()(t.rules,this.props.rules)||this._migrate(e.queries,this.state.queries)}componentWillUnmount(){this._migrate(this.state.queries,null)}render(){return this.props.children(this.state.matches)}static getDerivedStateFromProps(t,e){if(r()(t.rules,e.rules))return null;const{rules:o}=t;return a(o)}_migrate(t,e){null!==t&&l(t,((t,e)=>{e.removeEventListener("change",this._handleMediaChange)})),null!==e&&l(e,((t,e)=>{e.addEventListener("change",this._handleMediaChange)}))}}function a(t){const e=l(t,((t,e)=>window.matchMedia(e)));return{queries:e,matches:l(e,((t,e)=>e.matches)),rules:{...t}}}function l(t,e){const o={};for(const i in t)t.hasOwnProperty(i)&&(o[i]=e(i,t[i]));return o}},86431:(t,e,o)=>{"use strict";o.d(e,{makeOverlapable:()=>r});var i=o(50959),n=o(65718);function r(t,e){return class extends i.PureComponent{render(){const{isOpened:o,root:r}=this.props;if(!o)return null;const s=i.createElement(t,{...this.props,ref:this.props.componentRef,zIndex:150});return"parent"===r?s:i.createElement(n.Portal,{shouldTrapFocus:e},s)}}}},40173:(t,e,o)=>{"use strict";function i(t,e,o={}){return Object.assign({},t,function(t,e,o={}){const i=Object.assign({},e);for(const n of Object.keys(e)){const r=o[n]||n;r in t&&(i[n]=[t[r],e[n]].join(" "))}return i}(t,e,o))}o.d(e,{mergeThemes:()=>i})},19836:t=>{t.exports={button:"button-KTgbfaP5"}},74163:t=>{t.exports={dots:"dots-meVFo3Y9"}},30476:t=>{t.exports={mobile:"(max-width: 567px)"}},32473:(t,e,o)=>{"use strict";o.d(e,{ToolButton:()=>c});var i=o(50959),n=o(97754),r=o.n(n),s=o(46003);const a=i.forwardRef(((t,e)=>{const{className:o,...n}=t;return i.createElement(s.ToolWidgetButton,{ref:e,className:o,"aria-pressed":n.isActive,isPressed:n.isActive,...n})}));var l=o(19836);const c=(0,i.forwardRef)(((t,e)=>{const{id:o,className:n,icon:c,isActive:h,isGrayed:d,isTransparent:u,onClick:p,buttonHotKey:m,tooltipPosition:g="vertical",tag:v,tabIndex:_,tooltip:f,...w}=t,y="button"===v,b=u?s.ToolWidgetButton:a;return i.createElement(b,{"aria-label":y?f:void 0,...w,id:o,ref:e,className:r()(l.button,n),tag:v,isActive:h,isDisabledAppearance:d,icon:c,onClick:p,forceInteractive:!0,tabIndex:_,"data-tooltip":f,tooltipPosition:g,"data-tooltip-hotkey":m})}))},70173:(t,e,o)=>{"use strict";o.d(e,{drawingToolsIcons:()=>i});const i={SyncDrawing:o(99088),arrow:o(63743),cursor:o(18953),dot:o(72196),demonstration:o(54780),performance:"",drawginmode:o(52459),drawginmodeActive:o(63975),eraser:o(27999),group:o(34059),
|
|
hideAllDrawings:o(45820),hideAllDrawingsActive:o(84959),hideAllIndicators:o(42321),hideAllIndicatorsActive:o(75895),hideAllDrawingTools:o(93756),hideAllDrawingToolsActive:o(42650),hideAllPositionsTools:o(57313),hideAllPositionsToolsActive:o(65162),lockAllDrawings:o(91244),lockAllDrawingsActive:o(65186),magnet:o(68385),heart:o(10862),smile:o(7636),sticker:o(62567),strongMagnet:o(46049),measure:o(88518),removeAllDrawingTools:o(93544),showObjectsTree:o(36515),zoom:o(6894),"zoom-out":o(45360)}},63027:(t,e,o)=>{"use strict";o.r(e),o.d(e,{FavoriteDrawingToolbar:()=>E});var i=o(50959),n=o(32227),r=o(11542),s=o(35162),a=o(6519),l=o(50470),c=o(41706),h=o(31269),d=o(78861),u=o(18117),p=o(1765),m=o(11417),g=o(97995),v=o(22613),_=o(38780),f=o(26610),w=o(9745),y=o(54374),b=o(90397);const C={Mobile:o(30476).mobile};var T=o(77975),x=o(97754),S=o(44996),L=o(74163);function P(t){const{title:e,actions:o,className:n,onActionClick:r}=t,s=(0,T.useWatchedValueReadonly)({watchedValue:d.tool}),a=o.map((t=>function(t,e,o){return i.createElement(b.AccessibleMenuItem,{key:t,onClick:()=>o(t),label:u.lineToolsInfo[t].localizedName,icon:u.lineToolsInfo[t].icon,isActive:t===e})}(t,s,r)));return i.createElement(y.ToolWidgetMenu,{className:x(n,L.dots),arrow:!1,title:e,drawerBreakpoint:C.Mobile,content:i.createElement(w.Icon,{icon:S}),"data-name":"more",menuDataName:"more-menu",closeOnEsc:!0},a)}o(54188);class E extends s.FloatingToolbar{constructor(t){super({allowSortable:!0,dragOnlyInsideToolbar:!0,defaultPosition:t,positionSettingsKey:"chart.favoriteDrawingsPosition",positionStorageType:"device"}),this._linetoolsWidgets={},this._canBeShownValue=new v.WatchedValue(!1),this._reactContainer=null,this._onActionClick=async t=>{await(0,f.initLineTool)(t),h.ContextMenuManager.hideAll(),d.tool.value()!==t&&(d.tool.setValue(t),(0,g.trackDrawingToolSelected)(t,"Favorites panel"))},this._createLineToolRenderer=()=>{let t=!0;const e=window.innerHeight>window.innerWidth,o=window.innerWidth>window.innerHeight,i=window.innerHeight===window.innerWidth;return n=>{if(t){const r=this._createLinetoolWidget(n);this.addWidget(r),e&&this.isVertical()||o&&!this.isVertical()||i?(t=this._isWidgetCanBeOnScreen(),t?this._linetoolsWidgets[n]=r:(this.removeWidget(r),this._dropdownItems.push(n))):this._linetoolsWidgets[n]=r}else this._dropdownItems.push(n)}},this._renderToolbarContent=()=>{const t=this._createLineToolRenderer();this._renderWidgetPlug(),this._linetoolsWidgets={},this._dropdownItems=[],this.removeWidgets(),a.LinetoolsFavoritesStore.favorites().filter((t=>u.lineToolsInfo[t]&&!0)).forEach(t),this._dropdownItems.length&&this._renderReactContent(),!this._dropdownItems.length&&this._reactContainer&&n.unmountComponentAtNode(this._reactContainer)},this._attachHandlers(),this._loadVisibilityState(),this._hideAction=this._createHideToolbarAction(),this._reactContainer=this.getReactWidgetContainer(),this._dropdownItems=[]}show(){this._canBeShownValue.value()&&(super.show(this._renderToolbarContent),window.addEventListener("resize",this._renderToolbarContent))}hide(){
|
|
window.removeEventListener("resize",this._renderToolbarContent),super.hide()}showAndSaveSettingsValue(){this._canBeShownValue.value()&&(m.TVLocalStorage.setItem("ChartFavoriteDrawingToolbarWidget.visible","true"),this.show())}hideAndSaveSettingsValue(){m.TVLocalStorage.setItem("ChartFavoriteDrawingToolbarWidget.visible","false"),this.hide()}canBeShown(){return this._canBeShownValue.readonly()}_onFavoriteAdded(t){this.isVisible()&&this._renderToolbarContent(),a.LinetoolsFavoritesStore.favorites().filter(B).length>0&&(this._canBeShownValue.setValue(!0),this.showAndSaveSettingsValue())}_onFavoriteRemoved(t){delete this._linetoolsWidgets[t],this.isVisible()&&this._renderToolbarContent(),0===a.LinetoolsFavoritesStore.favorites().filter(B).length&&(this._canBeShownValue.setValue(!1),this.hide())}_onFavoriteMoved(){this._renderToolbarContent()}_onSelectedLinetoolChanged(t){Object.keys(this._linetoolsWidgets).forEach((e=>{this._linetoolsWidgets[e].classList.toggle("i-active",t===e)})),this._dropdownItems.includes(t)&&this._renderReactContent()}_createLinetoolWidget(t){const e=`<span class="tv-favorited-drawings-toolbar__widget apply-common-tooltip ${t===d.tool.value()?"i-active":""}" title="${u.lineToolsInfo[t].localizedName}" data-name="FavoriteToolbar${t}">${u.lineToolsInfo[t].icon}</span>`,o=(0,l.parseHtmlElement)(e);return o.addEventListener("click",(()=>this._onActionClick(t))),o}_isWidgetCanBeOnScreen(){const t=this._getCorrectedWidgetRect();return this.isVertical()?t.height<window.innerHeight:t.width<window.innerWidth}_renderWidgetPlug(){n.render(i.createElement("div",{className:"tv-favorited-drawings-toolbar__widget"}),this._reactContainer)}_renderReactContent(){n.render(i.createElement(P,{title:r.t(null,void 0,o(37117)),actions:this._dropdownItems,onActionClick:this._onActionClick,className:"tv-favorited-drawings-toolbar__widget"}),this._reactContainer)}_attachHandlers(){a.LinetoolsFavoritesStore.favoriteAdded.subscribe(this,this._onFavoriteAdded),a.LinetoolsFavoritesStore.favoriteRemoved.subscribe(this,this._onFavoriteRemoved),a.LinetoolsFavoritesStore.favoriteMoved.subscribe(this,this._onFavoriteMoved),a.LinetoolsFavoritesStore.favoritesSynced.subscribe(null,(()=>{this._loadVisibilityState(),this._renderToolbarContent()})),this.onWidgetsReordered().subscribe(this,((t,e)=>{const o=a.LinetoolsFavoritesStore.favorite(t);if(o){const t=this._linetoolsWidgets[o];t.classList.remove("clicked"),setTimeout((()=>{t.style.pointerEvents=""}),50)}if(t!==e){if(a.LinetoolsFavoritesStore.favoriteMoved.unsubscribe(this,this._onFavoriteMoved),!a.LinetoolsFavoritesStore.moveFavorite(o,e))throw new Error("Something went wrong");a.LinetoolsFavoritesStore.favoriteMoved.subscribe(this,this._onFavoriteMoved)}})),this.onSortableStart().subscribe(this,(t=>{const e=a.LinetoolsFavoritesStore.favorite(t);if(!e)return;const o=this._linetoolsWidgets[e];o.classList.add("clicked"),(0,_.hide)(),o.style.pointerEvents="none"})),this.onContextMenu((t=>{t.preventDefault(),h.ContextMenuManager.showMenu([this._hideAction],t)})),
|
|
d.tool.subscribe(this._onSelectedLinetoolChanged.bind(this))}_createHideToolbarAction(){return new c.Action({actionId:"Chart.FavoriteDrawingToolsToolbar.Hide",options:{label:r.t(null,void 0,o(22688)),onExecute:()=>{this.hideAndSaveSettingsValue()}}})}_loadVisibilityState(){const t=a.LinetoolsFavoritesStore.favorites().filter(B).length>0;this._canBeShownValue.setValue(t);const e=a.LinetoolsFavoritesStore.favoritesCount()>0;let o;const i=p.getValue("ChartFavoriteDrawingToolbarWidget.visible");void 0!==i?(p.remove("ChartFavoriteDrawingToolbarWidget.visible",{forceFlush:!0}),o="false"!==i,m.TVLocalStorage.setItem("ChartFavoriteDrawingToolbarWidget.visible",i)):o="false"!==m.TVLocalStorage.getItem("ChartFavoriteDrawingToolbarWidget.visible"),o&&e?this.show():this.hide()}}function B(t){return!0}},35162:(t,e,o)=>{"use strict";o.d(e,{FLOATING_TOOLBAR_REACT_WIDGETS_CLASS:()=>T,FloatingToolbar:()=>S});var i=o(87713),n=o(32563),r=o(76662),s=o(1765),a=o(48096),l=o(22613),c=o(38881);class h extends c.ChunkLoader{_startLoading(){return Promise.all([o.e(1553),o.e(2377)]).then(o.bind(o,13367)).then((t=>t.HammerJS))}}var d=o(11417),u=o(50151),p=o(56073);o(2539);class m{constructor(t){this._helper=null,this._handleDragStart=t=>{if(null!==this._helper)return;const e=this._source;e.classList.add("ui-draggable-dragging");const[o,i]=[(0,p.outerWidth)(e),(0,p.outerHeight)(e)];this._helper={startTop:parseFloat(e.style.top)||0,startLeft:parseFloat(e.style.left)||0,nextTop:null,nextLeft:null,raf:null,size:[o,i],containment:this._containment instanceof HTMLElement?[parseInt(getComputedStyle(this._containment).borderLeftWidth)+parseInt(getComputedStyle(this._containment).paddingLeft),parseInt(getComputedStyle(this._containment).borderTopWidth)+parseInt(getComputedStyle(this._containment).paddingTop),this._containment.offsetWidth-parseInt(getComputedStyle(this._containment).borderRightWidth)-parseInt(getComputedStyle(this._containment).paddingRight)-parseInt(getComputedStyle(e).marginLeft)-parseInt(getComputedStyle(e).marginRight)-o,this._containment.offsetHeight-parseInt(getComputedStyle(this._containment).borderBottomWidth)-parseInt(getComputedStyle(this._containment).paddingBottom)-parseInt(getComputedStyle(e).marginTop)-parseInt(getComputedStyle(e).marginBottom)-i]:"window"===this._containment?[window.scrollX,window.scrollY,window.scrollX+document.documentElement.offsetWidth-o,window.scrollY+document.documentElement.offsetHeight-i]:null},this._start?.()},this._handleDragMove=t=>{if(null===this._helper)return;const{current:e,initial:o}=t.detail,i=this._source,n=this._helper.nextTop,r=this._helper.nextLeft,s="y"===this._axis||!1===this._axis||0!==e.movementY;if(s){const t=this._helper.startTop;isFinite(t)&&(this._helper.nextTop=e.clientY-o.clientY+t)}const a="x"===this._axis||!1===this._axis||0!==e.movementY;if(a){const t=this._helper.startLeft;isFinite(t)&&(this._helper.nextLeft=e.clientX-o.clientX+t)}if(null!==this._helper.containment){const[t,e,o,i]=this._helper.containment
|
|
;s&&this._helper.nextTop&&(this._helper.nextTop=Math.min(this._helper.nextTop,i),this._helper.nextTop=Math.max(this._helper.nextTop,e)),a&&this._helper.nextLeft&&(this._helper.nextLeft=Math.min(this._helper.nextLeft,o),this._helper.nextLeft=Math.max(this._helper.nextLeft,t))}null!==this._helper.raf||n===this._helper.nextTop&&r===this._helper.nextLeft||(this._helper.raf=requestAnimationFrame((()=>{null!==this._helper&&(null!==this._helper.nextTop&&(i.style.top=this._helper.nextTop+"px",this._helper.nextTop=null),null!==this._helper.nextLeft&&(i.style.left=this._helper.nextLeft+"px",this._helper.nextLeft=null),this._helper.raf=null)}))),this._drag?.()},this._handleDragStop=t=>{if(null===this._helper)return;this._source.classList.remove("ui-draggable-dragging"),this._helper=null,this._stop?.()};const e=this._source=t.source;e.classList.add("ui-draggable");const o=this._handle=(t.handle?e.querySelector(t.handle):null)??e;o.classList.add("ui-draggable-handle"),this._start=t.start,this._stop=t.stop,this._drag=t.drag,this._backend=new g({handle:o,onDragStart:this._handleDragStart,onDragMove:this._handleDragMove,onDragStop:this._handleDragStop}),this._axis=t.axis??!1,this._containment=t.containment}destroy(){const t=this._source;t.classList.remove("ui-draggable"),t.classList.remove("ui-draggable-dragging");this._handle.classList.remove("ui-draggable-handle"),this._backend.destroy(),null!==this._helper&&(this._helper.raf&&cancelAnimationFrame(this._helper.raf),this._helper=null)}}class g{constructor(t){this._pointerStarted=!1,this._initial=null,this._handlePointerDown=t=>{if(null!==this._initial||0!==t.button)return;if(!(t.target instanceof Element&&this._handle.contains(t.target)))return;if(this._initial=t,!this._distance&&(this._pointerStart(),!this._pointerStarted))return;t.preventDefault();const e=this._getEventTarget();e.addEventListener("pointermove",this._handlePointerMove),e.addEventListener("pointerup",this._handlePointerUp),e.addEventListener("pointercancel",this._handlePointerUp),e.addEventListener("lostpointercapture",this._handleLostPointerCapture)},this._handleLostPointerCapture=t=>{this._getEventTarget()===t.target&&this._handlePointerUp(t)},this._handlePointerMove=t=>{if(null!==this._initial&&this._initial.pointerId===t.pointerId)if(this._pointerStarted)this._pointerDrag(t);else if(this._pointerDistanceMet(t)){if(this._pointerStart(),this._pointerStarted)return void this._pointerDrag(t);this._handlePointerUp(t)}},this._handlePointerUp=t=>{if(null===this._initial||this._initial.pointerId!==t.pointerId)return;t.preventDefault();const e=this._getEventTarget();e.removeEventListener("pointermove",this._handlePointerMove),e.removeEventListener("pointerup",this._handlePointerUp),e.removeEventListener("pointercancel",this._handlePointerUp),e.removeEventListener("lostpointercapture",this._handlePointerUp),this._pointerStarted&&(this._pointerStarted=!1,e.releasePointerCapture(this._initial.pointerId),this._dispatchEvent(this._createEvent("pointer-drag-stop",t))),this._initial=null};const e=this._handle=t.handle
|
|
;this._onDragStart=t.onDragStart,this._onDragMove=t.onDragMove,this._onDragStop=t.onDragStop,this._distance=t.distance??0,this._rootElement=t.rootElement,e.style.touchAction="none",e.addEventListener("pointerdown",this._handlePointerDown)}destroy(){const t=this._handle;t.style.touchAction="",t.removeEventListener("pointerdown",this._handlePointerDown),t.removeEventListener("pointermove",this._handlePointerMove),t.removeEventListener("pointerup",this._handlePointerUp),t.removeEventListener("pointercancel",this._handlePointerUp),t.removeEventListener("lostpointercapture",this._handlePointerUp),null!==this._initial&&(t.releasePointerCapture(this._initial.pointerId),this._initial=null),this._pointerStarted=!1}_pointerStart(){if(!this._initial)return;const t=this._getEventTarget();this._dispatchEvent(this._createEvent("pointer-drag-start",this._initial))?(this._pointerStarted=!0,t.setPointerCapture(this._initial.pointerId)):this._initial=null}_pointerDrag(t){t.preventDefault(),this._dispatchEvent(this._createEvent("pointer-drag-move",t))}_pointerDistanceMet(t){return!this._initial||!this._distance||Math.max(Math.abs(this._initial.clientX-t.clientX),Math.abs(this._initial.clientY-t.clientY))>=this._distance}_getEventTarget(){return this._rootElement??this._handle}_dispatchEvent(t){switch(t.type){case"pointer-drag-start":this._onDragStart(t);break;case"pointer-drag-move":this._onDragMove(t);break;case"pointer-drag-stop":this._onDragStop(t)}return!t.defaultPrevented}_createEvent(t,e){return(0,u.assert)(null!==this._initial),new CustomEvent(t,{bubbles:!0,cancelable:!0,detail:{backend:this,initial:this._initial,current:e}})}}var v=o(77914),_=o(24640),f=o(16738);class w{constructor(t){this._items=[],this._backends=[],this._helper=null,this._handleDragStart=t=>{const e=this._getAllItems()[t];if(!(e instanceof HTMLElement)||null!==this._helper)return;e.style.zIndex="10";const o=this._options.source,i=e.getBoundingClientRect(),n=o.getBoundingClientRect();this._helper={movedIndexes:new Set,draggableIndex:t,leftBorder:n.left+y(o,"padding-left")+y(o,"border-left-width")-i.left-1,rightBorder:n.right-y(o,"padding-right")-y(o,"border-right-width")-i.right+1,topBorder:n.top+y(o,"padding-top")+y(o,"border-top-width")-i.top-1,bottomBorder:n.bottom-y(o,"padding-bottom")-y(o,"border-bottom-width")-i.bottom+1},this._options.start?.(t)},this._handleDragMove=t=>{if(null===this._helper)return;const{topBorder:e,bottomBorder:o,leftBorder:i,rightBorder:n,draggableIndex:r}=this._helper,s=this._getAllItems()[r],{current:a,initial:l}=t.detail,{axis:c}=this._options,h=a.clientX-l.clientX,d=a.clientY-l.clientY;if("y"===c){const t=(0,v.clamp)(d,e,o);s.style.transform=`translateY(${t}px)`}if("x"===c){const t=(0,v.clamp)(h,i,n);s.style.transform=`translateX(${t}px)`}this._updateIdleItemsStateAndPosition()},this._handleDragStop=()=>{if(null===this._helper)return;this._getAllItems()[this._helper.draggableIndex].style.zIndex="";const t=this._applyNewItemsOrder();this._cleanup(),this._initBackends(),null!==t&&this._options.stop?.(t)},this._options=t,
|
|
this._initBackends()}destroy(){this._cleanup();for(const t of this._backends)t.destroy()}updateOptions(t){(0,f.default)(this._options,t)}updateList(){this._cleanup(),this._initBackends()}_initBackends(){for(const t of this._backends)t.destroy();const t=[];this._getAllItems().forEach(((e,o)=>{t.push(new g({handle:e,onDragStart:()=>this._handleDragStart(o),onDragMove:this._handleDragMove,onDragStop:this._handleDragStop,distance:5,rootElement:window.document.documentElement}))})),this._backends=t}_cleanup(){this._getAllItems().forEach((t=>{t.style.transform=""})),this._helper=null,this._items=[]}_getAllItems(){return this._items?.length||(this._items=Array.from(this._options.source.children)),this._items}_updateIdleItemsStateAndPosition(){if(null===this._helper)return;const{axis:t}=this._options,{draggableIndex:e}=this._helper,o=this._getAllItems(),i=o[e].getBoundingClientRect(),n=i.top+i.height/2,r=i.left+i.width/2,s="x"===t?r:n,a=new Set;o.forEach(((o,n)=>{if(e===n)return;const r=o.getBoundingClientRect(),l=r.left+r.width/2,c=r.top+r.height/2,h="x"===t?l:c,d=e>n,u=(0,_.isRtl)();let p;if(p=d?u&&s>=h||!u&&s<=h:u&&s<=h||!u&&s>=h,p){a.add(n);const e=d?u?-1:1:u?1:-1;switch(t){case"x":o.style.transform=`translateX(${e*i.width}px)`;break;case"y":o.style.transform=`translateY(${e*i.height}px)`}}else o.style.transform="",a.delete(n)})),this._helper.movedIndexes=a}_applyNewItemsOrder(){if(null===this._helper)return null;const{draggableIndex:t,movedIndexes:e}=this._helper,o=this._getAllItems(),i=o[t];let n=null;const r=[];o.forEach(((o,i)=>{if(i===t)return;const n=t>i;if(!e.has(i))return void(r[i]=o);r[n?i+1:i-1]=o}));for(let t=0;t<o.length;t++){void 0===r[t]&&(n=t,r[t]=i)}return e.size&&r.forEach((t=>{this._options.source.appendChild(t)})),n}}function y(t,e){return parseInt(function(t,e){return getComputedStyle(t,null).getPropertyValue(e)}(t,e))}var b=o(50470),C=o(25388);o(413);const T="floating-toolbar-react-widgets",x=`<div class="tv-floating-toolbar i-closed i-hidden"><div class="tv-floating-toolbar__widget-wrapper"><div class="tv-floating-toolbar__drag js-drag">${C}</div><div class="tv-floating-toolbar__content js-content"></div><div class="${T}"></div></div></div>`;class S{constructor(t){this._widget=document.createElement("div"),this._isVertical=!1,this._hiddingTimeoutId=null,this._visibility=new l.WatchedValue(!1),this._windowResizeListener=this._onWindowResize.bind(this),this._reorderedDelegate=new a.Delegate,this._startSortableDelegate=new a.Delegate,this._responsiveResizeFunction=null,this._showTimeStamp=null,this._draggable=null,this._sortable=null,this._preventClickUntilAnimation=t=>{null!==this._showTimeStamp&&performance.now()-this._showTimeStamp<this.hideDuration()&&t.stopPropagation()},S._toolbars.push(this),this._options=t,this._widget=(0,b.parseHtmlElement)(x),this._content=this._widget.getElementsByClassName("js-content").item(0),this._reactWidgetsContainer=this._widget.getElementsByClassName(T).item(0),this._setZIndex(S._startZIndex+S._toolbars.length-1),
|
|
this._options.addClass&&(this._widget.className+=` ${this._options.addClass}`),this._options["data-name"]&&(this._widget.dataset.name=this._options["data-name"]),this._options.layout&&"auto"!==this._options.layout&&(this._isVertical="vertical"===this._options.layout,this._updateLayoutType()),this._widget.addEventListener("click",this._preventClickUntilAnimation,!0)}destroy(){this.hide(!0),S._toolbars.splice(S._toolbars.indexOf(this),1),this._widget.removeEventListener("click",this._preventClickUntilAnimation,!0),document.body.contains(this._widget)&&document.body.removeChild(this._widget),null!==this._draggable&&this._draggable.destroy(),null!==this._sortable&&this._sortable.destroy(),this._widget.innerHTML="",this._responsiveResizeFunction=null}setResponsiveResizeFunc(t){this._responsiveResizeFunction=t}isVisible(){return this._visibility.value()}visibility(){return this._visibility.readonly()}isVertical(){return this._isVertical}show(t){this.isVisible()||(document.body.contains(this._widget)||(this._init(),document.body.appendChild(this._widget)),this._setHiddingTimeout(null),window.addEventListener("resize",this._windowResizeListener),this.raise(),this._visibility.setValue(!0),this._showTimeStamp=performance.now(),this._widget.classList.contains("i-hidden")?(this._widget.classList.remove("i-hidden"),setTimeout((()=>{this.isVisible()&&(t?.(),this._widget.classList.remove("i-closed"))}))):(t?.(),this._widget.classList.remove("i-closed")),this._onWindowResize())}hide(t=!1){if(!this.isVisible())return;const e=this._widget.classList.contains("i-closed");if(this._widget.classList.add("i-closed"),this._visibility.setValue(!1),t||e)this._setHiddingTimeout(null),this._widget.classList.add("i-hidden");else{const t=setTimeout((()=>{this._setHiddingTimeout(null),this._widget.classList.add("i-hidden")}),this.hideDuration());this._setHiddingTimeout(t)}window.removeEventListener("resize",this._windowResizeListener)}raise(){S._toolbars.length+S._startZIndex!==this._zIndex()&&(S._toolbars.splice(S._toolbars.indexOf(this),1),S._toolbars.push(this),S._updateAllZIndexes())}hideDuration(){return.75*r.dur}addWidget(t,e={}){const o=this.widgetsCount();if(void 0===e.index&&(e.index=o),e.index<0||e.index>o)throw new Error(`Index must be in [0, ${o}]`);const i=document.createElement("div");i.className="tv-floating-toolbar__widget js-widget",i.appendChild(t);const n=e.index===o?null:this._content.childNodes.item(e.index);this._content.insertBefore(i,n),this._onWindowResize(),this._sortable?.updateList()}getReactWidgetContainer(){return this._reactWidgetsContainer}onWidgetsReordered(){return this._reorderedDelegate}onSortableStart(){return this._startSortableDelegate}removeWidget(t){const e=this._findWrapperForWidget(t);e&&(this._content.removeChild(e),this._onWindowResize(),this._sortable?.updateList())}widgetsCount(){return this._content.childNodes.length}showWidget(t){const e=this._findWrapperForWidget(t);e&&e.classList.remove("i-hidden")}hideWidget(t){const e=this._findWrapperForWidget(t);e&&e.classList.add("i-hidden")}removeWidgets(){
|
|
for(;this._content.firstChild;)this._content.removeChild(this._content.firstChild);this._onWindowResize()}onContextMenu(t){if(n.mobiletouch){(new h).load().then((e=>{const o=new e(this._widget);o.get("press").set({time:500}),o.on("press",(e=>{this._preventWidgetTouchEndEvent(),t(e.srcEvent)}))}))}else this._widget.addEventListener("contextmenu",t)}checkPosition(){const t=this._getCorrectedWidgetRect(),e={left:t.left,top:t.top};this._correctPosition(e),t.left===e.left&&t.top===e.top||(this._widget.style.left=e.left+"px",this._widget.style.top=e.top+"px")}_determineCurrentLayoutVertical(t){const e=this._isVertical?t.height:t.width;return window.innerWidth<e&&window.innerWidth<window.innerHeight}_getWidget(){return this._widget}_findWrapperForWidget(t){const e=this._content.getElementsByClassName("js-widget");for(let o=0;o<e.length;++o){const i=e.item(o);if(i.contains(t))return i}return null}_onVerticalChanged(t,e){}_correctPosition(t){const e=this._getCorrectedWidgetRect(),o=this._getSavedPosition(),i=window.innerWidth-e.right,n=window.innerHeight-e.bottom;i<0?t.left=Math.max(0,window.innerWidth-e.width):o&&o.left>t.left&&(t.left=Math.min(t.left+i,o.left)),n<0?t.top=Math.max(0,window.innerHeight-e.height):o&&o.top>t.top&&(t.top=Math.min(t.top+n,o.top))}_getCorrectedWidgetRect(){const t=this._widget.getBoundingClientRect();if(this._widget.classList.contains("i-closed")){const e=1/.925-1,o=t.width*e,i=t.height*e;return{bottom:t.bottom+i/2,height:t.height+i,left:t.left-o/2,right:t.right+o/2,top:t.top-i/2,width:t.width+o}}return t}_getSavedPosition(){let t;if("device"===this._options.positionStorageType){const e=d.TVLocalStorage.getItem(this._options.positionSettingsKey);t=null!==e?JSON.parse(e):null}else t=(0,s.getJSON)(this._options.positionSettingsKey)??null;return null!==t&&"top"in t&&"left"in t?t:null}_setHiddingTimeout(t){null!==this._hiddingTimeoutId&&clearTimeout(this._hiddingTimeoutId),this._hiddingTimeoutId=t}_preventWidgetTouchEndEvent(){const t=e=>{e.preventDefault(),this._widget.removeEventListener("touchend",t)};this._widget.addEventListener("touchend",t)}_updateLayoutType(){this._widget.classList.toggle("i-vertical",this._isVertical)}_updateAxisOption(){this._sortable&&this._sortable.updateOptions({axis:this._isVertical?"y":"x"})}_onWindowResize(){if("auto"===(this._options.layout||"auto")){const t=this._isVertical,e=this._getCorrectedWidgetRect();this._isVertical=this._determineCurrentLayoutVertical(e),this._updateLayoutType(),t!==this._isVertical&&(this._onVerticalChanged(this._isVertical,t),this._updateAxisOption())}this.checkPosition(),this._resizeResponsive()}_resizeResponsive(){if(null===this._responsiveResizeFunction)return;let t=this._options.layout||"auto";"auto"===t&&(t=this._isVertical?"vertical":"horizontal");const e="vertical"===t?this._widget.clientHeight:this._widget.clientWidth,o=("vertical"===t?window.innerHeight:window.innerWidth)-e;this._responsiveResizeFunction(e,o,t)}_setZIndex(t){this._widget.style.zIndex=String(t)}_zIndex(){return Number(this._widget.style.zIndex)}_loadPosition(){
|
|
const t=this._getSavedPosition()??this._options.defaultPosition;this._widget.style.left=Math.round(t.left)+"px",this._widget.style.top=Math.round(t.top)+"px",this._onWindowResize()}_savePosition(){const t=this._widget.getBoundingClientRect();if("device"===this._options.positionStorageType)try{d.TVLocalStorage.setItem(this._options.positionSettingsKey,JSON.stringify({left:t.left,top:t.top}))}catch{}else(0,s.setJSON)(this._options.positionSettingsKey,{left:t.left,top:t.top})}_init(){this._loadPosition(),this._draggable=new m({source:this._widget,containment:"window",handle:".js-drag",start:i.globalCloseMenu,stop:this._savePosition.bind(this)}),this._initSortable(),this._widget.addEventListener("pointerdown",this.raise.bind(this))}_initSortable(){if(!this._options.allowSortable)return;let t=-1;this._sortable=new w({source:this._content,axis:this._isVertical?"y":"x",start:e=>{(0,i.globalCloseMenu)(),t=e,this._startSortableDelegate.fire(t)},stop:e=>{this._reorderedDelegate.fire(t,e)}})}static _updateAllZIndexes(){S._toolbars.forEach(((t,e)=>{t._setZIndex(S._startZIndex+e)}))}}S._startZIndex=20,S._toolbars=[]},36699:(t,e,o)=>{"use strict";o.r(e),o.d(e,{LineToolPropertiesWidget:()=>Le});var i=o(50959),n=o(32227),r=o(11542),s=o(95804),a=o(37103),l=o(48943),c=o(87465),h=o(78861),d=o(66567),u=o(65045),p=o(97754),m=o.n(p),g=o(50151),v=o(9745),_=o(54374),f=o(43982),w=o(16396),y=o(40173),b=o(78014),C=o(22978),T=o(14631),x=o(6096),S=o(6483),L=o(66611),P=o(79951);const E=(0,y.mergeThemes)(w.DEFAULT_POPUP_MENU_ITEM_THEME,P),B=[{value:1,icon:C},{value:2,icon:T},{value:3,icon:x},{value:4,icon:S}];function D(t){const{multipleProperty:e,title:o,undoText:n,propertyApplier:r,isToolbarFixed:s,className:a,isSmallScreen:l}=t,c=(0,f.useProperty)((0,g.ensureDefined)(e)),h="mixed"===c||!c,d=function(t){const e=B.find((e=>e.value===t));if(!e)return L;return e.icon}(c);return i.createElement(_.ToolWidgetMenu,{className:a,arrow:!1,title:o,"data-name":t["data-name"],menuDataName:`${t["data-name"]}-menu`,verticalDropDirection:s?b.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:s?b.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:s?b.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:s?b.VerticalAttachEdge.Top:void 0,content:i.createElement("div",null,h?i.createElement("div",{className:P.multiWidth},i.createElement(v.Icon,{icon:L})):i.createElement("div",{className:P.buttonWrap},!l&&i.createElement(v.Icon,{icon:d}),i.createElement("div",{className:p(!l&&P.buttonLabel)},`${c}px`)))},B.map((({value:t,icon:e})=>i.createElement(w.PopupMenuItem,{key:t,theme:E,label:`${t}px`,icon:e,isActive:t===c,onClick:u,onClickArg:t}))));function u(t){t&&e&&(r.beginUndoMacro(n),e.setValue(t,void 0,{applyValue:(t,e)=>{r.setProperty(t,e,n)}}),r.endUndoMacro())}}var A=o(24377),M=o(52859),W=o(56512),k=o(16697),z=o(6914),N=o(37408);function I(t){const{property:e,icon:o,propertyApplier:n,title:r,undoText:s,isToolbarFixed:a,className:l}=t,c=(0,f.useProperty)(e),h=(0,i.useRef)(null),d=c?(0,
|
|
A.parseRgba)(c)[3]:void 0,u=""===c,p=String(T()).toLowerCase()===z.white,[w,y,C]=(0,W.useCustomColors)();return i.createElement(_.ToolWidgetMenu,{className:l,verticalDropDirection:a?b.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:a?b.HorizontalDropDirection.FromLeftToRight:void 0,horizontalAttachEdge:a?b.HorizontalAttachEdge.Left:void 0,verticalAttachEdge:a?b.VerticalAttachEdge.Top:void 0,content:i.createElement("div",{className:N.wrap},i.createElement(v.Icon,{className:N.icon,icon:o}),i.createElement("div",{className:N.colorBg},i.createElement("div",{className:m()(N.color,u&&N.multicolor,p&&N.white),style:u?void 0:{backgroundColor:c}}))),arrow:!1,title:r,ref:h,"data-name":t["data-name"],menuDataName:`${t["data-name"]}-menu`},i.createElement(k.ColorPicker,{color:T(),opacity:d,onColorChange:function(t,e){const o=c?(0,M.alphaToTransparency)((0,A.parseRgba)(c)[3]):0;x((0,M.generateColor)(String(t),o,true)),e||(0,g.ensureNotNull)(h.current).close()},onOpacityChange:function(t){x((0,M.generateColor)(c,(0,M.alphaToTransparency)(t),!0))},selectOpacity:void 0!==d,selectCustom:!0,customColors:w,onAddColor:function(t){y(t),(0,g.ensureNotNull)(h.current).close()},onRemoveCustomColor:C}));function T(){return c?(0,A.rgbToHexString)((0,A.parseRgb)(c)):null}function x(t){n.setProperty(e,t,s)}}var R=o(43337);class F extends R.Property{constructor(t,e,o){super(),this._listenersMappers=[],this._isProcess=!1,this._baseProperty=t,this._propertyApplier=e,this._undoText=o}destroy(){this._baseProperty.destroy(),super.destroy()}value(){return this._baseProperty.value()}setValue(t){this._isProcess=!0,this._baseProperty.setValue(t,void 0,{applyValue:(t,e)=>this._propertyApplier.setProperty(t,e,this._undoText)}),this._isProcess=!1,this._listenersMappers.forEach((t=>{t.method.call(t.obj,this,"")}))}subscribe(t,e){const o=o=>{this._isProcess||e.call(t,this,"")},i={obj:t,method:e,callback:o};this._listenersMappers.push(i),this._baseProperty.subscribe(t,o)}unsubscribe(t,e){const o=(0,g.ensureDefined)(this._listenersMappers.find((o=>o.obj===t&&o.method===e))?.callback);this._baseProperty.unsubscribe(t,o)}unsubscribeAll(t){this._baseProperty.unsubscribeAll(t)}}var V=o(44005),O=o(84877),H=o(35162),Z=o(73986);const K=H.FLOATING_TOOLBAR_REACT_WIDGETS_CLASS+"__button";function U(t){const{templateButton:e,cancelButton:o,propertyButtons:n,commonButtons:r,actionButtons:s,isDrawingFinished:a,isToolbarFixed:l,buttonClassName:c,activeChartWidget:h}=t,d=h.hasModel()&&h.model().selection().dataSources();return d&&d.length?i.createElement(O.MatchMediaMap,{rules:{isSmallWidth:Z.DialogBreakpoints.TabletSmall,isSmallHeight:"(max-height: 440px)"}},(({isSmallWidth:t,isSmallHeight:e})=>i.createElement(i.Fragment,null,u(),a&&i.createElement(i.Fragment,null,Boolean(s.length)&&s.map(((t,e)=>i.createElement(t.component,{...t.props,key:`${t.props.title}_${e}`,className:m()(K,c)}))),Boolean(n.length)&&n.map(((o,n)=>i.createElement(o.component,{...o.props,key:`${o.props.title}_${n}`,className:m()(K,c),isSmallScreen:t||e,isToolbarFixed:l
|
|
}))),Boolean(r.length)&&r.map(((o,n)=>{const r=t||e;return r?o.showForSmallScreen?i.createElement(o.component,{...o.props,isSmallScreen:r,key:`${o.props.title}_${n}`,className:m()(K,c)}):null:i.createElement(o.component,{...o.props,key:`${o.props.title}_${n}`,className:m()(K,c)})}))),null!==o&&i.createElement(o.component,{...o.props,key:`${o.props.title}`,className:m()(K,c),isSmallScreen:t||e,isToolbarFixed:l})))):u();function u(){return null===e?null:i.createElement(e.component,{...e.props,isToolbarFixed:l,isDrawingFinished:a,className:m()(K,c)})}}var j=o(51768),$=o(21618),G=o(34369);function q(t){const{title:e,activeChartWidget:o,className:n}=t;return i.createElement($.ToolWidgetIconButton,{className:n,icon:G,title:e,onClick:async function(){(0,j.trackEvent)("GUI","Context action on drawings","Settings");const t=o.model().selection().lineDataSources(),e=t.length;1===e?await o.showChartPropertiesForSource(t[0],void 0,{onWidget:o.onWidget()}):e>1&&await o.showChartPropertiesForSources({sources:t})},"data-name":"settings"})}var X=o(32473),Y=o(16465);function J(t){const{className:e,...o}=t;return i.createElement(X.ToolButton,{className:p(e,Y.button),tooltipPosition:"horizontal",...o})}var Q=o(65186),tt=o(91244);function et(t){const{activeChartWidget:e,className:n}=t,s=e.model().selection().lineDataSources();if(0===s.length)return null;const a=s[0].properties().frozen,l=(0,f.useProperty)(a),c=l?{tooltip:r.t(null,void 0,o(99894)),icon:Q}:{tooltip:r.t(null,void 0,o(5837)),icon:tt};return i.createElement(J,{className:n,isActive:Boolean(l),onClick:function(){(0,j.trackEvent)("GUI","Context action on drawings","Lock"),e.toggleLockSelectedObject()},"data-name":Boolean(l)?"unlock":"lock",...c})}var ot=o(43576),it=o(31932),nt=o(84696);function rt(t){const{activeChartWidget:e,className:n}=t,s=e.model().selection().lineDataSources(),a=s.find((t=>t.anchorable())),l=(0,f.useProperty)(a?.properties().anchored??new R.Property(!1)),c=(0,ot.usePromise)((async()=>{const{ActionsProvider:t}=await(0,it.actionsProviderModule)();return new t(e).actionForLineTools(s,"Chart.SelectedObject.ToggleAnchored")}),(t=>t?.destroy()),[e,l]);return c?i.createElement(J,{className:n,isActive:Boolean(l),tooltip:r.t(null,void 0,o(74089)),icon:nt.icons.get("Chart.AnchorLineTool"),onClick:()=>c.execute(),"data-name":"toggle-anchor"}):null}var st=o(93544);function at(t){const{title:e,activeChartWidget:o,className:n}=t;return i.createElement($.ToolWidgetIconButton,{className:n,icon:st,title:e,"data-name":"remove",onClick:function(){(0,j.trackEvent)("GUI","Context action on drawings","Remove"),o.removeSelectedSources()}})}var lt=o(49483),ct=o(53054);const ht=lt.CheckMobile.any();function dt(t){if(!ht)return null;const{activeChartWidget:e,className:n}=t,s=e.model().selection().lineDataSources();if(0===s.length)return null;const a=s[0];if(!a.snapTo45DegreesAvailable())return null;const l=(0,f.useProperty)((0,h.alignTo45Degrees)()),c=l?{tooltip:r.t(null,void 0,o(31145)),icon:ct}:{tooltip:r.t(null,void 0,o(83187)),icon:ct};return i.createElement(J,{className:n,
|
|
isActive:Boolean(l),onClick:function(){(0,j.trackEvent)("GUI","Context action on drawings","Align to 45 degrees");const t=(0,h.alignTo45Degrees)().value();(0,h.alignTo45Degrees)().setValue(!t),t||e.model().alignToolTo45Degrees(a,(0,g.ensureNotNull)(a.ownerSource()))},"data-name":Boolean(l)?"disable-align-to-45-degrees":"enable-align-to-45-degrees",...c})}var ut=o(98486);function pt(t){const{title:e,activeChartWidget:o,className:n}=t;return i.createElement($.ToolWidgetIconButton,{className:n,icon:ut,title:e,"data-name":"cancel-drawing",onClick:function(){(0,j.trackEvent)("GUI","Context action on drawings","Cancel Drawing"),o.resetDrawingState()}})}var mt=o(75774),gt=o(32563),vt=o(69451),_t=o(31269),ft=o(68335),wt=o(26709),yt=o(41706);async function bt(t,e){const{createVisualOrderAction:i,createChangeIntervalsVisibilitiesAction:n,createActionToggleVisibilityDataSources:s,createSyncDrawingActions:a}=await(0,it.actionsProviderModule)(),l=[i(t,e),n(t,e)],c=function(t,e){const i=[],n=ft.isMacKeyboard?" +":"",s=e.filter((t=>t.cloneable()));s.length>0&&i.push(new yt.Action({actionId:"Chart.LineTool.Clone",options:{name:"clone",icon:o(36296),shortcutHint:ft.humanReadableModifiers(wt.Modifiers.Mod)+n+" Drag",label:r.t(null,void 0,o(12537)),onExecute:()=>{t.model().cloneLineTools(s,!1),(0,j.trackEvent)("GUI","Context action on drawings","Clone")}}}));const a=e.filter((t=>t.copiable()));if(a.length>0){const e={name:"copy",label:r.t(null,void 0,o(49680)),shortcutHint:ft.humanReadableModifiers(wt.Modifiers.Mod)+n+" C",onExecute:()=>{t.chartWidgetCollection().clipboard.uiRequestCopy(a)}};i.push(new yt.Action({actionId:"Chart.Clipboard.CopyLineTools",options:e,id:"Copy"}))}return i}(t,e);if(c.length&&l.push(new yt.Separator,...c),e.some((t=>t.isSynchronizable()))){const o=a(t,e);o.length&&l.push(new yt.Separator,...o)}if(1===e.length&&e[0].additionalActions){const o=await e[0].additionalActions(t.model(),"FloatingToolbarButton");o.actions.length&&(l.push(new yt.Separator),l.push(...o.actions))}return l.push(new yt.Separator,s(t,e)),l}var Ct=o(44996);function Tt(t){return i.createElement(xt,{...t})}function xt(t){const{title:e,activeChartWidget:o,isSmallScreen:n,className:r}=t,s=o.model(),a=s.selection().lineDataSources(),l=mt.isAnyMobile?(0,ot.usePromise)((async()=>{const{ActionsProvider:t}=await(0,it.actionsProviderModule)(),e=new t(o),i=a[0],n=s.paneForSource(i);return n?e.contextMenuActionsForSources(a,n):[]}),void 0,[o,a]):null,c=mt.isAnyMobile?null:(0,ot.usePromise)((()=>bt(o,a)),void 0,[o,a]),h=(0,i.useCallback)((t=>{const e=mt.isAnyMobile?l:c;if(null===e)return;const o=St(e);_t.ContextMenuManager.showMenu(o,t,{mode:mt.isAnyMobile?"drawer":"menu","data-name":"more-menu"},{menuName:"LineToolFloatingToolbarMoreMenu"})}),[n,l,c]);return i.createElement(_.ToolWidgetMenu,{className:r,arrow:!1,onClick:h,title:e,content:i.createElement(v.Icon,{icon:Ct}),"data-name":"more",menuDataName:"more-menu",noMomentumBasedScroll:!0,closeOnEsc:!0},i.createElement(vt.ActionsTable,{parentIsOpened:!0,items:[]}))}function St(t){
|
|
if(gt.touch&&!window.matchMedia("(pointer:fine)").matches){const e=t.filter((t=>"Copy"!==t.id));if(e.length===t.length)return e;const o=[];return e.forEach((t=>{("separator"!==t.type||o.length>0&&"separator"!==o[o.length-1].type)&&o.push(t)})),o}return t}var Lt=o(18330),Pt=o(501),Et=o(23851),Bt=o(57740),Dt=o(80427);function At(t){const{property:e,propertyApplier:n,title:s,undoText:a,isToolbarFixed:l,className:c}=t,h=(0,f.useProperty)(e),d=(0,i.useMemo)((()=>[new yt.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToSolid",options:{icon:Pt,label:r.t(null,void 0,o(3554)),active:Lt.LineStyle.Solid===h,onExecute:()=>n.setProperty(e,Lt.LineStyle.Solid,a)}}),new yt.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToDashed",options:{icon:Et,label:r.t(null,void 0,o(88123)),active:Lt.LineStyle.Dashed===h,onExecute:()=>n.setProperty(e,Lt.LineStyle.Dashed,a)}}),new yt.Action({actionId:"Chart.LineTool.Toolbar.ChangeLineStyleToDotted",options:{icon:Bt,label:r.t(null,void 0,o(27390)),active:Lt.LineStyle.Dotted===h,onExecute:()=>n.setProperty(e,Lt.LineStyle.Dotted,a)}})]),[n,e,h]);return i.createElement(_.ToolWidgetMenu,{className:c,arrow:!1,content:i.createElement(v.Icon,{icon:Mt(h)}),title:s,"data-name":t["data-name"],menuDataName:`${t["data-name"]}-menu`,verticalDropDirection:l?b.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:l?b.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:l?b.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:l?b.VerticalAttachEdge.Top:void 0},i.createElement(vt.ActionsTable,{items:d}))}function Mt(t){switch(t){case Lt.LineStyle.Solid:return Pt;case Lt.LineStyle.Dashed:return Et;case Lt.LineStyle.Dotted:return Bt;case"mixed":return Dt;default:return""}}const Wt=[8,10,11,12,14,16,18,20,22,24,28,32,40];function kt(t){const{property:e,propertyApplier:o,title:n,undoText:r,isToolbarFixed:s,className:a}=t,l=(0,f.useProperty)(e),c=Wt.map((t=>new yt.Action({actionId:"Chart.LineTool.Toolbar.ChangeFontSizeProperty",options:{label:t.toString(),onExecute:()=>o.setProperty(e,t,r),active:t===l}})));return i.createElement(_.ToolWidgetMenu,{arrow:!1,content:l,className:a,title:n,verticalDropDirection:s?b.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:s?b.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:s?b.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:s?b.VerticalAttachEdge.Top:void 0,"data-name":t["data-name"],menuDataName:`${t["data-name"]}-menu`},i.createElement(vt.ActionsTable,{items:c}))}var zt=o(9753),Nt=o(26610),It=o(58570),Rt=o(11946),Ft=(o(7543),o(81634)),Vt=o(28245),Ot=o(46189);const Ht=(0,y.mergeThemes)(w.DEFAULT_POPUP_MENU_ITEM_THEME,Ot),Zt=[8,12,20,32,48,64,80,96];function Kt(t){const{multipleProperty:e,title:o,undoText:n,propertyApplier:r,isToolbarFixed:s,className:a,isSmallScreen:l}=t,c=(0,f.useProperty)((0,g.ensureDefined)(e));return i.createElement(_.ToolWidgetMenu,{className:a,arrow:!1,title:o,"data-name":t["data-name"],menuDataName:`${t["data-name"]}-menu`,
|
|
verticalDropDirection:s?b.VerticalDropDirection.FromBottomToTop:void 0,horizontalDropDirection:s?b.HorizontalDropDirection.FromRightToLeft:void 0,horizontalAttachEdge:s?b.HorizontalAttachEdge.Right:void 0,verticalAttachEdge:s?b.VerticalAttachEdge.Top:void 0,content:i.createElement("div",{className:m()(Ot.buttonWrap,l&&Ot.small)},i.createElement(v.Icon,{icon:Vt}),!l&&"mixed"!==c&&i.createElement("div",{className:Ot.buttonLabel},`${c}px`))},Zt.map((t=>i.createElement(w.PopupMenuItem,{key:t,theme:Ht,label:`${t}px`,isActive:t===c,onClick:h,onClickArg:t}))));function h(t){t&&e&&(r.beginUndoMacro(n),e.setValue(t,void 0,{applyValue:(t,e)=>{r.setProperty(t,e,n)}}),r.endUndoMacro())}}function Ut(t){const{activeChartWidget:e,className:o,actionId:n}=t,r=e.model().selection().lineDataSources(),s=(0,ot.usePromise)((async()=>{const{ActionsProvider:t}=await(0,it.actionsProviderModule)();return new t(e).actionForLineTools(e.model().selection().lineDataSources(),n)}),(t=>t?.destroy()),[e,r]);if(!s)return null;const{label:a,icon:l}=s.options();return i.createElement(J,{className:o,tooltip:a,icon:l,onClick:()=>s.execute(),"data-name":`toggle-insert-cells-button-${n}`})}var jt=o(5880),$t=o.n(jt),Gt=o(21065),qt=o.n(Gt),Xt=o(48984),Yt=o.n(Xt);const Jt=new s.TranslatedString("change line tool(s) font size",r.t(null,void 0,o(37453))),Qt=new s.TranslatedString("change line tool(s) line style",r.t(null,void 0,o(13423))),te=new s.TranslatedString("change line tool(s) line width",r.t(null,void 0,o(81303))),ee=new s.TranslatedString("change line tool(s) color",r.t(null,void 0,o(78655))),oe=new s.TranslatedString("change line tool(s) background color",r.t(null,void 0,o(50522))),ie=new s.TranslatedString("change line tool(s) text color",r.t(null,void 0,o(96142))),ne=new s.TranslatedString("line tool(s) line style",r.t(null,{context:"line tool property name"},o(64974))),re=r.t(null,void 0,o(32514)),se=r.t(null,void 0,o(99919)),ae=r.t(null,void 0,o(67410)),le=r.t(null,void 0,o(4543)),ce=r.t(null,void 0,o(37117)),he=r.t(null,void 0,o(92516)),de=r.t(null,void 0,o(2573)),ue=r.t(null,void 0,o(53002)),pe=r.t(null,void 0,o(75056)),me=r.t(null,void 0,o(11989)),ge=r.t(null,void 0,o(14097)),ve=r.t(null,void 0,o(81956)),_e=r.t(null,void 0,o(47370)),fe=r.t(null,void 0,o(77753)),we=r.t(null,void 0,o(69715)),ye=r.t(null,void 0,o(28736)),be=r.t(null,void 0,o(65086)),Ce=r.t(null,void 0,o(46193)),Te=r.t(null,void 0,o(7977)),xe=r.t(null,void 0,o(8111)),Se=lt.CheckMobile.any()||lt.CheckMobile.isIPad();class Le{constructor(t){this._currentTool=null,this._updateVisibilityTimeout=null,this._lineWidthsProperty=null,this._lineColorsProperty=null,this._textColorsProperty=null,this._backgroundsProperty=null,this._highlighterWidthsProperty=null,this._floatingContainer=null,this._isDrawingFinished=!0,this._floatingToolbarRendered=!1,this._toolbarVisible=!1,this._propertiesVisible=!1,this._templatesButton=null,this._cancelButton=null,this._propertyButtons=[],this._commonButtons=[],this._actionCommonButtons=[],this._toolExceptionCases=null,this._chartWidgetCollection=t,
|
|
this._floatingToolbar=new H.FloatingToolbar({defaultPosition:{top:zt.HEADER_TOOLBAR_HEIGHT_EXPANDED+15,left:window.innerWidth/2},positionSettingsKey:"properties_toolbar.position",positionStorageType:"device",layout:"horizontal","data-name":"drawing-toolbar"}),this._floatingContainer=this._floatingToolbar.getReactWidgetContainer(),this._selectedLineTool=(0,l.combine)(((...t)=>{this._onToolChanged(h.tool.value())}),h.tool.weakReference(),h.iconTool.weakReference(),h.emojiTool.weakReference()),this._selectedLineDataSourcesSourcesSpawn=(0,l.combine)((t=>t.filter(Nt.isLineTool)),this._chartWidgetCollection.selectedSources.weakReference()),this._isToolMovingOrEditingNow=(0,l.combine)(((t,e)=>{this._handleSourceEdit(t||e)}),h.isToolMovingNow.weakReference(),h.isToolEditingNow.weakReference()),this._selectedLineDataSourcesSourcesSpawn.subscribe(this._onSourceChanged.bind(this)),this._chartWidgetCollection.onAboutToBeDestroyed.subscribe(this,this.destroy,!0)}destroy(){this._selectedLineTool.destroy(),this._isToolMovingOrEditingNow.destroy(),this._selectedLineDataSourcesSourcesSpawn.destroy()}async refresh(){await this._onSourceChanged()}hide(){this._propertiesVisible=!1,this._toolbarVisible=!1,this._updateVisibility()}_createWidthsButton(t,e){if(this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineWidthsProperty=this._createProperty(t,e,"linesWidths",te),!this._lineWidthsProperty)return!0;let o=ue;if(e){1!==this._selectedLineDataSources().filter((t=>t.properties().linesWidths)).length&&(o=pe)}return this._addPropertyButton({component:D,props:{title:o,property:this._lineWidthsProperty,multipleProperty:this._lineWidthsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"line-tool-width",undoText:te}}),!0}_createColorsButton(t,e){return this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._lineColorsProperty=this._createProperty(t,e,"linesColors",ee),!this._lineColorsProperty||(this._addPropertyButton({component:I,props:{icon:$t(),title:me,property:this._lineColorsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"line-tool-color",undoText:ee}}),!0)}_createBackgroundsButton(t,e){return this._backgroundsProperty&&(this._backgroundsProperty.destroy(),this._backgroundsProperty=null),this._backgroundsProperty=this._createProperty(t,e,"backgroundsColors",oe),!this._backgroundsProperty||(this._addPropertyButton({component:I,props:{icon:qt(),title:ge,property:this._backgroundsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"background-color",undoText:oe}}),!0)}_createTextColorsButton(t,e){return this._textColorsProperty&&(this._textColorsProperty.destroy(),this._textColorsProperty=null),this._textColorsProperty=this._createProperty(t,e,"textsColors",ie),!this._textColorsProperty||(this._addPropertyButton({component:I,props:{icon:Yt(),title:ve,property:this._textColorsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"text-color",undoText:ie}}),!0)}_createLineStyleButton(t,e){
|
|
const o=this._selectedLineDataSources();if(!o.length)return!1;let i,n=this._propertyApplierImpl();if(1===o.length){if(i=o[0].properties().linesStyles||t,!i)return!1}else{const t=o.map((t=>t.properties().linestyle||t.properties().lineStyle||t.properties().linesStyles)).filter(c.notUndefined);if(!t.length)return!1;i=new d.CollectiblePropertyUndoWrapper(new u.LineToolCollectedProperty(t),ne,this._propertyApplierImpl()),n={...n,setProperty:(t,e)=>t.setValue(e)}}return this._addPropertyButton({component:At,props:{property:i,title:he,propertyApplier:n,"data-name":"style",undoText:Qt}}),!0}_createHighlighterWidthsButton(t,e){if(this._highlighterWidthsProperty&&(this._highlighterWidthsProperty.destroy(),this._highlighterWidthsProperty=null),this._highlighterWidthsProperty=this._createProperty(t,e,"widths",te)||null,!this._highlighterWidthsProperty)return!0;const o=e&&1!==this._selectedLineDataSources().filter((t=>t.properties().widths)).length?pe:ue;return this._addPropertyButton({component:Kt,props:{title:o,multipleProperty:this._highlighterWidthsProperty,propertyApplier:this._propertyApplierImpl(),"data-name":"highlighter-width",undoText:te}}),!0}_createFontSizeButton(t,e){const[o]=this._selectedLineDataSources();if(!o)return!1;const i={component:kt,props:{property:o.properties().fontsize||t,title:de,propertyApplier:this._propertyApplierImpl(),"data-name":"font-size",undoText:Jt}};return this._addPropertyButton(i),!0}async _onToolChanged(t,e){if(this._currentTool=t,await(0,It.ensureLineToolLoaded)(t),this._currentTool!==t)return;if(this._isDrawingToolExcludingCustomUrlEventTool(t))return this._isDrawingFinished=!1,this._createCancelButton(),void this._updateVisibility();const o=this._selectedLineDataSources();o.length?(o.length>1&&(this._isDrawingFinished=!0),await this._onSourceChanged(o)):this.hide()}async _onSourceChanged(t=this._selectedLineDataSources()){try{if(!t.length)return this._propertiesVisible=!1,this._toolbarVisible=!1,void this._clearProperties();const e=t.reduce(((t,e)=>t.add(e.toolname)),new Set);if(await Promise.all([...e].map((async t=>(0,It.ensureLineToolLoaded)(t)))),t!==this._selectedLineDataSources())return;if(this._createActionCommonButtons(),this._createCommonButtons(),this._createCancelButton(),1===e.size?this._showTemplatesOf({sources:t}):this._templatesButton&&this._clearTemplatesButton(),1===t.length){const[e]=t;e.isAvailableInFloatingWidget()&&this._activeChartWidget().model().model().dataSourceForId(e.id())&&(!e.userEditEnabled()||!(0,Rt.isLineDrawnWithPressedButton)(e.toolname)&&this._activeChartWidget().model().lineBeingCreated()||(this._isDrawingFinished=!0),this._showPropertiesOf(e.toolname,e.properties(),!0),this._toolbarVisible=!0)}else this._clearProperties(),this._createWidthsButton(void 0,!0),this._createHighlighterWidthsButton(void 0,!0),this._createLineStyleButton(void 0,!0),this._createColorsButton(void 0,!0),this._createBackgroundsButton(void 0,!0),this._createTextColorsButton(void 0,!0),this._propertiesVisible=!0}finally{this._updateVisibility()}}_propertyApplierImpl(){
|
|
return this._propertyApplier||(this._propertyApplier=new Ft.PropertyApplierWithoutSavingChart((()=>this._activeChartWidget().model()))),this._propertyApplier}_clearProperties(){this._clearPropertyButtons(),this._lineWidthsProperty&&(this._lineWidthsProperty.destroy(),this._lineWidthsProperty=null),this._lineColorsProperty&&(this._lineColorsProperty.destroy(),this._lineColorsProperty=null),this._textColorsProperty&&(this._textColorsProperty.destroy(),this._textColorsProperty=null),this._backgroundsProperty&&(this._backgroundsProperty.destroy(),this._backgroundsProperty=null),this._highlighterWidthsProperty&&(this._highlighterWidthsProperty.destroy(),this._highlighterWidthsProperty=null)}_addPropertyButton(t){this._propertyButtons.push(t),this._renderFloatingToolbar()}_addCommonButton(t){this._commonButtons.push(t),this._renderFloatingToolbar()}_addActionCommonButton(t){this._actionCommonButtons.push(t),this._renderFloatingToolbar()}_addCancelButton(t){this._cancelButton=t,this._renderFloatingToolbar()}_addTemplatesButton(t){this._templatesButton=t}_renderFloatingToolbar(){null!==this._floatingContainer&&this._activeChartWidget()&&this._activeChartWidget().hasModel()&&(n.render(i.createElement(U,{templateButton:this._templatesButton,cancelButton:this._cancelButton,propertyButtons:this._propertyButtons,commonButtons:this._commonButtons,actionButtons:this._actionCommonButtons,isDrawingFinished:this._isDrawingFinished,activeChartWidget:this._activeChartWidget()}),this._floatingContainer),this._floatingToolbarRendered=!0)}_unmountFloatingToolbar(){null!==this._floatingContainer&&(n.unmountComponentAtNode(this._floatingContainer),this._floatingToolbarRendered=!1)}_clearTemplatesButton(){this._templatesButton=null}_clearPropertyButtons(){this._propertyButtons=[]}_clearCommonButtons(){this._commonButtons=[]}_clearActionCommonButtons(){this._actionCommonButtons=[]}_clearCancelButtons(){this._cancelButton=null}_isToolbarRendered(){return this._floatingToolbarRendered}_createSettingsButton(){const t={component:q,props:{title:re,activeChartWidget:this._activeChartWidget()}};this._addCommonButton(t)}_createLockButton(){const t={component:et,props:{title:"Lock",activeChartWidget:this._activeChartWidget()}};this._addCommonButton(t)}_createAnchorButton(){const t={component:rt,props:{title:r.t(null,void 0,o(24185)),activeChartWidget:this._activeChartWidget()}};this._addCommonButton(t)}_createAlignTo45DegreesButton(){const t={component:dt,props:{title:se,activeChartWidget:this._activeChartWidget()},showForSmallScreen:!0};this._addCommonButton(t)}_createRemoveButton(){if(Se&&null!==this._currentTool&&(0,Rt.isLineDrawnWithPressedButton)(this._currentTool))return;const t={component:at,props:{title:ae,activeChartWidget:this._activeChartWidget()},showForSmallScreen:!0};this._addCommonButton(t)}_createCancelButton(){if(null!==this._cancelButton&&this._clearCancelButtons(),!Se||null===this._currentTool)return;if(!(0,Rt.isLineDrawnWithPressedButton)(this._currentTool))return;const t={component:pt,props:{title:le,
|
|
activeChartWidget:this._activeChartWidget()},showForSmallScreen:!0};this._addCancelButton(t)}_createDotsButton(){this._addCommonButton({component:Tt,props:{title:ce,activeChartWidget:this._activeChartWidget()},showForSmallScreen:!0})}_createAlertButton(){}_createSourceActions(){this._createLockButton(),this._createAnchorButton()}_createActionCommonButtons(){this._actionCommonButtons.length&&this._clearActionCommonButtons();const t={component:Ut,props:{actionId:"Chart.SelectedObject.InsertColumnTable",activeChartWidget:this._activeChartWidget()}};this._addActionCommonButton(t);const e={component:Ut,props:{actionId:"Chart.SelectedObject.InsertRowTable",activeChartWidget:this._activeChartWidget()}};this._addActionCommonButton(e)}_createCommonButtons(){this._commonButtons.length&&this._clearCommonButtons(),a.enabled("property_pages")&&this._createSettingsButton(),this._createSourceActions(),this._createAlignTo45DegreesButton(),this._createRemoveButton(),this._createDotsButton()}_prepareProperties(t){const e=this._selectedLineDataSources().filter((e=>e.properties()[t]));if(!(e.filter((e=>e.properties()[t].visible())).length<1))return e.map((e=>e.properties()[t])).filter(c.notNull)}_createProperty(t,e,o,i){if(e){const t=this._prepareProperties(o);return t?this._isWidthProperty(t[0])?new F(new u.MultipleLineWidthsProperty(t),this._propertyApplierImpl(),i):new V.CollectibleColorPropertyUndoWrapper(new u.MultipleLineColorsProperty(t),this._propertyApplierImpl(),i):null}return t&&t.visible()?this._isWidthProperty(t)?new u.MultipleLineWidthsProperty([t]):new V.CollectibleColorPropertyDirectWrapper(new u.MultipleLineColorsProperty([t])):null}_shouldShowBackgroundProperty(t){return!t||!t.fillBackground||!!t.fillBackground.value()}_isDrawingToolExcludingCustomUrlEventTool(t){return Boolean(t?.toLowerCase().includes("linetool"))&&"LineToolTweet"!==t&&"LineToolIdea"!==t&&"LineToolImage"!==t}_updateVisibility(){this._isDrawingFinished&&(this._toolbarVisible||this._propertiesVisible)?this._show():this._hide()}_show(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{this._renderFloatingToolbar(),this._floatingToolbar.show(),this._floatingToolbar.checkPosition()}),0)}_hide(){this._updateVisibilityTimeout&&clearTimeout(this._updateVisibilityTimeout),this._updateVisibilityTimeout=setTimeout((()=>{(0,Nt.unsetNewToolProperties)(!0),this._floatingToolbar.hide(!0),this._isToolbarRendered()&&this._unmountFloatingToolbar(),this._clearProperties(),this._clearCommonButtons(),this._clearActionCommonButtons(),this._clearCancelButtons(),this._clearTemplatesButton(),this._templatesList=void 0}),0),delete this._propertyApplier}_activeChartWidget(){return this._chartWidgetCollection.activeChartWidget.value()}_selectedLineDataSources(){return this._selectedLineDataSourcesSourcesSpawn.value()}_showTemplatesOf(t){}_showPropertiesOf(t,e,o){this._toolExceptionCases||(this._toolExceptionCases=this._createToolExceptionCases())
|
|
;const i=this._toolExceptionCases[t]||this._getPossibleProperty(e);if(this._clearProperties(),this._propertiesVisible=!1,i.length)for(let t=0;t<i.length;t++){const n=i[t];let r=e;const s=n.name.split(".");for(let t=0;t<s.length;++t)r=r&&r.child(s[t]);const a=n.showIf;if(void 0===a||a(e)){if("factory"in n&&n.factory.call(this,r,o))continue;if(!r)continue;const t=n;this._propertiesVisible=!0;const e={component:I,props:{icon:t.icon,title:t.title,"data-name":t["data-name"],property:r,propertyApplier:this._propertyApplierImpl(),undoText:t.undoText}};this._addPropertyButton(e)}}}_getPossibleProperty(t){const e=[],o=this._defaultToolProperties();for(let i=0;i<o.length;i++){const n=o[i];n.name in t&&e.push(n)}return e}_defaultToolProperties(){return[this._defaultLinesColorProperty(),{name:"backgroundsColors",showIf:this._shouldShowBackgroundProperty,factory:this._createBackgroundsButton},{name:"textsColors",factory:this._createTextColorsButton},{name:"linesWidths",factory:this._createWidthsButton},{name:"linesStyles",factory:this._createLineStyleButton}]}_defaultLinesColorProperty(){return{name:"linesColors",factory:this._createColorsButton}}_createToolExceptionCases(){return{LineToolBrush:this._brushPropertiesExceptionCase(),LineToolBezierQuadro:this._bezierPropertiesExceptionCases(),LineToolBezierCubic:this._bezierPropertiesExceptionCases(),LineToolText:this._textPropertiesExceptionCases(),LineToolTextAbsolute:this._textPropertiesExceptionCases(),LineToolBalloon:this._textPropertiesExceptionCases(),LineToolComment:this._textPropertiesExceptionCases(),LineToolCallout:this._textPropertiesExceptionCases(),LineToolPriceLabel:this._textPropertiesExceptionCases(),LineToolDateRange:this._rangeExceptionCases(),LineToolPriceRange:this._rangeExceptionCases(),LineToolDateAndPriceRange:this._rangeExceptionCases(),LineToolNote:this._notePropertiesExceptionCases(),LineToolNoteAbsolute:this._notePropertiesExceptionCases(),LineToolRiskRewardLong:this._riskPropertiesExceptionCases(),LineToolRiskRewardShort:this._riskPropertiesExceptionCases(),LineToolPath:this._pathExceptionCases(),LineToolRegressionTrend:this._regressionToolExceptionCases(),LineToolBarsPattern:[{name:"color",title:_e,icon:qt(),"data-name":"background-color",undoText:ee}],LineToolProjection:[{name:"color1",title:Te,icon:qt(),"data-name":"background-color",undoText:oe},{name:"color2",title:xe,icon:qt(),"data-name":"background-color",undoText:oe},{name:"linesWidths",factory:this._createWidthsButton}],LineToolSignpost:[{name:"linesColors",factory:this._createBackgroundsButton,showIf:t=>t&&t.childs().showImage.value()},{name:"fontSize",factory:this._createFontSizeButton}],LineToolHighlighter:this._highlighterPropertiesExceptionCase()}}_brushPropertiesExceptionCase(){return[this._defaultLinesColorProperty(),{name:"backgroundsColors",factory:this._createBackgroundsButton},{name:"linesWidths",factory:this._createWidthsButton}]}_bezierPropertiesExceptionCases(){return[this._defaultLinesColorProperty(),{name:"backgroundsColors",factory:this._createBackgroundsButton,
|
|
showIf:this._shouldShowBackgroundProperty},{name:"linesWidths",factory:this._createWidthsButton},{name:"linesStyles",factory:this._createLineStyleButton}]}_textPropertiesExceptionCases(){return[{name:"color",title:fe,icon:Yt(),"data-name":"text-color",undoText:ie},{name:"backgroundColor",title:we,icon:qt(),"data-name":"background-color",undoText:oe,showIf:this._shouldShowBackgroundProperty},{name:"fontsize",factory:this._createFontSizeButton}]}_rangeExceptionCases(){return[{name:"linecolor",icon:$t(),title:_e,"data-name":"line-tool-color",undoText:ee},{name:"backgroundColor",icon:qt(),title:we,"data-name":"background-color",undoText:oe,showIf:this._shouldShowBackgroundProperty},{name:"textsColors",factory:this._createTextColorsButton},{name:"linesWidths",factory:this._createWidthsButton}]}_notePropertiesExceptionCases(){return[{name:"markerColor",title:Ce,icon:$t(),"data-name":"line-tool-color",undoText:ee},{name:"textColor",title:fe,icon:Yt(),"data-name":"text-color",undoText:ie},{name:"fontSize",factory:this._createFontSizeButton}]}_riskPropertiesExceptionCases(){return[{name:"textcolor",title:fe,icon:Yt(),"data-name":"text-color",undoText:ie},{name:"profitBackground",title:ye,icon:qt(),"data-name":"background-color",undoText:oe},{name:"stopBackground",title:be,icon:qt(),"data-name":"background-color",undoText:oe}]}_pathExceptionCases(){return[this._defaultLinesColorProperty(),{name:"linesWidths",factory:this._createWidthsButton},{name:"lineStyle",factory:this._createLineStyleButton}]}_regressionToolExceptionCases(){return[{name:"linesWidths",factory:this._createWidthsButton}]}_highlighterPropertiesExceptionCase(){return[this._defaultLinesColorProperty(),{name:"widths",factory:this._createHighlighterWidthsButton}]}_isWidthProperty(t){return t instanceof u.LineToolWidthsProperty}_handleSourceEdit(t){h.isDirectionalMovementActive.value()||(t?this._floatingToolbar.hide(!0):this._floatingToolbarRendered&&this._floatingToolbar.show())}}},18117:(t,e,o)=>{"use strict";o.d(e,{lineToolsInfo:()=>w});var i=o(50151),n=o(11542),r=o(61814),s=(o(40167),o(44341)),a=o(70173);const l={SyncDrawing:n.t(null,void 0,o(59377)),arrow:n.t(null,void 0,o(11858)),cursor:n.t(null,void 0,o(6969)),demonstration:n.t(null,void 0,o(14939)),dot:n.t(null,void 0,o(57157)),performance:n.t(null,void 0,o(35553)),drawginmode:n.t(null,void 0,o(99901)),eraser:n.t(null,void 0,o(8727)),group:n.t(null,void 0,o(3154)),hideAllDrawings:n.t(null,void 0,o(52563)),lockAllDrawings:n.t(null,void 0,o(79451)),magnet:n.t(null,void 0,o(81396)),measure:n.t(null,void 0,o(91563)),removeAllDrawingTools:n.t(null,void 0,o(57118)),showObjectsTree:n.t(null,void 0,o(85786)),zoom:n.t(null,void 0,o(55774)),"zoom-out":n.t(null,void 0,o(37310))};var c=o(56876),h=o(68335),d=o(81360);const u=(0,h.humanReadableModifiers)(h.Modifiers.Shift,!1).trim(),p=(0,h.humanReadableModifiers)(h.Modifiers.Alt,!1).trim(),m=(0,h.humanReadableModifiers)(h.Modifiers.Mod,!1).trim(),g={keys:[u],text:n.t(null,void 0,o(23369))},v={keys:[u],text:n.t(null,void 0,o(13798))},_={keys:[u],
|
|
text:n.t(null,void 0,o(10539))},f={LineTool5PointsPattern:{},LineToolABCD:{},LineToolArc:{},LineToolArrow:{},LineToolArrowMarkDown:{},LineToolArrowMarkLeft:{},LineToolArrowMarkRight:{},LineToolArrowMarkUp:{},LineToolComment:{},LineToolBarsPattern:{},LineToolBezierCubic:{},LineToolBezierQuadro:{},LineToolBrush:{},LineToolCallout:{},LineToolCircleLines:{},LineToolCypherPattern:{},LineToolDateAndPriceRange:{},LineToolDateRange:{},LineToolDisjointAngle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolElliottCorrection:{},LineToolElliottDoubleCombo:{},LineToolElliottImpulse:{},LineToolElliottTriangle:{},LineToolElliottTripleCombo:{},LineToolEllipse:{hotKey:(0,r.hotKeySerialize)(v)},LineToolExtended:{},LineToolFibChannel:{},LineToolFibCircles:{hotKey:(0,r.hotKeySerialize)(v)},LineToolFibRetracement:{},LineToolFibSpeedResistanceArcs:{},LineToolFibSpeedResistanceFan:{hotKey:(0,r.hotKeySerialize)(_)},LineToolFibSpiral:{},LineToolFibTimeZone:{},LineToolFibWedge:{},LineToolFlagMark:{},LineToolFlatBottom:{hotKey:(0,r.hotKeySerialize)(g)},LineToolAnchoredVWAP:{},LineToolGannComplex:{},LineToolGannFixed:{},LineToolGannFan:{},LineToolGannSquare:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(83042))})},LineToolHeadAndShoulders:{},LineToolHorzLine:{hotKey:(0,r.hotKeySerialize)({keys:[p,"H"],text:"{0} + {1}"})},LineToolHorzRay:{},LineToolIcon:{},LineToolImage:{},LineToolEmoji:{},LineToolSticker:{},LineToolInsidePitchfork:{},LineToolNote:{},LineToolSignpost:{},LineToolParallelChannel:{hotKey:(0,r.hotKeySerialize)(g)},LineToolPitchfan:{},LineToolPitchfork:{},LineToolPolyline:{},LineToolPath:{},LineToolPrediction:{},LineToolPriceLabel:{},LineToolPriceNote:{hotKey:(0,r.hotKeySerialize)(g)},LineToolTextNote:{},LineToolArrowMarker:{},LineToolPriceRange:{},LineToolProjection:{},LineToolRay:{},LineToolRectangle:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(10539))})},LineToolCircle:{},LineToolRegressionTrend:{},LineToolRiskRewardLong:{},LineToolRiskRewardShort:{},LineToolFixedRangeVolumeProfile:{},LineToolRotatedRectangle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolSchiffPitchfork:{},LineToolSchiffPitchfork2:{},LineToolSineLine:{},LineToolText:{},LineToolTextAbsolute:{},LineToolThreeDrivers:{},LineToolTimeCycles:{},LineToolTrendAngle:{hotKey:(0,r.hotKeySerialize)(g)},LineToolTrendBasedFibExtension:{},LineToolTrendBasedFibTime:{},LineToolTrendLine:{hotKey:(0,r.hotKeySerialize)(g)},LineToolInfoLine:{},LineToolTriangle:{},LineToolTrianglePattern:{},LineToolVertLine:{hotKey:(0,r.hotKeySerialize)({keys:[p,"V"],text:"{0} + {1}"})},LineToolCrossLine:{},LineToolHighlighter:{},LineToolGhostFeed:{},LineToolTable:{},SyncDrawing:{iconActive:a.drawingToolsIcons.SyncDrawingActive},arrow:{},cursor:{},dot:{},demonstration:{hotKey:(0,r.hotKeySerialize)({keys:[p],text:n.t(null,void 0,o(42633))})},drawginmode:{iconActive:a.drawingToolsIcons.drawginmodeActive},eraser:{},group:{},hideAllDrawings:{iconActive:a.drawingToolsIcons.hideAllDrawingsActive,hotKey:(0,r.hotKeySerialize)({keys:[m,p,"H"],text:"{0} + {1} + {2}"})},lockAllDrawings:{
|
|
iconActive:a.drawingToolsIcons.lockAllDrawingsActive},magnet:{hotKey:(0,r.hotKeySerialize)({keys:[m],text:"{0}"})},measure:{hotKey:(0,r.hotKeySerialize)({keys:[u],text:n.t(null,void 0,o(92949))})},removeAllDrawingTools:{},showObjectsTree:{},zoom:{},"zoom-out":{}};const w={};Object.entries(f).map((([t,e])=>{const o=s.lineToolsIcons[t]??a.drawingToolsIcons[t];(0,i.assert)(!!o,`Icon is not defined for drawing "${t}"`);const n=c.lineToolsLocalizedNames[t]??l[t];(0,i.assert)(!!n,`Localized name is not defined for drawing "${t}"`);return{...e,name:t,icon:o,localizedName:n,selectHotkey:d.lineToolsSelectHotkeys[t]}})).forEach((t=>{w[t.name]=t}))},44005:(t,e,o)=>{"use strict";o.d(e,{CollectibleColorPropertyDirectWrapper:()=>a,CollectibleColorPropertyUndoWrapper:()=>s});var i=o(50151),n=o(43337);class r extends n.Property{constructor(t){super(),this._listenersMappers=[],this._isProcess=!1,this._baseProperty=t}destroy(){this._baseProperty.destroy(),super.destroy()}value(){const t=this._baseProperty.value();return"mixed"===t?"":t}visible(){return this._baseProperty.visible()}setValue(t){this._isProcess=!0,this._baseProperty.setValue(""===t?"mixed":t,void 0,{applyValue:this._applyValue.bind(this)}),this._isProcess=!1,this._listenersMappers.forEach((t=>{t.method.call(t.obj,this,"")}))}subscribe(t,e){const o=o=>{this._isProcess||e.call(t,this,"")},i={obj:t,method:e,callback:o};this._listenersMappers.push(i),this._baseProperty.subscribe(t,o)}unsubscribe(t,e){const o=(0,i.ensureDefined)(this._listenersMappers.find((o=>o.obj===t&&o.method===e))?.callback);this._baseProperty.unsubscribe(t,o)}unsubscribeAll(t){this._baseProperty.unsubscribeAll(t)}}class s extends r{constructor(t,e,o){super(t),this._propertyApplier=e,this._undoText=o}_applyValue(t,e){this._propertyApplier.setProperty(t,e,this._undoText)}}class a extends r{_applyValue(t,e){t.setValue(e)}}},66567:(t,e,o)=>{"use strict";o.d(e,{CollectiblePropertyUndoWrapper:()=>l});var i=o(50151),n=o(11542),r=o(95804),s=o(43337);const a=new r.TranslatedString("change {propertyName} property",n.t(null,void 0,o(25167)));class l extends s.Property{constructor(t,e,o){super(),this._isProcess=!1,this._listenersMappers=[],this._valueApplier={applyValue:(t,e)=>{this._propertyApplier.setProperty(t,e,a)}},this._baseProperty=t,this._propertyApplier=o,this._propertyName=e}destroy(){this._baseProperty.destroy(),super.destroy()}value(){return this._baseProperty.value()}setValue(t,e){this._propertyApplier.beginUndoMacro(a.format({propertyName:this._propertyName})),this._isProcess=!0,this._baseProperty.setValue(t,void 0,this._valueApplier),this._isProcess=!1,this._propertyApplier.endUndoMacro(),this._listenersMappers.forEach((t=>{t.method.call(t.obj,this,"")}))}subscribe(t,e){const o=()=>{this._isProcess||e.call(t,this,"")};this._listenersMappers.push({obj:t,method:e,callback:o}),this._baseProperty.subscribe(t,o)}unsubscribe(t,e){const o=(0,i.ensureDefined)(this._listenersMappers.find((o=>o.obj===t&&o.method===e))?.callback);this._baseProperty.unsubscribe(t,o)}unsubscribeAll(t){
|
|
this._baseProperty.unsubscribeAll(t)}}},6519:(t,e,o)=>{"use strict";o.d(e,{LinetoolsFavoritesStore:()=>c});var i=o(48096),n=o(87465),r=o(1765);const s=["LineToolBalloon","LineToolNoteAbsolute",null,null].filter(n.isExistent),a=!1;var l,c;!function(t){function e(){t.favorites=[];let e=!1;const i=Boolean(void 0===(0,r.getValue)("chart.favoriteDrawings")),l=(0,r.getJSON)("chart.favoriteDrawings",[]);if(0===l.length&&i&&"undefined"!=typeof window){const t=JSON.parse(window.urlParams?.favorites??"{}").drawingTools;t&&Array.isArray(t)&&l.push(...t)}l.forEach(((i,n)=>{const r=i.tool||i;o(r)?s.includes(r)?e=!0:t.favorites.push(r):a&&a.includes(r)&&t.hiddenToolsPositions.set(r,n)})),e&&n(),t.favoritesSynced.fire()}function o(t){return"string"==typeof t&&""!==t&&!(a&&a.includes(t))}function n(e){const o=t.favorites.slice();t.hiddenToolsPositions.forEach(((t,e)=>{o.splice(t,0,e)})),(0,r.setJSON)("chart.favoriteDrawings",o,e)}t.favorites=[],t.favoritesSynced=new i.Delegate,t.hiddenToolsPositions=new Map,t.favoriteIndex=function(e){return t.favorites.indexOf(e)},t.isValidLineToolName=o,t.saveFavorites=n,e(),r.onSync.subscribe(null,e)}(l||(l={})),function(t){function e(t){return l.isValidLineToolName(t)}function o(){return l.favorites.length}function n(t){return-1!==l.favoriteIndex(t)}t.favoriteAdded=new i.Delegate,t.favoriteRemoved=new i.Delegate,t.favoriteMoved=new i.Delegate,t.favoritesSynced=l.favoritesSynced,t.favorites=function(){return l.favorites.slice()},t.isValidLineToolName=e,t.favoritesCount=o,t.favorite=function(t){return t<0||t>=o()?"":l.favorites[t]},t.addFavorite=function(o,i){return!(n(o)||!e(o)||"performance"===o)&&(l.favorites.push(o),l.saveFavorites(i),t.favoriteAdded.fire(o),!0)},t.removeFavorite=function(e,o){const i=l.favoriteIndex(e);if(-1===i)return!1;l.favorites.splice(i,1);const n=l.hiddenToolsPositions;return n.forEach(((t,e)=>{t>i&&n.set(e,t-1)})),l.saveFavorites(o),t.favoriteRemoved.fire(e),!0},t.isFavorite=n,t.moveFavorite=function(i,n,r){if(n<0||n>=o()||!e(i))return!1;const s=l.favoriteIndex(i);if(-1===s||n===s)return!1;const a=l.hiddenToolsPositions;return a.forEach(((t,e)=>{s<t&&n>t?t--:n<t&&s>t&&t++,a.set(e,t)})),l.favorites.splice(s,1),l.favorites.splice(n,0,i),l.saveFavorites(r),t.favoriteMoved.fire(i,s,n),!0}}(c||(c={}))},81634:(t,e,o)=>{"use strict";o.d(e,{PropertyApplierWithoutSavingChart:()=>n});var i=o(13896);class n{constructor(t){this._undoModelSupplier=t}setProperty(t,e,o){this._undoModelSupplier().setProperty(t,e,o,i.lineToolsDoNotAffectChartInvalidation)}beginUndoMacro(t){return this._undoModelSupplier().beginUndoMacro(t)}endUndoMacro(){this._undoModelSupplier().endUndoMacro()}setWatchedValue(t,e,o){this._undoModelSupplier().undoHistory().setWatchedValue(t,e,o,i.lineToolsDoNotAffectChartInvalidation)}}},5880:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 16 16" width="16" height="16"><path fill="currentColor" d="M10.62.72a2.47 2.47 0 0 1 3.5 0l1.16 1.16c.96.97.96 2.54 0 3.5l-.58.58-8.9 8.9-1 1-.14.14H0v-4.65l.14-.15 1-1 8.9-8.9.58-.58Zm2.8.7a1.48 1.48 0 0 0-2.1 0l-.23.23 3.26 3.26.23-.23c.58-.58.58-1.52 0-2.1l-1.16-1.16Zm.23 4.2-3.26-3.27-8.2 8.2 3.25 3.27 8.2-8.2Zm-8.9 8.9-3.27-3.26-.5.5V15h3.27l.5-.5Z"/></svg>'},53054:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M12.56 16.15 6.71 22h8.28a9.46 9.46 0 0 0-2.43-5.85Zm.71-.71 8.08-8.09-.7-.7-15.5 15.5-.86.85H24v-1h-8.01a10.46 10.46 0 0 0-2.72-6.56Z"/></svg>'},98486:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M21.35 7.35a.5.5 0 0 0-.7-.7L14 13.29 7.35 6.65a.5.5 0 1 0-.7.7L13.29 14l-6.64 6.65a.5.5 0 0 0 .7.7L14 14.71l6.65 6.64a.5.5 0 0 0 .7-.7L14.71 14l6.64-6.65z"/></svg>'},54780:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="m11.26 21 3.65-4.78 6.09-.66L10 8zm3.09-5.71-2.33 3.05-.8-8.3 7.02 4.82z"/><path fill-rule="evenodd" d="M25 14a11 11 0 1 1-22 0 11 11 0 0 1 22 0m-1 0a10 10 0 1 1-20 0 10 10 0 0 1 20 0"/></svg>'},52459:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M17.27 4.56a2.5 2.5 0 0 0-3.54 0l-.58.59-9 9-1 1-.15.14V20h4.7l.15-.15 1-1 9-9 .59-.58a2.5 2.5 0 0 0 0-3.54l-1.17-1.17Zm-2.83.7a1.5 1.5 0 0 1 2.12 0l1.17 1.18a1.5 1.5 0 0 1 0 2.12l-.23.23-3.3-3.29.24-.23Zm-.94.95 3.3 3.29-8.3 8.3-3.3-3.3 8.3-8.3Zm-9 9 3.3 3.29-.5.5H4v-3.3l.5-.5Zm16.5.29a1.5 1.5 0 0 0-3 0V18h4.5c.83 0 1.5.67 1.5 1.5v4c0 .83-.67 1.5-1.5 1.5h-6a1.5 1.5 0 0 1-1.5-1.5v-4c0-.83.67-1.5 1.5-1.5h.5v-2.5a2.5 2.5 0 0 1 5 0v.5h-1v-.5ZM16.5 19a.5.5 0 0 0-.5.5v4c0 .28.22.5.5.5h6a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-6Zm2.5 4v-2h1v2h-1Z"/></svg>'},63975:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M17.27 4.56a2.5 2.5 0 0 0-3.54 0l-.58.59-9 9-1 1-.15.14V20h4.7l.15-.15 1-1 9-9 .59-.58a2.5 2.5 0 0 0 0-3.54l-1.17-1.17Zm-2.83.7a1.5 1.5 0 0 1 2.12 0l1.17 1.18a1.5 1.5 0 0 1 0 2.12l-.23.23-3.3-3.29.24-.23Zm-.94.95 3.3 3.29-8.3 8.3-3.3-3.3 8.3-8.3Zm-9 9 3.3 3.29-.5.5H4v-3.3l.5-.5Zm16.5.29a1.5 1.5 0 0 0-3 0V18h3v-2.5Zm1 0V18h.5c.83 0 1.5.67 1.5 1.5v4c0 .83-.67 1.5-1.5 1.5h-6a1.5 1.5 0 0 1-1.5-1.5v-4c0-.83.67-1.5 1.5-1.5h.5v-2.5a2.5 2.5 0 0 1 5 0ZM16.5 19a.5.5 0 0 0-.5.5v4c0 .28.22.5.5.5h6a.5.5 0 0 0 .5-.5v-4a.5.5 0 0 0-.5-.5h-6Zm2.5 4v-2h1v2h-1Z"/></svg>'},44996:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path fill="currentColor" fillRule="evenodd" clipRule="evenodd" d="M7.5 13a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM5 14.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0zm9.5-1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM12 14.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0zm9.5-1.5a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zM19 14.5a2.5 2.5 0 1 1 5 0 2.5 2.5 0 0 1-5 0z"/></svg>'},34059:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 30 30" width="30" height="30"><path fill="currentColor" d="M5.5 13A2.5 2.5 0 0 0 3 15.5 2.5 2.5 0 0 0 5.5 18 2.5 2.5 0 0 0 8 15.5 2.5 2.5 0 0 0 5.5 13zm9.5 0a2.5 2.5 0 0 0-2.5 2.5A2.5 2.5 0 0 0 15 18a2.5 2.5 0 0 0 2.5-2.5A2.5 2.5 0 0 0 15 13zm9.5 0a2.5 2.5 0 0 0-2.5 2.5 2.5 2.5 0 0 0 2.5 2.5 2.5 2.5 0 0 0 2.5-2.5 2.5 2.5 0 0 0-2.5-2.5z"/></svg>'},63743:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M11.682 16.09l3.504 6.068 1.732-1-3.497-6.057 3.595-2.1L8 7.74v10.512l3.682-2.163zm-.362 1.372L7 20V6l12 7-4.216 2.462 3.5 6.062-3.464 2-3.5-6.062z"/></svg>'},18953:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor"><path d="M18 15h8v-1h-8z"/><path d="M14 18v8h1v-8zM14 3v8h1v-8zM3 15h8v-1h-8z"/></g></svg>'},72196:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><circle fill="currentColor" cx="14" cy="14" r="3"/></svg>'},27999:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 29 31" width="29" height="31"><g fill="currentColor" fill-rule="nonzero"><path d="M15.3 22l8.187-8.187c.394-.394.395-1.028.004-1.418l-4.243-4.243c-.394-.394-1.019-.395-1.407-.006l-11.325 11.325c-.383.383-.383 1.018.007 1.407l1.121 1.121h7.656zm-9.484-.414c-.781-.781-.779-2.049-.007-2.821l11.325-11.325c.777-.777 2.035-.78 2.821.006l4.243 4.243c.781.781.78 2.048-.004 2.832l-8.48 8.48h-8.484l-1.414-1.414z"/><path d="M13.011 22.999h7.999v-1h-7.999zM13.501 11.294l6.717 6.717.707-.707-6.717-6.717z"/></g></svg>'},10862:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M24.13 14.65a6.2 6.2 0 0 0-.46-9.28c-2.57-2.09-6.39-1.71-8.75.6l-.92.91-.92-.9c-2.36-2.32-6.18-2.7-8.75-.61a6.2 6.2 0 0 0-.46 9.28l9.07 8.92c.58.57 1.53.57 2.12 0l9.07-8.92Zm-9.77 8.2 9.07-8.91a5.2 5.2 0 0 0-.39-7.8c-2.13-1.73-5.38-1.45-7.42.55L14 8.29l-1.62-1.6c-2.03-2-5.29-2.28-7.42-.55a5.2 5.2 0 0 0-.4 7.8l9.08 8.91c.2.2.52.2.72 0Z"/></svg>'},68385:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor" fill-rule="evenodd"><path fill-rule="nonzero" d="M14 10a2 2 0 0 0-2 2v11H6V12c0-4.416 3.584-8 8-8s8 3.584 8 8v11h-6V12a2 2 0 0 0-2-2zm-3 2a3 3 0 0 1 6 0v10h4V12c0-3.864-3.136-7-7-7s-7 3.136-7 7v10h4V12z"/><path d="M6.5 18h5v1h-5zm10 0h5v1h-5z"/></g></svg>'},88518:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" d="M2 9.75a1.5 1.5 0 0 0-1.5 1.5v5.5a1.5 1.5 0 0 0 1.5 1.5h24a1.5 1.5 0 0 0 1.5-1.5v-5.5a1.5 1.5 0 0 0-1.5-1.5zm0 1h3v2.5h1v-2.5h3.25v3.9h1v-3.9h3.25v2.5h1v-2.5h3.25v3.9h1v-3.9H22v2.5h1v-2.5h3a.5.5 0 0 1 .5.5v5.5a.5.5 0 0 1-.5.5H2a.5.5 0 0 1-.5-.5v-5.5a.5.5 0 0 1 .5-.5z" transform="rotate(-45 14 14)"/></svg>'},36515:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor"><path fill-rule="nonzero" d="M14 18.634l-.307-.239-7.37-5.73-2.137-1.665 9.814-7.633 9.816 7.634-.509.394-1.639 1.269-7.667 5.969zm7.054-6.759l1.131-.876-8.184-6.366-8.186 6.367 1.123.875 7.063 5.491 7.054-5.492z"/><path d="M7 14.5l-1 .57 8 6.43 8-6.5-1-.5-7 5.5z"/><path d="M7 17.5l-1 .57 8 6.43 8-6.5-1-.5-7 5.5z"/></g></svg>'},7636:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M4.05 14a9.95 9.95 0 1 1 19.9 0 9.95 9.95 0 0 1-19.9 0ZM14 3a11 11 0 1 0 0 22 11 11 0 0 0 0-22Zm-3 13.03a.5.5 0 0 1 .64.3 2.5 2.5 0 0 0 4.72 0 .5.5 0 0 1 .94.34 3.5 3.5 0 0 1-6.6 0 .5.5 0 0 1 .3-.64Zm.5-4.53a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm5 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>'},62567:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M7 4h14a3 3 0 0 1 3 3v11c0 .34-.03.67-.08 1H20.3c-1.28 0-2.31.97-2.31 2.24V24H7a3 3 0 0 1-3-3V7a3 3 0 0 1 3-3Zm12 19.92A6 6 0 0 0 23.66 20H20.3c-.77 0-1.31.48-1.31 1.24v2.68ZM3 7a4 4 0 0 1 4-4h14a4 4 0 0 1 4 4v11a7 7 0 0 1-7 7H7a4 4 0 0 1-4-4V7Zm8 9.03a.5.5 0 0 1 .64.3 2.5 2.5 0 0 0 4.72 0 .5.5 0 0 1 .94.34 3.5 3.5 0 0 1-6.6 0 .5.5 0 0 1 .3-.64Zm.5-4.53a1 1 0 1 0 0 2 1 1 0 0 0 0-2Zm5 0a1 1 0 1 0 0 2 1 1 0 0 0 0-2Z"/></svg>'},46049:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="nonzero" d="M14 5a7 7 0 0 0-7 7v3h4v-3a3 3 0 1 1 6 0v3h4v-3a7 7 0 0 0-7-7zm7 11h-4v3h4v-3zm-10 0H7v3h4v-3zm-5-4a8 8 0 1 1 16 0v8h-6v-8a2 2 0 1 0-4 0v8H6v-8zm3.293 11.294l-1.222-2.037.858-.514 1.777 2.963-2 1 1.223 2.037-.858.514-1.778-2.963 2-1zm9.778-2.551l.858.514-1.223 2.037 2 1-1.777 2.963-.858-.514 1.223-2.037-2-1 1.777-2.963z"/></svg>'},99088:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><g fill="currentColor"><path fill-rule="nonzero" d="M15.039 5.969l-.019-.019-2.828 2.828.707.707 2.474-2.474c1.367-1.367 3.582-1.367 4.949 0s1.367 3.582 0 4.949l-2.474 2.474.707.707 2.828-2.828-.019-.019c1.415-1.767 1.304-4.352-.334-5.99-1.638-1.638-4.224-1.749-5.99-.334zM5.97 15.038l-.019-.019 2.828-2.828.707.707-2.475 2.475c-1.367 1.367-1.367 3.582 0 4.949s3.582 1.367 4.949 0l2.474-2.474.707.707-2.828 2.828-.019-.019c-1.767 1.415-4.352 1.304-5.99-.334-1.638-1.638-1.749-4.224-.334-5.99z"/><path d="M10.485 16.141l5.656-5.656.707.707-5.656 5.656z"/></g></svg>'},42650:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M19.76 6.07l-.7.7a13.4 13.4 0 011.93 2.47c.19.3.33.55.42.72l.03.04-.03.04a15 15 0 01-2.09 2.9c-1.47 1.6-3.6 3.12-6.32 3.12-.98 0-1.88-.2-2.7-.52l-.77.76c1.03.47 2.18.76 3.47.76 3.12 0 5.5-1.75 7.06-3.44a16 16 0 002.38-3.38v-.02h.01L22 10l.45.22.1-.22-.1-.22L22 10l.45-.22-.01-.02a5.1 5.1 0 00-.15-.28 16 16 0 00-2.53-3.41zM6.24 13.93l.7-.7-.27-.29a15 15 0 01-2.08-2.9L4.56 10l.03-.04a15 15 0 012.09-2.9c1.47-1.6 3.6-3.12 6.32-3.12.98 0 1.88.2 2.7.52l.77-.76A8.32 8.32 0 0013 2.94c-3.12 0-5.5 1.75-7.06 3.44a16 16 0 00-2.38 3.38v.02h-.01L4 10l-.45-.22-.1.22.1.22L4 10l-.45.22.01.02a5.5 5.5 0 00.15.28 16 16 0 002.53 3.41zm6.09-.43a3.6 3.6 0 004.24-4.24l-.93.93a2.6 2.6 0 01-2.36 2.36l-.95.95zm-1.97-3.69l-.93.93a3.6 3.6 0 014.24-4.24l-.95.95a2.6 2.6 0 00-2.36 2.36zm11.29 7.84l-.8.79a1.5 1.5 0 000 2.12l.59.59a1.5 1.5 0 002.12 0l1.8-1.8-.71-.7-1.8 1.79a.5.5 0 01-.7 0l-.59-.59a.5.5 0 010-.7l.8-.8-.71-.7zm-5.5 3.5l.35.35-.35-.35.01-.02.02-.02.02-.02a4.68 4.68 0 01.65-.5c.4-.27 1-.59 1.65-.59.66 0 1.28.33 1.73.77.44.45.77 1.07.77 1.73a2.5 2.5 0 01-.77 1.73 2.5 2.5 0 01-1.73.77h-4a.5.5 0 01-.42-.78l1-1.5 1-1.5a.5.5 0 01.07-.07zm.74.67a3.46 3.46 0 01.51-.4c.35-.24.75-.42 1.1-.42.34 0 .72.17 1.02.48.3.3.48.68.48 1.02 0 .34-.17.72-.48 1.02-.3.3-.68.48-1.02.48h-3.07l.49-.72.97-1.46zM21.2 2.5L5.5 18.2l-.7-.7L20.5 1.8l.7.7z"/></svg>'},75895:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" d="M16.47 3.7A8.32 8.32 0 0013 2.94c-3.12 0-5.5 1.75-7.06 3.44a16 16 0 00-2.38 3.38v.02h-.01L4 10l-.45-.22-.1.22.1.22L4 10l-.45.22.01.02a5.5 5.5 0 00.15.28 16 16 0 002.53 3.41l.7-.7-.27-.29a15 15 0 01-2.08-2.9L4.56 10l.03-.04a15 15 0 012.09-2.9c1.47-1.6 3.6-3.12 6.32-3.12.98 0 1.88.2 2.7.52l.77-.76zm-7.04 7.04l.93-.93a2.6 2.6 0 012.36-2.36l.95-.95a3.6 3.6 0 00-4.24 4.24zm.1 5.56c1.03.47 2.18.76 3.47.76 3.12 0 5.5-1.75 7.06-3.44a16 16 0 002.38-3.38v-.02h.01L22 10l.45.22.1-.22-.1-.22L22 10l.45-.22-.01-.02-.02-.03-.01-.03a9.5 9.5 0 00-.57-1 16 16 0 00-2.08-2.63l-.7.7.27.29a15.01 15.01 0 012.08 2.9l.03.04-.03.04a15 15 0 01-2.09 2.9c-1.47 1.6-3.6 3.12-6.32 3.12-.98 0-1.88-.2-2.7-.52l-.77.76zm2.8-2.8a3.6 3.6 0 004.24-4.24l-.93.93a2.6 2.6 0 01-2.36 2.36l-.95.95zm7.9 3.73c-.12.12-.23.35-.23.77v2h1v1h-1v2c0 .58-.14 1.1-.52 1.48-.38.38-.9.52-1.48.52s-1.1-.14-1.48-.52c-.38-.38-.52-.9-.52-1.48h1c0 .42.1.65.23.77.12.12.35.23.77.23.42 0 .65-.1.77-.23.12-.12.23-.35.23-.77v-2h-1v-1h1v-2c0-.58.14-1.1.52-1.48.38-.38.9-.52 1.48-.52s1.1.14 1.48.52c.38.38.52.9.52 1.48h-1c0-.42-.1-.65-.23-.77-.12-.12-.35-.23-.77-.23-.42 0-.65.1-.77.23zm2.56 6.27l-1.14-1.15.7-.7 1.15 1.14 1.15-1.14.7.7-1.14 1.15 1.14 1.15-.7.7-1.15-1.14-1.15 1.14-.7-.7 1.14-1.15zM21.2 2.5L5.5 18.2l-.7-.7L20.5 1.8l.7.7z"/></svg>'},65162:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M5.5 18.2L21.2 2.5l-.7-.7L4.8 17.5l.7.7zM19.05 6.78l.71-.7a14.26 14.26 0 0 1 2.08 2.64 14.26 14.26 0 0 1 .6 1.05v.02h.01L22 10l.45.22-.01.02a5.18 5.18 0 0 1-.15.28 16 16 0 0 1-2.23 3.1c-1.56 1.69-3.94 3.44-7.06 3.44-1.29 0-2.44-.3-3.47-.76l.76-.76c.83.32 1.73.52 2.71.52 2.73 0 4.85-1.53 6.33-3.12a15.01 15.01 0 0 0 2.08-2.9l.03-.04-.03-.04a15 15 0 0 0-2.36-3.18zM22 10l.45-.22.1.22-.1.22L22 10zM6.94 13.23l-.7.7a14.24 14.24 0 0 1-2.08-2.64 14.28 14.28 0 0 1-.6-1.05v-.02h-.01L4 10l-.45-.22.01-.02a5.55 5.55 0 0 1 .15-.28 16 16 0 0 1 2.23-3.1C7.5 4.69 9.88 2.94 13 2.94c1.29 0 2.44.3 3.47.76l-.76.76A7.27 7.27 0 0 0 13 3.94c-2.73 0-4.85 1.53-6.33 3.12a15 15 0 0 0-2.08 2.9l-.03.04.03.04a15.01 15.01 0 0 0 2.36 3.18zM4 10l-.45.22-.1-.22.1-.22L4 10zm9 3.56c-.23 0-.46-.02-.67-.06l.95-.95a2.6 2.6 0 0 0 2.36-2.36l.93-.93a3.6 3.6 0 0 1-3.57 4.3zm-3.57-2.82l.93-.93a2.6 2.6 0 0 1 2.36-2.36l.95-.95a3.6 3.6 0 0 0-4.24 4.24zM17.5 21.9l3.28 2.18a.5.5 0 1 1-.56.84L17.5 23.1l-2.72 1.82a.5.5 0 1 1-.56-.84l3.28-2.18zM18.58 19.22a.5.5 0 0 1 .7-.14L22 20.9l2.72-1.82a.5.5 0 0 1 .56.84L22 22.1l-3.28-2.18a.5.5 0 0 1-.14-.7z"/></svg>'},65186:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M14 6a3 3 0 0 0-3 3v3h6V9a3 3 0 0 0-3-3zm4 6V9a4 4 0 0 0-8 0v3H8.5A2.5 2.5 0 0 0 6 14.5v7A2.5 2.5 0 0 0 8.5 24h11a2.5 2.5 0 0 0 2.5-2.5v-7a2.5 2.5 0 0 0-2.5-2.5H18zm-5 5a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-6-2.5c0-.83.67-1.5 1.5-1.5h11c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 7 21.5v-7z"/></svg>'},91244:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M14 6a3 3 0 0 0-3 3v3h8.5a2.5 2.5 0 0 1 2.5 2.5v7a2.5 2.5 0 0 1-2.5 2.5h-11A2.5 2.5 0 0 1 6 21.5v-7A2.5 2.5 0 0 1 8.5 12H10V9a4 4 0 0 1 8 0h-1a3 3 0 0 0-3-3zm-1 11a1 1 0 1 1 2 0v2a1 1 0 1 1-2 0v-2zm-6-2.5c0-.83.67-1.5 1.5-1.5h11c.83 0 1.5.67 1.5 1.5v7c0 .83-.67 1.5-1.5 1.5h-11A1.5 1.5 0 0 1 7 21.5v-7z"/></svg>'},45820:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M4.56 14a10.05 10.05 0 00.52.91c.41.69 1.04 1.6 1.85 2.5C8.58 19.25 10.95 21 14 21c3.05 0 5.42-1.76 7.07-3.58A17.18 17.18 0 0023.44 14a9.47 9.47 0 00-.52-.91c-.41-.69-1.04-1.6-1.85-2.5C19.42 8.75 17.05 7 14 7c-3.05 0-5.42 1.76-7.07 3.58A17.18 17.18 0 004.56 14zM24 14l.45-.21-.01-.03a7.03 7.03 0 00-.16-.32c-.11-.2-.28-.51-.5-.87-.44-.72-1.1-1.69-1.97-2.65C20.08 7.99 17.45 6 14 6c-3.45 0-6.08 2-7.8 3.92a18.18 18.18 0 00-2.64 3.84v.02h-.01L4 14l-.45-.21-.1.21.1.21L4 14l-.45.21.01.03a5.85 5.85 0 00.16.32c.11.2.28.51.5.87.44.72 1.1 1.69 1.97 2.65C7.92 20.01 10.55 22 14 22c3.45 0 6.08-2 7.8-3.92a18.18 18.18 0 002.64-3.84v-.02h.01L24 14zm0 0l.45.21.1-.21-.1-.21L24 14zm-10-3a3 3 0 100 6 3 3 0 000-6zm-4 3a4 4 0 118 0 4 4 0 01-8 0z"/></svg>'},93756:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M5 10.76l-.41-.72-.03-.04.03-.04a15 15 0 012.09-2.9c1.47-1.6 3.6-3.12 6.32-3.12 2.73 0 4.85 1.53 6.33 3.12a15.01 15.01 0 012.08 2.9l.03.04-.03.04a15 15 0 01-2.09 2.9c-1.47 1.6-3.6 3.12-6.32 3.12-2.73 0-4.85-1.53-6.33-3.12a15 15 0 01-1.66-2.18zm17.45-.98L22 10l.45.22-.01.02a5.04 5.04 0 01-.15.28 16.01 16.01 0 01-2.23 3.1c-1.56 1.69-3.94 3.44-7.06 3.44-3.12 0-5.5-1.75-7.06-3.44a16 16 0 01-2.38-3.38v-.02h-.01L4 10l-.45-.22.01-.02a5.4 5.4 0 01.15-.28 16 16 0 012.23-3.1C7.5 4.69 9.88 2.94 13 2.94c3.12 0 5.5 1.75 7.06 3.44a16.01 16.01 0 012.38 3.38v.02h.01zM22 10l.45-.22.1.22-.1.22L22 10zM3.55 9.78L4 10l-.45.22-.1-.22.1-.22zm6.8.22A2.6 2.6 0 0113 7.44 2.6 2.6 0 0115.65 10 2.6 2.6 0 0113 12.56 2.6 2.6 0 0110.35 10zM13 6.44A3.6 3.6 0 009.35 10 3.6 3.6 0 0013 13.56c2 0 3.65-1.58 3.65-3.56A3.6 3.6 0 0013 6.44zm7.85 12l.8-.8.7.71-.79.8a.5.5 0 000 .7l.59.59c.2.2.5.2.7 0l1.8-1.8.7.71-1.79 1.8a1.5 1.5 0 01-2.12 0l-.59-.59a1.5 1.5 0 010-2.12zM16.5 21.5l-.35-.35a.5.5 0 00-.07.07l-1 1.5-1 1.5a.5.5 0 00.42.78h4a2.5 2.5 0 001.73-.77A2.5 2.5 0 0021 22.5a2.5 2.5 0 00-.77-1.73A2.5 2.5 0 0018.5 20a3.1 3.1 0 00-1.65.58 5.28 5.28 0 00-.69.55v.01h-.01l.35.36zm.39.32l-.97 1.46-.49.72h3.07c.34 0 .72-.17 1.02-.48.3-.3.48-.68.48-1.02 0-.34-.17-.72-.48-1.02-.3-.3-.68-.48-1.02-.48-.35 0-.75.18-1.1.42a4.27 4.27 0 00-.51.4z"/></svg>'},42321:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M5 10.76a13.27 13.27 0 01-.41-.72L4.56 10l.03-.04a15 15 0 012.08-2.9c1.48-1.6 3.6-3.12 6.33-3.12s4.85 1.53 6.33 3.12a15.01 15.01 0 012.08 2.9l.03.04-.03.04a15 15 0 01-2.08 2.9c-1.48 1.6-3.6 3.12-6.33 3.12s-4.85-1.53-6.33-3.12a15 15 0 01-1.66-2.18zm17.45-.98L22 10l.45.22-.01.02a14.3 14.3 0 01-.6 1.05c-.4.64-1 1.48-1.78 2.33-1.56 1.7-3.94 3.44-7.06 3.44s-5.5-1.75-7.06-3.44a16 16 0 01-2.23-3.1 9.39 9.39 0 01-.15-.28v-.02h-.01L4 10l-.45-.22.01-.02a5.59 5.59 0 01.15-.28 16 16 0 012.23-3.1C7.5 4.69 9.87 2.94 13 2.94c3.12 0 5.5 1.75 7.06 3.44a16 16 0 012.23 3.1 9.5 9.5 0 01.15.28v.01l.01.01zM22 10l.45-.22.1.22-.1.22L22 10zM3.55 9.78L4 10l-.45.22-.1-.22.1-.22zm6.8.22A2.6 2.6 0 0113 7.44 2.6 2.6 0 0115.65 10 2.6 2.6 0 0113 12.56 2.6 2.6 0 0110.35 10zM13 6.44A3.6 3.6 0 009.35 10c0 1.98 1.65 3.56 3.65 3.56s3.65-1.58 3.65-3.56A3.6 3.6 0 0013 6.44zM20 18c0-.42.1-.65.23-.77.12-.13.35-.23.77-.23.42 0 .65.1.77.23.13.12.23.35.23.77h1c0-.58-.14-1.1-.52-1.48-.38-.38-.9-.52-1.48-.52s-1.1.14-1.48.52c-.37.38-.52.9-.52 1.48v2h-1v1h1v2c0 .42-.1.65-.23.77-.12.13-.35.23-.77.23-.42 0-.65-.1-.77-.23-.13-.12-.23-.35-.23-.77h-1c0 .58.14 1.1.52 1.48.38.37.9.52 1.48.52s1.1-.14 1.48-.52c.37-.38.52-.9.52-1.48v-2h1v-1h-1v-2zm1.65 4.35l1.14 1.15-1.14 1.15.7.7 1.15-1.14 1.15 1.14.7-.7-1.14-1.15 1.14-1.15-.7-.7-1.15 1.14-1.15-1.14-.7.7z"/></svg>'},57313:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" fill-rule="evenodd" d="M4.5 10a8.46 8.46 0 0 0 .46.8c.38.6.94 1.4 1.68 2.19 1.48 1.6 3.62 3.13 6.36 3.13s4.88-1.53 6.36-3.13A15.07 15.07 0 0 0 21.5 10a7.41 7.41 0 0 0-.46-.8c-.38-.6-.94-1.4-1.68-2.19-1.48-1.6-3.62-3.13-6.36-3.13S8.12 5.4 6.64 7A15.07 15.07 0 0 0 4.5 10zM22 10l.41-.19-.4.19zm0 0l.41.19-.4-.19zm.41.19l.09-.19-.09-.19-.01-.02a6.86 6.86 0 0 0-.15-.28c-.1-.18-.25-.45-.45-.76-.4-.64-.99-1.48-1.77-2.32C18.47 4.74 16.11 3 13 3 9.89 3 7.53 4.74 5.97 6.43A15.94 15.94 0 0 0 3.6 9.79v.02h-.01L3.5 10l.09.19.01.02a6.59 6.59 0 0 0 .15.28c.1.18.25.45.45.76.4.64.99 1.48 1.77 2.32C7.53 15.26 9.89 17 13 17c3.11 0 5.47-1.74 7.03-3.43a15.94 15.94 0 0 0 2.37-3.36v-.02h.01zM4 10l-.41-.19.4.19zm9-2.63c-1.5 0-2.7 1.18-2.7 2.63s1.2 2.63 2.7 2.63c1.5 0 2.7-1.18 2.7-2.63S14.5 7.37 13 7.37zM9.4 10C9.4 8.07 11 6.5 13 6.5s3.6 1.57 3.6 3.5S15 13.5 13 13.5A3.55 3.55 0 0 1 9.4 10zm8.1 11.9l3.28 2.18a.5.5 0 1 1-.56.84L17.5 23.1l-2.72 1.82a.5.5 0 1 1-.56-.84l3.28-2.18zm1.78-2.82a.5.5 0 0 0-.56.84L22 22.1l3.28-2.18a.5.5 0 1 0-.56-.84L22 20.9l-2.72-1.82z"/></svg>'},6894:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17.646 18.354l4 4 .708-.708-4-4z"/><path d="M12.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zm0-1a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15z"/><path d="M9 13h7v-1H9z"/><path d="M13 16V9h-1v7z"/></svg>'},45360:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><path d="M17.646 18.354l4 4 .708-.708-4-4z"/><path d="M12.5 21a8.5 8.5 0 1 1 0-17 8.5 8.5 0 0 1 0 17zm0-1a7.5 7.5 0 1 0 0-15 7.5 7.5 0 0 0 0 15z"/><path d="M9 13h7v-1H9z"/></svg>'},23851:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path fill="currentColor" d="M4 13h5v1H4v-1zM12 13h5v1h-5v-1zM20 13h5v1h-5v-1z"/></svg>'},57740:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M3 13h2v2H3v-2Zm5 0h2v2H8v-2Zm7 0h-2v2h2v-2Zm3 0h2v2h-2v-2Zm7 0h-2v2h2v-2Z"/></svg>'},80427:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M23 8H5V7h18v1ZM9 14H5v-1h4v1Zm3 0h4v-1h-4v1Zm11 0h-4v-1h4v1ZM7 19H5v2h2v-2Zm2 0h2v2H9v-2Zm6 0h-2v2h2v-2Zm2 0h2v2h-2v-2Zm6 0h-2v2h2v-2Z"/></svg>'},501:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28"><path stroke="currentColor" d="M4 13.5h20"/></svg>'},36296:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M8 9.5H6.5a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1h11a1 1 0 0 0 1-1V20m-8-1.5h11a1 1 0 0 0 1-1v-11a1 1 0 0 0-1-1h-11a1 1 0 0 0-1 1v11a1 1 0 0 0 1 1z"/></svg>'},21065:t=>{
|
|
t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20" width="20" height="20" fill="none"><path stroke="currentColor" d="M13.5 6.5l-3-3-7 7 7.59 7.59a2 2 0 0 0 2.82 0l4.18-4.18a2 2 0 0 0 0-2.82L13.5 6.5zm0 0v-4a2 2 0 0 0-2-2v0a2 2 0 0 0-2 2v6"/><path fill="currentColor" d="M0 16.5C0 15 2.5 12 2.5 12S5 15 5 16.5 4 19 2.5 19 0 18 0 16.5z"/><circle fill="currentColor" cx="9.5" cy="9.5" r="1.5"/></svg>'},25388:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 8 12" width="8" height="12" fill="currentColor"><rect width="2" height="2" rx="1"/><rect width="2" height="2" rx="1" y="5"/><rect width="2" height="2" rx="1" y="10"/><rect width="2" height="2" rx="1" x="6"/><rect width="2" height="2" rx="1" x="6" y="5"/><rect width="2" height="2" rx="1" x="6" y="10"/></svg>'},28245:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28"><path fill="currentColor" d="M11.68 9.74a95.6 95.6 0 0 0-5.76 7.56l-.84-.56c.51-.76 3.05-4.4 5.84-7.65a33.25 33.25 0 0 1 4.16-4.22c.66-.52 1.3-.94 1.89-1.17.59-.23 1.22-.3 1.76 0 .6.33.75.99.75 1.61a8.7 8.7 0 0 1-.42 2.3 56.38 56.38 0 0 1-2.33 5.98l-.42.97c-.78 1.78-1.52 3.48-2 4.86-.3.81-.49 1.48-.55 1.96a1.57 1.57 0 0 0 .01.57c.06.02.17.04.42-.08.28-.13.62-.38 1.02-.75.8-.73 1.71-1.82 2.66-2.94l.07-.08c.9-1.08 1.84-2.2 2.67-2.98.43-.4.85-.74 1.26-.95.4-.2.9-.33 1.35-.1.47.24.63.68.65 1.1.02.41-.1.88-.24 1.34-.14.47-.34 1-.55 1.53l-.02.05-.59 1.59c-.37 1.12-.57 2.12-.39 2.88.09.36.26.66.55.9.3.24.76.45 1.45.57l-.16.98c-.81-.13-1.45-.4-1.92-.78a2.6 2.6 0 0 1-.9-1.44c-.25-1.05.05-2.3.43-3.43.18-.55.4-1.1.6-1.62l.02-.06c.2-.54.4-1.03.53-1.46.14-.45.2-.78.2-1-.02-.2-.07-.24-.1-.25-.04-.02-.16-.05-.45.1-.29.14-.63.4-1.03.78-.8.74-1.7 1.82-2.62 2.92l-.05.05a34.79 34.79 0 0 1-2.74 3.04c-.43.39-.86.72-1.27.92-.41.19-.9.29-1.36.02a1.04 1.04 0 0 1-.48-.7 2.52 2.52 0 0 1-.01-.84c.07-.6.3-1.35.59-2.18.5-1.4 1.26-3.15 2.04-4.93l.41-.96c.92-2.11 1.8-4.2 2.29-5.87.24-.83.37-1.51.38-2.01 0-.52-.14-.68-.23-.74-.17-.1-.45-.12-.92.06-.46.18-1 .53-1.63 1.02a32.32 32.32 0 0 0-4.02 4.09Zm2.1 12.21Z"/></svg>'},22978:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 1" width="18" height="1"><rect width="18" height="1" fill="currentColor" rx=".5"/></svg>'},14631:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 2" width="18" height="2"><rect width="18" height="2" fill="currentColor" rx="1"/></svg>'},6096:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 3" width="18" height="3"><rect width="18" height="3" fill="currentColor" rx="1.5"/></svg>'},6483:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 18 4" width="18" height="4"><rect width="18" height="4" fill="currentColor" rx="2"/></svg>'},66611:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="currentColor"><rect width="18" height="2" rx="1" x="5" y="14"/><rect width="18" height="1" rx=".5" x="5" y="20"/><rect width="18" height="3" rx="1.5" x="5" y="7"/></svg>'},
|
|
48984:t=>{t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 13 15" width="13" height="15" fill="none"><path stroke="currentColor" d="M4 14.5h2.5m2.5 0H6.5m0 0V.5m0 0h-5a1 1 0 0 0-1 1V4m6-3.5h5a1 1 0 0 1 1 1V4"/></svg>'},82665:(t,e,o)=>{"use strict";o.d(e,{default:()=>l});var i=o(38459),n=o(61833),r=o(56882),s=Math.ceil,a=Math.max;const l=function(t,e,o){e=(o?(0,n.default)(t,e,o):void 0===e)?1:a((0,r.default)(e),0);var l=null==t?0:t.length;if(!l||e<1)return[];for(var c=0,h=0,d=Array(s(l/e));c<l;)d[h++]=(0,i.default)(t,c,c+=e);return d}},25931:(t,e,o)=>{"use strict";o.d(e,{nanoid:()=>i});let i=(t=21)=>crypto.getRandomValues(new Uint8Array(t)).reduce(((t,e)=>t+=(e&=63)<36?e.toString(36):e<62?(e-26).toString(36).toUpperCase():e>62?"-":"_"),"")}}]); |