@deephaven/code-studio 0.42.1-beta.0 → 0.42.1-beta.1
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.
- package/build/assets/{AppRoot-1c43b47d.js → AppRoot-95b6080d.js} +2 -2
- package/build/assets/{AppRoot-1c43b47d.js.map → AppRoot-95b6080d.js.map} +1 -1
- package/build/assets/{index-86c5ce93.js → index-3ec077c5.js} +2 -2
- package/build/assets/{index-86c5ce93.js.map → index-3ec077c5.js.map} +1 -1
- package/build/assets/{index-e5098079.js → index-e658b804.js} +2 -2
- package/build/assets/{index-e5098079.js.map → index-e658b804.js.map} +1 -1
- package/build/assets/useConnection-69cc76cc.js +5 -0
- package/build/assets/useConnection-69cc76cc.js.map +1 -0
- package/build/index.html +1 -1
- package/package.json +30 -30
- package/build/assets/useConnection-4208c73d.js +0 -5
- package/build/assets/useConnection-4208c73d.js.map +0 -1
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{C as h,G as re,r as w,I as Yb,P as q,F as te,J as Ff,K as pe,L as Uu,M as zi,N as rt,O as Pe,Q as If,S as ct,T as Rh,U as qb,V as Xb,W as Qb,X as Zb,$ as ce,R as Nh,Y as Xc,Z as Xe,_ as Fh,a0 as Jb,a1 as Ve,a2 as $u,E as eS,D as kr,a3 as nd,a4 as _f,a5 as Ih,a6 as tS,a7 as An,a8 as rS,a9 as nS,aa as iS,ab as aS,ac as Bu,ad as oS,ae as sS,af as lS,ag as Qc,ah as dS,ai as Zc,aj as uS,ak as hS,al as cS,am as mS,an as vS,ao as gS,ap as $t,aq as Mf,ar as fS,as as Af,at as pS,H as F,au as Lf,av as CS,aw as bS,ax as SS,ay as wS,az as Jc,aA as ES,aB as yS}from"./vendor-adf6fe6e.js";import{e as ni,l as _n,K as Qr,a as em,R as TS,b as Ui,W as PS}from"./monaco-13f9c9bb.js";import{v as Vu,d as OS,a as kf,b as _h,L as Hn,c as gs,e as ti,f as xf,g as oe,h as tm,i as DS,j as RS,k as NS,l as FS,m as Hr,n as Gi,o as Hf,p as ii,q as id,r as no,s as IS,t as _S,u as rm,w as Rl,x as nm,y as Uf,z as MS,A as fs,B as $f,C as AS,D as LS,T as et,E as Mh,F as Ah,G as Nl,H as Wn,I as kS,J as xS,K as HS,M as US,N as $S,O as Lh,P as Yi,Q as im,R as ps,S as kh,U as xh,V as Bf,W as BS,X as ad,Y as VS,Z as os,_ as WS,$ as Hh,a0 as Vf,a1 as ma,a2 as GS,a3 as jS,a4 as zS,a5 as KS,a6 as YS,a7 as qS,a8 as su,a9 as XS,aa as am,ab as QS,ac as ZS,ad as od,ae as sd,af as JS,ag as ew,ah as ld,ai as Wf,aj as tw,ak as rw,al as nw,am as Gf,an as iw,ao as aw,ap as ow,aq as sw,ar as lw,as as dw,at as uw,au as hw,av as cw,aw as mw,ax as vw,ay as gw,az as fw,aA as jf,aB as pw,aC as Wu,aD as Gu,aE as Cw,aF as bw,aG as Sw,aH as ww,aI as Ew,aJ as yw,aK as Tw,aL as Pw,aM as Ow,aN as Dw,aO as Rw,aP as Nw,aQ as Fw,aR as om,aS as Iw,aT as _w,aU as sm}from"./index-86c5ce93.js";import{P as Te,u as Pa,T as dd,B as z,a as L,S as qe,M as we,K as Oe,G as ui,C as le,b as Zr,c as rn,D as ai,d as go,e as ud,f as pt,g as Cs,I as io,U as Mw,h as fe,i as H,F as oi,j as wn,k as Ea,l as Uh,m as U,E as xe,n as Zn,o as Ki,p as bl,q as Tt,r as tt,s as yt,t as hd,v as Aw,O as ei,w as Lw,x as bn,y as vn,z as kw,A as xw,R as cd,H as si,J as md,L as zf,N as Kf,Q as Hw,V as Uw,W as lm,X as Je,Y as dm,Z as Yf,_ as $h,$ as um,a0 as ss,a1 as qf,a2 as $w,a3 as Xf,a4 as Bw,a5 as hn,a6 as Vw,a7 as Ww,a8 as Gw,a9 as jw,aa as zw,ab as Kw,ac as Yw,ad as qw,ae as Xw,af as Qw,ag as Zw,ah as Jw}from"./useConnection-4208c73d.js";import{P as Fl,b as eE,h as tE,p as rE,o as nE,s as iE,t as aE,c as Sl}from"./plotly-e90aff11.js";import"./helpers-042e6b4d.js";class Bh{static isDark(e){var t=document.createElement("div");t.style.display="none",t.style.color=e;var r=getComputedStyle(document.body.appendChild(t)).color,i=r.match(/\d+/g),a=[];if(i)a=i.map(s=>parseInt(s,10));else throw new Error("Invalid color received. Got ".concat(r));document.body.removeChild(t);var o=Bh.getBrightness(a);return o<125}static getBrightness(e){return Math.round((e[0]*299+e[1]*587+e[2]*114)/1e3)}}const Qf=Bh;function fo(n,e,t){return e=oE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function oE(n){var e=sE(n,"string");return typeof e=="symbol"?e:String(e)}function sE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var lE="table_",Zf="column_",dE=new Set(["in","not","i","ii","k"]),uE=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"]),hE=/[^a-zA-Z0-9_$+@-]/g,cE=/[^A-Za-z0-9_$]/g;class nn{}fo(nn,"legalize",(n,e,t,r,i)=>{var a=n.trim().replace(/[- ]/g,"_");return r&&(dE.has(a)||uE.has(a))&&(a=e+a),a=a.replace(t,""),a||(a=e+i),Number.isNaN(Number(a.charAt(0)))||(a=e+a),a});fo(nn,"legalizeTableName",n=>nn.legalize(n,lE,hE,!1,0));fo(nn,"legalizeColumnNames",n=>{var e=[];return n.forEach((t,r)=>{var i=nn.legalizeColumnName(t,r);e.includes(i)&&(i=Zf+r),e.push(i)}),e});fo(nn,"legalizeColumnName",function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nn.legalize(n,Zf,cE,!0,e)});fo(nn,"isValidTableName",n=>nn.legalizeTableName(n)===n);fo(nn,"isValidColumnName",n=>nn.legalizeColumnName(n)===n);const po=nn;function mE(n,e){return n?n.closest(".".concat(e)):null}const vE={getClosestByClassName:mE};function hm(n,e,t){return e=gE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gE(n){var e=fE(n,"string");return typeof e=="symbol"?e:String(e)}function fE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class pE{constructor(){hm(this,"pending",[]),hm(this,"resolved",[])}add(e,t){var r=Te.makeCancelable(e,t);return this.pending.push(r),r.then(()=>{this.resolve(r)},()=>{this.resolve(r)}),r}remove(e){for(var t=0;t<this.pending.length;t+=1)if(this.pending[t]===e){this.pending.splice(t,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){for(var e=[...this.pending,...this.resolved],t=0;t<e.length;t+=1)e[t].cancel();this.pending=[],this.resolved=[]}}const hi=pE;function CE(n,e,t){return e=bE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function bE(n){var e=SE(n,"string");return typeof e=="symbol"?e:String(e)}function SE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class wE extends Error{constructor(){super(...arguments),CE(this,"isInvalid",!0)}}const Ja=wE;function Jf(n){var{type:e}=n,t=Pa();switch(e){case t.VariableType.TABLE:case t.VariableType.TABLEMAP:case t.VariableType.TREETABLE:case t.VariableType.HIERARCHICALTABLE:return h.createElement(re,{icon:_h});case t.VariableType.FIGURE:return h.createElement(re,{icon:kf});case t.VariableType.PANDAS:return h.createElement(re,{icon:OS});default:return h.createElement(re,{icon:Vu})}}function EE(n,e,t){return e=yE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yE(n){var e=TE(n,"string");return typeof e=="symbol"?e:String(e)}function TE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class PE extends w.Component{constructor(e){super(e),EE(this,"container",void 0),this.container=null}componentDidMount(){this.colorize()}colorize(){var{children:e}=this.props;this.container&&e!=null&&ni.colorizeElement(this.container,{theme:"dh-dark"})}render(){var{children:e,language:t}=this.props;return h.createElement("div",null,h.createElement("div",{"data-lang":t,ref:r=>{this.container=r},style:{pointerEvents:"none"}},e))}}const vd=PE;class OE{static get LANGUAGE_MAP(){return new Map([["python","Python"],["groovy","Groovy"],["scala","Scala"]])}}const ep=OE;class Il{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)?[]:Yb.parse(e).filter(t=>!this.hasComment(t)).map(t=>this.hasPattern(t)?t.pattern:this.hasOp(t)?t.op:"".concat(t))}static formatTimestamp(e){if(e==null||!(e instanceof Date))return null;var t="".concat(e.getHours()).padStart(2,"0"),r="".concat(e.getMinutes()).padStart(2,"0"),i="".concat(e.getSeconds()).padStart(2,"0"),a="".concat(e.getMilliseconds()).padStart(3,"0");return"".concat(t,":").concat(r,":").concat(i,".").concat(a)}static isTableType(e,t){return t===e.VariableType.TABLE||t===e.VariableType.TREETABLE||t===e.VariableType.HIERARCHICALTABLE}static isWidgetType(e,t){return t===e.VariableType.FIGURE||t===e.VariableType.OTHERWIDGET||t===e.VariableType.PANDAS}static isOpenableType(e,t){return Il.isTableType(e,t)||Il.isWidgetType(e,t)}static isFigureType(e,t){return t===e.VariableType.FIGURE}static isPandas(e,t){return t===e.VariableType.PANDAS}}const ju=Il;function tp(n){var{children:e}=n;return h.createElement("div",{className:"console-history-item-result"},h.createElement("div",{className:"console-history-gutter"},"-"),h.createElement("div",{className:"console-history-content"},e))}tp.propTypes={children:q.node.isRequired};function zu(n,e,t){return e=DE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function DE(n){var e=RE(n,"string");return typeof e=="symbol"?e:String(e)}function RE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class rp extends w.Component{constructor(e){super(e),zu(this,"timer",void 0),zu(this,"startTime",void 0),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(){var{disabled:e,onCancelClick:t}=this.props,{elapsed:r}=this.state;return h.createElement("div",{className:te("console-history-result-in-progress",{disabled:e})},h.createElement("span",{className:"badge"},h.createElement(Hn,null)," Running... ",dd.formatElapsedTime(r)," ",h.createElement(z,{className:"console-history-result-in-progress-cancel",kind:"ghost",icon:gs,tooltip:"Cancel",onClick:t,disabled:e})))}}zu(rp,"defaultProps",{disabled:!1});const NE=rp;function Qo(n,e,t){return e=FE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function FE(n){var e=IE(n,"string");return typeof e=="symbol"?e:String(e)}function IE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class ao extends w.PureComponent{constructor(e){super(e),Qo(this,"mouseX",void 0),Qo(this,"mouseY",void 0),Qo(this,"isClicking",void 0),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(e){switch(e.key){case"Enter":case" ":this.handleToggleError(),e.stopPropagation(),e.preventDefault();break}}handleMouseDown(e){this.mouseX=e.clientX,this.mouseY=e.clientY,this.isClicking=!0}handleMouseMove(e){this.mouseX!=null&&this.mouseY!=null?(Math.abs(e.clientX-this.mouseX)>=ao.mouseDragThreshold||Math.abs(e.clientY-this.mouseY)>=ao.mouseDragThreshold)&&(this.isClicking=!1):this.isClicking&&(this.isClicking=!1)}handleMouseUp(e){this.isClicking&&!e.shiftKey&&!e.metaKey&&!e.altKey&&this.handleToggleError(),this.mouseX=null,this.mouseY=null,this.isClicking=!1}handleToggleError(){this.setState(e=>({isExpanded:!e.isExpanded}))}handleMouseEnter(){this.setState({isTriggerHovered:!0})}handleMouseLeave(){this.setState({isTriggerHovered:!1})}render(){var{isExpanded:e,isTriggerHovered:t}=this.state,{message:r}=this.props;L(r);var i=r.indexOf(`
|
|
1
|
+
import{C as h,G as re,r as w,I as Yb,P as q,F as te,J as Ff,K as pe,L as Uu,M as zi,N as rt,O as Pe,Q as If,S as ct,T as Rh,U as qb,V as Xb,W as Qb,X as Zb,$ as ce,R as Nh,Y as Xc,Z as Xe,_ as Fh,a0 as Jb,a1 as Ve,a2 as $u,E as eS,D as kr,a3 as nd,a4 as _f,a5 as Ih,a6 as tS,a7 as An,a8 as rS,a9 as nS,aa as iS,ab as aS,ac as Bu,ad as oS,ae as sS,af as lS,ag as Qc,ah as dS,ai as Zc,aj as uS,ak as hS,al as cS,am as mS,an as vS,ao as gS,ap as $t,aq as Mf,ar as fS,as as Af,at as pS,H as F,au as Lf,av as CS,aw as bS,ax as SS,ay as wS,az as Jc,aA as ES,aB as yS}from"./vendor-adf6fe6e.js";import{e as ni,l as _n,K as Qr,a as em,R as TS,b as Ui,W as PS}from"./monaco-13f9c9bb.js";import{v as Vu,d as OS,a as kf,b as _h,L as Hn,c as gs,e as ti,f as xf,g as oe,h as tm,i as DS,j as RS,k as NS,l as FS,m as Hr,n as Gi,o as Hf,p as ii,q as id,r as no,s as IS,t as _S,u as rm,w as Rl,x as nm,y as Uf,z as MS,A as fs,B as $f,C as AS,D as LS,T as et,E as Mh,F as Ah,G as Nl,H as Wn,I as kS,J as xS,K as HS,M as US,N as $S,O as Lh,P as Yi,Q as im,R as ps,S as kh,U as xh,V as Bf,W as BS,X as ad,Y as VS,Z as os,_ as WS,$ as Hh,a0 as Vf,a1 as ma,a2 as GS,a3 as jS,a4 as zS,a5 as KS,a6 as YS,a7 as qS,a8 as su,a9 as XS,aa as am,ab as QS,ac as ZS,ad as od,ae as sd,af as JS,ag as ew,ah as ld,ai as Wf,aj as tw,ak as rw,al as nw,am as Gf,an as iw,ao as aw,ap as ow,aq as sw,ar as lw,as as dw,at as uw,au as hw,av as cw,aw as mw,ax as vw,ay as gw,az as fw,aA as jf,aB as pw,aC as Wu,aD as Gu,aE as Cw,aF as bw,aG as Sw,aH as ww,aI as Ew,aJ as yw,aK as Tw,aL as Pw,aM as Ow,aN as Dw,aO as Rw,aP as Nw,aQ as Fw,aR as om,aS as Iw,aT as _w,aU as sm}from"./index-3ec077c5.js";import{P as Te,u as Pa,T as dd,B as z,a as L,S as qe,M as we,K as Oe,G as ui,C as le,b as Zr,c as rn,D as ai,d as go,e as ud,f as pt,g as Cs,I as io,U as Mw,h as fe,i as H,F as oi,j as wn,k as Ea,l as Uh,m as U,E as xe,n as Zn,o as Ki,p as bl,q as Tt,r as tt,s as yt,t as hd,v as Aw,O as ei,w as Lw,x as bn,y as vn,z as kw,A as xw,R as cd,H as si,J as md,L as zf,N as Kf,Q as Hw,V as Uw,W as lm,X as Je,Y as dm,Z as Yf,_ as $h,$ as um,a0 as ss,a1 as qf,a2 as $w,a3 as Xf,a4 as Bw,a5 as hn,a6 as Vw,a7 as Ww,a8 as Gw,a9 as jw,aa as zw,ab as Kw,ac as Yw,ad as qw,ae as Xw,af as Qw,ag as Zw,ah as Jw}from"./useConnection-69cc76cc.js";import{P as Fl,b as eE,h as tE,p as rE,o as nE,s as iE,t as aE,c as Sl}from"./plotly-e90aff11.js";import"./helpers-042e6b4d.js";class Bh{static isDark(e){var t=document.createElement("div");t.style.display="none",t.style.color=e;var r=getComputedStyle(document.body.appendChild(t)).color,i=r.match(/\d+/g),a=[];if(i)a=i.map(s=>parseInt(s,10));else throw new Error("Invalid color received. Got ".concat(r));document.body.removeChild(t);var o=Bh.getBrightness(a);return o<125}static getBrightness(e){return Math.round((e[0]*299+e[1]*587+e[2]*114)/1e3)}}const Qf=Bh;function fo(n,e,t){return e=oE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function oE(n){var e=sE(n,"string");return typeof e=="symbol"?e:String(e)}function sE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var lE="table_",Zf="column_",dE=new Set(["in","not","i","ii","k"]),uE=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"]),hE=/[^a-zA-Z0-9_$+@-]/g,cE=/[^A-Za-z0-9_$]/g;class nn{}fo(nn,"legalize",(n,e,t,r,i)=>{var a=n.trim().replace(/[- ]/g,"_");return r&&(dE.has(a)||uE.has(a))&&(a=e+a),a=a.replace(t,""),a||(a=e+i),Number.isNaN(Number(a.charAt(0)))||(a=e+a),a});fo(nn,"legalizeTableName",n=>nn.legalize(n,lE,hE,!1,0));fo(nn,"legalizeColumnNames",n=>{var e=[];return n.forEach((t,r)=>{var i=nn.legalizeColumnName(t,r);e.includes(i)&&(i=Zf+r),e.push(i)}),e});fo(nn,"legalizeColumnName",function(n){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;return nn.legalize(n,Zf,cE,!0,e)});fo(nn,"isValidTableName",n=>nn.legalizeTableName(n)===n);fo(nn,"isValidColumnName",n=>nn.legalizeColumnName(n)===n);const po=nn;function mE(n,e){return n?n.closest(".".concat(e)):null}const vE={getClosestByClassName:mE};function hm(n,e,t){return e=gE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function gE(n){var e=fE(n,"string");return typeof e=="symbol"?e:String(e)}function fE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class pE{constructor(){hm(this,"pending",[]),hm(this,"resolved",[])}add(e,t){var r=Te.makeCancelable(e,t);return this.pending.push(r),r.then(()=>{this.resolve(r)},()=>{this.resolve(r)}),r}remove(e){for(var t=0;t<this.pending.length;t+=1)if(this.pending[t]===e){this.pending.splice(t,1);return}}resolve(e){this.remove(e),this.resolved.push(e)}cancel(){for(var e=[...this.pending,...this.resolved],t=0;t<e.length;t+=1)e[t].cancel();this.pending=[],this.resolved=[]}}const hi=pE;function CE(n,e,t){return e=bE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function bE(n){var e=SE(n,"string");return typeof e=="symbol"?e:String(e)}function SE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class wE extends Error{constructor(){super(...arguments),CE(this,"isInvalid",!0)}}const Ja=wE;function Jf(n){var{type:e}=n,t=Pa();switch(e){case t.VariableType.TABLE:case t.VariableType.TABLEMAP:case t.VariableType.TREETABLE:case t.VariableType.HIERARCHICALTABLE:return h.createElement(re,{icon:_h});case t.VariableType.FIGURE:return h.createElement(re,{icon:kf});case t.VariableType.PANDAS:return h.createElement(re,{icon:OS});default:return h.createElement(re,{icon:Vu})}}function EE(n,e,t){return e=yE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function yE(n){var e=TE(n,"string");return typeof e=="symbol"?e:String(e)}function TE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class PE extends w.Component{constructor(e){super(e),EE(this,"container",void 0),this.container=null}componentDidMount(){this.colorize()}colorize(){var{children:e}=this.props;this.container&&e!=null&&ni.colorizeElement(this.container,{theme:"dh-dark"})}render(){var{children:e,language:t}=this.props;return h.createElement("div",null,h.createElement("div",{"data-lang":t,ref:r=>{this.container=r},style:{pointerEvents:"none"}},e))}}const vd=PE;class OE{static get LANGUAGE_MAP(){return new Map([["python","Python"],["groovy","Groovy"],["scala","Scala"]])}}const ep=OE;class Il{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)?[]:Yb.parse(e).filter(t=>!this.hasComment(t)).map(t=>this.hasPattern(t)?t.pattern:this.hasOp(t)?t.op:"".concat(t))}static formatTimestamp(e){if(e==null||!(e instanceof Date))return null;var t="".concat(e.getHours()).padStart(2,"0"),r="".concat(e.getMinutes()).padStart(2,"0"),i="".concat(e.getSeconds()).padStart(2,"0"),a="".concat(e.getMilliseconds()).padStart(3,"0");return"".concat(t,":").concat(r,":").concat(i,".").concat(a)}static isTableType(e,t){return t===e.VariableType.TABLE||t===e.VariableType.TREETABLE||t===e.VariableType.HIERARCHICALTABLE}static isWidgetType(e,t){return t===e.VariableType.FIGURE||t===e.VariableType.OTHERWIDGET||t===e.VariableType.PANDAS}static isOpenableType(e,t){return Il.isTableType(e,t)||Il.isWidgetType(e,t)}static isFigureType(e,t){return t===e.VariableType.FIGURE}static isPandas(e,t){return t===e.VariableType.PANDAS}}const ju=Il;function tp(n){var{children:e}=n;return h.createElement("div",{className:"console-history-item-result"},h.createElement("div",{className:"console-history-gutter"},"-"),h.createElement("div",{className:"console-history-content"},e))}tp.propTypes={children:q.node.isRequired};function zu(n,e,t){return e=DE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function DE(n){var e=RE(n,"string");return typeof e=="symbol"?e:String(e)}function RE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class rp extends w.Component{constructor(e){super(e),zu(this,"timer",void 0),zu(this,"startTime",void 0),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(){var{disabled:e,onCancelClick:t}=this.props,{elapsed:r}=this.state;return h.createElement("div",{className:te("console-history-result-in-progress",{disabled:e})},h.createElement("span",{className:"badge"},h.createElement(Hn,null)," Running... ",dd.formatElapsedTime(r)," ",h.createElement(z,{className:"console-history-result-in-progress-cancel",kind:"ghost",icon:gs,tooltip:"Cancel",onClick:t,disabled:e})))}}zu(rp,"defaultProps",{disabled:!1});const NE=rp;function Qo(n,e,t){return e=FE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function FE(n){var e=IE(n,"string");return typeof e=="symbol"?e:String(e)}function IE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class ao extends w.PureComponent{constructor(e){super(e),Qo(this,"mouseX",void 0),Qo(this,"mouseY",void 0),Qo(this,"isClicking",void 0),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(e){switch(e.key){case"Enter":case" ":this.handleToggleError(),e.stopPropagation(),e.preventDefault();break}}handleMouseDown(e){this.mouseX=e.clientX,this.mouseY=e.clientY,this.isClicking=!0}handleMouseMove(e){this.mouseX!=null&&this.mouseY!=null?(Math.abs(e.clientX-this.mouseX)>=ao.mouseDragThreshold||Math.abs(e.clientY-this.mouseY)>=ao.mouseDragThreshold)&&(this.isClicking=!1):this.isClicking&&(this.isClicking=!1)}handleMouseUp(e){this.isClicking&&!e.shiftKey&&!e.metaKey&&!e.altKey&&this.handleToggleError(),this.mouseX=null,this.mouseY=null,this.isClicking=!1}handleToggleError(){this.setState(e=>({isExpanded:!e.isExpanded}))}handleMouseEnter(){this.setState({isTriggerHovered:!0})}handleMouseLeave(){this.setState({isTriggerHovered:!1})}render(){var{isExpanded:e,isTriggerHovered:t}=this.state,{message:r}=this.props;L(r);var i=r.indexOf(`
|
|
2
2
|
`),a=i>-1,o=r;a&&(o=r.slice(0,i));var s=r.slice(i),l=t?"error-btn-link error-btn-link--active":"error-btn-link";return h.createElement("div",{key:"error",className:te("error-message",{expanded:e})},a&&h.createElement(h.Fragment,null,h.createElement("div",{className:"error-gutter"},h.createElement("button",{type:"button",onClick:this.handleToggleError,className:l,tabIndex:-1},h.createElement(re,{icon:e?ti:xf,transform:"left-3"}))),h.createElement("div",{className:"error-content"},h.createElement("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},o),e?s:"")),!a&&h.createElement("div",{className:"error-content"},h.createElement("div",{className:"console-error-text"},o)))}}Qo(ao,"defaultProps",{message:""});Qo(ao,"mouseDragThreshold",5);const _E=ao;function ME(n,e,t){return e=AE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function AE(n){var e=LE(n,"string");return typeof e=="symbol"?e:String(e)}function LE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var cm=oe.module("ConsoleHistoryItem");class np extends w.PureComponent{constructor(e){super(e),this.handleCancelClick=this.handleCancelClick.bind(this),this.handleObjectClick=this.handleObjectClick.bind(this)}handleObjectClick(e){cm.debug("handleObjectClick",e);var{openObject:t}=this.props;t(e)}handleCancelClick(){var{item:e}=this.props;e!=null&&e.cancelResult&&(cm.debug("Cancelling command: ".concat(e.command)),e.cancelResult())}render(){var{disabled:e,item:t,language:r}=this.props,{disabledObjects:i,result:a}=t,o=null;t.command!=null&&t.command!==""&&(o=h.createElement("div",{className:"console-history-item-command"},h.createElement("div",{className:"console-history-gutter"},">"),h.createElement("div",{className:"console-history-content"},h.createElement(vd,{language:r},t.command))));var s=[],l=!1;if(a){var{error:d,message:u,changes:c}=a;if(c){var{created:m,updated:v}=c;[...m,...v].forEach(E=>{l=!0;var{title:y}=E,T="".concat(y),O=e===void 0||e||(i??[]).indexOf(T)>=0,D=h.createElement(z,{key:T,kind:"primary",onClick:()=>this.handleObjectClick(E),className:"btn-console-object",disabled:O,icon:h.createElement(Jf,{type:E.type})},y);s.push(D)})}if(d!=null&&t.command==null){var g,f="".concat((g=d.message)!==null&&g!==void 0?g:d);f||(f=d);var p=h.createElement(_E,{key:"result-error",message:f});s.push(p)}if(u!==void 0&&u!==""){var C=h.createElement("div",{key:"log-message",className:"log-message"},u);s.push(C)}}else{l=!0;var b=h.createElement(NE,{key:"in_progress",onCancelClick:this.handleCancelClick,disabled:e});s.push(b)}var S=null;return s.length>0&&(S=h.createElement(tp,null,s)),h.createElement("div",{className:te("console-command-result",{"console-result-buttons":l})},o,S)}}ME(np,"defaultProps",{disabled:!1});const kE=np;function xE(n,e,t){return e=HE(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function HE(n){var e=UE(n,"string");return typeof e=="symbol"?e:String(e)}function UE(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class gd extends w.Component{static itemKey(e,t){return"".concat(e,".").concat(t.command,".").concat(t.result&&t.result.message,".").concat(t.result&&t.result.error)}render(){for(var{disabled:e,items:t,language:r,openObject:i}=this.props,a=[],o=0;o<t.length;o+=1){var s=t[o],l=h.createElement(kE,{key:gd.itemKey(o,s),disabled:e,item:s,openObject:i,language:r});a.push(l)}return h.createElement("div",{className:"container-fluid console-history"},a)}}xE(gd,"defaultProps",{disabled:!1});const $E=gd;var BE={name:"Console",CLEAR:qe.createAndAdd({id:"CONSOLE.CLEAR",name:"Clear",shortcut:[we.CTRL,Oe.L],macShortcut:[we.CTRL,Oe.C]}),FOCUS_HISTORY:qe.createAndAdd({id:"CONSOLE.FOCUS_HISTORY",name:"Focus History",shortcut:[we.CTRL,Oe.H],macShortcut:[we.CTRL,we.OPTION,Oe.H]})},VE={name:"Command History",FOCUS_HISTORY:qe.createAndAdd({id:"COMMAND_HISTORY.FOCUS_HISTORY",name:"Focus History Search",shortcut:[we.CTRL,Oe.H],macShortcut:[we.CTRL,we.OPTION,Oe.H]}),SEND_TO_CONSOLE:qe.createAndAdd({id:"COMMAND_HISTORY.SEND_TO_CONSOLE",name:"Send to Console",shortcut:[Oe.ENTER],macShortcut:[Oe.ENTER]}),SEND_TO_NOTEBOOK:qe.createAndAdd({id:"COMMAND_HISTORY.SEND_TO_NOTEBOOK",name:"Send to Notebook",shortcut:[we.CTRL,Oe.ENTER],macShortcut:[we.CMD,Oe.ENTER]}),RUN:qe.createAndAdd({id:"COMMAND_HISTORY.RUN",name:"Run",shortcut:[we.ALT,Oe.R],macShortcut:[we.OPTION,Oe.R]})},WE={name:"Notebook",RUN:qe.createAndAdd({id:"NOTEBOOK.RUN",name:"Run",shortcut:[we.ALT,Oe.R],macShortcut:[we.OPTION,Oe.R]}),RUN_SELECTED:qe.createAndAdd({id:"NOTEBOOK.RUN_SELECTED",name:"Run Selected",shortcut:[we.ALT,we.SHIFT,Oe.R],macShortcut:[we.OPTION,we.SHIFT,Oe.R]}),FIND:qe.createAndAdd({id:"NOTEBOOK.FIND",name:"Find",shortcut:[we.CTRL,Oe.F],macShortcut:[we.CMD,Oe.F],isEditable:!1}),MINIMAP:qe.createAndAdd({id:"NOTEBOOK.MINIMAP",name:"Show Minimap",shortcut:[we.ALT,Oe.M],macShortcut:[we.OPTION,Oe.M]}),WORDWRAP:qe.createAndAdd({id:"NOTEBOOK.WORDWRAP",name:"Word Wrap",shortcut:[we.ALT,Oe.Z],macShortcut:[we.OPTION,Oe.Z]})},GE={CONSOLE:BE,COMMAND_HISTORY:VE,NOTEBOOK:WE};const nr=GE,xt=Object.freeze({FATAL:"FATAL",STDERR:"STDERR",ERROR:"ERROR",WARN:"WARN",STDOUT:"STDOUT",INFO:"INFO",DEBUG:"DEBUG",TRACE:"TRACE"}),jE="#2d2a2e",zE="#fcfcfa",KE="#fcd65b",YE="#b2b1b2",qE="#9edc6f",XE="#76d9e4",QE="#f95d84",ZE="#aa9af4",JE="#f95d84",ey="#fcfcfa",ty="#7c7b7c",Ce={"error-foreground":"#f95d84",background:jE,foreground:zE,"line-height":"19px",string:KE,"string-delim":"#929192",delimiter:YE,predefined:qE,keyword:XE,storage:QE,number:ZE,operator:JE,identifier:ey,"namespace-identifier":"#f95d84","identifier-js":"#fcd65b",comment:ty,"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","text-link-foreground":"#929192","text-link-active-foreground":"#f0f0ee","editor-link-active-foreground":"#f0f0ee"};var ry="python",ny={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:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},iy={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"]]}},ay={id:ry,conf:ny,language:iy};const oy=ay;var sy="groovy",ly={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:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},dy={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"]]}},uy={id:sy,conf:ly,language:dy};const hy=uy;var cy="scala",my={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:/^\s*\/\/\s*(?:(?:#?region\b)|(?:<editor-fold\b))/,end:/^\s*\/\/\s*(?:(?:#?endregion\b)|(?:<\/editor-fold>))/}}},vy={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"]]}},gy={id:cy,conf:my,language:vy};const fy=gy;var py="deephavenDb",Cy={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:/^\s*(?:def|class|for|if|elif|else|while|try|with|finally|except|async).*?:\s*$/,action:{indentAction:1}}],folding:{offSide:!0,markers:{start:/^\s*#region\b/,end:/^\s*#endregion\b/}}},by={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"]]}},Sy={id:py,conf:Cy,language:by};const wy=Sy;var Ey="log",yy={},Ty={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"}]]}},Py={id:Ey,conf:yy,language:Ty};const Oy=Py;function mm(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function vm(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?mm(Object(t),!0).forEach(function(r){Dy(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):mm(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function Dy(n,e,t){return e=Ry(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Ry(n){var e=Ny(n,"string");return typeof e=="symbol"?e:String(e)}function Ny(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var On=oe.module("MonacoUtils");class Rn{static init(){var{getWorker:e}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{};On.debug("Initializing Monaco..."),e!==void 0&&Rn.registerGetWorker(e);var{registerLanguages:t,removeHashtag:r}=Rn,i=[{token:"",foreground:r(Ce.foreground)},{token:"string",foreground:r(Ce.string)},{token:"string.delim",foreground:r(Ce["string-delim"])},{token:"keyword",foreground:r(Ce.keyword)},{token:"identifier.js",foreground:r(Ce["identifier-js"])},{token:"delimiter",foreground:r(Ce.delimiter)},{token:"comment",foreground:r(Ce.comment)},{token:"number",foreground:r(Ce.number)},{token:"storage",foreground:r(Ce.storage)},{token:"identifier",foreground:r(Ce.identifier)},{token:"namespace.identifier",foreground:r(Ce["namespace-identifier"])},{token:"operator",foreground:r(Ce.operator)},{token:"predefined",foreground:r(Ce.predefined)},{token:"error.log",foreground:Ce["log-error"].substring(1)},{token:"warn.log",foreground:r(Ce["log-warn"])},{token:"info.log",foreground:r(Ce["log-info"])},{token:"stdout.log",foreground:r(Ce["log-stdout"])},{token:"trace.log",foreground:r(Ce["log-trace"])},{token:"debug.log",foreground:r(Ce["log-debug"])},{token:"date.log",foreground:r(Ce["log-date"])}],a={errorForeground:Ce["error-foreground"],"inputOption.activeBorder":Ce["input-option-active-border"],"editor.background":Ce.background,"editor.foreground":Ce.foreground,"editor.lineHighlightBackground":Ce["editor-line-highlight-bg"],"editorLineNumber.foreground":Ce["editor-line-number-foreground"],"editor.selectionBackground":Ce["editor-selection-background"],"editor.findMatchBackground":Ce["editor-find-match-background"],"editor.findMatchHighlightBackground":Ce["editor-find-match-highlight-background"],"editorSuggestWidget.background":Ce["editor-suggest-widget-background"],"editorSuggestWidget.border":Ce["editor-suggest-widget-border"],"editorSuggestWidget.foreground":Ce["editor-suggest-widget-foreground"],"editorSuggestWidget.selectedBackground":Ce["editor-suggest-widget-selected-background"],"editorSuggestWidget.highlightForeground":Ce["editor-suggest-widget-highlightForeground"],"list.hoverBackground":Ce["list-hover-background"],"dropdown.background":Ce["context-menu-background"],"dropdown.foreground":Ce["context-menu-foreground"],"menu.selectionBackground":Ce["menu-selection-background"],"list.focusBackground":Ce["menu-selection-background"],"editorWidget.background":Ce["editor-widget-background"],"inputOption.activeBackground":Ce["input-option-active-background"],"inputOption.activeForeground":Ce["input-option-active-foreground"],focusBorder:Ce["focus-border"],"input.background":Ce["input-background"],"input.foreground":Ce["input-foreground"],"input.border":Ce["input-border"],"textLink.foreground":Ce["text-link-foreground"],"textLink.activeForeground":Ce["text-link-active-foreground"],"editorLink.activeForeground":Ce["editor-link-active-foreground"]};ni.defineTheme("dh-dark",{base:"vs-dark",inherit:!0,rules:i,colors:a}),On.debug2("monaco theme: ",Ce),ni.setTheme("dh-dark"),t([wy,oy,hy,Oy,fy]),On.debug("Monaco initialized.")}static registerGetWorker(e){window.MonacoEnvironment=vm(vm({},window.MonacoEnvironment),{},{getWorker:e})}static removeHashtag(e){return e.substring(1)}static registerLanguages(e){var t=e.map(r=>{var{id:i}=r;return i});_n.getLanguages().filter(r=>{var{id:i}=r;return t.includes(i)}).forEach(r=>{var i=r;On.debug2("Overriding default language loader:",i.id)}),e.forEach(r=>{Rn.registerLanguage(r)})}static registerLanguage(e){On.debug2("Registering language: ",e.id),_n.register(e),_n.onLanguage(e.id,()=>{_n.setLanguageConfiguration(e.id,e.conf),_n.setMonarchTokensProvider(e.id,e.language)})}static setEOL(e){var t,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:ni.EndOfLineSequence.LF;(t=e.getModel())===null||t===void 0||t.setEOL(r)}static openDocument(e,t){var r=e.getModel();L(r);var i={textDocument:{uri:"".concat(r.uri),languageId:r.getLanguageId(),version:r.getVersionId(),text:r.getValue()}};On.debug2("didOpenDocumentParams: ",i),t.openDocument(i);var a=e.onDidChangeModelContent(o=>{for(var{changes:s,versionId:l}=o,d=[],u=0;u<s.length;u+=1){var c=s[u],{range:m,rangeLength:v,text:g}=c,f={range:{start:{line:m.startLineNumber-1,character:m.startColumn-1},end:{line:m.endLineNumber-1,character:m.endColumn-1}},rangeLength:v,text:g};d.push(f)}if(d.length>0){var p={textDocument:{version:l,uri:"".concat(r.uri)},contentChanges:d};On.debug2("didChangeDocumentParams",p),t.changeDocument(p)}});return a}static closeDocument(e,t){var r=e.getModel();L(r);var i={textDocument:{uri:"".concat(r.uri)}};t.closeDocument(i)}static registerPasteHandler(e){e.onDidPaste(t=>{var r=/“|”/g,i=/\u200b/g,a=/\u00A0/g,o=e.getModel();L(o);var s=o.getValueInRange(t.range);(r.test(s)||i.test(s)||a.test(s))&&o.applyEdits([{range:t.range,text:s.replace(r,'"').replace(i,"").replace(a," ")}])})}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static removeConflictingKeybindings(e){var t=[{windows:"ctrl+D",mac:"meta+D"},{windows:"ctrl+H"}];try{t.forEach(r=>{Rn.isMacPlatform()&&r.mac===""||!Rn.isMacPlatform()&&r.windows===""||Rn.removeKeybinding(e,Rn.isMacPlatform()?r.mac:r.windows)})}catch(r){On.error(r)}}static removeKeybinding(e,t){if(t!==void 0){var r=e._standaloneKeybindingService._getResolver()._map.get(t);r!=null?r.forEach(i=>{On.debug2("Removing Monaco keybinding ".concat(t," for ").concat(i.command)),e._standaloneKeybindingService.addDynamicKeybinding("-".concat(i.command),null,()=>{})}):On.warn("Did not find any keybindings to remove for ".concat(t))}}static getMonacoKeyCodeFromShortcut(e){var{keyState:t}=e,{keyValue:r}=t;if(r===null)return 0;var i=Rn.isMacPlatform();return i?(t.metaKey?Qr.CtrlCmd:0)|(t.shiftKey?Qr.Shift:0)|(t.altKey?Qr.Alt:0)|(t.ctrlKey?Qr.WinCtrl:0)|em.fromString(r):(t.ctrlKey?Qr.CtrlCmd:0)|(t.shiftKey?Qr.Shift:0)|(t.altKey?Qr.Alt:0)|(t.metaKey?Qr.WinCtrl:0)|em.fromString(r)}static provideLinks(e){for(var t=[],r=function(o){var s=e.getLineContent(o),l=Ff(s),d=l.filter(u=>u.type==="url"?/^https?:\/\//.test(u.value):!0);d.forEach(u=>{t.push({url:u.href,range:new TS(o,u.start+1,o,u.end+1)})})},i=1;i<=e.getLineCount();i+=1)r(i);return{links:t}}}const Cr=Rn;function lu(n,e,t){return e=Fy(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Fy(n){var e=Iy(n,"string");return typeof e=="symbol"?e:String(e)}function Iy(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Gn=oe.module("MonacoCompletionProvider");class la extends w.PureComponent{static lspToMonacoKind(e){var t=_n.CompletionItemKind;switch(e){case 1:return t.Text;case 2:return t.Method;case 3:return t.Function;case 4:return t.Constructor;case 5:return t.Field;case 6:return t.Variable;case 7:return t.Class;case 8:return t.Interface;case 9:return t.Module;case 10:return t.Property;case 11:return t.Unit;case 12:return t.Value;case 13:return t.Enum;case 14:return t.Keyword;case 15:return t.Snippet;case 16:return t.Color;case 17:return t.File;case 18:return t.Reference;case 19:return t.Folder;case 20:return t.EnumMember;case 21:return t.Constant;case 22:return t.Struct;case 23:return t.Event;case 24:return t.Operator;case 25:return t.TypeParameter;default:return t.Variable}}static lspToMonacoRange(e){var{start:t,end:r}=e;return{startLineNumber:t.line+1,startColumn:t.character+1,endLineNumber:r.line+1,endColumn:r.character+1}}static monacoToLspPosition(e){return{line:e.lineNumber-1,character:e.column-1}}constructor(e){super(e),lu(this,"registeredCompletionProvider",void 0),lu(this,"registeredSignatureProvider",void 0),lu(this,"registeredHoverProvider",void 0),this.handleCompletionRequest=this.handleCompletionRequest.bind(this),this.handleSignatureRequest=this.handleSignatureRequest.bind(this),this.handleHoverRequest=this.handleHoverRequest.bind(this)}componentDidMount(){var{language:e,session:t}=this.props;this.registeredCompletionProvider=_n.registerCompletionItemProvider(e,{provideCompletionItems:this.handleCompletionRequest,triggerCharacters:[".",'"',"'"]}),t.getSignatureHelp&&(this.registeredSignatureProvider=_n.registerSignatureHelpProvider(e,{provideSignatureHelp:this.handleSignatureRequest,signatureHelpTriggerCharacters:["(",","]})),t.getHover&&(this.registeredHoverProvider=_n.registerHoverProvider(e,{provideHover:this.handleHoverRequest}))}componentWillUnmount(){var e,t,r;(e=this.registeredCompletionProvider)===null||e===void 0||e.dispose(),(t=this.registeredSignatureProvider)===null||t===void 0||t.dispose(),(r=this.registeredHoverProvider)===null||r===void 0||r.dispose()}handleCompletionRequest(e,t,r){var{model:i,session:a}=this.props;if(e!==i)return null;var o={textDocument:{uri:"".concat(e.uri),version:e.getVersionId()},position:la.monacoToLspPosition(t),context:r},s=a.getCompletionItems(o);Gn.debug("Requested completion items",o);var l=s.then(d=>{Gn.debug("Completion items received: ",o,d);var u=d.map(c=>{var{label:m,kind:v,detail:g,documentation:f,sortText:p,filterText:C,textEdit:b,insertTextFormat:S}=c;return{label:m,kind:la.lspToMonacoKind(v),detail:g,documentation:f?.kind==="markdown"?f:f?.value,sortText:p,filterText:C,insertText:b.text,insertTextRules:S===2?4:S,range:la.lspToMonacoRange(b.range)}});return{incomplete:!0,suggestions:u}}).catch(d=>(Gn.error("There was an error retrieving completion items",d),{suggestions:[]}));return l}handleSignatureRequest(e,t,r,i){var a={value:{signatures:[],activeSignature:0,activeParameter:0},dispose:()=>{}},{model:o,session:s}=this.props;if(e!==o||!s.getSignatureHelp)return null;var l={textDocument:{uri:"".concat(e.uri),version:e.getVersionId()},position:la.monacoToLspPosition(t),context:i},d=s.getSignatureHelp(l);Gn.debug("Requested signature help",l);var u=d.then(c=>{Gn.debug("Signatures received: ",l,d);var m=c.map(g=>{var{label:f,documentation:p,parameters:C}=g;return{documentation:p?.kind==="markdown"?p:p?.value,label:f,parameters:C??[]}});if(m.length===0)return a;var v=0;return{value:{signatures:m,activeSignature:v,activeParameter:c[v].activeParameter},dispose:()=>{}}}).catch(c=>(Gn.error("There was an error retrieving completion items",c),a));return u}handleHoverRequest(e,t){var{model:r,session:i}=this.props;if(e!==r||!i.getHover)return null;var a={textDocument:{uri:"".concat(e.uri),version:e.getVersionId()},position:la.monacoToLspPosition(t)},o=i.getHover(a);Gn.debug("Requested hover",a);var s=o.then(l=>{Gn.debug("Hover received: ",a,l);var{contents:d}=l;return{contents:d?[d]:[]}}).catch(l=>(Gn.error("There was an error retrieving hover",l),{contents:[]}));return s}render(){return null}}const ip=la;function gm(n,e,t,r,i,a,o){try{var s=n[a](o),l=s.value}catch(d){t(d);return}s.done?e(l):Promise.resolve(l).then(r,i)}function _y(n){return function(){var e=this,t=arguments;return new Promise(function(r,i){var a=n.apply(e,t);function o(l){gm(a,r,i,o,s,"next",l)}function s(l){gm(a,r,i,o,s,"throw",l)}o(void 0)})}}function Kr(n,e,t){return e=My(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function My(n){var e=Ay(n,"string");return typeof e=="symbol"?e:String(e)}function Ay(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var du=oe.module("ConsoleInput"),_l=parseInt(Ce["line-height"],10),ap=6,op=6,Ly=_l+ap+op,uu=100;class bs extends w.PureComponent{constructor(e){super(e),Kr(this,"cancelListener",void 0),Kr(this,"commandContainer",void 0),Kr(this,"commandEditor",void 0),Kr(this,"commandHistoryIndex",void 0),Kr(this,"commandSuggestionContainer",void 0),Kr(this,"loadingPromise",void 0),Kr(this,"timestamp",void 0),Kr(this,"bufferIndex",void 0),Kr(this,"history",void 0),Kr(this,"modifiedCommands",void 0),this.handleWindowResize=this.handleWindowResize.bind(this),this.commandContainer=h.createRef(),this.commandHistoryIndex=null,this.timestamp=Date.now(),this.bufferIndex=0,this.history=[],this.modifiedCommands=new Map,this.state={commandEditorHeight:_l,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(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;if(e){if(du.debug("Command received: ",e),!r){var i;this.commandHistoryIndex=null,(i=this.commandEditor)===null||i===void 0||i.setValue(e)}t&&this.focusEnd(),this.updateDimensions(),r&&this.processCommand(e)}}initCommandEditor(){var{language:e,session:t}=this.props,r={copyWithSyntaxHighlighting:!1,cursorStyle:"block",fixedOverflowWidgets:!0,folding:!1,fontFamily:"Fira Mono",glyphMargin:!1,language:e,lineHeight:_l,lineDecorationsWidth:3,lineNumbers:"off",minimap:{enabled:!1},renderLineHighlight:"none",scrollBeyondLastLine:!1,scrollbar:{arrowSize:0,horizontal:"hidden",horizontalScrollbarSize:0},padding:{top:ap,bottom:op},tabCompletion:"on",value:"",wordWrap:"on"},i=this.commandContainer.current;L(i),this.commandEditor=ni.create(i,r),Cr.setEOL(this.commandEditor),Cr.openDocument(this.commandEditor,t),this.commandEditor.onDidChangeModelContent(()=>{var a,o=(a=this.commandEditor)===null||a===void 0?void 0:a.getValue();this.modifiedCommands.set(this.commandHistoryIndex,o??null),this.updateDimensions()}),this.commandEditor.onDidFocusEditorText(()=>{this.setState({isFocused:!0})}),this.commandEditor.onDidBlurEditorText(()=>{this.setState({isFocused:!1})}),this.commandEditor.onKeyDown(a=>{var{commandEditor:o,commandHistoryIndex:s}=this,l=o?.getPosition();L(l);var{lineNumber:d}=l,u=o?.getModel();if(a.code==="ArrowUp"&&!this.isSuggestionMenuPopulated()&&d===1){s!=null?this.loadCommand(s+1):this.loadCommand(0),this.focusStart(),a.stopPropagation(),a.preventDefault();return}if(a.code==="ArrowDown"&&!this.isSuggestionMenuPopulated()&&d===u?.getLineCount()){s!=null&&s>0?this.loadCommand(s-1):this.loadCommand(null),this.focusEnd(),a.stopPropagation(),a.preventDefault();return}if(!a.altKey&&!a.shiftKey&&!a.metaKey){if(a.keyCode===Ui.Enter){if(!this.isSuggestionMenuPopulated()){var c;a.stopPropagation(),a.preventDefault();var m=(c=this.commandEditor)===null||c===void 0?void 0:c.getValue().trim();if(m!==void 0){var v;this.processCommand(m),(v=this.commandEditor)===null||v===void 0||v.setValue("")}}}else if(a.keyCode===Ui.Tab)if(this.isSuggestionMenuActive())this.isSuggestionMenuPopulated()||(a.stopPropagation(),a.preventDefault());else{var g;a.stopPropagation(),a.preventDefault(),(g=this.commandEditor)===null||g===void 0||g.trigger("Tab key trigger suggestions","editor.action.triggerSuggest",{})}}}),this.commandEditor.addCommand(Qr.CtrlCmd|Ui.KeyF,()=>{}),Cr.removeConflictingKeybindings(this.commandEditor),Cr.registerPasteHandler(this.commandEditor),this.commandEditor.focus(),this.updateDimensions(),this.setState({model:this.commandEditor.getModel()})}destroyCommandEditor(){var{session:e}=this.props;this.commandEditor&&(Cr.closeDocument(this.commandEditor,e),this.commandEditor.dispose(),this.commandEditor=void 0)}handleWindowResize(){this.updateDimensions()}isSuggestionMenuActive(){var e;if(!this.commandSuggestionContainer){var t,r;this.commandSuggestionContainer=(t=this.commandEditor)===null||t===void 0||(r=t.getDomNode())===null||r===void 0?void 0:r.querySelector(".suggest-widget")}return(e=this.commandSuggestionContainer&&this.commandSuggestionContainer.classList.contains("visible"))!==null&&e!==void 0?e:!1}isSuggestionMenuPopulated(){var e,t,r;return this.isSuggestionMenuActive()&&((e=(t=this.commandSuggestionContainer)===null||t===void 0||(r=t.querySelector(".monaco-list-rows"))===null||r===void 0?void 0:r.childElementCount)!==null&&e!==void 0?e:0)>0}focus(){var e;(e=this.commandEditor)===null||e===void 0||e.focus()}focusStart(){var e,t,r,i,a,o=(e=this.commandEditor)===null||e===void 0?void 0:e.getModel();L(o);var s=o.getLineLength(1)+1,l=(t=this.commandEditor)===null||t===void 0?void 0:t.getTopForPosition(1,s);L(l),(r=this.commandEditor)===null||r===void 0||r.setPosition({lineNumber:1,column:s}),(i=this.commandEditor)===null||i===void 0||i.setScrollTop(l),(a=this.commandEditor)===null||a===void 0||a.focus()}focusEnd(){var e,t,r,i,a,o=(e=this.commandEditor)===null||e===void 0?void 0:e.getModel();L(o);var s=o.getLineCount(),l=o.getLineLength(s)+1,d=(t=this.commandEditor)===null||t===void 0?void 0:t.getTopForPosition(s,l);L(d),(r=this.commandEditor)===null||r===void 0||r.setPosition({lineNumber:s,column:l}),(i=this.commandEditor)===null||i===void 0||i.setScrollTop(d),(a=this.commandEditor)===null||a===void 0||a.focus()}clear(){var e,t,r;(e=this.commandEditor)===null||e===void 0||e.focus(),(t=this.commandEditor)===null||t===void 0||(r=t.getModel())===null||r===void 0||r.setValue(""),this.commandHistoryIndex=null}layoutEditor(){this.commandEditor&&this.commandEditor.layout()}loadCommand(e){var t,r;if(!(e!==null&&e>=this.history.length)){var i=this.modifiedCommands.get(e),a=e===null?"":this.history[this.history.length-e-1];this.commandHistoryIndex=e,(t=this.commandEditor)===null||t===void 0||(r=t.getModel())===null||r===void 0||r.setValue(i??a),e!==null&&e>this.history.length-uu&&this.loadMoreHistory()}}loadMoreHistory(){var e=this;return _y(function*(){try{if(e.loadingPromise!=null||e.bufferIndex==null)return;var{commandHistoryStorage:t,language:r,scope:i}=e.props;e.loadingPromise=Te.makeCancelable(t.getTable(r,i??"",e.timestamp),s=>s.close());var a=yield e.loadingPromise;a.setReversed(!0),a.setViewport({top:e.bufferIndex,bottom:e.bufferIndex+uu-1}),e.loadingPromise=Te.makeCancelable(a.getViewportData(),()=>a.close());var o=yield e.loadingPromise;e.bufferIndex+=uu,e.bufferIndex>=a.size&&(e.bufferIndex=null),e.history=[...o.items.filter((s,l,d)=>{var{name:u}=s;return l===0||u!==d[l-1].name}).map(s=>{var{name:l}=s;return l}).reverse(),...e.history],e.loadingPromise=void 0,a.close()}catch(s){if(e.loadingPromise=void 0,Te.isCanceled(s)){du.debug2("Promise canceled, not loading history");return}du.error("Error fetching history",s)}})()}processCommand(e){this.commandHistoryIndex=null,this.modifiedCommands.clear(),L(e),e!==""&&(this.history.length===0||e!==this.history[this.history.length-1])&&this.history.push(e),this.updateDimensions();var{onSubmit:t}=this.props;t(e)}updateDimensions(){if(this.commandEditor){var{maxHeight:e}=this.props;L(e);var t=this.commandEditor.getContentHeight(),r=Math.max(Math.min(t,e),Ly),i=t>r,a={overviewRulerLanes:i?void 0:0};this.setState({commandEditorHeight:r},()=>{var o,s;(o=this.commandEditor)===null||o===void 0||o.updateOptions(a),(s=this.commandEditor)===null||s===void 0||s.layout()})}}render(){var{disabled:e,language:t,session:r}=this.props,{commandEditorHeight:i,isFocused:a,model:o}=this.state;return h.createElement("div",{className:te("console-input-wrapper",{disabled:e})},h.createElement("div",{className:te("console-input-inner-wrapper",{focus:a})},h.createElement("div",{className:bs.INPUT_CLASS_NAME,ref:this.commandContainer,style:{height:i}}),o&&h.createElement(ip,{model:o,language:t,session:r})))}}Kr(bs,"defaultProps",{maxHeight:_l*10,scope:null,disabled:!1});Kr(bs,"INPUT_CLASS_NAME","console-input");const fm=bs;function xi(n,e,t){return e=ky(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function ky(n){var e=xy(n,"string");return typeof e=="symbol"?e:String(e)}function xy(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var pm="pasted values",Hy=[/^audio.*/,/^font.*/,/^image.*/,/^video.*/],hu=[".csv",".tsv",".tab",".psv",".dsv",".txt"],Cm=[".zip"];class Mn extends w.Component{static isValidDropItem(e){return e!=null&&e.kind==="file"&&!Hy.find(t=>t.test(e.type))}static isValidExtension(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!1;return hu.some(r=>e.endsWith(r))||t&&Cm.some(r=>e.endsWith(r))}static handleDragOver(e){e.preventDefault(),e.stopPropagation()}static getIcon(e){return e===pm?tm:e.endsWith(".csv")?DS:e.endsWith(".zip")?RS:NS}constructor(e){super(e),xi(this,"fileElem",void 0),xi(this,"divElem",void 0),xi(this,"getValidExtensions",pe(t=>t?[...hu,...Cm]:[...hu])),xi(this,"getAcceptString",pe(t=>this.getValidExtensions(t).join(", "))),xi(this,"getFileTypeErrorString",pe(t=>Zr.join(this.getValidExtensions(t),"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=h.createRef(),this.divElem=h.createRef(),this.state={selectedFileName:""}}componentDidMount(){var e,t;(e=this.divElem.current)===null||e===void 0||e.addEventListener("paste",this.handlePasteEvent),(t=this.divElem.current)===null||t===void 0||t.focus()}componentWillUnmount(){var e;(e=this.divElem.current)===null||e===void 0||e.removeEventListener("paste",this.handlePasteEvent)}handleSelectFile(){if(this.fileElem.current){var e;this.fileElem.current.value="",(e=this.fileElem.current)===null||e===void 0||e.click()}}handleFiles(e){e.stopPropagation(),e.preventDefault();var{files:t}=e.target;t!=null&&this.handleFile(t[0])}handleDrop(e){var{allowZip:t,clearDragError:r,dragError:i}=this.props;if(e.preventDefault(),e.stopPropagation(),i!=null){r();return}if(!(e.dataTransfer==null||e.dataTransfer.items==null||e.dataTransfer.items.length===0)){var a=e.dataTransfer.items[0].getAsFile();L(a),Mn.isValidExtension(a.name,t)?this.handleFile(a):this.setState({dropError:Mn.FILE_TYPE_ERROR})}}unstageFile(e){var{onCancel:t}=this.props;e.stopPropagation(),e.preventDefault(),t(),this.setState({selectedFileName:"",dropError:void 0})}handleFile(e){var{onFileOpened:t}=this.props;t(e),this.setState({selectedFileName:e.name,dropError:void 0})}handleMenuPaste(){var{onPaste:e,onError:t,uploadInProgress:r}=this.props;r||navigator.clipboard.readText().then(i=>{e(i),this.setState({selectedFileName:pm,dropError:void 0})}).catch(i=>t(i))}handlePasteEvent(e){e.stopPropagation(),e.preventDefault(),this.handleMenuPaste()}makeContextMenuItems(){var{uploadInProgress:e}=this.props;return[{title:"Paste",icon:tm,action:this.handleMenuPaste,shortcut:ui.PASTE,disabled:e}]}render(){var{allowZip:e,dragError:t,uploadInProgress:r}=this.props,{selectedFileName:i,dropError:a}=this.state,o=t??a,s=this.makeContextMenuItems();return h.createElement("div",{ref:this.divElem,className:"csv-overlay fill-parent-absolute",onDragOver:Mn.handleDragOver,onDrop:this.handleDrop,tabIndex:-1},h.createElement(le,{actions:s}),h.createElement("input",{ref:this.fileElem,type:"file",id:"fileElem",accept:this.getAcceptString(e),style:{display:"none"},onChange:this.handleFiles,"data-testid":"fileElem"}),!i&&(o===void 0||o==="")&&h.createElement("div",{className:"message-content"},h.createElement("div",{className:"message-icon"},h.createElement(re,{icon:FS})),h.createElement("label",null,"Drop file (or paste values) here to import"),h.createElement("div",{className:"message-small"},h.createElement("label",null,"or")),h.createElement(z,{kind:"primary",onClick:this.handleSelectFile},"Select File...")),i&&(o===void 0||o==="")&&h.createElement("div",{className:"selected-content"},h.createElement("div",{className:"selected-icon"},h.createElement(re,{icon:Mn.getIcon(i)})),h.createElement("div",{className:"selected-text"},h.createElement("label",null,"Selected File"),h.createElement("label",{className:"selected-name"},i,!r&&h.createElement(z,{kind:"ghost",className:"ml-2",onClick:this.unstageFile,icon:Hr,tooltip:"Remove"})))),!!o&&h.createElement("div",{className:"message-content"},h.createElement("div",{className:"message-icon"},h.createElement(re,{icon:Gi})),h.createElement("label",null,o),o===Mn.FILE_TYPE_ERROR&&h.createElement("div",{className:"message-small"},h.createElement("label",null,this.getFileTypeErrorString(e)))))}}xi(Mn,"defaultProps",{allowZip:!1,dragError:null});xi(Mn,"MULTIPLE_FILE_ERROR","Please select only one file");xi(Mn,"FILE_TYPE_ERROR","Filetype not supported.");const ja=Mn;function Oa(n,e,t){return e=Uy(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function Uy(n){var e=$y(n,"string");return typeof e=="symbol"?e:String(e)}function $y(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}class qi{}Oa(qi,"INTEGER","int");Oa(qi,"LONG","long");Oa(qi,"DOUBLE","double");Oa(qi,"BOOLEAN","bool");Oa(qi,"STRING","string");Oa(qi,"DATE_TIME","datetime");Oa(qi,"LOCAL_TIME","localtime");const Ge=qi;function bm(n,e){var t=Object.keys(n);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(n);e&&(r=r.filter(function(i){return Object.getOwnPropertyDescriptor(n,i).enumerable})),t.push.apply(t,r)}return t}function Sm(n){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?bm(Object(t),!0).forEach(function(r){hr(n,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(n,Object.getOwnPropertyDescriptors(t)):bm(Object(t)).forEach(function(r){Object.defineProperty(n,r,Object.getOwnPropertyDescriptor(t,r))})}return n}function hr(n,e,t){return e=By(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function By(n){var e=Vy(n,"string");return typeof e=="symbol"?e:String(e)}function Vy(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var wm="unknown",Wy=2147483647,Gy=-2147483648,Em=/^[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]+)?$/,ym=/^([0-9]+T)?([0-9]+):([0-9]+)(:[0-9]+)?(?:\.[0-9]{1,9})?$/;class Kt{static determineType(e,t,r){if(!e||e===r)return t;switch(t){case Ge.STRING:return Ge.STRING;case Ge.INTEGER:return Kt.checkInteger(e);case Ge.LONG:return Kt.checkLong(e);case Ge.DOUBLE:return Kt.checkDouble(e);case Ge.BOOLEAN:return Kt.checkBoolean(e);case Ge.DATE_TIME:return Kt.checkDateTime(e);case Ge.LOCAL_TIME:return Kt.checkLocalTime(e);default:return Kt.getTypeFromUnknown(e)}}static isNotParsableNumber(e){return isNaN(e)||e==="Infinity"||e==="-Infinity"}static checkInteger(e){var t=e.replace(/,/g,"");return Kt.isNotParsableNumber(t)?Ge.STRING:Kt.getNumberType(t)}static checkLong(e){var t=e.replace(/,/g,"");return Kt.isNotParsableNumber(t)?Ge.STRING:t.includes(".")?Ge.DOUBLE:Ge.LONG}static checkDouble(e){var t=e.replace(/,/g,"");return Kt.isNotParsableNumber(t)?Ge.STRING:Ge.DOUBLE}static checkBoolean(e){var t=e.toLowerCase();return t==="true"||t==="false"?Ge.BOOLEAN:Ge.STRING}static checkDateTime(e){return Em.test(e)?Ge.DATE_TIME:Ge.STRING}static checkLocalTime(e){return ym.test(e)?Ge.LOCAL_TIME:Ge.STRING}static getTypeFromUnknown(e){var t=e.replace(/,/g,"");if(Kt.isNotParsableNumber(t)){var r=e.toLowerCase();return r==="true"||r==="false"?Ge.BOOLEAN:Em.test(e)&&e.includes(":")?Ge.DATE_TIME:ym.test(e)?Ge.LOCAL_TIME:Ge.STRING}return Kt.getNumberType(t)}static getNumberType(e){if(e.includes("."))return Ge.DOUBLE;var t=e.startsWith("-")?11:10;if(e.length>t)return Ge.LONG;var r=parseInt(e,10);return r>Wy||r<Gy?Ge.LONG:Ge.INTEGER}constructor(e,t,r,i,a,o,s,l,d,u){hr(this,"onFileCompleted",void 0),hr(this,"file",void 0),hr(this,"readHeaders",void 0),hr(this,"nullString",void 0),hr(this,"onProgress",void 0),hr(this,"onError",void 0),hr(this,"types",void 0),hr(this,"chunks",void 0),hr(this,"totalChunks",void 0),hr(this,"isZip",void 0),hr(this,"shouldTrim",void 0),hr(this,"zipProgress",void 0),hr(this,"config",void 0),this.onFileCompleted=e,this.file=t,this.readHeaders=r,this.nullString=a,this.onProgress=o,this.onError=s,this.chunks=0,this.totalChunks=l,this.isZip=d,this.shouldTrim=u,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=Sm(Sm({},i),{},{error:this.handleError,chunk:this.handleChunk,complete:this.handleComplete})}parse(){var e=this.isZip?this.file.nodeStream("nodebuffer",this.handleNodeUpdate):this.file;Uu.parse(e,this.config)}handleChunk(e,t){var{data:r}=e;if(!this.types){if(r==null||r.length===0){t.abort(),this.onError("Error parsing CSV: no data in file.");return}this.types=new Array(r[0].length).fill(wm),this.readHeaders&&(r=r.slice(1))}L(this.types);var i=[...this.types];r.forEach(s=>{if(s.length>=i.length){for(var l=0;l<i.length;l+=1)i[l]=Kt.determineType(this.shouldTrim?s[l].trim():s[l],i[l],this.nullString);this.types=i}else t.abort(),this.onError(`Error parsing CSV: Insufficient data in row.
|
|
3
3
|
Expected length `.concat(i.length," but found ").concat(s.length,`.
|
|
4
4
|
Row = `).concat(s))}),this.chunks+=1;var a=0;this.totalChunks>0?a=Math.round(this.chunks/this.totalChunks*50):a=Math.round(this.zipProgress/2);var o=this.onProgress(a);o&&t.abort()}handleComplete(e){var{types:t,onFileCompleted:r}=this;L(t),(e==null||!e.meta.aborted)&&r(t.map(i=>i===wm?Ge.STRING:i))}handleError(e){var{onError:t}=this;t(e)}handleNodeUpdate(e){this.zipProgress=e.percent}}const jy=Kt;function gt(n,e,t){return e=zy(e),e in n?Object.defineProperty(n,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):n[e]=t,n}function zy(n){var e=Ky(n,"string");return typeof e=="symbol"?e:String(e)}function Ky(n,e){if(typeof n!="object"||n===null)return n;var t=n[Symbol.toPrimitive];if(t!==void 0){var r=t.call(n,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(n)}var Us=oe.module("CsvParser"),Yy=650;class oo{static generateHeaderRecursive(e){var t="",r=e;return e>=26&&(t=t.concat(oo.generateHeaderRecursive(Math.floor(e/26)-1)),r=e%26),t.concat(String.fromCharCode(65+r))}constructor(e){var{onFileCompleted:t,session:r,file:i,type:a,readHeaders:o=!0,onProgress:s,onError:l,timeZone:d,isZip:u}=e;gt(this,"onFileCompleted",void 0),gt(this,"session",void 0),gt(this,"file",void 0),gt(this,"isZip",void 0),gt(this,"type",void 0),gt(this,"readHeaders",void 0),gt(this,"timeZone",void 0),gt(this,"onProgress",void 0),gt(this,"onError",void 0),gt(this,"tables",void 0),gt(this,"headers",void 0),gt(this,"types",void 0),gt(this,"chunks",void 0),gt(this,"totalChunks",void 0),gt(this,"isComplete",void 0),gt(this,"zipProgress",void 0),gt(this,"consolidatedChunks",void 0),gt(this,"numConsolidated",void 0),gt(this,"isCancelled",void 0),gt(this,"config",void 0),this.onFileCompleted=t,this.session=r,this.file=i,this.isZip=u,this.type=a,this.readHeaders=o,this.timeZone=d,this.onProgress=s,this.onError=l,this.tables=[],this.chunks=0,this.totalChunks=u?0:Math.ceil(i.size/Uu.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:a.delimiter,newline:a.newline,escapeChar:a.escapeChar,dynamicTyping:!1,error:this.handleError,skipEmptyLines:a.skipEmptyLines,chunk:this.handleChunk,complete:this.handleComplete,fastMode:!1}}cancel(){this.isCancelled=!0}transpose(e,t){for(var r=t.length,i=new Array(e).fill(null).map(()=>new Array(r)),a=0;a<r;a+=1){var o=t[a];if(o.length<e)throw new Error("Insufficient columns. Expected ".concat(e," but found ").concat(o.length,`
|
|
@@ -39,4 +39,4 @@ This note can be edited using **markdown** for styling.`);const Au=vo;function k
|
|
|
39
39
|
Web UI Version: ${e}
|
|
40
40
|
Java Version: ${s}
|
|
41
41
|
Barrage Version: ${o}`,children:"Copy Versions"})]})]})]}),F.jsx("div",{className:"app-settings-footer-item",children:F.jsx(fH,{})})]}),F.jsx("div",{className:"app-settings-footer-section",children:F.jsx("div",{className:"logo",children:F.jsx("a",{target:"_blank",rel:"noreferrer noopener",href:"https://deephaven.io",className:"d-inline-block custom-link p-1",children:F.jsx("img",{src:yb,alt:"Deephaven Data Labs",width:"230px"})})})})]})]})]})}}const Df=10;function Xa(n){const{forwardedProps:{menuItem:{action:e,title:t,disabled:r},iconElement:i,displayShortcut:a,isMouseSelected:o,isKeyboardSelected:s,closeMenu:l}}=n,d=w.useRef(),u=w.useRef(),c=w.useRef(null),[m,v]=w.useState(!1),g=w.useCallback(C=>{d.current!=null&&u.current!=null&&c.current&&(Math.abs(d.current-C.clientX)>=Df||Math.abs(u.current-C.clientY)>=Df)&&(v(!0),window.removeEventListener("mousemove",g),l(),e(C),c.current=null)},[e,l]);function f(C){d.current=C.clientX,u.current=C.clientY,c.current=C.target,window.addEventListener("mousemove",g)}function p(C){c.current===C.target&&(v(!0),l(),e(),window.removeEventListener("mousemove",g)),c.current=null}return w.useEffect(function(){return function(){return window.removeEventListener("mousemove",g)}},[g]),F.jsxs("button",{type:"button",className:te("btn-context-menu",{disabled:r},{active:o&&!r},{"keyboard-active":s&&!r}),onMouseDown:f,onMouseUp:p,disabled:m,children:[F.jsx("span",{className:te("icon"),children:i}),F.jsx("span",{className:"title",children:t}),F.jsx("span",{className:"shortcut",children:a})]})}function _c(n){const{handleControlSelect:e,handleToolSelect:t,onClearFilter:r}=n,i=w.useMemo(()=>[{title:"Input Filter",icon:Rw,menuElement:F.jsx(Xa,{}),action:a=>{e(Vi.INPUT_FILTER,a)},order:10},{title:"Dropdown Filter",icon:Gf,menuElement:F.jsx(Xa,{}),action:a=>{e(Vi.DROPDOWN_FILTER,a)},order:15},{title:"Markdown Widget",icon:Nw,menuElement:F.jsx(Xa,{}),action:a=>{e(Vi.MARKDOWN,a)},order:20},{title:"Filter Sets",icon:Wu,menuElement:F.jsx(Xa,{}),action:a=>{e(Vi.FILTER_SET_MANAGER,a)},order:25},{disabled:!0,menuElement:F.jsx("div",{className:"context-menu-group-header",children:"Tools"}),order:30},{title:"Linker",icon:Bf,action:()=>{t(Sr.LINKER)},order:40,shortcut:ui.LINKER},{disabled:!0,menuElement:F.jsx("div",{className:"context-menu-group-header",children:"Actions"}),order:50},{title:"Clear All Filters",icon:Fw,action:()=>{r()},order:60,shortcut:Mr.TABLE.CLEAR_ALL_FILTERS}],[e,t,r]);return F.jsx(ai,{popperClassName:"controls-menu-popper",actions:i})}_c.propTypes={handleControlSelect:q.func,handleToolSelect:q.func,onClearFilter:q.func};_c.defaultProps={handleControlSelect:()=>{},handleToolSelect:()=>{},onClearFilter:()=>{}};Xa.propTypes={forwardedProps:q.shape({iconElement:q.node,displayShortcut:q.string,isMouseSelected:q.bool.isRequired,isKeyboardSelected:q.bool.isRequired,closeMenu:q.func.isRequired,menuItem:q.shape({action:q.func,title:q.string,disabled:q.bool}).isRequired})};Xa.defaultProps={forwardedProps:null};const IH=Xi(Eb,null),_H={layoutStorage:IH},MH=n=>n.layoutStorage,AH=n=>n.serverConfigValues;Object.entries(_H).map(([n,e])=>ws.register(n,e));const Rf=10;function LH(n){const{onExportLayout:e,onImportLayout:t,onResetLayout:r,onSelect:i,widgets:a=[]}=n,[o,s]=w.useState(!1),[l,d]=w.useState(""),u=w.useRef(null),c=w.useRef(),m=w.useCallback((E,y)=>{E!=null&&i(E,y)},[i]),v=w.useCallback(E=>{d(E.target.value)},[]),g=w.useCallback(E=>{c.current!=null&&(Math.abs(c.current.x-E.clientX)>=Rf||Math.abs(c.current.y-E.clientY)>=Rf)&&(s(!0),window.removeEventListener("mousemove",g),m(c.current.widget,E),c.current=void 0)},[c,m]),f=w.useCallback((E,y)=>{c.current={x:E.clientX,y:E.clientY,widget:y},window.addEventListener("mousemove",g)},[g]),p=w.useCallback((E,y)=>{window.removeEventListener("mousemove",g),c.current?.widget===y&&(s(!0),m(y)),c.current=void 0},[g,c,m]),C=w.useMemo(()=>a.filter(E=>l?E.name?.toLowerCase().includes(l.toLowerCase()):!0),[l,a]).sort((E,y)=>E.name?.localeCompare(y.name??"")??0),b=w.useMemo(()=>C.map(E=>F.jsx("li",{children:F.jsxs(z,{kind:"ghost","data-testid":`panel-list-item-${E.name??""}-button`,onMouseDown:y=>{f(y,E)},onMouseUp:y=>{p(y,E)},onKeyDown:y=>{(y.key==="Enter"||y.key===" ")&&m(E)},disabled:o,onClick:()=>{},children:[F.jsx(Jf,{type:E.type})," ",E.name??""]})},E.name)),[C,o,f,p,m]),S=w.useMemo(()=>b.length===0?F.jsx("span",{children:"No bound variables found."}):null,[b]);return F.jsxs("div",{className:"widget-list-container d-flex flex-column",children:[F.jsx("div",{className:"widget-list-header",children:F.jsx(go,{value:l,placeholder:"Find Table, Plot or Widget",onChange:v,ref:u})}),F.jsxs("ul",{className:"widget-list flex-grow-1",children:[S&&F.jsx("li",{className:"widget-list-message",children:S}),!S&&b]}),F.jsx("div",{children:F.jsx("hr",{})}),F.jsxs("div",{className:"widget-list-footer",children:[F.jsxs(z,{kind:"ghost",onClick:e,children:[F.jsxs("div",{className:"fa-md fa-layers",children:[F.jsx(re,{mask:Vu,icon:om,transform:"right-5 down-5"}),F.jsx(re,{icon:om,transform:"right-8 down-6"})]}),"Export Layout"]}),F.jsxs(z,{kind:"ghost",onClick:t,children:[F.jsxs("div",{className:"fa-md fa-layers",children:[F.jsx(re,{mask:Vu,icon:Gu,transform:"right-5 down-5"}),F.jsx(re,{icon:Gu,transform:"right-8 down-6"})]}),"Import Layout"]}),F.jsx(z,{kind:"ghost",icon:ma,onClick:r,tooltip:"Reset Layout"})]})]})}const kH=async(n,e,t,r)=>{let i,a,o,s;if(Tl(t)?(i=t.settings,a=t.table,o=void 0,s=t.tableSettings):(i={},a="",o=t.figure,s={}),r!==void 0&&(r.tableSettings!=null&&(s=r.tableSettings),r.table!=null&&(a=r.table),r.figure!=null&&(o=r.figure),r.settings!=null&&(i={...i,...r.settings})),o!==void 0){const u={title:o,name:o,type:n.VariableType.FIGURE},c=await e.getObject(u);return kl.makeModel(n,i,c)}const l={title:o,name:a,type:n.VariableType.TABLE},d=await e.getObject(l);return new ye(n).applyTableSettings(d,s,Ss(Kh.getState())),kl.makeModelFromSettings(n,i,d)},xH=async(n,e,t,r=n.VariableType.TABLE)=>{const{table:i}=t,a={title:i,name:i,type:r},o=await e.getObject(a);return mc.makeModel(n,o)};function HH({onAutoFillClick:n=()=>{}}){return F.jsxs("div",{className:"empty-dashboard-container",children:[F.jsxs("div",{className:"hint-container",children:[F.jsx(re,{icon:Wf})," ",F.jsx("br",{}),"Use the panel list to add objects from a query."]}),F.jsxs("div",{className:"empty-dashboard",children:[F.jsx("div",{className:"add-panels-hint",children:"Drag Panels Here"}),F.jsx(z,{kind:"tertiary",onClick:n,children:"Auto fill objects"})]})]})}function UH(n){return n.version===2}function $H(n){return Array.isArray(n)}const pl=oe.module("UserLayoutUtils"),BH={layoutConfig:[{type:"column",content:[{type:"row",height:40,content:[{type:"stack",content:[{type:"react-component",component:qa.COMPONENT,title:qa.TITLE,isClosable:!1},{type:"react-component",component:Jl.COMPONENT,title:Jl.TITLE,isClosable:!1}]},{type:"stack",width:25,content:[{type:"react-component",component:Xl.COMPONENT,title:Xl.TITLE,isClosable:!1},{type:"react-component",component:Ql.COMPONENT,title:Ql.TITLE,isClosable:!1}]}]},{type:"row",content:[{type:"stack",title:"Notebooks",content:[]}]}]}],links:[],filterSets:[],version:2},VH={layoutConfig:[],links:[],filterSets:[],version:2};function Fb(n){if(UH(n))return n;if($H(n))return{layoutConfig:n,links:[],filterSets:[],version:2};throw new Error(`Unexpected layout import format: ${n}`)}async function WH(n,e=!0){try{const t=await n.getLayouts();if(t.length>0)try{const r=await n.getLayout(t[0]);return Fb(r)}catch(r){pl.error("Unable to load layout",t[0],":",r),pl.warn("No valid layouts found, falling back to default layout")}}catch(t){pl.error("Unable to fetch layout list",t),pl.warn("Falling back to default layout")}return e?BH:VH}function GH(n){const{filterSets:e,layoutConfig:t,links:r}=n;return{filterSets:e,layoutConfig:t,links:r,version:2}}const Dl={exportLayout:GH,getDefaultLayout:WH,normalizeLayout:Fb},Cl=oe.module("DownloadServiceWorkerUtils");class vs{static DOWNLOAD_PATH="/download/";static registerOnLoaded(){new URL("./",window.location.href).origin===window.location.origin&&("serviceWorker"in navigator?window.addEventListener("load",()=>{const t=new URL("./download/serviceWorker.js",window.location.href);navigator.serviceWorker.register(t).then(r=>{r.update(),Cl.info("Registering service worker on ",t,r)}).catch(r=>{Cl.error("Failed to register service worker",r)})}):Cl.info("Service worker is not supported."))}static async getServiceWorker(){if("serviceWorker"in navigator){const t=(await navigator.serviceWorker.getRegistrations()).find(r=>r.scope.endsWith(vs.DOWNLOAD_PATH));if(t&&t.active)return Cl.info("Download service worker is active."),t.active;throw new Error("Can not find download service worker.")}throw new Error("Download service worker is not available.")}static unregisterSW(){}}const St=oe.module("AppMainContainer");class Qa extends w.Component{static handleWindowBeforeUnload(e){e.preventDefault(),e.returnValue=""}static hydrateConsole(e,t){return eh.hydrate({...e,unzip:r=>Lf.loadAsync(r).then(i=>Object.values(i.files))},t)}static handleRefresh(){St.info("Refreshing application"),window.location.reload()}constructor(e){super(e),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.handleDisconnect=this.handleDisconnect.bind(this),this.handleReconnect=this.handleReconnect.bind(this),this.handleReconnectAuthFailed=this.handleReconnectAuthFailed.bind(this),this.importElement=h.createRef(),this.state={contextActions:[{action:()=>{this.handleToolSelect(Sr.LINKER)},shortcut:ui.LINKER,isGlobal:!0},{action:()=>{this.sendClearFilter()},shortcut:Mr.TABLE.CLEAR_ALL_FILTERS,isGlobal:!0},{action:()=>{St.debug("Consume unhandled save shortcut")},shortcut:ui.SAVE,isGlobal:!0}],isAuthFailed:!1,isDisconnected:!1,isPanelsMenuShown:!1,isSettingsMenuShown:!1,widgets:[]}}componentDidMount(){this.initWidgets(),this.startListeningForDisconnect(),window.addEventListener("beforeunload",Qa.handleWindowBeforeUnload)}componentDidUpdate(e){const{dashboardData:t}=this.props;e.dashboardData!==t&&this.handleDataChange(t)}componentWillUnmount(){this.deinitWidgets(),this.stopListeningForDisconnect(),window.removeEventListener("beforeunload",Qa.handleWindowBeforeUnload)}goldenLayout;importElement;widgetListenerRemover;initWidgets(){const{connection:e}=this.props;if(e.subscribeToFieldUpdates==null){St.warn("subscribeToFieldUpdates not supported, not initializing widgets");return}this.widgetListenerRemover=e.subscribeToFieldUpdates(t=>{St.debug("Got updates",t),this.setState(({widgets:r})=>{const{updated:i,created:a,removed:o}=t,s=[...i,...o],l=r.filter(u=>!s.some(c=>c.name===u.name));return[...i,...a].forEach(u=>{u.name!=null&&u.name!==""&&l.push(u)}),{widgets:l}})})}deinitWidgets(){this.widgetListenerRemover?.()}openNotebookFromURL(){const{match:e}=this.props,{notebookPath:t}=e.params;if(t){const{session:r,sessionConfig:i}=this.props;if(r==null||i==null){St.error("No session available to open notebook URL",t);return}const a={id:`/${t}`,itemName:`/${t}`},o=i.type,s={value:null,language:o};this.emitLayoutEvent(Ye.SELECT_NOTEBOOK,r,o,s,a,!0)}}sendClearFilter(){this.emitLayoutEvent(it.CLEAR_ALL_FILTERS)}emitLayoutEvent(e,...t){this.goldenLayout?.eventHub.emit(e,...t)}handleError(e){Te.isCanceled(e)||St.error(e)}handleSettingsMenuHide(){this.setState({isSettingsMenuShown:!1})}handleSettingsMenuShow(){this.setState({isSettingsMenuShown:!0})}handleControlSelect(e,t){switch(St.debug("handleControlSelect",e),e){case Vi.DROPDOWN_FILTER:this.emitLayoutEvent(it.OPEN_DROPDOWN,{title:"DropdownFilter",type:e,createNewStack:!0,dragEvent:t});break;case Vi.INPUT_FILTER:this.emitLayoutEvent(it.OPEN_INPUT,{title:"InputFilter",type:e,createNewStack:!0,dragEvent:t});break;case Vi.MARKDOWN:this.emitLayoutEvent(YC.OPEN,{title:"Markdown",type:e,dragEvent:t});break;case Vi.FILTER_SET_MANAGER:this.emitLayoutEvent(it.OPEN_FILTER_SET_MANAGER,{title:"FilterSets",type:e,dragEvent:t});break;default:throw new Error(`Unrecognized control type ${e}`)}}handleToolSelect(e){St.debug("handleToolSelect",e);const{activeTool:t,setActiveTool:r}=this.props;r(t===e?Sr.DEFAULT:e)}handleClearFilter(){this.sendClearFilter()}handleDataChange(e){const{updateWorkspaceData:t}=this.props,{closed:r,filterSets:i,links:a}=e;t({closed:r,filterSets:i,links:a})}handleGoldenLayoutChange(e){this.goldenLayout=e}handleLayoutConfigChange(e){const{updateWorkspaceData:t}=this.props;t({layoutConfig:e})}handleWidgetMenuClick(){this.setState(({isPanelsMenuShown:e})=>({isPanelsMenuShown:!e}))}handleWidgetSelect(e,t){this.setState({isPanelsMenuShown:!1}),St.debug("handleWidgetSelect",e,t),this.openWidget(e,t)}handleWidgetsMenuClose(){this.setState({isPanelsMenuShown:!1})}handleAutoFillClick(){const{widgets:e}=this.state;St.debug("handleAutoFillClick",e);const t=e.sort((r,i)=>r.title!=null&&i.title!=null?r.title.localeCompare(i.title):0);for(let r=0;r<t.length;r+=1)this.openWidget(t[r])}handleExportLayoutClick(){St.info("handleExportLayoutClick"),this.setState({isPanelsMenuShown:!1});try{const{workspace:e}=this.props,{data:t}=e,r=Dl.exportLayout(t);St.info("handleExportLayoutClick exportedConfig",r);const i=new Blob([JSON.stringify(r)],{type:"application/json"}),a=Rr.i18n.DateTimeFormat.format("yyyy-MM-dd-HHmmss",new Date),o=document.createElement("a");o.href=URL.createObjectURL(i),o.download=`deephaven-app-layout-${a}.json`,o.click()}catch(e){St.error("Unable to export layout",e)}}handleImportLayoutClick(){St.info("handleImportLayoutClick"),this.setState({isPanelsMenuShown:!1}),this.importElement.current!=null&&(this.importElement.current.value="",this.importElement.current.click())}handleResetLayoutClick(){St.info("handleResetLayoutClick"),this.setState({isPanelsMenuShown:!1}),this.resetLayout()}handleImportLayoutFiles(e){e.stopPropagation(),e.preventDefault(),e.target.files!=null&&this.importLayoutFile(e.target.files?.[0])}handleDisconnect(){St.info("Disconnected from server"),this.setState({isDisconnected:!0})}handleReconnect(){St.info("Reconnected to server"),this.setState({isDisconnected:!1})}handleReconnectAuthFailed(){St.warn("Reconnect authentication failed"),this.setState({isAuthFailed:!0})}async importLayoutFile(e){try{const{updateDashboardData:t,updateWorkspaceData:r}=this.props,i=await e.text(),a=JSON.parse(i),{filterSets:o,layoutConfig:s,links:l}=Dl.normalizeLayout(a);r({layoutConfig:s}),t(Sn,{filterSets:o,links:l})}catch(t){St.error("Unable to import layout",t)}}async resetLayout(){const{layoutStorage:e,session:t}=this.props,{filterSets:r,layoutConfig:i,links:a}=await Dl.getDefaultLayout(e,t!==void 0),{updateDashboardData:o,updateWorkspaceData:s}=this.props;s({layoutConfig:i}),o(Sn,{filterSets:r,links:a})}handlePaste(e){if(e.target instanceof HTMLElement&&e.target.closest(".monaco-editor"))return;const{clipboardData:t}=e,r=t.getData("Text"),i=/“|”/g;i.test(r)&&(e.preventDefault(),e.stopPropagation(),document.execCommand("insertText",!1,r.replace(i,'"')))}handleLoadTablePlugin(e){const{plugins:t}=this.props,r=t.get(e);if(r!=null&&r.TablePlugin!=null)return r.TablePlugin;const i=`Unable to find table plugin ${e}.`;return St.error(i),F.jsx("div",{className:"error-message",children:`${i}`})}startListeningForDisconnect(){const{connection:e}=this.props;e.addEventListener(Rr.IdeConnection.EVENT_DISCONNECT,this.handleDisconnect),e.addEventListener(Rr.IdeConnection.EVENT_RECONNECT,this.handleReconnect),e.addEventListener(Rr.CoreClient.EVENT_RECONNECT_AUTH_FAILED,this.handleReconnectAuthFailed)}stopListeningForDisconnect(){const{connection:e}=this.props;e.removeEventListener(Rr.IdeConnection.EVENT_DISCONNECT,this.handleDisconnect),e.removeEventListener(Rr.IdeConnection.EVENT_RECONNECT,this.handleReconnect),e.removeEventListener(Rr.CoreClient.EVENT_RECONNECT_AUTH_FAILED,this.handleReconnectAuthFailed)}hydrateDefault(e,t){const{connection:r}=this.props,{metadata:i}=e;if(i?.type!=null&&(i?.id!=null||i?.name!=null)){const a=i.id!=null?{type:i.type,id:i.id}:{type:i.type,name:i.name,title:i.name};return{fetch:()=>r.getObject(a),localDashboardId:t,...e}}return eh.hydrate(e,t)}hydrateGrid(e,t){return this.hydrateTable(e,t,e.metadata.type??Rr.VariableType.TABLE)}hydratePandas(e,t){return this.hydrateTable(e,t,Rr.VariableType.PANDAS)}hydrateTable(e,t,r=Rr.VariableType.TABLE){const{connection:i}=this.props;return{...e,getDownloadWorker:vs.getServiceWorker,loadPlugin:this.handleLoadTablePlugin,localDashboardId:t,makeModel:()=>xH(Rr,i,e.metadata,r)}}hydrateChart(e,t){const{connection:r}=this.props;return{...e,localDashboardId:t,makeModel:()=>{const{metadata:i,panelState:a}=e;return kH(Rr,r,i,a)}}}openWidget(e,t){const{connection:r}=this.props;this.emitLayoutEvent(Ee.OPEN,{dragEvent:t,fetch:()=>r.getObject(e),widget:e})}getDashboardPlugins=pe(e=>[...e.entries()].filter(([,t])=>t.DashboardPlugin!=null).map(([t,{DashboardPlugin:r}])=>F.jsx(r,{},t)));render(){const{activeTool:e,plugins:t,user:r,workspace:i,serverConfigValues:a}=this.props,{data:o}=i,{layoutConfig:s}=o,{permissions:l}=r,{canUsePanels:d}=l,{contextActions:u,isAuthFailed:c,isDisconnected:m,isPanelsMenuShown:v,isSettingsMenuShown:g,widgets:f}=this.state,p=this.getDashboardPlugins(t);return F.jsxs("div",{className:te("app-main-tabs","w-100","h-100","d-flex","flex-column",e?`active-tool-${e.toLowerCase()}`:""),onPaste:this.handlePaste,tabIndex:-1,children:[F.jsx("nav",{className:"nav-container",children:F.jsxs("div",{className:"app-main-top-nav-menus",children:[F.jsx("img",{src:yb,alt:"Deephaven Data Labs",width:"115px",className:"ml-1"}),F.jsxs("div",{children:[F.jsxs(z,{kind:"ghost",className:"btn-panels-menu",icon:Iw,onClick:()=>{},children:["Controls",F.jsx(_c,{handleControlSelect:this.handleControlSelect,handleToolSelect:this.handleToolSelect,onClearFilter:this.handleClearFilter})]}),d&&F.jsxs(z,{kind:"ghost",className:"btn-panels-menu btn-show-panels","data-testid":"app-main-panels-button",onClick:this.handleWidgetMenuClick,icon:_w,children:["Panels",F.jsx(md,{isShown:v,className:"panels-menu-popper",onExited:this.handleWidgetsMenuClose,options:{placement:"bottom"},closeOnBlur:!0,interactive:!0,children:F.jsx(LH,{widgets:f,onExportLayout:this.handleExportLayoutClick,onImportLayout:this.handleImportLayoutClick,onResetLayout:this.handleResetLayoutClick,onSelect:this.handleWidgetSelect})})]}),F.jsx(z,{kind:"ghost",className:te("btn-settings-menu",{"text-warning":r.operateAs!=null&&r.operateAs!==r.name}),onClick:this.handleSettingsMenuShow,icon:F.jsxs("span",{className:"fa-layers",children:[F.jsx(re,{icon:fs,transform:"grow-3 right-1 down-1"}),m&&!c&&F.jsxs(F.Fragment,{children:[F.jsx(re,{icon:os,color:et.background,transform:"grow-2 right-8 down-8.5 rotate-45"}),F.jsx(re,{icon:sm,color:et.danger,transform:"shrink-5 right-6 down-6"})]})]}),tooltip:m&&!c?"Server disconnected":"User Settings"})]})]})}),F.jsxs(gD,{emptyDashboard:F.jsx(HH,{onAutoFillClick:this.handleAutoFillClick}),id:Sn,layoutConfig:s,onGoldenLayoutChange:this.handleGoldenLayoutChange,onLayoutConfigChange:this.handleLayoutConfigChange,onLayoutInitialized:this.openNotebookFromURL,hydrate:this.hydrateDefault,children:[F.jsx(fx,{hydrate:this.hydrateGrid,getDownloadWorker:vs.getServiceWorker,loadPlugin:this.handleLoadTablePlugin}),F.jsx(lx,{hydrate:this.hydrateChart}),F.jsx(dx,{}),F.jsx(vx,{hydrateConsole:Qa.hydrateConsole,notebooksUrl:new URL("notebooks/",document.baseURI).href}),F.jsx(gx,{}),F.jsx(xx,{hydrate:this.hydratePandas}),F.jsx(kx,{}),F.jsx(Mx,{}),p]}),F.jsx(kr,{in:g,timeout:et.transitionMidMs,classNames:"slide-left",mountOnEnter:!0,unmountOnExit:!0,children:F.jsx(Nn,{serverConfigValues:a,onDone:this.handleSettingsMenuHide,user:r})}),F.jsx(le,{actions:u}),F.jsx("input",{ref:this.importElement,type:"file",accept:".json",style:{display:"none"},onChange:this.handleImportLayoutFiles}),F.jsx(jw,{isOpen:m&&!c,debounceMs:1e3,children:F.jsx(zw,{icon:sm,title:F.jsxs(F.Fragment,{children:[F.jsx(Hn,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),F.jsx(ss,{confirmButtonText:"Refresh",onConfirm:Qa.handleRefresh,isOpen:c,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})}}const jH=n=>({activeTool:wd(n),dashboardData:Er(n,Sn),layoutStorage:MH(n),plugins:hT(n),connection:n1(n,Sn),session:Ta(n,Sn)?.session,sessionConfig:Ta(n,Sn)?.config,user:pp(n),workspace:Sd(n),serverConfigValues:AH(n)}),zH=$t(jH,{setActiveTool:yd,updateDashboardData:Un,updateWorkspaceData:xp})(bS(Qa));function KH(){return F.jsxs("div",{className:"app",children:[F.jsx(zH,{}),F.jsx(Xf,{})]})}const YH=oe.module("LocalWorkspaceStorage");class Za{static STORAGE_KEY="deephaven.WorkspaceStorage";static async makeDefaultWorkspaceData(e,t){const{filterSets:r,links:i,layoutConfig:a}=await Dl.getDefaultLayout(e,t?.isConsoleAvailable);return{settings:{defaultDateTimeFormat:Tt.DEFAULT_DATETIME_FORMAT_STRING,formatter:[],timeZone:Tt.DEFAULT_TIME_ZONE_ID,showTimeZone:!1,showTSeparator:!0,disableMoveConfirmation:!1,defaultDecimalFormatOptions:{defaultFormatString:tt.DEFAULT_FORMAT_STRING},defaultIntegerFormatOptions:{defaultFormatString:yt.DEFAULT_FORMAT_STRING},truncateNumbersWithPound:!1,defaultNotebookSettings:{isMinimapEnabled:!1}},layoutConfig:a,closed:[{}],links:i,filterSets:r}}static async makeDefaultWorkspace(e,t){return{data:await Za.makeDefaultWorkspaceData(e,t)}}layoutStorage;constructor(e){this.layoutStorage=e}async load(e){try{return JSON.parse(localStorage.getItem(Za.STORAGE_KEY)??"")}catch{return YH.info("Unable to load workspace data, initializing to default data"),Za.makeDefaultWorkspace(this.layoutStorage,e)}}async save(e){return localStorage.setItem(Za.STORAGE_KEY,JSON.stringify(e)),e}}class qH{storageService;root;constructor(e,t=""){this.storageService=e,this.root=t}async getLayouts(){return(await this.storageService.listItems(this.root,"*.json")).map(t=>t.basename)}async getLayout(e){const r=await(await this.storageService.loadFile(`${this.root}/${e}`)).text();return JSON.parse(r)}}const Wo=oe.module("GrpcFileStorageTable");class rd{static REFRESH_DEBOUNCE=50;storageService;baseRoot;root;currentSize=0;currentViewport;listeners=[];viewportUpdatePromise;currentViewportData;childTables=new Map;constructor(e,t="",r=t){this.storageService=e,this.baseRoot=t,this.root=r,r===t&&(this.doRefresh=rt(this.doRefresh.bind(this),rd.REFRESH_DEBOUNCE))}removeBaseRoot(e){return be.removeRoot(this.baseRoot,e)}getViewportData(){return this.viewportUpdatePromise||this.refreshInternal(),this.viewportUpdatePromise??Promise.resolve({items:[],offset:0})}getSnapshot(e){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(e,t){const r=e.split("/");let i=r.shift();if((i===void 0||i==="")&&(i=r.shift()),i===void 0||i==="")throw new Error(`Invalid path: ${e}`);const a=r.join("/");if(t){if(!this.childTables.has(i)){const o=new rd(this.storageService,this.baseRoot,`${this.root}/${i}`);this.childTables.set(i,o)}a&&this.childTables.get(i)?.setExpanded(a,t)}else this.childTables.has(i)&&(a?this.childTables.get(i)?.setExpanded(a,t):this.childTables.delete(i));this.currentViewport&&this.refreshInternal()}collapseAll(){this.childTables.clear(),this.currentViewport&&this.refreshInternal()}setSearch(e){throw new Error("Method not implemented.")}setViewport(e){this.currentViewport=e,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(e){return this.listeners=[...this.listeners,e],()=>{this.listeners=this.listeners.filter(t=>t!==e)}}doRefresh(e){Wo.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){Wo.debug2("refresh",this.root),this.viewportUpdatePromise?.cancel();const e=new Promise(r=>{this.doRefresh(r)}),t=Te.makeCancelable(e.then(r=>{if(this.viewportUpdatePromise!==t)throw new ud;return this.currentViewportData=r,this.sendUpdate(),r}));t.catch(r=>{Te.isCanceled(r)||Wo.error("Error updating viewport",r)}),this.viewportUpdatePromise=t}refreshInternal(){try{this.refresh()}catch(e){Te.isCanceled(e)||Wo.error("Unable to refresh data",e)}}async fetchData(){const{currentViewport:e}=this;if(!e)throw new Error("No viewport set");let r=(await this.storageService.listItems(this.root)).map(i=>({type:i.type,filename:this.removeBaseRoot(i.filename),basename:i.basename,id:this.removeBaseRoot(i.filename),isExpanded:i.type==="directory"?this.childTables.has(i.basename):void 0})).sort((i,a)=>i.type!==a.type?i.type==="directory"?-1:1:i.basename.localeCompare(a.basename));for(let i=0;i<r.length;i+=1){const a=r[i],{basename:o,filename:s}=a;if(s===this.removeBaseRoot(`${this.root}/${o}`)&&a.type==="directory"){const l=this.childTables.get(o);if(l!=null){l.setViewport({top:0,bottom:e.bottom-i});const d=await l.getViewportData();r.splice(i+1,0,...d.items)}}}return this.currentSize=r.length,Wo.debug2(this.root,"items",r,e),r=r.slice(e.top,e.bottom),{items:r,offset:e.top}}sendUpdate(){const{listeners:e}=this,t=this.currentViewportData??{items:[],offset:0};for(let r=0;r<e.length;r+=1)e[r](t)}}const XH=oe.module("GrpcFileStorage");class Mc{static REFRESH_THROTTLE=150;storageService;tables=[];root;constructor(e,t=""){this.storageService=e,this.root=t}removeRoot(e){return be.removeRoot(this.root,e)}addRoot(e){return be.addRoot(this.root,e)}async createDirectory(e){return await this.storageService.createDirectory(this.addRoot(e)),this.refreshTables(),{type:"directory",id:e,filename:e,basename:be.getBaseName(e)}}async getTable(){const e=new rd(this.storageService,this.root);return this.tables.push(e),e}async saveFile(e){const t=dh.storage.FileContents.text(e.content);return await this.storageService.saveFile(this.addRoot(e.filename),t,!0),this.refreshTables(),e}async loadFile(e){const r=await(await this.storageService.loadFile(this.addRoot(e))).text();return{filename:e,basename:be.getBaseName(e),content:r}}async deleteFile(e){await this.storageService.deleteItem(this.addRoot(e)),this.refreshTables()}async moveFile(e,t){await this.storageService.moveItem(this.addRoot(e),this.addRoot(t)),this.refreshTables()}async info(e){const t=await this.storageService.listItems(this.addRoot(be.getPath(e)),be.getBaseName(e));if(t.length===0)throw new yc;if(t.length>1)throw XH.error("More than one matching file found, should never happen.",t),new Error("More than one matching file found");const r=t[0];return{filename:this.removeRoot(r.filename),basename:r.basename,id:this.removeRoot(r.filename),type:r.type}}refreshTables=zi(()=>{this.tables.forEach(e=>e.refresh())},Mc.REFRESH_THROTTLE)}const QH=oe.module("AppInit");function Ac(n){const{workspace:e,setActiveTool:t,setApi:r,setCommandHistoryStorage:i,setDashboardData:a,setFileStorage:o,setLayoutStorage:s,setDashboardConnection:l,setDashboardSessionWrapper:d,setPlugins:u,setUser:c,setWorkspace:m,setWorkspaceStorage:v,setServerConfigValues:g}=n,f=Pa(),p=Kw(),C=Yw(),b=qw(),S=w.useContext(Xw),E=w.useContext(Qw),[y,T]=w.useState();w.useEffect(function(){u(b)},[b,u]),w.useEffect(function(){async function I(){try{const M=await Zw(),A=await Jw(f,C,M),B=p.getStorageService(),$=new qH(B,"/layouts"),j=new Mc(B,"/notebooks"),G=new Za($),K=new oH,[Q,J]=await Promise.all([p.getServerConfigValues(),G.load({isConsoleAvailable:A!==void 0})]),{data:_}=J,{settings:R}=_;R.defaultDecimalFormatOptions===void 0&&(R.defaultDecimalFormatOptions={defaultFormatString:tt.DEFAULT_FORMAT_STRING}),R.defaultIntegerFormatOptions===void 0&&(R.defaultIntegerFormatOptions={defaultFormatString:yt.DEFAULT_FORMAT_STRING}),R.truncateNumbersWithPound===void 0&&(R.truncateNumbersWithPound=!1);const{shortcutOverrides:k={}}=R,Y=hn.isMacPlatform?k.mac??{}:k.windows??{};Object.entries(Y).forEach(([se,ve])=>{qe.get(se)?.setKeyState(ve)});const W={filterSets:_.filterSets,links:_.links},ee=new Map(Q),ne="",ie={name:ne,operateAs:ne,groups:[],...S,permissions:{isACLEditor:!1,isSuperUser:!1,isQueryViewOnly:!1,isNonInteractive:!1,canUsePanels:!0,canCreateDashboard:!0,canCreateCodeStudio:!0,canCreateQueryMonitor:!0,canCopy:ee.get("internal.webClient.appInit.canCopy")!=="false",canDownloadCsv:ee.get("internal.webClient.appInit.canDownloadCsv")!=="false",canLogout:!0,...E}};r(f),t(Sr.DEFAULT),g(ee),i(K),a(Sn,W),o(j),s($),l(Sn,C),A!==void 0&&d(Sn,A),c(ie),v(G),m(J)}catch(M){QH.error(M),T(M)}}I()},[f,p,C,t,r,i,a,o,s,l,d,c,m,v,g,S,E]);const O=e==null&&y==null,D=!O&&y==null,P=y!=null?`${y}`:null;return F.jsxs(F.Fragment,{children:[D&&F.jsx(KH,{}),F.jsx(id,{isLoading:O&&P==null,isLoaded:D,errorMessage:P})]})}Ac.propTypes={workspace:q.shape({}),workspaceStorage:q.shape({close:q.func}),setActiveTool:q.func.isRequired,setApi:q.func.isRequired,setCommandHistoryStorage:q.func.isRequired,setDashboardData:q.func.isRequired,setFileStorage:q.func.isRequired,setLayoutStorage:q.func.isRequired,setDashboardConnection:q.func.isRequired,setDashboardSessionWrapper:q.func.isRequired,setPlugins:q.func.isRequired,setUser:q.func.isRequired,setWorkspace:q.func.isRequired,setWorkspaceStorage:q.func.isRequired};Ac.defaultProps={workspace:null,workspaceStorage:null};const ZH=n=>({workspace:Sd(n),workspaceStorage:lT(n)}),Nf=$t(ZH,{setActiveTool:yd,setApi:fT,setCommandHistoryStorage:CT,setDashboardData:lC,setFileStorage:bT,setLayoutStorage:sH,setDashboardConnection:i1,setDashboardSessionWrapper:a1,setPlugins:wT,setUser:gT,setWorkspace:kp,setWorkspaceStorage:pT,setServerConfigValues:ET})(Ac),JH=document.location.pathname;function eU(){return F.jsx(SS,{basename:JH,children:F.jsxs(wS,{children:[F.jsx(Jc,{exact:!0,path:"/",component:Nf}),F.jsx(Jc,{path:"/notebooks/:notebookPath+",component:Nf}),F.jsx(ES,{from:"*",to:"/"})]})})}function lU(){return vs.registerOnLoaded(),Cr.init({getWorker:()=>new PS}),window["__react-beautiful-dnd-disable-dev-warnings"]=!0,F.jsx(yS,{store:Kh,children:F.jsx(eU,{})})}export{lU as AppRoot,lU as default};
|
|
42
|
-
//# sourceMappingURL=AppRoot-
|
|
42
|
+
//# sourceMappingURL=AppRoot-95b6080d.js.map
|