@deephaven/code-studio 0.19.2-beta.12 → 0.19.2-beta.14
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -2,7 +2,7 @@ import{A as R,z as S,R as Y,P as Up,B as h,C as ht,D as W,E as w,F as hi,G as il
|
|
|
2
2
|
`).map(i=>i.trim());switch(n){case Lt.ERROR:s=s.splice(e[0]==="Error"?4:3);break;case Lt.UNCAUGHT_ERROR:s=s.splice(e[0]==="Error"?3:2);break}return s!=null?` ${s.join(`
|
|
3
3
|
`)}`:""}constructor(e){this.history=[],this.offset=0,this.limit=1e4,this.isEnabled=!1,this.proxy=e,this.addHistory=this.addHistory.bind(this)}enable(){this.isEnabled||(this.proxy.addEventListener(Lt.DEBUG,this.addHistory),this.proxy.addEventListener(Lt.LOG,this.addHistory),this.proxy.addEventListener(Lt.WARN,this.addHistory),this.proxy.addEventListener(Lt.ERROR,this.addHistory),this.proxy.addEventListener(Lt.UNCAUGHT_ERROR,this.addHistory),this.isEnabled=!0)}disable(){!this.isEnabled||(this.proxy.removeEventListener(Lt.DEBUG,this.addHistory),this.proxy.removeEventListener(Lt.LOG,this.addHistory),this.proxy.removeEventListener(Lt.WARN,this.addHistory),this.proxy.removeEventListener(Lt.ERROR,this.addHistory),this.proxy.removeEventListener(Lt.UNCAUGHT_ERROR,this.addHistory),this.isEnabled=!1)}addHistory({type:e,detail:n}){const s={type:e,messages:n,time:new Date};switch(e){case Lt.ERROR:case Lt.UNCAUGHT_ERROR:s.stack=Error().stack;break}this.history[this.offset%this.limit]=s,this.offset+=1}getHistory(){if(this.offset>this.limit){const e=this.offset%this.limit;this.history=this.history.slice(e).concat(this.history.slice(0,e)),this.offset=this.limit}return this.history}getFormattedHistory(){return this.getHistory().map(n=>`${n.time.toISOString()} ${n.type} ${Vr.formatMessages(n.messages)}`+(n.stack!=null?`
|
|
4
4
|
${Vr.formatStack(n.stack,n.type)}`:"")).join(`
|
|
5
|
-
`)}}const Wg=X.module("Tooltip"),en=class extends S.exports.Component{constructor(t){super(t),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowMouseMove=this.handleWindowMouseMove.bind(this),this.handleWheel=this.handleWheel.bind(this),this.handleTimeout=this.handleTimeout.bind(this),this.handleExited=this.handleExited.bind(this),this.stopShowingTooltip=this.stopShowingTooltip.bind(this),this.container=Y.createRef(),this.popper=Y.createRef(),this.parent=null,this.timer=null,this.state={isShown:!1}}static handleHidden(){en.shownTooltipCount-=1,en.shownTooltipCount===0&&(en.lastHiddenTime=Date.now())}static handleShown(){en.shownTooltipCount+=1}componentDidMount(){this.startListening();const{timeout:t}=this.props;t===0&&this.show()}componentDidUpdate(t,e){const{isShown:n}=e,{isShown:s}=this.state;s!==n&&(s?en.handleShown():en.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();const{isShown:t}=this.state;t&&en.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Wg.error("Tooltip doesn't have a container or a parent set!");return}this.parent=this.container.current.parentElement,this.parent.addEventListener("mousemove",this.handleMouseMove),this.parent.addEventListener("mouseleave",this.handleMouseLeave),this.parent.addEventListener("mousedown",this.stopShowingTooltip)}stopListening(){!this.parent||(this.parent.removeEventListener("mousemove",this.handleMouseMove),this.parent.removeEventListener("mouseleave",this.handleMouseLeave),this.parent.removeEventListener("mousedown",this.stopShowingTooltip))}startListeningWindow(){window.addEventListener("mousemove",this.handleWindowMouseMove,!0),window.addEventListener("contextmenu",this.stopShowingTooltip,!0),window.addEventListener("wheel",this.handleWheel)}stopListeningWindow(){window.removeEventListener("mousemove",this.handleWindowMouseMove,!0),window.removeEventListener("contextmenu",this.stopShowingTooltip,!0),window.removeEventListener("wheel",this.handleWheel)}handleMouseMove(){this.startTimer()}handleWheel(){const{isShown:t}=this.state;this.popper.current&&this.parent&&t&&!this.popper.current.element.matches(":hover")&&!this.parent.matches(":hover")&&(this.stopTimer(),this.hide())}handleMouseLeave(){const{isShown:t}=this.state;this.stopTimer();const{interactive:e}=this.props;!e&&t&&this.hide()}handleTimeout(){this.show()}handleWindowMouseMove(t){const e=t.clientX,n=t.clientY,{isShown:s}=this.state;if(!this.popper.current||!this.parent)return;const i=this.popper.current.element.getBoundingClientRect(),o=this.parent.getBoundingClientRect();e>=i.left&&e<=i.left+i.width&&n>=i.top&&n<=i.top+i.height?this.handleMouseMove():e>=o.left&&e<=o.left+o.width&&n>=o.top&&n<=o.top+o.height?this.handleMouseMove():s&&(this.stopTimer(),this.hide())}startTimer(){this.stopTimer();const{timeout:t,reshowTimeout:e}=this.props;let n=t;(en.shownTooltipCount>0||Date.now()-en.lastHiddenTime<en.triggerReshowThreshold)&&(n=e),this.timer=window.setTimeout(this.handleTimeout,n)}stopTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}show(){var e;const{isShown:t}=this.state;if(this.stopTimer(),!t){(e=this.popper.current)==null||e.show(),this.setState({isShown:!0});const{interactive:n}=this.props;n&&this.startListeningWindow()}}hide(){var t;(t=this.popper.current)==null||t.hide(),this.stopListeningWindow()}update(){var t;(t=this.popper.current)==null||t.scheduleUpdate()}handleExited(){this.setState({isShown:!1});const{onExited:t}=this.props;t()}stopShowingTooltip(){const{isShown:t}=this.state;this.stopTimer(),t&&this.hide()}render(){const{interactive:t,children:e,options:n,referenceObject:s,popperClassName:i,"data-testid":o,onEntered:r}=this.props,{isShown:l}=this.state;return h("div",{ref:this.container,style:{display:"none"},"data-testid":o,children:h(Fn,{className:W(i),options:n,ref:this.popper,onEntered:r,onExited:this.handleExited,interactive:t,referenceObject:s,children:w("div",{className:"tooltip-content",children:[" ",l&&e]})})})}};let ge=en;ge.defaultTimeout=500;ge.defaultReshowTimeout=100;ge.triggerReshowThreshold=300;ge.shownTooltipCount=0;ge.lastHiddenTime=Date.now();ge.defaultProps={interactive:!1,options:{},popperClassName:"",reshowTimeout:en.defaultReshowTimeout,timeout:en.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0};const zg=100;var Zh=(t=>(t.UP="UP",t.DOWN="DOWN",t))(Zh||{});const qs=class extends S.exports.Component{constructor(t){super(t),this.getCachedFilteredOptions=Ee((n,s)=>n.filter(i=>i.title.toLowerCase().indexOf(s.toLowerCase())>=0));let{popperOptions:e}=this.props;e={placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}},...e},this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:e},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=Xe(this.updateInputValue,zg),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=Y.createRef(),this.cbContainer=Y.createRef(),this.menuContainer=Y.createRef(),this.input=Y.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(t){if(!t)return this.setState({invalid:!1}),{value:t,isValid:!1};const{options:e}=this.props,n=e.filter(s=>s.title.toLowerCase()===t.toLowerCase());return n.length<1?(this.setState({invalid:!0}),{value:t,isValid:!1}):(this.setState({invalid:!1}),{value:n[0].value,isValid:!0})}updateInputValue(t){const{menuIsOpen:e}=this.state,{value:n,isValid:s}=this.getValueAndValidate(t);e&&this.processFilterChange(t),this.fireOnChange(n,s)}fireOnChange(t,e=!0){const{onChange:n}=this.props;n(t,e)}processFilterChange(t){var o;const{options:e}=this.props,{menuIsOpen:n}=this.state,s=t?this.getCachedFilteredOptions(e,t):e,i=s.length===1&&s[0].title===t;if(this.setState({filteredOptions:s,keyboardOptionIndex:0}),i&&n){this.closeMenu();return}(o=this.popper.current)==null||o.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var i;const{filteredOptions:e,keyboardOptionIndex:n}=this.state,s=e[n];switch(t.key){case"Enter":case"ArrowRight":t.stopPropagation(),t.preventDefault(),s!=null&&(this.setState({title:s.title,invalid:!1}),this.fireOnChange(s.value)),this.closeMenu(),(i=this.input.current)==null||i.focus();break;case"ArrowUp":t.stopPropagation(),t.preventDefault(),this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(t.stopPropagation(),t.preventDefault(),t.shiftKey){this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":t.preventDefault(),t.stopPropagation(),this.closeMenu();break}}navigateMenu(t){const{filteredOptions:e,keyboardOptionIndex:n}=this.state;let s=n;t===qs.MENU_NAVIGATION_DIRECTION.UP?n>0?(s=(s-1)%e.length,this.setState({keyboardOptionIndex:s})):n===0&&(s=e.length-1,this.setState({keyboardOptionIndex:s})):t===qs.MENU_NAVIGATION_DIRECTION.DOWN&&n<e.length&&(s=(s+1)%e.length,this.setState({keyboardOptionIndex:s})),this.scrollOptionIntoView(s)}handleInputKeyDown(t){const{onEnter:e}=this.props,{menuIsOpen:n}=this.state;n?this.handleMenuKeyDown(t):t.key==="Enter"?e():t.key==="Escape"?(this.resetValue(),t.preventDefault(),t.stopPropagation()):t.key==="ArrowRight"||t.key==="ArrowLeft"||t.key==="Tab"||t.key==="Shift"||this.openMenu()}handleInputChange(t){this.setState({title:t.target.value}),this.updateInputValue(t.target.value)}handleOptionClick(t){var e;this.setState({title:t.title,invalid:!1}),this.fireOnChange(t.value),this.closeMenu(),(e=this.input.current)==null||e.focus()}handelInputFocus(){const{menuIsOpen:t}=this.state;t||this.openMenu()}handleInputClick(){const{menuIsOpen:t}=this.state;t||this.openMenu()}handleInputBlur(t){const{menuIsOpen:e}=this.state;e&&t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(t){t.relatedTarget===this.input.current||t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var t;(t=this.input.current)==null||t.focus()}handleMenuExited(){const{menuIsOpen:t}=this.state;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){const{title:t}=this.state;this.processFilterChange(t),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var e;(e=this.popper.current)==null||e.show()})}closeMenu(t=!0){var e,n;this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),t&&((e=this.input.current)==null||e.focus()),(n=this.popper.current)==null||n.hide()}scrollOptionIntoView(t){var e;this.menuContainer.current&&((e=this.menuContainer.current.children.item(t))==null||e.scrollIntoView({behavior:"smooth",block:"nearest"}))}renderMenuElement(){const{inputWidth:t}=this.state;return h("div",{className:W("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:t},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){const{noMatchText:t}=this.props,{title:e,filteredOptions:n}=this.state;return e&&n.length===0?h("div",{className:"no-match",children:t}):n.map((s,i)=>this.renderOption(s,i))}renderOption(t,e){const{keyboardOptionIndex:n}=this.state,s=`option-${e}-${t.value}`;return h("button",{type:"button",className:W("aci-option-btn",{"keyboard-active":n===e}),onClick:()=>this.handleOptionClick(t),onFocus:()=>this.setState({keyboardOptionIndex:e}),children:t.title},s)}render(){const{options:t,inputPlaceholder:e,disabled:n,className:s,defaultTitle:i,spellCheck:o,"data-testid":r}=this.props,{title:l,menuIsOpen:a,popperOptions:d,invalid:c}=this.state;return w("div",{className:"aci-container",ref:this.cbContainer,children:[h("input",{value:l||i,className:W("form-control",s,"aci-input",{"is-invalid":c&&!a}),ref:this.input,onChange:this.handleInputChange,placeholder:e||t[0].title,disabled:n,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":r}),h(Fn,{ref:this.popper,options:d,className:W("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}};let Qa=qs;Qa.propTypes={options:R.exports.arrayOf(R.exports.shape({title:R.exports.string.isRequired,value:R.exports.string.isRequired})).isRequired,popperOptions:R.exports.shape({}),onChange:R.exports.func,inputPlaceholder:R.exports.string,disabled:R.exports.bool,className:R.exports.string,defaultTitle:R.exports.string,spellCheck:R.exports.bool,onEnter:R.exports.func,noMatchText:R.exports.string,"data-testid":R.exports.string};Qa.defaultProps={onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0};Qa.MENU_NAVIGATION_DIRECTION=Zh;R.exports.string.isRequired,R.exports.func.isRequired,R.exports.string,R.exports.string,R.exports.bool,R.exports.bool,R.exports.string,R.exports.string,R.exports.string;const rl=t=>{const{children:e,className:n,style:s,"data-testid":i}=t;return h("div",{className:W("btn-group",n),style:s,role:"group","data-testid":i,children:e})};rl.displayName="ButtonGroup";rl.propTypes={children:R.exports.node.isRequired,className:R.exports.string,style:R.exports.object,"data-testid":R.exports.string};rl.defaultProps={className:null,style:{},"data-testid":void 0};const Gg=["primary","secondary","tertiary","success","danger","inline","ghost"],Kg=["group-end"];function qg(t,e){switch(t){case"primary":return"btn-primary";case"secondary":return"btn-outline-primary";case"tertiary":return"btn-secondary";case"success":return"btn-success";case"danger":return"btn-danger";case"inline":return"btn-inline";case"ghost":return W("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function Yg(t){switch(t){case"group-end":return W("pl-2","pr-3")}}const oe=Y.forwardRef((t,e)=>{const{kind:n,variant:s,type:i,tooltip:o,icon:r,disabled:l,active:a,onClick:d,onMouseDown:c,onMouseUp:u,className:m,style:p,children:g,tabIndex:f,"data-testid":b,"aria-label":C}=t,v=Boolean(r&&g==null),T=qg(n,v);let E;s&&(E=Yg(s));let y;r&&(y=Y.isValidElement(r)?r:h(G,{icon:r}));let I;o!==void 0&&(I=typeof o=="string"?h(ge,{children:o}):o);let D=C;C===void 0&&v&&o!=null&&typeof o=="string"&&(D=o);const N=w("button",{"data-testid":b,ref:e,type:i,className:W("btn",T,E,{active:a},m),onClick:d,onMouseUp:u,onMouseDown:c,style:p,disabled:l,tabIndex:f,"aria-label":D,children:[r&&y,g,o!=null&&(l===void 0||!l)&&I]});return l!==void 0&&l?w("span",{className:"btn-disabled-wrapper",children:[N,o!==void 0&&I]}):N});oe.displayName="Button";oe.propTypes={kind:R.exports.oneOf(Gg).isRequired,variant:R.exports.oneOf(Kg),type:R.exports.oneOf(["submit","reset","button"]),tooltip(t){const{tooltip:e,icon:n,children:s}=t;return e===void 0&&n!=null&&s==null?new Error("Tooltip is required for icon only buttons"):null},icon(t){const{children:e,icon:n}=t;return n==null&&e==null?new Error("Icon is required if no children are provided"):e==null&&!Y.isValidElement(n)&&(n==null||n.iconName===""||n.iconName==null)?new Error("Icon must be react element or fontawesome IconDefinition"):null},disabled:R.exports.bool,active:R.exports.bool,onClick(t){const{onClick:e,type:n}=t;return n==="button"&&typeof e!="function"?new Error("type button requires an onClick function"):e!==void 0&&typeof e!="function"?new Error("onClick must be a function"):null},onMouseUp:R.exports.func,onMouseDown:R.exports.func,tabIndex:R.exports.number,children:R.exports.node,className:R.exports.string,style:R.exports.object,"data-testid":R.exports.string};oe.defaultProps={type:"button",onClick:void 0,onMouseUp:void 0,onMouseDown:void 0,variant:void 0,tooltip:void 0,icon:void 0,disabled:!1,active:void 0,tabIndex:void 0,children:void 0,className:void 0,style:{},"data-testid":void 0};const Oo=({className:t="theme-bg-light",children:e,role:n="role",keyboard:s=!0,isOpen:i=!1,centered:o=!1,size:r,onOpened:l,onClosed:a,toggle:d,"data-testid":c})=>{const u=S.exports.useRef(),m=S.exports.useCallback(g=>{switch(g.key){case"Escape":d==null||d();break}},[d]);S.exports.useEffect(function(){if(i&&s)return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[m,i,s]),S.exports.useEffect(function(){i&&l&&l()},[l,i]),S.exports.useEffect(function(){!i&&a&&a()},[a,i]),i&&!u.current&&(u.current=document.createElement("div"),u.current.setAttribute("style","padding-right: 15px; display: block"),u.current.setAttribute("role","presentation"),document.body.appendChild(u.current));const p=()=>{u.current&&(document.body.removeChild(u.current),u.current=void 0)};return u.current?hi.createPortal(w(he,{children:[h(ht,{appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:i,classNames:{appearActive:"show",appearDone:"show"},timeout:Tt.transitionMs,onExited:p,children:h("div",{className:W("modal-backdrop fade"),style:{zIndex:1050}})}),h(ht,{appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:i,classNames:{appearDone:"show"},timeout:Tt.transitionMs,onExited:p,children:h("div",{className:"modal fade",onClick:d,role:"dialog",style:{display:"block"},children:h("div",{className:W(`modal-dialog ${t}`,{"modal-lg":r==="lg","modal-sm":r==="sm","modal-xl":r==="xl","modal-dialog-centered":o}),style:{zIndex:1040},children:h("div",{className:"modal-content",onClick:g=>g.stopPropagation(),role:"presentation","data-testid":c,children:e})})})})]}),u.current):h(he,{})},Ao=({className:t="modal-body",style:e,children:n,"data-testid":s})=>h("div",{className:t,"data-testid":s,style:e,children:n}),Po=({className:t,children:e,closeButton:n=!0,style:s,toggle:i,"data-testid":o})=>w("div",{className:`modal-header ${t}`,style:s,children:[h("h5",{className:"modal-title",children:e}),n&&h("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close",onClick:i,children:h("span",{"aria-hidden":"true",children:"\xD7"})})]}),Za=({className:t="modal-footer",children:e,"data-testid":n})=>h("div",{className:t,"data-testid":n,children:e}),Hi=t=>{const{isOpen:e,headerText:n,bodyText:s,onCancel:i,onConfirm:o,onDiscard:r,onModalDisable:l,cancelButtonText:a="Cancel",confirmButtonText:d="Okay",discardButtonText:c="Discard",children:u,"data-testid":m}=t,p=S.exports.useRef(null),g=S.exports.useRef(null),f=S.exports.useCallback(()=>{g.current!==null&&g.current.checked&&l&&l(),o()},[o,l]);let b="";return e&&(b=typeof s=="function"?s():s),w(Oo,{isOpen:e,className:"theme-bg-light",onOpened:()=>{var C;(C=p.current)==null||C.focus()},children:[h(Po,{closeButton:!1,children:n}),h(Ao,{children:b}),w(Za,{children:[l&&w("div",{className:"custom-control custom-checkbox form-group mr-auto",children:[h("input",{type:"checkbox",className:"custom-control-input",id:"move-confirmation-checkbox",defaultChecked:!1,ref:g,"data-testid":m!==void 0?`${m}-checkbox-confirm`:void 0}),h("label",{className:"custom-control-label",htmlFor:"move-confirmation-checkbox",children:"Don't ask me again"})]}),r&&h("button",{type:"button",className:"btn btn-outline-primary mr-auto","data-dismiss":"modal",onClick:r,"data-testid":m!==void 0?`${m}-btn-discard`:void 0,children:c}),i&&h("button",{type:"button",className:"btn btn-outline-primary","data-dismiss":"modal",onClick:i,"data-testid":m!==void 0?`${m}-btn-cancel`:void 0,children:a}),w(rl,{children:[h(oe,{kind:"primary",onClick:f,ref:p,"data-testid":m!==void 0?`${m}-btn-confirm`:void 0,children:d}),u]})]})]})};Hi.propTypes={isOpen:R.exports.bool.isRequired,headerText:R.exports.string.isRequired,bodyText:R.exports.oneOfType([R.exports.string,R.exports.func]).isRequired,onCancel:R.exports.func,onConfirm:R.exports.func.isRequired,onDiscard:R.exports.func,onModalDisable:R.exports.func,cancelButtonText:R.exports.string,confirmButtonText:R.exports.string,discardButtonText:R.exports.string,children:R.exports.node,"data-testid":R.exports.string};Hi.defaultProps={children:void 0,cancelButtonText:"Cancel",confirmButtonText:"Okay",discardButtonText:"Discard",onCancel:void 0,onDiscard:void 0,onModalDisable:void 0,"data-testid":void 0};const Vi=Y.forwardRef((t,e)=>{const{children:n,className:s,disabled:i,onClick:o,style:r,id:l}=t;return h("button",{ref:e,type:"button",className:W("btn",s),onClick:o,style:r,disabled:i,id:l,children:n})});Vi.displayName="Button";Vi.propTypes={children:R.exports.node,className:R.exports.string,disabled:R.exports.bool,onClick:R.exports.func,style:R.exports.shape({}),id:R.exports.string};Vi.defaultProps={children:null,className:"",disabled:!1,onClick:()=>null,style:{},id:""};const Ja=({className:t,isFlipped:e,children:n,"data-testid":s})=>{const i=a=>{if(n.length!==2)throw new Error("CardFlip requires 2 children to function");return n[a]},o=S.exports.useRef(null),r=S.exports.useCallback(a=>{a.target===a.currentTarget&&document.body.classList.add("card-flip--is-flipping")},[]),l=S.exports.useCallback(a=>{a.target===a.currentTarget&&document.body.classList.remove("card-flip--is-flipping")},[]);return S.exports.useEffect(function(){if(!o.current)throw Error("ref undefined");o.current.addEventListener("transitionstart",r);const d=o.current;return function(){if(d!=null)return d.removeEventListener("transitionstart",r)}},[r]),w("div",{className:W(t,{"card-flip--show-front":e,"card-flip--show-back":!e}),"data-testid":s,children:[h("div",{className:"card-flip--back",children:i(0)}),h("div",{ref:o,className:"card-flip--front",onTransitionEnd:l,children:i(1)})]})};function Zl(t){return t.then!==void 0}const Ms=class{static disableAllActions(){Ms.actionsDisabled=!0}static enableAllActions(){Ms.actionsDisabled=!1}static isContextActionEvent(t){return Array.isArray(t.contextActions)}static compareActions(t,e){var n,s,i,o,r,l;return t.group!==e.group?((n=t.group)!=null?n:0)>((s=e.group)!=null?s:0)?1:-1:t.order!==e.order?((i=t.order)!=null?i:0)>((o=e.order)!=null?o:0)?1:-1:t.title!==e.title?((r=t.title)!=null?r:"")>((l=e.title)!=null?l:"")?1:-1:t!==e?t>e?1:-1:0}static sortActions(t){if(t==null||!Array.isArray(t))return[];const e=t.slice();return e.sort(Ms.compareActions),e}static isMacPlatform(){const{platform:t}=window.navigator;return t.startsWith("Mac")}static getModifierKey(){return Ms.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(t){const e=Ms.getModifierKey();return t[e]}static copyToClipboard(t){const{clipboard:e}=navigator;return e===void 0?(Ms.copyToClipboardExecCommand(t),Promise.resolve()):navigator.clipboard.writeText(t).catch(()=>{Ms.copyToClipboardExecCommand(t)})}static copyToClipboardExecCommand(t){const e=document.activeElement,n=document.createElement("textarea");if(n.value=t,document.body.appendChild(n),n.focus(),n.select(),!document.execCommand("copy"))throw new Error("Unable to execute copy command");document.body.removeChild(n),e instanceof HTMLElement&&e.focus()}static getMenuItems(t,e=!0){let n=[],s=t;Array.isArray(s)||(s=[s]);for(let i=0;i<s.length;i+=1){const o=s[i];let r;typeof o=="function"?r=o():r=o,r!=null&&(r instanceof Promise?e&&n.push(r):Array.isArray(r)?n=n.concat(r):n.push(r))}return n=n.filter(i=>i.title!==void 0||i.then||i.menuElement),n}static getNextMenuItem(t,e,n){let s=t;s<0&&e<0&&(s=n.length);for(let i=1;i<n.length+1;i+=1){const o=(s+e*i+n.length)%n.length,r=n[o];if(!(r instanceof Promise)&&r.disabled!==!0)return o}return t}};let Ne=Ms;Ne.actionsDisabled=!1;const fc=X.module("GlobalContextAction");class Xg extends S.exports.Component{constructor(e){super(e),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}componentDidMount(){document.body.addEventListener("contextmenu",this.handleContextMenu),document.body.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.body.removeEventListener("contextmenu",this.handleContextMenu),document.body.removeEventListener("keydown",this.handleKeyDown)}handleContextMenu(e){const n=e;n.contextActions==null&&(n.contextActions=[]);const{action:s}=this.props;s.title==null&&!s.menuElement||(n.contextActions==null&&(n.contextActions=[]),n.contextActions.push(s),fc.debug("Received context menu event at global action! Menu items are now: ",n.contextActions))}handleKeyDown(e){var s;const{action:n}=this.props;!Ne.actionsDisabled&&n.shortcut!==void 0&&n.shortcut.matchesEvent(e)&&(fc.debug("Global hotkey matched!",e),(s=n.action)==null||s.call(n,e),e.preventDefault(),e.stopPropagation())}render(){return null}}class jg extends S.exports.Component{render(){const{actions:e,"data-testid":n}=this.props,s=[];for(let i=0;i<e.length;i+=1){const o=e[i],{shortcut:r}=o;if(o.title!=null||o.menuElement||r){const l=h(Xg,{action:o,"data-testid":n},`${o.title}.${r==null?void 0:r.id}`);s.push(l)}}return s}}const cr=X.module("ContextActions");class se extends S.exports.Component{constructor(e){super(e),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.container=Y.createRef(),this.state={globalActions:[],keyboardActions:[]}}static triggerMenu(e,n,s,i){if(i.length===0)return;const o=new MouseEvent("contextmenu",{clientX:n,clientY:s,bubbles:!0,cancelable:!0});o.contextActions=i,e.dispatchEvent(o)}static getDerivedStateFromProps(e){if(e.actions==null||!Array.isArray(e.actions))return{globalActions:[],keyboardActions:[]};const n=e.actions.filter(i=>!Zl(i)&&typeof i!="function"&&i.isGlobal),s=e.actions.filter(i=>!Zl(i)&&typeof i!="function"&&i.isGlobal!==void 0&&!i.isGlobal&&i.shortcut!=null);return{globalActions:n,keyboardActions:s}}componentDidMount(){var e;(e=this.container.current)!=null&&e.parentElement&&(this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.addEventListener("keydown",this.handleKeyDown))}componentWillUnmount(){var e;(e=this.container.current)!=null&&e.parentElement&&(this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.removeEventListener("keydown",this.handleKeyDown))}handleContextMenu(e){const{ignoreClassNames:n=[]}=this.props;if(n.length>0){let i=e.target;for(;i!=null;){const{classList:o}=i,r=n.find(l=>o.contains(l));if(r!==void 0){cr.debug2(`Contextmenu event ignored based on the target className "${r}"`);return}i=i.parentElement}}if(Ne.isContextActionEvent(e)||(e.contextActions=[]),!Ne.isContextActionEvent(e))return;const{actions:s}=this.props;if(s!=null){let i=s;Array.isArray(i)&&(i=i.filter(o=>Zl(o)||typeof o=="function"||o.isGlobal===void 0||o.isGlobal)),e.contextActions=e.contextActions.concat(i)}cr.debug("Received context menu event! Menu items are now: ",e.contextActions)}handleKeyDown(e){var s;const{keyboardActions:n}=this.state;for(let i=0;i<n.length;i+=1){const o=n[i];!Ne.actionsDisabled&&o.shortcut!=null&&o.shortcut.matchesEvent(e)&&(cr.debug("Context hotkey matched!",e),(s=o.action)==null||s.call(o,e),e.stopPropagation(),e.preventDefault(),cr.debug2("Matched hotkey returned false, key event not consumed"))}}render(){const{"data-testid":e}=this.props,{globalActions:n}=this.state;return h("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:h(jg,{actions:n})})}}se.groups={default:null,high:100,medium:5e3,low:1e4,global:1e5,edit:100};var Qg={prefix:"vs",iconName:"arrow-left",icon:[512,512,[],"f000","m224 98.976 -160 160V281.6l160 160 22.624 -22.624 -132.672 -132.704H448v-32H113.92L246.656 121.6 224 98.976z"]},Cc={prefix:"vs",iconName:"arrow-small-down",icon:[512,512,[],"f000","m342.4 276.48 -80 80h-22.4L160 276.48l22.4 -22.72 52.8 52.48V128h32v178.24L320 253.44l22.4 23.04z"]},Sa={prefix:"vs",iconName:"arrow-small-up",icon:[512,512,[],"f000","M160 208 240 128h22.4l80 80 -22.4 22.72 -52.8 -52.48v178.24h-32V178.24L182.4 231.04 160 208z"]},Zg={prefix:"vs",iconName:"arrow-up",icon:[512,512,[],"f000","m443.328 224 -160 -160h-22.624l-160 160 22.624 22.624L256 113.952V448h32V113.92l132.672 132.704 22.656 -22.624z"]},li={prefix:"vs",iconName:"check",icon:[512,512,[],"f000","m461.792 106.336 -271.04 320 -25.28 -1.152 -107.2 -152.64 26.176 -18.368 95.296 135.68 257.632 -304.192 24.448 20.672z"]},Jg={prefix:"vs",iconName:"chevron-down",icon:[512,512,[],"f000","m255.232 322.304 139.424 -139.424 19.84 19.776L265.088 352h-19.776L96 202.656l19.808 -19.776 139.424 139.424z"]},ef={prefix:"vs",iconName:"chevron-left",icon:[512,512,[],"f000","m189.696 255.232 139.424 139.424 -19.776 19.84L160 265.088v-19.776L309.344 96l19.776 19.808 -139.424 139.424z"]},Jh={prefix:"vs",iconName:"chevron-right",icon:[512,512,[],"f000","M322.304 256.768 182.88 117.344l19.776 -19.84L352 246.912v19.776L202.656 416l-19.776 -19.808 139.424 -139.424z"]},tf={prefix:"vs",iconName:"chevron-up",icon:[512,512,[],"f000","m256.768 189.696 -139.424 139.424 -19.84 -19.776L246.912 160h19.776L416 309.344l-19.808 19.776 -139.424 -139.424z"]},Fo={prefix:"vs",iconName:"circle-large-filled",icon:[512,512,[],"f000","M256 32a217.6 217.6 0 0 1 59.52 8.096 220.768 220.768 0 0 1 98.656 57.76 220.896 220.896 0 0 1 57.728 98.656C477.312 215.616 480 235.424 480 256s-2.688 40.384 -8.096 59.52a220.8 220.8 0 0 1 -22.528 53.568 229.024 229.024 0 0 1 -80.512 80.288 222.912 222.912 0 0 1 -53.376 22.72A223.488 223.488 0 0 1 256 480a223.488 223.488 0 0 1 -59.52 -7.872 227.136 227.136 0 0 1 -53.568 -22.752 233.6 233.6 0 0 1 -45.28 -35.008 233.44 233.44 0 0 1 -35.008 -45.28 227.136 227.136 0 0 1 -22.72 -53.6A223.52 223.52 0 0 1 32 256c0 -20.576 2.624 -40.384 7.872 -59.52a222.976 222.976 0 0 1 22.752 -53.344 228.992 228.992 0 0 1 80.288 -80.512 220.64 220.64 0 0 1 53.6 -22.528A217.856 217.856 0 0 1 256 32z"]},nf={prefix:"vs",iconName:"circle-large-outline",icon:[512,512,[],"f000","M306.816 70.88A185.856 185.856 0 0 0 256 64c-17.728 0 -34.624 2.336 -50.816 6.88l-0.192 0.064c-16.448 4.512 -31.68 10.944 -45.824 19.232A196.992 196.992 0 0 0 90.24 159.36l-0.064 0.128A190.944 190.944 0 0 0 70.72 205.12 191.552 191.552 0 0 0 64 256c0 17.76 2.24 34.72 6.72 50.912a193.6 193.6 0 0 0 49.536 84.832c11.84 11.68 24.768 21.664 38.912 30.08a195.2 195.2 0 0 0 45.92 19.488A192.64 192.64 0 0 0 256 448c17.76 0 34.72 -2.24 50.912 -6.72 16.48 -4.64 31.68 -11.136 45.632 -19.424l0.128 -0.064a197.12 197.12 0 0 0 69.152 -68.96 187.2 187.2 0 0 0 19.2 -45.824l0.096 -0.192A185.824 185.824 0 0 0 448 256c0 -17.728 -2.304 -34.624 -6.88 -50.816l-0.064 -0.192a184.704 184.704 0 0 0 -19.2 -45.536l-0.064 -0.128a188.8 188.8 0 0 0 -30.144 -38.72l-0.256 -0.256a188.864 188.864 0 0 0 -38.72 -30.144l-0.128 -0.064a184.704 184.704 0 0 0 -45.536 -19.2l-0.192 -0.064zm142.56 298.24a229.024 229.024 0 0 1 -80.512 80.256 222.912 222.912 0 0 1 -53.376 22.72A223.488 223.488 0 0 1 256 480a223.488 223.488 0 0 1 -59.52 -7.872 227.136 227.136 0 0 1 -53.568 -22.752 233.6 233.6 0 0 1 -45.28 -35.008 233.44 233.44 0 0 1 -35.008 -45.28 227.136 227.136 0 0 1 -22.72 -53.6A223.52 223.52 0 0 1 32 256c0 -20.576 2.624 -40.384 7.872 -59.52a222.976 222.976 0 0 1 22.752 -53.344 228.992 228.992 0 0 1 80.288 -80.512 220.64 220.64 0 0 1 53.6 -22.528A217.856 217.856 0 0 1 256 32a217.6 217.6 0 0 1 59.52 8.096 220.768 220.768 0 0 1 98.656 57.76 220.896 220.896 0 0 1 57.728 98.656C477.312 215.616 480 235.424 480 256s-2.688 40.384 -8.096 59.52a220.8 220.8 0 0 1 -22.528 53.568z"]},sf={prefix:"vs",iconName:"circle-slash",icon:[512,512,[],"f000","M256 32a224 224 0 1 1 -224 224 224.256 224.256 0 0 1 224 -224zM64 256c0 45.376 16.128 89.28 45.536 123.84l270.304 -270.304A191.776 191.776 0 0 0 64 256zm384 0c0 -45.376 -16.128 -89.28 -45.536 -123.84L132.16 402.464A191.776 191.776 0 0 0 448 256z"]},bc={prefix:"vs",iconName:"clippy",icon:[512,512,[],"f000","M224 447.744H128v-288h256v64h32v-80l-16 -16H352v-32h-32a64 64 0 0 0 -128 0H158.08v32H112l-16 16v320l16 16H224v-32zm0 -358.4a32 32 0 0 1 25.6 -25.6 32 32 0 0 1 18.56 1.92 30.08 30.08 0 0 1 14.4 11.52 32 32 0 1 1 -56 30.08 32 32 0 0 1 -2.56 -17.92zm226.56 302.72L416 426.944v-171.2h-32v170.88l-34.56 -34.56 -22.72 22.72 62.08 61.76h22.72l61.76 -61.76 -22.72 -22.72zm-189.44 -133.12h22.72l61.76 61.76 -22.72 22.72 -34.56 -34.56v170.88h-32v-171.2l-34.56 34.88 -22.72 -22.72 62.08 -61.76z"]},Ho={prefix:"vs",iconName:"close",icon:[512,512,[],"f000","m256 278.624 116.672 116.704 22.656 -22.624L278.624 256l116.704 -116.672 -22.624 -22.656L256 233.376 139.328 116.672l-22.624 22.656L233.376 256l-116.672 116.672 22.624 22.656L256 278.624z"]},of={prefix:"vs",iconName:"cloud-download",icon:[512,512,[],"f000","M382.624 192h1.6a95.68 95.68 0 0 1 67.712 28.128 96.096 96.096 0 0 1 0 135.744 95.68 95.68 0 0 1 -67.744 28.128v-32a64.064 64.064 0 0 0 0 -128h-29.248l-3.936 -27.424a79.68 79.68 0 0 0 -68.032 -67.904A79.296 79.296 0 0 0 199.392 176l-10.656 24.384 -25.888 -6.048A79.68 79.68 0 0 0 144.736 192c-21.184 0 -41.504 8.416 -56.448 23.424A80.096 80.096 0 0 0 144.736 352h15.936v32h-15.936a111.552 111.552 0 0 1 -84.096 -37.12 112.064 112.064 0 0 1 62.656 -184.96 110.784 110.784 0 0 1 46.976 1.28 111.552 111.552 0 0 1 117.024 -65.92A111.328 111.328 0 0 1 382.624 192zm-168 163.872 42.048 42.048V224h31.808v172.8l40.896 -40.928 22.624 22.624 -68.672 68.704h-22.656L192 378.528l22.624 -22.656z"]},rf={prefix:"vs",iconName:"code",icon:[512,512,[],"f000","M150.656 178.496 65.952 263.168l84.704 84.672 -22.656 22.656 -96 -96V251.84l96 -96 22.656 22.656zm224 -22.656L352 178.496l84.704 84.672L352 347.84l22.656 22.656 96 -96V251.84l-96 -96zM157.056 416l28.608 14.336 160 -320L317.056 96l-160 320z"]},ed={prefix:"vs",iconName:"copy",icon:[512,512,[],"f000","m128 128 32 -32h173.248L448 210.752V448l-32 32H160l-32 -32V128zm288 96 -96 -96H160v320h256V224zM96 32 64 64v320l32 32V64h205.248l-32 -32H96z"]},wa={prefix:"vs",iconName:"device-camera",icon:[512,512,[],"f000","M342.624 96H464l16 16v288l-16 16h-416l-16 -16v-288l16 -16h121.376l27.296 -27.328L208 64h96l11.328 4.672 27.296 27.328zM64 384h384V128h-112l-11.328 -4.672L297.376 96H214.624l-27.296 27.328L176 128H64v256zm48 -224a16 16 0 1 0 0 32 16 16 0 0 0 0 -32zM256 192a64 64 0 1 1 0 128 64 64 0 0 1 0 -128zm0 -32a96 96 0 1 0 0 192 96 96 0 0 0 0 -192z"]},ll={prefix:"vs",iconName:"edit",icon:[512,512,[],"f000","M423.36 32h-46.72L112.64 296l-5.12 7.04L32 434.88 77.12 480l131.84 -75.52 7.04 -5.12L480 135.36V88.64L423.36 32zM77.12 434.88l48.32 -96 46.4 46.4 -94.72 49.6zm122.56 -65.92L143.04 312.32l256 -256 56.64 56.64 -256 256z"]},Sc={prefix:"vs",iconName:"file-code",icon:[512,512,[],"f000","m338.24 36.48 104.96 105.6 4.8 11.52v310.4l-16 16h-352l-16 -16v-416l16 -16h247.04l11.2 4.48zM320 160h96l-96 -96v96zM96 64v384h320V192H304L288 176V64H96zm65.984 241.056 58.144 -58.496L197.44 224 128 293.728v22.624l69.472 69.568 22.624 -22.624 -58.112 -58.24zM281.6 246.848l22.4 -22.688 70.048 69.6v22.688L304 385.984l-22.56 -22.688 58.592 -58.24L281.6 246.848z"]},lf={prefix:"vs",iconName:"file-zip",icon:[512,512,[],"f000","M80 32h352l16 16v160l-4.8 11.2 -27.2 27.52v217.28l-16 16h-320l-16 -16v-416l16 -16zM192 64H160v64h32V64zm0 384h128V245.76l-27.2 -27.2L288 207.04V64H224v80l-16 16H192v32H160V160h-16L128 144V64H96v384h64v-32h32v32zm0 -64v32h32v-32H192zm0 -32v32H160v-32h32zm0 -32h32v32H192v-32zm0 -32v32H160V288h32zm0 -32h32v32H192V256zm0 -32v32H160V224h32zm0 0h32V192H192v32zm196.8 4.8 27.2 -27.52V64h-96v136.64l27.2 27.2 4.8 11.2V448h32V240l4.8 -11.2z"]},af={prefix:"vs",iconName:"files",icon:[512,512,[],"f000","M373.333 0h-192L149.333 32V128H53.333L21.333 160v321.493L53.333 512h257.493L341.333 481.493V384h100.267l27.733 -30.507V96L373.333 0zm0 45.227 50.773 50.773H373.333V45.227zm-64 434.773h-256v-320H149.333v193.493L181.333 384h128v96zm128 -128h-256v-320H341.333V128h96v224z"]},Ur={prefix:"vs",iconName:"filter",icon:[512,512,[],"f000","M480 64v53.44l-160 152.288V448H192V269.728l-160 -152.32V64h448zM224 256v160h64V256l160 -152.32V96H64v7.68L224 256z"]},df={prefix:"vs",iconName:"folder-opened",icon:[512,512,[],"f000","M48 448h352l15.36 -11.84 84.16 -224 -15.36 -20.16H448V112l-16 -16H246.72l-27.52 -27.2L208 64h-160l-16 16v352l16 16zM64 96h137.28l27.52 27.2 11.2 4.8H416v64H272l-11.2 4.8 -27.52 27.2H112l-15.04 10.88 -32 98.56L64 96zm324.16 320H70.08l53.44 -160H240l11.2 -4.8 27.52 -27.2h185.28l-75.84 192z"]},cf={prefix:"vs",iconName:"folder",icon:[512,512,[],"f000","M464 96H246.72l-27.2 -27.2L208.32 64h-160l-16 16v352l16 16h416l16 -16v-320L464 96zm-16.32 271.68V416h-384V224h143.68l11.2 -4.8 27.52 -27.52H448v48l-0.32 128zm0 -207.68h-208l-11.2 4.8 -27.52 27.52H64v-96h137.28l27.2 27.2 11.52 4.8H448l-0.32 31.68z"]},Vo={prefix:"vs",iconName:"gear",icon:[512,512,[],"f000","M291.2 140.8 275.2 64H236.8l-16 76.8 -22.4 9.6 -64 -41.6 -28.8 25.6 41.6 64 -6.4 22.4 -76.8 16v38.4l76.8 16 9.6 25.6 -41.6 64 25.6 25.6 64 -41.6 25.6 9.6 12.8 73.6h38.4l16 -76.8 25.6 -9.6 64 41.6 25.6 -25.6 -41.6 -64 9.6 -25.6 73.6 -12.8V236.8l-76.8 -16 -9.6 -25.6 41.6 -64 -25.6 -25.6 -64 41.6 -22.4 -6.4zM300.8 32l16 76.8L384 67.2l64 64 -44.8 67.2 76.8 12.8v89.6l-76.8 16L448 384l-64 64 -67.2 -44.8 -16 76.8H211.2l-16 -76.8L128 444.8l-64 -64 44.8 -67.2L32 300.8V211.2l76.8 -16L67.2 128l64 -64 67.2 44.8 12.8 -76.8h89.6zm19.2 224c0 35.2 -28.8 64 -64 64s-64 -28.8 -64 -64 28.8 -64 64 -64 64 28.8 64 64zM256 288c19.2 0 32 -12.8 32 -32s-12.8 -32 -32 -32 -32 12.8 -32 32 12.8 32 32 32z"]},eu={prefix:"vs",iconName:"graph",icon:[512,512,[],"f000","M48 448H480v-32H64V0H32v432l16 16zM96 368v-256l16 -16h64l16 16v256l-16 16h-64l-16 -16zm64 -16V128H128v224h32zm192 -304v320l16 16h64l16 -16v-320l-16 -16h-64l-16 16zm64 16v288h-32V64h32zm-192 304v-192l16 -16h64l16 16v192l-16 16h-64l-16 -16zm64 -16V192H256v160h32z"]},al={prefix:"vs",iconName:"gripper",icon:[512,512,[],"f000","M160 96h64v64H160zm0 128h64v64H160zm0 128h64v64H160zm128 -256h64v64H288zm0 128h64v64H288zm0 128h64v64H288z"]},hf={prefix:"vs",iconName:"home",icon:[512,512,[],"f000","m267.52 43.84 203.52 185.6 -22.72 22.72L416 222.848v208.832l-16 16h-96l-16 -16v-112H224v112l-16 16h-96l-16 -16V223.104L64 252.16l-22.72 -22.72 203.2 -185.6h23.04zM128 194.016v221.664h64v-112l16 -16h96l16 16v112h64V193.824L256 77.76 128 194.016z"]},uf={prefix:"vs",iconName:"json",icon:[512,512,[],"f000","M192 95.488V64h-2.88c-10.016 0 -19.712 1.984 -29.088 5.92a74.56 74.56 0 0 0 -24.8 16.96 71.36 71.36 0 0 0 -15.776 24.096v0.032a113.344 113.344 0 0 0 -6.336 26.56v0.064a194.56 194.56 0 0 0 -0.768 27.616c0.384 9.28 0.576 18.56 0.576 27.808 0 6.496 -1.28 12.576 -3.744 18.304v0.032a48.128 48.128 0 0 1 -24.48 25.184 44.032 44.032 0 0 1 -17.856 3.68H64v31.488h2.88c6.24 0 12.16 1.28 17.792 3.872l0.032 0.032c5.696 2.496 10.528 5.888 14.56 10.176l0.064 0.064c4.16 4.16 7.456 9.12 9.824 14.88l0.032 0.064c2.496 5.76 3.744 11.776 3.744 18.112 0 9.28 -0.192 18.56 -0.576 27.808 -0.384 9.472 -0.128 18.72 0.768 27.84v0.032c1.056 9.056 3.168 17.856 6.304 26.368v0.032c3.392 8.736 8.672 16.768 15.808 24.096 7.136 7.36 15.424 13.024 24.8 16.96 9.376 3.936 19.072 5.92 29.12 5.92H192v-31.488h-2.88c-6.4 0 -12.384 -1.216 -18.016 -3.68a51.616 51.616 0 0 1 -14.624 -10.24 53.088 53.088 0 0 1 -9.888 -14.944c-2.368 -5.76 -3.52 -11.84 -3.52 -18.336 0 -7.296 0.096 -14.496 0.352 -21.504 0.256 -7.296 0.256 -14.4 0 -21.28a148.448 148.448 0 0 0 -1.76 -20.48 85.824 85.824 0 0 0 -5.376 -19.488A73.088 73.088 0 0 0 112.704 256a73.088 73.088 0 0 0 23.616 -30.56c2.56 -6.144 4.32 -12.576 5.376 -19.264 1.056 -6.72 1.632 -13.536 1.76 -20.48 0.256 -7.04 0.256 -14.144 0 -21.312 -0.256 -7.168 -0.384 -14.4 -0.384 -21.696a47.04 47.04 0 0 1 28.064 -43.328 42.56 42.56 0 0 1 18.016 -3.872H192zm128 321.024V448h2.88c10.016 0 19.712 -1.984 29.088 -5.92 9.376 -3.936 17.664 -9.6 24.8 -16.96 7.136 -7.36 12.416 -15.36 15.776 -24.096v-0.032c3.2 -8.512 5.28 -17.376 6.336 -26.56v-0.064c0.896 -8.96 1.152 -18.144 0.768 -27.616 -0.384 -9.28 -0.576 -18.56 -0.576 -27.808 0 -6.496 1.28 -12.576 3.744 -18.304v-0.032a48.064 48.064 0 0 1 24.48 -25.184 44.16 44.16 0 0 1 17.856 -3.68H448v-31.488h-2.88c-6.272 0 -12.192 -1.28 -17.824 -3.872l-0.032 -0.032a44.032 44.032 0 0 1 -14.56 -10.176l-0.064 -0.064a45.28 45.28 0 0 1 -9.824 -14.88v-0.064a44.96 44.96 0 0 1 -3.776 -18.112c0 -9.28 0.192 -18.56 0.576 -27.808a197.568 197.568 0 0 0 -0.768 -27.84v-0.032a113.184 113.184 0 0 0 -6.304 -26.368v-0.032a71.36 71.36 0 0 0 -15.808 -24.096 74.592 74.592 0 0 0 -24.8 -16.96 74.4 74.4 0 0 0 -29.12 -5.92H320v31.488h2.88c6.4 0 12.384 1.216 17.984 3.68 5.568 2.624 10.432 6.016 14.624 10.24 4.064 4.288 7.36 9.28 9.888 14.944 2.368 5.76 3.52 11.84 3.52 18.336 0 7.296 -0.096 14.464 -0.352 21.504 -0.256 7.296 -0.256 14.4 0 21.28 0.128 7.104 0.704 13.92 1.76 20.48 1.056 6.848 2.848 13.312 5.376 19.488a73.12 73.12 0 0 0 23.616 30.56 73.12 73.12 0 0 0 -23.616 30.56 86.048 86.048 0 0 0 -5.376 19.264c-1.056 6.72 -1.632 13.536 -1.76 20.48a292.8 292.8 0 0 0 0 21.312c0.256 7.168 0.384 14.4 0.384 21.696a47.072 47.072 0 0 1 -28.064 43.328 42.56 42.56 0 0 1 -18.016 3.872H320z"]},tu={prefix:"vs",iconName:"kebab-vertical",icon:[512,512,[],"f000","M238.208 442.624a32 32 0 1 0 35.552 -53.216 32 32 0 0 0 -35.52 53.184zM256 288a32 32 0 1 1 0 -64 32 32 0 0 1 0 64zm0 -160a32 32 0 1 1 0 -64 32 32 0 0 1 0 64z"]},mf={prefix:"vs",iconName:"law",icon:[512,512,[],"f000","M468.16 224 416 96h32V64H288V32H256v32H96v32h32L76.16 224H64v32h4.8c4.992 15.936 15.136 29.76 28.8 39.36a79.04 79.04 0 0 0 92.8 0A78.08 78.08 0 0 0 219.52 256H224V224h-14.4L156.16 96H256v256H192l-12.48 5.76 -64 80.32 12.48 25.92h288l12.48 -25.92 -64 -80.32L352 352H288V96h100.16l-53.44 128H320v32h4.8a79.36 79.36 0 0 0 150.72 0H480V224h-11.84zM167.04 272.32a48.64 48.64 0 0 1 -23.04 6.08 46.4 46.4 0 0 1 -22.72 -6.08A47.04 47.04 0 0 1 104 256h80a48.64 48.64 0 0 1 -16.96 16.32zM175.04 224h-64l32 -76.8 32 76.8zm169.28 160L384 432H160L199.68 384h144.64zm56.96 -236.16 32 76.8h-64l32 -76.8zm21.76 125.12a45.12 45.12 0 0 1 -23.04 6.08 43.2 43.2 0 0 1 -22.72 -6.08 49.6 49.6 0 0 1 -17.28 -16.96h80a43.84 43.84 0 0 1 -16.96 16.96z"]},pf={prefix:"vs",iconName:"link-external",icon:[512,512,[],"f000","M48 32H192v32H64v384h384v-128h32v144l-16 16h-416l-16 -16v-416l16 -16zm432 16V256h-32V86.624L231.776 302.88l-22.624 -22.656L425.376 64H256V32h208l16 16z"]},td={prefix:"vs",iconName:"link",icon:[512,512,[],"f000","M140.8 96h98.72a108.8 108.8 0 0 1 108.8 108.8v6.56A108.8 108.8 0 0 1 239.52 320H224V288h15.52A76.8 76.8 0 0 0 316.16 211.52V204.8A76.8 76.8 0 0 0 239.68 128H140.8A76.8 76.8 0 0 0 64 204.8v6.56A76.608 76.608 0 0 0 128 286.72v32a108.8 108.8 0 0 1 -96 -107.2V204.8A108.96 108.96 0 0 1 140.8 96zM384 225.28v-32a108.8 108.8 0 0 1 96 107.52v6.56A108.96 108.96 0 0 1 371.36 416h-98.88A108.8 108.8 0 0 1 163.84 307.52V300.8A108.8 108.8 0 0 1 272.48 192H288v32h-15.52A76.8 76.8 0 0 0 195.84 300.8v6.56A76.8 76.8 0 0 0 272.48 384h98.88A76.8 76.8 0 0 0 448 307.52V300.8a76.608 76.608 0 0 0 -64 -75.52z"]},gf={prefix:"vs",iconName:"list-ordered",icon:[512,512,[],"f000","M73.184 74.432 86.144 64h21.664v96h-22.656V89.344l-11.968 8.992v-23.904zM160 96h320v32H160V96zm0 128h320v32H160V224zm320 128H160v32h320v-32zM119.744 244.032l0.928 -1.248 2.08 -2.88a26.88 26.88 0 0 0 4.992 -16.224c0 -3.84 -0.64 -7.68 -1.824 -11.328a27.136 27.136 0 0 0 -15.744 -16.928 35.936 35.936 0 0 0 -14.464 -2.624 35.008 35.008 0 0 0 -14.656 2.784 27.744 27.744 0 0 0 -15.328 16.704A33.216 33.216 0 0 0 64 222.624v1.6h25.92v-1.6a9.6 9.6 0 0 1 1.472 -5.024 5.568 5.568 0 0 1 1.824 -1.728 6.08 6.08 0 0 1 5.504 0 6.016 6.016 0 0 1 1.792 1.92 7.68 7.68 0 0 1 0.992 2.592 14.24 14.24 0 0 1 -1.152 9.28 41.888 41.888 0 0 1 -3.84 5.824l-32 36.416 -0.384 0.416v17.28h63.616v-22.4h-28.8l20.8 -23.168zm-1.184 122.144c1.472 1.024 2.752 2.24 3.84 3.648a26.912 26.912 0 0 1 5.344 17.6c0 3.424 -0.544 6.816 -1.6 10.048a25.344 25.344 0 0 1 -15.584 16 41.216 41.216 0 0 1 -15.36 2.528c-3.68 0 -7.36 -0.512 -10.912 -1.568a30.08 30.08 0 0 1 -8.256 -3.936 24.032 24.032 0 0 1 -5.824 -5.664 34.016 34.016 0 0 1 -3.712 -6.4A33.216 33.216 0 0 1 64 386.496v-1.568h26.048v1.568c0 0.864 0.096 1.76 0.288 2.624a6.624 6.624 0 0 0 0.96 2.368 4.48 4.48 0 0 0 1.696 1.664 6.4 6.4 0 0 0 5.024 0.256 5.088 5.088 0 0 0 1.792 -1.248 7.04 7.04 0 0 0 1.344 -2.4 13.344 13.344 0 0 0 0.544 -4.032 15.456 15.456 0 0 0 -0.704 -5.216 6.4 6.4 0 0 0 -1.632 -2.56 4.416 4.416 0 0 0 -1.92 -0.928 17.184 17.184 0 0 0 -2.464 -0.224h-5.152v-20.64h5.376a7.712 7.712 0 0 0 2.208 -0.352 5.248 5.248 0 0 0 2.08 -1.088 5.6 5.6 0 0 0 1.536 -2.144 9.152 9.152 0 0 0 0.672 -3.872 8.96 8.96 0 0 0 -0.512 -3.2 5.312 5.312 0 0 0 -3.104 -3.168 6.4 6.4 0 0 0 -4.992 0.224 5.248 5.248 0 0 0 -1.76 1.696 11.008 11.008 0 0 0 -1.28 4.992v1.568H64v-1.568a31.584 31.584 0 0 1 5.76 -17.408 25.6 25.6 0 0 1 5.728 -5.952 27.84 27.84 0 0 1 8.384 -4.256c3.648 -1.152 7.488 -1.696 11.328 -1.632 3.712 -0.032 7.392 0.32 11.008 1.152 2.944 0.672 5.76 1.76 8.416 3.2a24.224 24.224 0 0 1 10.24 10.176 23.36 23.36 0 0 1 2.88 11.104 25.92 25.92 0 0 1 -5.344 16.896 17.984 17.984 0 0 1 -3.84 3.648z"]},nu={prefix:"vs",iconName:"loading",icon:[512,512,[],"f000","M445.344 224A192.064 192.064 0 0 0 66.656 224H34.272a224.064 224.064 0 0 1 443.456 0h-32.384z"]},ff={prefix:"vs",iconName:"lock",icon:[512,512,[],"f000","M416 224h-32V160a128 128 0 1 0 -256 0v64H96L64 256v192l32 32h320l32 -32V256l-32 -32zM160 160a96 96 0 1 1 192 0v64H160V160zm256 288H96V256h320v192z"]},Cf={prefix:"vs",iconName:"markdown",icon:[512,512,[],"f000","M203.04 160h67.2v209.056H223.776l1.76 -169.92 -56.768 169.92H130.304l-57.76 -169.92c1.28 20.608 1.92 169.92 1.92 169.92H32V160h68.992s48.896 143.776 50.464 153.824L203.04 160zm214.72 115.744v-112H355.52v112H293.312l93.344 93.312L480 275.744h-62.24z"]},bf={prefix:"vs",iconName:"menu",icon:[512,512,[],"f000","M512 160H0V128h512v32zm0 256H0v-32h512v32zm0 -128.256H0V256h512v31.744z"]},su={prefix:"vs",iconName:"new-file",icon:[512,512,[],"f000","m304 35.2 108.8 112 3.2 12.8v64h-32V192H256V64H96v352h128v32H80l-16 -16v-384l16 -16h214.4l9.6 3.2zM288 64v96h92.8L288 64zm128 448h-32v-96H288v-32h96V288h32v96h96v32h-96v96z"]},Sf={prefix:"vs",iconName:"new-folder",icon:[512,512,[],"f000","M464 64H246.72l-27.2 -27.2L208.32 32h-160l-16 16v352l16 16H224v-32H63.68V192h143.68l11.2 -4.8 27.52 -27.52H448v48l-0.032 16.32h32.352V80L464 64zm-16.32 64h-208l-11.2 4.8 -27.52 27.52H64v-96h137.28l27.2 27.2 11.52 4.8H448l-0.32 31.68zM416 512h-32v-96H288v-32h96V288h32v96h96v32h-96v96z"]},nd={prefix:"vs",iconName:"pass-filled",icon:[512,512,[],"f000","M256 480A224 224 0 1 0 256 32a224 224 0 0 0 0 448zm-32.64 -132.16h-22.72L128 275.2l22.72 -22.72 61.44 61.44 134.4 -134.72 22.72 22.72 -145.92 145.92z"]},sd={prefix:"vs",iconName:"pass",icon:[512,512,[],"f000","M200.64 347.84h22.72l145.92 -145.92 -22.72 -22.72 -134.4 134.72 -61.44 -61.44L128 275.2l72.64 72.64zM275.2 32c51.2 3.2 99.2 28.8 134.4 64 41.6 44.8 64 99.2 64 163.2 0 51.2 -19.2 99.2 -51.2 140.8 -32 38.4 -76.8 67.2 -128 76.8 -51.2 9.6 -102.4 3.2 -147.2 -22.4 -44.8 -25.6 -80 -64 -99.2 -112C28.8 294.4 25.6 240 41.6 192c16 -51.2 44.8 -92.8 89.6 -121.6C172.8 41.6 224 28.8 275.2 32zm16 412.8c41.6 -9.6 80 -32 108.8 -67.2 25.6 -35.2 41.6 -76.8 38.4 -121.6 0 -51.2 -19.2 -102.4 -54.4 -137.6 -32 -32 -70.4 -51.2 -115.2 -54.4 -41.6 -3.2 -86.4 6.4 -121.6 32 -35.2 25.6 -60.8 60.8 -73.6 105.6 -12.8 41.6 -12.8 86.4 6.4 128 19.2 41.6 48 73.6 86.4 96 38.4 22.4 83.2 28.8 124.8 19.2z"]},Br={prefix:"vs",iconName:"play",icon:[512,512,[],"f000","M120.96 64 96 77.12v384l24.96 13.44 288 -192V256l-288 -192zM128 431.36V107.2l243.2 162.24L128 431.36z"]},va={prefix:"vs",iconName:"preview",icon:[512,512,[],"f000","M64 64h384l32 32v320l-32 32H64l-32 -32V96l32 -32zm0 352h384V96H64v320zm352 -288H96v96h320V128zm-32 64H128V160h256v32zm-96 192h128V256H288v128zm32 -96h64v64h-64V288zM224 256H96v32h128V256zm-128 96h128v32H96v-32z"]},wf={prefix:"vs",iconName:"record-keys",icon:[512,512,[],"f000","M448 96H96a32 32 0 0 0 -32 32v224a32 32 0 0 0 32 32h352a32 32 0 0 0 32 -32V128a32 32 0 0 0 -32 -32zm0 256H96V128h352v224zm-96 -192h-32v32h32V160zm-32 64H288v32h32V224zm64 -64h32v32h-32V160zm32 128h-32v32h32V288zM192 288h160v32H192V288zm224 -64h-64v32h64V224zM256 160h32v32H256V160zm0 64H224v32h32V224zM128 288h32v32H128V288zm0 -128h32v32H128V160zm96 0H192v32h32V160zM128 224h64v32H128V224z"]},Fi={prefix:"vs",iconName:"refresh",icon:[512,512,[],"f000","M149.792 96H64V64h112l16 16V192H160V128a160 160 0 1 0 144.96 -24.352l9.664 -30.528A192 192 0 1 1 149.792 96z"]},Jn={prefix:"vs",iconName:"remove",icon:[512,512,[],"f000","M480 256H32V224h448v32z"]},vf={prefix:"vs",iconName:"reply",icon:[512,512,[],"f000","m201.792 68.672 -128.64 128.64v22.656l128.64 128.64 22.656 -22.624L121.824 223.36H182.08c90.016 0 147.36 19.36 182.56 55.328 35.264 36 51.68 92.064 51.68 173.472v11.2h32v-11.2c0 -84.672 -16.864 -151.04 -60.8 -195.872C343.52 211.36 275.744 191.36 182.08 191.36H124.384l100.064 -100.032 -22.656 -22.656z"]},Tf={prefix:"vs",iconName:"ruby",icon:[512,512,[],"f000","m32 230.08 212.48 212.48h23.04L480 230.08v-23.04l-106.24 -106.24 -11.52 -4.8H149.76l-11.52 4.8L32 207.04v23.04zm224 177.92L66.56 218.56 156.48 128h199.04l89.92 90.56L256 408zm0 -247.36h86.08l57.92 57.92 -144 140.8V160.64z"]},iu={prefix:"vs",iconName:"save",icon:[512,512,[],"f000","m427.296 36.672 48 48L480 96v368l-16 16h-416l-16 -16v-416l16 -16H416l11.296 4.672zM64 64v384h384V102.656L409.376 64H352v128H128V64H64zm192 0v96h64V64H256z"]},ou={prefix:"vs",iconName:"search",icon:[512,512,[],"f000","M325.333 0a176 176 0 0 0 -131.84 292.693L21.333 488.107l23.893 21.333 171.733 -194.56A176.021 176.021 0 1 0 325.333 0.213V0zm0 320a144 144 0 1 1 0 -288 144 144 0 0 1 0 288z"]},Ef={prefix:"vs",iconName:"split-horizontal",icon:[512,512,[],"f000","M448 32H96L64 64v352l32 32h352l32 -32V64l-32 -32zM256 416H96V64h160v352zm192 0H288V64h160v352z"]},yf={prefix:"vs",iconName:"symbol-operator",icon:[512,512,[],"f000","M91.936 35.2c10.72 4.352 19.264 12.736 23.84 23.36 2.304 5.44 3.488 11.264 3.424 17.184a42.88 42.88 0 0 1 -19.52 36.32 43.488 43.488 0 0 1 -24.096 7.136A43.36 43.36 0 0 1 32 75.584a43.36 43.36 0 0 1 26.56 -40.192A43.84 43.84 0 0 1 91.936 35.2zm-9.536 56.48a17.632 17.632 0 0 0 10.624 -16 17.536 17.536 0 1 0 -10.624 16zM205.76 35.488 35.52 205.76l21.952 21.984 170.24 -170.24 -21.952 -21.984zM368 288h32v80H480v32h-80V480h-32v-80H288v-32h80V288zm-183.424 16.8 22.624 22.624L150.624 384l56.576 56.576 -22.624 22.624L128 406.624l-56.576 56.576 -22.624 -22.624L105.376 384l-56.576 -56.576 22.624 -22.624L128 361.376l56.576 -56.576zm43.2 -134.24a43.296 43.296 0 0 0 -40.192 -26.56 43.36 43.36 0 0 0 -40.192 26.56 43.584 43.584 0 0 0 40.224 60.64A43.456 43.456 0 0 0 227.776 170.56zm-24.096 23.84a17.696 17.696 0 0 1 -9.248 9.28 17.504 17.504 0 0 1 -19.168 -3.744 16.928 16.928 0 0 1 -3.744 -5.536 17.408 17.408 0 0 1 22.912 -22.88 18.08 18.08 0 0 1 5.536 3.712 17.568 17.568 0 0 1 3.712 19.168zM448 96h-128v32h128V96z"]},wc={prefix:"vs",iconName:"terminal",icon:[512,512,[],"f000","M64 32 32 64v384L64 480h384l32 -32V64L448 32H64zM64 448V64h384v384H64zm120.661 -85.547 22.144 22.635 112.213 -111.851v-19.456l-112.213 -112.213 -22.08 22.613 97.92 100.309 -97.984 97.963z"]},If={prefix:"vs",iconName:"tools",icon:[512,512,[],"f000","m472.736 111.52 -24.96 -5.888 -67.456 67.072 -38.208 -38.912 65.792 -69.024 -5.76 -25.344a141.44 141.44 0 0 0 -43.104 -7.296 116.48 116.48 0 0 0 -46.624 8.96 122.368 122.368 0 0 0 -37.952 26.88 119.552 119.552 0 0 0 -28 40.48 126.016 126.016 0 0 0 0 94.912 10730.912 10730.912 0 0 0 -197.536 199.488c-6.72 8.8 -9.92 19.776 -9.088 30.816a44.896 44.896 0 0 0 14.848 30.944c3.968 4.32 8.704 7.904 13.984 10.496 5.44 2.4 11.296 3.776 17.216 4.064 10.112 -0.192 19.808 -4.032 27.328 -10.784 49.536 -46.624 144.448 -142.4 198.368 -198.528 14.624 6.208 30.336 9.408 46.208 9.376a119.552 119.552 0 0 0 85.664 -36.256 124.32 124.32 0 0 0 35.552 -87.36 134.752 134.752 0 0 0 -6.272 -44.096zM93.856 445.696a9.92 9.92 0 0 1 -4.32 2.24 13.984 13.984 0 0 1 -4.768 0 11.072 11.072 0 0 1 -4.608 -1.824 10.752 10.752 0 0 1 -3.648 -3.52c-4.48 -4.576 -8.672 -13.28 -4.48 -18.176 43.84 -46.624 134.112 -137.76 190.56 -193.472 3.2 4.224 6.72 8.256 10.496 12.032 3.776 3.936 7.84 7.584 12.16 10.912 -54.592 56 -143.616 146.048 -191.36 191.808zm355.776 -290.08c0.064 24.48 -9.472 48 -26.624 65.536a91.552 91.552 0 0 1 -128.224 0 95.744 95.744 0 0 1 -20.32 -100.384A87.936 87.936 0 0 1 324.48 69.76a88.32 88.32 0 0 1 34.304 -6.848h8.128L308.768 122.848v22.272l60.64 60.352h21.12l59.104 -58.112v8.256zM103.68 214.016h48.992l22.56 22.944 21.696 -21.568 -21.28 -21.696V192.32l1.824 -52.768 -7.04 -13.984 -91.52 -60.224 -18.912 2.112 -26.592 27.168 -2.112 19.168 58.816 93.376 13.568 6.88zm-30.24 -116.224L147.488 146.56 146.24 182.496H111.808L64.064 106.912l9.376 -9.12zm227.36 222.72 21.568 -21.536 99.392 101.92a47.328 47.328 0 0 1 0 65.248 44.928 44.928 0 0 1 -49.568 10.08 41.92 41.92 0 0 1 -13.984 -10.08l-100.544 -102.496 21.728 -21.696 100.224 102.208a12.864 12.864 0 0 0 4.896 3.36 15.264 15.264 0 0 0 11.488 0 12.896 12.896 0 0 0 4.896 -3.36 13.952 13.952 0 0 0 3.2 -4.896 16.8 16.8 0 0 0 1.152 -5.888 17.504 17.504 0 0 0 -1.12 -5.888 13.952 13.952 0 0 0 -3.2 -4.896L300.8 320.512z"]},xn={prefix:"vs",iconName:"trash",icon:[512,512,[],"f000","M320 96h96v32h-32v288l-32 32H128l-32 -32V128H64V96h96V64a32 32 0 0 1 32 -32h96a32 32 0 0 1 32 32v32zM288 64H192v32h96V64zM128 416h224V128H128v288zm64 -256H160v224h32V160zm32 0h32v224H224V160zm64 0h32v224H288V160z"]},as={prefix:"vs",iconName:"triangle-down",icon:[512,512,[],"f000","M64 177.92 77.216 160h358.208l12.576 17.28L267.936 352h-26.464L64 177.92z"]},ru={prefix:"vs",iconName:"triangle-right",icon:[512,512,[],"f000","M177.92 448 160 434.784V76.576L177.28 64 352 244.064v26.464L177.92 448z"]},cs={prefix:"vs",iconName:"warning",icon:[512,512,[],"f000","M241.92 32h28.16l209.28 392.32 -14.08 23.68H46.08L32 424.32 241.92 32zM256 72.96 72.96 416H438.4L256 72.96zM276 384v-32h-40v32h40zm-40 -64V192h40v128h-40z"]},Rf={prefix:"vs",iconName:"watch",icon:[512,512,[],"f000","M240 288h64V256H256V176H224v96l16 16zm-64 -170.592A159.936 159.936 0 0 0 96 256a159.936 159.936 0 0 0 80 138.592V464l16 16h128l16 -16v-69.408A159.936 159.936 0 0 0 416 256a159.936 159.936 0 0 0 -80 -138.592V48L320 32H192l-16 16v69.408zM384 256a128 128 0 1 1 -256 0 128 128 0 0 1 256 0z"]},Df={prefix:"dh",iconName:"arrow-to-bottom",icon:[512,512,[],"f000","m99.2 224 160 160h22.4l160 -160 -22.4 -22.4L288 332.8V64H256v268.8L124.8 201.6l-25.6 22.4zM96 416h352v32H96z"]},Mf={prefix:"dh",iconName:"arrow-to-top",icon:[512,512,[],"f000","m444.8 288 -160 -160h-22.4l-160 160 22.4 22.4L256 179.2V448h32V179.2l131.2 131.2 25.6 -22.4zm3.2 -192H96V64h352v32z"]},Nf={prefix:"dh",iconName:"check-square",icon:[512,512,[],"f000","M425.6 64H86.4l-22.4 22.4v342.4l22.4 19.2h342.4l22.4 -22.4V86.4l-25.6 -22.4zm-188.8 284.8h-22.4L144 278.4l22.4 -22.4 60.8 60.8 134.4 -134.4 22.4 22.4 -147.2 144z"]},Ff={prefix:"dh",iconName:"exclamation",icon:[512,512,[],"f000","M275.2 384v-32H236.8v32h38.4zm-38.4 -64V128h38.4v192H236.8z"]},vc={prefix:"dh",iconName:"eye-slash",icon:[512,512,[],"f000","M480 256c0 -32 -99.2 -160 -224 -160 -32 0 -64 9.6 -92.8 22.4L70.4 25.6 25.6 70.4 435.2 480l44.8 -44.8 -76.8 -76.8C451.2 320 480 272 480 256zM256 131.2c96 0 176 92.8 188.8 124.8 -6.4 16 -32 48 -67.2 76.8L316.8 272c3.2 -6.4 3.2 -9.6 3.2 -16 0 -35.2 -28.8 -64 -64 -64 -6.4 0 -9.6 0 -16 3.2L192 147.2c19.2 -9.6 41.6 -16 64 -16zm0 249.6C160 380.8 80 288 67.2 256c6.4 -9.6 19.2 -32 41.6 -54.4l-25.6 -25.6C51.2 208 32 243.2 32 256c0 32 99.2 160 224 160 19.2 0 38.4 -3.2 57.6 -9.6l-28.8 -28.8c-9.6 3.2 -19.2 3.2 -28.8 3.2z"]},Ta={prefix:"dh",iconName:"eye",icon:[512,512,[],"f000","M256 96C131.2 96 32 224 32 256s99.2 160 224 160 224 -128 224 -160 -99.2 -160 -224 -160zm0 284.8C160 380.8 80 288 67.2 256 80 227.2 160 131.2 256 131.2S432 224 444.8 256c-12.8 28.8 -92.8 124.8 -188.8 124.8zM256 192c-35.2 0 -64 28.8 -64 64s28.8 64 64 64 64 -28.8 64 -64 -28.8 -64 -64 -64zm0 92.8c-16 0 -28.8 -12.8 -28.8 -28.8s12.8 -28.8 28.8 -28.8 28.8 12.8 28.8 28.8 -12.8 28.8 -28.8 28.8z"]},xf={prefix:"dh",iconName:"file-csv",icon:[512,512,[],"f000","m444.8 140.8 -105.6 -105.6 -12.8 -3.2H80l-16 16V224h32V64h192v112l16 16H416v32h32V153.6l-3.2 -12.8zM320 160V64l96 96h-96zM80 256l-16 16v192l16 16h352l16 -16v-192l-16 -16h-352zM416 416v32H96V288h320v128zm-217.6 -3.2c-6.4 3.2 -16 3.2 -25.6 3.2 -16 0 -25.6 -3.2 -35.2 -12.8 -9.6 -6.4 -12.8 -19.2 -12.8 -32 0 -16 3.2 -28.8 12.8 -38.4 9.6 -9.6 22.4 -12.8 38.4 -12.8 9.6 0 16 0 22.4 3.2v19.2c-6.4 -3.2 -12.8 -6.4 -22.4 -6.4 -9.6 0 -16 3.2 -22.4 9.6 -6.4 6.4 -9.6 12.8 -9.6 22.4 0 9.6 3.2 16 6.4 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16 -3.2 22.4 -6.4v19.2zm19.2 0v-22.4c3.2 3.2 9.6 6.4 12.8 6.4 3.2 3.2 9.6 3.2 12.8 3.2h6.4c3.2 0 3.2 0 6.4 -3.2l3.2 -3.2v-3.2c0 -3.2 0 -3.2 -3.2 -6.4 3.2 0 0 0 0 -3.2 -3.2 0 -3.2 -3.2 -6.4 -3.2s-6.4 -3.2 -9.6 -3.2c-6.4 -3.2 -12.8 -6.4 -16 -12.8 -3.2 -3.2 -6.4 -9.6 -6.4 -16s0 -9.6 3.2 -12.8c3.2 -3.2 3.2 -6.4 9.6 -9.6 3.2 0 6.4 -3.2 12.8 -3.2h25.6c3.2 0 6.4 0 9.6 3.2v19.2s-3.2 -3.2 -6.4 -3.2 -3.2 0 -6.4 -3.2h-19.2c-3.2 0 -3.2 0 -6.4 3.2l-3.2 3.2v6.4l3.2 3.2s3.2 3.2 6.4 3.2 3.2 3.2 6.4 3.2c3.2 3.2 6.4 3.2 9.6 6.4 3.2 3.2 6.4 3.2 6.4 6.4 3.2 3.2 3.2 6.4 6.4 6.4 0 3.2 3.2 6.4 3.2 9.6 0 6.4 0 9.6 -3.2 12.8 -3.2 3.2 -3.2 6.4 -9.6 9.6 3.2 3.2 0 6.4 -3.2 6.4h-32c-3.2 0 -6.4 -3.2 -12.8 -3.2zm169.6 -92.8 -32 96h-25.6l-32 -96h22.4l19.2 67.2c0 3.2 3.2 6.4 3.2 9.6 0 -3.2 0 -6.4 3.2 -9.6l19.2 -67.2h22.4z"]},_f={prefix:"dh",iconName:"file-download",icon:[512,512,[],"f000","m438.4 137.6 -96 -96L320 32H128L96 64v384l32 32h288l32 -32V160l-9.6 -22.4zM416 448H128V64h160v128h128v256zm-96 -288V64l96 96h-96zm-134.4 182.4 76.8 76.8h22.4l76.8 -76.8 -25.6 -22.4L288 368V227.2H256v140.8L208 320l-22.4 22.4z"]},Lf={prefix:"dh",iconName:"file-search",icon:[512,512,[],"f000","M412.8 147.2 304 35.2 294.4 32H80l-16 16v384l16 16H224v-32H96V64h160v128h128v32h32V160l-3.2 -12.8zM288 160V64l92.8 96H288zm224 329.6 -92.8 -92.8c9.6 -16 16 -32 16 -51.2 0 -51.2 -41.6 -89.6 -89.6 -89.6C297.6 256 256 297.6 256 345.6s41.6 89.6 89.6 89.6c19.2 0 38.4 -6.4 51.2 -16l92.8 92.8 22.4 -22.4zm-224 -144c0 -32 25.6 -57.6 57.6 -57.6s57.6 25.6 57.6 57.6 -25.6 57.6 -57.6 57.6S288 377.6 288 345.6z"]},kf={prefix:"dh",iconName:"file-spreadsheet",icon:[512,512,[],"f000","m438.4 137.6 -96 -96L320 32H128L96 64v384l32 32h288l32 -32V160l-9.6 -22.4zM416 448H128V64h160v128h128v256zm-96 -288V64l96 96h-96zm64 99.2 -19.2 -19.2H179.2l-19.2 19.2v137.6l19.2 19.2h185.6l19.2 -19.2V259.2zm-150.4 134.4H182.4v-48h51.2v48zm0 -115.2v48H182.4V278.4m115.2 115.2H246.4v-48h48v48zm0 -64H246.4V278.4h48v51.2zm64 64H310.4v-48h48v48zm-51.2 -64V278.4h48v48H310.4z"]},id={prefix:"dh",iconName:"filter-filled",icon:[512,512,[],"f000","M480 64v54.4l-160 153.6V448H192V268.8L32 118.4V64h448z"]},Of={prefix:"dh",iconName:"filter-slash",icon:[512,512,[],"f000","M480 118.4V64H108.8L70.4 25.6 25.6 70.4l406.4 406.4 44.8 -44.8L320 275.2v-6.4l160 -150.4zM288 416H224v-86.4l-32 -32V448h128v-22.4l-32 -32v22.4zM140.8 96H448v6.4L294.4 249.6 140.8 96z"]},Af={prefix:"dh",iconName:"freeze",icon:[512,512,[],"f000","m438.4 300.8 -19.2 -28.8 -60.8 35.2L272 256l86.4 -51.2 60.8 35.2 19.2 -28.8 -44.8 -25.6 48 -28.8 -16 -25.6 -48 28.8V108.8h-35.2v67.2L256 227.2V128l60.8 -35.2 -16 -28.8 -44.8 25.6V32H224v57.6L179.2 64l-16 28.8L224 128v99.2L137.6 176V108.8H102.4V160l-48 -28.8 -16 25.6 48 28.8 -44.8 25.6 19.2 28.8 60.8 -35.2L208 256 121.6 307.2 60.8 272l-19.2 28.8 44.8 25.6 -48 28.8 16 25.6 48 -28.8v51.2h35.2v-67.2L224 284.8V384l-60.8 35.2 16 28.8 44.8 -25.6V480h32v-57.6l44.8 25.6 16 -28.8L256 384V284.8l86.4 51.2v67.2h35.2V352l48 28.8 16 -25.6 -48 -28.8z"]},Jl={prefix:"dh",iconName:"gear-filled",icon:[512,512,[],"f000","m480 211.2 -76.8 -12.8L448 131.2l-64 -64 -67.2 41.6L300.8 32H211.2l-12.8 76.8L131.2 64l-64 64 41.6 67.2 -76.8 16v89.6l76.8 12.8L64 380.8l64 64 67.2 -41.6 16 76.8h89.6l16 -76.8L384 448l64 -64 -44.8 -67.2 76.8 -16V211.2zM256 320c-38.4 0 -64 -25.6 -64 -64s25.6 -64 64 -64 64 25.6 64 64 -25.6 64 -64 64z"]},Pf={prefix:"dh",iconName:"graph-line-down",icon:[512,512,[],"f000","M64 416V0H32v432l16 16H480v-32zm67.2 -291.2 -22.4 22.4 108.8 112 70.4 -64 108.8 124.8H320v32h112l16 -16V224h-32v70.4L288 150.4l-70.4 64z"]},Hf={prefix:"dh",iconName:"graph-line-up",icon:[512,512,[],"f000","M64 416V0H32v432l16 16H480v-32zm153.6 -150.4 70.4 64 128 -144V256h32V144l-16 -16H320v32h76.8L288 284.8l-70.4 -64 -108.8 112 22.4 22.4z"]},Vf={prefix:"dh",iconName:"input",icon:[512,512,[],"f000","M464 448h-416l-16 -16v-352l16 -16h416l16 16v352l-16 16zM64 416h384V96H64v320zm96 -224h32v128H160zm64 -32v32H128V160l48 16zm0 160v32l-48 -16L128 352v-32z"]},ks={prefix:"dh",iconName:"new-circle-large-filled",icon:[512,512,[],"f000","M240 0C108.8 0 0 108.8 0 240S108.8 480 240 480 480 371.2 480 240 371.2 0 240 0zM352 256H256v96H224V256H128V224h96V128h32v96h96v32z"]},Uf={prefix:"dh",iconName:"pandas",icon:[512,512,[],"f000","M185.6 28.8h54.4v115.2H185.6V28.8zm0 240h54.4V384H185.6V268.8zm0 -89.6h54.4v54.4H185.6V179.2zM96 124.8h54.4V512H96V124.8zm176 240h54.4V480H272v-115.2zm0 -240h54.4v115.2H272V124.8zm0 150.4h54.4v54.4H272V275.2zM361.6 0H416v387.2h-54.4V0z"]},Bf={prefix:"dh",iconName:"panels",icon:[512,512,[],"f000","m496 288 16 16v160l-16 16h-192l-16 -16v-160l16 -16h192zm0 -256h-192l-16 16v160l16 16h192l16 -16v-160l-16 -16zM16 32l-16 16v160l16 16h192l16 -16v-160L208 32h-192zm0 256 -16 16v160l16 16h192l16 -16v-160L208 288h-192z"]},$f={prefix:"dh",iconName:"python",icon:[512,512,[],"f000","M198.4 249.6h99.2s57.6 0 57.6 -54.4V102.4s9.6 -54.4 -99.2 -54.4c-105.6 0 -99.2 44.8 -99.2 44.8v48H256v12.8H115.2s-67.2 -6.4 -67.2 99.2c0 105.6 57.6 102.4 57.6 102.4h35.2V307.2s-3.2 -57.6 57.6 -57.6zm3.2 -131.2c-9.6 0 -19.2 -9.6 -19.2 -19.2s6.4 -19.2 19.2 -19.2c9.6 0 19.2 9.6 19.2 19.2s-9.6 19.2 -19.2 19.2zm208 35.2h-35.2v48s3.2 57.6 -57.6 57.6H217.6S160 259.2 160 313.6v92.8s-12.8 54.4 99.2 54.4c105.6 0 99.2 -44.8 99.2 -44.8v-48H259.2v-12.8h140.8s67.2 6.4 67.2 -99.2 -57.6 -102.4 -57.6 -102.4zm-96 236.8c9.6 0 19.2 9.6 19.2 19.2s-9.6 19.2 -19.2 19.2 -19.2 -9.6 -19.2 -19.2 9.6 -19.2 19.2 -19.2z"]},od={prefix:"dh",iconName:"refresh",icon:[512,512,[],"f000","m313.6 73.6 -9.6 32c83.2 25.6 131.2 118.4 102.4 201.6 -19.2 64 -80 108.8 -150.4 108.8 -89.6 0 -160 -70.4 -160 -160 0 -51.2 22.4 -96 64 -128v64h32V80L176 64H64v32h86.4c-76.8 51.2 -108.8 150.4 -70.4 236.8C112 403.2 179.2 448 256 448c105.6 0 192 -86.4 192 -192 0 -83.2 -54.4 -156.8 -134.4 -182.4z"]},Wf={prefix:"dh",iconName:"remove-square-filled",icon:[512,512,[],"f000","M432 32h-384l-16 16v384l16 16h384l16 -16v-384l-16 -16zM352 256H128V224h224v32z"]},zf={prefix:"dh",iconName:"run-selection",icon:[704,512,[],"f000","M124.8 64 128 96h-3.2c-6.4 0 -12.8 0 -19.2 3.2 -16 6.4 -25.6 25.6 -25.6 44.8v44.8c0 6.4 0 12.8 -3.2 19.2 0 6.4 -3.2 12.8 -6.4 19.2 -3.2 9.6 -12.8 22.4 -22.4 28.8 9.6 6.4 19.2 19.2 22.4 32 3.2 6.4 3.2 12.8 6.4 19.2 0 6.4 3.2 12.8 3.2 19.2v44.8c0 6.4 0 12.8 3.2 19.2 3.2 6.4 6.4 9.6 9.6 16 3.2 3.2 9.6 6.4 16 9.6H128v32h-3.2c-9.6 0 -19.2 -3.2 -28.8 -6.4 -9.6 -3.2 -19.2 -9.6 -25.6 -16 -6.4 -6.4 -12.8 -16 -16 -25.6 -3.2 -9.6 -6.4 -16 -6.4 -25.6V316.8c0 -6.4 0 -12.8 -3.2 -19.2 -3.2 -3.2 -6.4 -6.4 -9.6 -12.8 -3.2 -3.2 -9.6 -6.4 -16 -9.6 -3.2 -3.2 -9.6 -3.2 -16 -3.2H0v-32h3.2c6.4 0 12.8 0 19.2 -3.2 9.6 -6.4 19.2 -12.8 22.4 -25.6 3.2 -6.4 3.2 -12.8 3.2 -19.2V134.4c0 -9.6 3.2 -19.2 6.4 -25.6 3.2 -6.4 9.6 -16 16 -22.4 6.4 -6.4 16 -12.8 25.6 -16 9.6 -3.2 19.2 -6.4 28.8 -6.4zm576 176c-6.4 0 -12.8 0 -19.2 -3.2 -6.4 -3.2 -9.6 -6.4 -16 -9.6 -3.2 -3.2 -6.4 -9.6 -9.6 -16 -3.2 -6.4 -3.2 -12.8 -3.2 -19.2V134.4c0 -9.6 -3.2 -19.2 -6.4 -25.6 -3.2 -9.6 -9.6 -16 -16 -25.6 -6.4 -6.4 -16 -12.8 -25.6 -16 -6.4 0 -16 -3.2 -25.6 -3.2H576v32h3.2c6.4 0 12.8 0 19.2 3.2 6.4 3.2 9.6 6.4 16 9.6 3.2 3.2 6.4 9.6 9.6 16 3.2 6.4 3.2 12.8 3.2 19.2v44.8c0 6.4 0 12.8 3.2 19.2 0 6.4 3.2 12.8 6.4 19.2 6.4 12.8 12.8 22.4 22.4 32 -9.6 6.4 -19.2 19.2 -22.4 32 -3.2 6.4 -3.2 12.8 -6.4 19.2 0 6.4 -3.2 12.8 -3.2 19.2v44.8c0 19.2 -9.6 35.2 -28.8 44.8 -6.4 -3.2 -12.8 -3.2 -19.2 -3.2H576v32h3.2c9.6 0 19.2 -3.2 28.8 -6.4 9.6 -3.2 19.2 -9.6 25.6 -16 6.4 -6.4 12.8 -16 16 -25.6 3.2 -9.6 6.4 -16 6.4 -25.6V316.8c0 -6.4 0 -12.8 3.2 -19.2 3.2 -9.6 12.8 -16 25.6 -22.4 6.4 -3.2 12.8 -3.2 19.2 -3.2l-3.2 -32zm-192 28.8 -240 160 -25.6 -12.8V96l25.6 -12.8 240 160v25.6zM470.4 256 275.2 124.8V384l195.2 -128z"]},Gf={prefix:"dh",iconName:"shapes",icon:[512,512,[],"f000","M195.2 320 160 256 128 313.6 105.6 352 32 480h256l-73.6 -128 -19.2 -32zm112 -76.8c51.2 -35.2 121.6 -22.4 156.8 28.8s22.4 121.6 -28.8 156.8c0 0 -3.2 0 -3.2 3.2 -51.2 32 -121.6 19.2 -153.6 -32 -35.2 -54.4 -22.4 -121.6 28.8 -156.8zM96 32v192h192V32H96z"]},rd={prefix:"dh",iconName:"sort-alpha-down",icon:[512,512,[],"f000","M236.8 368 156.8 448h-22.4l-80 -80 22.4 -22.4L128 396.8V64h32v332.8l51.2 -51.2 25.6 22.4zM371.2 224l-6.4 -28.8H316.8l-9.6 28.8H256l54.4 -160h60.8l51.2 160h-51.2zm-32 -124.8c0 3.2 -3.2 3.2 -3.2 9.6s-3.2 19.2 -12.8 51.2h32l-9.6 -44.8c-3.2 -6.4 -6.4 -9.6 -6.4 -16zm-6.4 310.4h73.6V448H272v-32l73.6 -89.6H275.2V288h128v32l-70.4 89.6z"]},ld={prefix:"dh",iconName:"sort-alpha-up",icon:[512,512,[],"f000","M51.2 144 131.2 64h22.4l80 80 -22.4 22.4L160 115.2V448H128V115.2L76.8 166.4l-25.6 -22.4zm320 304 -6.4 -28.8H316.8l-9.6 28.8H256l54.4 -160h60.8l51.2 160h-51.2zm-32 -124.8c0 3.2 -3.2 3.2 -3.2 9.6 0 6.4 -3.2 19.2 -12.8 51.2h32l-9.6 -44.8c-3.2 -6.4 -6.4 -9.6 -6.4 -16zm-6.4 -137.6h73.6V224H272V192l73.6 -89.6H275.2V64h128v32l-70.4 89.6z"]},Tc={prefix:"dh",iconName:"sort-amount-down",icon:[512,512,[],"f000","M204.8 368 124.8 448h-22.4L22.4 368l22.4 -22.4L96 396.8V64h32v332.8l51.2 -51.2 25.6 22.4zM256 64h256v64H256zm0 105.6h192v64H256zm0 108.8h128v64H256zM256 384h64v64H256z"]},Kf={prefix:"dh",iconName:"sort-down",icon:[512,512,[],"f000","m128 288 -12.8 25.6 128 118.4h25.6l128 -118.4L384 288H128z"]},qf={prefix:"dh",iconName:"sort-up",icon:[512,512,[],"f000","m128 224 -12.8 -25.6 128 -118.4h25.6l128 118.4 -12.8 25.6H128z"]},ad={prefix:"dh",iconName:"sort",icon:[512,512,[],"f000","m128 224 -12.8 -25.6 128 -118.4h25.6l128 118.4 -12.8 25.6H128zm0 64 -12.8 25.6 128 118.4h25.6l128 -118.4L384 288H128z"]},Ec={prefix:"dh",iconName:"square-filled",icon:[512,512,[],"f000","M432 32h-384l-16 16v384l16 16h384l16 -16v-384l-16 -16z"]},dd={prefix:"dh",iconName:"table",icon:[512,512,[],"f000","M432 64h-384l-16 16v352l16 16h384l16 -16v-352l-16 -16zM160 416H64v-64h96v64zm0 -96H64V256h96v64zm0 -96H64V160h96v64zm128 192H192v-64h96v64zm0 -96H192V256h96v64zm0 -96H192V160h96v64zm128 192h-96v-64h96v64zm0 -96h-96V256h96v64zm0 -96h-96V160h96v64z"]},Yf={prefix:"dh",iconName:"trash-undo",icon:[512,512,[],"f000","M320 96h96v32h-32v288l-32 32H128l-32 -32V128H64V96h96V64c0 -19.2 12.8 -32 32 -32h96c19.2 0 32 12.8 32 32v32zM288 64H192v32h96V64zM128 416h224V128H128v288zm112 -64L160 272v-22.4l80 -80 22.4 22.4 -51.2 54.4H320v32H211.2l51.2 51.2 -22.4 22.4z"]},lu={prefix:"dh",iconName:"triangle-down-square",icon:[512,512,[],"f000","M425.6 64H86.4l-22.4 22.4v342.4l22.4 19.2h342.4l22.4 -22.4V86.4l-25.6 -22.4zm-160 288h-22.4L99.2 208l9.6 -16h291.2l9.6 12.8L265.6 352z"]},Xf={prefix:"dh",iconName:"unlink",icon:[512,512,[],"f000","M32 211.2v-6.4C32 144 80 96 140.8 96h99.2c12.8 0 25.6 3.2 38.4 6.4l-25.6 25.6H140.8C99.2 128 64 163.2 64 204.8v6.4c0 28.8 16 54.4 38.4 67.2l-22.4 22.4C51.2 281.6 32 249.6 32 211.2zM403.2 6.4l-38.4 38.4 -67.2 67.2 -22.4 25.6 -150.4 147.2 -25.6 25.6 -54.4 54.4 -38.4 38.4L51.2 448 448 51.2 403.2 6.4zM384 192v32c38.4 6.4 64 38.4 64 76.8v6.4c0 41.6 -35.2 76.8 -76.8 76.8H272c-32 0 -60.8 -22.4 -73.6 -51.2l-25.6 25.6c19.2 35.2 54.4 60.8 96 60.8h99.2c60.8 0 108.8 -48 108.8 -108.8v-9.6C480 246.4 438.4 198.4 384 192zM246.4 288l-22.4 19.2v12.8h16c60.8 0 108.8 -48 108.8 -108.8v-6.4c0 -6.4 0 -12.8 -3.2 -19.2l-32 32c0 38.4 -32 67.2 -67.2 70.4z"]},yc={prefix:"dh",iconName:"warning-circle-filled",icon:[512,512,[],"f000","M470.4 195.2c-9.6 -38.4 -28.8 -70.4 -57.6 -99.2 -25.6 -25.6 -60.8 -44.8 -96 -54.4C297.6 35.2 275.2 32 256 32c-19.2 0 -41.6 3.2 -60.8 9.6 -16 3.2 -35.2 9.6 -51.2 22.4 -35.2 19.2 -60.8 44.8 -80 80 -12.8 16 -19.2 35.2 -25.6 51.2C35.2 214.4 32 236.8 32 256c0 19.2 3.2 41.6 6.4 60.8 6.4 16 12.8 35.2 25.6 51.2 9.6 16 22.4 32 35.2 44.8 12.8 16 28.8 25.6 44.8 35.2 16 9.6 35.2 16 54.4 22.4 16 6.4 38.4 9.6 57.6 9.6 19.2 0 41.6 -3.2 60.8 -6.4 19.2 -6.4 35.2 -12.8 54.4 -22.4 32 -19.2 60.8 -48 80 -80 9.6 -16 16 -35.2 22.4 -54.4 3.2 -19.2 6.4 -41.6 6.4 -60.8s-3.2 -41.6 -9.6 -60.8zM275.2 352H236.8v-32h38.4v32zm0 -64H236.8V160h38.4v128z"]},au={prefix:"dh",iconName:"warning-filled",icon:[512,512,[],"f000","M268.8 32h-25.6L32 425.6l12.8 22.4h419.2l12.8 -22.4L268.8 32zm6.4 352H236.8v-32h38.4v32zm0 -64H236.8V192h38.4v128z"]};const dl=Y.forwardRef((t,e)=>{var b,C;function n(v){const{menuItem:T,onMenuItemClick:E}=t;E(T,v)}function s(v){const{menuItem:T,onMenuItemMouseMove:E}=t;E(T,v)}function i(v){const{menuItem:T,onMenuItemContextMenu:E}=t;E(T,v)}function o(v,T,E){if(typeof v.type=="string")return v;const{closeMenu:y,menuItem:I,isKeyboardSelected:D,isMouseSelected:N,"data-testid":x}=t,U={menuItem:I,closeMenu:y,isKeyboardSelected:D,isMouseSelected:N,iconElement:T,displayShortcut:E,"data-testid":x};return Y.cloneElement(v,{forwardedProps:U})}const{children:r,menuItem:l,isKeyboardSelected:a,isMouseSelected:d,"data-testid":c}=t,u=(b=l.shortcut)==null?void 0:b.getDisplayText();let m=null;if(l.icon){const v=l.icon;if(Y.isValidElement(v))m=v;else{let T;l.iconColor!=null&&(l.disabled===void 0||!l.disabled)&&(T={color:l.iconColor}),m=h(G,{icon:v,style:T})}}let p=null;const g=Boolean(r);l.actions&&(p=h(G,{icon:Jh}));let f=null;if(l.menuElement)f=h("div",{className:"custom-menu-item",onMouseMove:s,children:o(l.menuElement,m,u)});else{const v=l.disabled,T=l.iconOutline;f=h("button",{type:"button",className:W("btn-context-menu",{disabled:v},{active:(g||d)&&(v===void 0||!v)},{"keyboard-active":a!==void 0&&a&&(v===void 0||!v)}),onClick:n,onMouseMove:s,onContextMenu:i,title:(C=l.description)!=null?C:"",children:w("div",{className:"btn-context-menu-wrapper",children:[h("span",{className:W("icon",{outline:T}),children:m}),h("span",{className:"title",children:l.title}),u!==void 0&&h("span",{className:"shortcut",children:u}),p&&h("span",{className:W("submenu-indicator",{disabled:v}),children:p})]})})}return w("div",{className:"context-menu-item",ref:e,"data-testid":c,children:[r,f]})});dl.displayName="ContextMenuItem";dl.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};class ai extends Error{constructor(){super(...arguments),this.isCanceled=!0}}class cl{static isDark(e){const n=document.createElement("div");n.style.display="none",n.style.color=e;const s=getComputedStyle(document.body.appendChild(n)).color,i=s.match(/\d+/g);let o=[];if(i)o=i.map(l=>parseInt(l,10));else throw new Error(`Invalid color received. Got ${s}`);return document.body.removeChild(n),cl.getBrightness(o)<125}static getBrightness(e){return Math.round((e[0]*299+e[1]*587+e[2]*114)/1e3)}}const jf="table_",du="column_",Qf=new Set(["in","not","i","ii","k"]),Zf=new Set(["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","null","true","false"]),Jf=/[^a-zA-Z0-9_$+@-]/g,eC=/[^A-Za-z0-9_$]/g,Ki=class{};let ms=Ki;ms.legalize=(t,e,n,s,i)=>{let o=t.trim().replace(/[- ]/g,"_");return s&&(Qf.has(o)||Zf.has(o))&&(o=e+o),o=o.replace(n,""),o||(o=e+i),Number.isNaN(Number(o.charAt(0)))||(o=e+o),o};ms.legalizeTableName=t=>Ki.legalize(t,jf,Jf,!1,0);ms.legalizeColumnNames=t=>{const e=[];return t.forEach((n,s)=>{let i=Ki.legalizeColumnName(n,s);e.includes(i)&&(i=du+s),e.push(i)}),e};ms.legalizeColumnName=(t,e=0)=>Ki.legalize(t,du,eC,!0,e);ms.isValidTableName=t=>Ki.legalizeTableName(t)===t;ms.isValidColumnName=t=>Ki.legalizeColumnName(t)===t;function tC(t,e){return t?t.closest(`.${e}`):null}const nC={getClosestByClassName:tC};class Ge extends CustomEvent{constructor(e,n){super(e,n)}}class cu extends Error{constructor(){super(...arguments),this.isTimeout=!0}}class ye{static makeCancelable(e,n){let s=!1,i;const o=new Promise((r,l)=>{Promise.resolve(e).then(a=>{s?(n&&n(a),l(new ai)):(i=a,r(a))},a=>l(s?new ai:a))});return o.cancel=()=>{s=!0,i!=null&&n&&n(i)},o}static isCanceled(e){return e instanceof ai}static isTimedOut(e){return e instanceof cu}}class ps{constructor(){this.pending=[],this.resolved=[]}add(e,n){const s=ye.makeCancelable(e,n);return this.pending.push(s),s.then(()=>{this.resolve(s)},()=>{this.resolve(s)}),s}remove(e){for(let n=0;n<this.pending.length;n+=1)if(this.pending[n]===e){this.pending.splice(n,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){const e=[...this.pending,...this.resolved];for(let n=0;n<e.length;n+=1)e[n].cancel();this.pending=[],this.resolved=[]}}function A(t){if(t==null)throw new Error("Value is null or undefined")}class fn{static isValidRange(e){return e!=null&&e.length===2&&Number.isInteger(e[0])&&Number.isInteger(e[1])&&e[0]<=e[1]}static validateRange(e){if(!fn.isValidRange(e))throw new Error(`Invalid range! ${e}`)}static isSelected(e,n){for(let s=0;s<e.length;s+=1){const i=e[s],o=i[0],r=i[1];if(o<=n&&n<=r)return!0}return!1}static selectRange(e,n){let[s,i]=n;const o=[...e];for(let r=o.length-1;r>=0;r-=1){const l=o[r],a=l[0],d=l[1];if(a<=s&&i<=d)return o;s<=d&&a<=i&&(s=Math.min(s,a),i=Math.max(i,d),o.splice(r,1))}return o.push([s,i]),o}static deselectRange(e,n){const[s,i]=n,o=[...e];for(let r=o.length-1;r>=0;r-=1){const l=o[r],a=l[0],d=l[1];if(!(i<a||d<s))if(a<s&&i<d){o[r]=[a,s-1],o.splice(r+1,0,[i+1,d]);break}else s<=a&&d<=i?o.splice(r,1):a<s?o[r]=[a,s-1]:o[r]=[i+1,d]}return o}static count(e){return e.reduce((n,s)=>n+(s[1]-s[0]+1),0)}}class tn{static join(e,n="and"){if(e==null||e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return`${e[0]} ${n} ${e[1]}`;const s=e.slice(0,e.length-1).join(", "),i=e[e.length-1];return`${s}, ${n} ${i}`}static toLower(e,n=!0){if(e==null){if(n)return"";throw new Error("Null string passed in to TextUtils.toLower")}return e.toLowerCase()}static sort(e,n,s=!0){return e<n?s?-1:1:e>n?s?1:-1:0}}const hu=class{static formatElapsedTime(t){if(typeof t!="number"||!Number.isInteger(t))throw new Error(`${t} is not a number that can be expressed as a formatted time`);const e=Math.floor(t/3600),n=Math.floor(t%3600/60),s=t%60;return`${e>0?`${e}h `:""}${n>0||e>0?`${n}m `:""}${t>=60?`${s}s`.padStart(3,"0"):`${s}s`}`}static formatTime(t){if(typeof t!="number"||!Number.isInteger(t)||t<0)throw new Error(`${t} is not a number that can be expressed as a formatted time`);const e=String(Math.floor(t/(60*60))).padStart(2,"0"),n=t%(60*60),s=String(Math.floor(n/60)).padStart(2,"0"),i=n%60,o=String(Math.ceil(i)).padStart(2,"0");return`${e}:${s}:${o}`}static isTimeString(t){return new RegExp(hu.TIME_PATTERN).test(t)}static parseTime(t){if(t==null||typeof t!="string")throw new Error(`${t} is not a valid string`);const e=t.split(":");if(e.length!==3)throw new Error(`${t} is not a time string that can be parsed`);return Number(e[0])*60*60+Number(e[1])*60+Number(e[2])}};let In=hu;In.TIME_PATTERN="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]";In.TIME_ZONES=Object.freeze([{label:"Tokyo UTC+9 No DST",value:"Asia/Tokyo"},{label:"Seoul UTC+9 No DST",value:"Asia/Seoul"},{label:"Hong Kong UTC+8 No DST",value:"Asia/Hong_Kong"},{label:"Singapore UTC+8 No DST",value:"Asia/Singapore"},{label:"Kolkata UTC+5:30 No DST",value:"Asia/Kolkata"},{label:"Berlin UTC+1",value:"Europe/Berlin"},{label:"UTC UTC\xB10 No DST",value:"UTC"},{label:"London UTC\xB10",value:"Europe/London"},{label:"Sao Paulo UTC-2",value:"America/Sao_Paulo"},{label:"Newfoundland UTC-3:30",value:"America/St_Johns"},{label:"Halifax UTC-4",value:"America/Halifax"},{label:"New York UTC\u22125",value:"America/New_York"},{label:"Chicago UTC-6",value:"America/Chicago"},{label:"Denver UTC-7",value:"America/Denver"},{label:"Los Angeles UTC-8",value:"America/Los_Angeles"},{label:"Anchorage UTC-9",value:"America/Anchorage"},{label:"Honolulu UTC-10 No DST",value:"Pacific/Honolulu"},{label:"Zurich UTC+1",value:"Europe/Zurich"},{label:"Amsterdam UTC+1",value:"Europe/Amsterdam"},{label:"Taipei UTC+8 No DST",value:"Asia/Taipei"},{label:"Sydney UTC+10",value:"Australia/Sydney"}]);class Oi extends Error{constructor(){super(...arguments),this.isInvalid=!0}}const _n=({className:t="","data-testid":e})=>w("div",{className:W("loading-spinner fa-layers",t),"data-testid":e,children:[h(G,{icon:nf,className:"text-white-50"}),h(G,{icon:nu,className:"text-primary",spin:!0})]}),Ic=X.module("ContextMenu"),Ea=class extends S.exports.PureComponent{constructor(t){super(t),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=Y.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=Y.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:t.top,left:t.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}static handleContextMenu(t){t.metaKey||(t.stopPropagation(),t.preventDefault())}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)==null||e.focus();const{onMenuOpened:t}=this.props;t(this)})}componentDidUpdate(t,e){var i,o;const{actions:n}=this.props,{activeSubMenu:s}=this.state;s!==e.activeSubMenu&&(s==null?(i=this.container.current)==null||i.focus():this.setActiveSubMenuPosition()),t.actions!==n&&(this.initMenu(),(this.container.current==null||!this.container.current.contains(document.activeElement))&&((o=this.container.current)==null||o.focus())),this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){const{options:t}=this.props;if(t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse){const{keyboardIndex:e}=this.state;return e}return this.getMouseIndex()}setKeyboardIndex(t){const{options:e}=this.props;e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse?this.setState({keyboardIndex:t}):this.setMouseIndex(t)}getMouseIndex(){const{mouseIndex:t}=this.state;return t}setMouseIndex(t){this.setState({mouseIndex:t})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);const{options:t}=this.props;let e=t.initialKeyboardIndex;e===void 0&&(e=-1);const{actions:n}=this.props,s=Ne.getMenuItems(n),i=[];for(let o=s.length-1;o>=0;o-=1){const r=s[o];r instanceof Promise?this.initMenuPromise(r):i.push(r)}this.setState({mouseIndex:-1,keyboardIndex:e,activeSubMenu:null,menuItems:Ne.sortActions(i)})}initMenuPromise(t){const e=ye.makeCancelable(t);this.setState(n=>({pendingItems:n.pendingItems.concat(e)})),e.then(n=>{this.setState(s=>{const i=s.pendingItems.indexOf(e);if(i>=0){const o=s.pendingItems.slice();return o.splice(i,1),{menuItems:Ne.sortActions(s.menuItems.concat(n)),pendingItems:o}}return null})},n=>{ye.isCanceled(n)||(this.setState(s=>{const i=s.pendingItems.indexOf(e);if(i>=0){const o=s.pendingItems.slice();return o.splice(i,1),{pendingItems:o}}return null}),Ic.error(n))})}cancelPromises(){const{pendingItems:t}=this.state;t.map(e=>e.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current===null)return;const t=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:t.top,subMenuLeft:t.right,subMenuParentHeight:t.height,subMenuParentWidth:t.width})}verifyPosition(){var u,m,p,g;const{options:t,updatePosition:e,subMenuParentWidth:n,subMenuParentHeight:s,top:i,left:o}=this.props;if(!this.container.current||t.doNotVerifyPosition!=null&&t.doNotVerifyPosition)return;let{top:r,left:l}=this.initialPosition;const{width:a,height:d}=(m=(u=this.container.current)==null?void 0:u.getBoundingClientRect())!=null?m:{width:0,height:0},c=((g=(p=this.container.current)==null?void 0:p.scrollHeight)!=null?g:0)>window.innerHeight;d===0||a===0||(r+d>window.innerHeight&&(r-d-s>0?r-=d-s:r=window.innerHeight-d),l+a>window.innerWidth&&(l=l-a-n),(o!==l||i!==r)&&(this.setState({hasOverflow:c}),e(r,l)))}handleWindowResize(){!this.container.current||this.closeMenu(!0)}handleBlur(t){if(!this.container.current){Ic.warn("Container is null!");return}if(!this.container.current.contains(t.relatedTarget)){let e=t.relatedTarget,n=!1;for(;e&&!n;)n=e.hasAttribute("data-dh-context-menu"),e=e.parentElement;n||this.closeMenu(!0)}}isEscapeKey(t){const{left:e}=this.props;return t==="Escape"||e<0&&t==="ArrowRight"||t==="ArrowLeft"}handleKeyDown(t){const{menuItems:e}=this.state,n=this.getKeyboardIndex();let s=n,i=!1;if(t.key==="Enter"||t.key===" "){n>=0&&n<e.length&&this.handleMenuItemClick(e[n],t);return}if(t.key==="ArrowRight"?n>=0&&n<=e.length?i=!0:s=0:this.isEscapeKey(t.key)?s=null:t.key==="ArrowUp"||t.shiftKey&&t.key==="Tab"?s=Ne.getNextMenuItem(s,-1,e):(t.key==="ArrowDown"||t.key==="Tab")&&(s=Ne.getNextMenuItem(s,1,e)),i){this.openSubMenu(n),t.preventDefault(),t.stopPropagation();return}n!==s&&(s!==null?this.setKeyboardIndex(s):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),t.preventDefault(),t.stopPropagation())}openSubMenu(t){const{menuItems:e,activeSubMenu:n}=this.state,s=e[t].actions?t:null;n!==s&&this.setState({activeSubMenu:s,subMenuTop:null,subMenuLeft:null})}closeMenu(t=!1){const{closeMenu:e,onMenuClosed:n}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{e(t),n(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(t){t?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(t,e){e.preventDefault(),e.stopPropagation();const{menuItems:n}=this.state;t!=null&&(t.disabled===void 0||!t.disabled)&&(t.actions!=null?this.openSubMenu(n.indexOf(t)):t.action!=null&&(t.action(),this.closeMenu(!0)))}handleMenuItemContextMenu(t,e){e.metaKey||this.handleMenuItemClick(t,e)}handleMenuItemMouseMove(t){const{menuItems:e}=this.state,n=e.indexOf(t);this.setMouseIndex(n),n>=0&&n<e.length&&(t.disabled===void 0||!t.disabled)&&this.openSubMenu(n)}handleMouseLeave(){this.setMouseIndex(-1)}render(){const t=[],{top:e,left:n}=this.props,{activeSubMenu:s,hasOverflow:i,keyboardIndex:o,menuItems:r,mouseIndex:l,pendingItems:a,subMenuTop:d,subMenuLeft:c,subMenuParentWidth:u,subMenuParentHeight:m}=this.state;for(let C=0;C<r.length;C+=1){const v=r[C];C>0&&v.group!==r[C-1].group&&t.push(h("hr",{},`${C}.separator`));const T=h(dl,{ref:s===C?this.activeSubMenuRef:null,isKeyboardSelected:o===C,isMouseSelected:l===C,menuItem:v,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},C);t.push(T)}let p=null;a.length>0&&(p=h("div",{className:"loading",children:h(_n,{})}));const{menuStyle:g,"data-testid":f}=this.props,b=s!==null&&d!==null&&c!==null;return w(he,{children:[w("div",{className:W({"has-overflow":i},"context-menu-container"),style:{top:e,left:n,...g},ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:Ea.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":f,children:[t,p]}),b&&s!==null&&d!==null&&c!==null&&h(Ea,{actions:r[s].actions||[],closeMenu:this.handleCloseSubMenu,top:d,left:c,updatePosition:(C,v)=>{this.setState({subMenuTop:C,subMenuLeft:v})},subMenuParentWidth:u,subMenuParentHeight:m},`sub-${s}`)]})}};let uu=Ea;uu.defaultProps={subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0};class mu extends S.exports.Component{constructor(e){super(e),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=Y.createRef(),this.openMenu=Y.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!=null&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!=null&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(!Ne.isContextActionEvent(e)||!this.container.current||e.metaKey||e.ctrlKey)return;const n=Ne.getMenuItems(e.contextActions),s=this.container.current.getBoundingClientRect(),i=e.clientY-s.top,o=e.clientX-s.left;if(n.length===0){if(e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{const r=document.elementFromPoint(o,i),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});r==null||r.dispatchEvent(l)});return}return}e.preventDefault(),this.setState({actions:n,top:i,left:o})}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){let e=null;const{"data-testid":n}=this.props,{actions:s,top:i,left:o}=this.state;return s&&(e=h(uu,{ref:this.openMenu,actions:s,onMenuClosed:this.handleMenuClose,top:i,left:o,updatePosition:(r,l)=>{this.setState({top:r,left:l})},"data-testid":n})),h("div",{className:W("context-menu-root",{active:s}),ref:this.container,children:e})}}const Ys=class extends S.exports.Component{static handleEnter(t){const e=t;e.style.height="0"}static handleEntering(t){const e=t;e.style.height=`${Ys.getHeight(e)}px`}static handleExiting(t){const e=t;e.style.height="0"}static handleExit(t){const e=t;e.style.height=`${Ys.getHeight(e)}px`}static getHeight(t){const e=t.scrollWidth-t.clientWidth;return t.scrollHeight-e}constructor(t){super(t),this.handleEntered=this.handleEntered.bind(this)}handleEntered(t){const e=t;e.style.height="";const{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){const s=e.querySelector("input, select, textarea");s!=null&&s.focus()}}render(){const{children:t,className:e,in:n,"data-testid":s}=this.props;return h(ht,{in:n,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:Ys.handleEnter,onEntering:Ys.handleEntering,onEntered:this.handleEntered,onExit:Ys.handleExit,onExiting:Ys.handleExiting,timeout:350,children:i=>h("div",{className:W({collapse:i==="exited"},e),"data-testid":s,children:t})})}};let cd=Ys;cd.propTypes={className:R.exports.string,in:R.exports.bool.isRequired,children:R.exports.node.isRequired,autoFocusOnShow:R.exports.bool,"data-testid":R.exports.string};cd.defaultProps={className:"",autoFocusOnShow:!1,"data-testid":void 0};function hl(t){const e=S.exports.useRef();return S.exports.useEffect(function(){e.current=t}),e.current}function pu(t){const e=S.exports.useRef(null);return S.exports.useEffect(function(){!t||(typeof t=="function"?t(e.current):t.current=e.current)}),e}const Pt=Y.forwardRef((t,e)=>{const{checked:n=!1,children:s,className:i,disabled:o,inputClassName:r,isInvalid:l,labelClassName:a,name:d,onChange:c,"data-testid":u}=t,[m]=S.exports.useState(ze()),p=pu(e);S.exports.useEffect(function(){p.current&&(p.current.indeterminate=n===null)},[p,n]);const g=S.exports.useCallback(f=>{p.current&&(p.current.indeterminate=n===null),c&&c(f)},[p,n,c]);return w("div",{className:W("custom-control custom-checkbox",i),children:[h("input",{type:"checkbox",ref:p,checked:n!=null?n:!1,className:W("custom-control-input",r,{"is-invalid":l}),disabled:o,id:m,name:d,onChange:g,"data-testid":u}),h("label",{className:W("custom-control-label",a),htmlFor:m,children:s})]})});Pt.displayName="Checkbox";Pt.propTypes={checked:(t,e)=>{const{[e]:n}=t;return n!==null&&typeof n!="boolean"?new Error("Checked must be a boolean or null for indeterminate"):null},children:R.exports.node.isRequired,className:R.exports.string,disabled:R.exports.bool,inputClassName:R.exports.string,isInvalid:R.exports.bool,labelClassName:R.exports.string,name:R.exports.string,onChange:R.exports.func,"data-testid":R.exports.string};Pt.defaultProps={checked:!1,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};class gs extends S.exports.PureComponent{constructor(e){super(e),this.inputField=Y.createRef()}focus(){var e;(e=this.inputField.current)==null||e.focus()}render(){const{value:e,placeholder:n,onBlur:s,onChange:i,className:o,disabled:r,matchCount:l,id:a,onKeyDown:d,"data-testid":c}=this.props;return w("div",{className:W("search-group",o),children:[h("input",{type:"search",value:e,onBlur:s,onChange:i,onKeyDown:d,className:"form-control",disabled:r,placeholder:n,ref:this.inputField,id:a,"data-testid":c}),l!=null&&h("span",{className:"search-match",children:l}),h("span",{className:"search-icon",children:h(G,{icon:ou})})]})}}gs.defaultProps={placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0};var gu=(t=>(t.UP="UP",t.DOWN="DOWN",t))(gu||{});const bo=class extends S.exports.Component{constructor(t){super(t),this.getCachedFilteredOptions=Ee((e,n)=>e.filter(s=>s.title.toLowerCase().indexOf(n.toLowerCase())>=0||s.value.toLowerCase().indexOf(n.toLowerCase())>=0)),this.state={value:"",filter:"",filteredOptions:t.options,keyboardOptionIndex:-1,menuIsOpen:!1,inputWidth:100},this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handleFilterChange=this.handleFilterChange.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=Y.createRef(),this.cbContainer=Y.createRef(),this.toggleButton=Y.createRef(),this.menuContainer=Y.createRef(),this.input=Y.createRef(),this.searchInput=Y.createRef()}componentDidUpdate(){const{menuIsOpen:t,keyboardOptionIndex:e}=this.state;t&&e>=0&&this.scrollOptionIntoView()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}focus(){var t;(t=this.input.current)==null||t.focus()}resetValue(){this.setState({value:""})}updateInputValue(t){const{onChange:e}=this.props;this.setState({value:t}),e(t)}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var r,l;const{filter:e,filteredOptions:n,keyboardOptionIndex:s}=this.state,{options:i}=this.props,o=e?n:i;switch(t.key){case"Enter":((r=o[s])==null?void 0:r.value)!=null&&this.updateInputValue(o[s].value),this.closeMenu(),(l=this.input.current)==null||l.focus(),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(bo.MENU_NAVIGATION_DIRECTION.UP),t.stopPropagation(),t.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(bo.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"Escape":e!==""?(this.setState({filter:""}),t.stopPropagation()):this.closeMenu();break;case"Tab":!t.shiftKey&&s===o.length-1&&this.closeMenu();break}}handleMenuNavigation(t){const{filter:e,filteredOptions:n,keyboardOptionIndex:s}=this.state,{options:i}=this.props,r=(e?n:i).length;let l=0;switch(t){case bo.MENU_NAVIGATION_DIRECTION.UP:l=-1;break;case bo.MENU_NAVIGATION_DIRECTION.DOWN:l=1;break}l!==0&&this.setState({keyboardOptionIndex:(s+l+r)%r})}handleInputKeyDown(t){const{onEnter:e}=this.props,{menuIsOpen:n}=this.state;t.key==="ArrowDown"||t.key==="ArrowUp"?n||this.openMenu():t.key==="Enter"&&e()}handleInputChange(t){this.updateInputValue(t.target.value)}handleOptionClick(t){var r;const e=Number(t.currentTarget.value),{filter:n,filteredOptions:s}=this.state,{options:i}=this.props,o=n?s:i;this.updateInputValue(o[e].value),this.closeMenu(),(r=this.input.current)==null||r.focus()}handleOptionFocus(t){this.setState({keyboardOptionIndex:Number(t.target.value)})}handleFilterChange(t){var i;const{options:e}=this.props,n=t.target.value,s=this.getCachedFilteredOptions(e,n);this.setState({filter:n,filteredOptions:s,keyboardOptionIndex:0}),(i=this.popper.current)==null||i.scheduleUpdate()}handleMenuBlur(t){t.relatedTarget instanceof Element&&this.popper.current!=null&&this.popper.current.element.contains(t.relatedTarget)||t.relatedTarget===this.toggleButton.current||this.closeMenu(!1)}handleInputBlur(t){const{menuIsOpen:e}=this.state;e&&t.relatedTarget instanceof Element&&this.popper.current!=null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var t;this.scrollOptionIntoView(),(t=this.searchInput.current)==null||t.focus()}handleMenuExited(){var e;const{menuIsOpen:t}=this.state;t&&(this.setState({menuIsOpen:!1}),(e=this.popper.current)==null||e.hide()),this.setState({filter:""})}toggleMenu(t){const{menuIsOpen:e}=this.state;e?this.closeMenu():this.openMenu(),t.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var t;(t=this.popper.current)==null||t.show()})}closeMenu(t=!0){var e,n;this.setState({menuIsOpen:!1}),t&&((e=this.input.current)==null||e.focus()),(n=this.popper.current)==null||n.hide()}updateKeyboardIndex(){const{value:t,filter:e,filteredOptions:n}=this.state,{options:s}=this.props,o=(e?n:s).findIndex(r=>r.value===t);this.setState({keyboardOptionIndex:o})}scrollOptionIntoView(){var e;const t=(e=this.menuContainer.current)==null?void 0:e.querySelector(".cb-option-btn.keyboard-active");t instanceof HTMLElement&&t.scrollIntoView({block:"nearest",inline:"nearest"})}renderMenuElement(){const{searchPlaceholder:t}=this.props,{filter:e,inputWidth:n}=this.state;return w("div",{className:"cb-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:s=>{s.stopPropagation()},style:{width:n},onBlur:this.handleMenuBlur,children:[h("div",{className:"cb-search-input-container",children:h(gs,{value:e,ref:this.searchInput,onChange:this.handleFilterChange,className:"cb-search-input",placeholder:t})}),h("div",{className:"cb-options-container",children:h("div",{className:"cb-options",children:this.renderOptions()})})]})}renderOptions(){const{options:t}=this.props,{keyboardOptionIndex:e,filter:n,filteredOptions:s}=this.state;return(n?s:t).map((o,r)=>{const l=`option-${r}-${o.value}`;return h("button",{type:"button",value:r,className:W("cb-option-btn",{"keyboard-active":e===r}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:o.title},l)})}render(){const{options:t,inputPlaceholder:e,disabled:n,className:s,defaultValue:i,spellCheck:o,"data-testid":r}=this.props,{value:l}=this.state;let{popperOptions:a}=this.props;return a={placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}},...a},w("div",{className:"input-group cb-container",ref:this.cbContainer,children:[h("input",{value:l||i,className:W("form-control",s,"cb-input"),ref:this.input,onChange:this.handleInputChange,placeholder:e||(t[0]!=null?t[0].title:void 0),disabled:n,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":r!==void 0?`${r}-input`:void 0}),h("div",{className:"input-group-append cb-dropdown",children:w("button",{type:"button",className:"btn cb-btn form-control",ref:this.toggleButton,onClick:this.toggleMenu,onKeyDown:this.handleInputKeyDown,disabled:n,"data-testid":r!==void 0?`${r}-btn`:void 0,children:[h(G,{icon:as}),h(Fn,{ref:this.popper,options:a,className:W("combobox interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})})]})}};let qi=bo;qi.MENU_NAVIGATION_DIRECTION=gu;qi.DROP_DOWN_MENU_HEIGHT=200;qi.propTypes={options:R.exports.arrayOf(R.exports.shape({title:R.exports.string.isRequired,value:R.exports.string.isRequired})).isRequired,popperOptions:R.exports.shape({title:R.exports.string.isRequired,value:R.exports.string.isRequired}),onChange:R.exports.func,inputPlaceholder:R.exports.string,searchPlaceholder:R.exports.string,disabled:R.exports.bool,className:R.exports.string,defaultValue:R.exports.string,spellCheck:R.exports.bool,onEnter:R.exports.func,"data-testid":R.exports.string};qi.defaultProps={onChange(){},inputPlaceholder:"",searchPlaceholder:"Search",disabled:!1,className:"",defaultValue:"",popperOptions:null,spellCheck:!0,onEnter(){},"data-testid":void 0};const Tn=X.module("MaskedInput"),vi={FORWARD:"forward",BACKWARD:"backward",NONE:"none"},hr="\u2007";function hd(t,e,n){return t.substring(0,e)+n+t.substring(e+1)}function sC(t,e,n){return t.length<n?`${t}${e.substring(t.length,n)}`:t}function Rc(t,e){let{length:n}=t;for(let s=t.length-1;s>=0&&e[s]===t[s];s-=1)n=s;return t.substring(0,n)}const ul=Y.forwardRef((t,e)=>{const{className:n,example:s,getNextSegmentValue:i=(k,H,O)=>O,getPreferredReplacementString:o=hd,onChange:r=()=>!1,onSelect:l=()=>!1,pattern:a,placeholder:d,selection:c,value:u,onFocus:m=()=>!1,onBlur:p=()=>!1,"data-testid":g}=t,f=pu(e),b=S.exports.useMemo(()=>Array.isArray(s)?s:[s],[s]),C=S.exports.useMemo(()=>b[0].replace(/[a-zA-Z0-9]/g,hr),[b]);S.exports.useEffect(function(){var H;if(c!=null){Tn.debug("setting selection...",c);const{selectionStart:O,selectionEnd:F,selectionDirection:_}=c;(H=f.current)==null||H.setSelectionRange(O,F,_),Tn.debug("selection set!")}},[c,f]);const v=S.exports.useCallback(k=>{let H=k,O=k;const F=b.length>0?b[0]:u;for(let L=H-1;L>=0&&/[a-zA-Z0-9]/g.test(F.charAt(L));L-=1)H=L;for(let L=O;L<F.length&&/[a-zA-Z0-9]/g.test(F.charAt(L));L+=1)O=L+1;const _=H===O?vi.NONE:vi.BACKWARD;return{selectionStart:H,selectionEnd:O,selectionDirection:_}},[b,u]);function T(k,H,O=k.length){let F="";for(let _=0;_<O;_+=1)k.charAt(_)!==hr?F=F.concat(k[_]):F=F.concat(H[_]);return F=F.concat(H.substring(O)),F}function E(k,H=k.length){const O=new RegExp(`^${a}$`);if(O.test(k))return!0;for(let F=0;F<b.length;F+=1){const _=T(k,b[F],H);if(O.test(_))return!0}return!1}function y(k){const H=v(k),O=H.selectionEnd+1;return O>=u.length?H:v(O)}function I(k){const H=v(k),O=H.selectionStart-1;return O<=0?H:v(O)}function D(k,H){const O=v(k),F=u.substring(O.selectionStart,O.selectionEnd),_=i(O,H,F,u),L=u.substring(0,O.selectionStart)+_+u.substring(O.selectionEnd);E(L,O.selectionEnd)&&(r(L),l(O))}const N=S.exports.useCallback(k=>{const{selectionStart:H=0,selectionEnd:O=0,selectionDirection:F="none"}=k.target;if(H===null||O===null||F===null){Tn.error("Selection attempted on non-text input element",k.target);return}if(Tn.debug2("handleSelect",H,O,F),!(c!=null&&H===c.selectionStart&&O===c.selectionEnd)){if(c!=null&&H===u.length&&O===u.length&&k.nativeEvent.type!=="mouseup"){l({...c});return}if(H===O){const _=v(H);Tn.debug("Selection segment from ",H,O,"=>",_),l(_)}else l({selectionStart:H,selectionEnd:O,selectionDirection:F})}},[v,l,c,u]),x=S.exports.useCallback(k=>{var O;if(!f.current)return;Tn.debug("handleSelectCapture",k);const H=(O=f.current.selectionStart)!=null?O:0;H===u.length&&c!=null&&H!==c.selectionStart&&(k.preventDefault(),k.stopPropagation())},[f,c,u]);function U(k){if(k.preventDefault(),k.stopPropagation(),!f.current)return;const{key:H}=k,{selectionStart:O=0,selectionEnd:F=0}=f.current;if(O===null||F===null){Tn.error("Selection arrow nvaigation attempted on non-text input element",k.target);return}H==="ArrowLeft"?l(I(O)):H==="ArrowRight"?l(y(F)):H==="ArrowUp"?D(O,-1):H==="ArrowDown"&&D(O,1)}function $(k){if(!f.current)return;Tn.debug("handleKeyDown",k);const{key:H}=k,{selectionStart:O=0,selectionEnd:F=0}=f.current;if(O===null||F===null){Tn.error("Selection key event on non-text input element",k.target);return}if(H.startsWith("Arrow")){U(k);return}if(H==="Delete"||H==="Backspace"){if(k.preventDefault(),k.stopPropagation(),F>=Rc(u,C).length){const L=u.substring(0,O===F?O-1:O),V=Rc(L,C);V!==u&&(r(V),l({selectionStart:V.length,selectionEnd:V.length,selectionDirection:vi.NONE}));return}if(O!==F){const L=u.substring(0,O)+u.substring(O,F).replace(/[a-zA-Z0-9]/g,hr)+u.substring(F);Tn.debug("Range ",O,F,"deleted, setting value",L),r(L),l({selectionStart:O,selectionEnd:O,selectionDirection:vi.NONE})}else if(O>0)for(let L=O-1;L>=0;L-=1){const V=u.substring(0,L)+u.substring(L,O).replace(/[a-zA-Z0-9]/g,hr)+u.substring(O);if(V!==u){r(V),l({selectionStart:L,selectionEnd:L,selectionDirection:vi.NONE});return}}return}if(k.altKey||k.metaKey||k.ctrlKey||H.length>1)return;k.preventDefault(),k.stopPropagation();const _=Array.from(new Set([H,H.toUpperCase(),H.toLowerCase()]));for(let L=0;L<_.length;L+=1){const V=_[L],z=/[a-zA-Z0-9]/g.test(V)?b[0].length-1:O;for(let j=O;j<=z;j+=1){const J=sC(u,b[0],j+1),Te=o(J,j,V,O,F);if(E(Te,j+1)){const le=v(j),we=j+1;let Oe={selectionStart:we,selectionEnd:we,selectionDirection:vi.NONE};if(we>=le.selectionEnd){const Z=y(j);Z.selectionStart!==le.selectionStart&&(Oe=Z)}Tn.debug("handleKeyDown",H,"=>",Te,Oe),r(Te),l(Oe);return}}}}return h("input",{ref:f,className:W("form-control masked-input",n),type:"text",pattern:a,placeholder:d,value:u,onChange:()=>{},onKeyDown:$,onSelect:N,onSelectCapture:x,onFocus:m,onBlur:p,"data-testid":g})});ul.defaultProps={className:"",placeholder:void 0,onChange(){},onSelect(){},getNextSegmentValue:(t,e,n)=>n,getPreferredReplacementString:hd,selection:void 0,onFocus(){},onBlur(){},"data-testid":void 0};const iC=X.module("TimeInput"),oC="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",rC=["00:00:00","12:34:56","23:59:59"],fu=Y.forwardRef((t,e)=>{const{allowValueWrapping:n=!0,className:s="",onChange:i=()=>!1,value:o=0,onFocus:r=()=>!1,onBlur:l=()=>!1,onSelect:a=()=>!1,"data-testid":d}=t,[c,u]=S.exports.useState(In.formatTime(o)),[m,p]=S.exports.useState(),g=S.exports.useRef(null);S.exports.useImperativeHandle(e,()=>({focus:()=>{var T;(T=g.current)==null||T.focus()},setSelection:T=>{var E;(E=g.current)==null||E.focus(),p(T)}}),[]),S.exports.useEffect(function(){u(In.formatTime(o))},[o]);function f(T,E,y){const I=T.selectionStart===0?24:60;let D=parseInt(y,10)-E;return Number.isNaN(D)?D=0:n?D=(D%I+I)%I:D=Math.min(Math.max(0,D),I-1),`${D}`.padStart(2,"0")}function b(T,E,y,I,D){return I===0&&D===2&&E===1&&parseInt(y,10)>1?`0${y}${T.substring(2)}`:hd(T,E,y)}function C(T){iC.debug("handleChange",T),u(T),In.isTimeString(T)&&i(In.parseTime(T))}const v=S.exports.useCallback(T=>{p(T),a(T)},[a]);return h(ul,{ref:g,className:s,example:rC,getNextSegmentValue:f,getPreferredReplacementString:b,onChange:C,onSelect:v,pattern:oC,selection:m,value:c,onFocus:r,onBlur:l,"data-testid":d})});fu.defaultProps={allowValueWrapping:!0,className:"",onChange:()=>!1,onSelect:()=>!1,value:0,onFocus:()=>!1,onBlur:()=>!1,"data-testid":void 0};class Cu extends S.exports.PureComponent{constructor(e){var i;super(e),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.container=Y.createRef(),this.oldFocus=document.activeElement,this.rAF=0;const{options:n}=e,s=(i=n.initialKeyboardIndex)!=null?i:-1;this.state={menuItems:[],keyboardIndex:s,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.rAF=window.requestAnimationFrame(()=>{var n;(n=this.container.current)==null||n.focus();const{onMenuOpened:e}=this.props;e(this)})}componentDidUpdate(e){const{actions:n}=this.props;e.actions!==n&&this.initMenu()}componentWillUnmount(){cancelAnimationFrame(this.rAF)}getKeyboardIndex(){const{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){const{keyboardIndex:n}=this.state;return n}return this.getMouseIndex()}setKeyboardIndex(e){const{options:n}=this.props;n.separateKeyboardMouse!==void 0&&n.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){const{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){cancelAnimationFrame(this.rAF),this.setState({menuItems:[]});const{actions:e}=this.props,n=Ne.getMenuItems(e,!1);n.length>0&&this.setState(s=>({menuItems:Ne.sortActions(s.menuItems.concat(n))}))}handleKeyDown(e){const{menuItems:n}=this.state,s=this.getKeyboardIndex();let i=s;if(e.key==="Enter"||e.key===" "){s!=null&&s>=0&&s<n.length&&this.handleMenuItemClick(n[s],e);return}e.key==="Escape"?i=null:e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey===!0?i=Ne.getNextMenuItem(i!=null?i:0,-1,n):(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1)&&(i=Ne.getNextMenuItem(i!=null?i:0,1,n)),s!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}closeMenu(e=!1){const{closeMenu:n,onMenuClosed:s}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{n(e),s(this)})}handleCloseMenu(){this.closeMenu()}handleMenuItemClick(e,n){n.preventDefault(),n.stopPropagation(),e!=null&&(e.disabled===void 0||!e.disabled)&&e.action!=null&&(e.action(),this.closeMenu(!0))}handleMenuItemMouseMove(e){const{menuItems:n}=this.state,s=n.indexOf(e);this.setMouseIndex(s)}handleMouseLeave(){this.setMouseIndex(-1)}render(){const e=[],{"data-testid":n}=this.props,{keyboardIndex:s,menuItems:i,mouseIndex:o}=this.state;for(let l=0;l<i.length;l+=1){const a=i[l];l>0&&a.group!==i[l-1].group&&e.push(h("hr",{},`${l}.separator`));const d=h(dl,{isKeyboardSelected:s===l,isMouseSelected:o===l,menuItem:a,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},l);e.push(d)}const{menuStyle:r}=this.props;return h("div",{className:"context-menu-container",style:{...r},ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":n,children:e})}}Cu.defaultProps={closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0};class Wn extends S.exports.PureComponent{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.handleExited=this.handleExited.bind(this),this.container=Y.createRef(),this.parent=null,this.popper=Y.createRef(),this.isOpen=!1}componentDidMount(){var n;const{isShown:e}=this.props;e===null?(n=this.container.current)!=null&&n.parentElement&&(this.parent=this.container.current.parentElement,this.parent.addEventListener("click",this.handleClick)):e&&this.openMenu()}componentDidUpdate(e){const{isShown:n}=this.props;e.isShown!==n&&(n!==null&&n?window.requestAnimationFrame(()=>{this.openMenu()}):this.closeMenu())}componentWillUnmount(){this.parent&&this.parent.removeEventListener("click",this.handleClick)}closeMenu(){var e;(e=this.popper.current)==null||e.hide()}openMenu(){this.popper.current&&!this.isOpen&&(this.popper.current.show(),this.isOpen=!0)}scheduleUpdate(){var e;(e=this.popper.current)==null||e.scheduleUpdate()}handleClick(e){e.preventDefault(),e.stopPropagation(),this.openMenu()}handleCloseMenu(){this.closeMenu()}handleExited(){this.isOpen=!1;const{onMenuClosed:e}=this.props;e()}render(){const{actions:e,onMenuOpened:n,popperClassName:s,"data-testid":i}=this.props,{menuStyle:o}=this.props;let{options:r,popperOptions:l}=this.props;return l={placement:"bottom",...l},r={separateKeyboardMouse:!0,...r},h("div",{className:"menu-actions-listener",ref:this.container,"data-testid":i,children:h(Fn,{ref:this.popper,options:l,className:W("menu-popper",s),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:h(Cu,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:n,options:r,menuStyle:o})})})}}Wn.defaultProps={isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0};const Dc=-1;var bu=(t=>(t.UP="UP",t.DOWN="DOWN",t))(bu||{});const ns=class extends S.exports.Component{constructor(t){super(t);const{value:e,valueToTime:n}=t;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=Y.createRef(),this.menuContainer=Y.createRef(),this.button=Y.createRef(),this.input=Y.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:n(e),inputFocused:!1}}getSelectedText(){const{options:t,value:e,placeholder:n}=this.props,{customTime:s}=this.state;if(e===null)return n;for(let i=0;i<t.length;i+=1){const o=t[i];if(o.value===e)return o.title}return In.formatTime(s)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var t;(t=this.button.current)==null||t.focus()}updateInputValue(t){const{onChange:e}=this.props;e(t)}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var i;const{keyboardOptionIndex:e,inputFocused:n}=this.state,{options:s}=this.props;switch(t.key){case"Enter":case" ":n?this.updateFromCustom():this.updateInputValue(s[e].value),this.closeMenu(),(i=this.button.current)==null||i.focus(),t.stopPropagation(),t.preventDefault();break;case"Tab":t.shiftKey?this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.UP),t.stopPropagation(),t.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(t){const{keyboardOptionIndex:e,inputFocused:n}=this.state,{options:s}=this.props,i=s.length;let o=e;switch(t){case ns.MENU_NAVIGATION_DIRECTION.UP:if(!n&&e===0){this.focusInput();break}else n&&this.focusOption(e);e>0&&!n?(o=(o-1)%i,this.setState({keyboardOptionIndex:o})):e===0&&(o=i-1,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break;case ns.MENU_NAVIGATION_DIRECTION.DOWN:if(!n&&e===i-1){this.focusInput();break}else n&&this.focusOption(e);e<i&&!(n&&e===0)&&(o=(o+1)%i,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break}}handleOptionClick(t){const e=Number(t.currentTarget.value),{options:n,timeToValue:s}=this.props,{customTime:i}=this.state;if(e===Dc){const o=s(i);this.updateAndClose(o)}else this.updateAndClose(n[e].value)}updateAndClose(t){var e;this.updateInputValue(t),this.closeMenu(),(e=this.button.current)==null||e.focus()}handleOptionFocus(t){this.setState({keyboardOptionIndex:Number(t.target.value)})}handleMenuOpened(){var o;const{options:t,value:e}=this.props,{keyboardOptionIndex:n}=this.state;this.scrollOptionIntoView(n);const s=(o=this.menuContainer.current)==null?void 0:o.querySelector(".cs-option-btn.keyboard-active");if(s instanceof HTMLElement&&s.focus(),e===null)return;t.map(r=>r.value).indexOf(e)<0&&this.focusInput()}focusInput(){var t;(t=this.input.current)==null||t.focus()}focusOption(t){var n;const e=(n=this.menuContainer.current)==null?void 0:n.querySelector(".cs-options");if(e&&e.children!=null){const s=e.children.item(t);s instanceof HTMLElement&&s.focus()}}handleMenuExited(){const{menuIsOpen:t}=this.state;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(t){const{timeToValue:e}=this.props,n=e(t);this.updateInputValue(n),this.setState({customTime:t})}updateFromCustom(){const{timeToValue:t}=this.props,{customTime:e}=this.state,n=t(e);this.updateInputValue(n)}toggleMenu(t){const{menuIsOpen:e}=this.state;e?this.closeMenu():this.openMenu(),t.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(t=!0){var e;this.setState({menuIsOpen:!1}),t&&((e=this.button.current)==null||e.focus())}updateKeyboardIndex(){const{options:t,value:e}=this.props;if(e===null)return;const n=t.map(s=>s.value).indexOf(e);n>0&&this.setState({keyboardOptionIndex:n})}scrollOptionIntoView(t){var n;const e=(n=this.menuContainer.current)==null?void 0:n.querySelector(".cs-options");if(e&&e.children!=null){const s=e.children.item(t);s instanceof HTMLElement&&s.offsetTop>ns.DROP_DOWN_MENU_HEIGHT?e.scrollTop=s.offsetTop-ns.DROP_DOWN_MENU_HEIGHT:(s instanceof HTMLElement&&s.offsetTop<0||t===0)&&(e.scrollTop=0)}}renderMenuElement(){const{inputWidth:t}=this.state;return h("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:e=>{e.stopPropagation()},style:{width:t},children:h("div",{className:"cs-options-container",children:h("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){const{options:t,value:e,icon:n,customText:s}=this.props,{keyboardOptionIndex:i,customTime:o,inputFocused:r}=this.state;let l=!1;const a=[];for(let d=0;d<t.length;d+=1){const c=t[d],u=`option-${d}-${c.value}`;l=l||c.value===e,a.push(w("button",{type:"button",value:d,className:W("cs-option-btn",{"keyboard-active":i===d&&!r}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[c.value===e&&h(G,{icon:n,className:"mr-2"}),c.value!==e&&h("span",{className:"mr-4"}),c.title]},u))}return a.push(h("hr",{className:"cs-divider"},"option-divider")),a.push(w("button",{type:"button",value:Dc,className:W("cs-option-btn",{"keyboard-active":r}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!l&&e!==null?h(G,{icon:n,className:"mr-2"}):h("span",{className:"mr-4"}),s]},"option-custom-label")),a.push(w("div",{className:"cs-custom-container",children:[h("span",{className:"mr-2"}),h(fu,{ref:this.input,onChange:this.handleCustomInput,value:o,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),h("span",{className:"ml-2"})]},"cs-custom-container")),a.push(h("hr",{className:"mb-2"},"option-end")),a}render(){const{disabled:t,invalid:e,value:n,"data-testid":s}=this.props,{menuIsOpen:i}=this.state;let{popperOptions:o}=this.props;return o={placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}},...o},h("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":s,children:h("div",{className:W("input-group-append cs-dropdown",{"cs-dropdown-invalid":e}),children:w("button",{type:"button",className:W("btn cs-btn form-control",{"cs-btn-invalid":e}),ref:this.button,onClick:this.toggleMenu,disabled:t,children:[h("span",{className:W({"text-muted":n===null}),children:this.getSelectedText()}),h("span",{children:h(G,{icon:ad,className:"cs-caret"})}),h(Wn,{isShown:i,actions:{menuElement:this.renderMenuElement()},popperOptions:o,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}};let ud=ns;ud.MENU_NAVIGATION_DIRECTION=bu;ud.DROP_DOWN_MENU_HEIGHT=125;ud.defaultProps={onChange(){},value:null,disabled:!1,popperOptions:{},icon:li,customText:"Custom",placeholder:"Select a time",valueToTime:t=>t===null?0:Math.round(t/1e3),timeToValue:t=>t*1e3,invalid:!1,"data-testid":void 0};function Ti(t,e,n,s,i){const o=s-n+1;return`${((parseInt(e,10)-t-n)%o+o)%o+n}`.padStart(i,"0")}function Su(t,e,n){const{selectionStart:s}=t;return s===0?Ti(e,n,1900,2099,4):s===5?Ti(e,n,1,12,2):s===8?Ti(e,n,1,31,2):s===11?Ti(e,n,0,23,2):s===17||s===14?Ti(e,n,0,59,2):s===20||s===24||s===28?Ti(e,n,0,999,3):n}const lC=X.module("DateTimeInput"),aC="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",dC="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}\u200B[0-9]{3}\u200B[0-9]{3}",cC=`${aC} ${dC}`,hC="2022-01-01 00:00:00.000000000",uC="YYYY-MM-DD HH:MM:SS.SSSSSSSSS";function wu(t){const e=t.substring(0,23),n=t.substring(23,26),s=t.substring(26);return[e,n,s].filter(i=>i!=="").join("\u200B")}const mC=t=>t.replace(/\u200B/g,""),pC=[wu(hC)],vu=Y.forwardRef((t,e)=>{const{className:n="",onChange:s=()=>{},defaultValue:i="",onFocus:o=()=>{},onBlur:r=()=>{},"data-testid":l}=t,[a,d]=S.exports.useState(i.length>0?wu(i):""),[c,u]=S.exports.useState(),m=S.exports.useCallback(p=>{lC.debug("handleChange",p),d(p),s(mC(p))},[s]);return h("div",{className:"d-flex flex-row align-items-center",children:h(ul,{ref:e,className:W(n),example:pC,getNextSegmentValue:Su,onChange:m,onSelect:u,pattern:cC,placeholder:uC,selection:c,value:a,onFocus:o,onBlur:r,"data-testid":l})})});vu.displayName="DateTimeInput";vu.defaultProps={className:"",onChange:()=>{},defaultValue:"",onFocus:()=>{},onBlur:()=>{},"data-testid":void 0};const gC=X.module("DateInput"),fC="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",CC=["2000-01-01","2022-12-31"],bC="YYYY-MM-DD",Tu=Y.forwardRef((t,e)=>{const{className:n="",onChange:s=()=>{},defaultValue:i="",onFocus:o=()=>{},onBlur:r=()=>{},"data-testid":l}=t,[a,d]=S.exports.useState(i),[c,u]=S.exports.useState(),m=S.exports.useCallback(p=>{gC.debug("handleChange",p),d(p),s(p)},[s]);return h("div",{className:"d-flex flex-row align-items-center",children:h(ul,{ref:e,className:W(n),example:CC,getNextSegmentValue:Su,onChange:m,onSelect:u,pattern:fC,placeholder:bC,selection:c,value:a,onFocus:o,onBlur:r,"data-testid":l})})});Tu.displayName="DateInput";Tu.defaultProps={className:"",onChange:()=>!1,defaultValue:"",onFocus:()=>!1,onBlur:()=>!1,"data-testid":void 0};class Eu extends S.exports.PureComponent{constructor(e){super(e),this.searchInput=Y.createRef(),this.handleChange=this.handleChange.bind(this),this.sendUpdate=Xe(this.sendUpdate.bind(this),e.debounceMs),this.state={value:e.value}}componentDidUpdate(e){const{value:n}=this.props;e.value!==n&&this.setState({value:n})}focus(){var e;(e=this.searchInput.current)==null||e.focus()}handleChange(e){this.setState({value:e.target.value},this.sendUpdate)}sendUpdate(){const{onChange:e}=this.props,{value:n}=this.state;e(n)}render(){const{placeholder:e,className:n,matchCount:s,id:i,"data-testid":o}=this.props,{value:r}=this.state;return h(gs,{value:r,placeholder:e,onChange:this.handleChange,className:n,matchCount:s,ref:this.searchInput,id:i,"data-testid":o})}}Eu.defaultProps={placeholder:"Search",className:"",matchCount:null,debounceMs:250,id:"","data-testid":void 0};const SC=({className:t="",show:e=!0,"data-testid":n})=>w("div",{className:W("dh-loader",t,{show:e}),"data-testid":n,children:[h("svg",{className:"dh-outer-shape",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("path",{d:"M82.7429,0L82.7429,41.3714L45.2571,41.3714L45.2571,0L0,0L0,128L45.2571,128L45.2571,86.6286L82.5143,86.6286L82.5143,128L128,128L128,0L82.7429,0ZM41.3714,124.114L4.11429,124.114L4.11429,86.6286L41.3714,86.6286L41.3714,124.114ZM41.3714,82.7429L4.11429,82.7429L4.11429,45.2571L41.3714,45.2571L41.3714,82.7429ZM41.3714,41.3714L4.11429,41.3714L4.11429,4.11429L41.3714,4.11429L41.3714,41.3714ZM45.2571,82.7429L45.2571,45.2571L82.5143,45.2571L82.5143,82.5143L45.2571,82.5143ZM124.114,124.114L86.6286,124.114L86.6286,86.6286L123.886,86.6286L123.886,124.114ZM124.114,82.7429L86.6286,82.7429L86.6286,45.2571L123.886,45.2571L123.886,82.7429ZM86.6286,41.3714L86.6286,4.11429L123.886,4.11429L123.886,41.3714L86.6286,41.3714Z",fill:"#f0f0ee"})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-3",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.3438",height:"37.6389",fill:"#5189e5",transform:"translate(-21.9838,29.7957) translate(21.9838,15.3027)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-2",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.2755",height:"37.4675",fill:"#5189e5",transform:"translate(-21.9838,69.7957) translate(22.0822,16.7783)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-5",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.3512",height:"41.3781",fill:"#35618c",transform:"translate(18.0162,72.7957) translate(23.1643,13.7278)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-6",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.2483",height:"37.5869",fill:"#35618c",transform:"translate(59.0162,29.7957) translate(23.6379,15.3564)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-7",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.5664",height:"41.2747",fill:"#35618c",transform:"translate(17.0162,-13.2043) translate(24.2531,13.2043)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-4",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.2854",height:"37.3014",fill:"#5189e5",transform:"translate(-21.9838,-13.2043) translate(22.0822,17.1792)"})})})})]});const wC=X.module("ItemListItem"),yu=class extends S.exports.Component{constructor(t){super(t),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleClick=this.handleClick.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleDragStart=this.handleDragStart.bind(this),this.handleDrag=this.handleDrag.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this),this.handleDrop=this.handleDrop.bind(this),this.handleDoubleClick=this.handleDoubleClick.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.itemRef=Y.createRef()}static handleKeyDown(){return wC.log("ItemListItem.handleKeyDown false"),!1}handleBlur(t){const{itemIndex:e,onBlur:n}=this.props;n(e,t)}handleFocus(t){const{itemIndex:e,onFocus:n}=this.props;n(e,t)}handleClick(t){const{itemIndex:e,onClick:n}=this.props;n(e,t)}handleContextMenu(t){const{itemIndex:e,onContextMenu:n}=this.props;n(e,t)}handleDragStart(t){const{itemIndex:e,onDragStart:n}=this.props;n(e,t)}handleDrag(t){const{itemIndex:e,onDrag:n}=this.props;n(e,t)}handleDragOver(t){t.preventDefault();const{itemIndex:e,onDragOver:n}=this.props;n(e,t)}handleDragEnd(t){const{itemIndex:e,onDragEnd:n}=this.props;n(e,t)}handleDrop(t){const{itemIndex:e,onDrop:n}=this.props;n(e,t)}handleDoubleClick(t){const{itemIndex:e,onDoubleClick:n}=this.props;n(e,t)}handleMouseMove(t){const{itemIndex:e,onMouseMove:n}=this.props;n(e,t)}handleMouseDown(t){const{itemIndex:e,onMouseDown:n}=this.props;n(e,t)}handleMouseUp(t){const{itemIndex:e,onMouseUp:n}=this.props;n(e,t)}render(){const{isDraggable:t,isFocused:e,isSelected:n,style:s,children:i,"data-testid":o}=this.props;return h("div",{className:W("item-list-item",{active:n},{"is-focused":e},{"is-draggable":t}),onKeyDown:yu.handleKeyDown,onContextMenu:this.handleContextMenu,onClick:this.handleClick,onDrag:this.handleDrag,onDragStart:this.handleDragStart,onDragOver:this.handleDragOver,onDragEnd:this.handleDragEnd,onDrop:this.handleDrop,onDoubleClick:this.handleDoubleClick,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,tabIndex:-1,ref:this.itemRef,role:"listitem",style:s,onFocus:this.handleFocus,onBlur:this.handleBlur,draggable:t,"data-testid":o,children:i})}};let Iu=yu;Iu.defaultProps={children:null,isDraggable:!1,isFocused:!1,isSelected:!1,itemIndex:0,disableSelect:!1,"data-testid":void 0,onBlur(){},onClick(){},onContextMenu(){},onDragStart(){},onDrag(){},onDragOver(){},onDragEnd(){},onDrop(){},onDoubleClick(){},onFocus(){},onMouseDown(){},onMouseMove(){},onMouseUp(){},style:{}};const Mc=X.module("ItemList"),Ai=class extends S.exports.PureComponent{constructor(t){super(t),this.getItemSelected=Ee((s,i)=>fn.isSelected(i,s),{max:Ai.CACHE_SIZE}),this.getCachedItem=Ee((s,i,o,r,l,a,d,c)=>{const u=a({item:o,itemIndex:s,isFocused:r,isSelected:l,style:d});return h(Iu,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:c,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:r,isSelected:l,itemIndex:s,style:d,children:u},i)},{max:Ai.CACHE_SIZE}),this.getOuterElement=Ee(s=>{const i=Y.forwardRef((o,r)=>h("div",{ref:r,tabIndex:-1,onKeyDown:s,role:"presentation",...o}));return i.displayName="ItemListOuterElement",i}),this.getInnerElement=Ee(()=>{const s=Y.forwardRef((i,o)=>h("div",{className:"item-list-inner-element",ref:o,...i}));return s.displayName="ItemListInnerElement",s}),this.getItemData=Ee((s,i,o)=>({items:s,selectedRanges:i,renderItem:o})),this.handleItemBlur=this.handleItemBlur.bind(this),this.handleItemContextMenu=this.handleItemContextMenu.bind(this),this.handleItemFocus=this.handleItemFocus.bind(this),this.handleItemDoubleClick=this.handleItemDoubleClick.bind(this),this.handleItemMouseDown=this.handleItemMouseDown.bind(this),this.handleItemMouseMove=this.handleItemMouseMove.bind(this),this.handleItemMouseUp=this.handleItemMouseUp.bind(this),this.handleItemsRendered=this.handleItemsRendered.bind(this),this.handleWindowMouseUp=this.handleWindowMouseUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleResize=this.handleResize.bind(this),this.renderInnerElement=this.renderInnerElement.bind(this),this.list=Y.createRef(),this.listContainer=Y.createRef();const{isStickyBottom:e,selectedRanges:n}=t;this.state={focusIndex:null,mouseDownIndex:null,selectedRanges:n,overscanStartIndex:0,height:null,isDragging:!1,isStuckToBottom:e,scrollOffset:null}}static renderItem({item:t}){var e,n;return h("div",{className:"item-list-item-content",children:t!=null&&((n=(e=t.displayValue)!=null?e:t.value)!=null?n:`${t}`)})}componentDidMount(){const{isStickyBottom:t}=this.props;t&&!this.isListAtBottom()&&this.scrollToBottom()}componentDidUpdate(t,e){const{selectedRanges:n}=this.props,{focusIndex:s,isStuckToBottom:i,scrollOffset:o,height:r,selectedRanges:l}=this.state;if(i&&!this.isListAtBottom()&&this.scrollToBottom(),(o!==e.scrollOffset||r!==e.height)&&this.sendViewportUpdate(),n!==t.selectedRanges&&n!==l)this.setSelectedRanges(n);else if(l!==e.selectedRanges){const{onSelectionChange:a}=this.props;a(l)}if(s!==e.focusIndex){const{onFocusChange:a}=this.props;a(s)}}componentWillUnmount(){window.removeEventListener("mouseup",this.handleWindowMouseUp)}focus(){var t;(t=this.listContainer.current)==null||t.focus()}getElement(t){if(this.listContainer.current==null)return null;const{focusSelector:e}=this.props,{overscanStartIndex:n}=this.state,s=this.listContainer.current.querySelectorAll(e),i=t-n;return s[i]}focusItem(t){const{disableSelect:e}=this.props;if(e)return;this.setState({focusIndex:t});const n=this.getElement(t);n instanceof HTMLElement&&n.focus()}scrollToItem(t){const e=this.getElement(t);e!=null&&e.scrollIntoView({block:"center"})}handleItemContextMenu(t,e){const{selectedRanges:n}=this.state,i=fn.isSelected(n,t)||Ne.isModifierKeyDown(e);this.toggleSelect(t,e.shiftKey,i,!1)}handleItemDoubleClick(t,e){const{isDoubleClickSelect:n,onSelect:s}=this.props;n&&this.setState(({selectedRanges:i})=>({selectedRanges:fn.selectRange(i,[t,t])}),()=>{s(t,e)})}handleItemMouseDown(t,e){const{selectedRanges:n}=this.state;if(!(e.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(e.target.tagName.toLowerCase())!==-1)){if(e.button===2&&n.length===0){this.focusItem(t),this.selectItem(t);return}e.button!=null&&e.button!==0||(this.setState({mouseDownIndex:t}),window.addEventListener("mouseup",this.handleWindowMouseUp))}}handleItemBlur(t,e){Mc.debug2("item blur",t,e.currentTarget,e.relatedTarget),(!e.relatedTarget||this.listContainer.current&&e.relatedTarget instanceof HTMLElement&&!this.listContainer.current.contains(e.relatedTarget))&&this.setState({focusIndex:null})}handleItemFocus(t,e){Mc.debug2("item focus",t,e.target),this.setState(n=>{const{focusIndex:s}=n;return s!==t?{focusIndex:t}:null})}handleItemMouseMove(t,e){const{isDragSelect:n,isMultiSelect:s,disableSelect:i}=this.props,{mouseDownIndex:o,selectedRanges:r}=this.state;o==null||i||(this.setState({isDragging:!0}),(n||o===t)&&(this.focusItem(t),s?(!n&&!this.getItemSelected(t,r)&&!Ne.isModifierKeyDown(e)&&this.deselectAll(),this.selectRange([Math.min(o,t),Math.max(o,t)])):this.toggleSelect(t,e.shiftKey,Ne.isModifierKeyDown(e),!1)))}handleItemMouseUp(t,e){const{isDeselectOnClick:n,isDoubleClickSelect:s,onSelect:i}=this.props,{mouseDownIndex:o,isDragging:r}=this.state;if(!(e.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(e.target.tagName.toLowerCase())!==-1)){if(o===t&&!r){const l=e.shiftKey,a=Ne.isModifierKeyDown(e);this.focusItem(t),this.toggleSelect(t,l,a,n),!s&&!l&&!a&&i(t,e)}this.resetMouseState()}}handleItemsRendered({overscanStartIndex:t}){this.setState({overscanStartIndex:t})}handleResize({height:t}){this.setState({height:t})}handleMouseLeave(){this.setState({mouseDownIndex:null})}handleWindowMouseUp(){this.resetMouseState(),window.removeEventListener("mouseup",this.handleWindowMouseUp)}handleKeyDown(t){var r;const{isMultiSelect:e,itemCount:n,onSelect:s}=this.props,{focusIndex:i}=this.state;let o=i;if(t.key==="Enter"||t.key===" "){!e&&o!=null&&this.setState({selectedRanges:[[o,o]]},()=>{o!=null&&s(o,t)});return}if(t.key==="ArrowUp")o!=null&&o>=0?o=Math.max(0,o-1):o=n-1;else if(t.key==="ArrowDown")o!=null&&o>=0?o=Math.min(o+1,n-1):o=0;else return;if(i!==o){t.stopPropagation(),t.preventDefault(),this.focusItem(o);const{selectedRanges:l}=this.state;if(t.shiftKey&&l.length>0){const a=l[l.length-1];this.selectRange([Math.min(o,a[0]),Math.max(o,a[1])])}else this.deselectAll(),o!==null?this.selectItem(o):(r=this.listContainer.current)==null||r.focus();this.scrollIntoView(o)}}handleScroll({scrollUpdateWasRequested:t,scrollOffset:e}){this.setState(n=>{if(t)return{scrollOffset:e};const{isStickyBottom:s}=this.props,{height:i}=n;return{isStuckToBottom:s&&this.isListAtBottom({scrollOffset:e,height:i}),scrollOffset:e}})}resetMouseState(){this.setState({mouseDownIndex:null,isDragging:!1})}scrollToBottom(){const{itemCount:t}=this.props;this.list.current&&this.list.current.scrollToItem(t)}scrollIntoView(t){this.list.current&&this.list.current.scrollToItem(t)}toggleSelect(t,e,n,s=!0){const{isMultiSelect:i}=this.props,{selectedRanges:o}=this.state;if(i&&e&&o.length>0){const r=o[o.length-1];this.selectRange([Math.min(r[0],t),Math.max(t,r[1])])}else i&&o.length===1&&o[0][0]===t&&o[0][1]===t?s&&this.deselectItem(t):i&&n?this.getItemSelected(t,o)?s&&this.deselectItem(t):this.selectItem(t):(this.deselectAll(),this.selectItem(t))}deselectAll(){const{itemCount:t}=this.props;this.deselectRange([0,t])}deselectItem(t){this.deselectRange([t,t])}deselectRange(t){fn.validateRange(t),this.setState(({selectedRanges:e})=>({selectedRanges:fn.deselectRange(e,t)}))}selectItem(t){const{disableSelect:e}=this.props;e||this.selectRange([t,t])}selectRange(t){fn.validateRange(t),this.setState(({selectedRanges:e})=>({selectedRanges:fn.selectRange(e,t)}))}setSelectedRanges(t){this.setState({selectedRanges:t})}sendViewportUpdate(){const{scrollOffset:t,height:e}=this.state;if(t!=null&&e!=null){const{onViewportChange:n,rowHeight:s}=this.props,i=Math.floor(t/s),o=i+Math.ceil(e/s);n(i,o)}}isListAtBottom({scrollOffset:t,height:e}=this.state){if(e==null||t==null)return!1;const{itemCount:n,rowHeight:s}=this.props;return t+e>=n*s}renderInnerElement({index:t,style:e}){const{items:n,offset:s,renderItem:i,disableSelect:o}=this.props,{focusIndex:r,selectedRanges:l}=this.state;if(t<s||t>=s+n.length)return null;const a=n[t-s];return this.getCachedItem(t,t,a,t===r&&!o,this.getItemSelected(t,l),i,e,o)}render(){const{items:t,itemCount:e,overscanCount:n,renderItem:s,rowHeight:i,"data-testid":o}=this.props,{selectedRanges:r}=this.state;return h(Bp,{className:"item-list-auto-sizer",onResize:this.handleResize,children:({width:l,height:a})=>h($p,{className:"item-list-scroll-pane",height:a,width:l,itemCount:e,itemSize:i,itemData:this.getItemData(t,r,s),onScroll:this.handleScroll,onItemsRendered:this.handleItemsRendered,ref:this.list,outerElementType:this.getOuterElement(this.handleKeyDown),outerRef:this.listContainer,innerElementType:this.getInnerElement(),overscanCount:n,"data-testid":o,children:this.renderInnerElement})})}};let bn=Ai;bn.CACHE_SIZE=1e3;bn.DEFAULT_ROW_HEIGHT=20;bn.DEFAULT_OVERSCAN=10;bn.defaultProps={offset:0,items:[],rowHeight:Ai.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:Ai.DEFAULT_OVERSCAN,renderItem:Ai.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0};const ni=class extends S.exports.PureComponent{constructor(t){super(t),this.getCachedDraggableItem=Ee((e,n,s,i,o,r,l,a)=>h(ol,{draggableId:ni.getDraggableId(e,i),index:i,isDragDisabled:l,children:d=>h("div",{role:"menuitem",className:"draggable-item-list-item",ref:d.innerRef,tabIndex:-1,...d.draggableProps,...d.dragHandleProps,children:n({item:s,itemIndex:i,isFocused:o,isSelected:r,style:a,isClone:!1})})},i),{max:bn.CACHE_SIZE}),this.getCachedRenderDraggableItem=Ee((e,n,s)=>({item:i,itemIndex:o,isFocused:r,isSelected:l,style:a})=>this.getCachedDraggableItem(e,s,i,o,r,l,n,a),{max:1}),this.getCachedRenderClone=Ee((e,n,s,i)=>(o,r,l)=>{const{selectedCount:a}=this.state,{index:d}=l.source,c=n[d-s];return h("div",{className:W("draggable-item-list-dragging-item-container",e),...o.draggableProps,...o.dragHandleProps,ref:o.innerRef,children:h("div",{className:W("draggable-item-list-dragging-item",{"two-dragged":a===2},{"multiple-dragged":a>2}),children:i({item:c,itemIndex:d,isFocused:!1,isSelected:!0,style:{},isClone:!0,selectedCount:a})})})},{max:1}),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.itemList=Y.createRef(),this.state={selectedCount:0}}static renderHandle(){return w("div",{children:[h(ge,{children:"Drag to re-order"}),h(G,{icon:al})]})}static renderBadge({text:t}){return t!=null&&t.length>0?h("span",{className:"number-badge",children:t}):null}static renderTextItem({text:t,badgeText:e="",className:n=""}){return w("div",{className:W("item-list-item-content","draggable-item-list-item-content",n),children:[h("span",{className:"title",children:t}),ni.renderBadge({text:e}),ni.renderHandle()]})}static renderItem({item:t,isClone:e,selectedCount:n}){var r,l;const s=t!=null?(l=(r=t.displayValue)!=null?r:t.value)!=null?l:`${t}`:"",i=e!==void 0&&e?`${n}`:"",o=e!==void 0&&e?"item-list-item-clone":"";return ni.renderTextItem({text:s,badgeText:i,className:o})}static getDraggableId(t,e){return`${t}/${e}`}static getDraggableIndex(t){const e=t.split("/").pop();return parseInt(e!==void 0?e:"",10)}selectItem(t){var e;(e=this.itemList.current)==null||e.selectItem(t)}focusItem(t){var e;(e=this.itemList.current)==null||e.focusItem(t)}scrollToItem(t){var e;(e=this.itemList.current)==null||e.scrollToItem(t)}handleSelectionChange(t){this.setState({selectedCount:fn.count(t)});const{onSelectionChange:e}=this.props;e(t)}render(){const{className:t,draggablePrefix:e,draggingItemClassName:n,droppableId:s,isDoubleClickSelect:i,isDragDisabled:o,isDropDisabled:r,isMultiSelect:l,isStickyBottom:a,itemCount:d,items:c,offset:u,onFocusChange:m,onSelect:p,onViewportChange:g,renderItem:f,rowHeight:b,selectedRanges:C,style:v,"data-testid":T}=this.props;return h(Lo,{isDropDisabled:r,droppableId:s,mode:"virtual",renderClone:this.getCachedRenderClone(n,c,u,f),"data-testid":T,children:(E,y)=>h("div",{role:"menu",className:W("draggable-item-list",t,{"is-drop-disabled":r,"is-drag-disabled":o,"is-dragging-from-this":y.draggingFromThisWith,"is-dragging-over":y.isDraggingOver,"is-dropping":y.draggingOverWith}),style:v,ref:E.innerRef,...E.droppableProps,children:h(bn,{focusSelector:".draggable-item-list-item",isDoubleClickSelect:i,isDragSelect:!1,isMultiSelect:l,isStickyBottom:a,itemCount:d,items:c,onFocusChange:m,onSelect:p,onSelectionChange:this.handleSelectionChange,onViewportChange:g,offset:u,ref:this.itemList,renderItem:this.getCachedRenderDraggableItem(e,o,f),rowHeight:b,selectedRanges:C})})})}};let nn=ni;nn.DEFAULT_ROW_HEIGHT=30;nn.defaultProps={className:"",draggingItemClassName:"",offset:0,items:[],rowHeight:ni.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!0,isDropDisabled:!1,isDragDisabled:!1,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,style:null,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},renderItem:ni.renderItem,selectedRanges:[],draggablePrefix:"draggable-item",droppableId:"droppable-item-list","data-testid":void 0};class Gt{static reorder(e,n,s,i){const o=e===s?Gt.adjustDestinationIndex(i,n):i,r=Gt.removeItems(e,n);return s.splice(o,0,...r),r}static removeItems(e,n){const s=[],i=n.map((o,r)=>({range:o,index:r})).sort((o,r)=>r.range[0]-o.range[0]);for(let o=0;o<i.length;o+=1){const{range:r,index:l}=i[o],[a,d]=r;s[l]=e.splice(a,d-a+1)}return Wp(s)}static adjustDestinationIndex(e,n){let s=e;for(let i=0;i<n.length;i+=1){const[o,r]=n[i];if(o>e)break;s-=Math.min(r,e-1)-o+1}return s}static startDragging(){document.documentElement.classList.add("drag-pointer-events-none")}static stopDragging(){document.documentElement.classList.remove("drag-pointer-events-none")}}const Nr=class extends S.exports.Component{static isParentSelected(t,e){const n=e.get(t);if(n===void 0)return!1;if(typeof n=="boolean")return n;const s=Array.from(n.values()).includes(!0),i=Array.from(n.values()).includes(!1);return s&&i?null:s}constructor(t){super(t),this.toggleMenu=this.toggleMenu.bind(this),this.toggleValueFor=this.toggleValueFor.bind(this),this.selectAll=this.selectAll.bind(this),this.clear=this.clear.bind(this),this.state={menuIsOpen:!1}}toggleMenu(t){t.stopPropagation(),t.preventDefault(),this.setState(e=>{const{menuIsOpen:n}=e;return{menuIsOpen:!n}})}toggleValueFor(t,e){const{valueMap:n,onUpdateValueMap:s}=this.props,i=new Map(n),o=i.get(t);if(o instanceof Map){const l=new Map(o);if(e!=null)l.set(e,o.get(e)===void 0);else{const a=Nr.isParentSelected(t,i),d=a==null||!a;o.forEach((c,u)=>l.set(u,d))}i.set(t,l)}else i.set(t,o==null||!o);const r=i.get(t);if(e===void 0&&r!==void 0&&typeof r!="boolean"){const l=Nr.isParentSelected(t,n);l!=null&&l?r.forEach((a,d)=>r.set(d,!1)):r.forEach((a,d)=>r.set(d,!0))}s(i)}setAllValues(t){const{valueMap:e,onUpdateValueMap:n}=this.props,s=new Map;e.forEach((i,o)=>{if(typeof i=="boolean")s.set(o,t);else{const r=new Map;i.forEach((l,a)=>r.set(a,t)),s.set(o,r)}}),n(s)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){const{valueMap:t,"data-testid":e}=this.props;return w("div",{className:"hcm-menu-container",children:[Array.from(t.entries()).map(([n,s])=>w("div",{children:[h(Pt,{className:"hcm-parent",checked:Nr.isParentSelected(n,t),onChange:()=>this.toggleValueFor(n),children:n}),s!==void 0&&typeof s!="boolean"&&Array.from(s.entries()).map(([i,o])=>h(Pt,{className:"hcm-child",checked:o,onChange:()=>this.toggleValueFor(n,i),children:i},i))]},n)),h("button",{type:"button",className:"btn btn-link",onClick:this.selectAll,"data-testid":e!==void 0?`${e}-btn-select-all`:void 0,children:"Select All"}),h("button",{type:"button",className:"btn btn-link",onClick:this.clear,"data-testid":e!==void 0?`${e}-btn-clear`:void 0,children:"Clear"})]})}render(){const{menuText:t,className:e,icon:n,id:s,"data-testid":i}=this.props,{menuIsOpen:o}=this.state;return w("button",{type:"button",className:W("btn hcm-btn",e),onClick:this.toggleMenu,id:s,"data-testid":i,children:[w("span",{children:[n&&h(G,{icon:n,className:"hcm-icon mr-1"}),t]}),h(G,{icon:ad,className:"hcm-icon ml-1"}),h(Fn,{options:{placement:"bottom"},isShown:o,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}};let vC=Nr;vC.defaultProps={className:"",icon:null,id:"","data-testid":void 0};const ml=({isLoaded:t=!1,isLoading:e=!0,errorMessage:n=null,"data-testid":s})=>h(ht,{in:Boolean(n)||!t||e,timeout:Tt.transitionMs,classNames:t?"fade":"",mountOnEnter:!0,unmountOnExit:!0,children:h("div",{className:"fill-parent-absolute","data-testid":s,children:h("div",{className:W("iris-panel-message-overlay","fill-parent-absolute",{"iris-panel-scrim-background":t}),children:w("div",{className:"message-content",children:[w("div",{className:"message-icon",children:[e&&h(_n,{}),!e&&n&&h(G,{icon:cs})]}),h("div",{className:"message-text",children:n})]})})})});const Ru=({on:t,id:e,className:n,isInvalid:s,disabled:i=!1,onClick:o,"data-testid":r})=>h("button",{type:"button",className:W("btn","btn-switch",n,{active:t},{"is-invalid":s}),id:e,onClick:o,disabled:i,"data-testid":r,children:h("div",{className:"handle"})});function Nc(t){return t.isOn!==void 0}const TC=({item:t,onSelect:e=()=>{},"data-testid":n})=>{const{icon:s,subtitle:i,title:o}=t,r=S.exports.useMemo(()=>Nc(t)?()=>{t.onChange(!t.isOn)}:e,[t,e]);return w("div",{className:"btn btn-navigation-menu-item","data-testid":`menu-item-${o}`,onClick:r,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&r()},tabIndex:0,role:"menuitem",children:[s!==void 0&&h("div",{className:"icon",children:h(G,{icon:s})}),h("div",{className:"title",children:o}),i!==void 0&&h("div",{className:"shortcut",children:i}),h("div",{className:"accessory","data-testid":n,children:Nc(t)&&h(Ru,{on:t.isOn,onClick:l=>{l.stopPropagation(),r()}})||h(G,{icon:Jh})})]})};const Du=({items:t,onSelect:e=()=>{},"data-testid":n})=>h("div",{className:"navigation-menu-view","data-testid":n,children:h("ul",{className:"navigation-menu-list",children:t.map((s,i)=>h("li",{children:h(TC,{item:s,onSelect:()=>{e(i)}})},s.title))})});const Fc=({children:t,onBack:e,onClose:n,title:s,"data-testid":i})=>w("div",{className:"navigation-page","data-testid":i,children:[w("div",{className:"navigation-title-bar",children:[h("div",{className:"navigation-left-buttons",children:e!==void 0&&w("button",{className:"btn btn-link btn-back","data-testid":"btn-page-back",type:"button",onClick:e,children:[h(G,{icon:ef}),"Back"]})}),h("div",{className:"navigation-title",children:s}),h("div",{className:"navigation-right-buttons",children:n!==void 0&&h("button",{className:"btn btn-link btn-link-icon btn-close px-2 m-1","data-testid":"btn-page-close",type:"button",onClick:n,children:h(G,{icon:Ho})})})]}),h("div",{className:"navigation-content",children:t})]});const EC=({children:t,"data-testid":e})=>{const n=S.exports.useMemo(()=>Y.Children.toArray(t),[t]),s=hl(n),[i,o]=S.exports.useState(n[n.length-1]),[r,l]=S.exports.useState(null),[a,d]=S.exports.useState(null);S.exports.useEffect(function(){if(s===void 0||n===s)return;const p=n[n.length-1];n.length===s.length||s.length===0||r!==null||a!==null?r!==null&&p!==r?l(p):p!==a&&p!==i&&o(p):n.length>s.length?l(p):n.length<s.length&&(o(p),d(s[s.length-1]))},[n,s,r,a,i]);const c=S.exports.useCallback(()=>{o(r),l(null)},[r]),u=S.exports.useCallback(()=>{d(null)},[]);return w("div",{className:"navigation-stack",children:[h("div",{className:"main-view","data-testid":e,children:i}),h(ht,{in:a!=null,timeout:Tt.transitionMidMs,classNames:"slide-right",onEntered:u,children:h(he,{children:a!=null&&h("div",{className:"popping-view",children:a})})}),h(ht,{in:r!=null,timeout:Tt.transitionMidMs,classNames:"slide-left",onEntered:c,children:h(he,{children:r!=null&&h("div",{className:"pushing-view",children:r})})})]})},yC=({children:t,disabled:e,value:n,"data-testid":s})=>h("option",{value:n,disabled:e,"data-testid":s,children:t}),pl=t=>{const{children:e,disabled:n=!1,name:s,onChange:i,value:o="","data-testid":r}=t,[l]=S.exports.useState(s!=null?s:ze());return h(he,{children:Y.Children.map(e,a=>{var d,c;return a?Y.cloneElement(a,{name:l,onChange:(d=a.props.onChange)!=null?d:i,checked:o===a.props.value,disabled:(c=a.props.disabled)!=null?c:n,"data-testid":r}):null})})},Mn=Y.forwardRef((t,e)=>{const{checked:n,children:s,className:i="",disabled:o=!1,inputClassName:r="",isInvalid:l=!1,labelClassName:a="",name:d,onChange:c,value:u,"data-testid":m}=t,[p]=S.exports.useState(ze());return w("div",{className:W("custom-control custom-radio",i),children:[h("input",{type:"radio",id:p,"data-testid":m,name:d,ref:e,className:W("custom-control-input",r,{"is-invalid":l}),checked:n,disabled:o,value:u,onChange:c}),h("label",{className:W("custom-control-label",a),htmlFor:p,children:s})]})});Mn.displayName="RadioItem";Mn.defaultProps={checked:void 0,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const IC=({children:t,onBlur:e,onChange:n,className:s,defaultValue:i,name:o,value:r,disabled:l,"data-testid":a})=>{const d=S.exports.useCallback(c=>{n(c.target.value)},[n]);return h("select",{className:W("custom-select",s),onBlur:e,onChange:d,defaultValue:i,value:r,name:o,disabled:l,"data-testid":a,children:t})};class Mu extends S.exports.PureComponent{constructor(e){super(e),this.getCachedItem=Ee((n,s,i,o,r,l,a)=>{const d={height:r},c=o!=null?o:i;return h("li",{className:"value-list-item",style:d,tabIndex:-1,children:h(Pt,{checked:l,disabled:a,onChange:()=>this.handleSelect(n),children:c})},s)},{max:1e3}),this.getCachedItems=Ee((n,s,i,o)=>{const r=[];for(let l=0;l<n.length;l+=1){const a=n[l],{value:d,displayValue:c,isSelected:u}=a,m=i+l,p=m,g=this.getCachedItem(m,p,d,c,s,u,o);r.push(g)}return r},{max:1}),this.handleBlur=this.handleBlur.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleSelect=this.handleSelect.bind(this),this.list=Y.createRef(),this.topRow=null,this.bottomRow=null}componentDidMount(){this.sendViewportUpdate()}componentDidUpdate(){this.sendViewportUpdate()}handleBlur(e){if(!e.relatedTarget||this.list.current&&e.relatedTarget instanceof HTMLElement&&!this.list.current.contains(e.relatedTarget)){const{onBlur:n}=this.props;n==null||n(e)}}handleScroll(){this.sendViewportUpdate()}handleSelect(e){const{items:n,offset:s,onSelect:i}=this.props,o=e-s;if(o>=0&&o<n.length){const r=n[o],{value:l}=r;i(e,l)}else i(e,null)}sendViewportUpdate(){if(!this.list.current||this.list.current.clientHeight===0)return;const{onViewportChange:e,rowHeight:n}=this.props,s=this.list.current.scrollTop,i=s+this.list.current.clientHeight,o=Math.floor(s/n),r=Math.ceil(i/n);(this.topRow!==o||this.bottomRow!==r)&&(this.topRow=o,this.bottomRow=r,e(o,r))}getElement(e){return this.list.current==null?null:this.list.current.querySelectorAll(".value-list-item")[e]}scrollIntoView(e){const n=this.getElement(e);n==null||n.scrollIntoView({block:"center"})}render(){const{className:e,disabled:n,isInvalid:s,items:i,itemCount:o,offset:r,rowHeight:l,"data-testid":a}=this.props,d=this.getCachedItems(i,l,r,n);return h("div",{className:W("select-value-list-scroll-pane h-100 w-100",{"is-invalid":s},e),onBlur:this.handleBlur,onScroll:this.handleScroll,ref:this.list,"data-testid":a,children:h("div",{className:"select-value-list",style:{height:o*l},children:h("ol",{className:"select-value-list-content",style:{position:"absolute",height:i.length*l,top:r*l,left:0},children:d})})})}}Mu.defaultProps={disabled:!1,rowHeight:21,onBlur:()=>{},"data-testid":void 0};const xc=X.module("Shortcut");var ue=(t=>(t.CTRL="MODIFIER_CTRL",t.CMD="MODIFIER_CMD",t.ALT="MODIFIER_ALT",t.OPTION="MODIFIER_OPTION",t.SHIFT="MODIFIER_SHIFT",t))(ue||{}),pe=(t=>(t.A="A",t.B="B",t.C="C",t.D="D",t.E="E",t.F="F",t.G="G",t.H="H",t.I="I",t.J="J",t.K="K",t.L="L",t.M="M",t.N="N",t.O="O",t.P="P",t.Q="Q",t.R="R",t.S="S",t.T="T",t.U="U",t.V="V",t.W="W",t.X="X",t.Y="Y",t.Z="Z",t.ZERO="0",t.ONE="1",t.TWO="2",t.THREE="3",t.FOUR="4",t.FIVE="5",t.SIX="6",t.SEVEN="7",t.EIGHT="8",t.NINE="9",t.BACKSPACE="Backspace",t.ESCAPE="Escape",t.ENTER="Enter",t.DELETE="Delete",t.SLASH="/",t.QUESTION_MARK="?",t.BACKSLASH="\\",t.PIPE="|",t.MINUS="-",t.UNDERSCORE="_",t.EQUALS="=",t.PLUS="+",t.BACKTICK="`",t.TILDE="~",t.COMMA=",",t.LEFT_CHEVRON="<",t.PERIOD=".",t.RIGHT_CHEVRON=">",t.SEMICOLON=";",t.COLON=":",t.SINGLE_QUOTE="'",t.DOUBLE_QUOTE='"',t.LEFT_BRACKET="[",t.RIGHT_BRACKET="]",t.LEFT_CURLY="{",t.RIGHT_CURLY="}",t.F1="F1",t.F2="F2",t.F3="F3",t.F4="F4",t.F5="F5",t.F6="F6",t.F7="F7",t.F8="F8",t.F9="F9",t.F10="F10",t.F11="F11",t.F12="F12",t))(pe||{});const RC=new Set(["Enter","Delete","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]),mt=class extends il{constructor({id:t,shortcut:e,macShortcut:n,isEditable:s=!0,name:i,tooltip:o}){super(),this.id=t,this.name=i,this.tooltip=o,this.isEditable=s;const l=mt.isMacPlatform?n:e;this.defaultKeyState=mt.createKeyState(l),this.keyState=this.defaultKeyState}static isAllowedKey(t){return Object.values(pe).includes(t)}static isValidKeyState(t){const{keyValue:e}=t;return e===null?!0:!mt.isMacPlatform&&t.metaKey||!mt.isAllowedKey(e)?!1:!(!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey)||RC.has(e)}static createKeyState(t){const e={altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,keyValue:t[t.length-1]};return t.forEach(n=>{switch(n){case"MODIFIER_CTRL":e.ctrlKey=!0;break;case"MODIFIER_ALT":case"MODIFIER_OPTION":e.altKey=!0;break;case"MODIFIER_CMD":e.metaKey=!0;break;case"MODIFIER_SHIFT":e.shiftKey=!0;break}}),e}static getKeyStateFromEvent(t){const{key:e,keyCode:n}=t;let s="";return e==="Shift"||e==="Meta"||e==="Control"||e==="Alt"?s="":!mt.isAllowedKey(e)&&mt.isAllowedKey(String.fromCharCode(n))?s=String.fromCharCode(n):s=e,{keyValue:s,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}}static getWindowsDisplayText(t){let e="";return t.ctrlKey&&(e+="Ctrl+"),t.altKey&&(e+="Alt+"),t.shiftKey&&(e+="Shift+"),t.keyValue==="Escape"?e+="Esc":t.keyValue!==null&&(e+=t.keyValue),e}static getMacDisplayText(t){let e="";switch(t.ctrlKey&&(e+="\u2303"),t.altKey&&(e+="\u2325"),t.shiftKey&&(e+="\u21E7"),t.metaKey&&(e+="\u2318"),t.keyValue){case"Enter":e+="\u23CE";break;case"Escape":e+="\u238B";break;case"Backspace":e+="\u232B";break;case"Delete":e+="\u2326";break;case null:break;default:e+=t.keyValue}return e}static doKeyStatesMatch(t,e){var n,s;return((n=t.keyValue)==null?void 0:n.toUpperCase())===((s=e.keyValue)==null?void 0:s.toUpperCase())&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey&&t.shiftKey===e.shiftKey}static getDisplayText(t){return t.keyValue===null?"":mt.isMacPlatform?mt.getMacDisplayText(t):mt.getWindowsDisplayText(t)}getDisplayText(){return mt.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(t){mt.isValidKeyState(t)?(xc.debug2(`Shortcut ${this.id} updated to ${JSON.stringify(t)}`),this.keyState=t,this.dispatchEvent(new Ge("onUpdate",{detail:this}))):xc.debug2(`Shortcut ${this.id} tried to update to invalid keyState ${JSON.stringify(t)}`)}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return mt.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(mt.NULL_KEY_STATE)}isNull(){return mt.doKeyStatesMatch(this.keyState,mt.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(t){return mt.doKeyStatesMatch(t,this.keyState)}matchesEvent(t){return this.matchesKeyState(mt.getKeyStateFromEvent(t))}};let Wt=mt;Wt.NULL_KEY_STATE={metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null};Wt.isMacPlatform=Ne.isMacPlatform();const _c=X.module("ShortcutRegistry");class DC extends il{constructor(){super(...arguments),this.shortcutMap=new Map,this.shortcutsByCategory=new Map}createAndAdd(e){const n=new Wt(e);return this.add(n)}add(e){var i;const n=this.shortcutMap.get(e.id);if(n)return _c.warn(`Skipping attempt to add duplicate shortcut ID to registry: ${e.id}`),n;_c.debug2(`Adding shortcut to registry: ${e.id}`),e.addEventListener("onUpdate",({detail:o})=>this.dispatchEvent(new Ge("onUpdate",{detail:o})));const s=e.id.split(".")[0];return this.shortcutMap.set(e.id,e),this.shortcutsByCategory.has(s)?(i=this.shortcutsByCategory.get(s))==null||i.push(e):this.shortcutsByCategory.set(s,[e]),e}get(e){return this.shortcutMap.get(e)}getConflictingShortcuts(e){return Array.from(this.shortcutMap.values()).filter(n=>!n.isNull()&&n.matchesKeyState(e))}}const Be=Object.freeze(new DC),Ls={COPY:Be.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[ue.CTRL,pe.C],macShortcut:[ue.CMD,pe.C],isEditable:!1}),PASTE:Be.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[ue.CTRL,pe.V],macShortcut:[ue.CMD,pe.V],isEditable:!1}),SAVE:Be.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[ue.CTRL,pe.S],macShortcut:[ue.CMD,pe.S],isEditable:!1}),SELECT_ALL:Be.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[ue.CTRL,pe.A],macShortcut:[ue.CMD,pe.A],isEditable:!1}),LINKER:Be.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[ue.CTRL,pe.L],macShortcut:[ue.CMD,pe.L]}),LINKER_CLOSE:Be.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[pe.ESCAPE],macShortcut:[pe.ESCAPE],isEditable:!1})};const gl=Y.forwardRef((t,e)=>{const{children:n,className:s,disabled:i,isLinked:o,isLinkedSource:r,isInvalid:l,onClick:a,onMouseEnter:d,onMouseLeave:c,style:u,"data-testid":m}=t;return w("button",{ref:e,type:"button",className:W("btn-socketed",{"btn-socketed-linked":o!==void 0&&o||r},{"btn-socketed-linked-source":r},{"is-invalid":l},s),onClick:a,onMouseEnter:d,onMouseLeave:c,style:u,disabled:i,"data-testid":m,children:[n,h(G,{icon:td,className:"linked btn-socketed-icon",transform:"down-1"}),h(G,{icon:Ff,className:"is-invalid btn-socketed-icon"})]})});gl.displayName="SocketedButton";gl.defaultProps={children:void 0,className:"",disabled:!1,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const MC="_track_xvu02_28",NC="_handle_xvu02_11",FC="_ticks_xvu02_96",Nu={"handle-size":"15px","popover-width":"90px","time-slider":"_time-slider_xvu02_1","time-slider-popovers":"_time-slider-popovers_xvu02_6","handle-popper":"_handle-popper_xvu02_11","flex-spacer":"_flex-spacer_xvu02_24",track:MC,"track-fills":"_track-fills_xvu02_35","track-fill":"_track-fill_xvu02_35","track-fill-start":"_track-fill-start_xvu02_53","track-fill-middle":"_track-fill-middle_xvu02_54","track-fill-end":"_track-fill-end_xvu02_57","handle-track":"_handle-track_xvu02_60",handle:NC,ticks:FC,"tick-labels":"_tick-labels_xvu02_114","tick-label":"_tick-label_xvu02_114","tick-label-wrapper":"_tick-label-wrapper_xvu02_130"};parseInt(Nu["handle-size"],10);parseInt(Nu["popover-width"],10);Object.freeze({ERROR:"error"});const{dh:M}=globalThis,fl=R.exports.shape({name:R.exports.string.isRequired,type:R.exports.string.isRequired,description:R.exports.string,constituentType:R.exports.string}),Fu=R.exports.shape({not:R.exports.func.isRequired,and:R.exports.func.isRequired,or:R.exports.func.isRequired}),xC=R.exports.shape({asc:R.exports.func.isRequired,desc:R.exports.func.isRequired,abs:R.exports.func.isRequired,column:fl.isRequired,direction:R.exports.string.isRequired,isAbs:R.exports.bool.isRequired}),_C=R.exports.shape({columns:R.exports.arrayOf(fl).isRequired,customColumns:R.exports.arrayOf(R.exports.string).isRequired,filter:R.exports.arrayOf(Fu),addEventListener:R.exports.func.isRequired,removeEventListener:R.exports.func.isRequired,size:R.exports.number.isRequired,sort:R.exports.arrayOf(R.exports.any),copy:R.exports.func.isRequired,applyFilter:R.exports.func.isRequired,applySort:R.exports.func.isRequired,applyCustomColumns:R.exports.func.isRequired,description:R.exports.string}),LC=R.exports.shape({columns:R.exports.arrayOf(fl),filter:R.exports.arrayOf(R.exports.any),isExpanded:R.exports.func.isRequired,saveExpandedState:R.exports.func.isRequired,addEventListener:R.exports.func.isRequired,removeEventListener:R.exports.func.isRequired,size:R.exports.number.isRequired,sort:R.exports.arrayOf(R.exports.any),applyFilter:R.exports.func.isRequired,applySort:R.exports.func.isRequired}),Fr=R.exports.shape({name:R.exports.string.isRequired,type:R.exports.string.isRequired}),kC=R.exports.shape({created:R.exports.arrayOf(Fr).isRequired,updated:R.exports.arrayOf(Fr).isRequired,removed:R.exports.arrayOf(Fr).isRequired}),OC=R.exports.shape({groupingColumns:R.exports.arrayOf(R.exports.string),aggregations:R.exports.shape({}),includeConstituents:R.exports.bool,includeOriginalColumns:R.exports.bool,includeDescriptions:R.exports.bool}),AC=R.exports.shape({addEventListener:R.exports.func.isRequired,removeEventListener:R.exports.func.isRequired,onLogMessage:R.exports.func,getTable:R.exports.func.isRequired,runCode:R.exports.func.isRequired});Object.freeze({Column:fl,FilterCondition:Fu,IdeSession:AC,RollupConfig:OC,Sort:xC,Table:_C,TreeTable:LC,VariableChanges:kC,VariableDefinition:Fr});const xu=({type:t})=>{switch(t){case M.VariableType.TABLE:case M.VariableType.TABLEMAP:case M.VariableType.TREETABLE:return h(G,{icon:dd});case M.VariableType.FIGURE:return h(G,{icon:eu});case M.VariableType.PANDAS:return h(G,{icon:Uf});default:return h(G,{icon:va})}};class Cl extends S.exports.Component{constructor(e){super(e),this.container=null}componentDidMount(){this.colorize()}colorize(){const{children:e}=this.props;this.container&&e!=null&&ds.colorizeElement(this.container,{theme:"dh-dark"})}render(){const{children:e,language:n}=this.props;return h("div",{children:h("div",{"data-lang":n,ref:s=>{this.container=s},style:{pointerEvents:"none"},children:e})})}}class _u{static get LANGUAGE_MAP(){return new Map([["python","Python"],["groovy","Groovy"],["scala","Scala"]])}}class Ui{static hasComment(e){return e.comment!==void 0}static hasPattern(e){return e.pattern!==void 0}static hasOp(e){return e.op!==void 0}static parseArguments(e){return e==null||!(typeof e=="string"||e instanceof String)?[]:zp.parse(e).filter(n=>!this.hasComment(n)).map(n=>this.hasPattern(n)?n.pattern:this.hasOp(n)?n.op:`${n}`)}static formatTimestamp(e){if(e==null||!(e instanceof Date))return null;const n=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0"),i=`${e.getSeconds()}`.padStart(2,"0"),o=`${e.getMilliseconds()}`.padStart(3,"0");return`${n}:${s}:${i}.${o}`}static isTableType(e){return e===M.VariableType.TABLE||e===M.VariableType.TREETABLE}static isWidgetType(e){return e===M.VariableType.FIGURE||e===M.VariableType.OTHERWIDGET||e===M.VariableType.PANDAS}static isOpenableType(e){return Ui.isTableType(e)||Ui.isWidgetType(e)}static isFigureType(e){return e===M.VariableType.FIGURE}static isPandas(e){return e===M.VariableType.PANDAS}}const Lu=({children:t})=>w("div",{className:"console-history-item-result",children:[h("div",{className:"console-history-gutter",children:"-"}),h("div",{className:"console-history-content",children:t})]});Lu.propTypes={children:R.exports.node.isRequired};class ku extends S.exports.Component{constructor(e){super(e),this.updateElapsed=this.updateElapsed.bind(this),this.startTime=Date.now(),this.state={elapsed:0}}componentDidMount(){this.timer=setInterval(this.updateElapsed,1e3)}componentWillUnmount(){this.timer&&clearInterval(this.timer),this.timer=void 0}updateElapsed(){this.setState({elapsed:Math.round((Date.now()-this.startTime)/1e3)})}render(){const{disabled:e,onCancelClick:n}=this.props,{elapsed:s}=this.state;return h("div",{className:W("console-history-result-in-progress",{disabled:e}),children:w("span",{className:"badge",children:[h(_n,{}),"\xA0Running... ",In.formatElapsedTime(s),"\xA0",w("button",{type:"button",onClick:n,disabled:e,children:[h(G,{icon:Ho}),h(ge,{children:"Cancel"})]})]})})}}ku.defaultProps={disabled:!1};const ya=class extends S.exports.PureComponent{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleToggleError=this.handleToggleError.bind(this),this.handleMouseEnter=this.handleMouseEnter.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.mouseX=null,this.mouseY=null,this.isClicking=!1,this.state={isExpanded:!1,isTriggerHovered:!1}}handleKeyPress(t){switch(t.key){case"Enter":case" ":this.handleToggleError(),t.stopPropagation(),t.preventDefault();break}}handleMouseDown(t){this.mouseX=t.clientX,this.mouseY=t.clientY,this.isClicking=!0}handleMouseMove(t){this.mouseX!=null&&this.mouseY!=null?(Math.abs(t.clientX-this.mouseX)>=ya.mouseDragThreshold||Math.abs(t.clientY-this.mouseY)>=ya.mouseDragThreshold)&&(this.isClicking=!1):this.isClicking&&(this.isClicking=!1)}handleMouseUp(t){this.isClicking&&!t.shiftKey&&!t.metaKey&&!t.altKey&&this.handleToggleError(),this.mouseX=null,this.mouseY=null,this.isClicking=!1}handleToggleError(){this.setState(t=>({isExpanded:!t.isExpanded}))}handleMouseEnter(){this.setState({isTriggerHovered:!0})}handleMouseLeave(){this.setState({isTriggerHovered:!1})}render(){const{isExpanded:t,isTriggerHovered:e}=this.state,{message:n}=this.props;A(n);const s=n.indexOf(`
|
|
5
|
+
`)}}const Wg=X.module("Tooltip"),en=class extends S.exports.Component{constructor(t){super(t),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowMouseMove=this.handleWindowMouseMove.bind(this),this.handleWheel=this.handleWheel.bind(this),this.handleTimeout=this.handleTimeout.bind(this),this.handleExited=this.handleExited.bind(this),this.stopShowingTooltip=this.stopShowingTooltip.bind(this),this.container=Y.createRef(),this.popper=Y.createRef(),this.parent=null,this.timer=null,this.state={isShown:!1}}static handleHidden(){en.shownTooltipCount-=1,en.shownTooltipCount===0&&(en.lastHiddenTime=Date.now())}static handleShown(){en.shownTooltipCount+=1}componentDidMount(){this.startListening();const{timeout:t}=this.props;t===0&&this.show()}componentDidUpdate(t,e){const{isShown:n}=e,{isShown:s}=this.state;s!==n&&(s?en.handleShown():en.handleHidden())}componentWillUnmount(){this.stopListening(),this.stopListeningWindow(),this.stopTimer();const{isShown:t}=this.state;t&&en.handleHidden()}startListening(){if(!this.container.current||!this.container.current.parentElement){Wg.error("Tooltip doesn't have a container or a parent set!");return}this.parent=this.container.current.parentElement,this.parent.addEventListener("mousemove",this.handleMouseMove),this.parent.addEventListener("mouseleave",this.handleMouseLeave),this.parent.addEventListener("mousedown",this.stopShowingTooltip)}stopListening(){!this.parent||(this.parent.removeEventListener("mousemove",this.handleMouseMove),this.parent.removeEventListener("mouseleave",this.handleMouseLeave),this.parent.removeEventListener("mousedown",this.stopShowingTooltip))}startListeningWindow(){window.addEventListener("mousemove",this.handleWindowMouseMove,!0),window.addEventListener("contextmenu",this.stopShowingTooltip,!0),window.addEventListener("wheel",this.handleWheel)}stopListeningWindow(){window.removeEventListener("mousemove",this.handleWindowMouseMove,!0),window.removeEventListener("contextmenu",this.stopShowingTooltip,!0),window.removeEventListener("wheel",this.handleWheel)}handleMouseMove(){this.startTimer()}handleWheel(){const{isShown:t}=this.state;this.popper.current&&this.parent&&t&&!this.popper.current.element.matches(":hover")&&!this.parent.matches(":hover")&&(this.stopTimer(),this.hide())}handleMouseLeave(){const{isShown:t}=this.state;this.stopTimer();const{interactive:e}=this.props;!e&&t&&this.hide()}handleTimeout(){this.show()}handleWindowMouseMove(t){const e=t.clientX,n=t.clientY,{isShown:s}=this.state;if(!this.popper.current||!this.parent)return;const i=this.popper.current.element.getBoundingClientRect(),o=this.parent.getBoundingClientRect();e>=i.left&&e<=i.left+i.width&&n>=i.top&&n<=i.top+i.height?this.handleMouseMove():e>=o.left&&e<=o.left+o.width&&n>=o.top&&n<=o.top+o.height?this.handleMouseMove():s&&(this.stopTimer(),this.hide())}startTimer(){this.stopTimer();const{timeout:t,reshowTimeout:e}=this.props;let n=t;(en.shownTooltipCount>0||Date.now()-en.lastHiddenTime<en.triggerReshowThreshold)&&(n=e),this.timer=window.setTimeout(this.handleTimeout,n)}stopTimer(){this.timer!=null&&(clearTimeout(this.timer),this.timer=null)}show(){var e;const{isShown:t}=this.state;if(this.stopTimer(),!t){(e=this.popper.current)==null||e.show(),this.setState({isShown:!0});const{interactive:n}=this.props;n&&this.startListeningWindow()}}hide(){var t;(t=this.popper.current)==null||t.hide(),this.stopListeningWindow()}update(){var t;(t=this.popper.current)==null||t.scheduleUpdate()}handleExited(){this.setState({isShown:!1});const{onExited:t}=this.props;t()}stopShowingTooltip(){const{isShown:t}=this.state;this.stopTimer(),t&&this.hide()}render(){const{interactive:t,children:e,options:n,referenceObject:s,popperClassName:i,"data-testid":o,onEntered:r}=this.props,{isShown:l}=this.state;return h("div",{ref:this.container,style:{display:"none"},"data-testid":o,children:h(Fn,{className:W(i),options:n,ref:this.popper,onEntered:r,onExited:this.handleExited,interactive:t,referenceObject:s,children:w("div",{className:"tooltip-content",children:[" ",l&&e]})})})}};let ge=en;ge.defaultTimeout=500;ge.defaultReshowTimeout=100;ge.triggerReshowThreshold=300;ge.shownTooltipCount=0;ge.lastHiddenTime=Date.now();ge.defaultProps={interactive:!1,options:{},popperClassName:"",reshowTimeout:en.defaultReshowTimeout,timeout:en.defaultTimeout,onEntered:()=>{},onExited:()=>{},"data-testid":void 0};const zg=100;var Zh=(t=>(t.UP="UP",t.DOWN="DOWN",t))(Zh||{});const qs=class extends S.exports.Component{constructor(t){super(t),this.getCachedFilteredOptions=Ee((n,s)=>n.filter(i=>i.title.toLowerCase().indexOf(s.toLowerCase())>=0));let{popperOptions:e}=this.props;e={placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}},...e},this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:e},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=Xe(this.updateInputValue,zg),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=Y.createRef(),this.cbContainer=Y.createRef(),this.menuContainer=Y.createRef(),this.input=Y.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(t){if(!t)return this.setState({invalid:!1}),{value:t,isValid:!1};const{options:e}=this.props,n=e.filter(s=>s.title.toLowerCase()===t.toLowerCase());return n.length<1?(this.setState({invalid:!0}),{value:t,isValid:!1}):(this.setState({invalid:!1}),{value:n[0].value,isValid:!0})}updateInputValue(t){const{menuIsOpen:e}=this.state,{value:n,isValid:s}=this.getValueAndValidate(t);e&&this.processFilterChange(t),this.fireOnChange(n,s)}fireOnChange(t,e=!0){const{onChange:n}=this.props;n(t,e)}processFilterChange(t){var o;const{options:e}=this.props,{menuIsOpen:n}=this.state,s=t?this.getCachedFilteredOptions(e,t):e,i=s.length===1&&s[0].title===t;if(this.setState({filteredOptions:s,keyboardOptionIndex:0}),i&&n){this.closeMenu();return}(o=this.popper.current)==null||o.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var i;const{filteredOptions:e,keyboardOptionIndex:n}=this.state,s=e[n];switch(t.key){case"Enter":case"ArrowRight":t.stopPropagation(),t.preventDefault(),s!=null&&(this.setState({title:s.title,invalid:!1}),this.fireOnChange(s.value)),this.closeMenu(),(i=this.input.current)==null||i.focus();break;case"ArrowUp":t.stopPropagation(),t.preventDefault(),this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":t.stopPropagation(),t.preventDefault(),this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(t.stopPropagation(),t.preventDefault(),t.shiftKey){this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(qs.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":t.preventDefault(),t.stopPropagation(),this.closeMenu();break}}navigateMenu(t){const{filteredOptions:e,keyboardOptionIndex:n}=this.state;let s=n;t===qs.MENU_NAVIGATION_DIRECTION.UP?n>0?(s=(s-1)%e.length,this.setState({keyboardOptionIndex:s})):n===0&&(s=e.length-1,this.setState({keyboardOptionIndex:s})):t===qs.MENU_NAVIGATION_DIRECTION.DOWN&&n<e.length&&(s=(s+1)%e.length,this.setState({keyboardOptionIndex:s})),this.scrollOptionIntoView(s)}handleInputKeyDown(t){const{onEnter:e}=this.props,{menuIsOpen:n}=this.state;n?this.handleMenuKeyDown(t):t.key==="Enter"?e():t.key==="Escape"?(this.resetValue(),t.preventDefault(),t.stopPropagation()):t.key==="ArrowRight"||t.key==="ArrowLeft"||t.key==="Tab"||t.key==="Shift"||this.openMenu()}handleInputChange(t){this.setState({title:t.target.value}),this.updateInputValue(t.target.value)}handleOptionClick(t){var e;this.setState({title:t.title,invalid:!1}),this.fireOnChange(t.value),this.closeMenu(),(e=this.input.current)==null||e.focus()}handelInputFocus(){const{menuIsOpen:t}=this.state;t||this.openMenu()}handleInputClick(){const{menuIsOpen:t}=this.state;t||this.openMenu()}handleInputBlur(t){const{menuIsOpen:e}=this.state;e&&t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(t){t.relatedTarget===this.input.current||t.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var t;(t=this.input.current)==null||t.focus()}handleMenuExited(){const{menuIsOpen:t}=this.state;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){const{title:t}=this.state;this.processFilterChange(t),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var e;(e=this.popper.current)==null||e.show()})}closeMenu(t=!0){var e,n;this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),t&&((e=this.input.current)==null||e.focus()),(n=this.popper.current)==null||n.hide()}scrollOptionIntoView(t){var e;this.menuContainer.current&&((e=this.menuContainer.current.children.item(t))==null||e.scrollIntoView({behavior:"smooth",block:"nearest"}))}renderMenuElement(){const{inputWidth:t}=this.state;return h("div",{className:W("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:t},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){const{noMatchText:t}=this.props,{title:e,filteredOptions:n}=this.state;return e&&n.length===0?h("div",{className:"no-match",children:t}):n.map((s,i)=>this.renderOption(s,i))}renderOption(t,e){const{keyboardOptionIndex:n}=this.state,s=`option-${e}-${t.value}`;return h("button",{type:"button",className:W("aci-option-btn",{"keyboard-active":n===e}),onClick:()=>this.handleOptionClick(t),onFocus:()=>this.setState({keyboardOptionIndex:e}),children:t.title},s)}render(){const{options:t,inputPlaceholder:e,disabled:n,className:s,defaultTitle:i,spellCheck:o,"data-testid":r}=this.props,{title:l,menuIsOpen:a,popperOptions:d,invalid:c}=this.state;return w("div",{className:"aci-container",ref:this.cbContainer,children:[h("input",{value:l||i,className:W("form-control",s,"aci-input",{"is-invalid":c&&!a}),ref:this.input,onChange:this.handleInputChange,placeholder:e||t[0].title,disabled:n,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":r}),h(Fn,{ref:this.popper,options:d,className:W("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}};let Qa=qs;Qa.propTypes={options:R.exports.arrayOf(R.exports.shape({title:R.exports.string.isRequired,value:R.exports.string.isRequired})).isRequired,popperOptions:R.exports.shape({}),onChange:R.exports.func,inputPlaceholder:R.exports.string,disabled:R.exports.bool,className:R.exports.string,defaultTitle:R.exports.string,spellCheck:R.exports.bool,onEnter:R.exports.func,noMatchText:R.exports.string,"data-testid":R.exports.string};Qa.defaultProps={onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0};Qa.MENU_NAVIGATION_DIRECTION=Zh;R.exports.string.isRequired,R.exports.func.isRequired,R.exports.string,R.exports.string,R.exports.bool,R.exports.bool,R.exports.string,R.exports.string,R.exports.string;const rl=t=>{const{children:e,className:n,style:s,"data-testid":i}=t;return h("div",{className:W("btn-group",n),style:s,role:"group","data-testid":i,children:e})};rl.displayName="ButtonGroup";rl.propTypes={children:R.exports.node.isRequired,className:R.exports.string,style:R.exports.object,"data-testid":R.exports.string};rl.defaultProps={className:null,style:{},"data-testid":void 0};const Gg=["primary","secondary","tertiary","success","danger","inline","ghost"],Kg=["group-end"];function qg(t,e){switch(t){case"primary":return"btn-primary";case"secondary":return"btn-outline-primary";case"tertiary":return"btn-secondary";case"success":return"btn-success";case"danger":return"btn-danger";case"inline":return"btn-inline";case"ghost":return W("btn-link",{"btn-link-icon":e,"btn-link-icon-only":e})}}function Yg(t){switch(t){case"group-end":return W("pl-2","pr-3")}}const oe=Y.forwardRef((t,e)=>{const{kind:n,variant:s,type:i,tooltip:o,icon:r,disabled:l,active:a,onClick:d,onMouseDown:c,onMouseUp:u,className:m,style:p,children:g,tabIndex:f,"data-testid":b,"aria-label":C}=t,v=Boolean(r&&g==null),T=qg(n,v);let E;s&&(E=Yg(s));let y;r&&(y=Y.isValidElement(r)?r:h(G,{icon:r}));let I;o!==void 0&&(I=typeof o=="string"?h(ge,{children:o}):o);let D=C;C===void 0&&v&&o!=null&&typeof o=="string"&&(D=o);const N=w("button",{"data-testid":b,ref:e,type:i,className:W("btn",T,E,{active:a},m),onClick:d,onMouseUp:u,onMouseDown:c,style:p,disabled:l,tabIndex:f,"aria-label":D,children:[r&&y,g,o!=null&&(l===void 0||!l)&&I]});return l!==void 0&&l?w("span",{className:"btn-disabled-wrapper",children:[N,o!==void 0&&I]}):N});oe.displayName="Button";oe.propTypes={kind:R.exports.oneOf(Gg).isRequired,variant:R.exports.oneOf(Kg),type:R.exports.oneOf(["submit","reset","button"]),tooltip(t){const{tooltip:e,icon:n,children:s}=t;return e===void 0&&n!=null&&s==null?new Error("Tooltip is required for icon only buttons"):null},icon(t){const{children:e,icon:n}=t;return n==null&&e==null?new Error("Icon is required if no children are provided"):e==null&&!Y.isValidElement(n)&&(n==null||n.iconName===""||n.iconName==null)?new Error("Icon must be react element or fontawesome IconDefinition"):null},disabled:R.exports.bool,active:R.exports.bool,onClick(t){const{onClick:e,type:n}=t;return n==="button"&&typeof e!="function"?new Error("type button requires an onClick function"):e!==void 0&&typeof e!="function"?new Error("onClick must be a function"):null},onMouseUp:R.exports.func,onMouseDown:R.exports.func,tabIndex:R.exports.number,children:R.exports.node,className:R.exports.string,style:R.exports.object,"data-testid":R.exports.string};oe.defaultProps={type:"button",onClick:void 0,onMouseUp:void 0,onMouseDown:void 0,variant:void 0,tooltip:void 0,icon:void 0,disabled:!1,active:void 0,tabIndex:void 0,children:void 0,className:void 0,style:{},"data-testid":void 0};const Oo=({className:t="theme-bg-light",children:e,role:n="role",keyboard:s=!0,isOpen:i=!1,centered:o=!1,size:r,onOpened:l,onClosed:a,toggle:d,"data-testid":c})=>{const u=S.exports.useRef(),m=S.exports.useCallback(g=>{switch(g.key){case"Escape":d==null||d();break}},[d]);S.exports.useEffect(function(){if(i&&s)return window.addEventListener("keydown",m),()=>window.removeEventListener("keydown",m)},[m,i,s]),S.exports.useEffect(function(){i&&l&&l()},[l,i]),S.exports.useEffect(function(){!i&&a&&a()},[a,i]),i&&!u.current&&(u.current=document.createElement("div"),u.current.setAttribute("style","padding-right: 15px; display: block"),u.current.setAttribute("role","presentation"),document.body.appendChild(u.current));const p=()=>{u.current&&(document.body.removeChild(u.current),u.current=void 0)};return u.current?hi.createPortal(w(he,{children:[h(ht,{appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:i,classNames:{appearActive:"show",appearDone:"show"},timeout:Tt.transitionMs,onExited:p,children:h("div",{className:W("modal-backdrop fade"),style:{zIndex:1050}})}),h(ht,{appear:!0,mountOnEnter:!0,unmountOnExit:!0,in:i,classNames:{appearDone:"show"},timeout:Tt.transitionMs,onExited:p,children:h("div",{className:"modal fade",onClick:d,role:"dialog",style:{display:"block"},children:h("div",{className:W(`modal-dialog ${t}`,{"modal-lg":r==="lg","modal-sm":r==="sm","modal-xl":r==="xl","modal-dialog-centered":o}),style:{zIndex:1040},children:h("div",{className:"modal-content",onClick:g=>g.stopPropagation(),role:"presentation","data-testid":c,children:e})})})})]}),u.current):h(he,{})},Ao=({className:t="modal-body",style:e,children:n,"data-testid":s})=>h("div",{className:t,"data-testid":s,style:e,children:n}),Po=({className:t,children:e,closeButton:n=!0,style:s,toggle:i,"data-testid":o})=>w("div",{className:`modal-header ${t}`,style:s,children:[h("h5",{className:"modal-title",children:e}),n&&h("button",{type:"button",className:"close","data-dismiss":"modal","aria-label":"Close",onClick:i,children:h("span",{"aria-hidden":"true",children:"\xD7"})})]}),Za=({className:t="modal-footer",children:e,"data-testid":n})=>h("div",{className:t,"data-testid":n,children:e}),Hi=t=>{const{isOpen:e,headerText:n,bodyText:s,onCancel:i,onConfirm:o,onDiscard:r,onModalDisable:l,cancelButtonText:a="Cancel",confirmButtonText:d="Okay",discardButtonText:c="Discard",children:u,"data-testid":m}=t,p=S.exports.useRef(null),g=S.exports.useRef(null),f=S.exports.useCallback(()=>{g.current!==null&&g.current.checked&&l&&l(),o()},[o,l]);let b="";return e&&(b=typeof s=="function"?s():s),w(Oo,{isOpen:e,className:"theme-bg-light",onOpened:()=>{var C;(C=p.current)==null||C.focus()},children:[h(Po,{closeButton:!1,children:n}),h(Ao,{children:b}),w(Za,{children:[l&&w("div",{className:"custom-control custom-checkbox form-group mr-auto",children:[h("input",{type:"checkbox",className:"custom-control-input",id:"move-confirmation-checkbox",defaultChecked:!1,ref:g,"data-testid":m!==void 0?`${m}-checkbox-confirm`:void 0}),h("label",{className:"custom-control-label",htmlFor:"move-confirmation-checkbox",children:"Don't ask me again"})]}),r&&h("button",{type:"button",className:"btn btn-outline-primary mr-auto","data-dismiss":"modal",onClick:r,"data-testid":m!==void 0?`${m}-btn-discard`:void 0,children:c}),i&&h("button",{type:"button",className:"btn btn-outline-primary","data-dismiss":"modal",onClick:i,"data-testid":m!==void 0?`${m}-btn-cancel`:void 0,children:a}),w(rl,{children:[h(oe,{kind:"primary",onClick:f,ref:p,"data-testid":m!==void 0?`${m}-btn-confirm`:void 0,children:d}),u]})]})]})};Hi.propTypes={isOpen:R.exports.bool.isRequired,headerText:R.exports.string.isRequired,bodyText:R.exports.oneOfType([R.exports.string,R.exports.func]).isRequired,onCancel:R.exports.func,onConfirm:R.exports.func.isRequired,onDiscard:R.exports.func,onModalDisable:R.exports.func,cancelButtonText:R.exports.string,confirmButtonText:R.exports.string,discardButtonText:R.exports.string,children:R.exports.node,"data-testid":R.exports.string};Hi.defaultProps={children:void 0,cancelButtonText:"Cancel",confirmButtonText:"Okay",discardButtonText:"Discard",onCancel:void 0,onDiscard:void 0,onModalDisable:void 0,"data-testid":void 0};const Vi=Y.forwardRef((t,e)=>{const{children:n,className:s,disabled:i,onClick:o,style:r,id:l}=t;return h("button",{ref:e,type:"button",className:W("btn",s),onClick:o,style:r,disabled:i,id:l,children:n})});Vi.displayName="Button";Vi.propTypes={children:R.exports.node,className:R.exports.string,disabled:R.exports.bool,onClick:R.exports.func,style:R.exports.shape({}),id:R.exports.string};Vi.defaultProps={children:null,className:"",disabled:!1,onClick:()=>null,style:{},id:""};const Ja=({className:t,isFlipped:e,children:n,"data-testid":s})=>{const i=a=>{if(n.length!==2)throw new Error("CardFlip requires 2 children to function");return n[a]},o=S.exports.useRef(null),r=S.exports.useCallback(a=>{a.target===a.currentTarget&&document.body.classList.add("card-flip--is-flipping")},[]),l=S.exports.useCallback(a=>{a.target===a.currentTarget&&document.body.classList.remove("card-flip--is-flipping")},[]);return S.exports.useEffect(function(){if(!o.current)throw Error("ref undefined");o.current.addEventListener("transitionstart",r);const d=o.current;return function(){if(d!=null)return d.removeEventListener("transitionstart",r)}},[r]),w("div",{className:W(t,{"card-flip--show-front":e,"card-flip--show-back":!e}),"data-testid":s,children:[h("div",{className:"card-flip--back",children:i(0)}),h("div",{ref:o,className:"card-flip--front",onTransitionEnd:l,children:i(1)})]})};function Zl(t){return t.then!==void 0}const Ms=class{static disableAllActions(){Ms.actionsDisabled=!0}static enableAllActions(){Ms.actionsDisabled=!1}static isContextActionEvent(t){return Array.isArray(t.contextActions)}static compareActions(t,e){var n,s,i,o,r,l;return t.group!==e.group?((n=t.group)!=null?n:0)>((s=e.group)!=null?s:0)?1:-1:t.order!==e.order?((i=t.order)!=null?i:0)>((o=e.order)!=null?o:0)?1:-1:t.title!==e.title?((r=t.title)!=null?r:"")>((l=e.title)!=null?l:"")?1:-1:t!==e?t>e?1:-1:0}static sortActions(t){if(t==null||!Array.isArray(t))return[];const e=t.slice();return e.sort(Ms.compareActions),e}static isMacPlatform(){const{platform:t}=window.navigator;return t.startsWith("Mac")}static getModifierKey(){return Ms.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(t){const e=Ms.getModifierKey();return t[e]}static copyToClipboard(t){const{clipboard:e}=navigator;return e===void 0?(Ms.copyToClipboardExecCommand(t),Promise.resolve()):navigator.clipboard.writeText(t).catch(()=>{Ms.copyToClipboardExecCommand(t)})}static copyToClipboardExecCommand(t){const e=document.activeElement,n=document.createElement("textarea");if(n.value=t,document.body.appendChild(n),n.focus(),n.select(),!document.execCommand("copy"))throw new Error("Unable to execute copy command");document.body.removeChild(n),e instanceof HTMLElement&&e.focus()}static getMenuItems(t,e=!0){let n=[],s=t;Array.isArray(s)||(s=[s]);for(let i=0;i<s.length;i+=1){const o=s[i];let r;typeof o=="function"?r=o():r=o,r!=null&&(r instanceof Promise?e&&n.push(r):Array.isArray(r)?n=n.concat(r):n.push(r))}return n=n.filter(i=>i.title!==void 0||i.then||i.menuElement),n}static getNextMenuItem(t,e,n){let s=t;s<0&&e<0&&(s=n.length);for(let i=1;i<n.length+1;i+=1){const o=(s+e*i+n.length)%n.length,r=n[o];if(!(r instanceof Promise)&&r.disabled!==!0)return o}return t}};let Ne=Ms;Ne.actionsDisabled=!1;const fc=X.module("GlobalContextAction");class Xg extends S.exports.Component{constructor(e){super(e),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this)}componentDidMount(){document.body.addEventListener("contextmenu",this.handleContextMenu),document.body.addEventListener("keydown",this.handleKeyDown)}componentWillUnmount(){document.body.removeEventListener("contextmenu",this.handleContextMenu),document.body.removeEventListener("keydown",this.handleKeyDown)}handleContextMenu(e){const n=e;n.contextActions==null&&(n.contextActions=[]);const{action:s}=this.props;s.title==null&&!s.menuElement||(n.contextActions==null&&(n.contextActions=[]),n.contextActions.push(s),fc.debug("Received context menu event at global action! Menu items are now: ",n.contextActions))}handleKeyDown(e){var s;const{action:n}=this.props;!Ne.actionsDisabled&&n.shortcut!==void 0&&n.shortcut.matchesEvent(e)&&(fc.debug("Global hotkey matched!",e),(s=n.action)==null||s.call(n,e),e.preventDefault(),e.stopPropagation())}render(){return null}}class jg extends S.exports.Component{render(){const{actions:e,"data-testid":n}=this.props,s=[];for(let i=0;i<e.length;i+=1){const o=e[i],{shortcut:r}=o;if(o.title!=null||o.menuElement||r){const l=h(Xg,{action:o,"data-testid":n},`${o.title}.${r==null?void 0:r.id}`);s.push(l)}}return s}}const cr=X.module("ContextActions");class se extends S.exports.Component{constructor(e){super(e),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.container=Y.createRef(),this.state={globalActions:[],keyboardActions:[]}}static triggerMenu(e,n,s,i){if(i.length===0)return;const o=new MouseEvent("contextmenu",{clientX:n,clientY:s,bubbles:!0,cancelable:!0});o.contextActions=i,e.dispatchEvent(o)}static getDerivedStateFromProps(e){if(e.actions==null||!Array.isArray(e.actions))return{globalActions:[],keyboardActions:[]};const n=e.actions.filter(i=>!Zl(i)&&typeof i!="function"&&i.isGlobal),s=e.actions.filter(i=>!Zl(i)&&typeof i!="function"&&(i.isGlobal===void 0||!i.isGlobal)&&i.shortcut!=null);return{globalActions:n,keyboardActions:s}}componentDidMount(){var e;(e=this.container.current)!=null&&e.parentElement&&(this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.addEventListener("keydown",this.handleKeyDown))}componentWillUnmount(){var e;(e=this.container.current)!=null&&e.parentElement&&(this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu),this.container.current.parentElement.removeEventListener("keydown",this.handleKeyDown))}handleContextMenu(e){const{ignoreClassNames:n=[]}=this.props;if(n.length>0){let i=e.target;for(;i!=null;){const{classList:o}=i,r=n.find(l=>o.contains(l));if(r!==void 0){cr.debug2(`Contextmenu event ignored based on the target className "${r}"`);return}i=i.parentElement}}if(Ne.isContextActionEvent(e)||(e.contextActions=[]),!Ne.isContextActionEvent(e))return;const{actions:s}=this.props;if(s!=null){let i=s;Array.isArray(i)&&(i=i.filter(o=>Zl(o)||typeof o=="function"||o.isGlobal===void 0||!o.isGlobal)),e.contextActions=e.contextActions.concat(i)}cr.debug("Received context menu event! Menu items are now: ",e.contextActions)}handleKeyDown(e){var s;const{keyboardActions:n}=this.state;for(let i=0;i<n.length;i+=1){const o=n[i];!Ne.actionsDisabled&&o.shortcut!=null&&o.shortcut.matchesEvent(e)&&(cr.debug("Context hotkey matched!",e),(s=o.action)==null||s.call(o,e),e.stopPropagation(),e.preventDefault(),cr.debug2("Matched hotkey returned false, key event not consumed"))}}render(){const{"data-testid":e}=this.props,{globalActions:n}=this.state;return h("div",{className:"context-actions-listener",ref:this.container,"data-testid":e,children:h(jg,{actions:n})})}}se.groups={default:null,high:100,medium:5e3,low:1e4,global:1e5,edit:100};var Qg={prefix:"vs",iconName:"arrow-left",icon:[512,512,[],"f000","m224 98.976 -160 160V281.6l160 160 22.624 -22.624 -132.672 -132.704H448v-32H113.92L246.656 121.6 224 98.976z"]},Cc={prefix:"vs",iconName:"arrow-small-down",icon:[512,512,[],"f000","m342.4 276.48 -80 80h-22.4L160 276.48l22.4 -22.72 52.8 52.48V128h32v178.24L320 253.44l22.4 23.04z"]},Sa={prefix:"vs",iconName:"arrow-small-up",icon:[512,512,[],"f000","M160 208 240 128h22.4l80 80 -22.4 22.72 -52.8 -52.48v178.24h-32V178.24L182.4 231.04 160 208z"]},Zg={prefix:"vs",iconName:"arrow-up",icon:[512,512,[],"f000","m443.328 224 -160 -160h-22.624l-160 160 22.624 22.624L256 113.952V448h32V113.92l132.672 132.704 22.656 -22.624z"]},li={prefix:"vs",iconName:"check",icon:[512,512,[],"f000","m461.792 106.336 -271.04 320 -25.28 -1.152 -107.2 -152.64 26.176 -18.368 95.296 135.68 257.632 -304.192 24.448 20.672z"]},Jg={prefix:"vs",iconName:"chevron-down",icon:[512,512,[],"f000","m255.232 322.304 139.424 -139.424 19.84 19.776L265.088 352h-19.776L96 202.656l19.808 -19.776 139.424 139.424z"]},ef={prefix:"vs",iconName:"chevron-left",icon:[512,512,[],"f000","m189.696 255.232 139.424 139.424 -19.776 19.84L160 265.088v-19.776L309.344 96l19.776 19.808 -139.424 139.424z"]},Jh={prefix:"vs",iconName:"chevron-right",icon:[512,512,[],"f000","M322.304 256.768 182.88 117.344l19.776 -19.84L352 246.912v19.776L202.656 416l-19.776 -19.808 139.424 -139.424z"]},tf={prefix:"vs",iconName:"chevron-up",icon:[512,512,[],"f000","m256.768 189.696 -139.424 139.424 -19.84 -19.776L246.912 160h19.776L416 309.344l-19.808 19.776 -139.424 -139.424z"]},Fo={prefix:"vs",iconName:"circle-large-filled",icon:[512,512,[],"f000","M256 32a217.6 217.6 0 0 1 59.52 8.096 220.768 220.768 0 0 1 98.656 57.76 220.896 220.896 0 0 1 57.728 98.656C477.312 215.616 480 235.424 480 256s-2.688 40.384 -8.096 59.52a220.8 220.8 0 0 1 -22.528 53.568 229.024 229.024 0 0 1 -80.512 80.288 222.912 222.912 0 0 1 -53.376 22.72A223.488 223.488 0 0 1 256 480a223.488 223.488 0 0 1 -59.52 -7.872 227.136 227.136 0 0 1 -53.568 -22.752 233.6 233.6 0 0 1 -45.28 -35.008 233.44 233.44 0 0 1 -35.008 -45.28 227.136 227.136 0 0 1 -22.72 -53.6A223.52 223.52 0 0 1 32 256c0 -20.576 2.624 -40.384 7.872 -59.52a222.976 222.976 0 0 1 22.752 -53.344 228.992 228.992 0 0 1 80.288 -80.512 220.64 220.64 0 0 1 53.6 -22.528A217.856 217.856 0 0 1 256 32z"]},nf={prefix:"vs",iconName:"circle-large-outline",icon:[512,512,[],"f000","M306.816 70.88A185.856 185.856 0 0 0 256 64c-17.728 0 -34.624 2.336 -50.816 6.88l-0.192 0.064c-16.448 4.512 -31.68 10.944 -45.824 19.232A196.992 196.992 0 0 0 90.24 159.36l-0.064 0.128A190.944 190.944 0 0 0 70.72 205.12 191.552 191.552 0 0 0 64 256c0 17.76 2.24 34.72 6.72 50.912a193.6 193.6 0 0 0 49.536 84.832c11.84 11.68 24.768 21.664 38.912 30.08a195.2 195.2 0 0 0 45.92 19.488A192.64 192.64 0 0 0 256 448c17.76 0 34.72 -2.24 50.912 -6.72 16.48 -4.64 31.68 -11.136 45.632 -19.424l0.128 -0.064a197.12 197.12 0 0 0 69.152 -68.96 187.2 187.2 0 0 0 19.2 -45.824l0.096 -0.192A185.824 185.824 0 0 0 448 256c0 -17.728 -2.304 -34.624 -6.88 -50.816l-0.064 -0.192a184.704 184.704 0 0 0 -19.2 -45.536l-0.064 -0.128a188.8 188.8 0 0 0 -30.144 -38.72l-0.256 -0.256a188.864 188.864 0 0 0 -38.72 -30.144l-0.128 -0.064a184.704 184.704 0 0 0 -45.536 -19.2l-0.192 -0.064zm142.56 298.24a229.024 229.024 0 0 1 -80.512 80.256 222.912 222.912 0 0 1 -53.376 22.72A223.488 223.488 0 0 1 256 480a223.488 223.488 0 0 1 -59.52 -7.872 227.136 227.136 0 0 1 -53.568 -22.752 233.6 233.6 0 0 1 -45.28 -35.008 233.44 233.44 0 0 1 -35.008 -45.28 227.136 227.136 0 0 1 -22.72 -53.6A223.52 223.52 0 0 1 32 256c0 -20.576 2.624 -40.384 7.872 -59.52a222.976 222.976 0 0 1 22.752 -53.344 228.992 228.992 0 0 1 80.288 -80.512 220.64 220.64 0 0 1 53.6 -22.528A217.856 217.856 0 0 1 256 32a217.6 217.6 0 0 1 59.52 8.096 220.768 220.768 0 0 1 98.656 57.76 220.896 220.896 0 0 1 57.728 98.656C477.312 215.616 480 235.424 480 256s-2.688 40.384 -8.096 59.52a220.8 220.8 0 0 1 -22.528 53.568z"]},sf={prefix:"vs",iconName:"circle-slash",icon:[512,512,[],"f000","M256 32a224 224 0 1 1 -224 224 224.256 224.256 0 0 1 224 -224zM64 256c0 45.376 16.128 89.28 45.536 123.84l270.304 -270.304A191.776 191.776 0 0 0 64 256zm384 0c0 -45.376 -16.128 -89.28 -45.536 -123.84L132.16 402.464A191.776 191.776 0 0 0 448 256z"]},bc={prefix:"vs",iconName:"clippy",icon:[512,512,[],"f000","M224 447.744H128v-288h256v64h32v-80l-16 -16H352v-32h-32a64 64 0 0 0 -128 0H158.08v32H112l-16 16v320l16 16H224v-32zm0 -358.4a32 32 0 0 1 25.6 -25.6 32 32 0 0 1 18.56 1.92 30.08 30.08 0 0 1 14.4 11.52 32 32 0 1 1 -56 30.08 32 32 0 0 1 -2.56 -17.92zm226.56 302.72L416 426.944v-171.2h-32v170.88l-34.56 -34.56 -22.72 22.72 62.08 61.76h22.72l61.76 -61.76 -22.72 -22.72zm-189.44 -133.12h22.72l61.76 61.76 -22.72 22.72 -34.56 -34.56v170.88h-32v-171.2l-34.56 34.88 -22.72 -22.72 62.08 -61.76z"]},Ho={prefix:"vs",iconName:"close",icon:[512,512,[],"f000","m256 278.624 116.672 116.704 22.656 -22.624L278.624 256l116.704 -116.672 -22.624 -22.656L256 233.376 139.328 116.672l-22.624 22.656L233.376 256l-116.672 116.672 22.624 22.656L256 278.624z"]},of={prefix:"vs",iconName:"cloud-download",icon:[512,512,[],"f000","M382.624 192h1.6a95.68 95.68 0 0 1 67.712 28.128 96.096 96.096 0 0 1 0 135.744 95.68 95.68 0 0 1 -67.744 28.128v-32a64.064 64.064 0 0 0 0 -128h-29.248l-3.936 -27.424a79.68 79.68 0 0 0 -68.032 -67.904A79.296 79.296 0 0 0 199.392 176l-10.656 24.384 -25.888 -6.048A79.68 79.68 0 0 0 144.736 192c-21.184 0 -41.504 8.416 -56.448 23.424A80.096 80.096 0 0 0 144.736 352h15.936v32h-15.936a111.552 111.552 0 0 1 -84.096 -37.12 112.064 112.064 0 0 1 62.656 -184.96 110.784 110.784 0 0 1 46.976 1.28 111.552 111.552 0 0 1 117.024 -65.92A111.328 111.328 0 0 1 382.624 192zm-168 163.872 42.048 42.048V224h31.808v172.8l40.896 -40.928 22.624 22.624 -68.672 68.704h-22.656L192 378.528l22.624 -22.656z"]},rf={prefix:"vs",iconName:"code",icon:[512,512,[],"f000","M150.656 178.496 65.952 263.168l84.704 84.672 -22.656 22.656 -96 -96V251.84l96 -96 22.656 22.656zm224 -22.656L352 178.496l84.704 84.672L352 347.84l22.656 22.656 96 -96V251.84l-96 -96zM157.056 416l28.608 14.336 160 -320L317.056 96l-160 320z"]},ed={prefix:"vs",iconName:"copy",icon:[512,512,[],"f000","m128 128 32 -32h173.248L448 210.752V448l-32 32H160l-32 -32V128zm288 96 -96 -96H160v320h256V224zM96 32 64 64v320l32 32V64h205.248l-32 -32H96z"]},wa={prefix:"vs",iconName:"device-camera",icon:[512,512,[],"f000","M342.624 96H464l16 16v288l-16 16h-416l-16 -16v-288l16 -16h121.376l27.296 -27.328L208 64h96l11.328 4.672 27.296 27.328zM64 384h384V128h-112l-11.328 -4.672L297.376 96H214.624l-27.296 27.328L176 128H64v256zm48 -224a16 16 0 1 0 0 32 16 16 0 0 0 0 -32zM256 192a64 64 0 1 1 0 128 64 64 0 0 1 0 -128zm0 -32a96 96 0 1 0 0 192 96 96 0 0 0 0 -192z"]},ll={prefix:"vs",iconName:"edit",icon:[512,512,[],"f000","M423.36 32h-46.72L112.64 296l-5.12 7.04L32 434.88 77.12 480l131.84 -75.52 7.04 -5.12L480 135.36V88.64L423.36 32zM77.12 434.88l48.32 -96 46.4 46.4 -94.72 49.6zm122.56 -65.92L143.04 312.32l256 -256 56.64 56.64 -256 256z"]},Sc={prefix:"vs",iconName:"file-code",icon:[512,512,[],"f000","m338.24 36.48 104.96 105.6 4.8 11.52v310.4l-16 16h-352l-16 -16v-416l16 -16h247.04l11.2 4.48zM320 160h96l-96 -96v96zM96 64v384h320V192H304L288 176V64H96zm65.984 241.056 58.144 -58.496L197.44 224 128 293.728v22.624l69.472 69.568 22.624 -22.624 -58.112 -58.24zM281.6 246.848l22.4 -22.688 70.048 69.6v22.688L304 385.984l-22.56 -22.688 58.592 -58.24L281.6 246.848z"]},lf={prefix:"vs",iconName:"file-zip",icon:[512,512,[],"f000","M80 32h352l16 16v160l-4.8 11.2 -27.2 27.52v217.28l-16 16h-320l-16 -16v-416l16 -16zM192 64H160v64h32V64zm0 384h128V245.76l-27.2 -27.2L288 207.04V64H224v80l-16 16H192v32H160V160h-16L128 144V64H96v384h64v-32h32v32zm0 -64v32h32v-32H192zm0 -32v32H160v-32h32zm0 -32h32v32H192v-32zm0 -32v32H160V288h32zm0 -32h32v32H192V256zm0 -32v32H160V224h32zm0 0h32V192H192v32zm196.8 4.8 27.2 -27.52V64h-96v136.64l27.2 27.2 4.8 11.2V448h32V240l4.8 -11.2z"]},af={prefix:"vs",iconName:"files",icon:[512,512,[],"f000","M373.333 0h-192L149.333 32V128H53.333L21.333 160v321.493L53.333 512h257.493L341.333 481.493V384h100.267l27.733 -30.507V96L373.333 0zm0 45.227 50.773 50.773H373.333V45.227zm-64 434.773h-256v-320H149.333v193.493L181.333 384h128v96zm128 -128h-256v-320H341.333V128h96v224z"]},Ur={prefix:"vs",iconName:"filter",icon:[512,512,[],"f000","M480 64v53.44l-160 152.288V448H192V269.728l-160 -152.32V64h448zM224 256v160h64V256l160 -152.32V96H64v7.68L224 256z"]},df={prefix:"vs",iconName:"folder-opened",icon:[512,512,[],"f000","M48 448h352l15.36 -11.84 84.16 -224 -15.36 -20.16H448V112l-16 -16H246.72l-27.52 -27.2L208 64h-160l-16 16v352l16 16zM64 96h137.28l27.52 27.2 11.2 4.8H416v64H272l-11.2 4.8 -27.52 27.2H112l-15.04 10.88 -32 98.56L64 96zm324.16 320H70.08l53.44 -160H240l11.2 -4.8 27.52 -27.2h185.28l-75.84 192z"]},cf={prefix:"vs",iconName:"folder",icon:[512,512,[],"f000","M464 96H246.72l-27.2 -27.2L208.32 64h-160l-16 16v352l16 16h416l16 -16v-320L464 96zm-16.32 271.68V416h-384V224h143.68l11.2 -4.8 27.52 -27.52H448v48l-0.32 128zm0 -207.68h-208l-11.2 4.8 -27.52 27.52H64v-96h137.28l27.2 27.2 11.52 4.8H448l-0.32 31.68z"]},Vo={prefix:"vs",iconName:"gear",icon:[512,512,[],"f000","M291.2 140.8 275.2 64H236.8l-16 76.8 -22.4 9.6 -64 -41.6 -28.8 25.6 41.6 64 -6.4 22.4 -76.8 16v38.4l76.8 16 9.6 25.6 -41.6 64 25.6 25.6 64 -41.6 25.6 9.6 12.8 73.6h38.4l16 -76.8 25.6 -9.6 64 41.6 25.6 -25.6 -41.6 -64 9.6 -25.6 73.6 -12.8V236.8l-76.8 -16 -9.6 -25.6 41.6 -64 -25.6 -25.6 -64 41.6 -22.4 -6.4zM300.8 32l16 76.8L384 67.2l64 64 -44.8 67.2 76.8 12.8v89.6l-76.8 16L448 384l-64 64 -67.2 -44.8 -16 76.8H211.2l-16 -76.8L128 444.8l-64 -64 44.8 -67.2L32 300.8V211.2l76.8 -16L67.2 128l64 -64 67.2 44.8 12.8 -76.8h89.6zm19.2 224c0 35.2 -28.8 64 -64 64s-64 -28.8 -64 -64 28.8 -64 64 -64 64 28.8 64 64zM256 288c19.2 0 32 -12.8 32 -32s-12.8 -32 -32 -32 -32 12.8 -32 32 12.8 32 32 32z"]},eu={prefix:"vs",iconName:"graph",icon:[512,512,[],"f000","M48 448H480v-32H64V0H32v432l16 16zM96 368v-256l16 -16h64l16 16v256l-16 16h-64l-16 -16zm64 -16V128H128v224h32zm192 -304v320l16 16h64l16 -16v-320l-16 -16h-64l-16 16zm64 16v288h-32V64h32zm-192 304v-192l16 -16h64l16 16v192l-16 16h-64l-16 -16zm64 -16V192H256v160h32z"]},al={prefix:"vs",iconName:"gripper",icon:[512,512,[],"f000","M160 96h64v64H160zm0 128h64v64H160zm0 128h64v64H160zm128 -256h64v64H288zm0 128h64v64H288zm0 128h64v64H288z"]},hf={prefix:"vs",iconName:"home",icon:[512,512,[],"f000","m267.52 43.84 203.52 185.6 -22.72 22.72L416 222.848v208.832l-16 16h-96l-16 -16v-112H224v112l-16 16h-96l-16 -16V223.104L64 252.16l-22.72 -22.72 203.2 -185.6h23.04zM128 194.016v221.664h64v-112l16 -16h96l16 16v112h64V193.824L256 77.76 128 194.016z"]},uf={prefix:"vs",iconName:"json",icon:[512,512,[],"f000","M192 95.488V64h-2.88c-10.016 0 -19.712 1.984 -29.088 5.92a74.56 74.56 0 0 0 -24.8 16.96 71.36 71.36 0 0 0 -15.776 24.096v0.032a113.344 113.344 0 0 0 -6.336 26.56v0.064a194.56 194.56 0 0 0 -0.768 27.616c0.384 9.28 0.576 18.56 0.576 27.808 0 6.496 -1.28 12.576 -3.744 18.304v0.032a48.128 48.128 0 0 1 -24.48 25.184 44.032 44.032 0 0 1 -17.856 3.68H64v31.488h2.88c6.24 0 12.16 1.28 17.792 3.872l0.032 0.032c5.696 2.496 10.528 5.888 14.56 10.176l0.064 0.064c4.16 4.16 7.456 9.12 9.824 14.88l0.032 0.064c2.496 5.76 3.744 11.776 3.744 18.112 0 9.28 -0.192 18.56 -0.576 27.808 -0.384 9.472 -0.128 18.72 0.768 27.84v0.032c1.056 9.056 3.168 17.856 6.304 26.368v0.032c3.392 8.736 8.672 16.768 15.808 24.096 7.136 7.36 15.424 13.024 24.8 16.96 9.376 3.936 19.072 5.92 29.12 5.92H192v-31.488h-2.88c-6.4 0 -12.384 -1.216 -18.016 -3.68a51.616 51.616 0 0 1 -14.624 -10.24 53.088 53.088 0 0 1 -9.888 -14.944c-2.368 -5.76 -3.52 -11.84 -3.52 -18.336 0 -7.296 0.096 -14.496 0.352 -21.504 0.256 -7.296 0.256 -14.4 0 -21.28a148.448 148.448 0 0 0 -1.76 -20.48 85.824 85.824 0 0 0 -5.376 -19.488A73.088 73.088 0 0 0 112.704 256a73.088 73.088 0 0 0 23.616 -30.56c2.56 -6.144 4.32 -12.576 5.376 -19.264 1.056 -6.72 1.632 -13.536 1.76 -20.48 0.256 -7.04 0.256 -14.144 0 -21.312 -0.256 -7.168 -0.384 -14.4 -0.384 -21.696a47.04 47.04 0 0 1 28.064 -43.328 42.56 42.56 0 0 1 18.016 -3.872H192zm128 321.024V448h2.88c10.016 0 19.712 -1.984 29.088 -5.92 9.376 -3.936 17.664 -9.6 24.8 -16.96 7.136 -7.36 12.416 -15.36 15.776 -24.096v-0.032c3.2 -8.512 5.28 -17.376 6.336 -26.56v-0.064c0.896 -8.96 1.152 -18.144 0.768 -27.616 -0.384 -9.28 -0.576 -18.56 -0.576 -27.808 0 -6.496 1.28 -12.576 3.744 -18.304v-0.032a48.064 48.064 0 0 1 24.48 -25.184 44.16 44.16 0 0 1 17.856 -3.68H448v-31.488h-2.88c-6.272 0 -12.192 -1.28 -17.824 -3.872l-0.032 -0.032a44.032 44.032 0 0 1 -14.56 -10.176l-0.064 -0.064a45.28 45.28 0 0 1 -9.824 -14.88v-0.064a44.96 44.96 0 0 1 -3.776 -18.112c0 -9.28 0.192 -18.56 0.576 -27.808a197.568 197.568 0 0 0 -0.768 -27.84v-0.032a113.184 113.184 0 0 0 -6.304 -26.368v-0.032a71.36 71.36 0 0 0 -15.808 -24.096 74.592 74.592 0 0 0 -24.8 -16.96 74.4 74.4 0 0 0 -29.12 -5.92H320v31.488h2.88c6.4 0 12.384 1.216 17.984 3.68 5.568 2.624 10.432 6.016 14.624 10.24 4.064 4.288 7.36 9.28 9.888 14.944 2.368 5.76 3.52 11.84 3.52 18.336 0 7.296 -0.096 14.464 -0.352 21.504 -0.256 7.296 -0.256 14.4 0 21.28 0.128 7.104 0.704 13.92 1.76 20.48 1.056 6.848 2.848 13.312 5.376 19.488a73.12 73.12 0 0 0 23.616 30.56 73.12 73.12 0 0 0 -23.616 30.56 86.048 86.048 0 0 0 -5.376 19.264c-1.056 6.72 -1.632 13.536 -1.76 20.48a292.8 292.8 0 0 0 0 21.312c0.256 7.168 0.384 14.4 0.384 21.696a47.072 47.072 0 0 1 -28.064 43.328 42.56 42.56 0 0 1 -18.016 3.872H320z"]},tu={prefix:"vs",iconName:"kebab-vertical",icon:[512,512,[],"f000","M238.208 442.624a32 32 0 1 0 35.552 -53.216 32 32 0 0 0 -35.52 53.184zM256 288a32 32 0 1 1 0 -64 32 32 0 0 1 0 64zm0 -160a32 32 0 1 1 0 -64 32 32 0 0 1 0 64z"]},mf={prefix:"vs",iconName:"law",icon:[512,512,[],"f000","M468.16 224 416 96h32V64H288V32H256v32H96v32h32L76.16 224H64v32h4.8c4.992 15.936 15.136 29.76 28.8 39.36a79.04 79.04 0 0 0 92.8 0A78.08 78.08 0 0 0 219.52 256H224V224h-14.4L156.16 96H256v256H192l-12.48 5.76 -64 80.32 12.48 25.92h288l12.48 -25.92 -64 -80.32L352 352H288V96h100.16l-53.44 128H320v32h4.8a79.36 79.36 0 0 0 150.72 0H480V224h-11.84zM167.04 272.32a48.64 48.64 0 0 1 -23.04 6.08 46.4 46.4 0 0 1 -22.72 -6.08A47.04 47.04 0 0 1 104 256h80a48.64 48.64 0 0 1 -16.96 16.32zM175.04 224h-64l32 -76.8 32 76.8zm169.28 160L384 432H160L199.68 384h144.64zm56.96 -236.16 32 76.8h-64l32 -76.8zm21.76 125.12a45.12 45.12 0 0 1 -23.04 6.08 43.2 43.2 0 0 1 -22.72 -6.08 49.6 49.6 0 0 1 -17.28 -16.96h80a43.84 43.84 0 0 1 -16.96 16.96z"]},pf={prefix:"vs",iconName:"link-external",icon:[512,512,[],"f000","M48 32H192v32H64v384h384v-128h32v144l-16 16h-416l-16 -16v-416l16 -16zm432 16V256h-32V86.624L231.776 302.88l-22.624 -22.656L425.376 64H256V32h208l16 16z"]},td={prefix:"vs",iconName:"link",icon:[512,512,[],"f000","M140.8 96h98.72a108.8 108.8 0 0 1 108.8 108.8v6.56A108.8 108.8 0 0 1 239.52 320H224V288h15.52A76.8 76.8 0 0 0 316.16 211.52V204.8A76.8 76.8 0 0 0 239.68 128H140.8A76.8 76.8 0 0 0 64 204.8v6.56A76.608 76.608 0 0 0 128 286.72v32a108.8 108.8 0 0 1 -96 -107.2V204.8A108.96 108.96 0 0 1 140.8 96zM384 225.28v-32a108.8 108.8 0 0 1 96 107.52v6.56A108.96 108.96 0 0 1 371.36 416h-98.88A108.8 108.8 0 0 1 163.84 307.52V300.8A108.8 108.8 0 0 1 272.48 192H288v32h-15.52A76.8 76.8 0 0 0 195.84 300.8v6.56A76.8 76.8 0 0 0 272.48 384h98.88A76.8 76.8 0 0 0 448 307.52V300.8a76.608 76.608 0 0 0 -64 -75.52z"]},gf={prefix:"vs",iconName:"list-ordered",icon:[512,512,[],"f000","M73.184 74.432 86.144 64h21.664v96h-22.656V89.344l-11.968 8.992v-23.904zM160 96h320v32H160V96zm0 128h320v32H160V224zm320 128H160v32h320v-32zM119.744 244.032l0.928 -1.248 2.08 -2.88a26.88 26.88 0 0 0 4.992 -16.224c0 -3.84 -0.64 -7.68 -1.824 -11.328a27.136 27.136 0 0 0 -15.744 -16.928 35.936 35.936 0 0 0 -14.464 -2.624 35.008 35.008 0 0 0 -14.656 2.784 27.744 27.744 0 0 0 -15.328 16.704A33.216 33.216 0 0 0 64 222.624v1.6h25.92v-1.6a9.6 9.6 0 0 1 1.472 -5.024 5.568 5.568 0 0 1 1.824 -1.728 6.08 6.08 0 0 1 5.504 0 6.016 6.016 0 0 1 1.792 1.92 7.68 7.68 0 0 1 0.992 2.592 14.24 14.24 0 0 1 -1.152 9.28 41.888 41.888 0 0 1 -3.84 5.824l-32 36.416 -0.384 0.416v17.28h63.616v-22.4h-28.8l20.8 -23.168zm-1.184 122.144c1.472 1.024 2.752 2.24 3.84 3.648a26.912 26.912 0 0 1 5.344 17.6c0 3.424 -0.544 6.816 -1.6 10.048a25.344 25.344 0 0 1 -15.584 16 41.216 41.216 0 0 1 -15.36 2.528c-3.68 0 -7.36 -0.512 -10.912 -1.568a30.08 30.08 0 0 1 -8.256 -3.936 24.032 24.032 0 0 1 -5.824 -5.664 34.016 34.016 0 0 1 -3.712 -6.4A33.216 33.216 0 0 1 64 386.496v-1.568h26.048v1.568c0 0.864 0.096 1.76 0.288 2.624a6.624 6.624 0 0 0 0.96 2.368 4.48 4.48 0 0 0 1.696 1.664 6.4 6.4 0 0 0 5.024 0.256 5.088 5.088 0 0 0 1.792 -1.248 7.04 7.04 0 0 0 1.344 -2.4 13.344 13.344 0 0 0 0.544 -4.032 15.456 15.456 0 0 0 -0.704 -5.216 6.4 6.4 0 0 0 -1.632 -2.56 4.416 4.416 0 0 0 -1.92 -0.928 17.184 17.184 0 0 0 -2.464 -0.224h-5.152v-20.64h5.376a7.712 7.712 0 0 0 2.208 -0.352 5.248 5.248 0 0 0 2.08 -1.088 5.6 5.6 0 0 0 1.536 -2.144 9.152 9.152 0 0 0 0.672 -3.872 8.96 8.96 0 0 0 -0.512 -3.2 5.312 5.312 0 0 0 -3.104 -3.168 6.4 6.4 0 0 0 -4.992 0.224 5.248 5.248 0 0 0 -1.76 1.696 11.008 11.008 0 0 0 -1.28 4.992v1.568H64v-1.568a31.584 31.584 0 0 1 5.76 -17.408 25.6 25.6 0 0 1 5.728 -5.952 27.84 27.84 0 0 1 8.384 -4.256c3.648 -1.152 7.488 -1.696 11.328 -1.632 3.712 -0.032 7.392 0.32 11.008 1.152 2.944 0.672 5.76 1.76 8.416 3.2a24.224 24.224 0 0 1 10.24 10.176 23.36 23.36 0 0 1 2.88 11.104 25.92 25.92 0 0 1 -5.344 16.896 17.984 17.984 0 0 1 -3.84 3.648z"]},nu={prefix:"vs",iconName:"loading",icon:[512,512,[],"f000","M445.344 224A192.064 192.064 0 0 0 66.656 224H34.272a224.064 224.064 0 0 1 443.456 0h-32.384z"]},ff={prefix:"vs",iconName:"lock",icon:[512,512,[],"f000","M416 224h-32V160a128 128 0 1 0 -256 0v64H96L64 256v192l32 32h320l32 -32V256l-32 -32zM160 160a96 96 0 1 1 192 0v64H160V160zm256 288H96V256h320v192z"]},Cf={prefix:"vs",iconName:"markdown",icon:[512,512,[],"f000","M203.04 160h67.2v209.056H223.776l1.76 -169.92 -56.768 169.92H130.304l-57.76 -169.92c1.28 20.608 1.92 169.92 1.92 169.92H32V160h68.992s48.896 143.776 50.464 153.824L203.04 160zm214.72 115.744v-112H355.52v112H293.312l93.344 93.312L480 275.744h-62.24z"]},bf={prefix:"vs",iconName:"menu",icon:[512,512,[],"f000","M512 160H0V128h512v32zm0 256H0v-32h512v32zm0 -128.256H0V256h512v31.744z"]},su={prefix:"vs",iconName:"new-file",icon:[512,512,[],"f000","m304 35.2 108.8 112 3.2 12.8v64h-32V192H256V64H96v352h128v32H80l-16 -16v-384l16 -16h214.4l9.6 3.2zM288 64v96h92.8L288 64zm128 448h-32v-96H288v-32h96V288h32v96h96v32h-96v96z"]},Sf={prefix:"vs",iconName:"new-folder",icon:[512,512,[],"f000","M464 64H246.72l-27.2 -27.2L208.32 32h-160l-16 16v352l16 16H224v-32H63.68V192h143.68l11.2 -4.8 27.52 -27.52H448v48l-0.032 16.32h32.352V80L464 64zm-16.32 64h-208l-11.2 4.8 -27.52 27.52H64v-96h137.28l27.2 27.2 11.52 4.8H448l-0.32 31.68zM416 512h-32v-96H288v-32h96V288h32v96h96v32h-96v96z"]},nd={prefix:"vs",iconName:"pass-filled",icon:[512,512,[],"f000","M256 480A224 224 0 1 0 256 32a224 224 0 0 0 0 448zm-32.64 -132.16h-22.72L128 275.2l22.72 -22.72 61.44 61.44 134.4 -134.72 22.72 22.72 -145.92 145.92z"]},sd={prefix:"vs",iconName:"pass",icon:[512,512,[],"f000","M200.64 347.84h22.72l145.92 -145.92 -22.72 -22.72 -134.4 134.72 -61.44 -61.44L128 275.2l72.64 72.64zM275.2 32c51.2 3.2 99.2 28.8 134.4 64 41.6 44.8 64 99.2 64 163.2 0 51.2 -19.2 99.2 -51.2 140.8 -32 38.4 -76.8 67.2 -128 76.8 -51.2 9.6 -102.4 3.2 -147.2 -22.4 -44.8 -25.6 -80 -64 -99.2 -112C28.8 294.4 25.6 240 41.6 192c16 -51.2 44.8 -92.8 89.6 -121.6C172.8 41.6 224 28.8 275.2 32zm16 412.8c41.6 -9.6 80 -32 108.8 -67.2 25.6 -35.2 41.6 -76.8 38.4 -121.6 0 -51.2 -19.2 -102.4 -54.4 -137.6 -32 -32 -70.4 -51.2 -115.2 -54.4 -41.6 -3.2 -86.4 6.4 -121.6 32 -35.2 25.6 -60.8 60.8 -73.6 105.6 -12.8 41.6 -12.8 86.4 6.4 128 19.2 41.6 48 73.6 86.4 96 38.4 22.4 83.2 28.8 124.8 19.2z"]},Br={prefix:"vs",iconName:"play",icon:[512,512,[],"f000","M120.96 64 96 77.12v384l24.96 13.44 288 -192V256l-288 -192zM128 431.36V107.2l243.2 162.24L128 431.36z"]},va={prefix:"vs",iconName:"preview",icon:[512,512,[],"f000","M64 64h384l32 32v320l-32 32H64l-32 -32V96l32 -32zm0 352h384V96H64v320zm352 -288H96v96h320V128zm-32 64H128V160h256v32zm-96 192h128V256H288v128zm32 -96h64v64h-64V288zM224 256H96v32h128V256zm-128 96h128v32H96v-32z"]},wf={prefix:"vs",iconName:"record-keys",icon:[512,512,[],"f000","M448 96H96a32 32 0 0 0 -32 32v224a32 32 0 0 0 32 32h352a32 32 0 0 0 32 -32V128a32 32 0 0 0 -32 -32zm0 256H96V128h352v224zm-96 -192h-32v32h32V160zm-32 64H288v32h32V224zm64 -64h32v32h-32V160zm32 128h-32v32h32V288zM192 288h160v32H192V288zm224 -64h-64v32h64V224zM256 160h32v32H256V160zm0 64H224v32h32V224zM128 288h32v32H128V288zm0 -128h32v32H128V160zm96 0H192v32h32V160zM128 224h64v32H128V224z"]},Fi={prefix:"vs",iconName:"refresh",icon:[512,512,[],"f000","M149.792 96H64V64h112l16 16V192H160V128a160 160 0 1 0 144.96 -24.352l9.664 -30.528A192 192 0 1 1 149.792 96z"]},Jn={prefix:"vs",iconName:"remove",icon:[512,512,[],"f000","M480 256H32V224h448v32z"]},vf={prefix:"vs",iconName:"reply",icon:[512,512,[],"f000","m201.792 68.672 -128.64 128.64v22.656l128.64 128.64 22.656 -22.624L121.824 223.36H182.08c90.016 0 147.36 19.36 182.56 55.328 35.264 36 51.68 92.064 51.68 173.472v11.2h32v-11.2c0 -84.672 -16.864 -151.04 -60.8 -195.872C343.52 211.36 275.744 191.36 182.08 191.36H124.384l100.064 -100.032 -22.656 -22.656z"]},Tf={prefix:"vs",iconName:"ruby",icon:[512,512,[],"f000","m32 230.08 212.48 212.48h23.04L480 230.08v-23.04l-106.24 -106.24 -11.52 -4.8H149.76l-11.52 4.8L32 207.04v23.04zm224 177.92L66.56 218.56 156.48 128h199.04l89.92 90.56L256 408zm0 -247.36h86.08l57.92 57.92 -144 140.8V160.64z"]},iu={prefix:"vs",iconName:"save",icon:[512,512,[],"f000","m427.296 36.672 48 48L480 96v368l-16 16h-416l-16 -16v-416l16 -16H416l11.296 4.672zM64 64v384h384V102.656L409.376 64H352v128H128V64H64zm192 0v96h64V64H256z"]},ou={prefix:"vs",iconName:"search",icon:[512,512,[],"f000","M325.333 0a176 176 0 0 0 -131.84 292.693L21.333 488.107l23.893 21.333 171.733 -194.56A176.021 176.021 0 1 0 325.333 0.213V0zm0 320a144 144 0 1 1 0 -288 144 144 0 0 1 0 288z"]},Ef={prefix:"vs",iconName:"split-horizontal",icon:[512,512,[],"f000","M448 32H96L64 64v352l32 32h352l32 -32V64l-32 -32zM256 416H96V64h160v352zm192 0H288V64h160v352z"]},yf={prefix:"vs",iconName:"symbol-operator",icon:[512,512,[],"f000","M91.936 35.2c10.72 4.352 19.264 12.736 23.84 23.36 2.304 5.44 3.488 11.264 3.424 17.184a42.88 42.88 0 0 1 -19.52 36.32 43.488 43.488 0 0 1 -24.096 7.136A43.36 43.36 0 0 1 32 75.584a43.36 43.36 0 0 1 26.56 -40.192A43.84 43.84 0 0 1 91.936 35.2zm-9.536 56.48a17.632 17.632 0 0 0 10.624 -16 17.536 17.536 0 1 0 -10.624 16zM205.76 35.488 35.52 205.76l21.952 21.984 170.24 -170.24 -21.952 -21.984zM368 288h32v80H480v32h-80V480h-32v-80H288v-32h80V288zm-183.424 16.8 22.624 22.624L150.624 384l56.576 56.576 -22.624 22.624L128 406.624l-56.576 56.576 -22.624 -22.624L105.376 384l-56.576 -56.576 22.624 -22.624L128 361.376l56.576 -56.576zm43.2 -134.24a43.296 43.296 0 0 0 -40.192 -26.56 43.36 43.36 0 0 0 -40.192 26.56 43.584 43.584 0 0 0 40.224 60.64A43.456 43.456 0 0 0 227.776 170.56zm-24.096 23.84a17.696 17.696 0 0 1 -9.248 9.28 17.504 17.504 0 0 1 -19.168 -3.744 16.928 16.928 0 0 1 -3.744 -5.536 17.408 17.408 0 0 1 22.912 -22.88 18.08 18.08 0 0 1 5.536 3.712 17.568 17.568 0 0 1 3.712 19.168zM448 96h-128v32h128V96z"]},wc={prefix:"vs",iconName:"terminal",icon:[512,512,[],"f000","M64 32 32 64v384L64 480h384l32 -32V64L448 32H64zM64 448V64h384v384H64zm120.661 -85.547 22.144 22.635 112.213 -111.851v-19.456l-112.213 -112.213 -22.08 22.613 97.92 100.309 -97.984 97.963z"]},If={prefix:"vs",iconName:"tools",icon:[512,512,[],"f000","m472.736 111.52 -24.96 -5.888 -67.456 67.072 -38.208 -38.912 65.792 -69.024 -5.76 -25.344a141.44 141.44 0 0 0 -43.104 -7.296 116.48 116.48 0 0 0 -46.624 8.96 122.368 122.368 0 0 0 -37.952 26.88 119.552 119.552 0 0 0 -28 40.48 126.016 126.016 0 0 0 0 94.912 10730.912 10730.912 0 0 0 -197.536 199.488c-6.72 8.8 -9.92 19.776 -9.088 30.816a44.896 44.896 0 0 0 14.848 30.944c3.968 4.32 8.704 7.904 13.984 10.496 5.44 2.4 11.296 3.776 17.216 4.064 10.112 -0.192 19.808 -4.032 27.328 -10.784 49.536 -46.624 144.448 -142.4 198.368 -198.528 14.624 6.208 30.336 9.408 46.208 9.376a119.552 119.552 0 0 0 85.664 -36.256 124.32 124.32 0 0 0 35.552 -87.36 134.752 134.752 0 0 0 -6.272 -44.096zM93.856 445.696a9.92 9.92 0 0 1 -4.32 2.24 13.984 13.984 0 0 1 -4.768 0 11.072 11.072 0 0 1 -4.608 -1.824 10.752 10.752 0 0 1 -3.648 -3.52c-4.48 -4.576 -8.672 -13.28 -4.48 -18.176 43.84 -46.624 134.112 -137.76 190.56 -193.472 3.2 4.224 6.72 8.256 10.496 12.032 3.776 3.936 7.84 7.584 12.16 10.912 -54.592 56 -143.616 146.048 -191.36 191.808zm355.776 -290.08c0.064 24.48 -9.472 48 -26.624 65.536a91.552 91.552 0 0 1 -128.224 0 95.744 95.744 0 0 1 -20.32 -100.384A87.936 87.936 0 0 1 324.48 69.76a88.32 88.32 0 0 1 34.304 -6.848h8.128L308.768 122.848v22.272l60.64 60.352h21.12l59.104 -58.112v8.256zM103.68 214.016h48.992l22.56 22.944 21.696 -21.568 -21.28 -21.696V192.32l1.824 -52.768 -7.04 -13.984 -91.52 -60.224 -18.912 2.112 -26.592 27.168 -2.112 19.168 58.816 93.376 13.568 6.88zm-30.24 -116.224L147.488 146.56 146.24 182.496H111.808L64.064 106.912l9.376 -9.12zm227.36 222.72 21.568 -21.536 99.392 101.92a47.328 47.328 0 0 1 0 65.248 44.928 44.928 0 0 1 -49.568 10.08 41.92 41.92 0 0 1 -13.984 -10.08l-100.544 -102.496 21.728 -21.696 100.224 102.208a12.864 12.864 0 0 0 4.896 3.36 15.264 15.264 0 0 0 11.488 0 12.896 12.896 0 0 0 4.896 -3.36 13.952 13.952 0 0 0 3.2 -4.896 16.8 16.8 0 0 0 1.152 -5.888 17.504 17.504 0 0 0 -1.12 -5.888 13.952 13.952 0 0 0 -3.2 -4.896L300.8 320.512z"]},xn={prefix:"vs",iconName:"trash",icon:[512,512,[],"f000","M320 96h96v32h-32v288l-32 32H128l-32 -32V128H64V96h96V64a32 32 0 0 1 32 -32h96a32 32 0 0 1 32 32v32zM288 64H192v32h96V64zM128 416h224V128H128v288zm64 -256H160v224h32V160zm32 0h32v224H224V160zm64 0h32v224H288V160z"]},as={prefix:"vs",iconName:"triangle-down",icon:[512,512,[],"f000","M64 177.92 77.216 160h358.208l12.576 17.28L267.936 352h-26.464L64 177.92z"]},ru={prefix:"vs",iconName:"triangle-right",icon:[512,512,[],"f000","M177.92 448 160 434.784V76.576L177.28 64 352 244.064v26.464L177.92 448z"]},cs={prefix:"vs",iconName:"warning",icon:[512,512,[],"f000","M241.92 32h28.16l209.28 392.32 -14.08 23.68H46.08L32 424.32 241.92 32zM256 72.96 72.96 416H438.4L256 72.96zM276 384v-32h-40v32h40zm-40 -64V192h40v128h-40z"]},Rf={prefix:"vs",iconName:"watch",icon:[512,512,[],"f000","M240 288h64V256H256V176H224v96l16 16zm-64 -170.592A159.936 159.936 0 0 0 96 256a159.936 159.936 0 0 0 80 138.592V464l16 16h128l16 -16v-69.408A159.936 159.936 0 0 0 416 256a159.936 159.936 0 0 0 -80 -138.592V48L320 32H192l-16 16v69.408zM384 256a128 128 0 1 1 -256 0 128 128 0 0 1 256 0z"]},Df={prefix:"dh",iconName:"arrow-to-bottom",icon:[512,512,[],"f000","m99.2 224 160 160h22.4l160 -160 -22.4 -22.4L288 332.8V64H256v268.8L124.8 201.6l-25.6 22.4zM96 416h352v32H96z"]},Mf={prefix:"dh",iconName:"arrow-to-top",icon:[512,512,[],"f000","m444.8 288 -160 -160h-22.4l-160 160 22.4 22.4L256 179.2V448h32V179.2l131.2 131.2 25.6 -22.4zm3.2 -192H96V64h352v32z"]},Nf={prefix:"dh",iconName:"check-square",icon:[512,512,[],"f000","M425.6 64H86.4l-22.4 22.4v342.4l22.4 19.2h342.4l22.4 -22.4V86.4l-25.6 -22.4zm-188.8 284.8h-22.4L144 278.4l22.4 -22.4 60.8 60.8 134.4 -134.4 22.4 22.4 -147.2 144z"]},Ff={prefix:"dh",iconName:"exclamation",icon:[512,512,[],"f000","M275.2 384v-32H236.8v32h38.4zm-38.4 -64V128h38.4v192H236.8z"]},vc={prefix:"dh",iconName:"eye-slash",icon:[512,512,[],"f000","M480 256c0 -32 -99.2 -160 -224 -160 -32 0 -64 9.6 -92.8 22.4L70.4 25.6 25.6 70.4 435.2 480l44.8 -44.8 -76.8 -76.8C451.2 320 480 272 480 256zM256 131.2c96 0 176 92.8 188.8 124.8 -6.4 16 -32 48 -67.2 76.8L316.8 272c3.2 -6.4 3.2 -9.6 3.2 -16 0 -35.2 -28.8 -64 -64 -64 -6.4 0 -9.6 0 -16 3.2L192 147.2c19.2 -9.6 41.6 -16 64 -16zm0 249.6C160 380.8 80 288 67.2 256c6.4 -9.6 19.2 -32 41.6 -54.4l-25.6 -25.6C51.2 208 32 243.2 32 256c0 32 99.2 160 224 160 19.2 0 38.4 -3.2 57.6 -9.6l-28.8 -28.8c-9.6 3.2 -19.2 3.2 -28.8 3.2z"]},Ta={prefix:"dh",iconName:"eye",icon:[512,512,[],"f000","M256 96C131.2 96 32 224 32 256s99.2 160 224 160 224 -128 224 -160 -99.2 -160 -224 -160zm0 284.8C160 380.8 80 288 67.2 256 80 227.2 160 131.2 256 131.2S432 224 444.8 256c-12.8 28.8 -92.8 124.8 -188.8 124.8zM256 192c-35.2 0 -64 28.8 -64 64s28.8 64 64 64 64 -28.8 64 -64 -28.8 -64 -64 -64zm0 92.8c-16 0 -28.8 -12.8 -28.8 -28.8s12.8 -28.8 28.8 -28.8 28.8 12.8 28.8 28.8 -12.8 28.8 -28.8 28.8z"]},xf={prefix:"dh",iconName:"file-csv",icon:[512,512,[],"f000","m444.8 140.8 -105.6 -105.6 -12.8 -3.2H80l-16 16V224h32V64h192v112l16 16H416v32h32V153.6l-3.2 -12.8zM320 160V64l96 96h-96zM80 256l-16 16v192l16 16h352l16 -16v-192l-16 -16h-352zM416 416v32H96V288h320v128zm-217.6 -3.2c-6.4 3.2 -16 3.2 -25.6 3.2 -16 0 -25.6 -3.2 -35.2 -12.8 -9.6 -6.4 -12.8 -19.2 -12.8 -32 0 -16 3.2 -28.8 12.8 -38.4 9.6 -9.6 22.4 -12.8 38.4 -12.8 9.6 0 16 0 22.4 3.2v19.2c-6.4 -3.2 -12.8 -6.4 -22.4 -6.4 -9.6 0 -16 3.2 -22.4 9.6 -6.4 6.4 -9.6 12.8 -9.6 22.4 0 9.6 3.2 16 6.4 22.4 6.4 6.4 12.8 9.6 22.4 9.6 9.6 0 16 -3.2 22.4 -6.4v19.2zm19.2 0v-22.4c3.2 3.2 9.6 6.4 12.8 6.4 3.2 3.2 9.6 3.2 12.8 3.2h6.4c3.2 0 3.2 0 6.4 -3.2l3.2 -3.2v-3.2c0 -3.2 0 -3.2 -3.2 -6.4 3.2 0 0 0 0 -3.2 -3.2 0 -3.2 -3.2 -6.4 -3.2s-6.4 -3.2 -9.6 -3.2c-6.4 -3.2 -12.8 -6.4 -16 -12.8 -3.2 -3.2 -6.4 -9.6 -6.4 -16s0 -9.6 3.2 -12.8c3.2 -3.2 3.2 -6.4 9.6 -9.6 3.2 0 6.4 -3.2 12.8 -3.2h25.6c3.2 0 6.4 0 9.6 3.2v19.2s-3.2 -3.2 -6.4 -3.2 -3.2 0 -6.4 -3.2h-19.2c-3.2 0 -3.2 0 -6.4 3.2l-3.2 3.2v6.4l3.2 3.2s3.2 3.2 6.4 3.2 3.2 3.2 6.4 3.2c3.2 3.2 6.4 3.2 9.6 6.4 3.2 3.2 6.4 3.2 6.4 6.4 3.2 3.2 3.2 6.4 6.4 6.4 0 3.2 3.2 6.4 3.2 9.6 0 6.4 0 9.6 -3.2 12.8 -3.2 3.2 -3.2 6.4 -9.6 9.6 3.2 3.2 0 6.4 -3.2 6.4h-32c-3.2 0 -6.4 -3.2 -12.8 -3.2zm169.6 -92.8 -32 96h-25.6l-32 -96h22.4l19.2 67.2c0 3.2 3.2 6.4 3.2 9.6 0 -3.2 0 -6.4 3.2 -9.6l19.2 -67.2h22.4z"]},_f={prefix:"dh",iconName:"file-download",icon:[512,512,[],"f000","m438.4 137.6 -96 -96L320 32H128L96 64v384l32 32h288l32 -32V160l-9.6 -22.4zM416 448H128V64h160v128h128v256zm-96 -288V64l96 96h-96zm-134.4 182.4 76.8 76.8h22.4l76.8 -76.8 -25.6 -22.4L288 368V227.2H256v140.8L208 320l-22.4 22.4z"]},Lf={prefix:"dh",iconName:"file-search",icon:[512,512,[],"f000","M412.8 147.2 304 35.2 294.4 32H80l-16 16v384l16 16H224v-32H96V64h160v128h128v32h32V160l-3.2 -12.8zM288 160V64l92.8 96H288zm224 329.6 -92.8 -92.8c9.6 -16 16 -32 16 -51.2 0 -51.2 -41.6 -89.6 -89.6 -89.6C297.6 256 256 297.6 256 345.6s41.6 89.6 89.6 89.6c19.2 0 38.4 -6.4 51.2 -16l92.8 92.8 22.4 -22.4zm-224 -144c0 -32 25.6 -57.6 57.6 -57.6s57.6 25.6 57.6 57.6 -25.6 57.6 -57.6 57.6S288 377.6 288 345.6z"]},kf={prefix:"dh",iconName:"file-spreadsheet",icon:[512,512,[],"f000","m438.4 137.6 -96 -96L320 32H128L96 64v384l32 32h288l32 -32V160l-9.6 -22.4zM416 448H128V64h160v128h128v256zm-96 -288V64l96 96h-96zm64 99.2 -19.2 -19.2H179.2l-19.2 19.2v137.6l19.2 19.2h185.6l19.2 -19.2V259.2zm-150.4 134.4H182.4v-48h51.2v48zm0 -115.2v48H182.4V278.4m115.2 115.2H246.4v-48h48v48zm0 -64H246.4V278.4h48v51.2zm64 64H310.4v-48h48v48zm-51.2 -64V278.4h48v48H310.4z"]},id={prefix:"dh",iconName:"filter-filled",icon:[512,512,[],"f000","M480 64v54.4l-160 153.6V448H192V268.8L32 118.4V64h448z"]},Of={prefix:"dh",iconName:"filter-slash",icon:[512,512,[],"f000","M480 118.4V64H108.8L70.4 25.6 25.6 70.4l406.4 406.4 44.8 -44.8L320 275.2v-6.4l160 -150.4zM288 416H224v-86.4l-32 -32V448h128v-22.4l-32 -32v22.4zM140.8 96H448v6.4L294.4 249.6 140.8 96z"]},Af={prefix:"dh",iconName:"freeze",icon:[512,512,[],"f000","m438.4 300.8 -19.2 -28.8 -60.8 35.2L272 256l86.4 -51.2 60.8 35.2 19.2 -28.8 -44.8 -25.6 48 -28.8 -16 -25.6 -48 28.8V108.8h-35.2v67.2L256 227.2V128l60.8 -35.2 -16 -28.8 -44.8 25.6V32H224v57.6L179.2 64l-16 28.8L224 128v99.2L137.6 176V108.8H102.4V160l-48 -28.8 -16 25.6 48 28.8 -44.8 25.6 19.2 28.8 60.8 -35.2L208 256 121.6 307.2 60.8 272l-19.2 28.8 44.8 25.6 -48 28.8 16 25.6 48 -28.8v51.2h35.2v-67.2L224 284.8V384l-60.8 35.2 16 28.8 44.8 -25.6V480h32v-57.6l44.8 25.6 16 -28.8L256 384V284.8l86.4 51.2v67.2h35.2V352l48 28.8 16 -25.6 -48 -28.8z"]},Jl={prefix:"dh",iconName:"gear-filled",icon:[512,512,[],"f000","m480 211.2 -76.8 -12.8L448 131.2l-64 -64 -67.2 41.6L300.8 32H211.2l-12.8 76.8L131.2 64l-64 64 41.6 67.2 -76.8 16v89.6l76.8 12.8L64 380.8l64 64 67.2 -41.6 16 76.8h89.6l16 -76.8L384 448l64 -64 -44.8 -67.2 76.8 -16V211.2zM256 320c-38.4 0 -64 -25.6 -64 -64s25.6 -64 64 -64 64 25.6 64 64 -25.6 64 -64 64z"]},Pf={prefix:"dh",iconName:"graph-line-down",icon:[512,512,[],"f000","M64 416V0H32v432l16 16H480v-32zm67.2 -291.2 -22.4 22.4 108.8 112 70.4 -64 108.8 124.8H320v32h112l16 -16V224h-32v70.4L288 150.4l-70.4 64z"]},Hf={prefix:"dh",iconName:"graph-line-up",icon:[512,512,[],"f000","M64 416V0H32v432l16 16H480v-32zm153.6 -150.4 70.4 64 128 -144V256h32V144l-16 -16H320v32h76.8L288 284.8l-70.4 -64 -108.8 112 22.4 22.4z"]},Vf={prefix:"dh",iconName:"input",icon:[512,512,[],"f000","M464 448h-416l-16 -16v-352l16 -16h416l16 16v352l-16 16zM64 416h384V96H64v320zm96 -224h32v128H160zm64 -32v32H128V160l48 16zm0 160v32l-48 -16L128 352v-32z"]},ks={prefix:"dh",iconName:"new-circle-large-filled",icon:[512,512,[],"f000","M240 0C108.8 0 0 108.8 0 240S108.8 480 240 480 480 371.2 480 240 371.2 0 240 0zM352 256H256v96H224V256H128V224h96V128h32v96h96v32z"]},Uf={prefix:"dh",iconName:"pandas",icon:[512,512,[],"f000","M185.6 28.8h54.4v115.2H185.6V28.8zm0 240h54.4V384H185.6V268.8zm0 -89.6h54.4v54.4H185.6V179.2zM96 124.8h54.4V512H96V124.8zm176 240h54.4V480H272v-115.2zm0 -240h54.4v115.2H272V124.8zm0 150.4h54.4v54.4H272V275.2zM361.6 0H416v387.2h-54.4V0z"]},Bf={prefix:"dh",iconName:"panels",icon:[512,512,[],"f000","m496 288 16 16v160l-16 16h-192l-16 -16v-160l16 -16h192zm0 -256h-192l-16 16v160l16 16h192l16 -16v-160l-16 -16zM16 32l-16 16v160l16 16h192l16 -16v-160L208 32h-192zm0 256 -16 16v160l16 16h192l16 -16v-160L208 288h-192z"]},$f={prefix:"dh",iconName:"python",icon:[512,512,[],"f000","M198.4 249.6h99.2s57.6 0 57.6 -54.4V102.4s9.6 -54.4 -99.2 -54.4c-105.6 0 -99.2 44.8 -99.2 44.8v48H256v12.8H115.2s-67.2 -6.4 -67.2 99.2c0 105.6 57.6 102.4 57.6 102.4h35.2V307.2s-3.2 -57.6 57.6 -57.6zm3.2 -131.2c-9.6 0 -19.2 -9.6 -19.2 -19.2s6.4 -19.2 19.2 -19.2c9.6 0 19.2 9.6 19.2 19.2s-9.6 19.2 -19.2 19.2zm208 35.2h-35.2v48s3.2 57.6 -57.6 57.6H217.6S160 259.2 160 313.6v92.8s-12.8 54.4 99.2 54.4c105.6 0 99.2 -44.8 99.2 -44.8v-48H259.2v-12.8h140.8s67.2 6.4 67.2 -99.2 -57.6 -102.4 -57.6 -102.4zm-96 236.8c9.6 0 19.2 9.6 19.2 19.2s-9.6 19.2 -19.2 19.2 -19.2 -9.6 -19.2 -19.2 9.6 -19.2 19.2 -19.2z"]},od={prefix:"dh",iconName:"refresh",icon:[512,512,[],"f000","m313.6 73.6 -9.6 32c83.2 25.6 131.2 118.4 102.4 201.6 -19.2 64 -80 108.8 -150.4 108.8 -89.6 0 -160 -70.4 -160 -160 0 -51.2 22.4 -96 64 -128v64h32V80L176 64H64v32h86.4c-76.8 51.2 -108.8 150.4 -70.4 236.8C112 403.2 179.2 448 256 448c105.6 0 192 -86.4 192 -192 0 -83.2 -54.4 -156.8 -134.4 -182.4z"]},Wf={prefix:"dh",iconName:"remove-square-filled",icon:[512,512,[],"f000","M432 32h-384l-16 16v384l16 16h384l16 -16v-384l-16 -16zM352 256H128V224h224v32z"]},zf={prefix:"dh",iconName:"run-selection",icon:[704,512,[],"f000","M124.8 64 128 96h-3.2c-6.4 0 -12.8 0 -19.2 3.2 -16 6.4 -25.6 25.6 -25.6 44.8v44.8c0 6.4 0 12.8 -3.2 19.2 0 6.4 -3.2 12.8 -6.4 19.2 -3.2 9.6 -12.8 22.4 -22.4 28.8 9.6 6.4 19.2 19.2 22.4 32 3.2 6.4 3.2 12.8 6.4 19.2 0 6.4 3.2 12.8 3.2 19.2v44.8c0 6.4 0 12.8 3.2 19.2 3.2 6.4 6.4 9.6 9.6 16 3.2 3.2 9.6 6.4 16 9.6H128v32h-3.2c-9.6 0 -19.2 -3.2 -28.8 -6.4 -9.6 -3.2 -19.2 -9.6 -25.6 -16 -6.4 -6.4 -12.8 -16 -16 -25.6 -3.2 -9.6 -6.4 -16 -6.4 -25.6V316.8c0 -6.4 0 -12.8 -3.2 -19.2 -3.2 -3.2 -6.4 -6.4 -9.6 -12.8 -3.2 -3.2 -9.6 -6.4 -16 -9.6 -3.2 -3.2 -9.6 -3.2 -16 -3.2H0v-32h3.2c6.4 0 12.8 0 19.2 -3.2 9.6 -6.4 19.2 -12.8 22.4 -25.6 3.2 -6.4 3.2 -12.8 3.2 -19.2V134.4c0 -9.6 3.2 -19.2 6.4 -25.6 3.2 -6.4 9.6 -16 16 -22.4 6.4 -6.4 16 -12.8 25.6 -16 9.6 -3.2 19.2 -6.4 28.8 -6.4zm576 176c-6.4 0 -12.8 0 -19.2 -3.2 -6.4 -3.2 -9.6 -6.4 -16 -9.6 -3.2 -3.2 -6.4 -9.6 -9.6 -16 -3.2 -6.4 -3.2 -12.8 -3.2 -19.2V134.4c0 -9.6 -3.2 -19.2 -6.4 -25.6 -3.2 -9.6 -9.6 -16 -16 -25.6 -6.4 -6.4 -16 -12.8 -25.6 -16 -6.4 0 -16 -3.2 -25.6 -3.2H576v32h3.2c6.4 0 12.8 0 19.2 3.2 6.4 3.2 9.6 6.4 16 9.6 3.2 3.2 6.4 9.6 9.6 16 3.2 6.4 3.2 12.8 3.2 19.2v44.8c0 6.4 0 12.8 3.2 19.2 0 6.4 3.2 12.8 6.4 19.2 6.4 12.8 12.8 22.4 22.4 32 -9.6 6.4 -19.2 19.2 -22.4 32 -3.2 6.4 -3.2 12.8 -6.4 19.2 0 6.4 -3.2 12.8 -3.2 19.2v44.8c0 19.2 -9.6 35.2 -28.8 44.8 -6.4 -3.2 -12.8 -3.2 -19.2 -3.2H576v32h3.2c9.6 0 19.2 -3.2 28.8 -6.4 9.6 -3.2 19.2 -9.6 25.6 -16 6.4 -6.4 12.8 -16 16 -25.6 3.2 -9.6 6.4 -16 6.4 -25.6V316.8c0 -6.4 0 -12.8 3.2 -19.2 3.2 -9.6 12.8 -16 25.6 -22.4 6.4 -3.2 12.8 -3.2 19.2 -3.2l-3.2 -32zm-192 28.8 -240 160 -25.6 -12.8V96l25.6 -12.8 240 160v25.6zM470.4 256 275.2 124.8V384l195.2 -128z"]},Gf={prefix:"dh",iconName:"shapes",icon:[512,512,[],"f000","M195.2 320 160 256 128 313.6 105.6 352 32 480h256l-73.6 -128 -19.2 -32zm112 -76.8c51.2 -35.2 121.6 -22.4 156.8 28.8s22.4 121.6 -28.8 156.8c0 0 -3.2 0 -3.2 3.2 -51.2 32 -121.6 19.2 -153.6 -32 -35.2 -54.4 -22.4 -121.6 28.8 -156.8zM96 32v192h192V32H96z"]},rd={prefix:"dh",iconName:"sort-alpha-down",icon:[512,512,[],"f000","M236.8 368 156.8 448h-22.4l-80 -80 22.4 -22.4L128 396.8V64h32v332.8l51.2 -51.2 25.6 22.4zM371.2 224l-6.4 -28.8H316.8l-9.6 28.8H256l54.4 -160h60.8l51.2 160h-51.2zm-32 -124.8c0 3.2 -3.2 3.2 -3.2 9.6s-3.2 19.2 -12.8 51.2h32l-9.6 -44.8c-3.2 -6.4 -6.4 -9.6 -6.4 -16zm-6.4 310.4h73.6V448H272v-32l73.6 -89.6H275.2V288h128v32l-70.4 89.6z"]},ld={prefix:"dh",iconName:"sort-alpha-up",icon:[512,512,[],"f000","M51.2 144 131.2 64h22.4l80 80 -22.4 22.4L160 115.2V448H128V115.2L76.8 166.4l-25.6 -22.4zm320 304 -6.4 -28.8H316.8l-9.6 28.8H256l54.4 -160h60.8l51.2 160h-51.2zm-32 -124.8c0 3.2 -3.2 3.2 -3.2 9.6 0 6.4 -3.2 19.2 -12.8 51.2h32l-9.6 -44.8c-3.2 -6.4 -6.4 -9.6 -6.4 -16zm-6.4 -137.6h73.6V224H272V192l73.6 -89.6H275.2V64h128v32l-70.4 89.6z"]},Tc={prefix:"dh",iconName:"sort-amount-down",icon:[512,512,[],"f000","M204.8 368 124.8 448h-22.4L22.4 368l22.4 -22.4L96 396.8V64h32v332.8l51.2 -51.2 25.6 22.4zM256 64h256v64H256zm0 105.6h192v64H256zm0 108.8h128v64H256zM256 384h64v64H256z"]},Kf={prefix:"dh",iconName:"sort-down",icon:[512,512,[],"f000","m128 288 -12.8 25.6 128 118.4h25.6l128 -118.4L384 288H128z"]},qf={prefix:"dh",iconName:"sort-up",icon:[512,512,[],"f000","m128 224 -12.8 -25.6 128 -118.4h25.6l128 118.4 -12.8 25.6H128z"]},ad={prefix:"dh",iconName:"sort",icon:[512,512,[],"f000","m128 224 -12.8 -25.6 128 -118.4h25.6l128 118.4 -12.8 25.6H128zm0 64 -12.8 25.6 128 118.4h25.6l128 -118.4L384 288H128z"]},Ec={prefix:"dh",iconName:"square-filled",icon:[512,512,[],"f000","M432 32h-384l-16 16v384l16 16h384l16 -16v-384l-16 -16z"]},dd={prefix:"dh",iconName:"table",icon:[512,512,[],"f000","M432 64h-384l-16 16v352l16 16h384l16 -16v-352l-16 -16zM160 416H64v-64h96v64zm0 -96H64V256h96v64zm0 -96H64V160h96v64zm128 192H192v-64h96v64zm0 -96H192V256h96v64zm0 -96H192V160h96v64zm128 192h-96v-64h96v64zm0 -96h-96V256h96v64zm0 -96h-96V160h96v64z"]},Yf={prefix:"dh",iconName:"trash-undo",icon:[512,512,[],"f000","M320 96h96v32h-32v288l-32 32H128l-32 -32V128H64V96h96V64c0 -19.2 12.8 -32 32 -32h96c19.2 0 32 12.8 32 32v32zM288 64H192v32h96V64zM128 416h224V128H128v288zm112 -64L160 272v-22.4l80 -80 22.4 22.4 -51.2 54.4H320v32H211.2l51.2 51.2 -22.4 22.4z"]},lu={prefix:"dh",iconName:"triangle-down-square",icon:[512,512,[],"f000","M425.6 64H86.4l-22.4 22.4v342.4l22.4 19.2h342.4l22.4 -22.4V86.4l-25.6 -22.4zm-160 288h-22.4L99.2 208l9.6 -16h291.2l9.6 12.8L265.6 352z"]},Xf={prefix:"dh",iconName:"unlink",icon:[512,512,[],"f000","M32 211.2v-6.4C32 144 80 96 140.8 96h99.2c12.8 0 25.6 3.2 38.4 6.4l-25.6 25.6H140.8C99.2 128 64 163.2 64 204.8v6.4c0 28.8 16 54.4 38.4 67.2l-22.4 22.4C51.2 281.6 32 249.6 32 211.2zM403.2 6.4l-38.4 38.4 -67.2 67.2 -22.4 25.6 -150.4 147.2 -25.6 25.6 -54.4 54.4 -38.4 38.4L51.2 448 448 51.2 403.2 6.4zM384 192v32c38.4 6.4 64 38.4 64 76.8v6.4c0 41.6 -35.2 76.8 -76.8 76.8H272c-32 0 -60.8 -22.4 -73.6 -51.2l-25.6 25.6c19.2 35.2 54.4 60.8 96 60.8h99.2c60.8 0 108.8 -48 108.8 -108.8v-9.6C480 246.4 438.4 198.4 384 192zM246.4 288l-22.4 19.2v12.8h16c60.8 0 108.8 -48 108.8 -108.8v-6.4c0 -6.4 0 -12.8 -3.2 -19.2l-32 32c0 38.4 -32 67.2 -67.2 70.4z"]},yc={prefix:"dh",iconName:"warning-circle-filled",icon:[512,512,[],"f000","M470.4 195.2c-9.6 -38.4 -28.8 -70.4 -57.6 -99.2 -25.6 -25.6 -60.8 -44.8 -96 -54.4C297.6 35.2 275.2 32 256 32c-19.2 0 -41.6 3.2 -60.8 9.6 -16 3.2 -35.2 9.6 -51.2 22.4 -35.2 19.2 -60.8 44.8 -80 80 -12.8 16 -19.2 35.2 -25.6 51.2C35.2 214.4 32 236.8 32 256c0 19.2 3.2 41.6 6.4 60.8 6.4 16 12.8 35.2 25.6 51.2 9.6 16 22.4 32 35.2 44.8 12.8 16 28.8 25.6 44.8 35.2 16 9.6 35.2 16 54.4 22.4 16 6.4 38.4 9.6 57.6 9.6 19.2 0 41.6 -3.2 60.8 -6.4 19.2 -6.4 35.2 -12.8 54.4 -22.4 32 -19.2 60.8 -48 80 -80 9.6 -16 16 -35.2 22.4 -54.4 3.2 -19.2 6.4 -41.6 6.4 -60.8s-3.2 -41.6 -9.6 -60.8zM275.2 352H236.8v-32h38.4v32zm0 -64H236.8V160h38.4v128z"]},au={prefix:"dh",iconName:"warning-filled",icon:[512,512,[],"f000","M268.8 32h-25.6L32 425.6l12.8 22.4h419.2l12.8 -22.4L268.8 32zm6.4 352H236.8v-32h38.4v32zm0 -64H236.8V192h38.4v128z"]};const dl=Y.forwardRef((t,e)=>{var b,C;function n(v){const{menuItem:T,onMenuItemClick:E}=t;E(T,v)}function s(v){const{menuItem:T,onMenuItemMouseMove:E}=t;E(T,v)}function i(v){const{menuItem:T,onMenuItemContextMenu:E}=t;E(T,v)}function o(v,T,E){if(typeof v.type=="string")return v;const{closeMenu:y,menuItem:I,isKeyboardSelected:D,isMouseSelected:N,"data-testid":x}=t,U={menuItem:I,closeMenu:y,isKeyboardSelected:D,isMouseSelected:N,iconElement:T,displayShortcut:E,"data-testid":x};return Y.cloneElement(v,{forwardedProps:U})}const{children:r,menuItem:l,isKeyboardSelected:a,isMouseSelected:d,"data-testid":c}=t,u=(b=l.shortcut)==null?void 0:b.getDisplayText();let m=null;if(l.icon){const v=l.icon;if(Y.isValidElement(v))m=v;else{let T;l.iconColor!=null&&(l.disabled===void 0||!l.disabled)&&(T={color:l.iconColor}),m=h(G,{icon:v,style:T})}}let p=null;const g=Boolean(r);l.actions&&(p=h(G,{icon:Jh}));let f=null;if(l.menuElement)f=h("div",{className:"custom-menu-item",onMouseMove:s,children:o(l.menuElement,m,u)});else{const v=l.disabled,T=l.iconOutline;f=h("button",{type:"button",className:W("btn-context-menu",{disabled:v},{active:(g||d)&&(v===void 0||!v)},{"keyboard-active":a!==void 0&&a&&(v===void 0||!v)}),onClick:n,onMouseMove:s,onContextMenu:i,title:(C=l.description)!=null?C:"",children:w("div",{className:"btn-context-menu-wrapper",children:[h("span",{className:W("icon",{outline:T}),children:m}),h("span",{className:"title",children:l.title}),u!==void 0&&h("span",{className:"shortcut",children:u}),p&&h("span",{className:W("submenu-indicator",{disabled:v}),children:p})]})})}return w("div",{className:"context-menu-item",ref:e,"data-testid":c,children:[r,f]})});dl.displayName="ContextMenuItem";dl.defaultProps={children:null,isKeyboardSelected:!1,isMouseSelected:!1,"data-testid":void 0};class ai extends Error{constructor(){super(...arguments),this.isCanceled=!0}}class cl{static isDark(e){const n=document.createElement("div");n.style.display="none",n.style.color=e;const s=getComputedStyle(document.body.appendChild(n)).color,i=s.match(/\d+/g);let o=[];if(i)o=i.map(l=>parseInt(l,10));else throw new Error(`Invalid color received. Got ${s}`);return document.body.removeChild(n),cl.getBrightness(o)<125}static getBrightness(e){return Math.round((e[0]*299+e[1]*587+e[2]*114)/1e3)}}const jf="table_",du="column_",Qf=new Set(["in","not","i","ii","k"]),Zf=new Set(["abstract","continue","for","new","switch","assert","default","if","package","synchronized","boolean","do","goto","private","this","break","double","implements","protected","throw","byte","else","import","public","throws","case","enum","instanceof","return","transient","catch","extends","int","short","try","char","final","interface","static","void","class","finally","long","strictfp","volatile","const","float","native","super","while","null","true","false"]),Jf=/[^a-zA-Z0-9_$+@-]/g,eC=/[^A-Za-z0-9_$]/g,Ki=class{};let ms=Ki;ms.legalize=(t,e,n,s,i)=>{let o=t.trim().replace(/[- ]/g,"_");return s&&(Qf.has(o)||Zf.has(o))&&(o=e+o),o=o.replace(n,""),o||(o=e+i),Number.isNaN(Number(o.charAt(0)))||(o=e+o),o};ms.legalizeTableName=t=>Ki.legalize(t,jf,Jf,!1,0);ms.legalizeColumnNames=t=>{const e=[];return t.forEach((n,s)=>{let i=Ki.legalizeColumnName(n,s);e.includes(i)&&(i=du+s),e.push(i)}),e};ms.legalizeColumnName=(t,e=0)=>Ki.legalize(t,du,eC,!0,e);ms.isValidTableName=t=>Ki.legalizeTableName(t)===t;ms.isValidColumnName=t=>Ki.legalizeColumnName(t)===t;function tC(t,e){return t?t.closest(`.${e}`):null}const nC={getClosestByClassName:tC};class Ge extends CustomEvent{constructor(e,n){super(e,n)}}class cu extends Error{constructor(){super(...arguments),this.isTimeout=!0}}class ye{static makeCancelable(e,n){let s=!1,i;const o=new Promise((r,l)=>{Promise.resolve(e).then(a=>{s?(n&&n(a),l(new ai)):(i=a,r(a))},a=>l(s?new ai:a))});return o.cancel=()=>{s=!0,i!=null&&n&&n(i)},o}static isCanceled(e){return e instanceof ai}static isTimedOut(e){return e instanceof cu}}class ps{constructor(){this.pending=[],this.resolved=[]}add(e,n){const s=ye.makeCancelable(e,n);return this.pending.push(s),s.then(()=>{this.resolve(s)},()=>{this.resolve(s)}),s}remove(e){for(let n=0;n<this.pending.length;n+=1)if(this.pending[n]===e){this.pending.splice(n,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){const e=[...this.pending,...this.resolved];for(let n=0;n<e.length;n+=1)e[n].cancel();this.pending=[],this.resolved=[]}}function A(t){if(t==null)throw new Error("Value is null or undefined")}class fn{static isValidRange(e){return e!=null&&e.length===2&&Number.isInteger(e[0])&&Number.isInteger(e[1])&&e[0]<=e[1]}static validateRange(e){if(!fn.isValidRange(e))throw new Error(`Invalid range! ${e}`)}static isSelected(e,n){for(let s=0;s<e.length;s+=1){const i=e[s],o=i[0],r=i[1];if(o<=n&&n<=r)return!0}return!1}static selectRange(e,n){let[s,i]=n;const o=[...e];for(let r=o.length-1;r>=0;r-=1){const l=o[r],a=l[0],d=l[1];if(a<=s&&i<=d)return o;s<=d&&a<=i&&(s=Math.min(s,a),i=Math.max(i,d),o.splice(r,1))}return o.push([s,i]),o}static deselectRange(e,n){const[s,i]=n,o=[...e];for(let r=o.length-1;r>=0;r-=1){const l=o[r],a=l[0],d=l[1];if(!(i<a||d<s))if(a<s&&i<d){o[r]=[a,s-1],o.splice(r+1,0,[i+1,d]);break}else s<=a&&d<=i?o.splice(r,1):a<s?o[r]=[a,s-1]:o[r]=[i+1,d]}return o}static count(e){return e.reduce((n,s)=>n+(s[1]-s[0]+1),0)}}class tn{static join(e,n="and"){if(e==null||e.length===0)return"";if(e.length===1)return e[0];if(e.length===2)return`${e[0]} ${n} ${e[1]}`;const s=e.slice(0,e.length-1).join(", "),i=e[e.length-1];return`${s}, ${n} ${i}`}static toLower(e,n=!0){if(e==null){if(n)return"";throw new Error("Null string passed in to TextUtils.toLower")}return e.toLowerCase()}static sort(e,n,s=!0){return e<n?s?-1:1:e>n?s?1:-1:0}}const hu=class{static formatElapsedTime(t){if(typeof t!="number"||!Number.isInteger(t))throw new Error(`${t} is not a number that can be expressed as a formatted time`);const e=Math.floor(t/3600),n=Math.floor(t%3600/60),s=t%60;return`${e>0?`${e}h `:""}${n>0||e>0?`${n}m `:""}${t>=60?`${s}s`.padStart(3,"0"):`${s}s`}`}static formatTime(t){if(typeof t!="number"||!Number.isInteger(t)||t<0)throw new Error(`${t} is not a number that can be expressed as a formatted time`);const e=String(Math.floor(t/(60*60))).padStart(2,"0"),n=t%(60*60),s=String(Math.floor(n/60)).padStart(2,"0"),i=n%60,o=String(Math.ceil(i)).padStart(2,"0");return`${e}:${s}:${o}`}static isTimeString(t){return new RegExp(hu.TIME_PATTERN).test(t)}static parseTime(t){if(t==null||typeof t!="string")throw new Error(`${t} is not a valid string`);const e=t.split(":");if(e.length!==3)throw new Error(`${t} is not a time string that can be parsed`);return Number(e[0])*60*60+Number(e[1])*60+Number(e[2])}};let In=hu;In.TIME_PATTERN="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]";In.TIME_ZONES=Object.freeze([{label:"Tokyo UTC+9 No DST",value:"Asia/Tokyo"},{label:"Seoul UTC+9 No DST",value:"Asia/Seoul"},{label:"Hong Kong UTC+8 No DST",value:"Asia/Hong_Kong"},{label:"Singapore UTC+8 No DST",value:"Asia/Singapore"},{label:"Kolkata UTC+5:30 No DST",value:"Asia/Kolkata"},{label:"Berlin UTC+1",value:"Europe/Berlin"},{label:"UTC UTC\xB10 No DST",value:"UTC"},{label:"London UTC\xB10",value:"Europe/London"},{label:"Sao Paulo UTC-2",value:"America/Sao_Paulo"},{label:"Newfoundland UTC-3:30",value:"America/St_Johns"},{label:"Halifax UTC-4",value:"America/Halifax"},{label:"New York UTC\u22125",value:"America/New_York"},{label:"Chicago UTC-6",value:"America/Chicago"},{label:"Denver UTC-7",value:"America/Denver"},{label:"Los Angeles UTC-8",value:"America/Los_Angeles"},{label:"Anchorage UTC-9",value:"America/Anchorage"},{label:"Honolulu UTC-10 No DST",value:"Pacific/Honolulu"},{label:"Zurich UTC+1",value:"Europe/Zurich"},{label:"Amsterdam UTC+1",value:"Europe/Amsterdam"},{label:"Taipei UTC+8 No DST",value:"Asia/Taipei"},{label:"Sydney UTC+10",value:"Australia/Sydney"}]);class Oi extends Error{constructor(){super(...arguments),this.isInvalid=!0}}const _n=({className:t="","data-testid":e})=>w("div",{className:W("loading-spinner fa-layers",t),"data-testid":e,children:[h(G,{icon:nf,className:"text-white-50"}),h(G,{icon:nu,className:"text-primary",spin:!0})]}),Ic=X.module("ContextMenu"),Ea=class extends S.exports.PureComponent{constructor(t){super(t),this.handleBlur=this.handleBlur.bind(this),this.handleCloseSubMenu=this.handleCloseSubMenu.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemContextMenu=this.handleMenuItemContextMenu.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleWindowResize=this.handleWindowResize.bind(this),this.container=Y.createRef(),this.oldFocus=document.activeElement,this.activeSubMenuRef=Y.createRef(),this.subMenuTimer=0,this.rAF=0,this.initialPosition={top:t.top,left:t.left},this.state={menuItems:[],pendingItems:[],activeSubMenu:null,hasOverflow:!1,subMenuTop:null,subMenuLeft:null,subMenuParentWidth:0,subMenuParentHeight:0,keyboardIndex:-1,mouseIndex:-1}}static handleContextMenu(t){t.metaKey||(t.stopPropagation(),t.preventDefault())}componentDidMount(){this.initMenu(),this.verifyPosition(),window.addEventListener("resize",this.handleWindowResize),this.rAF=window.requestAnimationFrame(()=>{var e;(e=this.container.current)==null||e.focus();const{onMenuOpened:t}=this.props;t(this)})}componentDidUpdate(t,e){var i,o;const{actions:n}=this.props,{activeSubMenu:s}=this.state;s!==e.activeSubMenu&&(s==null?(i=this.container.current)==null||i.focus():this.setActiveSubMenuPosition()),t.actions!==n&&(this.initMenu(),(this.container.current==null||!this.container.current.contains(document.activeElement))&&((o=this.container.current)==null||o.focus())),this.verifyPosition()}componentWillUnmount(){this.cancelPromises(),window.removeEventListener("resize",this.handleWindowResize),cancelAnimationFrame(this.rAF)}getKeyboardIndex(){const{options:t}=this.props;if(t.separateKeyboardMouse!==void 0&&t.separateKeyboardMouse){const{keyboardIndex:e}=this.state;return e}return this.getMouseIndex()}setKeyboardIndex(t){const{options:e}=this.props;e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse?this.setState({keyboardIndex:t}):this.setMouseIndex(t)}getMouseIndex(){const{mouseIndex:t}=this.state;return t}setMouseIndex(t){this.setState({mouseIndex:t})}initMenu(){this.cancelPromises(),cancelAnimationFrame(this.rAF);const{options:t}=this.props;let e=t.initialKeyboardIndex;e===void 0&&(e=-1);const{actions:n}=this.props,s=Ne.getMenuItems(n),i=[];for(let o=s.length-1;o>=0;o-=1){const r=s[o];r instanceof Promise?this.initMenuPromise(r):i.push(r)}this.setState({mouseIndex:-1,keyboardIndex:e,activeSubMenu:null,menuItems:Ne.sortActions(i)})}initMenuPromise(t){const e=ye.makeCancelable(t);this.setState(n=>({pendingItems:n.pendingItems.concat(e)})),e.then(n=>{this.setState(s=>{const i=s.pendingItems.indexOf(e);if(i>=0){const o=s.pendingItems.slice();return o.splice(i,1),{menuItems:Ne.sortActions(s.menuItems.concat(n)),pendingItems:o}}return null})},n=>{ye.isCanceled(n)||(this.setState(s=>{const i=s.pendingItems.indexOf(e);if(i>=0){const o=s.pendingItems.slice();return o.splice(i,1),{pendingItems:o}}return null}),Ic.error(n))})}cancelPromises(){const{pendingItems:t}=this.state;t.map(e=>e.cancel())}setActiveSubMenuPosition(){if(this.activeSubMenuRef.current===null)return;const t=this.activeSubMenuRef.current.getBoundingClientRect();this.setState({subMenuTop:t.top,subMenuLeft:t.right,subMenuParentHeight:t.height,subMenuParentWidth:t.width})}verifyPosition(){var u,m,p,g;const{options:t,updatePosition:e,subMenuParentWidth:n,subMenuParentHeight:s,top:i,left:o}=this.props;if(!this.container.current||t.doNotVerifyPosition!=null&&t.doNotVerifyPosition)return;let{top:r,left:l}=this.initialPosition;const{width:a,height:d}=(m=(u=this.container.current)==null?void 0:u.getBoundingClientRect())!=null?m:{width:0,height:0},c=((g=(p=this.container.current)==null?void 0:p.scrollHeight)!=null?g:0)>window.innerHeight;d===0||a===0||(r+d>window.innerHeight&&(r-d-s>0?r-=d-s:r=window.innerHeight-d),l+a>window.innerWidth&&(l=l-a-n),(o!==l||i!==r)&&(this.setState({hasOverflow:c}),e(r,l)))}handleWindowResize(){!this.container.current||this.closeMenu(!0)}handleBlur(t){if(!this.container.current){Ic.warn("Container is null!");return}if(!this.container.current.contains(t.relatedTarget)){let e=t.relatedTarget,n=!1;for(;e&&!n;)n=e.hasAttribute("data-dh-context-menu"),e=e.parentElement;n||this.closeMenu(!0)}}isEscapeKey(t){const{left:e}=this.props;return t==="Escape"||e<0&&t==="ArrowRight"||t==="ArrowLeft"}handleKeyDown(t){const{menuItems:e}=this.state,n=this.getKeyboardIndex();let s=n,i=!1;if(t.key==="Enter"||t.key===" "){n>=0&&n<e.length&&this.handleMenuItemClick(e[n],t);return}if(t.key==="ArrowRight"?n>=0&&n<=e.length?i=!0:s=0:this.isEscapeKey(t.key)?s=null:t.key==="ArrowUp"||t.shiftKey&&t.key==="Tab"?s=Ne.getNextMenuItem(s,-1,e):(t.key==="ArrowDown"||t.key==="Tab")&&(s=Ne.getNextMenuItem(s,1,e)),i){this.openSubMenu(n),t.preventDefault(),t.stopPropagation();return}n!==s&&(s!==null?this.setKeyboardIndex(s):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),t.preventDefault(),t.stopPropagation())}openSubMenu(t){const{menuItems:e,activeSubMenu:n}=this.state,s=e[t].actions?t:null;n!==s&&this.setState({activeSubMenu:s,subMenuTop:null,subMenuLeft:null})}closeMenu(t=!1){const{closeMenu:e,onMenuClosed:n}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{e(t),n(this)})}closeSubMenu(){this.setState({activeSubMenu:null})}handleCloseSubMenu(t){t?this.closeMenu(!0):this.closeSubMenu()}handleMenuItemClick(t,e){e.preventDefault(),e.stopPropagation();const{menuItems:n}=this.state;t!=null&&(t.disabled===void 0||!t.disabled)&&(t.actions!=null?this.openSubMenu(n.indexOf(t)):t.action!=null&&(t.action(),this.closeMenu(!0)))}handleMenuItemContextMenu(t,e){e.metaKey||this.handleMenuItemClick(t,e)}handleMenuItemMouseMove(t){const{menuItems:e}=this.state,n=e.indexOf(t);this.setMouseIndex(n),n>=0&&n<e.length&&(t.disabled===void 0||!t.disabled)&&this.openSubMenu(n)}handleMouseLeave(){this.setMouseIndex(-1)}render(){const t=[],{top:e,left:n}=this.props,{activeSubMenu:s,hasOverflow:i,keyboardIndex:o,menuItems:r,mouseIndex:l,pendingItems:a,subMenuTop:d,subMenuLeft:c,subMenuParentWidth:u,subMenuParentHeight:m}=this.state;for(let C=0;C<r.length;C+=1){const v=r[C];C>0&&v.group!==r[C-1].group&&t.push(h("hr",{},`${C}.separator`));const T=h(dl,{ref:s===C?this.activeSubMenuRef:null,isKeyboardSelected:o===C,isMouseSelected:l===C,menuItem:v,closeMenu:this.handleCloseSubMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:this.handleMenuItemContextMenu},C);t.push(T)}let p=null;a.length>0&&(p=h("div",{className:"loading",children:h(_n,{})}));const{menuStyle:g,"data-testid":f}=this.props,b=s!==null&&d!==null&&c!==null;return w(he,{children:[w("div",{className:W({"has-overflow":i},"context-menu-container"),style:{top:e,left:n,...g},ref:this.container,"data-dh-context-menu":!0,onBlur:this.handleBlur,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,onContextMenu:Ea.handleContextMenu,role:"menuitem",tabIndex:0,"data-testid":f,children:[t,p]}),b&&s!==null&&d!==null&&c!==null&&h(Ea,{actions:r[s].actions||[],closeMenu:this.handleCloseSubMenu,top:d,left:c,updatePosition:(C,v)=>{this.setState({subMenuTop:C,subMenuLeft:v})},subMenuParentWidth:u,subMenuParentHeight:m},`sub-${s}`)]})}};let uu=Ea;uu.defaultProps={subMenuParentWidth:0,subMenuParentHeight:0,closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0};class mu extends S.exports.Component{constructor(e){super(e),this.handleMenuClose=this.handleMenuClose.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.container=Y.createRef(),this.openMenu=Y.createRef(),this.state={actions:null,left:0,top:0}}componentDidMount(){var e;(e=this.container.current)!=null&&e.parentElement&&this.container.current.parentElement.addEventListener("contextmenu",this.handleContextMenu)}componentWillUnmount(){var e;(e=this.container.current)!=null&&e.parentElement&&this.container.current.parentElement.removeEventListener("contextmenu",this.handleContextMenu)}handleContextMenu(e){if(!Ne.isContextActionEvent(e)||!this.container.current||e.metaKey||e.ctrlKey)return;const n=Ne.getMenuItems(e.contextActions),s=this.container.current.getBoundingClientRect(),i=e.clientY-s.top,o=e.clientX-s.left;if(n.length===0){if(e.target===this.container.current){e.preventDefault(),this.setState({actions:null},()=>{const r=document.elementFromPoint(o,i),l=new MouseEvent("contextmenu",{clientX:e.clientX,clientY:e.clientY,bubbles:!0,cancelable:!0});r==null||r.dispatchEvent(l)});return}return}e.preventDefault(),this.setState({actions:n,top:i,left:o})}handleMenuClose(e){e===this.openMenu.current&&this.setState({actions:null})}render(){let e=null;const{"data-testid":n}=this.props,{actions:s,top:i,left:o}=this.state;return s&&(e=h(uu,{ref:this.openMenu,actions:s,onMenuClosed:this.handleMenuClose,top:i,left:o,updatePosition:(r,l)=>{this.setState({top:r,left:l})},"data-testid":n})),h("div",{className:W("context-menu-root",{active:s}),ref:this.container,children:e})}}const Ys=class extends S.exports.Component{static handleEnter(t){const e=t;e.style.height="0"}static handleEntering(t){const e=t;e.style.height=`${Ys.getHeight(e)}px`}static handleExiting(t){const e=t;e.style.height="0"}static handleExit(t){const e=t;e.style.height=`${Ys.getHeight(e)}px`}static getHeight(t){const e=t.scrollWidth-t.clientWidth;return t.scrollHeight-e}constructor(t){super(t),this.handleEntered=this.handleEntered.bind(this)}handleEntered(t){const e=t;e.style.height="";const{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){const s=e.querySelector("input, select, textarea");s!=null&&s.focus()}}render(){const{children:t,className:e,in:n,"data-testid":s}=this.props;return h(ht,{in:n,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:Ys.handleEnter,onEntering:Ys.handleEntering,onEntered:this.handleEntered,onExit:Ys.handleExit,onExiting:Ys.handleExiting,timeout:350,children:i=>h("div",{className:W({collapse:i==="exited"},e),"data-testid":s,children:t})})}};let cd=Ys;cd.propTypes={className:R.exports.string,in:R.exports.bool.isRequired,children:R.exports.node.isRequired,autoFocusOnShow:R.exports.bool,"data-testid":R.exports.string};cd.defaultProps={className:"",autoFocusOnShow:!1,"data-testid":void 0};function hl(t){const e=S.exports.useRef();return S.exports.useEffect(function(){e.current=t}),e.current}function pu(t){const e=S.exports.useRef(null);return S.exports.useEffect(function(){!t||(typeof t=="function"?t(e.current):t.current=e.current)}),e}const Pt=Y.forwardRef((t,e)=>{const{checked:n=!1,children:s,className:i,disabled:o,inputClassName:r,isInvalid:l,labelClassName:a,name:d,onChange:c,"data-testid":u}=t,[m]=S.exports.useState(ze()),p=pu(e);S.exports.useEffect(function(){p.current&&(p.current.indeterminate=n===null)},[p,n]);const g=S.exports.useCallback(f=>{p.current&&(p.current.indeterminate=n===null),c&&c(f)},[p,n,c]);return w("div",{className:W("custom-control custom-checkbox",i),children:[h("input",{type:"checkbox",ref:p,checked:n!=null?n:!1,className:W("custom-control-input",r,{"is-invalid":l}),disabled:o,id:m,name:d,onChange:g,"data-testid":u}),h("label",{className:W("custom-control-label",a),htmlFor:m,children:s})]})});Pt.displayName="Checkbox";Pt.propTypes={checked:(t,e)=>{const{[e]:n}=t;return n!==null&&typeof n!="boolean"?new Error("Checked must be a boolean or null for indeterminate"):null},children:R.exports.node.isRequired,className:R.exports.string,disabled:R.exports.bool,inputClassName:R.exports.string,isInvalid:R.exports.bool,labelClassName:R.exports.string,name:R.exports.string,onChange:R.exports.func,"data-testid":R.exports.string};Pt.defaultProps={checked:!1,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};class gs extends S.exports.PureComponent{constructor(e){super(e),this.inputField=Y.createRef()}focus(){var e;(e=this.inputField.current)==null||e.focus()}render(){const{value:e,placeholder:n,onBlur:s,onChange:i,className:o,disabled:r,matchCount:l,id:a,onKeyDown:d,"data-testid":c}=this.props;return w("div",{className:W("search-group",o),children:[h("input",{type:"search",value:e,onBlur:s,onChange:i,onKeyDown:d,className:"form-control",disabled:r,placeholder:n,ref:this.inputField,id:a,"data-testid":c}),l!=null&&h("span",{className:"search-match",children:l}),h("span",{className:"search-icon",children:h(G,{icon:ou})})]})}}gs.defaultProps={placeholder:"Search",className:"",matchCount:null,onKeyDown(){},id:"","data-testid":void 0};var gu=(t=>(t.UP="UP",t.DOWN="DOWN",t))(gu||{});const bo=class extends S.exports.Component{constructor(t){super(t),this.getCachedFilteredOptions=Ee((e,n)=>e.filter(s=>s.title.toLowerCase().indexOf(n.toLowerCase())>=0||s.value.toLowerCase().indexOf(n.toLowerCase())>=0)),this.state={value:"",filter:"",filteredOptions:t.options,keyboardOptionIndex:-1,menuIsOpen:!1,inputWidth:100},this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handleFilterChange=this.handleFilterChange.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=Y.createRef(),this.cbContainer=Y.createRef(),this.toggleButton=Y.createRef(),this.menuContainer=Y.createRef(),this.input=Y.createRef(),this.searchInput=Y.createRef()}componentDidUpdate(){const{menuIsOpen:t,keyboardOptionIndex:e}=this.state;t&&e>=0&&this.scrollOptionIntoView()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}focus(){var t;(t=this.input.current)==null||t.focus()}resetValue(){this.setState({value:""})}updateInputValue(t){const{onChange:e}=this.props;this.setState({value:t}),e(t)}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var r,l;const{filter:e,filteredOptions:n,keyboardOptionIndex:s}=this.state,{options:i}=this.props,o=e?n:i;switch(t.key){case"Enter":((r=o[s])==null?void 0:r.value)!=null&&this.updateInputValue(o[s].value),this.closeMenu(),(l=this.input.current)==null||l.focus(),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(bo.MENU_NAVIGATION_DIRECTION.UP),t.stopPropagation(),t.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(bo.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"Escape":e!==""?(this.setState({filter:""}),t.stopPropagation()):this.closeMenu();break;case"Tab":!t.shiftKey&&s===o.length-1&&this.closeMenu();break}}handleMenuNavigation(t){const{filter:e,filteredOptions:n,keyboardOptionIndex:s}=this.state,{options:i}=this.props,r=(e?n:i).length;let l=0;switch(t){case bo.MENU_NAVIGATION_DIRECTION.UP:l=-1;break;case bo.MENU_NAVIGATION_DIRECTION.DOWN:l=1;break}l!==0&&this.setState({keyboardOptionIndex:(s+l+r)%r})}handleInputKeyDown(t){const{onEnter:e}=this.props,{menuIsOpen:n}=this.state;t.key==="ArrowDown"||t.key==="ArrowUp"?n||this.openMenu():t.key==="Enter"&&e()}handleInputChange(t){this.updateInputValue(t.target.value)}handleOptionClick(t){var r;const e=Number(t.currentTarget.value),{filter:n,filteredOptions:s}=this.state,{options:i}=this.props,o=n?s:i;this.updateInputValue(o[e].value),this.closeMenu(),(r=this.input.current)==null||r.focus()}handleOptionFocus(t){this.setState({keyboardOptionIndex:Number(t.target.value)})}handleFilterChange(t){var i;const{options:e}=this.props,n=t.target.value,s=this.getCachedFilteredOptions(e,n);this.setState({filter:n,filteredOptions:s,keyboardOptionIndex:0}),(i=this.popper.current)==null||i.scheduleUpdate()}handleMenuBlur(t){t.relatedTarget instanceof Element&&this.popper.current!=null&&this.popper.current.element.contains(t.relatedTarget)||t.relatedTarget===this.toggleButton.current||this.closeMenu(!1)}handleInputBlur(t){const{menuIsOpen:e}=this.state;e&&t.relatedTarget instanceof Element&&this.popper.current!=null&&this.popper.current.element.contains(t.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var t;this.scrollOptionIntoView(),(t=this.searchInput.current)==null||t.focus()}handleMenuExited(){var e;const{menuIsOpen:t}=this.state;t&&(this.setState({menuIsOpen:!1}),(e=this.popper.current)==null||e.hide()),this.setState({filter:""})}toggleMenu(t){const{menuIsOpen:e}=this.state;e?this.closeMenu():this.openMenu(),t.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var t;(t=this.popper.current)==null||t.show()})}closeMenu(t=!0){var e,n;this.setState({menuIsOpen:!1}),t&&((e=this.input.current)==null||e.focus()),(n=this.popper.current)==null||n.hide()}updateKeyboardIndex(){const{value:t,filter:e,filteredOptions:n}=this.state,{options:s}=this.props,o=(e?n:s).findIndex(r=>r.value===t);this.setState({keyboardOptionIndex:o})}scrollOptionIntoView(){var e;const t=(e=this.menuContainer.current)==null?void 0:e.querySelector(".cb-option-btn.keyboard-active");t instanceof HTMLElement&&t.scrollIntoView({block:"nearest",inline:"nearest"})}renderMenuElement(){const{searchPlaceholder:t}=this.props,{filter:e,inputWidth:n}=this.state;return w("div",{className:"cb-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:s=>{s.stopPropagation()},style:{width:n},onBlur:this.handleMenuBlur,children:[h("div",{className:"cb-search-input-container",children:h(gs,{value:e,ref:this.searchInput,onChange:this.handleFilterChange,className:"cb-search-input",placeholder:t})}),h("div",{className:"cb-options-container",children:h("div",{className:"cb-options",children:this.renderOptions()})})]})}renderOptions(){const{options:t}=this.props,{keyboardOptionIndex:e,filter:n,filteredOptions:s}=this.state;return(n?s:t).map((o,r)=>{const l=`option-${r}-${o.value}`;return h("button",{type:"button",value:r,className:W("cb-option-btn",{"keyboard-active":e===r}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:o.title},l)})}render(){const{options:t,inputPlaceholder:e,disabled:n,className:s,defaultValue:i,spellCheck:o,"data-testid":r}=this.props,{value:l}=this.state;let{popperOptions:a}=this.props;return a={placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}},...a},w("div",{className:"input-group cb-container",ref:this.cbContainer,children:[h("input",{value:l||i,className:W("form-control",s,"cb-input"),ref:this.input,onChange:this.handleInputChange,placeholder:e||(t[0]!=null?t[0].title:void 0),disabled:n,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":r!==void 0?`${r}-input`:void 0}),h("div",{className:"input-group-append cb-dropdown",children:w("button",{type:"button",className:"btn cb-btn form-control",ref:this.toggleButton,onClick:this.toggleMenu,onKeyDown:this.handleInputKeyDown,disabled:n,"data-testid":r!==void 0?`${r}-btn`:void 0,children:[h(G,{icon:as}),h(Fn,{ref:this.popper,options:a,className:W("combobox interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})})]})}};let qi=bo;qi.MENU_NAVIGATION_DIRECTION=gu;qi.DROP_DOWN_MENU_HEIGHT=200;qi.propTypes={options:R.exports.arrayOf(R.exports.shape({title:R.exports.string.isRequired,value:R.exports.string.isRequired})).isRequired,popperOptions:R.exports.shape({title:R.exports.string.isRequired,value:R.exports.string.isRequired}),onChange:R.exports.func,inputPlaceholder:R.exports.string,searchPlaceholder:R.exports.string,disabled:R.exports.bool,className:R.exports.string,defaultValue:R.exports.string,spellCheck:R.exports.bool,onEnter:R.exports.func,"data-testid":R.exports.string};qi.defaultProps={onChange(){},inputPlaceholder:"",searchPlaceholder:"Search",disabled:!1,className:"",defaultValue:"",popperOptions:null,spellCheck:!0,onEnter(){},"data-testid":void 0};const Tn=X.module("MaskedInput"),vi={FORWARD:"forward",BACKWARD:"backward",NONE:"none"},hr="\u2007";function hd(t,e,n){return t.substring(0,e)+n+t.substring(e+1)}function sC(t,e,n){return t.length<n?`${t}${e.substring(t.length,n)}`:t}function Rc(t,e){let{length:n}=t;for(let s=t.length-1;s>=0&&e[s]===t[s];s-=1)n=s;return t.substring(0,n)}const ul=Y.forwardRef((t,e)=>{const{className:n,example:s,getNextSegmentValue:i=(k,H,O)=>O,getPreferredReplacementString:o=hd,onChange:r=()=>!1,onSelect:l=()=>!1,pattern:a,placeholder:d,selection:c,value:u,onFocus:m=()=>!1,onBlur:p=()=>!1,"data-testid":g}=t,f=pu(e),b=S.exports.useMemo(()=>Array.isArray(s)?s:[s],[s]),C=S.exports.useMemo(()=>b[0].replace(/[a-zA-Z0-9]/g,hr),[b]);S.exports.useEffect(function(){var H;if(c!=null){Tn.debug("setting selection...",c);const{selectionStart:O,selectionEnd:F,selectionDirection:_}=c;(H=f.current)==null||H.setSelectionRange(O,F,_),Tn.debug("selection set!")}},[c,f]);const v=S.exports.useCallback(k=>{let H=k,O=k;const F=b.length>0?b[0]:u;for(let L=H-1;L>=0&&/[a-zA-Z0-9]/g.test(F.charAt(L));L-=1)H=L;for(let L=O;L<F.length&&/[a-zA-Z0-9]/g.test(F.charAt(L));L+=1)O=L+1;const _=H===O?vi.NONE:vi.BACKWARD;return{selectionStart:H,selectionEnd:O,selectionDirection:_}},[b,u]);function T(k,H,O=k.length){let F="";for(let _=0;_<O;_+=1)k.charAt(_)!==hr?F=F.concat(k[_]):F=F.concat(H[_]);return F=F.concat(H.substring(O)),F}function E(k,H=k.length){const O=new RegExp(`^${a}$`);if(O.test(k))return!0;for(let F=0;F<b.length;F+=1){const _=T(k,b[F],H);if(O.test(_))return!0}return!1}function y(k){const H=v(k),O=H.selectionEnd+1;return O>=u.length?H:v(O)}function I(k){const H=v(k),O=H.selectionStart-1;return O<=0?H:v(O)}function D(k,H){const O=v(k),F=u.substring(O.selectionStart,O.selectionEnd),_=i(O,H,F,u),L=u.substring(0,O.selectionStart)+_+u.substring(O.selectionEnd);E(L,O.selectionEnd)&&(r(L),l(O))}const N=S.exports.useCallback(k=>{const{selectionStart:H=0,selectionEnd:O=0,selectionDirection:F="none"}=k.target;if(H===null||O===null||F===null){Tn.error("Selection attempted on non-text input element",k.target);return}if(Tn.debug2("handleSelect",H,O,F),!(c!=null&&H===c.selectionStart&&O===c.selectionEnd)){if(c!=null&&H===u.length&&O===u.length&&k.nativeEvent.type!=="mouseup"){l({...c});return}if(H===O){const _=v(H);Tn.debug("Selection segment from ",H,O,"=>",_),l(_)}else l({selectionStart:H,selectionEnd:O,selectionDirection:F})}},[v,l,c,u]),x=S.exports.useCallback(k=>{var O;if(!f.current)return;Tn.debug("handleSelectCapture",k);const H=(O=f.current.selectionStart)!=null?O:0;H===u.length&&c!=null&&H!==c.selectionStart&&(k.preventDefault(),k.stopPropagation())},[f,c,u]);function U(k){if(k.preventDefault(),k.stopPropagation(),!f.current)return;const{key:H}=k,{selectionStart:O=0,selectionEnd:F=0}=f.current;if(O===null||F===null){Tn.error("Selection arrow nvaigation attempted on non-text input element",k.target);return}H==="ArrowLeft"?l(I(O)):H==="ArrowRight"?l(y(F)):H==="ArrowUp"?D(O,-1):H==="ArrowDown"&&D(O,1)}function $(k){if(!f.current)return;Tn.debug("handleKeyDown",k);const{key:H}=k,{selectionStart:O=0,selectionEnd:F=0}=f.current;if(O===null||F===null){Tn.error("Selection key event on non-text input element",k.target);return}if(H.startsWith("Arrow")){U(k);return}if(H==="Delete"||H==="Backspace"){if(k.preventDefault(),k.stopPropagation(),F>=Rc(u,C).length){const L=u.substring(0,O===F?O-1:O),V=Rc(L,C);V!==u&&(r(V),l({selectionStart:V.length,selectionEnd:V.length,selectionDirection:vi.NONE}));return}if(O!==F){const L=u.substring(0,O)+u.substring(O,F).replace(/[a-zA-Z0-9]/g,hr)+u.substring(F);Tn.debug("Range ",O,F,"deleted, setting value",L),r(L),l({selectionStart:O,selectionEnd:O,selectionDirection:vi.NONE})}else if(O>0)for(let L=O-1;L>=0;L-=1){const V=u.substring(0,L)+u.substring(L,O).replace(/[a-zA-Z0-9]/g,hr)+u.substring(O);if(V!==u){r(V),l({selectionStart:L,selectionEnd:L,selectionDirection:vi.NONE});return}}return}if(k.altKey||k.metaKey||k.ctrlKey||H.length>1)return;k.preventDefault(),k.stopPropagation();const _=Array.from(new Set([H,H.toUpperCase(),H.toLowerCase()]));for(let L=0;L<_.length;L+=1){const V=_[L],z=/[a-zA-Z0-9]/g.test(V)?b[0].length-1:O;for(let j=O;j<=z;j+=1){const J=sC(u,b[0],j+1),Te=o(J,j,V,O,F);if(E(Te,j+1)){const le=v(j),we=j+1;let Oe={selectionStart:we,selectionEnd:we,selectionDirection:vi.NONE};if(we>=le.selectionEnd){const Z=y(j);Z.selectionStart!==le.selectionStart&&(Oe=Z)}Tn.debug("handleKeyDown",H,"=>",Te,Oe),r(Te),l(Oe);return}}}}return h("input",{ref:f,className:W("form-control masked-input",n),type:"text",pattern:a,placeholder:d,value:u,onChange:()=>{},onKeyDown:$,onSelect:N,onSelectCapture:x,onFocus:m,onBlur:p,"data-testid":g})});ul.defaultProps={className:"",placeholder:void 0,onChange(){},onSelect(){},getNextSegmentValue:(t,e,n)=>n,getPreferredReplacementString:hd,selection:void 0,onFocus(){},onBlur(){},"data-testid":void 0};const iC=X.module("TimeInput"),oC="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",rC=["00:00:00","12:34:56","23:59:59"],fu=Y.forwardRef((t,e)=>{const{allowValueWrapping:n=!0,className:s="",onChange:i=()=>!1,value:o=0,onFocus:r=()=>!1,onBlur:l=()=>!1,onSelect:a=()=>!1,"data-testid":d}=t,[c,u]=S.exports.useState(In.formatTime(o)),[m,p]=S.exports.useState(),g=S.exports.useRef(null);S.exports.useImperativeHandle(e,()=>({focus:()=>{var T;(T=g.current)==null||T.focus()},setSelection:T=>{var E;(E=g.current)==null||E.focus(),p(T)}}),[]),S.exports.useEffect(function(){u(In.formatTime(o))},[o]);function f(T,E,y){const I=T.selectionStart===0?24:60;let D=parseInt(y,10)-E;return Number.isNaN(D)?D=0:n?D=(D%I+I)%I:D=Math.min(Math.max(0,D),I-1),`${D}`.padStart(2,"0")}function b(T,E,y,I,D){return I===0&&D===2&&E===1&&parseInt(y,10)>1?`0${y}${T.substring(2)}`:hd(T,E,y)}function C(T){iC.debug("handleChange",T),u(T),In.isTimeString(T)&&i(In.parseTime(T))}const v=S.exports.useCallback(T=>{p(T),a(T)},[a]);return h(ul,{ref:g,className:s,example:rC,getNextSegmentValue:f,getPreferredReplacementString:b,onChange:C,onSelect:v,pattern:oC,selection:m,value:c,onFocus:r,onBlur:l,"data-testid":d})});fu.defaultProps={allowValueWrapping:!0,className:"",onChange:()=>!1,onSelect:()=>!1,value:0,onFocus:()=>!1,onBlur:()=>!1,"data-testid":void 0};class Cu extends S.exports.PureComponent{constructor(e){var i;super(e),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMenuItemClick=this.handleMenuItemClick.bind(this),this.handleMenuItemMouseMove=this.handleMenuItemMouseMove.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.container=Y.createRef(),this.oldFocus=document.activeElement,this.rAF=0;const{options:n}=e,s=(i=n.initialKeyboardIndex)!=null?i:-1;this.state={menuItems:[],keyboardIndex:s,mouseIndex:-1}}componentDidMount(){this.initMenu(),this.rAF=window.requestAnimationFrame(()=>{var n;(n=this.container.current)==null||n.focus();const{onMenuOpened:e}=this.props;e(this)})}componentDidUpdate(e){const{actions:n}=this.props;e.actions!==n&&this.initMenu()}componentWillUnmount(){cancelAnimationFrame(this.rAF)}getKeyboardIndex(){const{options:e}=this.props;if(e.separateKeyboardMouse!==void 0&&e.separateKeyboardMouse){const{keyboardIndex:n}=this.state;return n}return this.getMouseIndex()}setKeyboardIndex(e){const{options:n}=this.props;n.separateKeyboardMouse!==void 0&&n.separateKeyboardMouse?this.setState({keyboardIndex:e}):this.setMouseIndex(e)}getMouseIndex(){const{mouseIndex:e}=this.state;return e}setMouseIndex(e){this.setState({mouseIndex:e})}initMenu(){cancelAnimationFrame(this.rAF),this.setState({menuItems:[]});const{actions:e}=this.props,n=Ne.getMenuItems(e,!1);n.length>0&&this.setState(s=>({menuItems:Ne.sortActions(s.menuItems.concat(n))}))}handleKeyDown(e){const{menuItems:n}=this.state,s=this.getKeyboardIndex();let i=s;if(e.key==="Enter"||e.key===" "){s!=null&&s>=0&&s<n.length&&this.handleMenuItemClick(n[s],e);return}e.key==="Escape"?i=null:e.key==="ArrowUp"||e.key==="Tab"&&e.shiftKey===!0?i=Ne.getNextMenuItem(i!=null?i:0,-1,n):(e.key==="ArrowDown"||e.key==="Tab"&&e.shiftKey===!1)&&(i=Ne.getNextMenuItem(i!=null?i:0,1,n)),s!==i&&(i!==null?this.setKeyboardIndex(i):(this.closeMenu(),this.oldFocus instanceof HTMLElement&&this.oldFocus.focus()),e.preventDefault(),e.stopPropagation())}closeMenu(e=!1){const{closeMenu:n,onMenuClosed:s}=this.props;cancelAnimationFrame(this.rAF),this.rAF=window.requestAnimationFrame(()=>{n(e),s(this)})}handleCloseMenu(){this.closeMenu()}handleMenuItemClick(e,n){n.preventDefault(),n.stopPropagation(),e!=null&&(e.disabled===void 0||!e.disabled)&&e.action!=null&&(e.action(),this.closeMenu(!0))}handleMenuItemMouseMove(e){const{menuItems:n}=this.state,s=n.indexOf(e);this.setMouseIndex(s)}handleMouseLeave(){this.setMouseIndex(-1)}render(){const e=[],{"data-testid":n}=this.props,{keyboardIndex:s,menuItems:i,mouseIndex:o}=this.state;for(let l=0;l<i.length;l+=1){const a=i[l];l>0&&a.group!==i[l-1].group&&e.push(h("hr",{},`${l}.separator`));const d=h(dl,{isKeyboardSelected:s===l,isMouseSelected:o===l,menuItem:a,closeMenu:this.handleCloseMenu,onMenuItemClick:this.handleMenuItemClick,onMenuItemMouseMove:this.handleMenuItemMouseMove,onMenuItemContextMenu:()=>!1},l);e.push(d)}const{menuStyle:r}=this.props;return h("div",{className:"context-menu-container",style:{...r},ref:this.container,onKeyDown:this.handleKeyDown,onMouseLeave:this.handleMouseLeave,role:"menuitem",tabIndex:0,"data-testid":n,children:e})}}Cu.defaultProps={closeMenu(){},onMenuOpened(){},onMenuClosed(){},options:{},menuStyle:{},"data-testid":void 0};class Wn extends S.exports.PureComponent{constructor(e){super(e),this.handleClick=this.handleClick.bind(this),this.handleCloseMenu=this.handleCloseMenu.bind(this),this.handleExited=this.handleExited.bind(this),this.container=Y.createRef(),this.parent=null,this.popper=Y.createRef(),this.isOpen=!1}componentDidMount(){var n;const{isShown:e}=this.props;e===null?(n=this.container.current)!=null&&n.parentElement&&(this.parent=this.container.current.parentElement,this.parent.addEventListener("click",this.handleClick)):e&&this.openMenu()}componentDidUpdate(e){const{isShown:n}=this.props;e.isShown!==n&&(n!==null&&n?window.requestAnimationFrame(()=>{this.openMenu()}):this.closeMenu())}componentWillUnmount(){this.parent&&this.parent.removeEventListener("click",this.handleClick)}closeMenu(){var e;(e=this.popper.current)==null||e.hide()}openMenu(){this.popper.current&&!this.isOpen&&(this.popper.current.show(),this.isOpen=!0)}scheduleUpdate(){var e;(e=this.popper.current)==null||e.scheduleUpdate()}handleClick(e){e.preventDefault(),e.stopPropagation(),this.openMenu()}handleCloseMenu(){this.closeMenu()}handleExited(){this.isOpen=!1;const{onMenuClosed:e}=this.props;e()}render(){const{actions:e,onMenuOpened:n,popperClassName:s,"data-testid":i}=this.props,{menuStyle:o}=this.props;let{options:r,popperOptions:l}=this.props;return l={placement:"bottom",...l},r={separateKeyboardMouse:!0,...r},h("div",{className:"menu-actions-listener",ref:this.container,"data-testid":i,children:h(Fn,{ref:this.popper,options:l,className:W("menu-popper",s),onExited:this.handleExited,closeOnBlur:!0,interactive:!0,children:h(Cu,{actions:e,closeMenu:this.handleCloseMenu,onMenuOpened:n,options:r,menuStyle:o})})})}}Wn.defaultProps={isShown:null,onMenuClosed(){},onMenuOpened(){},options:{},popperOptions:{},popperClassName:"",menuStyle:{},"data-testid":void 0};const Dc=-1;var bu=(t=>(t.UP="UP",t.DOWN="DOWN",t))(bu||{});const ns=class extends S.exports.Component{constructor(t){super(t);const{value:e,valueToTime:n}=t;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=Y.createRef(),this.menuContainer=Y.createRef(),this.button=Y.createRef(),this.input=Y.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:n(e),inputFocused:!1}}getSelectedText(){const{options:t,value:e,placeholder:n}=this.props,{customTime:s}=this.state;if(e===null)return n;for(let i=0;i<t.length;i+=1){const o=t[i];if(o.value===e)return o.title}return In.formatTime(s)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var t;(t=this.button.current)==null||t.focus()}updateInputValue(t){const{onChange:e}=this.props;e(t)}handleResize(){this.setInputWidth()}handleMenuKeyDown(t){var i;const{keyboardOptionIndex:e,inputFocused:n}=this.state,{options:s}=this.props;switch(t.key){case"Enter":case" ":n?this.updateFromCustom():this.updateInputValue(s[e].value),this.closeMenu(),(i=this.button.current)==null||i.focus(),t.stopPropagation(),t.preventDefault();break;case"Tab":t.shiftKey?this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.UP),t.stopPropagation(),t.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(ns.MENU_NAVIGATION_DIRECTION.DOWN),t.stopPropagation(),t.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(t){const{keyboardOptionIndex:e,inputFocused:n}=this.state,{options:s}=this.props,i=s.length;let o=e;switch(t){case ns.MENU_NAVIGATION_DIRECTION.UP:if(!n&&e===0){this.focusInput();break}else n&&this.focusOption(e);e>0&&!n?(o=(o-1)%i,this.setState({keyboardOptionIndex:o})):e===0&&(o=i-1,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break;case ns.MENU_NAVIGATION_DIRECTION.DOWN:if(!n&&e===i-1){this.focusInput();break}else n&&this.focusOption(e);e<i&&!(n&&e===0)&&(o=(o+1)%i,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break}}handleOptionClick(t){const e=Number(t.currentTarget.value),{options:n,timeToValue:s}=this.props,{customTime:i}=this.state;if(e===Dc){const o=s(i);this.updateAndClose(o)}else this.updateAndClose(n[e].value)}updateAndClose(t){var e;this.updateInputValue(t),this.closeMenu(),(e=this.button.current)==null||e.focus()}handleOptionFocus(t){this.setState({keyboardOptionIndex:Number(t.target.value)})}handleMenuOpened(){var o;const{options:t,value:e}=this.props,{keyboardOptionIndex:n}=this.state;this.scrollOptionIntoView(n);const s=(o=this.menuContainer.current)==null?void 0:o.querySelector(".cs-option-btn.keyboard-active");if(s instanceof HTMLElement&&s.focus(),e===null)return;t.map(r=>r.value).indexOf(e)<0&&this.focusInput()}focusInput(){var t;(t=this.input.current)==null||t.focus()}focusOption(t){var n;const e=(n=this.menuContainer.current)==null?void 0:n.querySelector(".cs-options");if(e&&e.children!=null){const s=e.children.item(t);s instanceof HTMLElement&&s.focus()}}handleMenuExited(){const{menuIsOpen:t}=this.state;t&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(t){const{timeToValue:e}=this.props,n=e(t);this.updateInputValue(n),this.setState({customTime:t})}updateFromCustom(){const{timeToValue:t}=this.props,{customTime:e}=this.state,n=t(e);this.updateInputValue(n)}toggleMenu(t){const{menuIsOpen:e}=this.state;e?this.closeMenu():this.openMenu(),t.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(t=!0){var e;this.setState({menuIsOpen:!1}),t&&((e=this.button.current)==null||e.focus())}updateKeyboardIndex(){const{options:t,value:e}=this.props;if(e===null)return;const n=t.map(s=>s.value).indexOf(e);n>0&&this.setState({keyboardOptionIndex:n})}scrollOptionIntoView(t){var n;const e=(n=this.menuContainer.current)==null?void 0:n.querySelector(".cs-options");if(e&&e.children!=null){const s=e.children.item(t);s instanceof HTMLElement&&s.offsetTop>ns.DROP_DOWN_MENU_HEIGHT?e.scrollTop=s.offsetTop-ns.DROP_DOWN_MENU_HEIGHT:(s instanceof HTMLElement&&s.offsetTop<0||t===0)&&(e.scrollTop=0)}}renderMenuElement(){const{inputWidth:t}=this.state;return h("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:e=>{e.stopPropagation()},style:{width:t},children:h("div",{className:"cs-options-container",children:h("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){const{options:t,value:e,icon:n,customText:s}=this.props,{keyboardOptionIndex:i,customTime:o,inputFocused:r}=this.state;let l=!1;const a=[];for(let d=0;d<t.length;d+=1){const c=t[d],u=`option-${d}-${c.value}`;l=l||c.value===e,a.push(w("button",{type:"button",value:d,className:W("cs-option-btn",{"keyboard-active":i===d&&!r}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[c.value===e&&h(G,{icon:n,className:"mr-2"}),c.value!==e&&h("span",{className:"mr-4"}),c.title]},u))}return a.push(h("hr",{className:"cs-divider"},"option-divider")),a.push(w("button",{type:"button",value:Dc,className:W("cs-option-btn",{"keyboard-active":r}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!l&&e!==null?h(G,{icon:n,className:"mr-2"}):h("span",{className:"mr-4"}),s]},"option-custom-label")),a.push(w("div",{className:"cs-custom-container",children:[h("span",{className:"mr-2"}),h(fu,{ref:this.input,onChange:this.handleCustomInput,value:o,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),h("span",{className:"ml-2"})]},"cs-custom-container")),a.push(h("hr",{className:"mb-2"},"option-end")),a}render(){const{disabled:t,invalid:e,value:n,"data-testid":s}=this.props,{menuIsOpen:i}=this.state;let{popperOptions:o}=this.props;return o={placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}},...o},h("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":s,children:h("div",{className:W("input-group-append cs-dropdown",{"cs-dropdown-invalid":e}),children:w("button",{type:"button",className:W("btn cs-btn form-control",{"cs-btn-invalid":e}),ref:this.button,onClick:this.toggleMenu,disabled:t,children:[h("span",{className:W({"text-muted":n===null}),children:this.getSelectedText()}),h("span",{children:h(G,{icon:ad,className:"cs-caret"})}),h(Wn,{isShown:i,actions:{menuElement:this.renderMenuElement()},popperOptions:o,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}};let ud=ns;ud.MENU_NAVIGATION_DIRECTION=bu;ud.DROP_DOWN_MENU_HEIGHT=125;ud.defaultProps={onChange(){},value:null,disabled:!1,popperOptions:{},icon:li,customText:"Custom",placeholder:"Select a time",valueToTime:t=>t===null?0:Math.round(t/1e3),timeToValue:t=>t*1e3,invalid:!1,"data-testid":void 0};function Ti(t,e,n,s,i){const o=s-n+1;return`${((parseInt(e,10)-t-n)%o+o)%o+n}`.padStart(i,"0")}function Su(t,e,n){const{selectionStart:s}=t;return s===0?Ti(e,n,1900,2099,4):s===5?Ti(e,n,1,12,2):s===8?Ti(e,n,1,31,2):s===11?Ti(e,n,0,23,2):s===17||s===14?Ti(e,n,0,59,2):s===20||s===24||s===28?Ti(e,n,0,999,3):n}const lC=X.module("DateTimeInput"),aC="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",dC="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}\u200B[0-9]{3}\u200B[0-9]{3}",cC=`${aC} ${dC}`,hC="2022-01-01 00:00:00.000000000",uC="YYYY-MM-DD HH:MM:SS.SSSSSSSSS";function wu(t){const e=t.substring(0,23),n=t.substring(23,26),s=t.substring(26);return[e,n,s].filter(i=>i!=="").join("\u200B")}const mC=t=>t.replace(/\u200B/g,""),pC=[wu(hC)],vu=Y.forwardRef((t,e)=>{const{className:n="",onChange:s=()=>{},defaultValue:i="",onFocus:o=()=>{},onBlur:r=()=>{},"data-testid":l}=t,[a,d]=S.exports.useState(i.length>0?wu(i):""),[c,u]=S.exports.useState(),m=S.exports.useCallback(p=>{lC.debug("handleChange",p),d(p),s(mC(p))},[s]);return h("div",{className:"d-flex flex-row align-items-center",children:h(ul,{ref:e,className:W(n),example:pC,getNextSegmentValue:Su,onChange:m,onSelect:u,pattern:cC,placeholder:uC,selection:c,value:a,onFocus:o,onBlur:r,"data-testid":l})})});vu.displayName="DateTimeInput";vu.defaultProps={className:"",onChange:()=>{},defaultValue:"",onFocus:()=>{},onBlur:()=>{},"data-testid":void 0};const gC=X.module("DateInput"),fC="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",CC=["2000-01-01","2022-12-31"],bC="YYYY-MM-DD",Tu=Y.forwardRef((t,e)=>{const{className:n="",onChange:s=()=>{},defaultValue:i="",onFocus:o=()=>{},onBlur:r=()=>{},"data-testid":l}=t,[a,d]=S.exports.useState(i),[c,u]=S.exports.useState(),m=S.exports.useCallback(p=>{gC.debug("handleChange",p),d(p),s(p)},[s]);return h("div",{className:"d-flex flex-row align-items-center",children:h(ul,{ref:e,className:W(n),example:CC,getNextSegmentValue:Su,onChange:m,onSelect:u,pattern:fC,placeholder:bC,selection:c,value:a,onFocus:o,onBlur:r,"data-testid":l})})});Tu.displayName="DateInput";Tu.defaultProps={className:"",onChange:()=>!1,defaultValue:"",onFocus:()=>!1,onBlur:()=>!1,"data-testid":void 0};class Eu extends S.exports.PureComponent{constructor(e){super(e),this.searchInput=Y.createRef(),this.handleChange=this.handleChange.bind(this),this.sendUpdate=Xe(this.sendUpdate.bind(this),e.debounceMs),this.state={value:e.value}}componentDidUpdate(e){const{value:n}=this.props;e.value!==n&&this.setState({value:n})}focus(){var e;(e=this.searchInput.current)==null||e.focus()}handleChange(e){this.setState({value:e.target.value},this.sendUpdate)}sendUpdate(){const{onChange:e}=this.props,{value:n}=this.state;e(n)}render(){const{placeholder:e,className:n,matchCount:s,id:i,"data-testid":o}=this.props,{value:r}=this.state;return h(gs,{value:r,placeholder:e,onChange:this.handleChange,className:n,matchCount:s,ref:this.searchInput,id:i,"data-testid":o})}}Eu.defaultProps={placeholder:"Search",className:"",matchCount:null,debounceMs:250,id:"","data-testid":void 0};const SC=({className:t="",show:e=!0,"data-testid":n})=>w("div",{className:W("dh-loader",t,{show:e}),"data-testid":n,children:[h("svg",{className:"dh-outer-shape",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("path",{d:"M82.7429,0L82.7429,41.3714L45.2571,41.3714L45.2571,0L0,0L0,128L45.2571,128L45.2571,86.6286L82.5143,86.6286L82.5143,128L128,128L128,0L82.7429,0ZM41.3714,124.114L4.11429,124.114L4.11429,86.6286L41.3714,86.6286L41.3714,124.114ZM41.3714,82.7429L4.11429,82.7429L4.11429,45.2571L41.3714,45.2571L41.3714,82.7429ZM41.3714,41.3714L4.11429,41.3714L4.11429,4.11429L41.3714,4.11429L41.3714,41.3714ZM45.2571,82.7429L45.2571,45.2571L82.5143,45.2571L82.5143,82.5143L45.2571,82.5143ZM124.114,124.114L86.6286,124.114L86.6286,86.6286L123.886,86.6286L123.886,124.114ZM124.114,82.7429L86.6286,82.7429L86.6286,45.2571L123.886,45.2571L123.886,82.7429ZM86.6286,41.3714L86.6286,4.11429L123.886,4.11429L123.886,41.3714L86.6286,41.3714Z",fill:"#f0f0ee"})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-3",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.3438",height:"37.6389",fill:"#5189e5",transform:"translate(-21.9838,29.7957) translate(21.9838,15.3027)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-2",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.2755",height:"37.4675",fill:"#5189e5",transform:"translate(-21.9838,69.7957) translate(22.0822,16.7783)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-5",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.3512",height:"41.3781",fill:"#35618c",transform:"translate(18.0162,72.7957) translate(23.1643,13.7278)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-6",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.2483",height:"37.5869",fill:"#35618c",transform:"translate(59.0162,29.7957) translate(23.6379,15.3564)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-7",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.5664",height:"41.2747",fill:"#35618c",transform:"translate(17.0162,-13.2043) translate(24.2531,13.2043)"})})})}),h("svg",{className:"dh-loader-tile dh-loader-tile-4",viewBox:"0 0 182 182",children:h("g",{transform:"translate(91,91.0033) translate(-64,-64.0033)",children:h("g",{transform:"translate(63.9589,64.0492) translate(-59.9751,-63.9508)",children:h("rect",{width:"37.2854",height:"37.3014",fill:"#5189e5",transform:"translate(-21.9838,-13.2043) translate(22.0822,17.1792)"})})})})]});const wC=X.module("ItemListItem"),yu=class extends S.exports.Component{constructor(t){super(t),this.handleBlur=this.handleBlur.bind(this),this.handleFocus=this.handleFocus.bind(this),this.handleClick=this.handleClick.bind(this),this.handleContextMenu=this.handleContextMenu.bind(this),this.handleDragStart=this.handleDragStart.bind(this),this.handleDrag=this.handleDrag.bind(this),this.handleDragOver=this.handleDragOver.bind(this),this.handleDragEnd=this.handleDragEnd.bind(this),this.handleDrop=this.handleDrop.bind(this),this.handleDoubleClick=this.handleDoubleClick.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.itemRef=Y.createRef()}static handleKeyDown(){return wC.log("ItemListItem.handleKeyDown false"),!1}handleBlur(t){const{itemIndex:e,onBlur:n}=this.props;n(e,t)}handleFocus(t){const{itemIndex:e,onFocus:n}=this.props;n(e,t)}handleClick(t){const{itemIndex:e,onClick:n}=this.props;n(e,t)}handleContextMenu(t){const{itemIndex:e,onContextMenu:n}=this.props;n(e,t)}handleDragStart(t){const{itemIndex:e,onDragStart:n}=this.props;n(e,t)}handleDrag(t){const{itemIndex:e,onDrag:n}=this.props;n(e,t)}handleDragOver(t){t.preventDefault();const{itemIndex:e,onDragOver:n}=this.props;n(e,t)}handleDragEnd(t){const{itemIndex:e,onDragEnd:n}=this.props;n(e,t)}handleDrop(t){const{itemIndex:e,onDrop:n}=this.props;n(e,t)}handleDoubleClick(t){const{itemIndex:e,onDoubleClick:n}=this.props;n(e,t)}handleMouseMove(t){const{itemIndex:e,onMouseMove:n}=this.props;n(e,t)}handleMouseDown(t){const{itemIndex:e,onMouseDown:n}=this.props;n(e,t)}handleMouseUp(t){const{itemIndex:e,onMouseUp:n}=this.props;n(e,t)}render(){const{isDraggable:t,isFocused:e,isSelected:n,style:s,children:i,"data-testid":o}=this.props;return h("div",{className:W("item-list-item",{active:n},{"is-focused":e},{"is-draggable":t}),onKeyDown:yu.handleKeyDown,onContextMenu:this.handleContextMenu,onClick:this.handleClick,onDrag:this.handleDrag,onDragStart:this.handleDragStart,onDragOver:this.handleDragOver,onDragEnd:this.handleDragEnd,onDrop:this.handleDrop,onDoubleClick:this.handleDoubleClick,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseUp:this.handleMouseUp,tabIndex:-1,ref:this.itemRef,role:"listitem",style:s,onFocus:this.handleFocus,onBlur:this.handleBlur,draggable:t,"data-testid":o,children:i})}};let Iu=yu;Iu.defaultProps={children:null,isDraggable:!1,isFocused:!1,isSelected:!1,itemIndex:0,disableSelect:!1,"data-testid":void 0,onBlur(){},onClick(){},onContextMenu(){},onDragStart(){},onDrag(){},onDragOver(){},onDragEnd(){},onDrop(){},onDoubleClick(){},onFocus(){},onMouseDown(){},onMouseMove(){},onMouseUp(){},style:{}};const Mc=X.module("ItemList"),Ai=class extends S.exports.PureComponent{constructor(t){super(t),this.getItemSelected=Ee((s,i)=>fn.isSelected(i,s),{max:Ai.CACHE_SIZE}),this.getCachedItem=Ee((s,i,o,r,l,a,d,c)=>{const u=a({item:o,itemIndex:s,isFocused:r,isSelected:l,style:d});return h(Iu,{onContextMenu:this.handleItemContextMenu,onDoubleClick:this.handleItemDoubleClick,onMouseDown:this.handleItemMouseDown,onFocus:this.handleItemFocus,onBlur:this.handleItemBlur,disableSelect:c,onMouseMove:this.handleItemMouseMove,onMouseUp:this.handleItemMouseUp,isFocused:r,isSelected:l,itemIndex:s,style:d,children:u},i)},{max:Ai.CACHE_SIZE}),this.getOuterElement=Ee(s=>{const i=Y.forwardRef((o,r)=>h("div",{ref:r,tabIndex:-1,onKeyDown:s,role:"presentation",...o}));return i.displayName="ItemListOuterElement",i}),this.getInnerElement=Ee(()=>{const s=Y.forwardRef((i,o)=>h("div",{className:"item-list-inner-element",ref:o,...i}));return s.displayName="ItemListInnerElement",s}),this.getItemData=Ee((s,i,o)=>({items:s,selectedRanges:i,renderItem:o})),this.handleItemBlur=this.handleItemBlur.bind(this),this.handleItemContextMenu=this.handleItemContextMenu.bind(this),this.handleItemFocus=this.handleItemFocus.bind(this),this.handleItemDoubleClick=this.handleItemDoubleClick.bind(this),this.handleItemMouseDown=this.handleItemMouseDown.bind(this),this.handleItemMouseMove=this.handleItemMouseMove.bind(this),this.handleItemMouseUp=this.handleItemMouseUp.bind(this),this.handleItemsRendered=this.handleItemsRendered.bind(this),this.handleWindowMouseUp=this.handleWindowMouseUp.bind(this),this.handleKeyDown=this.handleKeyDown.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleResize=this.handleResize.bind(this),this.renderInnerElement=this.renderInnerElement.bind(this),this.list=Y.createRef(),this.listContainer=Y.createRef();const{isStickyBottom:e,selectedRanges:n}=t;this.state={focusIndex:null,mouseDownIndex:null,selectedRanges:n,overscanStartIndex:0,height:null,isDragging:!1,isStuckToBottom:e,scrollOffset:null}}static renderItem({item:t}){var e,n;return h("div",{className:"item-list-item-content",children:t!=null&&((n=(e=t.displayValue)!=null?e:t.value)!=null?n:`${t}`)})}componentDidMount(){const{isStickyBottom:t}=this.props;t&&!this.isListAtBottom()&&this.scrollToBottom()}componentDidUpdate(t,e){const{selectedRanges:n}=this.props,{focusIndex:s,isStuckToBottom:i,scrollOffset:o,height:r,selectedRanges:l}=this.state;if(i&&!this.isListAtBottom()&&this.scrollToBottom(),(o!==e.scrollOffset||r!==e.height)&&this.sendViewportUpdate(),n!==t.selectedRanges&&n!==l)this.setSelectedRanges(n);else if(l!==e.selectedRanges){const{onSelectionChange:a}=this.props;a(l)}if(s!==e.focusIndex){const{onFocusChange:a}=this.props;a(s)}}componentWillUnmount(){window.removeEventListener("mouseup",this.handleWindowMouseUp)}focus(){var t;(t=this.listContainer.current)==null||t.focus()}getElement(t){if(this.listContainer.current==null)return null;const{focusSelector:e}=this.props,{overscanStartIndex:n}=this.state,s=this.listContainer.current.querySelectorAll(e),i=t-n;return s[i]}focusItem(t){const{disableSelect:e}=this.props;if(e)return;this.setState({focusIndex:t});const n=this.getElement(t);n instanceof HTMLElement&&n.focus()}scrollToItem(t){const e=this.getElement(t);e!=null&&e.scrollIntoView({block:"center"})}handleItemContextMenu(t,e){const{selectedRanges:n}=this.state,i=fn.isSelected(n,t)||Ne.isModifierKeyDown(e);this.toggleSelect(t,e.shiftKey,i,!1)}handleItemDoubleClick(t,e){const{isDoubleClickSelect:n,onSelect:s}=this.props;n&&this.setState(({selectedRanges:i})=>({selectedRanges:fn.selectRange(i,[t,t])}),()=>{s(t,e)})}handleItemMouseDown(t,e){const{selectedRanges:n}=this.state;if(!(e.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(e.target.tagName.toLowerCase())!==-1)){if(e.button===2&&n.length===0){this.focusItem(t),this.selectItem(t);return}e.button!=null&&e.button!==0||(this.setState({mouseDownIndex:t}),window.addEventListener("mouseup",this.handleWindowMouseUp))}}handleItemBlur(t,e){Mc.debug2("item blur",t,e.currentTarget,e.relatedTarget),(!e.relatedTarget||this.listContainer.current&&e.relatedTarget instanceof HTMLElement&&!this.listContainer.current.contains(e.relatedTarget))&&this.setState({focusIndex:null})}handleItemFocus(t,e){Mc.debug2("item focus",t,e.target),this.setState(n=>{const{focusIndex:s}=n;return s!==t?{focusIndex:t}:null})}handleItemMouseMove(t,e){const{isDragSelect:n,isMultiSelect:s,disableSelect:i}=this.props,{mouseDownIndex:o,selectedRanges:r}=this.state;o==null||i||(this.setState({isDragging:!0}),(n||o===t)&&(this.focusItem(t),s?(!n&&!this.getItemSelected(t,r)&&!Ne.isModifierKeyDown(e)&&this.deselectAll(),this.selectRange([Math.min(o,t),Math.max(o,t)])):this.toggleSelect(t,e.shiftKey,Ne.isModifierKeyDown(e),!1)))}handleItemMouseUp(t,e){const{isDeselectOnClick:n,isDoubleClickSelect:s,onSelect:i}=this.props,{mouseDownIndex:o,isDragging:r}=this.state;if(!(e.target instanceof HTMLElement&&["button","select","input","textarea"].indexOf(e.target.tagName.toLowerCase())!==-1)){if(o===t&&!r){const l=e.shiftKey,a=Ne.isModifierKeyDown(e);this.focusItem(t),this.toggleSelect(t,l,a,n),!s&&!l&&!a&&i(t,e)}this.resetMouseState()}}handleItemsRendered({overscanStartIndex:t}){this.setState({overscanStartIndex:t})}handleResize({height:t}){this.setState({height:t})}handleMouseLeave(){this.setState({mouseDownIndex:null})}handleWindowMouseUp(){this.resetMouseState(),window.removeEventListener("mouseup",this.handleWindowMouseUp)}handleKeyDown(t){var r;const{isMultiSelect:e,itemCount:n,onSelect:s}=this.props,{focusIndex:i}=this.state;let o=i;if(t.key==="Enter"||t.key===" "){!e&&o!=null&&this.setState({selectedRanges:[[o,o]]},()=>{o!=null&&s(o,t)});return}if(t.key==="ArrowUp")o!=null&&o>=0?o=Math.max(0,o-1):o=n-1;else if(t.key==="ArrowDown")o!=null&&o>=0?o=Math.min(o+1,n-1):o=0;else return;if(i!==o){t.stopPropagation(),t.preventDefault(),this.focusItem(o);const{selectedRanges:l}=this.state;if(t.shiftKey&&l.length>0){const a=l[l.length-1];this.selectRange([Math.min(o,a[0]),Math.max(o,a[1])])}else this.deselectAll(),o!==null?this.selectItem(o):(r=this.listContainer.current)==null||r.focus();this.scrollIntoView(o)}}handleScroll({scrollUpdateWasRequested:t,scrollOffset:e}){this.setState(n=>{if(t)return{scrollOffset:e};const{isStickyBottom:s}=this.props,{height:i}=n;return{isStuckToBottom:s&&this.isListAtBottom({scrollOffset:e,height:i}),scrollOffset:e}})}resetMouseState(){this.setState({mouseDownIndex:null,isDragging:!1})}scrollToBottom(){const{itemCount:t}=this.props;this.list.current&&this.list.current.scrollToItem(t)}scrollIntoView(t){this.list.current&&this.list.current.scrollToItem(t)}toggleSelect(t,e,n,s=!0){const{isMultiSelect:i}=this.props,{selectedRanges:o}=this.state;if(i&&e&&o.length>0){const r=o[o.length-1];this.selectRange([Math.min(r[0],t),Math.max(t,r[1])])}else i&&o.length===1&&o[0][0]===t&&o[0][1]===t?s&&this.deselectItem(t):i&&n?this.getItemSelected(t,o)?s&&this.deselectItem(t):this.selectItem(t):(this.deselectAll(),this.selectItem(t))}deselectAll(){const{itemCount:t}=this.props;this.deselectRange([0,t])}deselectItem(t){this.deselectRange([t,t])}deselectRange(t){fn.validateRange(t),this.setState(({selectedRanges:e})=>({selectedRanges:fn.deselectRange(e,t)}))}selectItem(t){const{disableSelect:e}=this.props;e||this.selectRange([t,t])}selectRange(t){fn.validateRange(t),this.setState(({selectedRanges:e})=>({selectedRanges:fn.selectRange(e,t)}))}setSelectedRanges(t){this.setState({selectedRanges:t})}sendViewportUpdate(){const{scrollOffset:t,height:e}=this.state;if(t!=null&&e!=null){const{onViewportChange:n,rowHeight:s}=this.props,i=Math.floor(t/s),o=i+Math.ceil(e/s);n(i,o)}}isListAtBottom({scrollOffset:t,height:e}=this.state){if(e==null||t==null)return!1;const{itemCount:n,rowHeight:s}=this.props;return t+e>=n*s}renderInnerElement({index:t,style:e}){const{items:n,offset:s,renderItem:i,disableSelect:o}=this.props,{focusIndex:r,selectedRanges:l}=this.state;if(t<s||t>=s+n.length)return null;const a=n[t-s];return this.getCachedItem(t,t,a,t===r&&!o,this.getItemSelected(t,l),i,e,o)}render(){const{items:t,itemCount:e,overscanCount:n,renderItem:s,rowHeight:i,"data-testid":o}=this.props,{selectedRanges:r}=this.state;return h(Bp,{className:"item-list-auto-sizer",onResize:this.handleResize,children:({width:l,height:a})=>h($p,{className:"item-list-scroll-pane",height:a,width:l,itemCount:e,itemSize:i,itemData:this.getItemData(t,r,s),onScroll:this.handleScroll,onItemsRendered:this.handleItemsRendered,ref:this.list,outerElementType:this.getOuterElement(this.handleKeyDown),outerRef:this.listContainer,innerElementType:this.getInnerElement(),overscanCount:n,"data-testid":o,children:this.renderInnerElement})})}};let bn=Ai;bn.CACHE_SIZE=1e3;bn.DEFAULT_ROW_HEIGHT=20;bn.DEFAULT_OVERSCAN=10;bn.defaultProps={offset:0,items:[],rowHeight:Ai.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!1,isDragSelect:!0,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},overscanCount:Ai.DEFAULT_OVERSCAN,renderItem:Ai.renderItem,selectedRanges:[],focusSelector:".item-list-item","data-testid":void 0};const ni=class extends S.exports.PureComponent{constructor(t){super(t),this.getCachedDraggableItem=Ee((e,n,s,i,o,r,l,a)=>h(ol,{draggableId:ni.getDraggableId(e,i),index:i,isDragDisabled:l,children:d=>h("div",{role:"menuitem",className:"draggable-item-list-item",ref:d.innerRef,tabIndex:-1,...d.draggableProps,...d.dragHandleProps,children:n({item:s,itemIndex:i,isFocused:o,isSelected:r,style:a,isClone:!1})})},i),{max:bn.CACHE_SIZE}),this.getCachedRenderDraggableItem=Ee((e,n,s)=>({item:i,itemIndex:o,isFocused:r,isSelected:l,style:a})=>this.getCachedDraggableItem(e,s,i,o,r,l,n,a),{max:1}),this.getCachedRenderClone=Ee((e,n,s,i)=>(o,r,l)=>{const{selectedCount:a}=this.state,{index:d}=l.source,c=n[d-s];return h("div",{className:W("draggable-item-list-dragging-item-container",e),...o.draggableProps,...o.dragHandleProps,ref:o.innerRef,children:h("div",{className:W("draggable-item-list-dragging-item",{"two-dragged":a===2},{"multiple-dragged":a>2}),children:i({item:c,itemIndex:d,isFocused:!1,isSelected:!0,style:{},isClone:!0,selectedCount:a})})})},{max:1}),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.itemList=Y.createRef(),this.state={selectedCount:0}}static renderHandle(){return w("div",{children:[h(ge,{children:"Drag to re-order"}),h(G,{icon:al})]})}static renderBadge({text:t}){return t!=null&&t.length>0?h("span",{className:"number-badge",children:t}):null}static renderTextItem({text:t,badgeText:e="",className:n=""}){return w("div",{className:W("item-list-item-content","draggable-item-list-item-content",n),children:[h("span",{className:"title",children:t}),ni.renderBadge({text:e}),ni.renderHandle()]})}static renderItem({item:t,isClone:e,selectedCount:n}){var r,l;const s=t!=null?(l=(r=t.displayValue)!=null?r:t.value)!=null?l:`${t}`:"",i=e!==void 0&&e?`${n}`:"",o=e!==void 0&&e?"item-list-item-clone":"";return ni.renderTextItem({text:s,badgeText:i,className:o})}static getDraggableId(t,e){return`${t}/${e}`}static getDraggableIndex(t){const e=t.split("/").pop();return parseInt(e!==void 0?e:"",10)}selectItem(t){var e;(e=this.itemList.current)==null||e.selectItem(t)}focusItem(t){var e;(e=this.itemList.current)==null||e.focusItem(t)}scrollToItem(t){var e;(e=this.itemList.current)==null||e.scrollToItem(t)}handleSelectionChange(t){this.setState({selectedCount:fn.count(t)});const{onSelectionChange:e}=this.props;e(t)}render(){const{className:t,draggablePrefix:e,draggingItemClassName:n,droppableId:s,isDoubleClickSelect:i,isDragDisabled:o,isDropDisabled:r,isMultiSelect:l,isStickyBottom:a,itemCount:d,items:c,offset:u,onFocusChange:m,onSelect:p,onViewportChange:g,renderItem:f,rowHeight:b,selectedRanges:C,style:v,"data-testid":T}=this.props;return h(Lo,{isDropDisabled:r,droppableId:s,mode:"virtual",renderClone:this.getCachedRenderClone(n,c,u,f),"data-testid":T,children:(E,y)=>h("div",{role:"menu",className:W("draggable-item-list",t,{"is-drop-disabled":r,"is-drag-disabled":o,"is-dragging-from-this":y.draggingFromThisWith,"is-dragging-over":y.isDraggingOver,"is-dropping":y.draggingOverWith}),style:v,ref:E.innerRef,...E.droppableProps,children:h(bn,{focusSelector:".draggable-item-list-item",isDoubleClickSelect:i,isDragSelect:!1,isMultiSelect:l,isStickyBottom:a,itemCount:d,items:c,onFocusChange:m,onSelect:p,onSelectionChange:this.handleSelectionChange,onViewportChange:g,offset:u,ref:this.itemList,renderItem:this.getCachedRenderDraggableItem(e,o,f),rowHeight:b,selectedRanges:C})})})}};let nn=ni;nn.DEFAULT_ROW_HEIGHT=30;nn.defaultProps={className:"",draggingItemClassName:"",offset:0,items:[],rowHeight:ni.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!0,isDropDisabled:!1,isDragDisabled:!1,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,style:null,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},renderItem:ni.renderItem,selectedRanges:[],draggablePrefix:"draggable-item",droppableId:"droppable-item-list","data-testid":void 0};class Gt{static reorder(e,n,s,i){const o=e===s?Gt.adjustDestinationIndex(i,n):i,r=Gt.removeItems(e,n);return s.splice(o,0,...r),r}static removeItems(e,n){const s=[],i=n.map((o,r)=>({range:o,index:r})).sort((o,r)=>r.range[0]-o.range[0]);for(let o=0;o<i.length;o+=1){const{range:r,index:l}=i[o],[a,d]=r;s[l]=e.splice(a,d-a+1)}return Wp(s)}static adjustDestinationIndex(e,n){let s=e;for(let i=0;i<n.length;i+=1){const[o,r]=n[i];if(o>e)break;s-=Math.min(r,e-1)-o+1}return s}static startDragging(){document.documentElement.classList.add("drag-pointer-events-none")}static stopDragging(){document.documentElement.classList.remove("drag-pointer-events-none")}}const Nr=class extends S.exports.Component{static isParentSelected(t,e){const n=e.get(t);if(n===void 0)return!1;if(typeof n=="boolean")return n;const s=Array.from(n.values()).includes(!0),i=Array.from(n.values()).includes(!1);return s&&i?null:s}constructor(t){super(t),this.toggleMenu=this.toggleMenu.bind(this),this.toggleValueFor=this.toggleValueFor.bind(this),this.selectAll=this.selectAll.bind(this),this.clear=this.clear.bind(this),this.state={menuIsOpen:!1}}toggleMenu(t){t.stopPropagation(),t.preventDefault(),this.setState(e=>{const{menuIsOpen:n}=e;return{menuIsOpen:!n}})}toggleValueFor(t,e){const{valueMap:n,onUpdateValueMap:s}=this.props,i=new Map(n),o=i.get(t);if(o instanceof Map){const l=new Map(o);if(e!=null)l.set(e,o.get(e)===void 0);else{const a=Nr.isParentSelected(t,i),d=a==null||!a;o.forEach((c,u)=>l.set(u,d))}i.set(t,l)}else i.set(t,o==null||!o);const r=i.get(t);if(e===void 0&&r!==void 0&&typeof r!="boolean"){const l=Nr.isParentSelected(t,n);l!=null&&l?r.forEach((a,d)=>r.set(d,!1)):r.forEach((a,d)=>r.set(d,!0))}s(i)}setAllValues(t){const{valueMap:e,onUpdateValueMap:n}=this.props,s=new Map;e.forEach((i,o)=>{if(typeof i=="boolean")s.set(o,t);else{const r=new Map;i.forEach((l,a)=>r.set(a,t)),s.set(o,r)}}),n(s)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){const{valueMap:t,"data-testid":e}=this.props;return w("div",{className:"hcm-menu-container",children:[Array.from(t.entries()).map(([n,s])=>w("div",{children:[h(Pt,{className:"hcm-parent",checked:Nr.isParentSelected(n,t),onChange:()=>this.toggleValueFor(n),children:n}),s!==void 0&&typeof s!="boolean"&&Array.from(s.entries()).map(([i,o])=>h(Pt,{className:"hcm-child",checked:o,onChange:()=>this.toggleValueFor(n,i),children:i},i))]},n)),h("button",{type:"button",className:"btn btn-link",onClick:this.selectAll,"data-testid":e!==void 0?`${e}-btn-select-all`:void 0,children:"Select All"}),h("button",{type:"button",className:"btn btn-link",onClick:this.clear,"data-testid":e!==void 0?`${e}-btn-clear`:void 0,children:"Clear"})]})}render(){const{menuText:t,className:e,icon:n,id:s,"data-testid":i}=this.props,{menuIsOpen:o}=this.state;return w("button",{type:"button",className:W("btn hcm-btn",e),onClick:this.toggleMenu,id:s,"data-testid":i,children:[w("span",{children:[n&&h(G,{icon:n,className:"hcm-icon mr-1"}),t]}),h(G,{icon:ad,className:"hcm-icon ml-1"}),h(Fn,{options:{placement:"bottom"},isShown:o,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}};let vC=Nr;vC.defaultProps={className:"",icon:null,id:"","data-testid":void 0};const ml=({isLoaded:t=!1,isLoading:e=!0,errorMessage:n=null,"data-testid":s})=>h(ht,{in:Boolean(n)||!t||e,timeout:Tt.transitionMs,classNames:t?"fade":"",mountOnEnter:!0,unmountOnExit:!0,children:h("div",{className:"fill-parent-absolute","data-testid":s,children:h("div",{className:W("iris-panel-message-overlay","fill-parent-absolute",{"iris-panel-scrim-background":t}),children:w("div",{className:"message-content",children:[w("div",{className:"message-icon",children:[e&&h(_n,{}),!e&&n&&h(G,{icon:cs})]}),h("div",{className:"message-text",children:n})]})})})});const Ru=({on:t,id:e,className:n,isInvalid:s,disabled:i=!1,onClick:o,"data-testid":r})=>h("button",{type:"button",className:W("btn","btn-switch",n,{active:t},{"is-invalid":s}),id:e,onClick:o,disabled:i,"data-testid":r,children:h("div",{className:"handle"})});function Nc(t){return t.isOn!==void 0}const TC=({item:t,onSelect:e=()=>{},"data-testid":n})=>{const{icon:s,subtitle:i,title:o}=t,r=S.exports.useMemo(()=>Nc(t)?()=>{t.onChange(!t.isOn)}:e,[t,e]);return w("div",{className:"btn btn-navigation-menu-item","data-testid":`menu-item-${o}`,onClick:r,onKeyDown:l=>{(l.key==="Enter"||l.key===" ")&&r()},tabIndex:0,role:"menuitem",children:[s!==void 0&&h("div",{className:"icon",children:h(G,{icon:s})}),h("div",{className:"title",children:o}),i!==void 0&&h("div",{className:"shortcut",children:i}),h("div",{className:"accessory","data-testid":n,children:Nc(t)&&h(Ru,{on:t.isOn,onClick:l=>{l.stopPropagation(),r()}})||h(G,{icon:Jh})})]})};const Du=({items:t,onSelect:e=()=>{},"data-testid":n})=>h("div",{className:"navigation-menu-view","data-testid":n,children:h("ul",{className:"navigation-menu-list",children:t.map((s,i)=>h("li",{children:h(TC,{item:s,onSelect:()=>{e(i)}})},s.title))})});const Fc=({children:t,onBack:e,onClose:n,title:s,"data-testid":i})=>w("div",{className:"navigation-page","data-testid":i,children:[w("div",{className:"navigation-title-bar",children:[h("div",{className:"navigation-left-buttons",children:e!==void 0&&w("button",{className:"btn btn-link btn-back","data-testid":"btn-page-back",type:"button",onClick:e,children:[h(G,{icon:ef}),"Back"]})}),h("div",{className:"navigation-title",children:s}),h("div",{className:"navigation-right-buttons",children:n!==void 0&&h("button",{className:"btn btn-link btn-link-icon btn-close px-2 m-1","data-testid":"btn-page-close",type:"button",onClick:n,children:h(G,{icon:Ho})})})]}),h("div",{className:"navigation-content",children:t})]});const EC=({children:t,"data-testid":e})=>{const n=S.exports.useMemo(()=>Y.Children.toArray(t),[t]),s=hl(n),[i,o]=S.exports.useState(n[n.length-1]),[r,l]=S.exports.useState(null),[a,d]=S.exports.useState(null);S.exports.useEffect(function(){if(s===void 0||n===s)return;const p=n[n.length-1];n.length===s.length||s.length===0||r!==null||a!==null?r!==null&&p!==r?l(p):p!==a&&p!==i&&o(p):n.length>s.length?l(p):n.length<s.length&&(o(p),d(s[s.length-1]))},[n,s,r,a,i]);const c=S.exports.useCallback(()=>{o(r),l(null)},[r]),u=S.exports.useCallback(()=>{d(null)},[]);return w("div",{className:"navigation-stack",children:[h("div",{className:"main-view","data-testid":e,children:i}),h(ht,{in:a!=null,timeout:Tt.transitionMidMs,classNames:"slide-right",onEntered:u,children:h(he,{children:a!=null&&h("div",{className:"popping-view",children:a})})}),h(ht,{in:r!=null,timeout:Tt.transitionMidMs,classNames:"slide-left",onEntered:c,children:h(he,{children:r!=null&&h("div",{className:"pushing-view",children:r})})})]})},yC=({children:t,disabled:e,value:n,"data-testid":s})=>h("option",{value:n,disabled:e,"data-testid":s,children:t}),pl=t=>{const{children:e,disabled:n=!1,name:s,onChange:i,value:o="","data-testid":r}=t,[l]=S.exports.useState(s!=null?s:ze());return h(he,{children:Y.Children.map(e,a=>{var d,c;return a?Y.cloneElement(a,{name:l,onChange:(d=a.props.onChange)!=null?d:i,checked:o===a.props.value,disabled:(c=a.props.disabled)!=null?c:n,"data-testid":r}):null})})},Mn=Y.forwardRef((t,e)=>{const{checked:n,children:s,className:i="",disabled:o=!1,inputClassName:r="",isInvalid:l=!1,labelClassName:a="",name:d,onChange:c,value:u,"data-testid":m}=t,[p]=S.exports.useState(ze());return w("div",{className:W("custom-control custom-radio",i),children:[h("input",{type:"radio",id:p,"data-testid":m,name:d,ref:e,className:W("custom-control-input",r,{"is-invalid":l}),checked:n,disabled:o,value:u,onChange:c}),h("label",{className:W("custom-control-label",a),htmlFor:p,children:s})]})});Mn.displayName="RadioItem";Mn.defaultProps={checked:void 0,className:"",disabled:!1,inputClassName:"",isInvalid:!1,labelClassName:"",name:void 0,onChange:void 0,"data-testid":void 0};const IC=({children:t,onBlur:e,onChange:n,className:s,defaultValue:i,name:o,value:r,disabled:l,"data-testid":a})=>{const d=S.exports.useCallback(c=>{n(c.target.value)},[n]);return h("select",{className:W("custom-select",s),onBlur:e,onChange:d,defaultValue:i,value:r,name:o,disabled:l,"data-testid":a,children:t})};class Mu extends S.exports.PureComponent{constructor(e){super(e),this.getCachedItem=Ee((n,s,i,o,r,l,a)=>{const d={height:r},c=o!=null?o:i;return h("li",{className:"value-list-item",style:d,tabIndex:-1,children:h(Pt,{checked:l,disabled:a,onChange:()=>this.handleSelect(n),children:c})},s)},{max:1e3}),this.getCachedItems=Ee((n,s,i,o)=>{const r=[];for(let l=0;l<n.length;l+=1){const a=n[l],{value:d,displayValue:c,isSelected:u}=a,m=i+l,p=m,g=this.getCachedItem(m,p,d,c,s,u,o);r.push(g)}return r},{max:1}),this.handleBlur=this.handleBlur.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleSelect=this.handleSelect.bind(this),this.list=Y.createRef(),this.topRow=null,this.bottomRow=null}componentDidMount(){this.sendViewportUpdate()}componentDidUpdate(){this.sendViewportUpdate()}handleBlur(e){if(!e.relatedTarget||this.list.current&&e.relatedTarget instanceof HTMLElement&&!this.list.current.contains(e.relatedTarget)){const{onBlur:n}=this.props;n==null||n(e)}}handleScroll(){this.sendViewportUpdate()}handleSelect(e){const{items:n,offset:s,onSelect:i}=this.props,o=e-s;if(o>=0&&o<n.length){const r=n[o],{value:l}=r;i(e,l)}else i(e,null)}sendViewportUpdate(){if(!this.list.current||this.list.current.clientHeight===0)return;const{onViewportChange:e,rowHeight:n}=this.props,s=this.list.current.scrollTop,i=s+this.list.current.clientHeight,o=Math.floor(s/n),r=Math.ceil(i/n);(this.topRow!==o||this.bottomRow!==r)&&(this.topRow=o,this.bottomRow=r,e(o,r))}getElement(e){return this.list.current==null?null:this.list.current.querySelectorAll(".value-list-item")[e]}scrollIntoView(e){const n=this.getElement(e);n==null||n.scrollIntoView({block:"center"})}render(){const{className:e,disabled:n,isInvalid:s,items:i,itemCount:o,offset:r,rowHeight:l,"data-testid":a}=this.props,d=this.getCachedItems(i,l,r,n);return h("div",{className:W("select-value-list-scroll-pane h-100 w-100",{"is-invalid":s},e),onBlur:this.handleBlur,onScroll:this.handleScroll,ref:this.list,"data-testid":a,children:h("div",{className:"select-value-list",style:{height:o*l},children:h("ol",{className:"select-value-list-content",style:{position:"absolute",height:i.length*l,top:r*l,left:0},children:d})})})}}Mu.defaultProps={disabled:!1,rowHeight:21,onBlur:()=>{},"data-testid":void 0};const xc=X.module("Shortcut");var ue=(t=>(t.CTRL="MODIFIER_CTRL",t.CMD="MODIFIER_CMD",t.ALT="MODIFIER_ALT",t.OPTION="MODIFIER_OPTION",t.SHIFT="MODIFIER_SHIFT",t))(ue||{}),pe=(t=>(t.A="A",t.B="B",t.C="C",t.D="D",t.E="E",t.F="F",t.G="G",t.H="H",t.I="I",t.J="J",t.K="K",t.L="L",t.M="M",t.N="N",t.O="O",t.P="P",t.Q="Q",t.R="R",t.S="S",t.T="T",t.U="U",t.V="V",t.W="W",t.X="X",t.Y="Y",t.Z="Z",t.ZERO="0",t.ONE="1",t.TWO="2",t.THREE="3",t.FOUR="4",t.FIVE="5",t.SIX="6",t.SEVEN="7",t.EIGHT="8",t.NINE="9",t.BACKSPACE="Backspace",t.ESCAPE="Escape",t.ENTER="Enter",t.DELETE="Delete",t.SLASH="/",t.QUESTION_MARK="?",t.BACKSLASH="\\",t.PIPE="|",t.MINUS="-",t.UNDERSCORE="_",t.EQUALS="=",t.PLUS="+",t.BACKTICK="`",t.TILDE="~",t.COMMA=",",t.LEFT_CHEVRON="<",t.PERIOD=".",t.RIGHT_CHEVRON=">",t.SEMICOLON=";",t.COLON=":",t.SINGLE_QUOTE="'",t.DOUBLE_QUOTE='"',t.LEFT_BRACKET="[",t.RIGHT_BRACKET="]",t.LEFT_CURLY="{",t.RIGHT_CURLY="}",t.F1="F1",t.F2="F2",t.F3="F3",t.F4="F4",t.F5="F5",t.F6="F6",t.F7="F7",t.F8="F8",t.F9="F9",t.F10="F10",t.F11="F11",t.F12="F12",t))(pe||{});const RC=new Set(["Enter","Delete","F1","F2","F3","F4","F5","F6","F7","F8","F9","F10","F11","F12"]),mt=class extends il{constructor({id:t,shortcut:e,macShortcut:n,isEditable:s=!0,name:i,tooltip:o}){super(),this.id=t,this.name=i,this.tooltip=o,this.isEditable=s;const l=mt.isMacPlatform?n:e;this.defaultKeyState=mt.createKeyState(l),this.keyState=this.defaultKeyState}static isAllowedKey(t){return Object.values(pe).includes(t)}static isValidKeyState(t){const{keyValue:e}=t;return e===null?!0:!mt.isMacPlatform&&t.metaKey||!mt.isAllowedKey(e)?!1:!(!t.altKey&&!t.ctrlKey&&!t.metaKey&&!t.shiftKey)||RC.has(e)}static createKeyState(t){const e={altKey:!1,ctrlKey:!1,metaKey:!1,shiftKey:!1,keyValue:t[t.length-1]};return t.forEach(n=>{switch(n){case"MODIFIER_CTRL":e.ctrlKey=!0;break;case"MODIFIER_ALT":case"MODIFIER_OPTION":e.altKey=!0;break;case"MODIFIER_CMD":e.metaKey=!0;break;case"MODIFIER_SHIFT":e.shiftKey=!0;break}}),e}static getKeyStateFromEvent(t){const{key:e,keyCode:n}=t;let s="";return e==="Shift"||e==="Meta"||e==="Control"||e==="Alt"?s="":!mt.isAllowedKey(e)&&mt.isAllowedKey(String.fromCharCode(n))?s=String.fromCharCode(n):s=e,{keyValue:s,altKey:t.altKey,ctrlKey:t.ctrlKey,metaKey:t.metaKey,shiftKey:t.shiftKey}}static getWindowsDisplayText(t){let e="";return t.ctrlKey&&(e+="Ctrl+"),t.altKey&&(e+="Alt+"),t.shiftKey&&(e+="Shift+"),t.keyValue==="Escape"?e+="Esc":t.keyValue!==null&&(e+=t.keyValue),e}static getMacDisplayText(t){let e="";switch(t.ctrlKey&&(e+="\u2303"),t.altKey&&(e+="\u2325"),t.shiftKey&&(e+="\u21E7"),t.metaKey&&(e+="\u2318"),t.keyValue){case"Enter":e+="\u23CE";break;case"Escape":e+="\u238B";break;case"Backspace":e+="\u232B";break;case"Delete":e+="\u2326";break;case null:break;default:e+=t.keyValue}return e}static doKeyStatesMatch(t,e){var n,s;return((n=t.keyValue)==null?void 0:n.toUpperCase())===((s=e.keyValue)==null?void 0:s.toUpperCase())&&t.altKey===e.altKey&&t.ctrlKey===e.ctrlKey&&t.metaKey===e.metaKey&&t.shiftKey===e.shiftKey}static getDisplayText(t){return t.keyValue===null?"":mt.isMacPlatform?mt.getMacDisplayText(t):mt.getWindowsDisplayText(t)}getDisplayText(){return mt.getDisplayText(this.keyState)}getKeyState(){return this.keyState}setKeyState(t){mt.isValidKeyState(t)?(xc.debug2(`Shortcut ${this.id} updated to ${JSON.stringify(t)}`),this.keyState=t,this.dispatchEvent(new Ge("onUpdate",{detail:this}))):xc.debug2(`Shortcut ${this.id} tried to update to invalid keyState ${JSON.stringify(t)}`)}getDefaultKeyState(){return this.defaultKeyState}isDefault(){return mt.doKeyStatesMatch(this.getDefaultKeyState(),this.getKeyState())}setToNull(){this.setKeyState(mt.NULL_KEY_STATE)}isNull(){return mt.doKeyStatesMatch(this.keyState,mt.NULL_KEY_STATE)}setToDefault(){this.setKeyState(this.defaultKeyState)}matchesKeyState(t){return mt.doKeyStatesMatch(t,this.keyState)}matchesEvent(t){return this.matchesKeyState(mt.getKeyStateFromEvent(t))}};let Wt=mt;Wt.NULL_KEY_STATE={metaKey:!1,shiftKey:!1,altKey:!1,ctrlKey:!1,keyValue:null};Wt.isMacPlatform=Ne.isMacPlatform();const _c=X.module("ShortcutRegistry");class DC extends il{constructor(){super(...arguments),this.shortcutMap=new Map,this.shortcutsByCategory=new Map}createAndAdd(e){const n=new Wt(e);return this.add(n)}add(e){var i;const n=this.shortcutMap.get(e.id);if(n)return _c.warn(`Skipping attempt to add duplicate shortcut ID to registry: ${e.id}`),n;_c.debug2(`Adding shortcut to registry: ${e.id}`),e.addEventListener("onUpdate",({detail:o})=>this.dispatchEvent(new Ge("onUpdate",{detail:o})));const s=e.id.split(".")[0];return this.shortcutMap.set(e.id,e),this.shortcutsByCategory.has(s)?(i=this.shortcutsByCategory.get(s))==null||i.push(e):this.shortcutsByCategory.set(s,[e]),e}get(e){return this.shortcutMap.get(e)}getConflictingShortcuts(e){return Array.from(this.shortcutMap.values()).filter(n=>!n.isNull()&&n.matchesKeyState(e))}}const Be=Object.freeze(new DC),Ls={COPY:Be.createAndAdd({id:"GLOBAL.COPY",name:"Copy",shortcut:[ue.CTRL,pe.C],macShortcut:[ue.CMD,pe.C],isEditable:!1}),PASTE:Be.createAndAdd({id:"GLOBAL.PASTE",name:"Paste",shortcut:[ue.CTRL,pe.V],macShortcut:[ue.CMD,pe.V],isEditable:!1}),SAVE:Be.createAndAdd({id:"GLOBAL.SAVE",name:"Save",shortcut:[ue.CTRL,pe.S],macShortcut:[ue.CMD,pe.S],isEditable:!1}),SELECT_ALL:Be.createAndAdd({id:"GLOBAL.SELECT_ALL",name:"Select All",shortcut:[ue.CTRL,pe.A],macShortcut:[ue.CMD,pe.A],isEditable:!1}),LINKER:Be.createAndAdd({id:"GLOBAL.LINKER",name:"Linker",shortcut:[ue.CTRL,pe.L],macShortcut:[ue.CMD,pe.L]}),LINKER_CLOSE:Be.createAndAdd({id:"GLOBAL.LINKER_CLOSE",name:"Close Linker Overlay",shortcut:[pe.ESCAPE],macShortcut:[pe.ESCAPE],isEditable:!1})};const gl=Y.forwardRef((t,e)=>{const{children:n,className:s,disabled:i,isLinked:o,isLinkedSource:r,isInvalid:l,onClick:a,onMouseEnter:d,onMouseLeave:c,style:u,"data-testid":m}=t;return w("button",{ref:e,type:"button",className:W("btn-socketed",{"btn-socketed-linked":o!==void 0&&o||r},{"btn-socketed-linked-source":r},{"is-invalid":l},s),onClick:a,onMouseEnter:d,onMouseLeave:c,style:u,disabled:i,"data-testid":m,children:[n,h(G,{icon:td,className:"linked btn-socketed-icon",transform:"down-1"}),h(G,{icon:Ff,className:"is-invalid btn-socketed-icon"})]})});gl.displayName="SocketedButton";gl.defaultProps={children:void 0,className:"",disabled:!1,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const MC="_track_xvu02_28",NC="_handle_xvu02_11",FC="_ticks_xvu02_96",Nu={"handle-size":"15px","popover-width":"90px","time-slider":"_time-slider_xvu02_1","time-slider-popovers":"_time-slider-popovers_xvu02_6","handle-popper":"_handle-popper_xvu02_11","flex-spacer":"_flex-spacer_xvu02_24",track:MC,"track-fills":"_track-fills_xvu02_35","track-fill":"_track-fill_xvu02_35","track-fill-start":"_track-fill-start_xvu02_53","track-fill-middle":"_track-fill-middle_xvu02_54","track-fill-end":"_track-fill-end_xvu02_57","handle-track":"_handle-track_xvu02_60",handle:NC,ticks:FC,"tick-labels":"_tick-labels_xvu02_114","tick-label":"_tick-label_xvu02_114","tick-label-wrapper":"_tick-label-wrapper_xvu02_130"};parseInt(Nu["handle-size"],10);parseInt(Nu["popover-width"],10);Object.freeze({ERROR:"error"});const{dh:M}=globalThis,fl=R.exports.shape({name:R.exports.string.isRequired,type:R.exports.string.isRequired,description:R.exports.string,constituentType:R.exports.string}),Fu=R.exports.shape({not:R.exports.func.isRequired,and:R.exports.func.isRequired,or:R.exports.func.isRequired}),xC=R.exports.shape({asc:R.exports.func.isRequired,desc:R.exports.func.isRequired,abs:R.exports.func.isRequired,column:fl.isRequired,direction:R.exports.string.isRequired,isAbs:R.exports.bool.isRequired}),_C=R.exports.shape({columns:R.exports.arrayOf(fl).isRequired,customColumns:R.exports.arrayOf(R.exports.string).isRequired,filter:R.exports.arrayOf(Fu),addEventListener:R.exports.func.isRequired,removeEventListener:R.exports.func.isRequired,size:R.exports.number.isRequired,sort:R.exports.arrayOf(R.exports.any),copy:R.exports.func.isRequired,applyFilter:R.exports.func.isRequired,applySort:R.exports.func.isRequired,applyCustomColumns:R.exports.func.isRequired,description:R.exports.string}),LC=R.exports.shape({columns:R.exports.arrayOf(fl),filter:R.exports.arrayOf(R.exports.any),isExpanded:R.exports.func.isRequired,saveExpandedState:R.exports.func.isRequired,addEventListener:R.exports.func.isRequired,removeEventListener:R.exports.func.isRequired,size:R.exports.number.isRequired,sort:R.exports.arrayOf(R.exports.any),applyFilter:R.exports.func.isRequired,applySort:R.exports.func.isRequired}),Fr=R.exports.shape({name:R.exports.string.isRequired,type:R.exports.string.isRequired}),kC=R.exports.shape({created:R.exports.arrayOf(Fr).isRequired,updated:R.exports.arrayOf(Fr).isRequired,removed:R.exports.arrayOf(Fr).isRequired}),OC=R.exports.shape({groupingColumns:R.exports.arrayOf(R.exports.string),aggregations:R.exports.shape({}),includeConstituents:R.exports.bool,includeOriginalColumns:R.exports.bool,includeDescriptions:R.exports.bool}),AC=R.exports.shape({addEventListener:R.exports.func.isRequired,removeEventListener:R.exports.func.isRequired,onLogMessage:R.exports.func,getTable:R.exports.func.isRequired,runCode:R.exports.func.isRequired});Object.freeze({Column:fl,FilterCondition:Fu,IdeSession:AC,RollupConfig:OC,Sort:xC,Table:_C,TreeTable:LC,VariableChanges:kC,VariableDefinition:Fr});const xu=({type:t})=>{switch(t){case M.VariableType.TABLE:case M.VariableType.TABLEMAP:case M.VariableType.TREETABLE:return h(G,{icon:dd});case M.VariableType.FIGURE:return h(G,{icon:eu});case M.VariableType.PANDAS:return h(G,{icon:Uf});default:return h(G,{icon:va})}};class Cl extends S.exports.Component{constructor(e){super(e),this.container=null}componentDidMount(){this.colorize()}colorize(){const{children:e}=this.props;this.container&&e!=null&&ds.colorizeElement(this.container,{theme:"dh-dark"})}render(){const{children:e,language:n}=this.props;return h("div",{children:h("div",{"data-lang":n,ref:s=>{this.container=s},style:{pointerEvents:"none"},children:e})})}}class _u{static get LANGUAGE_MAP(){return new Map([["python","Python"],["groovy","Groovy"],["scala","Scala"]])}}class Ui{static hasComment(e){return e.comment!==void 0}static hasPattern(e){return e.pattern!==void 0}static hasOp(e){return e.op!==void 0}static parseArguments(e){return e==null||!(typeof e=="string"||e instanceof String)?[]:zp.parse(e).filter(n=>!this.hasComment(n)).map(n=>this.hasPattern(n)?n.pattern:this.hasOp(n)?n.op:`${n}`)}static formatTimestamp(e){if(e==null||!(e instanceof Date))return null;const n=`${e.getHours()}`.padStart(2,"0"),s=`${e.getMinutes()}`.padStart(2,"0"),i=`${e.getSeconds()}`.padStart(2,"0"),o=`${e.getMilliseconds()}`.padStart(3,"0");return`${n}:${s}:${i}.${o}`}static isTableType(e){return e===M.VariableType.TABLE||e===M.VariableType.TREETABLE}static isWidgetType(e){return e===M.VariableType.FIGURE||e===M.VariableType.OTHERWIDGET||e===M.VariableType.PANDAS}static isOpenableType(e){return Ui.isTableType(e)||Ui.isWidgetType(e)}static isFigureType(e){return e===M.VariableType.FIGURE}static isPandas(e){return e===M.VariableType.PANDAS}}const Lu=({children:t})=>w("div",{className:"console-history-item-result",children:[h("div",{className:"console-history-gutter",children:"-"}),h("div",{className:"console-history-content",children:t})]});Lu.propTypes={children:R.exports.node.isRequired};class ku extends S.exports.Component{constructor(e){super(e),this.updateElapsed=this.updateElapsed.bind(this),this.startTime=Date.now(),this.state={elapsed:0}}componentDidMount(){this.timer=setInterval(this.updateElapsed,1e3)}componentWillUnmount(){this.timer&&clearInterval(this.timer),this.timer=void 0}updateElapsed(){this.setState({elapsed:Math.round((Date.now()-this.startTime)/1e3)})}render(){const{disabled:e,onCancelClick:n}=this.props,{elapsed:s}=this.state;return h("div",{className:W("console-history-result-in-progress",{disabled:e}),children:w("span",{className:"badge",children:[h(_n,{}),"\xA0Running... ",In.formatElapsedTime(s),"\xA0",w("button",{type:"button",onClick:n,disabled:e,children:[h(G,{icon:Ho}),h(ge,{children:"Cancel"})]})]})})}}ku.defaultProps={disabled:!1};const ya=class extends S.exports.PureComponent{constructor(t){super(t),this.handleKeyPress=this.handleKeyPress.bind(this),this.handleMouseDown=this.handleMouseDown.bind(this),this.handleMouseMove=this.handleMouseMove.bind(this),this.handleMouseUp=this.handleMouseUp.bind(this),this.handleToggleError=this.handleToggleError.bind(this),this.handleMouseEnter=this.handleMouseEnter.bind(this),this.handleMouseLeave=this.handleMouseLeave.bind(this),this.mouseX=null,this.mouseY=null,this.isClicking=!1,this.state={isExpanded:!1,isTriggerHovered:!1}}handleKeyPress(t){switch(t.key){case"Enter":case" ":this.handleToggleError(),t.stopPropagation(),t.preventDefault();break}}handleMouseDown(t){this.mouseX=t.clientX,this.mouseY=t.clientY,this.isClicking=!0}handleMouseMove(t){this.mouseX!=null&&this.mouseY!=null?(Math.abs(t.clientX-this.mouseX)>=ya.mouseDragThreshold||Math.abs(t.clientY-this.mouseY)>=ya.mouseDragThreshold)&&(this.isClicking=!1):this.isClicking&&(this.isClicking=!1)}handleMouseUp(t){this.isClicking&&!t.shiftKey&&!t.metaKey&&!t.altKey&&this.handleToggleError(),this.mouseX=null,this.mouseY=null,this.isClicking=!1}handleToggleError(){this.setState(t=>({isExpanded:!t.isExpanded}))}handleMouseEnter(){this.setState({isTriggerHovered:!0})}handleMouseLeave(){this.setState({isTriggerHovered:!1})}render(){const{isExpanded:t,isTriggerHovered:e}=this.state,{message:n}=this.props;A(n);const s=n.indexOf(`
|
|
6
6
|
`),i=s>-1;let o=n;i&&(o=n.slice(0,s));const r=n.slice(s),l=e?"error-btn-link error-btn-link--active":"error-btn-link";return w("div",{className:W("error-message",{expanded:t}),children:[i&&w(he,{children:[h("div",{className:"error-gutter",children:h("button",{type:"button",onClick:this.handleToggleError,className:l,tabIndex:-1,children:h(G,{icon:t?as:ru,transform:"left-3"})})}),w("div",{className:"error-content",children:[h("div",{className:"console-error-text-trigger",role:"button",tabIndex:0,onKeyPress:this.handleKeyPress,onMouseDown:this.handleMouseDown,onMouseMove:this.handleMouseMove,onMouseEnter:this.handleMouseEnter,onMouseLeave:this.handleMouseLeave,onMouseUp:this.handleMouseUp,children:o}),t?r:""]})]}),!i&&h("div",{className:"error-content",children:h("div",{className:"console-error-text",children:o})})]},"error")}};let md=ya;md.defaultProps={message:""};md.mouseDragThreshold=5;const Lc=X.module("ConsoleHistoryItem");class Ou extends S.exports.PureComponent{constructor(e){super(e),this.handleCancelClick=this.handleCancelClick.bind(this),this.handleObjectClick=this.handleObjectClick.bind(this)}handleObjectClick(e){Lc.debug("handleObjectClick",e);const{openObject:n}=this.props;n(e)}handleCancelClick(){const{item:e}=this.props;e!=null&&e.cancelResult&&(Lc.debug(`Cancelling command: ${e.command}`),e.cancelResult())}render(){var d;const{disabled:e,item:n,language:s}=this.props,{disabledObjects:i,result:o}=n;let r=null;n.command!=null&&n.command!==""&&(r=w("div",{className:"console-history-item-command",children:[h("div",{className:"console-history-gutter",children:">"}),h("div",{className:"console-history-content",children:h(Cl,{language:s,children:n.command})})]}));const l=[];if(o){const{error:c,message:u,changes:m}=o;if(m){const{created:p,updated:g}=m;[...p,...g].forEach(f=>{const{title:b}=f,C=`${b}`,v=e===void 0||e||(i!=null?i:[]).indexOf(C)>=0,T=w(Vi,{onClick:()=>this.handleObjectClick(f),className:"btn-primary btn-console btn-console-object",disabled:v,children:[h(xu,{type:f.type})," ",b]},C);l.push(T)})}if(c!=null&&n.command==null){let p=`${(d=c.message)!=null?d:c}`;p||(p=c);const g=h(md,{message:p},"result-error");l.push(g)}if(u!==void 0&&u!==""){const p=h("div",{className:"log-message",children:u},"log-message");l.push(p)}}else{const c=h(ku,{onCancelClick:this.handleCancelClick,disabled:e},"in_progress");l.push(c)}let a=null;return l.length>0&&(a=h(Lu,{children:l})),w("div",{className:"container-fluid",children:[r,a]})}}Ou.defaultProps={disabled:!1};const Au=class extends S.exports.Component{static itemKey(t,e){return`${t}.${e.command}.${e.result&&e.result.message}.${e.result&&e.result.error}`}render(){const{disabled:t,items:e,language:n,openObject:s}=this.props,i=[];for(let o=0;o<e.length;o+=1){const r=e[o],l=h(Ou,{disabled:t,item:r,openObject:s,language:n},Au.itemKey(o,r));i.push(l)}return h("div",{className:"container-fluid console-history",children:i})}};let Pu=Au;Pu.defaultProps={disabled:!1};const PC={name:"Console",CLEAR:Be.createAndAdd({id:"CONSOLE.CLEAR",name:"Clear",shortcut:[ue.CTRL,pe.L],macShortcut:[ue.CTRL,pe.C]}),FOCUS_HISTORY:Be.createAndAdd({id:"CONSOLE.FOCUS_HISTORY",name:"Focus History",shortcut:[ue.CTRL,pe.H],macShortcut:[ue.CTRL,ue.OPTION,pe.H]})},HC={name:"Command History",FOCUS_HISTORY:Be.createAndAdd({id:"COMMAND_HISTORY.FOCUS_HISTORY",name:"Focus History Search",shortcut:[ue.CTRL,pe.H],macShortcut:[ue.CTRL,ue.OPTION,pe.H]}),SEND_TO_CONSOLE:Be.createAndAdd({id:"COMMAND_HISTORY.SEND_TO_CONSOLE",name:"Send to Console",shortcut:[pe.ENTER],macShortcut:[pe.ENTER]}),SEND_TO_NOTEBOOK:Be.createAndAdd({id:"COMMAND_HISTORY.SEND_TO_NOTEBOOK",name:"Send to Notebook",shortcut:[ue.CTRL,pe.ENTER],macShortcut:[ue.CMD,pe.ENTER]}),RUN:Be.createAndAdd({id:"COMMAND_HISTORY.RUN",name:"Run",shortcut:[ue.ALT,pe.R],macShortcut:[ue.OPTION,pe.R]})},VC={name:"Notebook",RUN:Be.createAndAdd({id:"NOTEBOOK.RUN",name:"Run",shortcut:[ue.ALT,pe.R],macShortcut:[ue.OPTION,pe.R]}),RUN_SELECTED:Be.createAndAdd({id:"NOTEBOOK.RUN_SELECTED",name:"Run Selected",shortcut:[ue.ALT,ue.SHIFT,pe.R],macShortcut:[ue.OPTION,ue.SHIFT,pe.R]}),FIND:Be.createAndAdd({id:"NOTEBOOK.FIND",name:"Find",shortcut:[ue.CTRL,pe.F],macShortcut:[ue.CMD,pe.F],isEditable:!1})},Nn={CONSOLE:PC,COMMAND_HISTORY:HC,NOTEBOOK:VC},bt=Object.freeze({FATAL:"FATAL",STDERR:"STDERR",ERROR:"ERROR",WARN:"WARN",STDOUT:"STDOUT",INFO:"INFO",DEBUG:"DEBUG",TRACE:"TRACE"}),UC="#2d2a2e",BC="#fcfcfa",$C="#fcd65b",WC="#b2b1b2",zC="#9edc6f",GC="#76d9e4",KC="#f95d84",qC="#aa9af4",YC="#f95d84",XC="#fcfcfa",jC="#7c7b7c",ve={"error-foreground":"#f95d84",background:UC,foreground:BC,"line-height":"19px",string:$C,"string-delim":"#929192",delimiter:WC,predefined:zC,keyword:GC,storage:KC,number:qC,operator:YC,identifier:XC,"namespace-identifier":"#f95d84","identifier-js":"#fcd65b",comment:jC,"input-option-active-border":"#929192","focus-border":"rgba(72, 120, 234, 0.85)","input-background":"#555356","input-foreground":"#f0f0ee","input-border":"#929192","editor-line-number-foreground":"#929192","editor-selection-background":"#676368","editor-line-highlight-bg":"#373438","context-menu-background":"#555356","context-menu-foreground":"#f0f0ee","menu-selection-background":"#4878ea","log-date":"#929192","log-error":"#f95d84","log-info":"#76d9e4","log-stdout":"#f0f0ee","log-warn":"#fcd65b","log-debug":"#aa9af4","log-trace":"#9edc6f","editor-find-match-background":"#3c5595","editor-find-match-highlight-background":"#343e5d","editor-widget-background":"#403e41","input-option-active-background":"#4878ea","input-option-active-foreground":"#f0f0ee","editor-suggest-widget-background":"#403e41","editor-suggest-widget-border":"#5b5a5c","editor-suggest-widget-foreground":"#f0f0ee","editor-suggest-widget-selected-background":"#41475a","editor-suggest-widget-highlightForeground":"#4878ea","list-hover-background":"#555356"},QC="python",ZC={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),action:{indentAction:1}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},JC={keywords:["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","exec","in","raise","continue","finally","is","return","for","try",":","=","isinstance","__debug__"],storage:["class","def","async","lambda"],operators:["+","-","*","**","/","//","%","<<",">>","&","|","^","~","<",">","<=",">=","==","!=","<>","+=","-=","*=","/","//=","%=","&=","|=","^=",">>=","<<=","**="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~&|+\-*/^%]+/,delimiters:/[;=.@:,`]/,escapes:/\\(?:[abfnrtv\\"'\n\r]|x[0-9A-Fa-f]{2}|[0-7]{3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\{\w+\})/,rawpre:/(?:[rR]|ur|Ur|uR|UR|br|Br|bR|BR)/,strpre:/(?:[buBU])/,tokenizer:{root:[[/@strpre?("""|''')/,{token:"string.delim",bracket:"@open",next:"@mstring.$1"}],[/@strpre?"([^"\\]|\\.)*$/,"string.invalid"],[/@strpre?'([^'\\]|\\.)*$/,"string.invalid"],[/@strpre?(["])/,{token:"string.delim",bracket:"@open",next:"@sstring.$1",nextEmbedded:"deephavenDb"}],[/@strpre?(["'])/,{token:"string.delim",bracket:"@open",next:"@string.$1"}],[/@rawpre("""|''')/,{token:"string.delim",bracket:"@open",next:"@mrawstring.$1"}],[/@rawpre"([^"\\]|\\.)*$/,"string.invalid"],[/@rawpre'([^'\\]|\\.)*$/,"string.invalid"],[/@rawpre(["'])/,{token:"string.delim",bracket:"@open",next:"@rawstring.$1"}],[/__[\w$]*/,"predefined"],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@storage":"storage","@default":"identifier"}}],[/[A-Z][\w]*/,{cases:{"~[A-Z0-9_]+":"constructor.identifier","@default":"namespace.identifier"}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywords":"keyword","@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+[lL]?/,"number.hex"],[/0[bB][0-1]+[lL]?/,"number.binary"],[/(0[oO][0-7]+|0[0-7]+)[lL]?/,"number.octal"],[/(0|[1-9]\d*)[lL]?/,"number"],[":",{token:"keyword",bracket:"@open"}],[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],["\\*/","comment","@pop"],[/[/*]/,"comment"]],mstring:[{include:"@strcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],sstring:[{include:"@strcontent"},[/["]/,{token:"string.delim",bracket:"@close",next:"@pop",nextEmbedded:"@pop"}],[/./,"string.invalid"]],string:[{include:"@strcontent"},[/[']/,{token:"string.delim",bracket:"@close",next:"@pop"}],[/./,"string.invalid"]],strcontent:[[/[^\\"']+/,"string"],[/\\$/,"string.escape"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"]],mrawstring:[{include:"@rawstrcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],rawstring:[{include:"@rawstrcontent"},[/["']/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/./,"string.invalid"]],rawstrcontent:[[/[^\\"']+/,"string"],[/\\["']/,"string"],[/\\u[0-9A-Fa-f]{4}/,"string.escape"],[/\\/,"string"]],whitespace:[[/\s+/,"white"],[/(^#.*$)/,"comment"],[/'''/,"string","@endDocString"],[/"""/,"string","@endDblDocString"]],endDocString:[[/[^']+/,"string"],[/\\'/,"string"],[/'''/,"string","@popall"],[/'/,"string"]],endDblDocString:[[/[^"]+/,"string"],[/\\"/,"string"],[/"""/,"string","@popall"],[/"/,"string"]]}},eb={id:QC,conf:ZC,language:JC},tb="groovy",nb={comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),action:{indentAction:1}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},sb={keywords:["and","del","from","not","while","as","elif","global","or","with","assert","else","if","pass","yield","break","except","import","print","println","class","exec","in","raise","continue","finally","is","return","def","for","lambda","try",":","=","isinstance","__debug__"],operators:["+","-","*","**","/","//","%","<<",">>","&","|","^","~","<",">","<=",">=","==","!=","<>","+=","-=","*=","/","//=","%=","&=","|=","^=",">>=","<<=","**="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.square"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[=><!~&|+\-*/^%]+/,delimiters:/[;=.@:,`]/,escapes:/\\(?:[abfnrtv\\"'\n\r]|x[0-9A-Fa-f]{2}|[0-7]{3}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8}|N\{\w+\})/,rawpre:/(?:[rR]|ur|Ur|uR|UR|br|Br|bR|BR)/,strpre:/(?:[buBU])/,tokenizer:{root:[[/@strpre?("""|''')/,{token:"string.delim",bracket:"@open",next:"@mstring.$1"}],[/@strpre?"([^"\\]|\\.)*$/,"string.invalid"],[/@strpre?'([^'\\]|\\.)*$/,"string.invalid"],[/@strpre?(["])/,{token:"string.delim",bracket:"@open",next:"@sstring.$1",nextEmbedded:"deephavenDb"}],[/@strpre?(["'])/,{token:"string.delim",bracket:"@open",next:"@string.$1"}],[/@rawpre("""|''')/,{token:"string.delim",bracket:"@open",next:"@mrawstring.$1"}],[/@rawpre"([^"\\]|\\.)*$/,"string.invalid"],[/@rawpre'([^'\\]|\\.)*$/,"string.invalid"],[/@rawpre(["'])/,{token:"string.delim",bracket:"@open",next:"@rawstring.$1"}],[/__[\w$]*/,"predefined"],[/[a-z_$][\w$]*/,{cases:{"@keywords":"keyword","@default":"identifier"}}],[/[A-Z][\w]*/,{cases:{"~[A-Z0-9_]+":"constructor.identifier","@default":"namespace.identifier"}}],{include:"@whitespace"},[/[{}()[\]]/,"@brackets"],[/@symbols/,{cases:{"@keywords":"keyword","@operators":"operator","@default":""}}],[/\d*\.\d+([eE][-+]?\d+)?/,"number.float"],[/0[xX][0-9a-fA-F]+[lL]?/,"number.hex"],[/0[bB][0-1]+[lL]?/,"number.binary"],[/(0[oO][0-7]+|0[0-7]+)[lL]?/,"number.octal"],[/(0|[1-9]\d*)[lL]?/,"number"],[":",{token:"keyword",bracket:"@open"}],[/@delimiters/,{cases:{"@keywords":"keyword","@default":"delimiter"}}]],mstring:[{include:"@strcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],sstring:[{include:"@strcontent"},[/["]/,{token:"string.delim",bracket:"@close",next:"@pop",nextEmbedded:"@pop"}],[/./,"string.invalid"]],string:[{include:"@strcontent"},[/[']/,{token:"string.delim",bracket:"@close",next:"@pop"}],[/./,"string.invalid"]],strcontent:[[/[^\\"']+/,"string"],[/\\$/,"string.escape"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"]],mrawstring:[{include:"@rawstrcontent"},[/"""|'''/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/["']/,"string"],[/./,"string.invalid"]],rawstring:[{include:"@rawstrcontent"},[/["']/,{cases:{"$#==$S2":{token:"string.delim",bracket:"@close",next:"@pop"},"@default":{token:"string"}}}],[/./,"string.invalid"]],rawstrcontent:[[/[^\\"']+/,"string"],[/\\["']/,"string"],[/\\u[0-9A-Fa-f]{4}/,"string.escape"],[/\\/,"string"]],whitespace:[[/[ \t\r\n]+/,""],[/\/\*\*(?!\/)/,"comment.doc","@doccomment"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^/*]+/,"comment"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],doccomment:[[/[^/*]+/,"comment.doc"],[/\*\//,"comment.doc","@pop"],[/[/*]/,"comment.doc"]]}},ib={id:tb,conf:nb,language:sb},ob="scala",rb={wordPattern:/(unary_[@~!#%^&*()\-=+\\|:<>/?]+)|([a-zA-Z_$][\w$]*?_=)|(`[^`]+`)|([a-zA-Z_$][\w$]*)/g,comments:{lineComment:"//",blockComment:["/*","*/"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],folding:{markers:{start:new RegExp("^\\s*//\\s*(?:(?:#?region\\b)|(?:<editor-fold\\b))"),end:new RegExp("^\\s*//\\s*(?:(?:#?endregion\\b)|(?:</editor-fold>))")}}},lb={keywords:["asInstanceOf","catch","class","classOf","def","do","else","extends","finally","for","foreach","forSome","if","import","isInstanceOf","macro","match","new","object","package","return","throw","trait","try","type","until","val","var","while","with","yield","given","enum","then"],softKeywords:["as","export","extension","end","derives","on"],constants:["true","false","null","this","super"],modifiers:["abstract","final","implicit","lazy","override","private","protected","sealed"],softModifiers:["inline","opaque","open","transparent","using"],name:/(?:[a-z_$][\w$]*|`[^`]+`)/,type:/(?:[A-Z][\w$]*)/,symbols:/[=><!~?:&|+\-*/^\\%@#]+/,digits:/\d+(_+\d+)*/,hexdigits:/[[0-9a-fA-F]+(_+[0-9a-fA-F]+)*/,escapes:/\\(?:[btnfr\\"']|x[0-9A-Fa-f]{1,4}|u[0-9A-Fa-f]{4}|U[0-9A-Fa-f]{8})/,fstring_conv:/[bBhHsScCdoxXeEfgGaAt]|[Tn](?:[HIklMSLNpzZsQ]|[BbhAaCYyjmde]|[RTrDFC])/,tokenizer:{root:[[/\braw"""/,{token:"string.quote",bracket:"@open",next:"@rawstringt"}],[/\braw"/,{token:"string.quote",bracket:"@open",next:"@rawstring"}],[/\bs"""/,{token:"string.quote",bracket:"@open",next:"@sstringt"}],[/\bs"/,{token:"string.quote",bracket:"@open",next:"@sstring"}],[/\bf""""/,{token:"string.quote",bracket:"@open",next:"@fstringt"}],[/\bf"/,{token:"string.quote",bracket:"@open",next:"@fstring"}],[/"""/,{token:"string.quote",bracket:"@open",next:"@stringt"}],[/"/,{token:"string.quote",bracket:"@open",next:"@string"}],[/(@digits)[eE]([-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/(@digits)\.(@digits)([eE][-+]?(@digits))?[fFdD]?/,"number.float","@allowMethod"],[/0[xX](@hexdigits)[Ll]?/,"number.hex","@allowMethod"],[/(@digits)[fFdD]/,"number.float","@allowMethod"],[/(@digits)[lL]?/,"number","@allowMethod"],[/\b_\*/,"key"],[/\b(_)\b/,"keyword","@allowMethod"],[/\bimport\b/,"keyword","@import"],[/\b(case)([ \t]+)(class)\b/,["keyword.modifier","white","keyword"]],[/\bcase\b/,"keyword","@case"],[/\bva[lr]\b/,"keyword","@vardef"],[/\b(def)([ \t]+)((?:unary_)?@symbols|@name(?:_=)|@name)/,["keyword","white","identifier"]],[/@name(?=[ \t]*:(?!:))/,"variable"],[/(\.)(@name|@symbols)/,[{token:"operator"},{token:"@rematch",next:"@allowMethod"}]],[/([{(])(\s*)(@name(?=\s*=>))/,["@brackets","white","variable"]],[/@name/,{cases:{"@keywords":"keyword","@softKeywords":"keyword","@modifiers":"keyword.modifier","@softModifiers":"keyword.modifier","@constants":{token:"constant",next:"@allowMethod"},"@default":{token:"identifier",next:"@allowMethod"}}}],[/@type/,"type","@allowMethod"],{include:"@whitespace"},[/@[a-zA-Z_$][\w$]*(?:\.[a-zA-Z_$][\w$]*)*/,"annotation"],[/[{(]/,"@brackets"],[/[})]/,"@brackets","@allowMethod"],[/\[/,"operator.square"],[/](?!\s*(?:va[rl]|def|type)\b)/,"operator.square","@allowMethod"],[/]/,"operator.square"],[/([=-]>|<-|>:|<:|:>|<%)(?=[\s\w()[\]{},."'`])/,"keyword"],[/@symbols/,"operator"],[/[;,.]/,"delimiter"],[/'[a-zA-Z$][\w$]*(?!')/,"attribute.name"],[/'[^\\']'/,"string","@allowMethod"],[/(')(@escapes)(')/,[{token:"string"},{token:"string.escape"},{token:"string",next:"@allowMethod"}]],[/'/,"string.invalid"]],import:[[/;/,"delimiter","@pop"],[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/@name|@type/,"type"],[/[(){}]/,"@brackets"],[/[[\]]/,"operator.square"],[/[.,]/,"delimiter"]],allowMethod:[[/^|$/,"","@pop"],[/[ \t]+/,"white"],[/[\n\r]+/,"white","@pop"],[/\/\*/,"comment","@comment"],[/(?==>[\s\w([{])/,"keyword","@pop"],[/(@name|@symbols)(?=[ \t]*[[({"'`]|[ \t]+(?:[+-]?\.?\d|\w))/,{cases:{"@keywords":{token:"keyword",next:"@pop"},"->|<-|>:|<:|<%":{token:"keyword",next:"@pop"},"@default":{token:"@rematch",next:"@pop"}}}],["","","@pop"]],comment:[[/[^/*]+/,"comment"],[/\/\*/,"comment","@push"],[/\*\//,"comment","@pop"],[/[/*]/,"comment"]],case:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword","@allowMethod"],[/\bif\b|=>/,"keyword","@pop"],[/`[^`]+`/,"identifier","@allowMethod"],[/@name/,"variable","@allowMethod"],[/:::?|\||@(?![a-z_$])/,"keyword"],{include:"@root"}],vardef:[[/\b_\*/,"key"],[/\b(_|true|false|null|this|super)\b/,"keyword"],[/@name/,"variable"],[/:::?|\||@(?![a-z_$])/,"keyword"],[/=|:(?!:)/,"operator","@pop"],[/$/,"white","@pop"],{include:"@root"}],string:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],stringt:[[/[^\\"\n\r]+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],fstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],fstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/%%/,"string"],[/(%)([-#+ 0,(])(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","keyword.modifier","number","metatag"]],[/(%)(\d+|\.\d+|\d+\.\d+)(@fstring_conv)/,["metatag","number","metatag"]],[/(%)([-#+ 0,(])(@fstring_conv)/,["metatag","keyword.modifier","metatag"]],[/(%)(@fstring_conv)/,["metatag","metatag"]],[/./,"string"]],sstring:[[/@escapes/,"string.escape"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],sstringt:[[/@escapes/,"string.escape"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/\$\$/,"string"],[/(\$)([a-z_]\w*)/,["operator","identifier"]],[/\$\{/,"operator","@interp"],[/./,"string"]],interp:[[/{/,"operator","@push"],[/}/,"operator","@pop"],{include:"@root"}],rawstring:[[/[^"]/,"string"],[/"/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}]],rawstringt:[[/[^"]/,"string"],[/"(?=""")/,"string"],[/"""/,{token:"string.quote",bracket:"@close",switchTo:"@allowMethod"}],[/"/,"string"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]]}},ab={id:ob,conf:rb,language:lb},db="deephavenDb",cb={comments:{lineComment:"#",blockComment:["'''","'''"]},brackets:[["{","}"],["[","]"],["(",")"]],autoClosingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"',notIn:["string"]},{open:"'",close:"'",notIn:["string","comment"]}],surroundingPairs:[{open:"{",close:"}"},{open:"[",close:"]"},{open:"(",close:")"},{open:'"',close:'"'},{open:"'",close:"'"}],onEnterRules:[{beforeText:new RegExp("^\\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\\s*$"),action:{indentAction:1}}],folding:{offSide:!0,markers:{start:new RegExp("^\\s*#region\\b"),end:new RegExp("^\\s*#endregion\\b")}}},hb={tokenPostfix:".js",keywords:["boolean","break","byte","case","catch","char","class","const","continue","debugger","default","delete","do","double","else","enum","export","extends","false","final","finally","float","for","function","goto","if","implements","import","in","instanceof","int","interface","long","native","new","null","package","private","protected","public","return","short","static","super","switch","synchronized","this","throw","throws","transient","true","try","typeof","var","void","volatile","while","with"],builtins:["define","require","window","document","undefined"],operators:["=",">","<","!","~","?",":","==","<=",">=","!=","&&","||","++","--","+","-","*","/","&","|","^","%","<<",">>",">>>","+=","-=","*=","/=","&=","|=","^=","%=","<<=",">>=",">>>="],brackets:[{open:"{",close:"}",token:"delimiter.curly"},{open:"[",close:"]",token:"delimiter.bracket"},{open:"(",close:")",token:"delimiter.parenthesis"}],symbols:/[~!@#%\^&*-+=|\\:`<>.?\/]+/,escapes:/\\(?:[btnfr\\"']|[0-7][0-7]?|[0-3][0-7]{2})/,exponent:/[eE][\-+]?[0-9]+/,regexpctl:/[(){}\[\]\$\^|\-*+?\.]/,regexpesc:/\\(?:[bBdDfnrstvwWn0\\\/]|@regexpctl|c[A-Z]|x[0-9a-fA-F]{2}|u[0-9a-fA-F]{4})/,tokenizer:{root:[[/([a-zA-Z_\$][\w\$]*)(\s*)(:?)/,{cases:{"$1@keywords":["keyword","white","delimiter"],$3:["key.identifier","white","delimiter"],"$1@builtins":["predefined.identifier","white","delimiter"],"@default":["identifier","white","delimiter"]}}],{include:"@whitespace"},[/\/(?=([^\\\/]|\\.)+\/)/,{token:"regexp.slash",bracket:"@open",next:"@regexp"}],[/[{}()\[\]]/,"@brackets"],[/[;,.]/,"delimiter"],[/@symbols/,{cases:{"@operators":"operator","@default":""}}],[/\d+\.\d*(@exponent)?/,"number.float"],[/\.\d+(@exponent)?/,"number.float"],[/\d+@exponent/,"number.float"],[/0[xX][\da-fA-F]+/,"number.hex"],[/0[0-7]+/,"number.octal"],[/\d+/,"number"],[/"([^"\\]|\\.)*$/,"string.invalid"],[/'([^'\\]|\\.)*$/,"string.invalid"],[/"/,"string",'@string."'],[/'/,"string","@string.'"]],whitespace:[[/[ \t\r\n]+/,"white"],[/\/\*/,"comment","@comment"],[/\/\/.*$/,"comment"]],comment:[[/[^\/*]+/,"comment"],[/\/\*/,"comment.invalid"],["\\*/","comment","@pop"],[/[\/*]/,"comment"]],string:[[/[^\\"']+/,"string"],[/@escapes/,"string.escape"],[/\\./,"string.escape.invalid"],[/["']/,{cases:{"$#==$S2":{token:"string",next:"@pop"},"@default":"string"}}]],regexp:[[/(\{)(\d+(?:,\d*)?)(\})/,["@brackets.regexp.escape.control","regexp.escape.control","@brackets.regexp.escape.control"]],[/(\[)(\^?)(?=(?:[^\]\\\/]|\\.)+)/,[{token:"@brackets.regexp.escape.control"},{token:"regexp.escape.control",next:"@regexrange"}]],[/(\()(\?:|\?=|\?!)/,["@brackets.regexp.escape.control","regexp.escape.control"]],[/[()]/,"@brackets.regexp.escape.control"],[/@regexpctl/,"regexp.escape.control"],[/[^\\\/]/,"regexp"],[/@regexpesc/,"regexp.escape"],[/\\\./,"regexp.invalid"],["/",{token:"regexp.slash",bracket:"@close"},"@pop"]],regexrange:[[/-/,"regexp.escape.control"],[/\^/,"regexp.invalid"],[/@regexpesc/,"regexp.escape"],[/[^\]]/,"regexp"],[/\]/,"@brackets.regexp.escape.control","@pop"]]}},ub={id:db,conf:cb,language:hb},mb="log",pb={},gb={tokenizer:{root:[[/ FATAL[\s\S]*/,{token:"error",next:"@error"}],[/ ERROR[\s\S]*/,{token:"error",next:"@error"}],[/ STDERR[\s\S]*/,{token:"error",next:"@error"}],[/ STDOUT.*/,{token:"stdout",next:"@stdout"}],[/ INFO[\s\S]*/,{token:"info",next:"@info"}],[/ WARN.*/,{token:"warn",next:"@warn"}],[/ TRACE[\s\S]*/,{token:"trace",next:"@trace"}],[/ DEBUG[.\s\S]*/,{token:"debug",next:"@debug"}],[/^\d{2}:\d{2}:\d{2}.\d{3}/,"date"]],error:[{include:"@body"}],info:[{include:"@body"}],warn:[{include:"@body"}],stdout:[{include:"@body"}],trace:[{include:"@body"}],debug:[{include:"@body"}],body:[[/^\d{2}:\d{2}:\d{2}.\d{3}/,{token:"date",next:"@pop"}],[/[\s\S]*/,{token:"$S0"}]]}},fb={id:mb,conf:pb,language:gb},An=X.module("MonacoUtils");window.MonacoEnvironment={getWorker(){return new ag}};class rt{static init(){An.debug("Initializing Monaco...");const{registerLanguages:e,removeHashtag:n}=rt,s=[{token:"",foreground:n(ve.foreground)},{token:"string",foreground:n(ve.string)},{token:"string.delim",foreground:n(ve["string-delim"])},{token:"keyword",foreground:n(ve.keyword)},{token:"identifier.js",foreground:n(ve["identifier-js"])},{token:"delimiter",foreground:n(ve.delimiter)},{token:"comment",foreground:n(ve.comment)},{token:"number",foreground:n(ve.number)},{token:"storage",foreground:n(ve.storage)},{token:"identifier",foreground:n(ve.identifier)},{token:"namespace.identifier",foreground:n(ve["namespace-identifier"])},{token:"operator",foreground:n(ve.operator)},{token:"predefined",foreground:n(ve.predefined)},{token:"error.log",foreground:ve["log-error"].substring(1)},{token:"warn.log",foreground:n(ve["log-warn"])},{token:"info.log",foreground:n(ve["log-info"])},{token:"stdout.log",foreground:n(ve["log-stdout"])},{token:"trace.log",foreground:n(ve["log-trace"])},{token:"debug.log",foreground:n(ve["log-debug"])},{token:"date.log",foreground:n(ve["log-date"])}],i={errorForeground:ve["error-foreground"],"inputOption.activeBorder":ve["input-option-active-border"],"editor.background":ve.background,"editor.foreground":ve.foreground,"editor.lineHighlightBackground":ve["editor-line-highlight-bg"],"editorLineNumber.foreground":ve["editor-line-number-foreground"],"editor.selectionBackground":ve["editor-selection-background"],"editor.findMatchBackground":ve["editor-find-match-background"],"editor.findMatchHighlightBackground":ve["editor-find-match-highlight-background"],"editorSuggestWidget.background":ve["editor-suggest-widget-background"],"editorSuggestWidget.border":ve["editor-suggest-widget-border"],"editorSuggestWidget.foreground":ve["editor-suggest-widget-foreground"],"editorSuggestWidget.selectedBackground":ve["editor-suggest-widget-selected-background"],"editorSuggestWidget.highlightForeground":ve["editor-suggest-widget-highlightForeground"],"list.hoverBackground":ve["list-hover-background"],"dropdown.background":ve["context-menu-background"],"dropdown.foreground":ve["context-menu-foreground"],"menu.selectionBackground":ve["menu-selection-background"],"list.focusBackground":ve["menu-selection-background"],"editorWidget.background":ve["editor-widget-background"],"inputOption.activeBackground":ve["input-option-active-background"],"inputOption.activeForeground":ve["input-option-active-foreground"],focusBorder:ve["focus-border"],"input.background":ve["input-background"],"input.foreground":ve["input-foreground"],"input.border":ve["input-border"]};ds.defineTheme("dh-dark",{base:"vs-dark",inherit:!0,rules:s,colors:i}),An.debug2("monaco theme: ",ve),ds.setTheme("dh-dark"),e([ub,eb,ib,fb,ab]),An.debug("Monaco initialized.")}static removeHashtag(e){return e.substring(1)}static registerLanguages(e){const n=e.map(({id:s})=>s);Ri.getLanguages().filter(({id:s})=>n.includes(s)).forEach(s=>{const i=s;An.debug2("Overriding default language loader:",i.id)}),e.forEach(s=>{rt.registerLanguage(s)})}static registerLanguage(e){An.debug2("Registering language: ",e.id),Ri.register(e),Ri.onLanguage(e.id,()=>{Ri.setLanguageConfiguration(e.id,e.conf),Ri.setMonarchTokensProvider(e.id,e.language)})}static setEOL(e,n=ds.EndOfLineSequence.LF){var s;(s=e.getModel())==null||s.setEOL(n)}static openDocument(e,n){const s=e.getModel();A(s);const i={textDocument:{uri:`${s.uri}`,languageId:s.getLanguageId(),version:s.getVersionId(),text:s.getValue()}};return An.debug2("didOpenDocumentParams: ",i),n.openDocument(i),e.onDidChangeModelContent(r=>{const{changes:l,versionId:a}=r,d=[];for(let c=0;c<l.length;c+=1){const u=l[c],{range:m,rangeLength:p,text:g}=u,f={range:{start:{line:m.startLineNumber-1,character:m.startColumn-1},end:{line:m.endLineNumber-1,character:m.endColumn-1}},rangeLength:p,text:g};d.push(f)}if(d.length>0){const c={textDocument:{version:a,uri:`${s.uri}`},contentChanges:d};An.debug2("didChangeDocumentParams",c),n.changeDocument(c)}})}static closeDocument(e,n){const s=e.getModel();A(s);const i={textDocument:{uri:`${s.uri}`}};n.closeDocument(i)}static registerPasteHandler(e){e.onDidPaste(n=>{const s=/“|”/g,i=/\u200b/g,o=e.getModel();A(o);const r=o.getValueInRange(n.range);(s.test(r)||i.test(r))&&o.applyEdits([{range:n.range,text:r.replace(s,'"').replace(i,"")}])})}static isMacPlatform(){const{platform:e}=window.navigator;return e.startsWith("Mac")}static removeConflictingKeybindings(e){const n=[{windows:"ctrl+D",mac:"meta+D"},{windows:"ctrl+H"}];try{n.forEach(s=>{rt.isMacPlatform()&&s.mac===""||!rt.isMacPlatform()&&s.windows===""||rt.removeKeybinding(e,rt.isMacPlatform()?s.mac:s.windows)})}catch(s){An.error(s)}}static removeKeybinding(e,n){if(n===void 0)return;const s=e._standaloneKeybindingService._getResolver()._map.get(n);s!=null?s.forEach(i=>{An.debug2(`Removing Monaco keybinding ${n} for ${i.command}`),e._standaloneKeybindingService.addDynamicKeybinding(`-${i.command}`,null,()=>{})}):An.warn(`Did not find any keybindings to remove for ${n}`)}static getMonacoKeyCodeFromShortcut(e){const{keyState:n}=e,{keyValue:s}=n;return s===null?0:rt.isMacPlatform()?(n.metaKey?gn.CtrlCmd:0)|(n.shiftKey?gn.Shift:0)|(n.altKey?gn.Alt:0)|(n.ctrlKey?gn.WinCtrl:0)|pc.fromString(s):(n.ctrlKey?gn.CtrlCmd:0)|(n.shiftKey?gn.Shift:0)|(n.altKey?gn.Alt:0)|(n.metaKey?gn.WinCtrl:0)|pc.fromString(s)}}const kc=X.module("MonacoCompletionProvider");class Hu extends S.exports.PureComponent{constructor(e){super(e),this.handleCompletionRequest=this.handleCompletionRequest.bind(this)}componentDidMount(){const{language:e}=this.props;this.registeredCompletionProvider=Ri.registerCompletionItemProvider(e!=null?e:"",{provideCompletionItems:this.handleCompletionRequest,triggerCharacters:['"',".","'","(","[","{",","]})}componentWillUnmount(){var e;(e=this.registeredCompletionProvider)==null||e.dispose()}handleCompletionRequest(e,n,s){const{model:i,session:o}=this.props;if(e!==i)return null;const r={textDocument:{uri:`${e.uri}`},position:{line:n.lineNumber-1,character:n.column-1},context:s},l=o.getCompletionItems(r);return kc.debug("Completion items received: ",r,l),l.then(d=>{const c=d.map(u=>{const{label:m,kind:p,detail:g,documentation:f,sortText:b,filterText:C,textEdit:v,insertTextFormat:T}=u,{start:E,end:y}=v.range,I={startLineNumber:E.line+1,startColumn:E.character+1,endLineNumber:y.line+1,endColumn:y.character+1};return{label:m,kind:p,detail:g,documentation:f,sortText:b,filterText:C,insertText:v.text,insertTextRules:T===2?4:T,range:I}});return{incomplete:!0,suggestions:c}}).catch(d=>(kc.error("There was an error retrieving completion items",d),{suggestions:[]}))}render(){return null}}const ea=X.module("ConsoleInput"),$r=parseInt(ve["line-height"],10),Vu=6,Uu=6,Cb=$r+Vu+Uu,ta=100,Bu=class extends S.exports.PureComponent{constructor(t){super(t),this.handleWindowResize=this.handleWindowResize.bind(this),this.commandContainer=Y.createRef(),this.commandHistoryIndex=null,this.timestamp=Date.now(),this.bufferIndex=0,this.history=[],this.modifiedCommands=new Map,this.state={commandEditorHeight:$r,isFocused:!1,model:null}}componentDidMount(){this.initCommandEditor(),window.addEventListener("resize",this.handleWindowResize),this.loadMoreHistory()}componentDidUpdate(){this.layoutEditor()}componentWillUnmount(){window.removeEventListener("resize",this.handleWindowResize),this.loadingPromise!=null&&this.loadingPromise.cancel(),this.destroyCommandEditor()}setConsoleText(t,e=!0,n=!1){var s;!t||(ea.debug("Command received: ",t),this.commandHistoryIndex=null,(s=this.commandEditor)==null||s.setValue(t),e&&this.focusEnd(),this.updateDimensions(),n&&this.processCommand())}initCommandEditor(){const{language:t,session:e}=this.props,n={copyWithSyntaxHighlighting:!1,cursorStyle:"block",fixedOverflowWidgets:!0,folding:!1,fontFamily:"Fira Mono",glyphMargin:!1,language:t,lineHeight:$r,lineDecorationsWidth:3,lineNumbers:"off",minimap:{enabled:!1},renderLineHighlight:"none",scrollBeyondLastLine:!1,scrollbar:{arrowSize:0,horizontal:"hidden",horizontalScrollbarSize:0},padding:{top:Vu,bottom:Uu},tabCompletion:"on",value:"",wordWrap:"on"},s=this.commandContainer.current;A(s),this.commandEditor=ds.create(s,n),rt.setEOL(this.commandEditor),rt.openDocument(this.commandEditor,e),this.commandEditor.onDidChangeModelContent(()=>{var o;const i=(o=this.commandEditor)==null?void 0:o.getValue();this.modifiedCommands.set(this.commandHistoryIndex,i!=null?i:null),this.updateDimensions()}),this.commandEditor.onDidFocusEditorText(()=>{this.setState({isFocused:!0})}),this.commandEditor.onDidBlurEditorText(()=>{this.setState({isFocused:!1})}),this.commandEditor.onKeyDown(i=>{var c;const{commandEditor:o,commandHistoryIndex:r}=this,l=o==null?void 0:o.getPosition();A(l);const{lineNumber:a}=l,d=o==null?void 0:o.getModel();if(i.keyCode===Bn.UpArrow&&!this.isSuggestionMenuPopulated()&&a===1){r!=null?this.loadCommand(r+1):this.loadCommand(0),this.focusStart(),i.stopPropagation(),i.preventDefault();return}if(i.keyCode===Bn.DownArrow&&!this.isSuggestionMenuPopulated()&&a===(d==null?void 0:d.getLineCount())){r!=null&&r>0?this.loadCommand(r-1):this.loadCommand(null),this.focusEnd(),i.stopPropagation(),i.preventDefault();return}!i.altKey&&!i.shiftKey&&!i.metaKey&&(i.keyCode===Bn.Enter?this.isSuggestionMenuPopulated()||(i.stopPropagation(),i.preventDefault(),this.processCommand()):i.keyCode===Bn.Tab&&(this.isSuggestionMenuActive()?this.isSuggestionMenuPopulated()||(i.stopPropagation(),i.preventDefault()):(i.stopPropagation(),i.preventDefault(),(c=this.commandEditor)==null||c.trigger("Tab key trigger suggestions","editor.action.triggerSuggest",{}))))}),this.commandEditor.addCommand(gn.CtrlCmd|Bn.KeyF,()=>{}),rt.removeConflictingKeybindings(this.commandEditor),rt.registerPasteHandler(this.commandEditor),this.commandEditor.focus(),this.updateDimensions(),this.setState({model:this.commandEditor.getModel()})}destroyCommandEditor(){const{session:t}=this.props;this.commandEditor&&(rt.closeDocument(this.commandEditor,t),this.commandEditor.dispose(),this.commandEditor=void 0)}handleWindowResize(){this.updateDimensions()}isSuggestionMenuActive(){var t,e,n;return this.commandSuggestionContainer||(this.commandSuggestionContainer=(e=(t=this.commandEditor)==null?void 0:t.getDomNode())==null?void 0:e.querySelector(".suggest-widget")),(n=this.commandSuggestionContainer&&this.commandSuggestionContainer.classList.contains("visible"))!=null?n:!1}isSuggestionMenuPopulated(){var t,e,n;return this.isSuggestionMenuActive()&&((n=(e=(t=this.commandSuggestionContainer)==null?void 0:t.querySelector(".monaco-list-rows"))==null?void 0:e.childElementCount)!=null?n:0)>0}focus(){var t;(t=this.commandEditor)==null||t.focus()}focusStart(){var s,i,o,r,l;const t=(s=this.commandEditor)==null?void 0:s.getModel();A(t);const e=t.getLineLength(1)+1,n=(i=this.commandEditor)==null?void 0:i.getTopForPosition(1,e);A(n),(o=this.commandEditor)==null||o.setPosition({lineNumber:1,column:e}),(r=this.commandEditor)==null||r.setScrollTop(n),(l=this.commandEditor)==null||l.focus()}focusEnd(){var i,o,r,l,a;const t=(i=this.commandEditor)==null?void 0:i.getModel();A(t);const e=t.getLineCount(),n=t.getLineLength(e)+1,s=(o=this.commandEditor)==null?void 0:o.getTopForPosition(e,n);A(s),(r=this.commandEditor)==null||r.setPosition({lineNumber:e,column:n}),(l=this.commandEditor)==null||l.setScrollTop(s),(a=this.commandEditor)==null||a.focus()}clear(){var t,e,n;(t=this.commandEditor)==null||t.focus(),(n=(e=this.commandEditor)==null?void 0:e.getModel())==null||n.setValue(""),this.commandHistoryIndex=null}layoutEditor(){this.commandEditor&&this.commandEditor.layout()}loadCommand(t){var s,i;if(t===null||t>=this.history.length)return;const e=this.modifiedCommands.get(t),n=t===null?"":this.history[this.history.length-t-1];this.commandHistoryIndex=t,(i=(s=this.commandEditor)==null?void 0:s.getModel())==null||i.setValue(e!=null?e:n),t!==null&&t>this.history.length-ta&&this.loadMoreHistory()}async loadMoreHistory(){try{if(this.loadingPromise!=null||this.bufferIndex==null)return;const{commandHistoryStorage:t,language:e,scope:n}=this.props;this.loadingPromise=ye.makeCancelable(t.getTable(e,n!=null?n:"",this.timestamp),o=>o.close());const s=await this.loadingPromise;s.setReversed(!0),s.setViewport({top:this.bufferIndex,bottom:this.bufferIndex+ta-1}),this.loadingPromise=ye.makeCancelable(s.getViewportData(),()=>s.close());const i=await this.loadingPromise;this.bufferIndex+=ta,this.bufferIndex>=s.size&&(this.bufferIndex=null),this.history=[...i==null?void 0:i.items.filter(({name:o},r,l)=>r===0||o!==l[r-1].name).map(({name:o})=>o).reverse(),...this.history],this.loadingPromise=void 0,s.close()}catch(t){if(this.loadingPromise=void 0,ye.isCanceled(t)){ea.debug2("Promise canceled, not loading history");return}ea.error("Error fetching history",t)}}processCommand(){var n,s;this.commandHistoryIndex=null,this.modifiedCommands.clear();const t=(n=this.commandEditor)==null?void 0:n.getValue().trim();A(t),t!==""&&(this.history.length===0||t!==this.history[this.history.length-1])&&this.history.push(t),(s=this.commandEditor)==null||s.setValue(""),this.updateDimensions();const{onSubmit:e}=this.props;e(t)}updateDimensions(){if(!this.commandEditor)return;const{maxHeight:t}=this.props;A(t);const e=this.commandEditor.getContentHeight(),n=Math.max(Math.min(e,t),Cb),i={overviewRulerLanes:e>n?void 0:0};this.setState({commandEditorHeight:n},()=>{var o,r;(o=this.commandEditor)==null||o.updateOptions(i),(r=this.commandEditor)==null||r.layout()})}render(){const{disabled:t,language:e,session:n}=this.props,{commandEditorHeight:s,isFocused:i,model:o}=this.state;return h("div",{className:W("console-input-wrapper",{disabled:t}),children:w("div",{className:W("console-input-inner-wrapper",{focus:i}),children:[h("div",{className:Bu.INPUT_CLASS_NAME,ref:this.commandContainer,style:{height:s}}),o&&h(Hu,{model:o,language:e,session:n})]})})}};let Wr=Bu;Wr.defaultProps={maxHeight:$r*10,scope:null,disabled:!1};Wr.INPUT_CLASS_NAME="console-input";const Oc="pasted values",bb=[/^audio.*/,/^font.*/,/^image.*/,/^video.*/],na=[".csv",".tsv",".tab",".psv",".dsv",".txt"],Ac=[".zip"],Di=class extends S.exports.Component{constructor(t){super(t),this.getValidExtensions=fe(e=>e?[...na,...Ac]:[...na]),this.getAcceptString=fe(e=>this.getValidExtensions(e).join(", ")),this.getFileTypeErrorString=fe(e=>tn.join(this.getValidExtensions(e),"or")),this.handleSelectFile=this.handleSelectFile.bind(this),this.handleFiles=this.handleFiles.bind(this),this.handleDrop=this.handleDrop.bind(this),this.unstageFile=this.unstageFile.bind(this),this.handleMenuPaste=this.handleMenuPaste.bind(this),this.handlePasteEvent=this.handlePasteEvent.bind(this),this.fileElem=Y.createRef(),this.divElem=Y.createRef(),this.state={selectedFileName:""}}static isValidDropItem(t){return t!=null&&t.kind==="file"&&!bb.find(e=>e.test(t.type))}static isValidExtension(t,e=!1){return na.some(n=>t.endsWith(n))||e&&Ac.some(n=>t.endsWith(n))}static handleDragOver(t){t.preventDefault(),t.stopPropagation()}static getIcon(t){return t===Oc?bc:t.endsWith(".csv")?xf:t.endsWith(".zip")?lf:kf}componentDidMount(){var t,e;(t=this.divElem.current)==null||t.addEventListener("paste",this.handlePasteEvent),(e=this.divElem.current)==null||e.focus()}componentWillUnmount(){var t;(t=this.divElem.current)==null||t.removeEventListener("paste",this.handlePasteEvent)}handleSelectFile(){var t;this.fileElem.current&&(this.fileElem.current.value="",(t=this.fileElem.current)==null||t.click())}handleFiles(t){t.stopPropagation(),t.preventDefault();const{files:e}=t.target;e!=null&&this.handleFile(e[0])}handleDrop(t){const{allowZip:e,clearDragError:n,dragError:s}=this.props;if(t.preventDefault(),t.stopPropagation(),s!=null){n();return}if(t.dataTransfer==null||t.dataTransfer.items==null||t.dataTransfer.items.length===0)return;const i=t.dataTransfer.items[0].getAsFile();A(i),Di.isValidExtension(i.name,e)?this.handleFile(i):this.setState({dropError:Di.FILE_TYPE_ERROR})}unstageFile(t){const{onCancel:e}=this.props;t.stopPropagation(),t.preventDefault(),e(),this.setState({selectedFileName:"",dropError:void 0})}handleFile(t){const{onFileOpened:e}=this.props;e(t),this.setState({selectedFileName:t.name,dropError:void 0})}handleMenuPaste(){const{onPaste:t,onError:e,uploadInProgress:n}=this.props;n||navigator.clipboard.readText().then(s=>{t(s),this.setState({selectedFileName:Oc,dropError:void 0})}).catch(s=>e(s))}handlePasteEvent(t){t.stopPropagation(),t.preventDefault(),this.handleMenuPaste()}makeContextMenuItems(){const{uploadInProgress:t}=this.props;return[{title:"Paste",icon:bc,action:this.handleMenuPaste,shortcut:Ls.PASTE,disabled:t}]}render(){const{allowZip:t,dragError:e,uploadInProgress:n}=this.props,{selectedFileName:s,dropError:i}=this.state,o=e!=null?e:i,r=this.makeContextMenuItems();return w("div",{ref:this.divElem,className:"csv-overlay fill-parent-absolute",onDragOver:Di.handleDragOver,onDrop:this.handleDrop,tabIndex:-1,children:[h(se,{actions:r}),h("input",{ref:this.fileElem,type:"file",id:"fileElem",accept:this.getAcceptString(t),style:{display:"none"},onChange:this.handleFiles,"data-testid":"fileElem"}),!s&&(o===void 0||o==="")&&w("div",{className:"message-content",children:[h("div",{className:"message-icon",children:h(G,{icon:_f})}),h("label",{children:"Drop file (or paste values) here to import"}),h("div",{className:"message-small",children:h("label",{children:"or"})}),h("button",{type:"button",className:"btn btn-primary",onClick:this.handleSelectFile,children:"Select File..."})]}),s&&(o===void 0||o==="")&&w("div",{className:"selected-content",children:[h("div",{className:"selected-icon",children:h(G,{icon:Di.getIcon(s)})}),w("div",{className:"selected-text",children:[h("label",{children:"Selected File"}),w("label",{className:"selected-name",children:[s,!n&&h("button",{type:"button",className:"btn btn-link btn-link-icon ml-2",onClick:this.unstageFile,children:h(G,{icon:xn})})]})]})]}),Boolean(o)&&w("div",{className:"message-content",children:[h("div",{className:"message-icon",children:h(G,{icon:cs})}),h("label",{children:o}),o===Di.FILE_TYPE_ERROR&&h("div",{className:"message-small",children:h("label",{children:this.getFileTypeErrorString(t)})})]})]})}};let ls=Di;ls.defaultProps={allowZip:!1,dragError:null};ls.MULTIPLE_FILE_ERROR="Please select only one file";ls.FILE_TYPE_ERROR="Filetype not supported.";class De{}De.INTEGER="int";De.LONG="long";De.DOUBLE="double";De.BOOLEAN="bool";De.STRING="string";De.DATE_TIME="datetime";De.LOCAL_TIME="localtime";const Pc="unknown",Sb=2147483647,wb=-2147483648,Hc=/^[0-9]{4}-[0-1][0-9]-[0-3][0-9][ T][0-2][0-9]:[0-5][0-9]:[0-6][0-9](?:\.[0-9]{1,9})?(?: [a-zA-Z]+)?$/,Vc=/^([0-9]+T)?([0-9]+):([0-9]+)(:[0-9]+)?(?:\.[0-9]{1,9})?$/;class Dt{static determineType(e,n,s){if(!e||e===s)return n;switch(n){case De.STRING:return De.STRING;case De.INTEGER:return Dt.checkInteger(e);case De.LONG:return Dt.checkLong(e);case De.DOUBLE:return Dt.checkDouble(e);case De.BOOLEAN:return Dt.checkBoolean(e);case De.DATE_TIME:return Dt.checkDateTime(e);case De.LOCAL_TIME:return Dt.checkLocalTime(e);default:return Dt.getTypeFromUnknown(e)}}static isNotParsableNumber(e){return isNaN(e)||e==="Infinity"||e==="-Infinity"}static checkInteger(e){const n=e.replace(/,/g,"");return Dt.isNotParsableNumber(n)?De.STRING:Dt.getNumberType(n)}static checkLong(e){const n=e.replace(/,/g,"");return Dt.isNotParsableNumber(n)?De.STRING:n.includes(".")?De.DOUBLE:De.LONG}static checkDouble(e){const n=e.replace(/,/g,"");return Dt.isNotParsableNumber(n)?De.STRING:De.DOUBLE}static checkBoolean(e){const n=e.toLowerCase();return n==="true"||n==="false"?De.BOOLEAN:De.STRING}static checkDateTime(e){return Hc.test(e)?De.DATE_TIME:De.STRING}static checkLocalTime(e){return Vc.test(e)?De.LOCAL_TIME:De.STRING}static getTypeFromUnknown(e){const n=e.replace(/,/g,"");if(Dt.isNotParsableNumber(n)){const s=e.toLowerCase();return s==="true"||s==="false"?De.BOOLEAN:Hc.test(e)&&e.includes(":")?De.DATE_TIME:Vc.test(e)?De.LOCAL_TIME:De.STRING}return Dt.getNumberType(n)}static getNumberType(e){if(e.includes("."))return De.DOUBLE;const n=e.startsWith("-")?11:10;if(e.length>n)return De.LONG;const s=parseInt(e,10);return s>Sb||s<wb?De.LONG:De.INTEGER}constructor(e,n,s,i,o,r,l,a,d,c){this.onFileCompleted=e,this.file=n,this.readHeaders=s,this.nullString=o,this.onProgress=r,this.onError=l,this.chunks=0,this.totalChunks=a,this.isZip=d,this.shouldTrim=c,this.zipProgress=0,this.handleChunk=this.handleChunk.bind(this),this.handleComplete=this.handleComplete.bind(this),this.handleError=this.handleError.bind(this),this.handleNodeUpdate=this.handleNodeUpdate.bind(this),this.config={...i,error:this.handleError,chunk:this.handleChunk,complete:this.handleComplete}}parse(){const e=this.isZip?this.file.nodeStream("nodebuffer",this.handleNodeUpdate):this.file;Ca.parse(e,this.config)}handleChunk(e,n){let{data:s}=e;if(!this.types){if(s==null||s.length===0){n.abort(),this.onError("Error parsing CSV: no data in file.");return}this.types=new Array(s[0].length).fill(Pc),this.readHeaders&&(s=s.slice(1))}A(this.types);const i=[...this.types];s.forEach(l=>{if(l.length>=i.length){for(let a=0;a<i.length;a+=1)i[a]=Dt.determineType(this.shouldTrim?l[a].trim():l[a],i[a],this.nullString);this.types=i}else n.abort(),this.onError(`Error parsing CSV: Insufficient data in row.
|
|
7
7
|
Expected length ${i.length} but found ${l.length}.
|
|
8
8
|
Row = ${l}`)}),this.chunks+=1;let o=0;this.totalChunks>0?o=Math.round(this.chunks/this.totalChunks*50):o=Math.round(this.zipProgress/2),this.onProgress(o)&&n.abort()}handleComplete(e){const{types:n,onFileCompleted:s}=this;A(n),(e==null||!e.meta.aborted)&&s(n.map(i=>i===Pc?De.STRING:i))}handleError(e){const{onError:n}=this;n(e)}handleNodeUpdate(e){this.zipProgress=e.percent}}const ur=X.module("CsvParser"),vb=650,zr=class{static generateHeaderRecursive(t){let e="",n=t;return t>=26&&(e=e.concat(zr.generateHeaderRecursive(Math.floor(t/26)-1)),n=t%26),e.concat(String.fromCharCode(65+n))}constructor({onFileCompleted:t,session:e,file:n,type:s,readHeaders:i=!0,onProgress:o,onError:r,timeZone:l,isZip:a}){this.onFileCompleted=t,this.session=e,this.file=n,this.isZip=a,this.type=s,this.readHeaders=i,this.timeZone=l,this.onProgress=o,this.onError=r,this.tables=[],this.chunks=0,this.totalChunks=a?0:Math.ceil(n.size/Ca.LocalChunkSize),this.isComplete=!1,this.zipProgress=0,this.numConsolidated=0,this.isCancelled=!1,this.handleChunk=this.handleChunk.bind(this),this.handleError=this.handleError.bind(this),this.handleComplete=this.handleComplete.bind(this),this.handleNodeUpdate=this.handleNodeUpdate.bind(this),this.handleCreateTable=this.handleCreateTable.bind(this),this.config={delimiter:s.delimiter,newline:s.newline,escapeChar:s.escapeChar,dynamicTyping:!1,error:this.handleError,skipEmptyLines:s.skipEmptyLines,chunk:this.handleChunk,complete:this.handleComplete,fastMode:!1}}cancel(){this.isCancelled=!0}transpose(t,e){const n=e.length,s=new Array(t).fill(null).map(()=>new Array(n));for(let i=0;i<n;i+=1){const o=e[i];if(o.length<t)throw new Error(`Insufficient columns. Expected ${t} but found ${o.length}
|
|
@@ -40,4 +40,4 @@ ${l} does not exist yet.`}if(i){const{widgetName:r}=this.props;return`${r} is un
|
|
|
40
40
|
|
|
41
41
|
This note can be edited using **markdown** for styling.`;const qE=t=>{Os(t);const{id:e,layout:n,panelManager:s,registerComponent:i}=t,o=S.exports.useCallback(l=>{const{title:a,componentState:d,props:c}=l;let{panelState:u=null}=c;return d!=null&&({panelState:u=null}=d),a==null||u==null||u.content==null||u.content.length===0||u.content===Mo.DEFAULT_CONTENT?null:yd(l)},[]),r=S.exports.useCallback(({title:l="",metadata:a={},id:d=ze.generate(),focusElement:c=ee.DEFAULT_FOCUS_SELECTOR,createNewStack:u=!1,dragEvent:m=null}={})=>{const p=s.getOpenedPanelConfigsOfType(po.COMPONENT),g=s.getClosedPanelConfigsOfType(po.COMPONENT),f=p.map(E=>{var y;return(y=E.title)!=null?y:""}),b=l!=null&&l!==""?l:Mo.getNewMarkdownTitle(f),C=g.length>0?null:Mo.DEFAULT_CONTENT,v={type:"react-component",component:po.COMPONENT,props:{id:d,metadata:a,panelState:{content:C},localDashboardId:e},title:b,id:d},{root:T}=n;ee.openComponent({root:T,config:v,focusElement:c,createNewStack:u,dragEvent:m})},[e,n,s]);return S.exports.useEffect(function(){const a=[i(po.COMPONENT,po,Id,o)];return()=>{a.forEach(d=>d())}},[o,i]),Ke(n.eventHub,ap.OPEN,r),h(he,{})},YE=t=>{Os(t);const{hydrate:e,id:n,layout:s,registerComponent:i}=t,o=S.exports.useCallback(({dragEvent:r,fetch:l,panelId:a=ze.generate(),widget:d})=>{const{name:c,type:u}=d;if(u!==dh.VariableType.PANDAS)return;const m={name:c,table:c},p=()=>l().then(b=>Vd.makeModel(b)),g={type:"react-component",component:Do.COMPONENT,props:{localDashboardId:n,id:a,metadata:m,makeModel:p},title:c,id:a},{root:f}=s;ee.openComponent({root:f,config:g,dragEvent:r})},[n,s]);return S.exports.useEffect(function(){const l=[i(Do.COMPONENT,Do,e)];return()=>{l.forEach(a=>a())}},[e,i]),Ke(s.eventHub,Me.OPEN,o),h(he,{})};class Cn{}Cn.DROPDOWN_FILTER="ControlType.DROPDOWN_FILTER";Cn.INPUT_FILTER="ControlType.INPUT_FILTER";Cn.MARKDOWN="ControlType.MARKDOWN";Cn.FILTER_SET_MANAGER="ControlType.FILTER_SET_MANAGER";const XE=R.exports.shape({state:R.exports.shape({panelState:R.exports.shape({})})}),jE=R.exports.shape({panelId:R.exports.string.isRequired,columnName:R.exports.string.isRequired,columnType:R.exports.string.isRequired}),Oh=R.exports.shape({panelId:R.exports.string.isRequired,columnName:R.exports.string.isRequired}),Dp=R.exports.shape({start:Oh,end:Oh,id:R.exports.string,isReversed:R.exports.bool}),QE=R.exports.arrayOf(Dp),ZE=R.exports.shape({name:R.exports.string.isRequired,operateAs:R.exports.string.isRequired,groups:R.exports.arrayOf(R.exports.string).isRequired,permissions:R.exports.shape({isSuperUser:R.exports.bool.isRequired,isQueryViewOnly:R.exports.bool.isRequired,isNonInteractive:R.exports.bool.isRequired,canUsePanels:R.exports.bool.isRequired,canCreateDashboard:R.exports.bool.isRequired,canCreateCodeStudio:R.exports.bool.isRequired,canCreateQueryMonitor:R.exports.bool.isRequired,canCopy:R.exports.bool.isRequired,canDownloadCsv:R.exports.bool.isRequired}).isRequired});Object.freeze({LinkPoint:jE,Link:Dp,Links:QE,Panel:XE,User:ZE});const JE=(t,e)=>t[e]===null?null:R.exports.bool,e1=(t,e)=>t[e]===null?null:R.exports.string;Object.freeze({nullableBoolean:JE,nullableString:e1});const Mp="SET_LAYOUT_STORAGE",t1=t=>({type:Mp,payload:t}),Np="/ide/assets/community-wordmark-app.d2c5c1eb.svg";const Ds=X.module("FormattingSectionContent");function n1(t){return t.formatString!=null}const ot=class extends S.exports.PureComponent{constructor(t){super(t),this.getCachedColumnTypeOptions=Ee(()=>ot.renderColumnTypeOptions()),this.getCachedDateTimeFormatOptions=Ee((c,u,m,p=!1,g=null)=>{const{timestampAtMenuOpen:f}=this.state;return ot.renderDateTimeOptions(f,c,u,m,p,g)}),this.debouncedCommitChanges=Xe(this.commitChanges.bind(this),ot.inputDebounceTime),this.handleDefaultDateTimeFormatChange=this.handleDefaultDateTimeFormatChange.bind(this),this.handleDefaultDecimalFormatChange=this.handleDefaultDecimalFormatChange.bind(this),this.handleDefaultIntegerFormatChange=this.handleDefaultIntegerFormatChange.bind(this),this.handleFormatRuleEntered=this.handleFormatRuleEntered.bind(this),this.handleFormatRuleChange=this.handleFormatRuleChange.bind(this),this.handleFormatRuleCreate=this.handleFormatRuleCreate.bind(this),this.handleFormatRuleDelete=this.handleFormatRuleDelete.bind(this),this.handleShowTimeZoneChange=this.handleShowTimeZoneChange.bind(this),this.handleShowTSeparatorChange=this.handleShowTSeparatorChange.bind(this),this.handleTimeZoneChange=this.handleTimeZoneChange.bind(this),this.handleResetDateTimeFormat=this.handleResetDateTimeFormat.bind(this),this.handleResetDecimalFormat=this.handleResetDecimalFormat.bind(this),this.handleResetIntegerFormat=this.handleResetIntegerFormat.bind(this),this.handleResetTimeZone=this.handleResetTimeZone.bind(this),this.handleTruncateNumbersWithPoundChange=this.handleTruncateNumbersWithPoundChange.bind(this);const{formatter:e,defaultDateTimeFormat:n,defaultDecimalFormatOptions:s,defaultIntegerFormatOptions:i,showTimeZone:o,showTSeparator:r,timeZone:l,truncateNumbersWithPound:a}=t,d=e.map((c,u)=>({...c,id:u}));this.containerRef=Y.createRef(),this.addFormatRuleButtonRef=Y.createRef(),this.lastFormatRuleIndex=d.length,this.state={formatSettings:d,formatRulesChanged:!1,showTimeZone:o,showTSeparator:r,timeZone:l,defaultDateTimeFormat:n,defaultDecimalFormatOptions:s,defaultIntegerFormatOptions:i,truncateNumbersWithPound:a,timestampAtMenuOpen:new Date}}static focusFirstInputInContainer(t){const e=t==null?void 0:t.querySelector("input, select, textarea");e&&e.focus()}static isSameOptions(t,e){return t.defaultFormatString===e.defaultFormatString}static isSameDecimalOptions(t,e){return ot.isSameOptions(t,e)}static isSameIntegerOptions(t,e){return ot.isSameOptions(t,e)}static isValidColumnName(t){return t!==""&&ms.isValidColumnName(t)}static isValidFormat(t,e){if(!t||e.formatString==null||!n1(e))return!1;switch(t){case"datetime":return lt.isValid(e);case"decimal":return Ue.isValid(e);case"int":return dt.isValid(e);default:return Ds.warn("Trying to validate format of unknown type"),!0}}static removeFormatRuleExtraProps(t){const{id:e,isNewRule:n,...s}=t;return s}static isFormatRuleValidForSave(t){return ot.isValidColumnName(t.columnName)&&ot.isValidFormat(t.columnType,t.format)}static renderTimeZoneOptions(){return In.TIME_ZONES.map(e=>{const{label:n,value:s}=e;return h("option",{value:s,children:n},s)})}static renderColumnTypeOptions(){const e=[{value:P.dataType.DATETIME,label:"DateTime"},{value:P.dataType.DECIMAL,label:"Decimal"},{value:P.dataType.INT,label:"Integer"}].map(n=>h("option",{value:n.value,children:n.label},`key-columnType-${n.value}`));return w(he,{children:[h("option",{disabled:!0,value:"",children:"Select Type"},"key-columnType-placeholder"),e]})}static renderDateTimeOptions(t,e,n,s,i,o){const r=new hn([],{timeZone:e,showTimeZone:n,showTSeparator:s}),l=i?lt.getGlobalFormats(n,s):lt.getFormats(n,s);return o&&!l.includes(o)&&l.unshift(o),l.map(a=>{const d=lt.makeFormat("",a,lt.TYPE_GLOBAL);return h("option",{value:a,children:r.getFormattedString(t,P.dataType.DATETIME,"",d)},a)})}componentDidMount(){ot.focusFirstInputInContainer(this.containerRef.current)}componentWillUnmount(){this.debouncedCommitChanges.flush()}isDuplicateRule(t){var n;const{formatSettings:e}=this.state;return(n=e.some(s=>s.id!==t.id&&s.columnName===t.columnName&&s.columnType===t.columnType))!=null?n:!1}getAutoIncrementFormatRuleIndex(){const{lastFormatRuleIndex:t}=this;return this.lastFormatRuleIndex+=1,t}handleDefaultDateTimeFormatChange(t){Ds.debug("handleDefaultDateTimeFormatChange",t.target.value),this.setState({defaultDateTimeFormat:t.target.value},()=>{this.debouncedCommitChanges()})}handleDefaultDecimalFormatChange(t){Ds.debug("handleDefaultDecimalFormatChange",t.target.value),this.setState({defaultDecimalFormatOptions:{defaultFormatString:t.target.value}},()=>{this.debouncedCommitChanges()})}handleDefaultIntegerFormatChange(t){Ds.debug("handleDefaultIntegerFormatChange",t.target.value),this.setState({defaultIntegerFormatOptions:{defaultFormatString:t.target.value}},()=>{this.debouncedCommitChanges()})}handleFormatRuleChange(t,e,n){this.setState(s=>{const{formatSettings:i}=s;A(i);const o=[...i];let r={};e==="columnType"&&(r={format:""});const l={...o[t],...r,[e]:n};return o[t]=l,{formatSettings:o}},()=>{this.debouncedCommitChanges()})}handleFormatRuleCreate(){this.setState(t=>{const{formatSettings:e}=t,n={columnType:P.dataType.DATETIME,columnName:"",format:{},id:this.getAutoIncrementFormatRuleIndex(),isNewRule:!0};return{formatSettings:e!=null?[...e,n]:[n],formatRulesChanged:!0}})}handleFormatRuleDelete(t){this.setState(e=>{const{formatSettings:n}=e;return{formatSettings:n.filter((i,o)=>o!==t),formatRulesChanged:!0}},()=>{this.debouncedCommitChanges()})}handleShowTimeZoneChange(){this.setState(t=>({showTimeZone:!t.showTimeZone}),()=>{this.debouncedCommitChanges()})}handleShowTSeparatorChange(){this.setState(t=>({showTSeparator:!t.showTSeparator}),()=>{this.debouncedCommitChanges()})}handleTimeZoneChange(t){this.setState({timeZone:t.target.value},()=>{this.debouncedCommitChanges()})}handleResetDateTimeFormat(){const{defaults:t}=this.props,{defaultDateTimeFormat:e,showTimeZone:n,showTSeparator:s}=t;Ds.debug("handleResetDateTimeFormat"),this.setState({defaultDateTimeFormat:e,showTimeZone:n,showTSeparator:s},()=>{this.debouncedCommitChanges()})}handleResetTimeZone(){const{defaults:t}=this.props,{timeZone:e}=t;Ds.debug("handleResetTimeZone"),this.setState({timeZone:e},()=>{this.debouncedCommitChanges()})}handleResetDecimalFormat(){const{defaults:t}=this.props,{defaultDecimalFormatOptions:e}=t;Ds.debug("handleResetDecimalFormat"),this.setState({defaultDecimalFormatOptions:e},()=>{this.debouncedCommitChanges()})}handleResetIntegerFormat(){const{defaults:t}=this.props,{defaultIntegerFormatOptions:e}=t;Ds.debug("handleResetIntegerFormat"),this.setState({defaultIntegerFormatOptions:e},()=>{this.debouncedCommitChanges()})}handleTruncateNumbersWithPoundChange(){this.setState(t=>({truncateNumbersWithPound:!t.truncateNumbersWithPound}),()=>{this.debouncedCommitChanges()})}handleFormatRuleEntered(t){this.scrollToFormatBlockBottom(),ot.focusFirstInputInContainer(t)}commitChanges(){var m;const{formatSettings:t,defaultDateTimeFormat:e,showTimeZone:n,showTSeparator:s,timeZone:i,defaultDecimalFormatOptions:o,defaultIntegerFormatOptions:r,truncateNumbersWithPound:l}=this.state,a=(m=t.filter(ot.isFormatRuleValidForSave).map(ot.removeFormatRuleExtraProps))!=null?m:[],{settings:d,saveSettings:c}=this.props,u={...d,formatter:a,defaultDateTimeFormat:e,showTimeZone:n,showTSeparator:s,timeZone:i,truncateNumbersWithPound:l};ot.isValidFormat(P.dataType.DECIMAL,Ue.makeCustomFormat(o.defaultFormatString))&&(u.defaultDecimalFormatOptions=o),ot.isValidFormat(P.dataType.INT,dt.makeCustomFormat(r.defaultFormatString))&&(u.defaultIntegerFormatOptions=r),c(u)}scrollToFormatBlockBottom(){var e,n,s,i;const{scrollTo:t}=this.props;t(0,((n=(e=this.addFormatRuleButtonRef.current)==null?void 0:e.offsetHeight)!=null?n:0)+((i=(s=this.addFormatRuleButtonRef.current)==null?void 0:s.offsetTop)!=null?i:0))}getRuleError(t){const e={hasColumnNameError:!1,hasFormatError:!1,message:""},n=[];return t.isNewRule!==void 0&&t.isNewRule||(this.isDuplicateRule(t)&&(e.hasColumnNameError=!0,n.push("Duplicate column name/type combo.")),ot.isValidColumnName(t.columnName)||(e.hasColumnNameError=!0,n.push("Column names must start with a letter or underscore and contain only alphanumeric characters or underscores.")),t.format!=null?(e.hasFormatError=!0,n.push("Empty formatting rule.")):ot.isValidFormat(t.columnType,t.format)||(e.hasFormatError=!0,n.push("Invalid formatting rule.")),e.message=n.join(`
|
|
42
42
|
`)),e}renderFormatRule(t,e){const n=`input-${t}-columnName`,s=`input-${t}-columnType`,i=`input-${t}-format`,o=this.getCachedColumnTypeOptions(),r=c=>this.handleFormatRuleChange(t,"columnName",c.target.value),l=()=>this.handleFormatRuleChange(t,"isNewRule",!1),a=c=>this.handleFormatRuleChange(t,"columnType",c.target.value),d=this.getRuleError(e);return w("fieldset",{className:"container-fluid format-rule-container",children:[w("div",{className:"form-row",children:[w("div",{className:"form-group col-7 mb-2",children:[h("label",{htmlFor:n,children:"Column Name"}),h("input",{id:n,className:W("form-control",{"is-invalid":d.hasColumnNameError}),"data-lpignore":!0,type:"text",value:e.columnName,onChange:r,onBlur:l})]}),w("div",{className:"form-group col mb-2",children:[h(oe,{kind:"ghost",className:"btn-delete-format-rule float-right",tabIndex:-1,onClick:()=>this.handleFormatRuleDelete(t),icon:xn,tooltip:"Delete"}),h("label",{htmlFor:s,children:"Column Type"}),h("select",{id:s,className:"custom-select",value:e.columnType,onChange:a,children:o})]})]}),h("div",{className:"form-row",children:w("div",{className:"form-group col-12 d-flex mb-2",children:[h("label",{className:"flex-shrink-0 col-form-label mr-3",htmlFor:i,children:"Formatting Rule"}),this.renderFormatRuleInput(t,e.columnType,i,e.format,d.hasFormatError)]})}),h("div",{className:"form-row",children:h("div",{className:"form-group col-12 d-flex mb-2",children:d.message&&h("p",{className:"text-danger",children:d.message})})})]},t)}renderFormatRuleInput(t,e,n,s,i){switch(P.getNormalizedType(e)){case P.dataType.DATETIME:return this.renderDateTimeFormatRuleInput(t,n,s,i);case P.dataType.DECIMAL:return this.renderDecimalFormatRuleInput(t,n,s,i);case P.dataType.INT:return this.renderIntegerFormatRuleInput(t,n,s,i);default:return null}}renderDateTimeFormatRuleInput(t,e,n,s){const{showTimeZone:i,showTSeparator:o,timeZone:r}=this.state,l=n!=null&&n.formatString||"";return w("select",{className:W("custom-select",{"is-invalid":s}),value:l,id:e,onChange:a=>{const d=lt.makeFormat("",a.target.value,lt.TYPE_GLOBAL);this.handleFormatRuleChange(t,"format",d)},children:[h("option",{value:"",disabled:!0,children:"Select format"},"default"),this.getCachedDateTimeFormatOptions(r,i,o)]})}renderIntegerFormatRuleInput(t,e,n,s){const i=n!=null&&n.formatString||"";return h("input",{className:W("form-control","flex-grow-1",{"is-invalid":s}),"data-lpignore":!0,id:e,placeholder:dt.DEFAULT_FORMAT_STRING,type:"text",value:i,onChange:o=>{const r=dt.makeFormat("",o.target.value,dt.TYPE_GLOBAL,void 0);this.handleFormatRuleChange(t,"format",r)}})}renderDecimalFormatRuleInput(t,e,n,s){const i=n!=null&&n.formatString||"";return h("input",{className:W("form-control","flex-grow-1",{"is-invalid":s}),"data-lpignore":!0,id:e,placeholder:Ue.DEFAULT_FORMAT_STRING,type:"text",value:i,onChange:o=>{const r=Ue.makeFormat("",o.target.value,Ue.TYPE_GLOBAL,void 0);this.handleFormatRuleChange(t,"format",r)}})}render(){const{defaults:t}=this.props,{formatRulesChanged:e,formatSettings:n,defaultDateTimeFormat:s,defaultDecimalFormatOptions:i,defaultIntegerFormatOptions:o,timeZone:r,showTimeZone:l,showTSeparator:a,truncateNumbersWithPound:d}=this.state,{defaultFormatString:c=Ue.DEFAULT_FORMAT_STRING}=i!=null?i:{},{defaultFormatString:u=dt.DEFAULT_FORMAT_STRING}=o!=null?o:{},m=n.map((v,T)=>h(ht,{classNames:"fade",timeout:Tt.transitionMs,onEnter:this.handleFormatRuleEntered,children:this.renderFormatRule(T,v)},v.id)),p=h(oe,{kind:"ghost",className:"mb-3",onClick:this.handleFormatRuleCreate,ref:this.addFormatRuleButtonRef,icon:ks,children:"Add New Rule"}),g=r===t.timeZone,f=a===t.showTSeparator&&l===t.showTimeZone&&s===t.defaultDateTimeFormat,b=ot.isSameDecimalOptions(i,t.defaultDecimalFormatOptions),C=ot.isSameIntegerOptions(o,t.defaultIntegerFormatOptions);return w("div",{className:"app-settings-formatting-section",ref:this.containerRef,children:[w("div",{className:"container-fluid p-0",children:[h("div",{children:"Default formatting for column types"}),h("div",{className:"app-settings-menu-description mb-3",children:"Applies a formatting rule to all columns of a set type."}),w("div",{className:"form-row mb-2",children:[h("label",{className:"col-form-label col-3",htmlFor:"select-reset-timezone",children:"Time zone"}),h("div",{className:"col pr-0",children:h("select",{className:"custom-select",value:r,onChange:this.handleTimeZoneChange,id:"select-reset-timezone",children:ot.renderTimeZoneOptions()})}),h("div",{className:"col-1 btn-col",children:h(oe,{kind:"ghost",icon:Fi,onClick:this.handleResetTimeZone,tooltip:"Reset Time Zone",className:W("btn-reset","btn-reset-time-zone",{hidden:g})})})]}),w("div",{className:"form-row mb-2",children:[h("label",{className:"col-form-label col-3",htmlFor:"select-default-time-format",children:"DateTime"}),h("div",{className:"col pr-0",children:h("select",{className:"custom-select",value:s,onChange:this.handleDefaultDateTimeFormatChange,id:"select-default-time-format",children:this.getCachedDateTimeFormatOptions(r,l,a,!0,s)})}),h("div",{className:"col-1 btn-col",children:h(oe,{kind:"ghost",icon:Fi,onClick:this.handleResetDateTimeFormat,tooltip:"Reset DateTime Options",className:W("btn-reset","btn-reset-date-time",{hidden:f})})})]}),h("div",{className:"form-row",children:h("div",{className:"offset-3 col-9",children:h(Pt,{checked:l!=null?l:null,onChange:this.handleShowTimeZoneChange,children:"Show time zone in dates"})})}),h("div",{className:"form-row mb-3",children:h("div",{className:"offset-3 col-9",children:h(Pt,{checked:a!=null?a:null,onChange:this.handleShowTSeparatorChange,children:"Show 'T' separator"})})}),w("div",{className:"form-row mb-2",children:[h("label",{className:"col-form-label col-3",htmlFor:"default-decimal-format-input",children:"Decimal"}),h("div",{className:"col pr-0",children:h("input",{className:W("form-control","flex-grow-1","default-decimal-format-input",{"is-invalid":!ot.isValidFormat(P.dataType.DECIMAL,Ue.makeCustomFormat(c))}),"data-lpignore":!0,placeholder:Ue.DEFAULT_FORMAT_STRING,type:"text",id:"default-decimal-format-input",value:c,onChange:this.handleDefaultDecimalFormatChange})}),h("div",{className:"col-1 btn-col",children:h(oe,{kind:"ghost",icon:Fi,onClick:this.handleResetDecimalFormat,tooltip:"Reset Decimal Formatting",className:W("btn-reset","btn-reset-decimal",{hidden:b}),"data-testid":"btn-reset-decimal"})})]}),w("div",{className:"form-row mb-2",children:[h("label",{className:"col-form-label col-3",htmlFor:"default-integer-format-input",children:"Integer"}),h("div",{className:"col pr-0",children:h("input",{className:W("form-control","flex-grow-1","default-integer-format-input",{"is-invalid":!ot.isValidFormat(P.dataType.INT,dt.makeCustomFormat(u))}),"data-lpignore":!0,placeholder:dt.DEFAULT_FORMAT_STRING,type:"text",id:"default-integer-format-input",value:u,onChange:this.handleDefaultIntegerFormatChange})}),h("div",{className:"col-1 btn-col",children:h(oe,{kind:"ghost",icon:Fi,onClick:this.handleResetIntegerFormat,tooltip:"Reset Integer Formatting",className:W("btn-reset","btn-reset-integer",{hidden:C}),"data-testid":"btn-reset-integer"})})]}),h("div",{className:"form-row mb-3",children:h("div",{className:"offset-3 col-9",children:h(Pt,{checked:d!=null?d:null,onChange:this.handleTruncateNumbersWithPoundChange,children:"Truncate numbers with #"})})})]}),h("div",{children:"Default formatting for matched column names"}),h("div",{className:"app-settings-menu-description mb-3",children:"Applies a formatting rule to all columns that match a specified name and type."}),h(Zp,{appear:e,enter:e,exit:e,children:m}),p]})}};let ec=ot;ec.defaultProps={scrollTo:()=>{},defaults:{defaultDateTimeFormat:lt.DEFAULT_DATETIME_FORMAT_STRING,defaultDecimalFormatOptions:{defaultFormatString:Ue.DEFAULT_FORMAT_STRING},defaultIntegerFormatOptions:{defaultFormatString:dt.DEFAULT_FORMAT_STRING},showTimeZone:!1,showTSeparator:!0,timeZone:lt.DEFAULT_TIME_ZONE_ID}};ec.inputDebounceTime=250;const s1=t=>({formatter:lS(t),defaultDateTimeFormat:iS(t),defaultDecimalFormatOptions:oS(t),defaultIntegerFormatOptions:rS(t),showTimeZone:aS(t),showTSeparator:dS(t),truncateNumbersWithPound:cS(t),timeZone:vl(t),settings:Kt(t)}),i1=Mt(s1,{saveSettings:hm})(ec),o1=()=>{const[t,e]=S.exports.useState(!1),n=()=>{e(!t)};return w(oe,{kind:"ghost",onClick:n,icon:mf,children:["Legal Notices",w(Oo,{isOpen:t,toggle:n,className:"theme-bg-light",children:[h(Po,{toggle:n,children:"Legal Notice"}),w(Ao,{children:[h("p",{children:"Deephaven software is protected by U.S. Patent Nos. 9,612,959; 9,613,018; 9,613,109; 9,619,210; 9,633,060; 9,639,570; 9,672,238; 9,679,006; 9,690,821; 9,710,511; 9,760,591; 9,805,084; 9,836,495; 9,836,494; 9,886,469; 9,898,496; 9,934,266; 10,002,153; 10,002,154; 10,002,155; 10,003,673; 10,019,138; 10,069,943; 10,176,211; 10,198,465; 10,198,466; 10,198,469; 10,212,257; 10,241,960; 10,241,965; 10,242,040; 10,242,041; 10,353,893; 10,346,394; 10,452,649; 10,496,639; 10,540,351; 10,552,412; 10,565,194; 10,565,206; 10,572,474; 10,621,168; 10,642,829; 10,657,184; 10,678,787; 10,691,686; and 10,783,191. Other patents pending."}),w("p",{children:["\xA9 2016-",new Date().getFullYear()," Deephaven Data Labs LLC. Patent Pending."]})]})]})]})},nl=t=>{const{children:e,isExpanded:n,sectionKey:s,title:i,onToggle:o}=t;return w(he,{children:[h("div",{children:w(oe,{kind:"ghost",className:"btn-collapse-trigger",onClick:()=>o(s),children:[h("div",{className:"flex-grow-1",children:i}),h("div",{className:"flex-shrink-0",children:h(G,{transform:n?"flip-v":"",icon:as})})]})}),h(cd,{in:n,autoFocusOnShow:!0,children:e})]})};nl.propTypes={children:R.exports.node,isExpanded:R.exports.bool.isRequired,sectionKey:R.exports.string.isRequired,title:R.exports.node.isRequired,onToggle:R.exports.func};nl.defaultProps={children:null,onToggle:()=>{}};function r1({shortcut:t,displayText:e,categoryName:n,onChange:s}){const[i,o]=S.exports.useState(e),[r,l]=S.exports.useState(t.getKeyState()),[a,d]=S.exports.useState(!1),[c,u]=S.exports.useState("");S.exports.useEffect(function(){o(e),l(t.getKeyState())},[e,t]),S.exports.useEffect(function(){o(Wt.getDisplayText(r)),t.matchesKeyState(r)&&d(!1)},[r,t]),S.exports.useEffect(function(){if(a){if(!Wt.isValidKeyState(r)){Wt.isAllowedKey(r.keyValue)?u("Must contain a modifier key"):u("Must contain an allowed action key");return}const E=Be.getConflictingShortcuts(r).filter(y=>y.id.startsWith(n)&&y!==t).map(y=>y.name);if(E.length){u(`Conflicts with ${E.join(", ")}`);return}u("")}else u("")},[a,r,n,t]);function m(T){if(T.stopPropagation(),T.preventDefault(),t.isEditable&&!T.repeat){const E=Wt.getKeyStateFromEvent(T),y=Wt.createKeyState([pe.BACKSPACE]);Wt.doKeyStatesMatch(E,y)?l(Wt.NULL_KEY_STATE):l(E)}}function p(T){T.stopPropagation(),T.preventDefault(),t.matchesKeyState(r)||d(!0)}function g(){Ne.disableAllActions()}function f(){Ne.enableAllActions()}function b(){t.setKeyState(r),d(!1),s(t)}function C(){const T=t.getKeyState();l(T),d(!1)}function v(){d(!0),l(t.getDefaultKeyState())}return w(he,{children:[w("div",{className:"shortcut-item-container",children:[w("label",{className:"shortcut-item-name",children:[t.name,t.tooltip!==void 0&&h(ge,{children:t.tooltip})]}),w("div",{className:"shortcut-item-input-container",children:[h("input",{className:W("form-control",{"is-invalid":c}),onKeyDown:m,onKeyUp:p,onFocus:g,onBlur:f,disabled:!t.isEditable,value:i,readOnly:!0}),!Wt.doKeyStatesMatch(r,t.getDefaultKeyState())&&!c&&h(oe,{className:"reset-to-default-button",kind:"ghost",icon:h(G,{icon:Fi,transform:{rotate:90,flipX:!0}}),tooltip:"Reset to default",onClick:v})]})]}),a&&w("div",{className:W("shortcut-item-message-container",{"is-invalid":c}),children:[h("div",{className:"shortcut-item-message",children:c}),w("div",{className:"shortcut-item-message-buttons",children:[Wt.isValidKeyState(r)&&h(oe,{kind:"ghost",onClick:b,children:"Confirm"}),h(oe,{kind:"ghost",onClick:C,children:"Undo"})]})]})]})}function l1({shortcutOverrides:t={},settings:e,saveSettings:n}){const s=S.exports.useCallback(l=>{const a=Wt.isMacPlatform,d={mac:{...t.mac},windows:{...t.windows}},c=a?d.mac:d.windows;l.forEach(u=>{u.isDefault()?delete c[u.id]:c[u.id]=u.getKeyState()}),n({...e,shortcutOverrides:d})},[e,n,t]);let i=Array.from(Be.shortcutsByCategory.entries()).map(([l,a])=>({name:l,shortcuts:a}));const o=i.findIndex(l=>l.name.toUpperCase()==="GLOBAL"),r=i.splice(o,1);return i=i.concat(r),w(he,{children:[h("div",{className:"app-settings-menu-description",children:"Customize shortcuts below. Assigning shortcuts that conflict with the browser or IDE shortcuts may cause unintended behavior"}),i.map(l=>h(a1,{name:l.name,shortcuts:l.shortcuts,saveShortcutOverrides:s},l.name))]})}function a1({name:t,shortcuts:e,saveShortcutOverrides:n}){function s(a){return a.split("_").map(d=>`${d[0].toUpperCase()}${d.slice(1).toLowerCase()}`).join(" ")}const[i,o]=S.exports.useState(e);function r(a){const d=i.filter(u=>u!==a&&!u.isNull()&&u.matchesKeyState(a.getKeyState()));d.forEach(u=>u.setToNull());const c=[a,...d];n(c),o(u=>[...u])}const l=S.exports.useMemo(()=>i.map(a=>a.getDisplayText()),[i]);return w("div",{className:"mt-3",children:[h("div",{className:"font-weight-bold",children:s(t)}),i.map((a,d)=>h(r1,{shortcut:a,displayText:l[d],categoryName:t,onChange:r},a.id))]})}const d1=t=>({settings:Kt(t),shortcutOverrides:hS(t)}),c1={saveSettings:hm},h1=Mt(d1,c1)(l1),za=new $g,Ga=new Vr(za);function u1(){X.setLogLevel(parseInt("2",10)),za.enable(),Ga.enable(),window!=null&&(window.DHLog=X,window.DHLogProxy=za,window.DHLogHistory=Ga)}const m1="yyyy-MM-dd-HHmmss";function Fp(t,e="root",n=new Map([[t,""]])){const s={};return Object.entries(t).forEach(([i,o])=>{try{JSON.stringify(o),s[i]=o}catch{const l=o;if(typeof o=="bigint")s[i]=o.toString();else if(n.has(l))s[i]=`Circular ref to ${n.get(l)}`;else{const a=`${e}.${i}`;n.set(l,a),s[i]=Fp(o,a,n)}}}),s}function p1(){const t=yl.getState();return JSON.stringify(Fp(t),null,2)}function g1(){const t={uiVersion:"0.19.1",userAgent:navigator.userAgent};return JSON.stringify(t,null,2)}async function f1(t=`${M.i18n.DateTimeFormat.format(m1,new Date)}_support_logs`){const e=new Kh,n=e.folder(t);n.file("console.txt",Ga.getFormattedHistory()),n.file("redux.json",p1()),n.file("metadata.json",g1());const s=await e.generateAsync({type:"blob"}),i=document.createElement("a");i.href=URL.createObjectURL(s),i.download=`${t}.zip`,i.click()}const Fs=class extends S.exports.Component{constructor(t){super(t),this.handleClose=this.handleClose.bind(this),this.handleScrollTo=this.handleScrollTo.bind(this),this.handleSectionToggle=this.handleSectionToggle.bind(this),this.menuContentRef=Y.createRef(),this.state={expandedSectionKey:Fs.FORMATTING_SECTION_KEY}}static focusFirstInputInContainer(t){const e=t==null?void 0:t.querySelector("input, select, textarea");e&&e.focus()}static handleExportSupportLogs(){f1()}componentDidMount(){Fs.focusFirstInputInContainer(this.menuContentRef.current)}isSectionExpanded(t){const{expandedSectionKey:e}=this.state;return e===t}handleScrollTo(t,e){var n;(n=this.menuContentRef.current)==null||n.scrollTo(t,e)}handleSectionToggle(t){this.setState(e=>({expandedSectionKey:e.expandedSectionKey===t?void 0:t}))}handleClose(){const{onDone:t}=this.props;t()}render(){const t="0.19.1",e="https://github.com/deephaven/web-client-ui/",n="https://deephaven.io/core/docs/";return w("div",{className:"app-settings-menu",children:[w("header",{className:"app-settings-menu-header",children:[h("div",{className:"flex-spacer"}),h(oe,{kind:"ghost",className:"btn-close-settings-menu",onClick:this.handleClose,icon:h(G,{icon:Ho,transform:"grow-4"}),tooltip:"Close"})]}),w("div",{className:"app-settings-menu-content",ref:this.menuContentRef,children:[h("h5",{children:"Settings"}),h("hr",{className:"my-0"}),h(nl,{sectionKey:Fs.FORMATTING_SECTION_KEY,isExpanded:this.isSectionExpanded(Fs.FORMATTING_SECTION_KEY),title:w(he,{children:[h(G,{icon:Rf,transform:"grow-4",className:"mr-2"}),"Formatting & Time zone"]}),onToggle:this.handleSectionToggle,children:h(i1,{scrollTo:this.handleScrollTo})}),h(nl,{sectionKey:Fs.SHORTCUT_SECTION_KEY,isExpanded:this.isSectionExpanded(Fs.SHORTCUT_SECTION_KEY),title:w(he,{children:[h(G,{icon:wf,transform:"grow-2"})," ","Keyboard Shortcuts"]}),onToggle:this.handleSectionToggle,children:h(h1,{})}),w("div",{className:"app-settings-footer",children:[w("div",{className:"app-settings-footer-section",children:[w("div",{className:"app-settings-footer-item",children:[h("div",{className:"font-weight-bold",children:"Support"}),w("div",{children:["GitHub:\xA0",h("a",{href:e,className:"custom-link",target:"_blank",rel:"noopener noreferrer",children:e})]}),h(oe,{kind:"tertiary",className:"mt-2 py-2",onClick:Fs.handleExportSupportLogs,children:"Export Logs"})]}),w("div",{className:"app-settings-footer-item",children:[h("div",{className:"font-weight-bold",children:"Documentation"}),h("a",{target:"_blank",rel:"noreferrer noopener",href:n,className:"custom-link",children:n})]}),h("div",{className:"app-settings-footer-item",children:w("div",{className:"text-muted",children:["Version ",t]})}),h("div",{className:"app-settings-footer-item",children:h(o1,{})})]}),h("div",{className:"app-settings-footer-section",children:h("div",{className:"logo",children:h("a",{target:"_blank",rel:"noreferrer noopener",href:"https://deephaven.io",className:"d-inline-block custom-link p-1",children:h("img",{src:Np,alt:"Deephaven Data Labs",width:"230px"})})})})]})]})]})}};let qo=Fs;qo.defaultProps={onDone:()=>{}};qo.FORMATTING_SECTION_KEY="SettingsMenu.formatting";qo.APPLICATION_SECTION_KEY="ApplicationMenu.settings";qo.SHORTCUT_SECTION_KEY="SettingsMenu.shortcuts";const Ah=10,Li=t=>{const{forwardedProps:{menuItem:{action:e,title:n,disabled:s},iconElement:i,displayShortcut:o,isMouseSelected:r,isKeyboardSelected:l,closeMenu:a}}=t,d=S.exports.useRef(),c=S.exports.useRef(),u=S.exports.useRef(null),[m,p]=S.exports.useState(!1),g=S.exports.useCallback(C=>{d.current!=null&&c.current!=null&&u.current&&(Math.abs(d.current-C.clientX)>=Ah||Math.abs(c.current-C.clientY)>=Ah)&&(p(!0),window.removeEventListener("mousemove",g),a(),e(C),u.current=null)},[e,a]);function f(C){d.current=C.clientX,c.current=C.clientY,u.current=C.target,window.addEventListener("mousemove",g)}function b(C){u.current===C.target&&(p(!0),a(),e(),window.removeEventListener("mousemove",g)),u.current=null}return S.exports.useEffect(function(){return function(){return window.removeEventListener("mousemove",g)}},[g]),w("button",{type:"button",className:W("btn-context-menu",{disabled:s},{active:r&&!s},{"keyboard-active":l&&!s}),onMouseDown:f,onMouseUp:b,disabled:m,children:[h("span",{className:W("icon"),children:i}),h("span",{className:"title",children:n}),h("span",{className:"shortcut",children:o})]})},tc=t=>{const{handleControlSelect:e,handleToolSelect:n,onClearFilter:s}=t,i=S.exports.useMemo(()=>[{title:"Input Filter",icon:Vf,menuElement:h(Li,{}),action:o=>{e(Cn.INPUT_FILTER,o)},order:10},{title:"Dropdown Filter",icon:lu,menuElement:h(Li,{}),action:o=>{e(Cn.DROPDOWN_FILTER,o)},order:15},{title:"Markdown Widget",icon:Cf,menuElement:h(Li,{}),action:o=>{e(Cn.MARKDOWN,o)},order:20},{title:"Filter Sets",icon:wa,menuElement:h(Li,{}),action:o=>{e(Cn.FILTER_SET_MANAGER,o)},order:25},{disabled:!0,menuElement:h("div",{className:"context-menu-group-header",children:"Tools"}),order:30},{title:"Linker",icon:td,action:()=>{n(cn.LINKER)},order:40,shortcut:Ls.LINKER},{disabled:!0,menuElement:h("div",{className:"context-menu-group-header",children:"Actions"}),order:50},{title:"Clear All Filters",icon:Of,action:()=>{s()},order:60,shortcut:an.TABLE.CLEAR_ALL_FILTERS}],[e,n,s]);return h(Wn,{popperClassName:"controls-menu-popper",actions:i})};tc.propTypes={handleControlSelect:R.exports.func,handleToolSelect:R.exports.func,onClearFilter:R.exports.func};tc.defaultProps={handleControlSelect:()=>{},handleToolSelect:()=>{},onClearFilter:()=>{}};Li.propTypes={forwardedProps:R.exports.shape({iconElement:R.exports.node,displayShortcut:R.exports.string,isMouseSelected:R.exports.bool.isRequired,isKeyboardSelected:R.exports.bool.isRequired,closeMenu:R.exports.func.isRequired,menuItem:R.exports.shape({action:R.exports.func,title:R.exports.string,disabled:R.exports.bool}).isRequired})};Li.defaultProps={forwardedProps:null};const C1=fi(Mp,null),b1={layoutStorage:C1},S1=t=>t.layoutStorage;Object.entries(b1).map(([t,e])=>Xi.register(t,e));const Ph=10,w1=t=>{const{onExportLayout:e,onImportLayout:n,onResetLayout:s,onSelect:i,widgets:o=[]}=t,[r,l]=S.exports.useState(!1),[a,d]=S.exports.useState(""),c=S.exports.useRef(null),u=S.exports.useRef(),m=S.exports.useCallback((E,y)=>{E!=null&&i(E,y)},[i]),p=S.exports.useCallback(E=>{d(E.target.value)},[]),g=S.exports.useCallback(E=>{u.current!=null&&(Math.abs(u.current.x-E.clientX)>=Ph||Math.abs(u.current.y-E.clientY)>=Ph)&&(l(!0),window.removeEventListener("mousemove",g),m(u.current.widget,E),u.current=void 0)},[u,m]),f=S.exports.useCallback((E,y)=>{u.current={x:E.clientX,y:E.clientY,widget:y},window.addEventListener("mousemove",g)},[g]),b=S.exports.useCallback((E,y)=>{var I;window.removeEventListener("mousemove",g),((I=u.current)==null?void 0:I.widget)===y&&(l(!0),m(y)),u.current=void 0},[g,u,m]),C=S.exports.useMemo(()=>o.filter(E=>{var y;return a?(y=E.name)==null?void 0:y.toLowerCase().includes(a.toLowerCase()):!0}),[a,o]).sort((E,y)=>{var I,D,N;return(N=(D=E.name)==null?void 0:D.localeCompare((I=y.name)!=null?I:""))!=null?N:0}),v=S.exports.useMemo(()=>C.map(E=>{var y,I;return h("li",{children:w(oe,{kind:"ghost","data-testid":`panel-list-item-${(y=E.name)!=null?y:""}-button`,onMouseDown:D=>{f(D,E)},onMouseUp:D=>{b(D,E)},onKeyDown:D=>{(D.key==="Enter"||D.key===" ")&&m(E)},disabled:r,onClick:()=>{},children:[h(xu,{type:E.type})," ",(I=E.name)!=null?I:""]})},E.name)}),[C,r,f,b,m]),T=S.exports.useMemo(()=>v.length===0?h("span",{children:"No bound variables found."}):null,[v]);return w("div",{className:"widget-list-container d-flex flex-column",children:[h("div",{className:"widget-list-header",children:h(gs,{value:a,placeholder:"Find Table, Plot or Widget",onChange:p,ref:c})}),w("ul",{className:"widget-list flex-grow-1",children:[T&&h("li",{className:"widget-list-message",children:T}),!T&&v]}),h("div",{children:h("hr",{})}),w("div",{className:"widget-list-footer",children:[w(oe,{kind:"ghost",onClick:e,children:[w("div",{className:"fa-md fa-layers",children:[h(G,{mask:va,icon:Cc,transform:"right-5 down-5"}),h(G,{icon:Cc,transform:"right-8 down-6"})]}),"Export Layout"]}),w(oe,{kind:"ghost",onClick:n,children:[w("div",{className:"fa-md fa-layers",children:[h(G,{mask:va,icon:Sa,transform:"right-5 down-5"}),h(G,{icon:Sa,transform:"right-8 down-6"})]}),"Import Layout"]}),h(oe,{kind:"ghost",icon:Fi,onClick:s,tooltip:"Reset Layout"})]})]})},v1=async(t,e,n)=>{let s,i,o,r;if(Lr(e)?(s=e.settings,i=e.table,o=void 0,r=e.tableSettings):(s={},i="",o=e.figure,r={}),n!==void 0&&(n.tableSettings!=null&&(r=n.tableSettings),n.table!=null&&(i=n.table),n.figure!=null&&(o=n.figure),n.settings!=null&&(s={...s,...n.settings})),o!==void 0){const d={title:o,name:o,type:M.VariableType.FIGURE},c=await t.getObject(d);return Bi.makeModel(s,c)}const l={title:o,name:i,type:M.VariableType.TABLE},a=await t.getObject(l);return ne.applyTableSettings(a,r,vl(yl.getState())),Bi.makeModelFromSettings(s,a)},T1=async(t,e,n=M.VariableType.TABLE)=>{const{table:s}=e,i={title:s,name:s,type:n},o=await t.getObject(i);return Vd.makeModel(o)};const E1=({onAutoFillClick:t=()=>{}})=>w("div",{className:"empty-dashboard-container",children:[w("div",{className:"hint-container",children:[h(G,{icon:Zg})," ",h("br",{}),"Use the panel list to add objects from a query."]}),w("div",{className:"empty-dashboard",children:[h("div",{className:"add-panels-hint",children:"Drag Panels Here"}),h(oe,{kind:"tertiary",onClick:t,children:"Auto fill objects"})]})]});function y1(t){return t.version===2}function I1(t){return Array.isArray(t)}const Dr=X.module("UserLayoutUtils"),R1={layoutConfig:[{type:"column",content:[{type:"row",content:[{type:"stack",content:[{type:"react-component",component:_i.COMPONENT,title:_i.TITLE,isClosable:!1},{type:"react-component",component:tl.COMPONENT,title:tl.TITLE,isClosable:!1}]},{type:"stack",width:25,content:[{type:"react-component",component:Zr.COMPONENT,title:Zr.TITLE,isClosable:!1},{type:"react-component",component:Jr.COMPONENT,title:Jr.TITLE,isClosable:!1}]}]},{type:"row",content:[{type:"stack",title:"Notebooks",content:[]}]}]}],links:[],filterSets:[],version:2},D1={layoutConfig:[],links:[],filterSets:[],version:2};function xp(t){if(y1(t))return t;if(I1(t))return{layoutConfig:t,links:[],filterSets:[],version:2};throw new Error(`Unexpected layout import format: ${t}`)}async function M1(t,e=!0){try{const n=await t.getLayouts();if(n.length>0)try{const s=await t.getLayout(n[0]);return xp(s)}catch(s){Dr.error("Unable to load layout",n[0],":",s),Dr.warn("No valid layouts found, falling back to default layout")}}catch(n){Dr.error("Unable to fetch layout list",n),Dr.warn("Falling back to default layout")}return e?R1:D1}function N1(t){const{filterSets:e,layoutConfig:n,links:s}=t;return{filterSets:e,layoutConfig:n,links:s,version:2}}const Pr={exportLayout:N1,getDefaultLayout:M1,normalizeLayout:xp},Mr=X.module("DownloadServiceWorkerUtils"),_p=class{static registerOnLoaded(){new URL("/ide/",window.location.href).origin===window.location.origin&&("serviceWorker"in navigator?window.addEventListener("load",()=>{const e=new URL("/ide/download/serviceWorker.js",window.location.href);navigator.serviceWorker.register(e).then(n=>{n.update(),Mr.info("Registering service worker on ",e,n)}).catch(n=>{Mr.error("Failed to register service worker",n)})}):Mr.info("Service worker is not supported."))}static async getServiceWorker(){if("serviceWorker"in navigator){const e=(await navigator.serviceWorker.getRegistrations()).find(n=>n.scope.endsWith(_p.DOWNLOAD_PATH));if(e&&e.active)return Mr.info("Download service worker is active."),e.active;throw new Error("Can not find download service worker.")}throw new Error("Download service worker is not available.")}static unregisterSW(){}};let sl=_p;sl.DOWNLOAD_PATH="/download/";const Lp={react:Y},F1=Jp(Lp),x1=eg({requires:F1}),_1=tg.createRequires(Lp),L1=ng({requires:_1}),k1=X.module("PluginUtils");class Ka{static loadComponentPlugin(e){if("".split(",").includes(e)){const o=Y.lazy(()=>dg(()=>import(`./internal/${e}`),[])),r=Y.forwardRef((l,a)=>h(S.exports.Suspense,{fallback:h("div",{children:"Loading Plugin..."}),children:h(o,{ref:a,...l})}));return r.pluginName=e,r.displayName="Local Plugin",r}const n=new URL("/ide/plugins/",`${window.location}`),s=new URL(`${e}.js`,n),i=Y.forwardRef((o,r)=>h(x1,{url:s,render:({err:l,Component:a})=>{if(l!=null&&l!==""){const d=`Error loading plugin ${e} from ${s} due to ${l}`;return k1.error(d),h("div",{className:"error-message",children:`${d}`})}return h(a,{ref:r,...o})}}));return i.pluginName=e,i.displayName="Plugin",i}static async loadModulePlugin(e){return await L1(e)}static async loadJson(e){return new Promise((n,s)=>{const i=new XMLHttpRequest;i.addEventListener("load",()=>{try{const o=JSON.parse(i.responseText);n(o)}catch(o){s(o)}}),i.addEventListener("error",o=>{s(o)}),i.open("GET",e),i.send()})}}const _t=X.module("AppMainContainer");class No extends S.exports.Component{constructor(e){super(e),this.getDashboardPlugins=fe(n=>[...n.entries()].filter(([,{DashboardPlugin:s}])=>s).map(([s,{DashboardPlugin:i}])=>h(i,{},s))),this.handleSettingsMenuHide=this.handleSettingsMenuHide.bind(this),this.handleSettingsMenuShow=this.handleSettingsMenuShow.bind(this),this.handleError=this.handleError.bind(this),this.handleControlSelect=this.handleControlSelect.bind(this),this.handleToolSelect=this.handleToolSelect.bind(this),this.handleClearFilter=this.handleClearFilter.bind(this),this.handleDataChange=this.handleDataChange.bind(this),this.handleAutoFillClick=this.handleAutoFillClick.bind(this),this.handleGoldenLayoutChange=this.handleGoldenLayoutChange.bind(this),this.handleLayoutConfigChange=this.handleLayoutConfigChange.bind(this),this.handleExportLayoutClick=this.handleExportLayoutClick.bind(this),this.handleImportLayoutClick=this.handleImportLayoutClick.bind(this),this.handleImportLayoutFiles=this.handleImportLayoutFiles.bind(this),this.handleLoadTablePlugin=this.handleLoadTablePlugin.bind(this),this.handleResetLayoutClick=this.handleResetLayoutClick.bind(this),this.handleWidgetMenuClick=this.handleWidgetMenuClick.bind(this),this.handleWidgetsMenuClose=this.handleWidgetsMenuClose.bind(this),this.handleWidgetSelect=this.handleWidgetSelect.bind(this),this.handlePaste=this.handlePaste.bind(this),this.hydrateChart=this.hydrateChart.bind(this),this.hydrateGrid=this.hydrateGrid.bind(this),this.hydratePandas=this.hydratePandas.bind(this),this.hydrateDefault=this.hydrateDefault.bind(this),this.openNotebookFromURL=this.openNotebookFromURL.bind(this),this.importElement=Y.createRef(),this.state={contextActions:[{action:()=>{this.handleToolSelect(cn.LINKER)},shortcut:Ls.LINKER,isGlobal:!0},{action:()=>{this.sendClearFilter()},shortcut:an.TABLE.CLEAR_ALL_FILTERS,isGlobal:!0},{action:()=>{_t.debug("Consume unhandled save shortcut")},shortcut:Ls.SAVE,isGlobal:!0}],isPanelsMenuShown:!1,isSettingsMenuShown:!1,widgets:[]}}static handleWindowBeforeUnload(e){e.preventDefault(),e.returnValue=""}static hydrateConsole(e,n){return _a.hydrate({...e,unzip:s=>Kh.loadAsync(s).then(i=>Object.values(i.files))},n)}componentDidMount(){this.initWidgets(),window.addEventListener("beforeunload",No.handleWindowBeforeUnload)}componentDidUpdate(e){const{dashboardData:n}=this.props;e.dashboardData!==n&&this.handleDataChange(n)}componentWillUnmount(){this.deinitWidgets(),window.removeEventListener("beforeunload",No.handleWindowBeforeUnload)}initWidgets(){const{connection:e}=this.props;if(e.subscribeToFieldUpdates==null){_t.warn("subscribeToFieldUpdates not supported, not initializing widgets");return}this.widgetListenerRemover=e.subscribeToFieldUpdates(n=>{_t.debug("Got updates",n),this.setState(({widgets:s})=>{const{updated:i,created:o,removed:r}=n,l=[...i,...r],a=s.filter(c=>!l.some(u=>u.name===c.name));return[...i,...o].forEach(c=>{c.name!=null&&c.name!==""&&a.push(c)}),{widgets:a}})})}deinitWidgets(){var e;(e=this.widgetListenerRemover)==null||e.call(this)}openNotebookFromURL(){const{match:e}=this.props,{notebookPath:n}=e.params;if(n){const{session:s,sessionConfig:i}=this.props;if(s==null||i==null){_t.error("No session available to open notebook URL",n);return}const o={id:`/${n}`,itemName:`/${n}`},r=i.type,l={value:null,language:r};this.emitLayoutEvent(He.SELECT_NOTEBOOK,s,r,l,o,!0)}}sendClearFilter(){this.emitLayoutEvent(Pe.CLEAR_ALL_FILTERS)}emitLayoutEvent(e,...n){var s;(s=this.goldenLayout)==null||s.eventHub.emit(e,...n)}handleError(e){ye.isCanceled(e)||_t.error(e)}handleSettingsMenuHide(){this.setState({isSettingsMenuShown:!1})}handleSettingsMenuShow(){this.setState({isSettingsMenuShown:!0})}handleControlSelect(e,n=null){switch(_t.debug("handleControlSelect",e),e){case Cn.DROPDOWN_FILTER:this.emitLayoutEvent(Pe.OPEN_DROPDOWN,{title:"DropdownFilter",type:e,createNewStack:!0,dragEvent:n});break;case Cn.INPUT_FILTER:this.emitLayoutEvent(Pe.OPEN_INPUT,{title:"InputFilter",type:e,createNewStack:!0,dragEvent:n});break;case Cn.MARKDOWN:this.emitLayoutEvent(ap.OPEN,{title:"Markdown",type:e,dragEvent:n});break;case Cn.FILTER_SET_MANAGER:this.emitLayoutEvent(Pe.OPEN_FILTER_SET_MANAGER,{title:"FilterSets",type:e,dragEvent:n});break;default:throw new Error(`Unrecognized control type ${e}`)}}handleToolSelect(e){_t.debug("handleToolSelect",e);const{activeTool:n,setActiveTool:s}=this.props;s(n===e?cn.DEFAULT:e)}handleClearFilter(){this.sendClearFilter()}handleDataChange(e){const{updateWorkspaceData:n}=this.props,{closed:s,filterSets:i,links:o}=e;n({closed:s,filterSets:i,links:o})}handleGoldenLayoutChange(e){this.goldenLayout=e}handleLayoutConfigChange(e){const{updateWorkspaceData:n}=this.props;n({layoutConfig:e})}handleWidgetMenuClick(){this.setState(({isPanelsMenuShown:e})=>({isPanelsMenuShown:!e}))}handleWidgetSelect(e,n){this.setState({isPanelsMenuShown:!1}),_t.debug("handleWidgetSelect",e,n),this.openWidget(e,n)}handleWidgetsMenuClose(){this.setState({isPanelsMenuShown:!1})}handleAutoFillClick(){const{widgets:e}=this.state;_t.debug("handleAutoFillClick",e);const n=e.sort((s,i)=>s.title!=null&&i.title!=null?s.title.localeCompare(i.title):0);for(let s=0;s<n.length;s+=1)this.openWidget(n[s])}handleExportLayoutClick(){_t.info("handleExportLayoutClick"),this.setState({isPanelsMenuShown:!1});try{const{workspace:e}=this.props,{data:n}=e,s=Pr.exportLayout(n);_t.info("handleExportLayoutClick exportedConfig",s);const i=new Blob([JSON.stringify(s)],{type:"application/json"}),o=M.i18n.DateTimeFormat.format("yyyy-MM-dd-HHmmss",new Date),r=document.createElement("a");r.href=URL.createObjectURL(i),r.download=`deephaven-app-layout-${o}.json`,r.click()}catch(e){_t.error("Unable to export layout",e)}}handleImportLayoutClick(){_t.info("handleImportLayoutClick"),this.setState({isPanelsMenuShown:!1}),this.importElement.current!=null&&(this.importElement.current.value="",this.importElement.current.click())}handleResetLayoutClick(){_t.info("handleResetLayoutClick"),this.setState({isPanelsMenuShown:!1}),this.resetLayout()}handleImportLayoutFiles(e){var n;e.stopPropagation(),e.preventDefault(),e.target.files!=null&&this.importLayoutFile((n=e.target.files)==null?void 0:n[0])}async importLayoutFile(e){try{const{updateDashboardData:n,updateWorkspaceData:s}=this.props,i=await e.text(),o=JSON.parse(i),{filterSets:r,layoutConfig:l,links:a}=Pr.normalizeLayout(o);s({layoutConfig:l}),n(Rn,{filterSets:r,links:a})}catch(n){_t.error("Unable to import layout",n)}}async resetLayout(){const{layoutStorage:e,session:n}=this.props,{filterSets:s,layoutConfig:i,links:o}=await Pr.getDefaultLayout(e,n!==void 0),{updateDashboardData:r,updateWorkspaceData:l}=this.props;l({layoutConfig:i}),r(Rn,{filterSets:s,links:o})}handlePaste(e){let n=e.currentTarget.parentElement;for(;n!=null;){if(n.classList.contains("monaco-editor"))return;n=n.parentElement}const{clipboardData:s}=e,i=s.getData("Text"),o=/“|”/g;o.test(i)&&(e.preventDefault(),e.stopPropagation(),document.execCommand("insertText",!1,i.replace(o,'"')))}handleLoadTablePlugin(e){const{plugins:n}=this.props,s=n.get(e);return s!=null&&s.TablePlugin!=null?s.TablePlugin:Ka.loadComponentPlugin(e)}hydrateDefault(e,n){const{connection:s}=this.props,{metadata:i}=e;if((i==null?void 0:i.type)!=null&&((i==null?void 0:i.id)!=null||(i==null?void 0:i.name)!=null)){const o=i.id!=null?{type:i.type,id:i.id}:{type:i.type,name:i.name,title:i.name};return{fetch:()=>s.getObject(o),localDashboardId:n,...e}}return _a.hydrate(e,n)}hydrateGrid(e,n){return this.hydrateTable(e,n,M.VariableType.TABLE)}hydratePandas(e,n){return this.hydrateTable(e,n,M.VariableType.PANDAS)}hydrateTable(e,n,s=M.VariableType.TABLE){const{connection:i}=this.props;return{...e,getDownloadWorker:sl.getServiceWorker,loadPlugin:this.handleLoadTablePlugin,localDashboardId:n,makeModel:()=>T1(i,e.metadata,s)}}hydrateChart(e,n){const{connection:s}=this.props;return{...e,localDashboardId:n,makeModel:()=>{const{metadata:i,panelState:o}=e;return v1(s,i,o)}}}openWidget(e,n){const{connection:s}=this.props;this.emitLayoutEvent(Me.OPEN,{dragEvent:n,fetch:()=>s.getObject(e),widget:e})}render(){const{activeTool:e,plugins:n,user:s,workspace:i}=this.props,{data:o}=i,{layoutConfig:r}=o,{permissions:l}=s,{canUsePanels:a}=l,{contextActions:d,isPanelsMenuShown:c,isSettingsMenuShown:u,widgets:m}=this.state,p=this.getDashboardPlugins(n);return w("div",{className:W("app-main-tabs","w-100","h-100","d-flex","flex-column",e?`active-tool-${e.toLowerCase()}`:""),onPaste:this.handlePaste,tabIndex:-1,children:[h("nav",{className:"nav-container",children:w("div",{className:"app-main-top-nav-menus",children:[h("img",{src:Np,alt:"Deephaven Data Labs",width:"115px",className:"ml-1"}),w("div",{children:[w(oe,{kind:"ghost",className:"btn-panels-menu",icon:Gf,onClick:()=>{},children:["Controls",h(tc,{handleControlSelect:this.handleControlSelect,handleToolSelect:this.handleToolSelect,onClearFilter:this.handleClearFilter})]}),a&&w(oe,{kind:"ghost",className:"btn-panels-menu btn-show-panels","data-testid":"app-main-panels-button",onClick:this.handleWidgetMenuClick,icon:Bf,children:["Panels",h(Fn,{isShown:c,className:"panels-menu-popper",onExited:this.handleWidgetsMenuClose,closeOnBlur:!0,interactive:!0,children:h(w1,{widgets:m,onExportLayout:this.handleExportLayoutClick,onImportLayout:this.handleImportLayoutClick,onResetLayout:this.handleResetLayoutClick,onSelect:this.handleWidgetSelect})})]}),h(oe,{kind:"ghost",className:W("btn-settings-menu",{"text-warning":s.operateAs!==s.name}),onClick:this.handleSettingsMenuShow,icon:h(G,{icon:Vo,transform:"grow-3 right-1 down-1"}),tooltip:"User Settings"})]})]})}),w(aw,{emptyDashboard:h(E1,{onAutoFillClick:this.handleAutoFillClick}),id:Rn,layoutConfig:r,onGoldenLayoutChange:this.handleGoldenLayoutChange,onLayoutConfigChange:this.handleLayoutConfigChange,onLayoutInitialized:this.openNotebookFromURL,hydrate:this.hydrateDefault,children:[h(BE,{hydrate:this.hydrateGrid,getDownloadWorker:sl.getServiceWorker,loadPlugin:this.handleLoadTablePlugin}),h(OE,{hydrate:this.hydrateChart}),h(AE,{}),h(HE,{hydrateConsole:No.hydrateConsole,notebooksUrl:new URL("/notebooks/",`${window.location}`).href}),h(VE,{}),h(YE,{hydrate:this.hydratePandas}),h(qE,{}),h(KE,{}),p]}),h(ht,{in:u,timeout:Tt.transitionMidMs,classNames:"slide-left",mountOnEnter:!0,unmountOnExit:!0,children:h(qo,{onDone:this.handleSettingsMenuHide})}),h(se,{actions:d}),h("input",{ref:this.importElement,type:"file",accept:".json",style:{display:"none"},onChange:this.handleImportLayoutFiles})]})}}const O1=t=>{var e,n;return{activeTool:Tl(t),dashboardData:qt(t,Rn),layoutStorage:S1(t),plugins:uS(t),connection:YT(t,Rn),session:(e=gi(t,Rn))==null?void 0:e.session,sessionConfig:(n=gi(t,Rn))==null?void 0:n.config,user:Ju(t),workspace:wl(t)}},A1=Mt(O1,{setActiveTool:El,updateDashboardData:qn,updateWorkspaceData:cm})(sg(No)),P1=()=>w("div",{className:"app",children:[h(A1,{}),h(mu,{})]});X.module("StorageTableViewportUpdater");class Hh{static makeSortConfig(e,n){return{column:e,direction:n}}static makeFilterConfig(e){const n=[],s=[];return e.forEach((i,o)=>{n.push(i),o>0&&s.push(zt.and)}),{filterItems:n,filterOperators:s}}static combineFilterConfigs(e,n,s=zt.and){return{filterItems:[...e.filterItems,...n.filterItems],filterOperators:[...e.filterOperators,s,...n.filterOperators]}}static makeFilterItem(e,n,s){return{columnName:e,type:n,value:s}}}const ga=X.module("PouchStorageTable"),H1="Deephaven.";qh.plugin(ig);function V1(t,e){switch(t){case q.in:case q.contains:return{$regex:new RegExp(`${e}`)};case q.inIgnoreCase:return{$regex:new RegExp(`${e}`,"i")};case q.eq:return{$eq:e};case q.notEq:return{$neq:e};case q.greaterThan:return{$gt:e};case q.greaterThanOrEqualTo:return{$gte:e};case q.lessThan:return{$lt:e};case q.lessThanOrEqualTo:return{$lte:e};case q.startsWith:return{$regex:new RegExp(`^(?${e}).*`)};default:throw new Error(`Unsupported type: ${t}`)}}function U1(t){const{filterItems:e,filterOperators:n}=t;let s=null;for(let i=0;i<e.length;i+=1){const o=e[i],{columnName:r,type:l,value:a}=o,d={[r]:V1(l,a)};if(i===0)s=d;else if(s!==null&&i-1<n.length){const c=n[i-1];if(c===zt.and)s={$and:[s,d]};else if(c===zt.or)s={$or:[s,d]};else throw new Error(`Unexpected filter operator ${c}, ${d}`)}}if(s==null)throw new Error(`Invalid filter config ${t}`);return s}function fa(t=[]){return{$and:[...t.map(e=>U1(e)),{name:{$gt:null}},{id:{$gt:null}}]}}function B1(t,e=!1){var n;return[{id:e?"desc":"asc"},...(n=t==null?void 0:t.map(s=>({[s.column]:s.direction})))!=null?n:[]]}class $1{constructor(e){this.listeners=[],this.itemListeners=new Map,this.currentSize=0,this.currentReverse=!1,this.currentFilter=null,this.currentSort=null,this.db=new qh(`${H1}${e}`),this.db._remote=!1,this.db.changes({live:!0,since:"now",include_docs:!0}).on("change",this.dbUpdate.bind(this)),this.db.createIndex({index:{fields:["id","name"]}}),this.refreshInfo()}onUpdate(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(n=>n!==e)}}onItemUpdate(e,n){return this.itemListeners.has(e)||this.itemListeners.set(e,[]),this.itemListeners.set(e,[...this.itemListeners.get(e),n]),this.refreshItem(e),()=>{this.itemListeners.set(e,this.itemListeners.get(e).filter(s=>s!==n))}}close(){this.listeners=[]}get size(){return this.currentSize}get viewport(){return this.currentViewport}setReversed(e){this.currentReverse=e,this.currentViewportData=void 0,this.refreshData()}setViewport(e){this.currentViewport=e,this.refreshInfo(),this.refreshData()}setSorts(e){this.currentSort=e,this.currentViewportData=void 0,this.refreshData()}setFilters(e){this.currentFilter=e,this.currentViewportData=void 0,this.refreshInfo(),this.refreshData()}get data(){return this.currentViewportData}async getViewportData(){var e;return this.viewportUpdatePromise||this.refreshData(),(e=this.viewportUpdatePromise)!=null?e:Promise.resolve({items:[],offset:0})}async put(e){const n={...e,_id:e.id};return await this.db.put(n),n}sendUpdate(){var s;const{listeners:e}=this,n=(s=this.currentViewportData)!=null?s:{items:[],offset:0};for(let i=0;i<e.length;i+=1)e[i](n)}sendItemUpdate(e){const n=this.itemListeners.get(e.id);if(n!==void 0)for(let s=0;s<n.length;s+=1)n[s](e)}dbUpdate(e){ga.debug("Update received",e),this.refreshInfo(),e.doc!==void 0&&this.sendItemUpdate(e.doc),this.refreshData()}async refreshInfo(){var e,n;try{(e=this.infoUpdatePromise)==null||e.cancel(),this.infoUpdatePromise=ye.makeCancelable(this.db.find({selector:fa((n=this.currentFilter)!=null?n:[]),fields:[]}));const s=await this.infoUpdatePromise;this.currentSize=s.docs.length,this.sendUpdate()}catch(s){if(!ye.isCanceled(s))throw ga.error("Unable to refreshInfo",s),s}}async refreshData(){var e,n;if(!!this.currentViewport)try{const{currentViewport:s}=this,i=B1(this.currentSort,this.currentReverse);(e=this.viewportUpdatePromise)==null||e.cancel(),this.viewportUpdatePromise=ye.makeCancelable(this.db.find({selector:fa((n=this.currentFilter)!=null?n:[]),skip:s.top,limit:s.bottom-s.top+1,sort:i,fields:["id","name"]}).then(r=>({items:r.docs,offset:s.top})));const o=await this.viewportUpdatePromise;return this.currentViewportData=o,this.sendUpdate(),o}catch(s){if(!ye.isCanceled(s))throw ga.error("Unable to refreshData",s),s}}async refreshItem(e){const s=(await this.db.find({selector:{id:e},limit:1})).docs[0];return s!==void 0&&this.sendItemUpdate(s),s}async getSnapshot(e){const n=new Map,s=[{id:this.currentReverse?"desc":"asc"}];return await Promise.all(e.map(async([i,o])=>{var l;const r=o-i+1;return this.db.find({selector:fa((l=this.currentFilter)!=null?l:[]),skip:i,limit:r,sort:s,fields:["id","name"]}).then(a=>{for(let d=0;d<r;d+=1){const c=i+d;n.set(c,a.docs[d])}})})),n}}class Vh extends $1{constructor(e){super(`CommandHistoryStorage.${e}`)}setSearch(e){this.setFilters(e?[Hh.makeFilterConfig([Hh.makeFilterItem("name",q.contains,e)])]:[])}}const Uh=X.module("PouchCommandHistoryStorage");class W1{constructor(){this.updateTableMap=new Map}getUpdateTable(e){return this.updateTableMap.has(e)||this.updateTableMap.set(e,new Vh(e)),this.updateTableMap.get(e)}async getTable(e){return new Vh(e)}async addItem(e,n,s,i){return this.updateItem(e,{id:`${new Date().getTime()}`,name:s,data:i})}async updateItem(e,n){const s=this.getUpdateTable(e),i=await s.refreshItem(n.id),o={...i!=null?i:{},...n};return Uh.debug("Updating item",o),await s.put(o),Uh.debug("Update saved"),n}listenItem(e,n,s){return this.getUpdateTable(e).onItemUpdate(n,s)}}const z1=X.module("LocalWorkspaceStorage"),Eo=class{static async makeDefaultWorkspaceData(t,e){const{filterSets:n,links:s,layoutConfig:i}=await Pr.getDefaultLayout(t,e==null?void 0:e.isConsoleAvailable);return{settings:{defaultDateTimeFormat:lt.DEFAULT_DATETIME_FORMAT_STRING,formatter:[],timeZone:lt.DEFAULT_TIME_ZONE_ID,showTimeZone:!1,showTSeparator:!0,disableMoveConfirmation:!1,defaultDecimalFormatOptions:{defaultFormatString:Ue.DEFAULT_FORMAT_STRING},defaultIntegerFormatOptions:{defaultFormatString:dt.DEFAULT_FORMAT_STRING},truncateNumbersWithPound:!1},layoutConfig:i,closed:[{}],links:s,filterSets:n}}static async makeDefaultWorkspace(t,e){return{data:await Eo.makeDefaultWorkspaceData(t,e)}}constructor(t){this.layoutStorage=t}async load(t){var e;try{return JSON.parse((e=localStorage.getItem(Eo.STORAGE_KEY))!=null?e:"")}catch{return z1.info("Unable to load workspace data, initializing to default data"),Eo.makeDefaultWorkspace(this.layoutStorage,t)}}async save(t){return localStorage.setItem(Eo.STORAGE_KEY,JSON.stringify(t)),t}};let kp=Eo;kp.STORAGE_KEY="deephaven.WorkspaceStorage";class G1 extends Error{constructor(){super(...arguments),this.isNoConsolesError=!0}}function K1(t){return t.isNoConsolesError}const ki=X.module("SessionUtils");function q1(){return new URL("/jsapi",`${window.location}`)}function Op(){const t=q1();return`${t.protocol}//${t.host}`}function Y1(){const t=Op();return ki.info(`Starting connection to '${t}'...`),new M.IdeConnection(t)}async function X1(t){ki.info("Getting console types...");const e=await t.getConsoleTypes();if(ki.info("Available types:",e),e.length===0)throw new G1("No console types available");const n=e[0];ki.info("Starting session with type",n);const s=await t.startSession(n),i={type:n,id:ze.generate()};return ki.info("Console session established",i),{session:s,config:i,connection:t}}function j1(){const t=Op();return ki.info("createCoreClient",t),new M.CoreClient(t)}class Q1{constructor(e,n=""){this.storageService=e,this.root=n}async getLayouts(){return(await this.storageService.listItems(this.root,"*.json")).map(n=>n.basename)}async getLayout(e){const s=await(await this.storageService.loadFile(`${this.root}/${e}`)).text();return JSON.parse(s)}}const Co=X.module("GrpcFileStorageTable"),qa=class{constructor(t,e="",n=e){this.currentSize=0,this.listeners=[],this.childTables=new Map,this.storageService=t,this.baseRoot=e,this.root=n,n===e&&(this.doRefresh=Xe(this.doRefresh.bind(this),qa.REFRESH_DEBOUNCE))}removeBaseRoot(t){return de.removeRoot(this.baseRoot,t)}getViewportData(){var t;return this.viewportUpdatePromise||this.refreshInternal(),(t=this.viewportUpdatePromise)!=null?t:Promise.resolve({items:[],offset:0})}getSnapshot(t){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(t,e){const n=t.split("/");let s=n.shift();if((s===void 0||s==="")&&(s=n.shift()),s===void 0||s==="")throw new Error(`Invalid path: ${t}`);const i=n.join("/");if(e){if(!this.childTables.has(s)){const o=new qa(this.storageService,this.baseRoot,`${this.root}/${s}`);this.childTables.set(s,o)}if(i){const o=this.childTables.get(s);o==null||o.setExpanded(i,e)}}else if(this.childTables.has(s))if(i){const o=this.childTables.get(s);o==null||o.setExpanded(i,e)}else this.childTables.delete(s);this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(t){throw new Error("Method not implemented.")}setViewport(t){this.currentViewport=t,this.refreshInternal()}setFilters(){throw new Error("Method not implemented.")}setSorts(){throw new Error("Method not implemented.")}setReversed(){throw new Error("Method not implemented.")}close(){this.listeners=[]}onUpdate(t){return this.listeners=[...this.listeners,t],()=>{this.listeners=this.listeners.filter(e=>e!==t)}}doRefresh(t){Co.debug2("doRefresh",this.root),t(this.fetchData())}refresh(){var n;Co.debug2("refresh",this.root),(n=this.viewportUpdatePromise)==null||n.cancel();const t=new Promise(s=>{this.doRefresh(s)}),e=ye.makeCancelable(t.then(s=>{if(this.viewportUpdatePromise!==e)throw new ai;return this.currentViewportData=s,this.sendUpdate(),s}));e.catch(s=>{ye.isCanceled(s)||Co.error("Error updating viewport",s)}),this.viewportUpdatePromise=e}refreshInternal(){try{this.refresh()}catch(t){ye.isCanceled(t)||Co.error("Unable to refresh data",t)}}async fetchData(){const{currentViewport:t}=this;if(!t)throw new Error("No viewport set");let n=(await this.storageService.listItems(this.root)).map(s=>({type:s.type,filename:this.removeBaseRoot(s.filename),basename:s.basename,id:this.removeBaseRoot(s.filename),isExpanded:s.type==="directory"?this.childTables.has(s.basename):void 0})).sort((s,i)=>s.type!==i.type?s.type==="directory"?-1:1:s.basename.localeCompare(i.basename));for(let s=0;s<n.length;s+=1){const i=n[s],{basename:o,filename:r}=i;if(r===this.removeBaseRoot(`${this.root}/${o}`)&&i.type==="directory"){const l=this.childTables.get(o);if(l!=null){l.setViewport({top:0,bottom:t.bottom-s});const a=await l.getViewportData();n.splice(s+1,0,...a.items)}}}return this.currentSize=n.length,Co.debug2(this.root,"items",n,t),n=n.slice(t.top,t.bottom),{items:n,offset:t.top}}sendUpdate(){var n;const{listeners:t}=this,e=(n=this.currentViewportData)!=null?n:{items:[],offset:0};for(let s=0;s<t.length;s+=1)t[s](e)}};let Ap=qa;Ap.REFRESH_DEBOUNCE=50;const Z1=X.module("GrpcFileStorage"),Pp=class{constructor(t,e=""){this.tables=[],this.refreshTables=ui(()=>{this.tables.every(n=>n.refresh().catch(()=>{}))},Pp.REFRESH_THROTTLE),this.storageService=t,this.root=e}removeRoot(t){return de.removeRoot(this.root,t)}addRoot(t){return de.addRoot(this.root,t)}async createDirectory(t){return await this.storageService.createDirectory(this.addRoot(t)),this.refreshTables(),{type:"directory",id:t,filename:t,basename:de.getBaseName(t)}}async getTable(){const t=new Ap(this.storageService,this.root);return this.tables.push(t),t}async saveFile(t){const e=dh.storage.FileContents.text(t.content);return await this.storageService.saveFile(this.addRoot(t.filename),e,!0),this.refreshTables(),t}async loadFile(t){const n=await(await this.storageService.loadFile(this.addRoot(t))).text();return{filename:t,basename:de.getBaseName(t),content:n}}async deleteFile(t){await this.storageService.deleteItem(this.addRoot(t)),this.refreshTables()}async moveFile(t,e){await this.storageService.moveItem(this.addRoot(t),this.addRoot(e)),this.refreshTables()}async info(t){const e=await this.storageService.listItems(this.addRoot(de.getPath(t)),de.getBaseName(t));if(e.length===0)throw new Yd;if(e.length>1)throw Z1.error("More than one matching file found, should never happen.",e),new Error("More than one matching file found");const n=e[0];return{filename:this.removeRoot(n.filename),basename:this.removeRoot(n.basename),id:this.removeRoot(n.filename),type:n.type}}};let Hp=Pp;Hp.REFRESH_THROTTLE=150;const ri=X.module("AppInit");async function J1(){ri.debug("Loading plugins...");try{const t=await Ka.loadJson("/js-plugins/manifest.json");ri.debug("Plugin manifest loaded:",t);const e=[];for(let i=0;i<t.plugins.length;i+=1){const{name:o,main:r}=t.plugins[i],l=`/js-plugins/${o}/${r}`;e.push(Ka.loadModulePlugin(l))}const n=await Promise.all(e),s=new Map;for(let i=0;i<n.length;i+=1){const{name:o}=t.plugins[i];s.set(o,n[i])}return ri.info("Plugins loaded:",s),s}catch(t){return ri.error("Unable to load plugins:",t),new Map}}async function e2(t){let e;try{e=await X1(t)}catch(n){if(!K1(n))throw n}return e}const nc=t=>{const{workspace:e,setActiveTool:n,setCommandHistoryStorage:s,setDashboardData:i,setFileStorage:o,setLayoutStorage:r,setDashboardConnection:l,setDashboardSessionWrapper:a,setPlugins:d,setUser:c,setWorkspace:u,setWorkspaceStorage:m}=t,[p,g]=S.exports.useState(),[f,b]=S.exports.useState(!0),C=S.exports.useCallback(async()=>{var I,D;try{ri.info("Initializing Web UI","0.19.1",navigator.userAgent);const N=await J1(),x=Y1(),U=await e2(x);x.addEventListener(M.IdeConnection.HACK_CONNECTION_FAILURE,Z=>{var Ce;const{detail:me}=Z;ri.error("Connection failure",me),g(`Unable to connect: ${(Ce=me.details)!=null?Ce:"Unknown Error"}`)});const $="user",k={name:$,operateAs:$,groups:[],permissions:{isSuperUser:!1,isQueryViewOnly:!1,isNonInteractive:!1,canUsePanels:!0,canCreateDashboard:!0,canCreateCodeStudio:!0,canCreateQueryMonitor:!0,canCopy:!0,canDownloadCsv:!0}},H=j1();await H.login({type:M.CoreClient.LOGIN_TYPE_ANONYMOUS});const O=H.getStorageService(),F=new Q1(O,"/layouts"),_=new Hp(O,"/notebooks"),L=new kp(F),V=new W1,z=await L.load({isConsoleAvailable:U!==void 0}),{data:j}=z,{settings:J}=j;J.defaultDecimalFormatOptions===void 0&&(J.defaultDecimalFormatOptions={defaultFormatString:Ue.DEFAULT_FORMAT_STRING}),J.defaultIntegerFormatOptions===void 0&&(J.defaultIntegerFormatOptions={defaultFormatString:dt.DEFAULT_FORMAT_STRING}),J.truncateNumbersWithPound===void 0&&(J.truncateNumbersWithPound=!1);const{shortcutOverrides:Te={}}=J,we=Wt.isMacPlatform?(I=Te.mac)!=null?I:{}:(D=Te.windows)!=null?D:{};Object.entries(we).forEach(([Z,me])=>{var Ce;(Ce=Be.get(Z))==null||Ce.setKeyState(me)});const Oe={filterSets:j.filterSets,links:j.links};n(cn.DEFAULT),s(V),i(Rn,Oe),o(_),r(F),l(Rn,x),U!==void 0&&a(Rn,U),d(N),c(k),m(L),u(z)}catch(N){ri.error(N),g(N)}},[n,s,i,o,r,l,a,d,c,u,m]),v=S.exports.useCallback(()=>{document.fonts!=null?document.fonts.ready.then(()=>{b(!1)}):b(!1)},[]);S.exports.useEffect(function(){C(),v()},[C,v]);const T=e==null&&p==null||f,E=!T&&p==null,y=p!=null?`${p}`:null;return w(he,{children:[E&&h(P1,{}),h(ml,{isLoading:T,isLoaded:E,errorMessage:y}),w("div",{id:"preload-fonts",style:{visibility:"hidden",position:"absolute",top:-1e4},children:[h("p",{className:"fira-sans-regular",children:"preload"}),h("p",{className:"fira-sans-semibold",children:"preload"}),h("p",{className:"fira-mono",children:"preload"})]})]})};nc.propTypes={workspace:R.exports.shape({}),workspaceStorage:R.exports.shape({close:R.exports.func}),setActiveTool:R.exports.func.isRequired,setCommandHistoryStorage:R.exports.func.isRequired,setDashboardData:R.exports.func.isRequired,setFileStorage:R.exports.func.isRequired,setLayoutStorage:R.exports.func.isRequired,setDashboardConnection:R.exports.func.isRequired,setDashboardSessionWrapper:R.exports.func.isRequired,setPlugins:R.exports.func.isRequired,setUser:R.exports.func.isRequired,setWorkspace:R.exports.func.isRequired,setWorkspaceStorage:R.exports.func.isRequired};nc.defaultProps={workspace:null,workspaceStorage:null};const t2=t=>({workspace:wl(t),workspaceStorage:sS(t)}),Bh=Mt(t2,{setActiveTool:El,setCommandHistoryStorage:gS,setDashboardData:Om,setFileStorage:fS,setLayoutStorage:t1,setDashboardConnection:XT,setDashboardSessionWrapper:jT,setPlugins:bS,setUser:mS,setWorkspace:dm,setWorkspaceStorage:pS})(nc),n2=()=>h(og,{basename:"/ide/",children:w(rg,{children:[h(mc,{exact:!0,path:"/",component:Bh}),h(mc,{path:"/notebook/:notebookPath+",component:Bh}),h(lg,{from:"*",to:"/"})]})});Boolean(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/));function s2(){"serviceWorker"in navigator&&navigator.serviceWorker.getRegistrations().then(t=>{t.forEach(e=>{e.scope.endsWith("/download/")||e.unregister()})})}u1();hi.render(h(zh,{store:yl,children:h(n2,{})}),document.getElementById("root"));s2();sl.registerOnLoaded();rt.init();window["__react-beautiful-dnd-disable-dev-warnings"]=!0;
|
|
43
|
-
//# sourceMappingURL=index.
|
|
43
|
+
//# sourceMappingURL=index.ee4a4b51.js.map
|