Files
ai/charting_library/bundles/object-tree-dialog.658ec3c8de9659003d0b.js

33 lines
94 KiB
JavaScript

(self.webpackChunktradingview=self.webpackChunktradingview||[]).push([[4952],{21353:e=>{e.exports={container:"container-WDZ0PRNh","container-xxsmall":"container-xxsmall-WDZ0PRNh","container-xsmall":"container-xsmall-WDZ0PRNh","container-small":"container-small-WDZ0PRNh","container-medium":"container-medium-WDZ0PRNh","container-large":"container-large-WDZ0PRNh","intent-default":"intent-default-WDZ0PRNh",focused:"focused-WDZ0PRNh",readonly:"readonly-WDZ0PRNh",disabled:"disabled-WDZ0PRNh","with-highlight":"with-highlight-WDZ0PRNh",grouped:"grouped-WDZ0PRNh","adjust-position":"adjust-position-WDZ0PRNh","first-row":"first-row-WDZ0PRNh","first-col":"first-col-WDZ0PRNh",stretch:"stretch-WDZ0PRNh","font-size-medium":"font-size-medium-WDZ0PRNh","font-size-large":"font-size-large-WDZ0PRNh","no-corner-top-left":"no-corner-top-left-WDZ0PRNh","no-corner-top-right":"no-corner-top-right-WDZ0PRNh","no-corner-bottom-right":"no-corner-bottom-right-WDZ0PRNh","no-corner-bottom-left":"no-corner-bottom-left-WDZ0PRNh","size-xxsmall":"size-xxsmall-WDZ0PRNh","size-xsmall":"size-xsmall-WDZ0PRNh","size-small":"size-small-WDZ0PRNh","size-medium":"size-medium-WDZ0PRNh","size-large":"size-large-WDZ0PRNh","intent-success":"intent-success-WDZ0PRNh","intent-warning":"intent-warning-WDZ0PRNh","intent-danger":"intent-danger-WDZ0PRNh","intent-primary":"intent-primary-WDZ0PRNh","border-none":"border-none-WDZ0PRNh","border-thin":"border-thin-WDZ0PRNh","border-thick":"border-thick-WDZ0PRNh",highlight:"highlight-WDZ0PRNh",shown:"shown-WDZ0PRNh"}},20853:e=>{e.exports={"inner-slot":"inner-slot-W53jtLjw",interactive:"interactive-W53jtLjw",icon:"icon-W53jtLjw","inner-middle-slot":"inner-middle-slot-W53jtLjw","before-slot":"before-slot-W53jtLjw","after-slot":"after-slot-W53jtLjw"}},39017:e=>{e.exports={input:"input-RUSovanF","size-xxsmall":"size-xxsmall-RUSovanF","size-xsmall":"size-xsmall-RUSovanF","size-small":"size-small-RUSovanF","size-medium":"size-medium-RUSovanF","size-large":"size-large-RUSovanF","with-start-slot":"with-start-slot-RUSovanF","with-end-slot":"with-end-slot-RUSovanF"}},53160:e=>{e.exports={"tablet-normal-breakpoint":"(max-width: 768px)","small-height-breakpoint":"(max-height: 360px)","tablet-small-breakpoint":"(max-width: 440px)"}},36261:e=>{e.exports={dropTargetInside:"dropTargetInside-e_nPSSdZ",dropTarget:"dropTarget-e_nPSSdZ",before:"before-e_nPSSdZ",after:"after-e_nPSSdZ"}},67869:e=>{e.exports={sticky:"sticky-U0YaDVkl",hideSticky:"hideSticky-U0YaDVkl"}},18325:e=>{e.exports={wrap:"wrap-IEe5qpW4",selected:"selected-IEe5qpW4",childOfSelected:"childOfSelected-IEe5qpW4",disabled:"disabled-IEe5qpW4",expandHandle:"expandHandle-IEe5qpW4",expanded:"expanded-IEe5qpW4"}},47236:e=>{e.exports={separator:"separator-MgF6KBas",sticky:"sticky-MgF6KBas",accessible:"accessible-MgF6KBas",tree:"tree-MgF6KBas",overlayScrollWrap:"overlayScrollWrap-MgF6KBas",listContainer:"listContainer-MgF6KBas"}},88735:e=>{e.exports={dialog:"dialog-VUnQLSMH",buttons:"buttons-VUnQLSMH",button:"button-VUnQLSMH",disabled:"disabled-VUnQLSMH"}},73434:e=>{e.exports={
title:"title-uNZ8yW1y",withoutIcon:"withoutIcon-uNZ8yW1y",buttons:"buttons-uNZ8yW1y",button:"button-uNZ8yW1y",disabled:"disabled-uNZ8yW1y",spacing:"spacing-uNZ8yW1y",toolbar:"toolbar-uNZ8yW1y"}},68246:e=>{e.exports={wrap:"wrap-C8ln3wvp",dialog:"dialog-C8ln3wvp",mobile:"mobile-C8ln3wvp",offset:"offset-C8ln3wvp",title:"title-C8ln3wvp",main:"main-C8ln3wvp",disabled:"disabled-C8ln3wvp",icon:"icon-C8ln3wvp",pathIcon:"pathIcon-C8ln3wvp",syncIconWrap:"syncIconWrap-C8ln3wvp",syncIcon:"syncIcon-C8ln3wvp",rightButtons:"rightButtons-C8ln3wvp",hover:"hover-C8ln3wvp",expandHandle:"expandHandle-C8ln3wvp",button:"button-C8ln3wvp",selected:"selected-C8ln3wvp",childOfSelected:"childOfSelected-C8ln3wvp",renameInput:"renameInput-C8ln3wvp",warn:"warn-C8ln3wvp",visible:"visible-C8ln3wvp"}},9743:e=>{e.exports={wrap:"wrap-ukH4sVzT",space:"space-ukH4sVzT",tree:"tree-ukH4sVzT"}},6343:e=>{e.exports={button:"button-w6lVe_oI",hovered:"hovered-w6lVe_oI",disabled:"disabled-w6lVe_oI"}},59794:(e,t,n)=>{"use strict";n.d(t,{ControlGroupContext:()=>o});const o=n(79474).createContext({isGrouped:!1,cellState:{isTop:!0,isRight:!0,isBottom:!0,isLeft:!0}})},67440:(e,t,n)=>{"use strict";function o(e){let t=0;return e.isTop&&e.isLeft||(t+=1),e.isTop&&e.isRight||(t+=2),e.isBottom&&e.isLeft||(t+=8),e.isBottom&&e.isRight||(t+=4),t}n.d(t,{getGroupCellRemoveRoundBorders:()=>o})},13621:(e,t,n)=>{"use strict";n.d(t,{ControlSkeleton:()=>S,InputClasses:()=>m});var o=n(79474),r=n(14487),i=n.n(r),s=n(85842),l=n(9774),a=n(40197),c=n(59794),d=n(67440);var u=n(21353),h=n.n(u);function f(e){let t="";return 0!==e&&(1&e&&(t=i()(t,h()["no-corner-top-left"])),2&e&&(t=i()(t,h()["no-corner-top-right"])),4&e&&(t=i()(t,h()["no-corner-bottom-right"])),8&e&&(t=i()(t,h()["no-corner-bottom-left"]))),t}function p(e,t,n,o){const{removeRoundBorder:r,className:s,intent:l="default",borderStyle:a="thin",size:c,highlight:u,disabled:p,readonly:g,stretch:m,noReadonlyStyles:v,isFocused:b}=e,S=f(r??(0,d.getGroupCellRemoveRoundBorders)(n));return i()(h().container,h()[`container-${c}`],h()[`intent-${l}`],h()[`border-${a}`],c&&h()[`size-${c}`],S,u&&h()["with-highlight"],p&&h().disabled,g&&!v&&h().readonly,b&&h().focused,m&&h().stretch,t&&h().grouped,!o&&h()["adjust-position"],n.isTop&&h()["first-row"],n.isLeft&&h()["first-col"],s)}function g(e,t,n){const{highlight:o,highlightRemoveRoundBorder:r}=e;if(!o)return h().highlight;const s=f(r??(0,d.getGroupCellRemoveRoundBorders)(t));return i()(h().highlight,h().shown,h()[`size-${n}`],s)}const m={FontSizeMedium:(0,s.ensureDefined)(h()["font-size-medium"]),FontSizeLarge:(0,s.ensureDefined)(h()["font-size-large"])},v={passive:!1};function b(e,t){const{style:n,id:r,role:i,onFocus:s,onBlur:d,onMouseOver:u,onMouseOut:h,onMouseDown:f,onMouseUp:m,onKeyDown:b,onClick:S,tabIndex:_,startSlot:y,middleSlot:C,endSlot:T,onWheel:w,onWheelNoPassive:I=null,size:E,tag:M="span",type:D}=e,{isGrouped:N,cellState:x,disablePositionAdjustment:k=!1}=(0,o.useContext)(c.ControlGroupContext),L=function(e,t=null,n){const r=(0,o.useRef)(null),i=(0,o.useRef)(null),s=(0,
o.useCallback)((()=>{if(null===r.current||null===i.current)return;const[e,t,n]=i.current;null!==t&&r.current.addEventListener(e,t,n)}),[]),l=(0,o.useCallback)((()=>{if(null===r.current||null===i.current)return;const[e,t,n]=i.current;null!==t&&r.current.removeEventListener(e,t,n)}),[]),a=(0,o.useCallback)((e=>{l(),r.current=e,s()}),[]);return(0,o.useEffect)((()=>(i.current=[e,t,n],s(),l)),[e,t,n]),a}("wheel",I,v),R=M;return o.createElement(R,{type:D,style:n,id:r,role:i,className:p(e,N,x,k),tabIndex:_,ref:(0,l.useMergedRefs)([t,L]),onFocus:s,onBlur:d,onMouseOver:u,onMouseOut:h,onMouseDown:f,onMouseUp:m,onKeyDown:b,onClick:S,onWheel:w,...(0,a.filterDataProps)(e),...(0,a.filterAriaProps)(e)},y,C,T,o.createElement("span",{className:g(e,x,E)}))}b.displayName="ControlSkeleton";const S=o.forwardRef(b)},78484:(e,t,n)=>{"use strict";n.d(t,{AfterSlot:()=>u,EndSlot:()=>d,MiddleSlot:()=>c,StartSlot:()=>a});var o=n(79474),r=n(14487),i=n.n(r),s=n(20853),l=n.n(s);function a(e){const{className:t,interactive:n=!0,icon:r=!1,children:s}=e;return o.createElement("span",{className:i()(l()["inner-slot"],n&&l().interactive,r&&l().icon,t)},s)}function c(e){const{className:t,children:n}=e;return o.createElement("span",{className:i()(l()["inner-slot"],l()["inner-middle-slot"],t)},n)}function d(e){const{className:t,interactive:n=!0,icon:r=!1,children:s,dataQaId:a}=e;return o.createElement("span",{className:i()(l()["inner-slot"],n&&l().interactive,r&&l().icon,t),"data-qa-id":a},s)}function u(e){const{className:t,children:n,dataQaId:r}=e;return o.createElement("span",{className:i()(l()["after-slot"],t),"data-qa-id":r},n)}},82651:(e,t,n)=>{"use strict";n.d(t,{InputControl:()=>_});var o=n(79474),r=n(14487),i=n.n(r),s=n(29914),l=n(40197),a=n(69550),c=n(26834),d=n(9774),u=n(94530),h=n(55971),f=n(59618),p=n(13621),g=n(78484),m=n(39017),v=n.n(m);function b(e){return!(0,l.isAriaAttribute)(e)&&!(0,l.isDataAttribute)(e)}function S(e){const{id:t,title:n,role:r,tabIndex:a,placeholder:c,name:d,type:u,value:h,defaultValue:f,draggable:m,autoComplete:S,autoFocus:_,autoCapitalize:y,autoCorrect:C,maxLength:T,min:w,max:I,step:E,pattern:M,inputMode:D,onSelect:N,onFocus:x,onBlur:k,onKeyDown:L,onKeyUp:R,onKeyPress:A,onChange:O,onDragStart:P,size:B="small",className:F,inputClassName:z,disabled:W,readonly:j,containerTabIndex:V,startSlot:G,endSlot:H,reference:U,containerReference:K,onContainerFocus:Z,dataQaId:$,...q}=e,Q=(0,l.filterProps)(q,b),X={...(0,l.filterAriaProps)(q),...(0,l.filterDataProps)(q),id:t,title:n,role:r,tabIndex:a,placeholder:c,name:d,type:u,value:h,defaultValue:f,draggable:m,autoComplete:S,autoFocus:_,autoCapitalize:y,autoCorrect:C,maxLength:T,min:w,max:I,step:E,pattern:M,inputMode:D,onSelect:N,onFocus:x,onBlur:k,onKeyDown:L,onKeyUp:R,onKeyPress:A,onChange:O,onDragStart:P};return o.createElement(p.ControlSkeleton,{...Q,disabled:W,readonly:j,tabIndex:V,className:F,size:B,ref:K,onFocus:Z,startSlot:G,middleSlot:o.createElement(g.MiddleSlot,null,o.createElement("input",{...X,
className:i()(v().input,v()[`size-${B}`],z,G&&v()["with-start-slot"],H&&v()["with-end-slot"]),disabled:W,readOnly:j,ref:U,"data-qa-id":(0,s.dataQaIds)("ui-lib-Input-input",$?`${$}-input`:void 0)})),endSlot:H,"data-qa-id":(0,s.dataQaIds)("ui-lib-Input",$)})}function _(e){e=(0,u.useControl)(e);const{disabled:t,autoSelectOnFocus:n,tabIndex:r=0,onFocus:i,onBlur:s,reference:l,containerReference:p=null,dataQaId:g}=e,m=(0,o.useRef)(null),v=(0,o.useRef)(null),[b,_]=(0,h.useFocus)(),y=t?void 0:b?-1:r,C=t?void 0:b?r:-1,{isMouseDown:T,handleMouseDown:w,handleMouseUp:I}=(0,f.useIsMouseDown)(),E=(0,a.createSafeMulticastEventHandler)(_.onFocus,(function(e){n&&!T.current&&(0,c.selectAllContent)(e.currentTarget)}),i),M=(0,a.createSafeMulticastEventHandler)(_.onBlur,s),D=(0,o.useCallback)((e=>{m.current=e,l&&("function"==typeof l&&l(e),"object"==typeof l&&(l.current=e))}),[m,l]);return o.createElement(S,{...e,isFocused:b,containerTabIndex:y,tabIndex:C,onContainerFocus:function(e){v.current===e.target&&null!==m.current&&m.current.focus()},onFocus:E,onBlur:M,reference:D,containerReference:(0,d.useMergedRefs)([v,p]),onMouseDown:w,onMouseUp:I,dataQaId:g})}},94530:(e,t,n)=>{"use strict";n.d(t,{useControl:()=>i});var o=n(69550),r=n(55971);function i(e){const{onFocus:t,onBlur:n,intent:i,highlight:s,disabled:l}=e,[a,c]=(0,r.useFocus)(void 0,l),d=(0,o.createSafeMulticastEventHandler)(l?void 0:c.onFocus,t),u=(0,o.createSafeMulticastEventHandler)(l?void 0:c.onBlur,n);return{...e,intent:i||(a?"primary":"default"),highlight:s??a,onFocus:d,onBlur:u}}},49892:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>r});var o=n(79474);const r=()=>{const[,e]=(0,o.useReducer)((e=>e+1),0);return e}},2622:(e,t,n)=>{"use strict";n.d(t,{useIsMounted:()=>r});var o=n(79474);const r=()=>{const e=(0,o.useRef)(!1);return(0,o.useEffect)((()=>(e.current=!0,()=>{e.current=!1})),[]),e}},59618:(e,t,n)=>{"use strict";n.d(t,{useIsMouseDown:()=>r});var o=n(79474);function r(){const e=(0,o.useRef)(!1),t=(0,o.useCallback)((()=>{e.current=!0}),[e]),n=(0,o.useCallback)((()=>{e.current=!1}),[e]);return{isMouseDown:e,handleMouseDown:t,handleMouseUp:n}}},26834:(e,t,n)=>{"use strict";function o(e){null!==e&&e.setSelectionRange(0,e.value.length)}n.d(t,{selectAllContent:()=>o})},69550:(e,t,n)=>{"use strict";function o(...e){return t=>{for(const n of e)void 0!==n&&n(t)}}n.d(t,{createSafeMulticastEventHandler:()=>o})},73873:(e,t,n)=>{"use strict";n.d(t,{DialogBreakpoints:()=>r});var o=n(53160);const r={SmallHeight:o["small-height-breakpoint"],TabletSmall:o["tablet-small-breakpoint"],TabletNormal:o["tablet-normal-breakpoint"]}},75865:(e,t,n)=>{"use strict";n.r(t),n.d(t,{ObjectTreeDialogRenderer:()=>Ir});var o=n(79474);async function r(e,t,n){let o;for(let r=0;r<t;++r)try{return await e(o)}catch(e){o=e,await n(r)}throw o}async function i(e,t){return r(e,t,(()=>Promise.resolve()))}var s=n(73775);const l=(0,s.getLogger)("DataSourcesIcons");let a=null;function c(){const e=n.c[70644];return e?Promise.resolve(e.exports.lineToolsIcons):n.e(9766).then(n.bind(n,70644)).then((e=>e.lineToolsIcons))}
function d(){const e=n.c[27418];return e?Promise.resolve(e.exports.SERIES_ICONS):n.e(1328).then(n.bind(n,27418)).then((e=>e.SERIES_ICONS))}let u=null;function h(){return null===u&&(u=function(){const e=i(c,2).then((e=>e)).catch((e=>(l.logWarn(e),{}))),t=i(d,2).then((e=>e)).catch((e=>(l.logWarn(e),{})));return Promise.all([e,t])}()),u.then((e=>(a={linetool:e[0],series:e[1]},a)))}var f=n(91599),p=n(14487),g=n.n(p),m=n(49892),v=n(2622),b=n(54466),S=n(35088),_=n(73873),y=n(14825),C=n(72445),T=n(23351),w=n(85842),I=n(66334),E=n(98637),M=n(24319),D=n(20425);const N=o.createContext(null);var x=n(90602),k=n(2739),L=n(78122),R=n(16098),A=n(33829),O=n(58567),P=n(73434),B=n(64906);function F(e){const{hideTitle:t}=e,{viewModel:r}=(0,w.ensureNotNull)((0,o.useContext)(N)),i=(0,D.useForceUpdate)(),s=r.selection();(0,o.useEffect)((()=>{const e={};return r.onChange().subscribe(e,(()=>i())),()=>{r.onChange().unsubscribeAll(e)}}),[r]),(0,o.useEffect)((()=>{const e={};return s.onChange().subscribe(e,(()=>i())),()=>{s.onChange().unsubscribeAll(e)}}),[s]),(0,o.useEffect)((()=>{(0,L.updateTabIndexes)()}),[]);const l=!r.canSelectionBeUnmerged(),a=r.isSelectionCopyable(),c=r.isSelectionCloneable(),d=!a&&!c,u=r.canSelectionBeGrouped(),h=!1;return o.createElement(k.Toolbar,{orientation:"horizontal",className:P.toolbar},!t&&o.createElement("div",{className:p(P.title,P.withoutIcon)},f.t(null,void 0,n(78707)),h),o.createElement("div",{className:P.buttons},o.createElement(x.ToolbarIconButton,{className:p(P.button,!u&&P.disabled),icon:O,onClick:function(){r.createGroupFromSelection()},isDisabled:!u,tooltip:f.t(null,void 0,n(43582)),"data-name":"group-button"}),o.createElement(M.ToolbarMenuButton,{className:p(P.button,d&&P.disabled),isDisabled:d,content:o.createElement(I.Icon,{icon:R}),tooltip:f.t(null,void 0,n(79961)),arrow:!1,isShowTooltip:!0,"data-name":"copy-clone-button"},a&&o.createElement(E.AccessibleMenuItem,{"data-name":"copy",label:f.t(null,void 0,n(29214)),onClick:function(){r.copySelection()}}),c&&o.createElement(E.AccessibleMenuItem,{"data-name":"clone",label:f.t(null,void 0,n(20582)),onClick:function(){r.cloneSelection()}})),o.createElement(M.ToolbarMenuButton,{className:p(P.button,l&&P.disabled),isDisabled:l,content:o.createElement(I.Icon,{icon:A}),tooltip:f.t(null,void 0,n(67217)),arrow:!1,isShowTooltip:!0,"data-name":"move-to-button"},o.createElement(E.AccessibleMenuItem,{"aria-label":f.t(null,void 0,n(21755)),"data-name":"new-pane-above",label:f.t(null,void 0,n(21755)),onClick:function(){r.unmergeSelectionUp()}}),o.createElement(E.AccessibleMenuItem,{"aria-label":f.t(null,void 0,n(61580)),"data-name":"new-pane-below",label:f.t(null,void 0,n(61580)),onClick:function(){r.unmergeSelectionDown()}})),t&&o.createElement(o.Fragment,null,o.createElement("div",{className:P.spacing}),o.createElement(x.ToolbarIconButton,{className:P.button,icon:manageDrawingsIcon,tooltip:f.t(null,void 0,n(35567)),"data-name":"manage-drawings-button",onClick:g}))));function g(){h}}var z=n(18233),W=n(65976),j=n(57121),V=n(58948),G=n(20889)
;const H=(U="OBJECT_TREE",e=>U+"__"+e);var U;const K=H("SET_NODES"),Z=H("SYNC_NODES"),$=H("UPDATE_NODE"),q=H("UPDATE_NODES"),Q=H("RESET_TREE"),X=H("SET_SELECTED_IDS"),Y=H("DROP_SELECTION"),J=H("SELECT_PREVIOUS"),ee=H("SELECT_NEXT"),te=H("MULTI_SELECT_PREVIOUS"),ne=H("MULTI_SELECT_NEXT"),oe=H("PROCESS_DROP_TARGET"),re=H("UPDATE_DROP_TARGET"),ie=H("HIDE_DROP_TARGET"),se=H("START_MULTI_SELECT"),le=H("STOP_MULTI_SELECT"),ae=(H("REMOVE_NODE"),H("SET_FOCUSED_NODE")),ce=H("SCROLL_TO_ID"),de=H("SET_IS_SELECTED"),ue=H("SET_IS_EXPANDED"),he=H("SET_DISABLED_NODES"),fe=H("MOVE_NODES"),pe=(H("START_DRAG"),H("END_DRAG")),ge=e=>({type:Z,nodes:e}),me=()=>({type:J}),ve=()=>({type:ee}),be=()=>({type:te}),Se=()=>({type:ne}),_e=(e,t,n,o,r)=>({type:oe,dropTarget:e,dropType:t,isHoveredLeft:n,boundBox:o,isLastChild:r}),ye=()=>({type:Y}),Ce=e=>({type:X,ids:e}),Te=(e,t,n)=>({type:fe,ids:e,targetId:t,dropType:n}),we=()=>({type:se}),Ie=()=>({type:le}),Ee=e=>({type:ae,nodeId:e}),Me=e=>({type:ce,nodeId:e}),De=(e,t,n=0)=>({type:de,nodeId:e,isSelected:t,mode:n}),Ne=(e,t)=>({type:ue,nodeId:e,isExpanded:t}),xe=e=>({type:he,ids:e}),ke=()=>({type:pe});var Le=n(64350);const Re=e=>e.nodes,Ae=e=>e.selection,Oe=e=>e.dropTarget,Pe=e=>e.expanded,Be=e=>e.scrollToId,Fe=(e,t)=>t,ze=(0,Le.createSelector)([Re,Fe],((e,t)=>e[t])),We=(0,Le.createSelector)([Ae,Fe],((e,t)=>e.ids.includes(t))),je=(0,Le.createSelector)([Pe,Fe],((e,t)=>e.includes(t))),Ve=(0,Le.createSelector)([e=>e.disabled,Ae,Fe],((e,t,n)=>!t.ids.includes(n)&&e.includes(n))),Ge=(0,Le.createSelector)(Re,(e=>Object.keys(e))),He=(0,Le.createSelector)(Ae,(({ids:e})=>e)),Ue=(0,Le.createSelector)(Ae,(({lastFocusedNodeId:e})=>e)),Ke=(0,Le.createSelector)(Ae,(({isMultiSelecting:e})=>e)),Ze=(0,Le.createSelector)([Re,He],((e,t)=>t.map((t=>e[t])))),$e=(0,Le.createSelector)(Re,(e=>Object.values(e).filter((e=>0===e.level)))),qe=(0,Le.createSelector)([Re,$e],((e,t)=>t.reduce(((t,n)=>[...t,...Qe(e,(0,w.ensureDefined)(n))]),[])));function Qe(e,t){const n=[];for(const o of t.children)n.push(e[o]),n.push(...Qe(e,e[o]));return n}const Xe=(0,Le.createSelector)([Re,$e,Pe],((e,t,n)=>{const o=new Set(n);return t.reduce(((t,n)=>[...t,...Je(e,(0,w.ensureDefined)(n),o)]),[])})),Ye=(0,Le.createSelector)([Re,He,Pe],((e,t,n)=>{const o=new Set(n);return[{id:"drag-list",level:-1,children:t}].reduce(((t,n)=>[...t,...Je(e,(0,w.ensureDefined)(n),o)]),[])}));function Je(e,t,n){const o=[];for(const r of t.children){const t=e[r];void 0!==t&&(o.push(t),n.has(r)&&o.push(...Je(e,t,n)))}return o}function*et(e){const{selectedIds:t,nodes:n}=yield(0,y.call)(e),o={};for(let e=0;e<n.length;++e){const t=n[e];o[t.id]=t}yield(0,y.put)((e=>({type:K,nodes:e}))(o)),yield(0,y.put)(Ce(t));!Ue(yield(0,y.select)())&&t.length>0&&(yield(0,y.put)(Ee(t[0])),yield(0,y.put)(Me(t[0])))}function*tt(e){for(;;){if((yield(0,y.take)([se,le])).type===se){const t=Ge(yield(0,y.select)()).filter((t=>!e(t)));yield(0,y.put)(xe(t))}else yield(0,y.put)(xe([]))}}function*nt(){for(;;){const{type:e}=yield(0,y.take)([ne,te]),t=yield(0,
y.select)(),n=qe(t),o=n.length,r=Ue(t),i=[...He(t)],s=1===i.length&&i[0]!==r,l=n.findIndex((e=>e.id===(s?i[0]:r)));if(e===te&&0===l||e===ne&&l===o-1)continue;const a=ct(t,e===ne?"next":"previous",n,l),{id:c}=a;i.includes(c)&&r?(yield(0,y.put)(De(r,!1,1)),yield(0,y.put)(Ee(c))):yield(0,y.put)(De(c,!0,1)),yield(0,y.put)(Me(c))}}function*ot(e,t){for(;;){const{type:n}=yield(0,y.take)([ee,J]),o=yield(0,y.select)(),r=qe(o),i=Ze(o),s=Ue(o);if(1===i.length&&i[0].id!==s&&!s){if(n===ee){yield(0,y.put)(Ee(i[0].id));continue}if(n===J){const e=r.findIndex((e=>e.id===i[0].id)),t=ct(o,"previous",r,e);yield(0,y.put)(Ee(t.id));continue}}const l=r.findIndex((e=>e.id===s)),a=n===ee?"next":"previous",c=ct(o,a,r,l),{id:d}=c;e?e([d],a):yield(0,y.put)(Ce([d])),t&&t(d),yield(0,y.put)(Ee(d))}}function*rt(e,t=()=>!0){for(;;){const{mode:n,nodeId:o,isSelected:r}=yield(0,y.take)(de);let i=[...He(yield(0,y.select)())];const s=qe(yield(0,y.select)());if(1===n)r?i.push(o):i.splice(i.indexOf(o),1);else if(2===n&&i.length>0){const e=Ue(yield(0,y.select)());let n=s.findIndex((t=>t.id===e));-1===n&&(n=s.reduce(((e,t,n)=>i.includes(t.id)?n:e),-1));const r=s.findIndex((e=>e.id===o));if(n!==r)for(let e=Math.min(n,r);e<=Math.max(n,r);e++){const n=s[e].id;!i.includes(n)&&t(n)&&i.push(n)}}else i=o?[o]:[];const l=new Set(i);i=s.reduce(((e,t)=>(l.has(t.id)&&e.push(t.id),e)),[]),e?e(i):yield(0,y.put)(Ce(i)),yield(0,y.put)(Ee(o))}}function*it(e=()=>!0,t){const{dropTarget:n,dropType:o,isHoveredLeft:r,boundBox:i,isLastChild:s}=t,l=Oe(yield(0,y.select)()),a=ze(yield(0,y.select)(),(0,w.ensureDefined)(n.parentId)),c=s&&"after"===o,d=Ze(yield(0,y.select)()),u=!c||!r&&e(d,n,o)?n:a,h=l.node&&l.node.id!==u.id||l.dropType!==o;d.map((e=>e.id)).includes(u.id)?yield(0,y.put)({type:ie}):h&&e(d,u,o)&&(yield(0,y.put)(((e,t,n)=>({type:re,node:e,dropType:t,boundBox:n}))(u,o,i)))}function*st(e){yield(0,y.throttle)(0,oe,it,e)}function*lt(e){for(;;){yield(0,y.take)(Y);const t=Ze(yield(0,y.select)()),{node:n,dropType:o}=Oe(yield(0,y.select)());if(n&&o){const r=new CustomEvent("tree-node-drop",{detail:{nodes:t,target:n.id,type:o},cancelable:!0});if(e&&e(r),!r.defaultPrevented){const e=He(yield(0,y.select)());yield(0,y.put)(Te(e,n.id,o))}}}}function*at(e){for(;;){yield(0,y.take)(fe);e(Re(yield(0,y.select)()))}}function ct(e,t,n,o){const r=n.length;let i;-1===o&&"previous"===t&&(o=r);let s=0;for(;!i||Math.abs(s)<r&&((l=i).level>1&&!je(e,(0,w.ensureDefined)(l.parentId)));)s+="next"===t?1:-1,i=n[(o+s+r)%r];var l;return i}function*dt(e={}){const{saga:t,onDrop:n,canMove:o,onMove:r,onSelect:i,onKeyboardSelect:s,initState:l,canBeAddedToSelection:a}=e,c=[(0,y.fork)(st,o),(0,y.fork)(lt,n),(0,y.fork)(rt,i,a),(0,y.fork)(ot,i,s),(0,y.fork)(nt)];for(t&&c.push((0,y.fork)(t)),r&&c.push((0,y.fork)(at,r)),a&&c.push((0,y.fork)(tt,a));;){l&&(yield(0,y.call)(et,l));const e=yield(0,y.all)(c);yield(0,y.take)(Q);for(const t of e)yield(0,y.cancel)(t)}}var ut=n(16517),ht=n(7321);const ft=(0,s.getLogger)("Platform.GUI.ObjectTree.CallApi");const pt={ids:[],lastFocusedNodeId:void 0,isMultiSelecting:!1};const gt={
node:void 0,dropType:void 0,boundBox:void 0};const mt=(0,ut.combineReducers)({nodes:function(e={},t){switch(t.type){case K:return t.nodes;case Z:{const{nodes:n}=t,o={};for(const t of n){const n=t.id;e.hasOwnProperty(n)&&(0,ht.deepEquals)(e[n],t)[0]?o[n]=e[n]:o[n]=(0,ht.clone)(t)}return o}case $:{const{type:n,nodeId:o,...r}=t;return{...e,[o]:{...e[o],...r}}}case q:{const{nodes:n}=t,o={...e};return Object.keys(n).forEach((e=>{o[e]={...o[e],...n[e]}})),{...e,...o}}case fe:{const{ids:n,targetId:o,dropType:r}=t,i=(0,w.ensureDefined)(e[o].parentId),s=e[i],l={};for(const t of n){const n=e[t];if(n.parentId){const o=l[n.parentId]||e[n.parentId];l[n.parentId]={...o,children:o.children.filter((e=>e!==t))}}l[t]={...n,parentId:i,level:s.level+1}}const a=s.children.filter((e=>!n.includes(e)));return a.splice(((e,t,n)=>{switch(n){case"before":return e.indexOf((0,w.ensureDefined)(t));case"inside":return e.length;case"after":return e.indexOf((0,w.ensureDefined)(t))+1;default:return 0}})(a,o,r),0,...n),l[i]={...e[i],children:a,isExpanded:!0},{...e,...l}}default:return e}},selection:function(e=pt,t){switch(t.type){case X:{const{ids:n}=t;return{...e,ids:n,lastFocusedNodeId:n.length>0?e.lastFocusedNodeId:void 0}}case se:return{...e,isMultiSelecting:!0};case le:return{...e,isMultiSelecting:!1};case ae:return{...e,lastFocusedNodeId:t.nodeId};case Z:{const n=new Set(t.nodes.map((e=>e.id)));return e.lastFocusedNodeId&&!n.has(e.lastFocusedNodeId)&&delete e.lastFocusedNodeId,{...e,ids:e.ids.filter((e=>n.has(e)))}}default:return e}},dropTarget:function(e=gt,t){switch(t.type){case re:{const{node:n,dropType:o,boundBox:r}=t;return{...e,node:n,dropType:o,boundBox:r}}case ie:case pe:case Q:return{...gt};default:return e}},expanded:function(e=[],t){if(t.type===ue){const{nodeId:n,isExpanded:o}=t;if(o)return[...e,n];const r=[...e];return r.splice(e.indexOf(n),1),r}return e},disabled:function(e=[],t){return t.type===he?[...t.ids]:e},scrollToId:function(e=null,t){return t.type===ce?null===t.nodeId?null:{id:t.nodeId}:e}});var vt=n(63392),bt=n(2100),St=n(50254),_t=n(45958);var yt,Ct,Tt=n(16565),wt=n(647),It=n(69550),Et=n(53530);!function(e){e[e.Normal=0]="Normal",e[e.Small=1]="Small"}(yt||(yt={})),function(e){e[e.Select=0]="Select",e[e.Click=1]="Click"}(Ct||(Ct={}));const Mt=o.createContext({size:0,smallSizeTreeNodeAction:1}),Dt={[T.Modifiers.Mod]:1,[T.Modifiers.Shift]:2};var Nt=n(65237),xt=n(18325);const kt=()=>{};class Lt extends o.PureComponent{constructor(){super(...arguments),this._ref=null,this._handleRef=e=>{this._ref=e;const{connectDragSource:t,connectDropTarget:n,connectDragPreview:o}=this.props;(0,w.ensureDefined)(n)(this._ref),(0,w.ensureDefined)(t)(this._ref),(0,w.ensureDefined)(o)((0,wt.getEmptyImage)(),{captureDraggingState:!0})},this._handleTouchStart=e=>{const t=(e,t)=>{const n=function(e,t){try{const n=document.createEvent("TouchEvent");return n.initTouchEvent(e,!0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,void 0,t.touches,t.targetTouches,t.changedTouches),n}catch{return null}}(e,t);if(n)return n
;const o=Array.from(t.changedTouches),r=Array.from(t.touches),i=Array.from(t.targetTouches);return new TouchEvent(e,{bubbles:!0,changedTouches:o,touches:r,targetTouches:i})},n=e.target;if(n instanceof Element){const e=e=>{const o=e;if(!n.isConnected){o.preventDefault();const e=t("touchmove",o);document.body.dispatchEvent(e)}},o=r=>{const i=r;if(!n.isConnected){i.preventDefault();const e=t("touchend",i);document.body.dispatchEvent(e)}n.removeEventListener("touchend",o),n.removeEventListener("touchmove",e)};n.addEventListener("touchend",o),n.addEventListener("touchmove",e)}}}componentDidMount(){this._ref?.addEventListener("touchstart",this._handleTouchStart)}componentWillUnmount(){this._ref?.removeEventListener("touchstart",this._handleTouchStart)}render(){return o.createElement(Rt,{...this.props,reference:this._handleRef})}getNode(){return(0,w.ensureNotNull)(this._ref)}}const Rt=e=>{const{id:t,isSelected:n,isOffset:r,isExpandable:i,setIsSelected:s,isDisabled:l,isExpanded:a,onClick:c,parentId:d,setIsExpanded:u,reference:h,isFirstListItem:f,isLastListItem:g,nodeRenderer:m,isChildOfSelected:v=!1,isStuckNode:b}=e,{size:S,smallSizeTreeNodeAction:_}=(0,o.useContext)(Mt),y=(0,o.useRef)(null),C=(0,It.createSafeMulticastEventHandler)((e=>y.current=e),h);let[w,E]=(0,Et.useHoverDeprecated)();return(_t.CheckMobile.any()||_t.CheckMobile.isIPad())&&(w=n,E={onMouseOut:kt,onMouseOver:kt}),o.createElement("div",{className:p(xt.wrap,n&&xt.selected,v&&xt.childOfSelected,l&&xt.disabled,i&&xt.expandable),onClick:1===S&&0===_?M:function(e){if(e.defaultPrevented)return;const o=Dt[(0,T.modifiersFromEvent)(e)]||0;!l&&s&&s(t,!n,o);c&&0===o&&c(e,t)},onContextMenu:M,ref:C,...E},i&&o.createElement(I.Icon,{icon:Nt,className:p(xt.expandHandle,a&&xt.expanded),onClick:function(e){e.preventDefault(),i&&u(t,!a)},onMouseDown:function(e){e.preventDefault()}}),m({id:t,isOffset:r,parentId:d,isDisabled:l,isSelected:n,isChildOfSelected:v,isHovered:w,isExpanded:a,isFirstListItem:f,isLastListItem:g,isStuckNode:b}));function M(){l||n||!s||s(t,!0)}},At=o.createContext({});function Ot(e,t){const{id:n}=t,o=ze(e,n),r=We(e,n);let i=!1,s=o.parentId;for(;s&&!i;)i=We(e,s),s=ze(e,s).parentId;return{...o,isSelected:r,isChildOfSelected:i,isExpanded:o.children.length>0&&je(e,n),isExpandable:o.children.length>0,isDisabled:Ve(e,n)}}function Pt(e){return(0,ut.bindActionCreators)({setIsExpanded:Ne,processDropTarget:_e,dropSelection:ye,selectNext:ve,selectPrevious:me,setIsSelected:De,endDrag:ke},e)}const Bt=(0,W.connect)(Ot,Pt,null,{context:At})((function(e){const t=(0,o.useRef)(null),[,n,r]=(0,Tt.useDrag)({type:"node",item:t=>{const{id:n,isDisabled:o,isSelected:r}=e;return o||r||e.setIsSelected(n,!0),e},end:e=>{e.endDrag()}}),[,i]=(0,bt.useDrop)({accept:"node",hover:(n,o)=>{const r=t.current;if(!r)return;if(e.isStuckNode)return;const i=r.getNode(),s=i.getBoundingClientRect(),l=s.bottom-s.top,a=o.getClientOffset();if(a){const t=a.y-s.top;let n,o;if(n=0===e.children.length?t<l/2?"before":"after":t<l/3?"before":e.isExpanded||t>=l/3&&t<2*l/3?"inside":"after",
void 0!==e.getContainerElement){const t=e.getContainerElement().getBoundingClientRect();o={top:s.top-t.top,left:s.left-t.left,bottom:s.top-t.top+s.height,right:s.left-t.left+s.width,height:s.height,width:s.width}}else o={top:i.offsetTop,left:i.offsetLeft,bottom:i.offsetTop+i.offsetHeight,right:i.offsetLeft+i.offsetWidth,height:i.offsetHeight,width:i.offsetWidth};e.processDropTarget(e,n,a.x-s.left<48,o,e.isLastChild)}}});return o.createElement(Lt,{...e,connectDragSource:n,connectDropTarget:i,connectDragPreview:r,ref:t})})),Ft=(0,W.connect)(Ot,Pt,null,{context:At})(Rt);var zt=n(85514),Wt=n(1481),jt=n(64888);function Vt(e){const t=e(),n=(0,o.useRef)(t);n.current=t;const[r,i]=(0,o.useState)(n.current),s=(0,o.useRef)(null);return(0,o.useEffect)((()=>{null===s.current&&(s.current=requestAnimationFrame((()=>{s.current=null,i(n.current)})))})),(0,o.useEffect)((()=>()=>{s.current&&cancelAnimationFrame(s.current)}),[]),r}function Gt(e){const{dropTargetOffset:t,mousePosition:n}=e;if(!t)return{display:"none"};const{x:o,y:r}=t,i=n&&t?n.y-t.y:0,s=`translate(${o+(n&&t?n.x-t.x:0)}px, ${r+i}px)`;return{transform:s,WebkitTransform:s}}const Ht={top:0,left:0,position:"fixed",pointerEvents:"none",zIndex:100,opacity:.5,width:300,backgroundColor:"red"};function Ut(e){return{isDragging:e.isDragging()&&"node"===e.getItemType(),mousePosition:e.getClientOffset(),dropTargetOffset:e.getSourceClientOffset()}}const Kt=(0,W.connect)((function(e){const t=Ye(e),n=Re(e);return{items:t.reduce(((t,{id:o})=>{const r=n[o];if(!r)return t;const i=We(e,o);let s=!1,l=r.parentId;for(;l&&!s;)s=We(e,l),l=ze(e,l).parentId;return t.push({...r,isSelected:i,isChildOfSelected:s,isExpanded:r.children.length>0&&je(e,o),isExpandable:r.children.length>0,isDisabled:Ve(e,o)}),t}),[])}}),null,null,{context:At})((function(e){const{items:t,isDragging:n,nodeRenderer:r,dragPreviewRenderer:i}=e;return Vt((function(){if(0===t.length)return null;return n?o.createElement(jt.Portal,null,o.createElement("div",{style:{...Ht,...Gt(e)}},t.map((e=>void 0!==i?o.createElement(i,{key:e.id,...e}):o.createElement(Zt,{key:e.id,...e,isDragPreview:!0,nodeRenderer:r,isOffset:e.level>1}))))):null}))})),Zt=(0,W.connect)(null,(function(e){return(0,ut.bindActionCreators)({setIsExpanded:Ne,processDropTarget:_e,dropSelection:ye,selectNext:ve,selectPrevious:me,setIsSelected:De,endDrag:ke},e)}),null,{context:At})(Rt);function $t(e){return o.createElement(Kt,{...e,...(0,Wt.useDragLayer)(Ut)})}var qt=n(98808),Qt=n(56804);const Xt=o.forwardRef(((e,t)=>{const n=(0,o.useRef)(null);return e.connectDropTarget(n),(0,o.useImperativeHandle)(t,(()=>({getNode:()=>(0,w.ensureNotNull)(n.current)})),[]),o.createElement("div",{ref:n,style:{height:"100%",width:"100%"}})}));function Yt(e){const t=(0,o.useRef)(null),[,n]=(0,bt.useDrop)({accept:"node",hover:(n,o)=>{if(!t.current)return;const r=o.getClientOffset();if(null===r)return;const i=e.getOrderedNodes();if(0===i.length)return;const s=t.current.getNode().getBoundingClientRect(),l=e.getContainerElement().getBoundingClientRect();if("first"===e.type){const t={
top:s.top-l.top+s.height,left:s.left-l.left,bottom:s.top-l.top+s.height,right:s.left-l.left+s.width,height:0,width:s.width};e.processDropTarget(i[0],"before",!1,t,!1)}if("last"===e.type){const t=r.x-s.left<48,n=i[i.length-1],o=t&&2===n.level?(0,w.ensureDefined)(i.find((e=>e.id===n.parentId))):n,a={top:s.top-l.top,left:s.left-l.left,bottom:s.top-l.top,right:s.left-l.left+s.width,height:s.height,width:s.width};e.processDropTarget(o,"after",t,a,!1)}}});return o.createElement(Xt,{...e,connectDropTarget:n,ref:t})}const Jt=o.createContext({isOver:!1,transform:void 0});var en=n(36261);function tn(e){const{dropType:t,boundBox:n}=e,{top:o,bottom:r,left:i}=(0,w.ensureDefined)(n);return[i,"before"===t||"inside"===t?o:r]}function nn(e){return{isDragging:e.isDragging()}}const on=(0,W.connect)((function(e){const{boundBox:t,dropType:n,node:o}=Oe(e);return{boundBox:t,dropType:n,level:o?o.level:void 0}}),null,null,{context:At})((function(e){const{dropType:t,boundBox:n,isDragging:r,level:i,transform:s=tn}=e;return Vt((function(){if(!r||!t||!n)return null;const l={[en.dropTarget]:"inside"!==t,[en.dropTargetInside]:"inside"===t},{width:a,height:c}=n,[d,u]=s(e),h=`translate(${d}px, ${"inside"===t?u:u-1}px)`;return o.createElement("div",{className:p(l),style:{position:"absolute",transform:h,WebkitTransform:h,top:0,left:2===i?"46px":0,width:2===i?a-46+"px":a,height:"inside"===t?c:"2px"}})}))}));function rn(e){const{isDragging:t}=(0,Wt.useDragLayer)(nn);return o.createElement(on,{...e,isDragging:t})}const sn=o.createContext(null);var ln=n(67869),an=n.n(ln);const cn=o.forwardRef(((e,t)=>{const n=(0,o.useContext)(Jt),r=(0,o.useContext)(sn),i=(0,o.useMemo)((()=>r?.readOnly?Ft:Bt),[r?.readOnly]);return o.createElement("div",{...e,ref:t},r?.id?o.createElement("div",{className:g()(an().sticky,!r.isShowStuck&&an().hideSticky)},o.createElement(i,{id:r.id,key:r.id,isStuckNode:!0,nodeRenderer:r.nodeRenderer,readOnly:r.readOnly,onClick:r.onClick,getContainerElement:r.getContainerElement})):null,e.children,n.isOver&&o.createElement(rn,{transform:n.transform}))}));var dn=n(81458),un=n(47236);const hn=38+T.Modifiers.Shift,fn=40+T.Modifiers.Shift;const pn=o.forwardRef((function(e,t){const{navigationKeys:n,renderList:r,stopMultiSelect:i,startMultiSelect:s,isMultiSelecting:l,nodeRenderer:a,dragPreviewRenderer:c,className:d,connectDropTarget:u,readOnly:h,onClick:f,dropLayerTransform:p,setFocusedNode:m,scrollToId:v,rowHeight:b,onMultiSelectPrevious:S,onMultiSelectNext:_,onMoveCursorToNext:y,onMoveCursorToPrevious:C,onKeyDown:I,outerRef:E,width:M,height:D,isOver:x,processDropTarget:k,autofocus:L,accessibleScope:R}=e,[A,O]=(0,o.useState)(),[P,B]=(0,o.useState)(!0),[F,z]=(0,o.useState)(!1),W=(0,o.useContext)(N),j=(0,o.useRef)(null),V=(0,vt.useDragDropManager)();(0,o.useEffect)((()=>{const e=V.getMonitor();e.subscribeToStateChange((()=>B(!e.isDragging())))}),[]),(0,o.useEffect)((()=>{L&&j.current?.focus()}),[]),(0,o.useEffect)((()=>{const e=e=>{[T.Modifiers.Mod,T.Modifiers.Shift].includes((0,T.modifiersFromEvent)(e))&&s()},t=e=>{
l&&![T.Modifiers.Mod,T.Modifiers.Shift].includes((0,T.modifiersFromEvent)(e))&&i()};return document.addEventListener("keydown",e),document.addEventListener("keyup",t),document.addEventListener("mousemove",t),()=>{document.removeEventListener("keydown",e),document.removeEventListener("keyup",t),document.removeEventListener("mousemove",t)}}),[l]),function(e){(0,o.useEffect)((()=>{if(_t.isEdge){let t=null;const n=(0,w.ensureNotNull)(e.current),o=e=>{if(e.target instanceof Element){const n=(0,w.ensureNotNull)(e.target.closest("[draggable]"));n instanceof HTMLElement&&(n.style.opacity="0",t=requestAnimationFrame((()=>n.style.opacity="1")))}};return n.addEventListener("dragstart",o),()=>{n.removeEventListener("dragstart",o),null!==t&&cancelAnimationFrame(t)}}return()=>{}}),[])}(j);const G=(0,o.useCallback)((()=>(0,w.ensureNotNull)(oe.current)),[]),H=(0,o.useCallback)((()=>r),[r]),U=(0,o.useMemo)((()=>{const e=h?Ft:Bt,t=[];let n,i;t.push({type:"padding",node:o.createElement(Yt,{type:"first",key:"padding-top",getContainerElement:G,getOrderedNodes:H,processDropTarget:k})});for(let s=0;s<r.length;s++){const l=r[s];l.isSticky&&(i=l.id),1===l.level&&(void 0!==n&&n!==l.parentId&&t.push({type:"separator",node:o.createElement("div",{key:n+"_separator",className:un.separator})}),n=l.parentId),t.push({type:"node",stickyNodeId:i,isSticky:l.isSticky,node:o.createElement(e,{id:l.id,key:l.id,isFirstListItem:0===s,isLastListItem:s===r.length-1,isExpandable:l.children.length>0,nodeRenderer:a,readOnly:h,onClick:f,isOffset:l.level>1,getContainerElement:G})})}return t.push({type:"padding",node:o.createElement(Yt,{type:"last",key:"padding-bottom",getContainerElement:G,getOrderedNodes:H,processDropTarget:k})}),t}),[r]),K=(0,o.useMemo)((()=>{if(A){const e=U[A];return e&&"stickyNodeId"in e?e.stickyNodeId:void 0}}),[A,U]),Z=(0,o.useRef)([]);Z.current=U;const $=(0,o.useCallback)((e=>{let{style:t}=e;const{index:n}=e,r=Z.current[n];return n===Z.current.length-1&&(t={...t,bottom:0,minHeight:t.height},delete t.height),"isSticky"in r&&r.isSticky&&(t={...t,zIndex:ee.current?.scrollTop&&t.top&&+t.top<=ee.current?.scrollTop?2:5}),o.createElement("div",{style:t},Z.current[n].node)}),[]),q=(0,o.useCallback)((e=>{const t=Z.current[e];return"padding"===t.type?6:"function"==typeof b?b(e,t):b}),[b]),Q=(0,o.useCallback)((e=>(0,w.ensure)(Z.current[e].node.key)),[]),X=(0,o.useMemo)((()=>null===v?{index:-1}:{index:Z.current.findIndex((e=>e.node.key===v.id))}),[v]);u(j);const[Y,J,ee,te]=(0,Qt.useOverlayScroll)(),ne=(0,o.useRef)(null);(0,o.useEffect)((()=>(0,w.ensureNotNull)(ne.current).resetAfterIndex(0,!0)),[U]),(0,o.useEffect)((()=>{let e=X.index;const t=Z.current[X.index];A&&e<=A&&t&&"stickyNodeId"in t&&t.stickyNodeId&&(e-=1),(0,w.ensureNotNull)(ne.current).scrollToItem(e)}),[X]);const oe=(0,o.useRef)(null),re=(0,o.useMemo)((()=>({isOver:x,transform:p})),[x,p]),ie=(0,o.useMemo)((()=>({id:K,nodeRenderer:a,getContainerElement:G,onClick:f,isShowStuck:P,readOnly:h})),[K,a,G,P,f,h]),se=(0,o.useRef)(null),le=(0,o.useRef)({startScroll(e){const t=()=>{
null!==ee.current&&(se.current=requestAnimationFrame(t),ee.current.scrollBy({top:e}))};this.stopScroll(),t()},stopScroll(){null!==se.current&&(cancelAnimationFrame(se.current),se.current=null)},getListElement:()=>ee.current});return(0,o.useImperativeHandle)(t,(()=>le.current),[]),(0,o.useEffect)((()=>()=>le.current.stopScroll()),[x]),(0,o.useEffect)((()=>{if(!j.current)return;function e(e){if(!t.matches(":focus-visible"))return;if(!W)return;const{viewModel:n}=W,o=n.selection();e.defaultPrevented||e.currentTarget!==e.target||o.selected().length||y()}const t=j.current;return t.addEventListener("focus",e),()=>{t.removeEventListener("focus",e)}}),[j,y,W]),o.createElement(Jt.Provider,{value:re},o.createElement(sn.Provider,{value:ie},o.createElement("div",{...J,className:g()(un.tree,d,F&&un.accessible),ref:j,onFocus:function(e){if(void 0===R)return;R(e)&&z(!0)},onBlur:function(e){z(!1)},"data-name":"tree",tabIndex:0,onKeyDown:function(e){z(!1);const t=(0,T.hashFromEvent)(e);if(e.defaultPrevented||(0,zt.isNativeUIInteraction)(t,e.target))return;const o=(0,w.ensureDefined)(Y.scrollPosTop),r=(0,w.ensureDefined)(Y.contentHeight),i=(0,w.ensureDefined)(Y.containerHeight);if(i){const n=.875*i,s=o+i===r;switch(t){case 35:s||(e.preventDefault(),ae(r));break;case 36:0!==o&&(e.preventDefault(),ae(0));break;case 33:0!==o&&(e.preventDefault(),ae(Math.max(0,o-n)));break;case 34:s||(e.preventDefault(),ae(Math.min(o+n,r)))}}W||t!==hn||(e.preventDefault(),S());W||t!==fn||(e.preventDefault(),_());(38===t||void 0!==n&&"previous"===n[t])&&(e.preventDefault(),C());(40===t||void 0!==n&&"next"===n[t])&&(e.preventDefault(),y());if((8===t||46===t)&&W){const{viewModel:e}=W,t=e.selection(),n=t.selected();if(1!==n.length)return;const o=e.getNextNodeIdAfterRemove(n[0]);if(null===o)return;e.onChange().subscribe(null,(()=>{if(t.selected().length)return;const n=e.entity(o);n&&(t.set([n]),m(o))}),!0)}I?.(e)}},o.createElement(qt.OverlayScrollContainer,{...Y,className:un.overlayScrollWrap}),o.createElement(St.VariableSizeList,{ref:function(e){ne.current=e},className:un.listContainer,width:M,height:D,itemCount:U.length,itemSize:q,children:$,itemKey:Q,outerRef:function(e){ee.current=e,E&&E(e)},innerRef:function(e){oe.current=e},innerElementType:cn,onItemsRendered:function({visibleStartIndex:e}){O(e),te()},overscanCount:20,direction:(0,dn.isRtl)()?"rtl":"ltr"}),o.createElement($t,{dragPreviewRenderer:c,nodeRenderer:a}))));function ae(e){ee.current?.scrollTo({left:0,top:e})}}));const gn=(0,W.connect)((function(e){return{renderList:Xe(e),orderedNodes:qe(e),isMultiSelecting:Ke(e),selectedIds:He(e),scrollToId:Be(e)}}),(function(e){return(0,ut.bindActionCreators)({startMultiSelect:we,stopMultiSelect:Ie,setFocusedNode:Ee,processDropTarget:_e,onMoveCursorToNext:ve,onMoveCursorToPrevious:me,onMultiSelectPrevious:be,onMultiSelectNext:Se},e)}),null,{context:At})((function(e){const t=(0,o.useRef)(null),[{isOver:n},r]=(0,bt.useDrop)({accept:"node",drop:(n,o)=>{("touch"===e.drag||_t.isFF)&&t.current?.stopScroll(),o.getItem().dropSelection()},hover:(n,o)=>{
if("touch"!==e.drag&&!_t.isFF)return;const r=o.getClientOffset();if(null===r)return;const i=t.current?.getListElement()??null;if(null===i)return;const s=i.getBoundingClientRect();((n,o,r)=>{const i=Math.abs(n-r),s=Math.abs(n-o);if(s>40&&i>40||i<=40&&s<=40)return void t.current?.stopScroll();var l,a,c,d;l=s>20&&s<=40,c=i<=20,d=s<=20,(a=i>20&&i<=40)||l?"touch"===e.drag?t.current?.startScroll(a?-5:5):t.current?.startScroll(a?-2:2):(c||d)&&("touch"===e.drag?t.current?.startScroll(c?-10:10):t.current?.startScroll(c?-5:5))})(r.y,s.bottom,s.top)},collect:e=>({isOver:e.isOver()})});return o.createElement(pn,{...e,isOver:n,connectDropTarget:r,ref:t})})),mn={delayTouchStart:100};function vn(e){const{canBeAddedToSelection:t,initState:n,onSelect:r,canMove:i,onDrop:s,onMove:l,nodes:a,selectedIds:c,onKeyboardSelect:d,saga:u,lastFocusedNodeObject:h,lastSyncTimestampRef:f,scrollToId:p,...g}=e,[m,v]=(0,o.useState)(null);return(0,o.useEffect)((()=>{const e=(0,z.default)();v(function(e){const t=(0,ut.applyMiddleware)(e);return(0,ut.createStore)(mt,t)}(e));const o=e.run(dt,{initState:n,onKeyboardSelect:d,saga:u,canMove:i,onMove:l,onDrop:s,onSelect:r,canBeAddedToSelection:t});return()=>o.cancel()}),[]),(0,o.useEffect)((()=>(null!==m&&a&&(f&&(f.current=performance.now()),m.dispatch(ge(a))),()=>{})),[m,a]),(0,o.useEffect)((()=>{null!==m&&c&&m.dispatch(Ce(c))}),[m,c]),(0,o.useEffect)((()=>{null!==m&&h?.id&&m.dispatch(Ee(h.id))}),[m,h]),null===m?null:o.createElement(bn,{store:m,scrollToId:p,...g})}const bn=o.memo((function(e){const{store:t,scrollToId:n,enableKeyboardEvents:r,enableMouseEvents:i,...s}=e,l="touch"===e.drag?V.TouchBackend:j.HTML5Backend;return(0,o.useEffect)((()=>{t.dispatch(Me(n?.id??null))}),[n]),o.createElement(G.DndProvider,{backend:l,options:{...mn,enableMouseEvents:i,enableKeyboardEvents:r}},o.createElement(W.Provider,{store:t,context:At},o.createElement(gn,{...s})))}));function Sn(e,t){(0,B.trackEvent)("Object Tree",e,t)}function _n(e){return e.length>1?"Multi select":e[0].gaLabel()}function yn(e){return(0,z.eventChannel)((t=>{const n={};return e.onChange().subscribe(n,(()=>t(ge(e.getState().nodes)))),e.onGroupCreated().subscribe(n,(e=>t(Ne(e,!0)))),e.selection().onChange().subscribe(n,(e=>t(Ce(e)))),()=>{e.onChange().unsubscribeAll(n),e.selection().onChange().unsubscribeAll(n),e.onGroupCreated().unsubscribeAll(n)}}),z.buffers.expanding())}function*Cn(){for(;;)yield(0,y.take)([ee,J]),Sn("Select","Arrow")}function*Tn(){for(;;){const{mode:e}=yield(0,y.take)(de);1===e&&Sn("Multi select","Ctrl"),2===e&&Sn("Multi select","Shift")}}function*wn(e){for(;;){yield(0,y.take)(Y);const{node:t,dropType:n}=Oe(yield(0,y.select)());if(t){const o=Ze(yield(0,y.select)()),r=o.map((t=>(0,w.ensureNotNull)(e.entity(t.id))));let i="Drag";1===t.level&&"inside"!==n&&o.some((e=>2===e.level))?i="From the group":2!==t.level&&"inside"!==n||!o.some((e=>1===e.level))?1===o.length&&o[0].parentId!==t.parentId&&(i="Existing pane"):i="To the group",Sn(i,_n(r))}}}function*In(e){yield(0,y.fork)(Cn),yield(0,y.fork)(Tn),yield(0,y.fork)(wn,e)}function*En(e){
yield(0,y.fork)(In,e);const t=yield(0,y.call)(yn,e);ft.logNormal("Opened object tree data source channel");try{for(;;){const e=yield(0,y.take)(t);yield(0,y.put)(e)}}finally{ft.logNormal("Closed object tree data source channel"),t.close()}}const Mn=o.createContext(null);var Dn=n(63484),Nn=n(71515),xn=n(9743);const kn=C.mobiletouch||_t.isFF?"touch":"native";function Ln(e){const{viewModel:t,showHeader:n=!0,nodeRenderer:r,isDialog:i=!1,hideHeaderTitle:s=!1}=e,l=(0,o.useRef)(null),a=function(e){const[t,n]=(0,o.useState)(e.getChartId()),r=(0,o.useRef)(t);return r.current=t,(0,o.useEffect)((()=>{return e.onChange().subscribe(null,t),()=>{e.onChange().unsubscribe(null,t)};function t(){const t=e.getChartId();r.current!==t&&n(t)}}),[]),t}(t),[c,d]=(0,Nn.useDimensions)(),[u,h]=(0,o.useState)(null),f=(0,o.useMemo)((()=>({isTouch:C.touch,isDialog:i})),[i]);return o.createElement(Mn.Provider,{value:f},o.createElement(N.Provider,{value:{viewModel:t}},o.createElement("div",{className:xn.wrap,onContextMenu:Dn.preventDefaultForContextMenu},n&&o.createElement(F,{hideTitle:s}),o.createElement("div",{className:xn.space,onClick:function(e){if(e.defaultPrevented)return;if(!(e.target instanceof Element)||null===l.current)return;e.target===l.current&&t.selection().set([])},ref:c},null!==d&&o.createElement(vn,{key:a,height:d.height,width:d.width,canBeAddedToSelection:function(e){const n=t.entity(e);return t.selection().canBeAddedToSelection(n)},nodeRenderer:r,initState:function(){const{nodes:e,selection:n}=t.getState();return{selectedIds:n,nodes:e}},canMove:function(e,n,o){return t.isSelectionDroppable(n.id,o)},drag:kn,rowHeight:Rn,onSelect:function(e){const n=e.map((e=>t.entity(e))).filter((e=>null!==e));t.selection().set(n)},onDrop:function(e){e.preventDefault();const{detail:{target:n,type:o}}=e;t.insertSelection(n,o)},scrollToId:u,saga:function*(){yield(0,y.fork)(En,t)},onKeyboardSelect:function(e){h({id:e})},outerRef:function(e){l.current=e},onKeyDown:function(e){if(13===(0,T.hashFromEvent)(e)){e.preventDefault();const n=t.selection().selected(),o=n.length>0?t.entity(n[0]):void 0;o&&t.openProperties(o)}},autofocus:i,enableKeyboardEvents:_t.isFF,enableMouseEvents:_t.isFF})))))}function Rn(e,t){switch(t.type){case"node":return 38;case"separator":return 13}}var An,On,Pn=n(16905),Bn=n(99286);!function(e){e.Svg="svg",e.Url="url"}(An||(An={})),function(e){e[e.NoSync=0]="NoSync",e[e.SyncInLayout=1]="SyncInLayout",e[e.GlobalSync=2]="GlobalSync"}(On||(On={}));var Fn=n(82651),zn=n(6343);function Wn(e){const{className:t,disabled:n,...r}=e;return o.createElement(I.Icon,{className:g()(zn.button,n&&zn.disabled,t),...r})}var jn=n(57069);const Vn=f.t(null,void 0,n(43582)),Gn=f.t(null,void 0,n(24823)),Hn=f.t(null,void 0,n(71160)),Un=f.t(null,void 0,n(29307)),Kn=f.t(null,void 0,n(69391)),Zn=f.t(null,void 0,n(97309)),$n=f.t(null,void 0,n(91126));var qn=n(10156),Qn=n(90141),Xn=n(32509),Yn=n(77967),Jn=n(18069),eo=n(40870),to=n(89553),no=n(68246);(0,Pn.isFeaturesetEnabled)("saveload_separate_drawings_storage");function oo(e){const{id:t}=e,n=(0,
o.useContext)(N),{viewModel:r}=(0,w.ensureNotNull)(n),i=r.entity(t);return null===i?null:o.createElement(lo,{...e,entity:i})}const ro=500,io={},so=null;function lo(e){const{id:t,isOffset:r,isDisabled:i,isSelected:s,isChildOfSelected:l,isHovered:a,parentId:c,entity:d,isExpanded:u}=e,h=(0,o.useContext)(N),g=(0,o.useContext)(Bn.SlotContext),{viewModel:m}=(0,w.ensureNotNull)(h),v=(0,o.useContext)(Mn),{size:b}=(0,o.useContext)(Mt),[S,_]=(0,o.useState)(!1),y=(0,o.useRef)(null),[C,E]=(0,o.useState)(d.title().value()),[M,D]=(0,o.useState)((()=>d.getIcon())),[x,k]=(0,o.useState)(d.isLocked()),[L,R]=(0,o.useState)(d.isVisible()),[A,O]=(0,o.useState)(d.isActualInterval()),[P,B]=(0,o.useState)(d.getDrawingSyncState()),[F,z]=(0,o.useState)(d.getModificationDate),[W,j]=(0,o.useState)(!1),[V,G]=((0,jn.useWatchedValueReadonly)({watchedValue:m.getChartLayout()}),(0,o.useState)(!1)),H=(0,o.useRef)(null);(0,o.useEffect)((()=>{const e={};d.onLockChanged().subscribe(e,(()=>k(d.isLocked()))),d.onVisibilityChanged().subscribe(e,(()=>R(d.isVisible())));const t=d.title().spawn();t.subscribe((e=>E(e))),d.onIsActualIntervalChange().subscribe(e,(()=>O(d.isActualInterval()))),d.onSyncStateChanged().subscribe(e,oe),d.modificationDateChanged().subscribe(e,(()=>z(d.getModificationDate())));const n=d.onIconChanged?d.onIconChanged():void 0;return n&&n.subscribe(e,(()=>D(d.getIcon()))),()=>{d.onIsActualIntervalChange().unsubscribeAll(e),d.onLockChanged().unsubscribeAll(e),d.onVisibilityChanged().unsubscribeAll(e),d.onSyncStateChanged().unsubscribeAll(e),d.modificationDateChanged().unsubscribeAll(e),t.destroy(),H.current&&clearTimeout(H.current),n&&n.unsubscribeAll(e)}}),[d]),(0,o.useEffect)((()=>(window.loginStateChange&&(window.loginStateChange.subscribe(null,oe),so?.stateChanged.subscribe(null,oe)),()=>{window.loginStateChange.unsubscribe(null,oe),so?.stateChanged.unsubscribe(null,oe)})),[]),(0,o.useEffect)((()=>{S&&y.current&&(y.current.focus(),y.current.setSelectionRange(0,C.length))}),[S]),(0,o.useEffect)((()=>{const e={};return m.hoveredObjectChanged().subscribe(e,ne),()=>{m.hoveredObjectChanged().unsubscribeAll(e)}}),[u]),(0,o.useEffect)((()=>{m.setHoveredObject(a?t:null)}),[a]),(0,o.useEffect)((()=>{!s&&H.current&&(clearTimeout(H.current),H.current=null),_(!1)}),[s]);const U={};if(c){const e=m.entity(c);e&&(U["data-parent-name"]=e.title().value()),U["data-type"]=d.hasChildren()?"group":"data-source"}const K=(0,Pn.isFeaturesetEnabled)("test_show_object_tree_debug")?`<${d.id()}> (${d.zOrder()}) ${d.title()}`:d.title().value(),Z=(null!==P&&io[P],a||W),$=S&&s,q=!!v&&v.isTouch,Q=!!v&&v.isDialog,X=A&&L?eo:to,Y=d.hasChildren()?f.t(null,void 0,n(1150)):f.t(null,void 0,n(27347));let J=null;return M&&(J=M.type===An.Svg?o.createElement(I.Icon,{icon:M.content||"",className:no.icon}):o.createElement("img",{className:no.icon,src:M.href,decoding:"async",width:"28",height:"28",alt:"",draggable:!1,crossOrigin:"anonymous"})),o.createElement("span",{
className:p(no.wrap,i&&no.disabled,s&&no.selected,r&&no.offset,l&&no.childOfSelected,W&&!i&&!s&&!l&&no.hover,Q&&!i&&!s&&!l&&no.dialog,Q&&!i&&!s&&!l&&(0,Qn.isOnMobileAppPage)("any")&&no.mobile,!!F&&["apply-common-tooltip","common-tooltip-vertical"]),onMouseDown:function(e){S&&!(0,w.ensureNotNull)(y.current).contains(e.target)&&G(!0)},onClick:1===b?ee:function(e){if(e.defaultPrevented)return;if(0!==(0,T.modifiersFromEvent)(e))return;if(H.current)e.preventDefault(),clearTimeout(H.current),H.current=null,m.openProperties(d),G(!1);else{const e=m.selection().selected();H.current=setTimeout((()=>{H.current=null,s&&!V&&1===e.length&&m.rename(d,(()=>_(!0))),G(!1)}),ro)}},onContextMenu:0===b?ee:void 0,"data-tooltip":F?f.t(null,{replace:{modificationDate:F}},n(98445)):void 0},!$&&o.createElement(o.Fragment,null,J,!1,o.createElement("span",{className:p(no.title,m.isMain(d)&&no.main,(!d.isVisible()||!A)&&no.disabled),...U},K),o.createElement("span",{className:no.rightButtons},d.canBeLocked()&&o.createElement(Wn,{title:x?Hn:Un,icon:x?Yn:Jn,className:p(no.button,(Z||x)&&no.visible,"apply-common-tooltip"),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),m.setIsLocked(t,!d.isLocked())},"data-role":"button","data-name":"lock","data-active":x}),d.canBeHidden()&&o.createElement(Wn,{icon:X,className:p(no.button,!A&&no.warn,(Z||!L||!A)&&no.visible,"apply-common-tooltip"),onClick:A?function(e){if(e.defaultPrevented)return;e.preventDefault(),m.setIsVisible(t,!d.isVisible())}:function(e){if(e.defaultPrevented)return;e.preventDefault(),m.openProperties(d,qn.TabNames.visibility)},title:function(){if(!A)return Y;return L?Kn:Zn}(),"data-role":"button","data-name":"hide","data-active":!L}),d.canBeRemoved()&&o.createElement(Wn,{title:$n,icon:Xn,className:p(no.button,(q||Z)&&no.visible,"apply-common-tooltip"),onClick:function(e){if(e.defaultPrevented)return;e.preventDefault(),e.stopPropagation(),m.remove(t,g??void 0)},"data-role":"button","data-name":"remove"}))),$&&o.createElement(Fn.InputControl,{value:C,onChange:function(e){E(e.currentTarget.value)},onClick:Dn.preventDefault,className:no.renameInput,onKeyDown:function(e){27===(0,T.hashFromEvent)(e)?(e.preventDefault(),E(d.title().value()),_(!1)):13===(0,T.hashFromEvent)(e)&&(e.preventDefault(),te())},reference:function(e){y.current=e},onBlur:te,onDragStart:function(e){e.preventDefault(),e.stopPropagation()},stretch:!0}));function ee(e){e.defaultPrevented||S||!d.fullyConstructed()||(e.preventDefault(),e.persist(),m.openContextMenu(d,(()=>_(!0)),e))}function te(){""!==C&&d.setName(C),E(d.title().value()),_(!1)}function ne(e){if(d.hasChildren()&&!u){const t=null!==e&&d.childrenIds().has(e);j(t)}else j(t===e)}function oe(){B(d.getDrawingSyncState())}}var ao=n(38003),co=n(88735);function uo(e){const{viewModel:t,onClose:r,activeChartWidget:i}=e,[s,l]=(0,o.useState)(!1),[a,c]=(0,o.useState)(!1),[d,u]=(0,o.useState)(!1),h=(0,o.useRef)(null),g=(0,m.useForceUpdate)(),y=((0,v.useIsMounted)(),t.selection()),C=t.canSelectionBeGrouped();return(0,o.useEffect)((()=>{
const e=window.matchMedia(_.DialogBreakpoints.TabletSmall);return e.addEventListener("change",T),()=>e.removeEventListener("change",T)}),[]),(0,o.useEffect)((()=>(y.onChange().subscribe(null,(()=>g())),()=>{y.onChange().unsubscribeAll(null)})),[y]),(0,o.useEffect)((()=>{const e=e=>u(e);return t.isContextMenuOpened().subscribe(e),()=>{t.isContextMenuOpened().unsubscribe(e)}}),[t]),o.createElement(o.Fragment,null,o.createElement(b.MatchMedia,{rule:_.DialogBreakpoints.TabletSmall},(e=>o.createElement(S.AdaptivePopupDialog,{additionalElementPos:"after",additionalHeaderElement:o.createElement("div",{className:co.buttons},o.createElement(ao.ToolWidgetIconButton,{className:p(co.button,!C&&co.disabled),icon:O,onClick:w,isDisabled:!C,title:f.t(null,void 0,n(43582)),"data-name":"group-button"}),!1),className:co.dialog,dataName:"object-tree-dialog",isOpened:!0,onClickOutside:a||e||d?()=>{}:r,onClose:r,ref:h,render:()=>o.createElement(ho,{isSmallTablet:e,viewModel:t}),title:f.t(null,void 0,n(78707)),showSeparator:!0}))),!1);function T(){s&&!window.matchMedia(_.DialogBreakpoints.TabletSmall).matches&&l(!1)}function w(){t.createGroupFromSelection()}}function ho(e){const{isSmallTablet:t,viewModel:n}=e,r=(0,o.useMemo)((()=>({size:t?1:0,smallSizeTreeNodeAction:0})),[t]);return o.createElement(Mt.Provider,{value:r},o.createElement(Ln,{nodeRenderer:oo,showHeader:!1,viewModel:n,isDialog:!0}))}var fo=n(48566),po=n(98059),go=n(88434),mo=n(36870);var vo=n(72306);function bo(e,t,n){return`${e}:${t}:${n}`}function So(e){const t=e.split(":");return{paneId:t[0],persistentId:t[1],instanceId:t[2]}}class _o{constructor(e){this._onChange=new mo.Delegate,this._recalculate=()=>{const e=[];for(const t of this._groupModel.groups()){const[n]=t.lineTools();if(!n)continue;const o=this._model.panes().filter((e=>e.sourcesByGroup().hasObjectTreeSource(n)));for(const n of o){const o=bo(n.id(),t.id,t.instanceId());e.push(o)}}const t=this._selectionApi.allSources();this._setSelected(this._selected.filter((n=>e.includes(n)||t.includes(n))))},this._model=e,this._selectionApi=new vo.SelectionApi(this._model),this._groupModel=this._model.lineToolsGroupModel(),this._setSelected(this._getSelectedIds()),this._selectionApi.onChanged().subscribe(this,(()=>this._setSelected(this._getSelectedIds()))),this._groupModel.onChanged().subscribe(this,this._recalculate),this._model.dataSourceCollectionChanged().subscribe(this,this._recalculate)}destroy(){this._selectionApi.onChanged().unsubscribeAll(this),this._groupModel.onChanged().unsubscribeAll(this),this._model.dataSourceCollectionChanged().unsubscribeAll(this)}set(e){const t=[];let n=e.map((e=>e.id()));for(const o of e)if(o.hasChildren()){const e=o.childrenIds();t.push(...Array.from(e.values())),n=n.filter((t=>!e.has(t)))}else t.push(o.id());this._selectionApi.set(t.map((e=>So(e).persistentId))),this._setSelected(n)}canBeAddedToSelection(e){return null!==e&&e.canBeAddedToSelection()}onChange(){return this._onChange}selected(){return[...this._selected]}_getSelectedIds(){
const e=this._selectionApi.allSources().map((e=>this._model.dataSourceForId(e))).filter(ht.notNull).filter((e=>e.showInObjectTree())),t=[];for(const n of e){const e=this._model.panes().filter((e=>e.sourcesByGroup().hasObjectTreeSource(n)));for(const o of e){const e=bo(o.id(),n.id(),n.instanceId());t.push(e)}}return t}_setSelected(e){this._selected=e,this._onChange.fire(e)}}class yo{constructor(e,t){this._controller=e,this._facade=t,this._groupModel=e.model().lineToolsGroupModel()}buildTree(){const e={};for(const t of this._controller.model().panes()){const n=t.sourcesByGroup().objectTreeSources().filter((e=>e.showInObjectTree()));e[t.id()]=Co(t.id(),0);for(const n of this._groupModel.groups()){const o=bo(t.id(),n.id,n.instanceId()),r=(0,w.ensureNotNull)(this._facade.getObjectById(o));if(r.pane()===t){const o=[...n.lineTools()].sort(((e,t)=>e.zorder()>t.zorder()?-1:1)).map((e=>bo(t.id(),e.id(),e.instanceId())));e[r.id()]=Co(r.id(),1,t.id(),o),e[t.id()].children.push(r.id());for(const t of o)e[t]=Co(t,2,r.id())}}for(const o of n){const n=bo(t.id(),o.id(),o.instanceId());e[n]||(e[n]=Co(n,1,t.id()),e[t.id()].children.push(n))}e[t.id()].children.sort(((e,t)=>{const n=(0,w.ensureNotNull)(this._facade.getObjectById(e)),o=(0,w.ensureNotNull)(this._facade.getObjectById(t));return(0,w.ensureNotNull)(o.zOrder())-(0,w.ensureNotNull)(n.zOrder())}))}return this._facade.invalidateCache(new Set(Object.keys(e))),e}}function Co(e,t,n,o=[]){return{id:e,level:t,parentId:n,children:o}}var To=n(72769),wo=n(83940),Io=n(89659),Eo=n(49104),Mo=n(62352),Do=n(84496),No=n(2328),xo=n(94646);var ko=n(75323),Lo=n(34773),Ro=n(20707),Ao=n(95786),Oo=n(54951),Po=n(65366),Bo=n(85701),Fo=n(22201),zo=n(76958);const Wo=new To.TranslatedString("show {title}",f.t(null,void 0,n(72509))),jo=new To.TranslatedString("hide {title}",f.t(null,void 0,n(89815))),Vo=new To.TranslatedString("lock {title}",f.t(null,void 0,n(20927))),Go=new To.TranslatedString("unlock {title}",f.t(null,void 0,n(70639))),Ho=new To.TranslatedString("change {sourceTitle} title to {newSourceTitle}",f.t(null,void 0,n(12306))),Uo=new To.TranslatedString("insert source(s) after",f.t(null,void 0,n(85680)));function Ko(e,t){return t.every((t=>!(t.pane()!==e&&!t.allowsMovingBetweenPanes())))}function Zo(e,t){if(!(t instanceof ko.DataSource&&t.showInObjectTree()))return null;const n=e.find((e=>e.sourcesByGroup().hasObjectTreeSource(t)));return n?bo(n.id(),t.id(),t.instanceId()):null}function $o(e){return new To.TranslatedString(e.name(),e.title(Po.TitleDisplayTarget.DataWindow))}const qo=new mo.Delegate,Qo=(0,Pn.isFeaturesetEnabled)("saveload_separate_drawings_storage");function Xo(e){return 0===e?0:1===e?1:2}class Yo{constructor(e,t){this._syncStateChanged=new mo.Delegate,this.getModificationDate=()=>(0,Eo.isLineTool)(this._dataSource)?function(e){if(null===e)return null;const t=(0,xo.getLocaleIso)();return`${(0,No.formatTime)(e,t,"year","day")}\n${(0,No.formatTime)(e,t,"hour","minute",{timeZoneName:!0})}`}(this._dataSource.serverUpdateTime()):null,this._updateSyncState=()=>{
this._syncStateChanged.fire((0,w.ensureNotNull)(this.getDrawingSyncState()))},this._undoModel=e,this._dataSource=t,this._isWidgetPane=e.model().paneForSource(t)?.mode()===Do.PaneMode.Widget,(0,Eo.isLineTool)(t)?(t.linkKey().subscribe(this._updateSyncState),t.sharingMode().subscribe(this._updateSyncState),this._title=(0,Ro.createWVFromGetterAndSubscription)((()=>t.properties().title.value()||t.translatedType()),t.properties().title)):(0,Ao.isSymbolSource)(t)?this._title=(0,Ro.createWVFromGetterAndSubscriptions)((()=>t.symbolTitle(Po.TitleDisplayTarget.DataWindow)),[t.symbolChanged(),t.symbolResolved(),t.onSymbolIntervalChanged()]):(0,Mo.isStudy)(t)?this._title=(0,Ro.createWVFromGetterAndSubscriptions)((()=>t.title(Po.TitleDisplayTarget.DataWindow)),[t.properties().childs().inputs,this._undoModel.model().properties().childs().paneProperties.childs().legendProperties.childs().showStudyArguments,t.properties().childs().showLegendInputs,t.onParentSourcesChanges(),t.series().symbolResolved()]):this._title=new Io.WatchedValue(t.title(Po.TitleDisplayTarget.DataWindow)).spawn();const n=this._undoModel.lineBeingCreated();null!==n&&n===t&&n.isSynchronizable()&&Oo.isToolCreatingNow.subscribe(this._updateSyncState)}destroy(){(0,Eo.isLineTool)(this._dataSource)&&(this._dataSource.linkKey().unsubscribe(this._updateSyncState),this._dataSource.sharingMode().unsubscribe(this._updateSyncState),this._dataSource.serverUpdateTimeChanged().unsubscribeAll(this)),this._title.destroy(),Oo.isToolCreatingNow.unsubscribe(this._updateSyncState)}id(){return bo(this.pane().id(),this._dataSource.id(),this._dataSource.instanceId())}title(){return this._title}gaLabel(){return(0,Mo.isStudy)(this._dataSource)?"Study":(0,Eo.isLineTool)(this._dataSource)?"Drawing":"Symbol"}canBeLocked(){return(0,Eo.isLineTool)(this._dataSource)&&this._dataSource.userEditEnabled()}canBeRemoved(){return this._undoModel.mainSeries()!==this._dataSource&&this._dataSource.isUserDeletable()}canBeHidden(){return this._dataSource.canBeHidden()}canBeRenamed(){return(0,Eo.isLineTool)(this._dataSource)}fullyConstructed(){return this._undoModel.lineBeingCreated()!==this._dataSource}isVisible(){return this._dataSource.properties().visible.value()}isActualInterval(){return!(0,Eo.isLineTool)(this._dataSource)&&!(0,Mo.isStudy)(this._dataSource)||this._dataSource.isActualInterval()}onIsActualIntervalChange(){return(0,Eo.isLineTool)(this._dataSource)||(0,Mo.isStudy)(this._dataSource)?this._dataSource.onIsActualIntervalChange():qo}isLocked(){return!!(0,Eo.isLineTool)(this._dataSource)&&this._dataSource.properties().frozen.value()}onVisibilityChanged(){return this._dataSource.properties().visible.listeners()}onLockChanged(){return(0,Eo.isLineTool)(this._dataSource)?this._dataSource.properties().frozen.listeners():qo}getIcon(){const e=a,t=this._dataSource.getSourceIcon(),n=(0,Mo.isStudyStrategy)(this._dataSource);let o={type:An.Svg,content:n?Bo:Fo};if(e&&t)if("loadSvg"===t.type){const[n,r]=t.svgId.split("."),i="linetool"===n?e.linetool[r]:e.series[Number(r)];o={type:An.Svg,content:i||Fo}
}else"svgContent"===t.type?o={type:An.Svg,content:t.content}:"url"===t.type&&(o={type:An.Url,href:t.href});return o}onIconChanged(){if(this._dataSource.onSourceIconChanged)return this._dataSource.onSourceIconChanged()}setVisible(e){const t=(e?Wo:jo).format({title:$o(this._dataSource)});this._undoModel.setProperty(this._dataSource.properties().visible,e,t,Lo.lineToolsDoNotAffectChartInvalidation&&(0,Eo.isLineTool)(this._dataSource))}setLocked(e){if((0,Eo.isLineTool)(this._dataSource)){const t=(e?Vo:Go).format({title:$o(this._dataSource)});this._undoModel.setProperty(this._dataSource.properties().frozen,e,t,Lo.lineToolsDoNotAffectChartInvalidation)}}setName(e){if((0,Eo.isLineTool)(this._dataSource)){const t=Ho.format({sourceTitle:this._dataSource.properties().title.value()||$o(this._dataSource),newSourceTitle:e});this._undoModel.setProperty(this._dataSource.properties().title,e,t,Lo.lineToolsDoNotAffectChartInvalidation)}}isCopiable(){return this._dataSource.copiable()}isClonable(){return this._dataSource.cloneable()}zOrder(){return this._dataSource.zorder()}remove(){this._undoModel.removeSource(this._dataSource,!1)}canBeAddedToSelection(){return this._undoModel.selection().canBeAddedToSelection(this._dataSource)}setAsSelection(){this._undoModel.model().selectionMacro((e=>{e.clearSelection(),e.addSourceToSelection(this._dataSource)}))}addToSelection(){this._undoModel.model().selectionMacro((e=>{e.addSourceToSelection(this._dataSource)}))}addSourcesToArray(e){return e.push(this._dataSource),e}insertSourcesBeforeThis(e){this._insertSources(e,(e=>this._undoModel.insertBefore(e,this._dataSource)))}insertSourcesAfterThis(e){this._insertSources(e,(e=>this._undoModel.insertAfter(e,this._dataSource)))}childrenIds(){return new Set}hasChildren(){return!1}pane(){return(0,w.ensureNotNull)(this._undoModel.model().paneForSource(this._dataSource))}alreadyRemoved(){return!this._undoModel.model().dataSourceForId(this._dataSource.id())}allowsMovingBetweenPanes(){return this._dataSource.allowsMovingBetweenPanes()}canBeAddedToGroup(){return(0,Eo.isLineTool)(this._dataSource)&&this._dataSource.boundToSymbol()}canInsertBeforeThis(e){return!this._isWidgetPane&&this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return!this._isWidgetPane&&this._canInsertBeforeOrAfter(e)}detachFromParent(){if((0,Eo.isLineTool)(this._dataSource)){const e=this._undoModel.model(),t=this._undoModel.lineToolsGroupController(),n=e.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==n&&t.excludeLineToolFromGroup(n,this._dataSource)}}canBeSyncedInLayout(){return(0,Eo.isLineTool)(this._dataSource)&&this._dataSource.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}modificationDateChanged(){return(0,Eo.isLineTool)(this._dataSource)?this._dataSource.serverUpdateTimeChanged():qo}setDrawingSyncState(e){if(!this.canBeSyncedInLayout()||!this.fullyConstructed())return;const t=this._dataSource;switch(e){case 0:if(null===t.linkKey().value())return;this._undoModel.unlinkLines([t]);break;case 1:if(null!==t.linkKey().value())return
;this._undoModel.shareLineTools([t],1)}}getDrawingSyncState(){return this.canBeSyncedInLayout()?Qo?this.fullyConstructed()?Xo(this._dataSource.sharingMode().value()):0:this.fullyConstructed()&&null!==this._dataSource.linkKey().value()?1:0:null}_canInsertBeforeOrAfter(e){const t=this._undoModel.model();if(!Ko(this.pane(),e))return!1;if((0,Eo.isLineTool)(this._dataSource)){if(null!==t.lineToolsGroupModel().groupForLineTool(this._dataSource)&&e.some((e=>!e.canBeAddedToGroup())))return!1}return!0}_insertSources(e,t){const n=this._undoModel.model(),o=this._undoModel.lineToolsGroupController();this._undoModel.beginUndoMacro(Uo);const r=()=>{e.forEach((e=>e.detachFromParent()))},i=e.reduce(((e,t)=>t.addSourcesToArray(e)),[]);if((0,Eo.isLineTool)(this._dataSource)){const t=n.lineToolsGroupModel().groupForLineTool(this._dataSource);null!==t?((0,w.assert)(!e.some((e=>e.hasChildren()))),i.forEach((e=>{(0,Eo.isLineTool)(e)&&(t.containsLineTool(e)||o.addLineToolToGroup(t,e))}))):r()}else r();t(i),this._undoModel.endUndoMacro()}}class Jo{constructor(e,t){this._onVisibilityChanged=new mo.Delegate,this._onLockChanged=new mo.Delegate,this._onIsActualIntervalChanged=new mo.Delegate,this._syncStateChanged=new mo.Delegate,this._linkKeyChangedBound=this._linkKeyChanged.bind(this),this._undoModel=e,this._group=t,this._lineTools=t.lineTools(),this._pane=(0,w.ensureNotNull)(this._undoModel.model().paneForSource(this._lineTools[0]));const n=()=>{this._lineTools.forEach((e=>{e.properties().visible.subscribe(this,(()=>this._onVisibilityChanged.fire())),e.properties().frozen.subscribe(this,(()=>this._onLockChanged.fire())),e.onIsActualIntervalChange().subscribe(this,(()=>this._onIsActualIntervalChanged.fire())),e.linkKey().subscribe(this._linkKeyChangedBound),e.sharingMode().subscribe(this._linkKeyChangedBound)}))};this._group.onChanged().subscribe(this,(e=>{this._unsubscribeFromAllLineTools(),this._lineTools=this._group.lineTools(),n(),e.lockedChanged&&this._onLockChanged.fire(),e.visibilityChanged&&this._onVisibilityChanged.fire(),e.isActualIntervalChanged&&this._onIsActualIntervalChanged.fire();const t=this.getDrawingSyncState();null!==t&&this._syncStateChanged.fire(t)})),n(),this._lastActualZOrder=this.zOrder(),this._lastIsVisible=this.isVisible(),this._lastIsActualInterval=this.isActualInterval(),this._lastIsLocked=this.isLocked()}destroy(){this._unsubscribeFromAllLineTools(),this._group.onChanged().unsubscribeAll(this)}id(){return bo(this._pane.id(),this._group.id,this._group.instanceId())}title(){return this._group.name()}gaLabel(){return"Group"}getIcon(){return{type:An.Svg,content:zo}}canBeRemoved(){return!0}canBeHidden(){return!0}canBeLocked(){return!0}canBeRenamed(){return!0}fullyConstructed(){return!0}isVisible(){return this._group.lineTools().length>0&&(this._lastIsVisible="Invisible"!==this._group.visibility()),this._lastIsVisible}isActualInterval(){return this._group.lineTools().length>0&&(this._lastIsActualInterval=this._group.lineTools().some((e=>e.isActualInterval()))),this._lastIsActualInterval}onIsActualIntervalChange(){
return this._onIsActualIntervalChanged}isLocked(){return this._group.lineTools().length>0&&(this._lastIsLocked="Locked"===this._group.locked()),this._lastIsLocked}onVisibilityChanged(){return this._onVisibilityChanged}onLockChanged(){return this._onLockChanged}setVisible(e){this._undoModel.lineToolsGroupController().setGroupVisibility(this._group,e)}setLocked(e){this._undoModel.lineToolsGroupController().setGroupLock(this._group,e)}setName(e){this._undoModel.lineToolsGroupController().setGroupName(this._group,e)}isCopiable(){return!1}isClonable(){return!1}zOrder(){return this._group.lineTools().length>0&&(this._lastActualZOrder=this._group.lineTools()[0].zorder()),this._lastActualZOrder}remove(){this._undoModel.lineToolsGroupController().removeGroup(this._group)}canBeAddedToSelection(){const e=this._undoModel.model();return this._lineTools.every((t=>e.selection().canBeAddedToSelection(t)))}setAsSelection(){this._undoModel.model().selectionMacro((e=>{e.clearSelection(),this._lineTools.forEach((t=>e.addSourceToSelection(t)))}))}addToSelection(){this._undoModel.model().selectionMacro((e=>{this._lineTools.forEach((t=>e.addSourceToSelection(t)))}))}addSourcesToArray(e){return e.push(...this._lineTools),e}detachFromParent(){}insertSourcesBeforeThis(e){const t=this._insertBeforeTarget();this._insertSources(e,(e=>this._undoModel.insertBefore(e,t)))}insertSourcesAfterThis(e){const t=this._insertAfterTarget();this._insertSources(e,(e=>this._undoModel.insertAfter(e,t)))}childrenIds(){const e=[...this._lineTools];e.sort(((e,t)=>t.zorder()-e.zorder()));const t=this._pane.id();return new Set(e.map((e=>bo(t,e.id(),e.instanceId()))))}hasChildren(){return!0}pane(){return this._pane}alreadyRemoved(){return this._undoModel.model().lineToolsGroupModel().groups().includes(this._group)}allowsMovingBetweenPanes(){return!1}canBeAddedToGroup(){return!1}canInsertBeforeThis(e){return this._canInsertBeforeOrAfter(e)}canInsertAfterThis(e){return this._canInsertBeforeOrAfter(e)}canBeSyncedInLayout(){return this._group.isSynchronizable()}onSyncStateChanged(){return this._syncStateChanged}setDrawingSyncState(e){if(this.canBeSyncedInLayout())switch(e){case 0:const e=this._lineTools.filter((e=>null!==e.linkKey().value()));e.length>0&&this._undoModel.unlinkLines(e);break;case 1:const t=this._lineTools.filter((e=>null===e.linkKey().value()));t.length>0&&this._undoModel.shareLineTools(t,1)}}getDrawingSyncState(){if(!this.canBeSyncedInLayout())return null;if(Qo){const e=this._lineTools[0]?.sharingMode().value();if(void 0===e)return null;let t=e;if(0!==t)for(const e of this._lineTools)if(e.sharingMode().value()!==t){t=0;break}return Xo(t)}return this._lineTools.every((e=>null!==e.linkKey().value()))?1:0}modificationDateChanged(){return qo}getModificationDate(){return null}_linkKeyChanged(){this._syncStateChanged.fire((0,w.ensureNotNull)(this.getDrawingSyncState()))}_canInsertBeforeOrAfter(e){return Ko(this.pane(),e)}_insertSources(e,t){this._undoModel.beginUndoMacro(Uo);const n=e.reduce(((e,t)=>t.addSourcesToArray(e)),[])
;e.forEach((e=>e.detachFromParent())),t(n),this._undoModel.endUndoMacro()}_insertBeforeTarget(){return(0,w.ensureNotNull)(this._lineTools.reduce(((e,t)=>null===e?t:e.zorder()<t.zorder()?e:t),null))}_insertAfterTarget(){return(0,w.ensureNotNull)(this._lineTools.reduce(((e,t)=>null===e?t:e.zorder()>t.zorder()?e:t),null))}_unsubscribeFromAllLineTools(){this._lineTools.forEach((e=>{e.properties().visible.unsubscribeAll(this),e.properties().frozen.unsubscribeAll(this),e.onIsActualIntervalChange().unsubscribeAll(this),e.linkKey().unsubscribe(this._linkKeyChangedBound),e.sharingMode().unsubscribe(this._linkKeyChangedBound)}))}}class er{constructor(e){this._hoveredObjectChanged=new mo.Delegate,this._entitiesCache=new Map,this._undoModel=e,this._undoModel.model().hoveredSourceChanged().subscribe(this,this._onModelHoveredSourceChanged)}destroy(){for(const e of this._entitiesCache.values())e?.destroy();this._undoModel.model().hoveredSourceChanged().unsubscribe(this,this._onModelHoveredSourceChanged)}getObjectById(e){if(this._entitiesCache.has(e))return(0,w.ensureDefined)(this._entitiesCache.get(e));const t=this._createObjectById(e);return this._entitiesCache.set(e,t),t}invalidateCache(e){Array.from(this._entitiesCache.keys()).forEach((t=>{e.has(t)||(this._entitiesCache.get(t)?.destroy(),this._entitiesCache.delete(t))}))}canBeGroupped(e){if(0===e.length||1===e.length&&e[0].hasChildren())return!1;const t=[];if(e.forEach((e=>e.addSourcesToArray(t))),t.some((e=>!(0,Eo.isLineTool)(e)||!e.boundToSymbol())))return!1;const n=this._undoModel.model(),o=t.map((e=>n.paneForSource(e)));if(new Set(o).size>1)return!1;if(!Qo)return!0;const r=t.map((e=>e.sharingMode().value()));return 1===new Set(r).size}async contextMenuActions(e,t,n){const{ActionsProvider:o}=await(0,wo.actionsProviderModule)(),r=new o(e,n),i=[];return t.forEach((e=>e.addSourcesToArray(i))),r.contextMenuActionsForSources(i,(0,w.ensureNotNull)(this._undoModel.paneForSource(i[0])))}insertBefore(e,t){t.insertSourcesAfterThis(e)}insertAfter(e,t){t.insertSourcesBeforeThis(e)}setHoveredObject(e){const t=this._undoModel.model();if(null===e)return void t.setHoveredSource(null,null);const n=t.dataSourceForId(e);null!==n&&t.setHoveredSource(n,null)}hoveredObjectId(){return Zo(this._undoModel.panes(),this._undoModel.model().hoveredSource())}hoveredObjectChanged(){return this._hoveredObjectChanged}_onModelHoveredSourceChanged(e){this._hoveredObjectChanged.fire(Zo(this._undoModel.panes(),e))}_createObjectById(e){const t=So(e),n=t.persistentId,o=t.paneId,r=this._undoModel.model(),i=r.dataSourceForId(n),s=r.paneForId(o);if(null!==i&&null!==s)return new Yo(this._undoModel,i);const l=r.lineToolsGroupModel().groupForId(n);return null!==l&&null!==s?new Jo(this._undoModel,l):null}}class tr extends Error{constructor(){super("CancelToken")}}function nr(e){let t=!1;return{promise:new Promise(((n,o)=>{e.then((e=>t?o(new tr):n(e))),e.catch((e=>o(t?new tr:e)))})),cancel(){t=!0}}}
var or=n(46675),rr=n(61950),ir=n(10308),sr=n(70817),lr=n(93729),ar=n(591),cr=n(67174),dr=n(65353),ur=n(30252),hr=n(13565),fr=n(62494);const pr=(0,s.getLogger)("Platform.GUI.ObjectTree");var gr;!function(e){e[e.Up=0]="Up",e[e.Down=1]="Down"}(gr||(gr={}));const mr=new To.TranslatedString("move objects",f.t(null,void 0,n(91966))),vr=new To.TranslatedString("lock objects",f.t(null,void 0,n(26561))),br=new To.TranslatedString("unlock objects",f.t(null,void 0,n(87923))),Sr=new To.TranslatedString("show objects",f.t(null,void 0,n(96699))),_r=new To.TranslatedString("hide objects",f.t(null,void 0,n(56713))),yr=new To.TranslatedString("remove objects",f.t(null,void 0,n(7465)));class Cr{constructor(e){this._nodes={},this._onChange=new mo.Delegate,this._onGroupCreated=new mo.Delegate,this._subscriptions=[],this._removeSourcesPromise=null,this._timeout=null,this._objects=[],this._options={general:!0,mainSeries:!0,mainSeriesTrade:!0,esdStudies:!0,fundamentals:!0,studies:!0,lineTools:!0,publishedCharts:!0,ordersAndPositions:!0,alerts:!1,chartEvents:!0,objectTree:!1,gotoLineTool:!0},this._isContextMenuOpened=new Io.WatchedValue(!1),this._update=(0,go.default)((()=>{this._recalculateTree(),this._onChange.fire()}),0),this._getObjectsToModify=e=>{const t=this.selection().selected();return t.find((t=>t===e))?t.map(this._ensuredEntity):[this._ensuredEntity(e)]},this._onActiveChartChanged=()=>{this._cleanup(),this._init()},this._cleanup=()=>{null!==this._timeout&&(clearTimeout(this._timeout),this._timeout=null),this._subscriptions.forEach((e=>{e.unsubscribeAll(this)})),this._selection.destroy(),this._chart.unsubscribe(this._onActiveChartChanged),null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._facade.destroy()},this._init=()=>{const e=this._chart.value();e.hasModel()&&(this._controller=e.model(),this._groupController=this._controller.lineToolsGroupController(),this._model=this._controller.model(),this._groupModel=this._model.lineToolsGroupModel(),this._facade=new er(this._controller),this._subscriptions=[this._model.mainSeries().onStyleChanged(),this._model.mainSeries().dataEvents().symbolResolved(),this._model.mainSeries().onIntervalChanged(),this._model.panesCollectionChanged(),this._model.dataSourceCollectionChanged(),this._groupModel.onChanged()],this._subscriptions.forEach((e=>{e.subscribe(this,this._update)})),this._chart.subscribe(this._onActiveChartChanged),this._selection=new _o(this._model),this._update())},this._ensuredEntity=e=>(0,w.ensureNotNull)(this._getEntityById(e)),this._chart=e,this._init()}destroy(){this._cleanup()}getState(){return{nodes:Object.values(this._nodes),selection:this._selection.selected()}}getChartId(){return this._chart.value().id()}insertSelection(e,t){const n=this._facade,o=this.selection().selected().map(this._ensuredEntity),[r,i]=this._normalizeTargetAndDropType(e,t);this._controller.withMacro(mr,(()=>{switch(i){case"before":n.insertBefore(o,r);break;case"after":n.insertAfter(o,r)}})),this._update()}entity(e){return this._facade.getObjectById(e)}isMain(e){
return!e.alreadyRemoved()&&So(e.id()).persistentId===this._controller.mainSeries().id()}selection(){return this._selection}setIsLocked(e,t){const n=this._getObjectsToModify(e),o=t?vr:br;this._controller.withMacro(o,(()=>{for(const e of n)e.setLocked(t)})),Sn("Lock",_n(n))}setIsVisible(e,t){const n=this._getObjectsToModify(e),o=t?Sr:_r;this._controller.withMacro(o,(()=>{for(const e of n)e.setVisible(t)})),Sn("Hide",_n(n))}remove(e,t){const n=e=>{this._controller.withMacro(yr,(()=>{for(const t of o)t.isLocked()&&!e||t.remove()})),Sn("Delete",_n(o)),this._update()},o=this._getObjectsToModify(e),r=o.some((e=>!1)),i=o.some((e=>e.isLocked()));r?(null!==this._removeSourcesPromise&&this._removeSourcesPromise.cancel(),this._removeSourcesPromise=nr(confirmDatasourceRemoving({hasLockedSources:i})),this._removeSourcesPromise.promise.then((e=>{e&&(this._removeSourcesPromise=null,n(!0))}))):i?(this._removeSourcesPromise?.cancel(),this._removeSourcesPromise=nr((0,ar.confirmRemovingLockedLineTools)(ar.DeleteLockedLineToolReason.RemoveSelected,t)),this._removeSourcesPromise.promise.then((e=>{n(e)}))):n(!0)}canSelectionBeGrouped(){const e=this._getSelectedEntities();return this._facade.canBeGroupped(e)}createGroupFromSelection(){const e=this._groupController.createGroupFromSelection();Sn("Create Group");const t=e.lineTools();(0,w.assert)(t.length>0);const n=t[0],o=this._model.panes().find((e=>e.sourcesByGroup().hasObjectTreeSource(n))),r=bo((0,w.ensureDefined)(o).id(),e.id,e.instanceId());this.selection().set([this._ensuredEntity(r)]),this._onGroupCreated.fire(r),this._update()}isSelectionDroppable(e,t){const n=this.selection().selected().map(this._ensuredEntity),[o,r]=this._normalizeTargetAndDropType(e,t);switch(r){case"after":return o.canInsertAfterThis(n);case"before":return o.canInsertBeforeThis(n)}}onChange(){return this._onChange}onGroupCreated(){return this._onGroupCreated}isSelectionCloneable(){const e=this._getSelectedEntities();return e.length>0&&e.every((e=>e.isClonable()))}isSelectionCopyable(){const e=this._getSelectedEntities();return e.length>0&&e.every((e=>e.isCopiable()))}openProperties(e,t){const n=this._model.dataSourceForId(So(e.id()).persistentId);this.selection().selected().length>1&&this.selection().selected().includes(e.id())?this._chart.value().showSelectedSourcesProperties(t):(this.selection().set([e]),null!==n?this._controller.mainSeries()===n?this._chart.value().showGeneralChartProperties(void 0,{shouldReturnFocus:!0}):((0,Eo.isLineTool)(n)||(0,Mo.isStudy)(n))&&this._chart.value().showChartPropertiesForSource(n,t,{shouldReturnFocus:!0}):this._chart.value().showChartPropertiesForSources({sources:this._chart.value().model().selection().lineDataSources(),title:e.title().value(),tabName:t,renamable:!0}))}canSelectionBeUnmerged(){const e=this._getSelectedEntities();return 1===e.length&&this.canNodeWithIdBeUnmerged(So(e[0].id()).persistentId)}canNodeWithIdBeUnmerged(e){const t=this._model.dataSourceForId(e);return null!==t&&(0,or.isPriceDataSource)(t)&&this._model.isUnmergeAvailableForSource(t)}
unmergeSelectionUp(){this._unmergeSelection(0)}unmergeSelectionDown(){this._unmergeSelection(1)}copySelection(){const e=this._getSelectedEntities(),t=e.map((e=>(0,w.ensureNotNull)(this._model.dataSourceForId(So(e.id()).persistentId))));this._chart.value().chartWidgetCollection().clipboard.uiRequestCopy(t),Sn("Copy",_n(e))}cloneSelection(){const e=this._getSelectedEntities(),t=e.map((e=>(0,w.ensureNotNull)(this._model.dataSourceForId(So(e.id()).persistentId))));t.every(Eo.isLineTool)&&(this._controller.cloneLineTools([...t],!1),Sn("Clone",_n(e)))}rename(e,t){const n=this._getObjectsToModify(e.id());1===n.length&&n.some((e=>e.canBeRenamed()))&&(t(),Sn("Rename",_n(n)))}async openContextMenu(e,t,n){this._objects=this._getObjectsToModify(e.id());const o=this._facade.canBeGroupped(this._objects);let r;if(this._objects.some((e=>e.hasChildren())))r=await this._getActionsForGroupItem(e,t,o);else{const e=await this._facade.contextMenuActions(this._chart.value(),this._objects,this._options);if(r=Array.from(e).filter(((e,t,n)=>"separator"!==e.type||!n[t+1]||"separator"!==n[t+1].type)),1===this._objects.length&&this._objects[0].canBeRenamed()){const e=r.findIndex((e=>"Copy"===e.id));r.splice(-1===e?r.length:e+1,0,this._getRenameAction(t))}const n=r.findIndex((e=>"Clone"===e.id)),i=r[n];if(-1!==n&&"action"===i.type&&i.update({shortcutHint:void 0}),o){const e=this._getGroupAction();if(-1!==n)r.splice(n,0,e);else{const t=r.findIndex((e=>"Copy"===e.id));r.splice(-1===t?0:t,0,e)}}}if(r.length>0){const t=So(e.id()).persistentId,o=this._model.dataSourceForId(t),i=o instanceof lr.Series,s=0!==e.childrenIds().size;let l;l=i?{menuName:"ObjectTreeContextMenu",detail:{type:"series",id:o.instanceId()}}:(0,Eo.isLineTool)(o)?{menuName:"ObjectTreeContextMenu",detail:{type:"shape",id:o?.id()??null}}:s?{menuName:"ObjectTreeContextMenu",detail:{type:"groupOfShapes",id:t||null}}:{menuName:"ObjectTreeContextMenu",detail:{type:"study",id:o?.id()||null}},rr.ContextMenuManager.showMenu(r,n,{takeFocus:!0,returnFocus:!0},l,(()=>{this._isContextMenuOpened.setValue(!1)})).then((()=>{this._isContextMenuOpened.setValue(!0)}))}}setHoveredObject(e){const t=e?So(e).persistentId:null;this._facade.setHoveredObject(t)}hoveredObjectChanged(){return this._facade.hoveredObjectChanged()}getNextNodeIdAfterRemove(e){const{nodes:t}=this.getState(),n=So(e).persistentId,o=t.find((t=>t.id===e)),r=this.entity(e);if(!(o&&o.parentId&&r&&r.canBeRemoved()))return null;if(r.pane().mainDataSource()?.id()===n&&!this.canNodeWithIdBeUnmerged(n)){const e=t.filter((e=>0===e.level)).map((e=>e.id)),n=this._takeNextOrPrevElement(e,o.parentId);return(0,w.ensureDefined)(t.find((e=>e.id===n))).children[0]}const i=(0,w.ensureDefined)(t.find((e=>e.id===o.parentId))).children;return 1===i.length?this.getNextNodeIdAfterRemove(o.parentId):this._takeNextOrPrevElement(i,e)}isContextMenuOpened(){return this._isContextMenuOpened.readonly()}getChartLayout(){return this._chart.value().chartWidgetCollection().layout}_takeNextOrPrevElement(e,t){const n=e.indexOf(t);return e[n===e.length-1?n-1:n+1]}
_getGroupAction(){return new sr.ActionWithStandardIcon({actionId:"ObjectsTree.CreateGroup",options:{label:Vn,iconId:"ObjectsTree.CreateGroup",onExecute:()=>{this.createGroupFromSelection()}}})}_getRenameAction(e){return new sr.ActionWithStandardIcon({actionId:"ObjectsTree.RenameItem",options:{label:Gn,iconId:"ObjectsTree.RenameItem",onExecute:()=>{e(),Sn("Context menu rename",_n(this._objects))}}})}async _getActionsForGroupItem(e,t,n){const o=[];this._objects.forEach((e=>e.addSourcesToArray(o)));const r=[];1===this._objects.length&&r.unshift(this._getRenameAction(t),new ir.Separator),n&&r.unshift(this._getGroupAction(),new ir.Separator);const{createSyncDrawingActions:i}=await(0,wo.actionsProviderModule)(),s=i(this._chart.value(),o.filter(Eo.isLineTool));s.length&&r.push(...s,new ir.Separator);const l=this._chart.value().actions().format.getState();return r.push(new ir.Action({actionId:"ObjectsTree.ToggleItemLocked",options:{label:e.isLocked()?Hn:Un,icon:e.isLocked()?cr:dr,onExecute:()=>this.setIsLocked(e.id(),!e.isLocked())}}),new ir.Action({actionId:"ObjectsTree.ToggleItemVisibility",options:{label:e.isVisible()?Kn:Zn,icon:e.isVisible()?ur:hr,onExecute:()=>this.setIsVisible(e.id(),!e.isVisible())}}),new ir.Action({actionId:"ObjectsTree.RemoveItem",options:{label:$n,icon:fr,onExecute:()=>this.remove(e.id()),hotkeyHash:T.isMacKeyboard?8:46}}),new ir.Separator,new ir.Action({actionId:l.actionId,options:{label:l.label,icon:l.icon,onExecute:()=>this.openProperties(e)}})),r}_unmergeSelection(e){const t=this._getSelectedEntities();if(1!==t.length)throw new Error("Only one object can be unmerged");const n=t[0],o=(0,w.ensureNotNull)(this._model.dataSourceForId(So(n.id()).persistentId));if(!(0,or.isPriceDataSource)(o))throw new Error("Entity is not IPriceDataSource");(0===e?this._controller.unmergeSourceUp:this._controller.unmergeSourceDown).call(this._controller,o);Sn(0===e?"New pane above":"New pane below",_n([n]))}_recalculateTree(){const e=new yo(this._controller,this._facade);this._nodes=e.buildTree()}_normalizeTargetAndDropType(e,t){let n=this._ensuredEntity(e);return"inside"===t&&(t="before",n=(0,w.ensureNotNull)(this.entity([...n.childrenIds()].shift()||""))),[n,t]}_getSelectedEntities(){const{selected:e,removed:t}=this._selection.selected().reduce(((e,t)=>{const n=this._getEntityById(t);return n?(e.selected.push(n),e):(e.removed.push(t),e)}),{selected:[],removed:[]});return t.length&&pr.logWarn(`Detected dangling sources in selection. They will be ignored: ${JSON.stringify(t)}`),e}_getEntityById(e){return this._facade.getObjectById(e)}}var Tr=n(87740),wr=n(64483);class Ir extends Tr.DialogRenderer{constructor(){super(),this._handleClose=()=>{this._rootInstance?.unmount(),this._setVisibility(!1),null!==this._viewModel&&(this._viewModel.destroy(),this._viewModel=null)};const e=(0,fo.service)(po.CHART_WIDGET_COLLECTION_SERVICE);this._activeChartWidget=e.activeChartWidget.value(),this._viewModel=new Cr(e.activeChartWidget)}hide(){this._handleClose()}isVisible(){return this.visible().value()}show(){
this.isVisible()||h().then((()=>{null!==this._viewModel&&(this._rootInstance=(0,wr.createReactRoot)(o.createElement(uo,{onClose:this._handleClose,viewModel:this._viewModel,activeChartWidget:this._activeChartWidget}),this._container),this._setVisibility(!0))}))}}},20425:(e,t,n)=>{"use strict";n.d(t,{useForceUpdate:()=>o.useForceUpdate});var o=n(49892)},53530:(e,t,n)=>{"use strict";n.d(t,{hoverMouseEventFilter:()=>s,useAccurateHover:()=>l,useHover:()=>r,useHoverDeprecated:()=>i});var o=n(79474);function r(){const[e,t]=(0,o.useState)(!1);return[e,{onMouseEnter:function(e){t(!0)},onMouseLeave:function(e){t(!1)}}]}function i(){const[e,t]=(0,o.useState)(!1);return[e,{onMouseOver:function(e){s(e)&&t(!0)},onMouseOut:function(e){s(e)&&t(!1)}}]}function s(e){return!e.currentTarget.contains(e.relatedTarget)}function l(e){const[t,n]=(0,o.useState)(!1);return(0,o.useEffect)((()=>{const t=t=>{if(null===e.current)return;const o=e.current.contains(t.target);n(o)};return document.addEventListener("mouseover",t),()=>document.removeEventListener("mouseover",t)}),[]),t}},90602:(e,t,n)=>{"use strict";n.d(t,{ToolbarIconButton:()=>l});var o=n(79474),r=n(21404),i=n(38003);const s=(0,o.forwardRef)((function(e,t){const{tooltip:n,...r}=e;return o.createElement(i.ToolWidgetIconButton,{"aria-label":n,...r,tag:"button",ref:t,"data-tooltip":n,"data-tooltip-show-on-focus":"true"})})),l=(0,o.forwardRef)((function(e,t){const[n,i]=(0,r.useRovingTabindexElement)(t);return o.createElement(s,{...e,ref:n,tabIndex:i})}))},24319:(e,t,n)=>{"use strict";n.d(t,{ToolbarMenuButton:()=>d});var o=n(79474),r=n(73064),i=n(21404),s=n(24498),l=n(95387),a=n(60714);const c=(0,o.forwardRef)((function(e,t){const{tooltip:n,tag:i,buttonRef:s,reference:c,...d}=e,u=(0,r.useFunctionalRefObject)(c??null);return o.createElement(l.ToolWidgetMenu,{"aria-label":n,...d,ref:t,tag:i??"button",reference:s??u,"data-tooltip":n,onMenuKeyDown:a.handleAccessibleMenuKeyDown,onMenuFocus:e=>(0,a.handleAccessibleMenuFocus)(e,s??u)})})),d=(0,o.forwardRef)((function(e,t){const{tooltip:n,menuReference:l=null,...a}=e,[d,u]=(0,i.useRovingTabindexElement)(null),h=(0,r.useFunctionalRefObject)(l);return o.createElement(c,{"aria-label":n,"aria-haspopup":"menu",...s.MouseClickAutoBlurHandler.attributes(),...a,ref:t,tag:"button",buttonRef:d,tabIndex:u,menuReference:h,tooltip:n})}))},2739:(e,t,n)=>{"use strict";n.d(t,{Toolbar:()=>u});var o=n(79474),r=n(85842),i=n(69550),s=n(47893),l=n(78122),a=n(87918),c=n(73064),d=n(24498);const u=(0,o.forwardRef)((function(e,t){const{onKeyDown:n,orientation:u,blurOnEscKeydown:h=!0,blurOnClick:f=!0,...p}=e,g=(0,c.useFunctionalRefObject)(t);return(0,o.useLayoutEffect)((()=>{const e=(0,r.ensureNotNull)(g.current),t=()=>{const t=(0,l.queryTabbableElements)(e).sort(l.navigationOrderComparator);if(0===t.length){const[t]=(0,l.queryFocusableElements)(e).sort(l.navigationOrderComparator);if(void 0===t)return;(0,a.becomeMainElement)(t)}if(t.length>1){const[,...e]=t;for(const t of e)(0,a.becomeSecondaryElement)(t)}}
;return window.addEventListener("keyboard-navigation-activation",t),()=>window.removeEventListener("keyboard-navigation-activation",t)}),[]),o.createElement("div",{...d.MouseClickAutoBlurHandler.attributes(f),...p,role:"toolbar","aria-orientation":u,ref:g,onKeyDown:(0,i.createSafeMulticastEventHandler)((function(e){if(e.defaultPrevented)return;if(!(document.activeElement instanceof HTMLElement))return;const t=(0,s.hashFromEvent)(e);if(h&&27===t)return e.preventDefault(),void document.activeElement.blur();if("vertical"!==u&&37!==t&&39!==t)return;if("vertical"===u&&38!==t&&40!==t)return;const n=e.currentTarget,o=(0,l.queryFocusableElements)(n).sort(l.navigationOrderComparator);if(0===o.length)return;const r=o.indexOf(document.activeElement);if(-1===r)return;e.preventDefault();const i=()=>{const e=(r+o.length-1)%o.length;(0,a.becomeSecondaryElement)(o[r]),(0,a.becomeMainElement)(o[e]),o[e].focus()},c=()=>{const e=(r+o.length+1)%o.length;(0,a.becomeSecondaryElement)(o[r]),(0,a.becomeMainElement)(o[e]),o[e].focus()};switch((0,l.mapKeyCodeToDirection)(t)){case"inlinePrev":"vertical"!==u&&i();break;case"inlineNext":"vertical"!==u&&c();break;case"blockPrev":"vertical"===u&&i();break;case"blockNext":"vertical"===u&&c()}}),n),"data-tooltip-show-on-focus":"true"})}))},16098:e=>{e.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>'},65237:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path stroke="currentColor" d="M8 5l3.5 3.5L8 12"/></svg>'},76958:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M5.5 11.5v8a1 1 0 0 0 1 1h15a1 1 0 0 0 1-1v-8m-17 0v-4a1 1 0 0 1 1-1h4l2 2h9a1 1 0 0 1 1 1v2m-17 0h17"/></svg>'},58567:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M5.5 6C4.67 6 4 6.67 4 7.5V20.5c0 .83.67 1.5 1.5 1.5H16v-1H5.5a.5.5 0 0 1-.5-.5V12h16v1h1V9.5c0-.83-.67-1.5-1.5-1.5h-8.8L9.86 6.15 9.71 6H5.5zM21 11H5V7.5c0-.28.22-.5.5-.5h3.8l1.85 1.85.14.15h9.21c.28 0 .5.22.5.5V11zm1 11v-3h3v-1h-3v-3h-1v3h-3v1h3v3h1z"/></svg>'},40870:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M2.448 10.124a10.82 10.82 0 0 1-.336-.609L2.105 9.5l.007-.015a12.159 12.159 0 0 1 1.686-2.466C5.002 5.665 6.752 4.373 9.05 4.373c2.297 0 4.047 1.292 5.25 2.646a12.166 12.166 0 0 1 1.687 2.466l.007.015-.007.015a12.163 12.163 0 0 1-1.686 2.466c-1.204 1.354-2.954 2.646-5.251 2.646-2.298 0-4.048-1.292-5.252-2.646a12.16 12.16 0 0 1-1.35-1.857zm14.558-.827l-.456.203.456.203v.002l-.003.005-.006.015-.025.052a11.813 11.813 0 0 1-.461.857 13.163 13.163 0 0 1-1.463 2.011c-1.296 1.46-3.296 2.982-5.998 2.982-2.703 0-4.703-1.522-6-2.982a13.162 13.162 0 0 1-1.83-2.677 7.883 7.883 0 0 1-.118-.243l-.007-.015-.002-.005v-.001l.456-.204-.456-.203v-.002l.002-.005.007-.015a4.66 4.66 0 0 1 .119-.243 13.158 13.158 0 0 1 1.83-2.677c1.296-1.46 3.296-2.982 5.999-2.982 2.702 0 4.702 1.522 5.998 2.981a13.158 13.158 0 0 1 1.83 2.678 8.097 8.097 0 0 1 .119.243l.006.015.003.005v.001zm-.456.203l.456-.203.09.203-.09.203-.456-.203zM1.092 9.297l.457.203-.457.203-.09-.203.09-.203zm9.958.203c0 1.164-.917 2.07-2 2.07-1.084 0-2-.906-2-2.07 0-1.164.916-2.07 2-2.07 1.083 0 2 .906 2 2.07zm1 0c0 1.695-1.344 3.07-3 3.07-1.657 0-3-1.375-3-3.07 0-1.695 1.343-3.07 3-3.07 1.656 0 3 1.375 3 3.07z"/></svg>'},77967:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M7 5.5a2.5 2.5 0 0 1 5 0V7H7V5.5zM6 7V5.5a3.5 3.5 0 1 1 7 0V7a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2zm8 2a1 1 0 0 0-1-1H6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V9zm-3 2.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>'},33829:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M21.106 12.5H6.894a.5.5 0 0 1-.318-.886L14 5.5l7.424 6.114a.5.5 0 0 1-.318.886zM21.106 16.5H6.894a.5.5 0 0 0-.318.886L14 23.5l7.424-6.114a.5.5 0 0 0-.318-.886z"/></svg>'},13565:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M4.605 14.089A10.052 10.052 0 0 1 4.56 14l.046-.089a17.18 17.18 0 0 1 2.329-3.327C8.58 8.758 10.954 7 14 7c3.046 0 5.421 1.757 7.066 3.585A17.18 17.18 0 0 1 23.44 14l-.046.089a17.18 17.18 0 0 1-2.329 3.327C19.42 19.242 17.046 21 14 21c-3.046 0-5.421-1.757-7.066-3.584a17.18 17.18 0 0 1-2.329-3.327zm19.848-.3L24 14l.453.212-.001.002-.003.005-.009.02a16.32 16.32 0 0 1-.662 1.195c-.44.72-1.1 1.684-1.969 2.65C20.08 20.008 17.454 22 14 22c-3.454 0-6.079-1.993-7.81-3.916a18.185 18.185 0 0 1-2.469-3.528 10.636 10.636 0 0 1-.161-.318l-.01-.019-.002-.005v-.002L4 14a55.06 55.06 0 0 1-.453-.212l.001-.002.003-.005.009-.02.033-.067a16.293 16.293 0 0 1 .629-1.126c.44-.723 1.1-1.686 1.969-2.652C7.92 7.993 10.546 6 14 6c3.454 0 6.079 1.993 7.81 3.916a18.183 18.183 0 0 1 2.469 3.528 10.588 10.588 0 0 1 .161.318l.01.019.002.005v.002zM24 14l.453-.211.099.211-.099.211L24 14zm-20.453-.211L4 14l-.453.211L3.448 14l.099-.211zM11 14a3 3 0 1 1 6 0 3 3 0 0 1-6 0zm3-4a4 4 0 1 0 0 8 4 4 0 0 0 0-8zm0 5a1 1 0 1 0 0-2 1 1 0 0 0 0 2z"/></svg>'},85701:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" fill="none"><path stroke="currentColor" d="M4.5 12.5l4.59-4.59a2 2 0 0 1 2.83 0l3.17 3.17a2 2 0 0 0 2.83 0L22.5 6.5m-8 9.5v5.5M12 19l2.5 2.5L17 19m4.5 3v-5.5M19 19l2.5-2.5L24 19"/></svg>'},22201:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 28 28" width="28" height="28" fill="none"><path stroke="currentColor" d="M5.5 16.5l4.586-4.586a2 2 0 0 1 2.828 0l3.172 3.172a2 2 0 0 0 2.828 0L23.5 10.5"/></svg>'},18069:e=>{e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M11.5 4A2.5 2.5 0 0 0 7 5.5V7h6a2 2 0 0 1 2 2v5a2 2 0 0 1-2 2H6a2 2 0 0 1-2-2V9a2 2 0 0 1 2-2V5.5a3.5 3.5 0 0 1 6.231-2.19c-.231.19-.73.69-.73.69zM13 8H6a1 1 0 0 0-1 1v5a1 1 0 0 0 1 1h7a1 1 0 0 0 1-1V9a1 1 0 0 0-1-1zm-2 3.5a1.5 1.5 0 1 1-3 0 1.5 1.5 0 0 1 3 0z"/></svg>'},89553:e=>{
e.exports='<svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" fill="none"><path fill="currentColor" fill-rule="evenodd" clip-rule="evenodd" d="M14.692 3.012l-12 12.277.715.699 12-12.277-.715-.699zM9.05 15.627a7.042 7.042 0 0 1-3.144-.741l.742-.76c.72.311 1.52.5 2.402.5 2.297 0 4.047-1.29 5.25-2.645a12.168 12.168 0 0 0 1.687-2.466l.007-.015-.007-.015A12.166 12.166 0 0 0 14.3 7.019c-.11-.124-.225-.247-.344-.37l.699-.715c.137.14.268.28.392.42a13.16 13.16 0 0 1 1.83 2.678 8.117 8.117 0 0 1 .119.243l.006.015.003.005v.001l-.456.204.456.203v.002l-.003.005-.006.015-.025.052a11.762 11.762 0 0 1-.461.857 13.158 13.158 0 0 1-1.463 2.011c-1.296 1.46-3.296 2.982-5.998 2.982zm7.5-6.127l.456-.203.09.203-.09.203-.456-.203zm-7.5 3.07c-.27 0-.53-.037-.778-.105l.879-.899c.999-.052 1.833-.872 1.895-1.938l.902-.923c.066.253.102.52.102.795 0 1.695-1.344 3.07-3 3.07zM6.15 10.294l.902-.923c.063-1.066.896-1.886 1.895-1.938l.879-.9a2.94 2.94 0 0 0-.777-.103c-1.657 0-3 1.374-3 3.069 0 .275.035.541.101.795zM9.05 4.373c.88 0 1.68.19 2.4.5l.743-.759a7.043 7.043 0 0 0-3.143-.74c-2.703 0-4.703 1.521-6 2.98a13.159 13.159 0 0 0-1.83 2.678 7.886 7.886 0 0 0-.118.243l-.007.015-.002.005v.001l.456.204-.457-.203-.09.203.09.203.457-.203-.456.203v.002l.002.005.007.015a4.5 4.5 0 0 0 .119.243 13.152 13.152 0 0 0 1.83 2.677c.124.14.255.28.392.42l.7-.715c-.12-.122-.235-.245-.345-.369a12.156 12.156 0 0 1-1.686-2.466L2.105 9.5l.007-.015a12.158 12.158 0 0 1 1.686-2.466C5.002 5.665 6.752 4.373 9.05 4.373z"/></svg>'}}]);