@deephaven/embed-widget 0.87.1-beta.0 → 0.87.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.
Files changed (25) hide show
  1. package/build/assets/{App-f6d8adbe.js → App-7e13dab0.js} +2 -2
  2. package/build/assets/{App-f6d8adbe.js.map → App-7e13dab0.js.map} +1 -1
  3. package/build/assets/{Chart-b79f1302.js → Chart-203ccf90.js} +2 -2
  4. package/build/assets/{Chart-b79f1302.js.map → Chart-203ccf90.js.map} +1 -1
  5. package/build/assets/{IrisGrid-d451ea4e.js → IrisGrid-ca93eeb0.js} +2 -2
  6. package/build/assets/{IrisGrid-d451ea4e.js.map → IrisGrid-ca93eeb0.js.map} +1 -1
  7. package/build/assets/{IrisGridThemeProvider-f77276b6.js → IrisGridThemeProvider-6cca4e5e.js} +2 -2
  8. package/build/assets/{IrisGridThemeProvider-f77276b6.js.map → IrisGridThemeProvider-6cca4e5e.js.map} +1 -1
  9. package/build/assets/{LocalWorkspaceStorage-6350906a.js → LocalWorkspaceStorage-fa1ead89.js} +2 -2
  10. package/build/assets/{LocalWorkspaceStorage-6350906a.js.map → LocalWorkspaceStorage-fa1ead89.js.map} +1 -1
  11. package/build/assets/{LogPanel-ba514f9e.js → LogPanel-f8b9e855.js} +2 -2
  12. package/build/assets/{LogPanel-ba514f9e.js.map → LogPanel-f8b9e855.js.map} +1 -1
  13. package/build/assets/{MarkdownEditor-84082269.js → MarkdownEditor-a20419b7.js} +2 -2
  14. package/build/assets/{MarkdownEditor-84082269.js.map → MarkdownEditor-a20419b7.js.map} +1 -1
  15. package/build/assets/{MarkdownNotebook-7da664e0.js → MarkdownNotebook-441a19d3.js} +2 -2
  16. package/build/assets/{MarkdownNotebook-7da664e0.js.map → MarkdownNotebook-441a19d3.js.map} +1 -1
  17. package/build/assets/{index-b9c29e9d.js → index-2bf60370.js} +7 -7
  18. package/build/assets/index-2bf60370.js.map +1 -0
  19. package/build/assets/{index-5319216f.js → index-a71fabf8.js} +2 -2
  20. package/build/assets/{index-5319216f.js.map → index-a71fabf8.js.map} +1 -1
  21. package/build/assets/{index-1bea624d.js → index-aa1c8197.js} +2 -2
  22. package/build/assets/{index-1bea624d.js.map → index-aa1c8197.js.map} +1 -1
  23. package/build/index.html +1 -1
  24. package/package.json +17 -17
  25. package/build/assets/index-b9c29e9d.js.map +0 -1
@@ -1,4 +1,4 @@
1
- import{r as u,K as je,D as c,$ as En,L as It,F as R,H as W,M as Tn,N as jn,O as Zi,P as _n,Q as Qi,S as eo,T as In,U as $t,V as He,G as J,W as $n,X as Dn,Y as Dt,Z as Nn,a0 as An,a1 as ot,a2 as to,a3 as xe,a4 as L,a5 as kn,E as Rn,a6 as Mn,a7 as ro,a8 as no,a9 as ao,aa as Ln,ab as io,ac as oo,ad as so,ae as lo,af as uo,ag as co,ah as fo,ai as po,aj as vo,ak as ho,al as mo,am as go,an as bo,ao as yo,ap as Oo,aq as Po,ar as So,as as wo,at as xo,au as Co,av as Eo,aw as To,ax as jo,ay as _o,az as Io,aA as $o,aB as Do,aC as No,aD as Ao,aE as ko,aF as Ro,aG as Mo,aH as Lo,aI as Fo,aJ as Vo,aK as Uo,aL as Ko,aM as Bo,aN as Ho,aO as Wo,aP as Go,aQ as zo,aR as Yo,aS as qo,aT as ye,I as Xo,J as Jo,R as Zo,aU as Qo,aV as es,aW as ts,aX as rs,aY as ns,aZ as Fn,a_ as as,a$ as is}from"./vendor-2024ba0c.js";import{i as Vn,v as Un,M as Kn,b as Bn,L as K,c as os,d as ss,e as ls,f as us,g as cs,h as Hn,j as ds,k as fs,r as Wn,l as Nt,m as ps,T as st,C as vs,D as hs,n as ms,o as gs,p as bs,a as ce,q as At,s as ys,N as Os,S as Ps,t as Ss,u as ws,W as xs,w as Cs,x as Es,y as Ts,z as js,A as _s,B as Is,E as $s,F as Ds,G as Ns,H as As,I as ks,J as Rs,K as Ms,O as Ls,P as Fs,Q as Vs,R as We,U as Us,V as Ks,X as Bs}from"./index-5319216f.js";import{k as Hs,l as Ws,m as Gs,n as zs,o as Ys,p as qs,q as Xs,r as Ge,t as kt,T as ze,P as Rt,v as Me,D as Gn,R as ur,I as lt,B as re,C as ut,w as zn,x as Yn,y as Js,z as Zs,A as Qs,F as el,b as tl,G as rl,H as nl,K as al,M as il,J as ol,L as qn,N as Xn,S as sl,c as ll,O as ul,Q as cl,U as Jn,V as dl,W as Zn,X as fl,Y as pl,Z as Qn,_ as vl,$ as ea,g as hl,a0 as ml,a1 as gl,a2 as bl,a3 as ta,u as de,a4 as yl,a5 as Ol,a6 as Pl,a7 as Sl,a8 as wl,a9 as xl,aa as we,E as Cl,ab as ra,ac as na,ad as aa,ae as Ye,af as El,ag as ia,ah as oa,ai as Tl,aj as ct,ak as jl,al as sa,am as _l,an as dt,ao as Il,ap as $l,aq as Dl,ar as la,as as ua,at as Nl,au as ca,av as Al,aw as kl,ax as da,ay as fa,az as pa,aA as va,j as ha,aB as Rl,aC as Ml,aD as Ll,aE as Fl,aF as Vl,aG as Ul,aH as Kl,aI as Bl,aJ as Hl,e as Wl,a as Gl,aK as zl,aL as Yl,aM as ql,aN as Xl,aO as Jl,aP as Zl,aQ as Ql,aR as eu,aS as tu,aT as ru,aU as ma,aV as nu,aW as au,aX as iu,aY as ou,aZ as ue,a_ as su,a$ as lu}from"./LogPanel-ba514f9e.js";import{e as qe,C as uu,g as ga,h as cu,a as Oe,F as du,f as fu,i as pu,d as vu,j as Ce,U as Xe,k as ba,m as ya,D as cr,n as hu,o as mu,p as gu,l as bu,s as yu,q as Ou,c as Pu,S as Su}from"./LocalWorkspaceStorage-6350906a.js";import{A as Rg,w as Mg,x as Lg,G as Fg,L as Vg,r as Ug,B as Kg,z as Bg,v as Hg,t as Wg,y as Gg,u as zg,b as Yg}from"./LocalWorkspaceStorage-6350906a.js";import{u as wu,C as Oa,F as Mt,a as xu,S as Cu,X as Eu,b as Tu,c as ju,d as _u,B as Iu,e as $u,D as Du,f as Nu,g as Lt,h as ft,I as Au,i as ku,T as Ru,j as Mu,k as Ft,l as Lu,m as Fu,n as Pa,o as Sa,p as Vu,q as wa,r as Vt,s as xa,t as Ca,v as Uu,w as Ku,x as Bu,y as Hu,z as Wu,A as Ea,E as Gu,G as zu,H as Yu,J as Ta,K as ja,L as qu,M as Xu,N as Ju,O as Zu,P as _a,Q as Qu,R as ec,U as tc,V as dr,W as rc,Y as nc,Z as ac,_ as ic,$ as oc,a0 as sc,a1 as lc,a2 as uc,a3 as cc,a4 as dc,a5 as fc,a6 as pc,a7 as vc,a8 as hc,a9 as mc,aa as gc,ab as bc,ac as yc}from"./index-b9c29e9d.js";import{D as Oc}from"./DownsamplingError-8e6bdb73.js";import{e as Ve,c as Pc,d as Sc,a as wc,f as xc,b as Cc,g as Ec,h as Tc,i as jc,j as _c,u as Ic,k as Ue,l as $c,m as Dc,n as Ee,o as Nc,p as Le,q as pt,r as Ia,s as Ac,t as $a,v as Ut,w as Kt,x as Da,y as Na,z as q,T as Bt,A as Ht,B as Wt,M as Gt,D as Aa,C as kc,E as vt,F as Rc,G as Mc,H as Lc,I as Fc,J as Vc,K as Uc,L as Kc,N as Bc,O as Hc,P as ka,Q as Wc,R as Gc,S as zc,U as Yc,V as Ra,W as qc,X as Xc,Y as Jc,Z as Zc,_ as Qc,$ as Ma,a0 as ed,a1 as td,a2 as rd,a3 as nd,a4 as ad,a5 as id,a6 as od,a7 as sd,a8 as ld,a9 as ud,aa as cd,ab as dd,ac as fd,ad as pd,ae as vd,af as La,ag as hd,ah as md,ai as gd,aj as bd,ak as yd,al as Fe,am as Od,an as Fa,ao as Pd,ap as zt,aq as le,ar as fr,as as Va,at as Ua,au as Sd,av as wd,aw as xd,ax as Cd,ay as Ed,az as Td,aA as jd,aB as _d,aC as Id,aD as $d,aE as Dd,aF as Nd,aG as Ad,aH as kd,aI as Rd,aJ as Md,aK as Ld,aL as Fd,aM as Vd,aN as Ud,aO as Kd,aP as Bd,aQ as Hd,aR as Wd,aS as Gd,aT as zd,aU as Yd,aV as qd,aW as Xd,aX as Jd,aY as Zd,aZ as Ka,a_ as Qd,a$ as ef,b0 as tf,b1 as rf,b2 as nf,b3 as af,b4 as of,b5 as sf,b6 as lf,b7 as uf,b8 as cf,b9 as df}from"./IrisGridThemeProvider-f77276b6.js";import"./helpers-de833af9.js";function ff(t,e){return t===0?0:e==="all"||t===e.size?"all":e.size}function Ba(t,e){return t===e?!0:t==="all"||e==="all"||t.size!==e.size?!1:[...t.keys()].every(r=>e.has(r))}function Ha(t,e){return t.isInverted===e.isInverted&&Ba(t.selection,e.selection)}function Wa(t,e,r){if(t==="all")return"all";var n=[...t.keys()];return new Set(n.map(a=>r(e(a))))}function Ga(t,e,r){var n=t==="all"||t.size>e/2,a=t;return n&&(a=t==="all"?new Set:new Set([...Hs(0,e-1)].map(r).filter(i=>!t.has(i)))),{selection:a,isInverted:n}}function pf(t,e){return u.useCallback(function(){var r=t(...arguments);return e(),r},[e,t])}function Yt(t,e){return u.useCallback(r=>{typeof t=="function"?t(e(r)):t.current=e(r)},[e,t])}function za(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vn,[e,r]=u.useState(0),[n,a]=u.useState(0),[i,o]=u.useState(0),[s,l]=u.useState(0),d=u.useMemo(()=>new DOMRect(e,n,i,s),[s,i,e,n]),[p,f]=u.useState(null),v=Yt(f,t),h=u.useCallback(g=>{var w,[m]=g,y=(w=m==null?void 0:m.contentRect)!==null&&w!==void 0?w:{x:0,y:0,width:0,height:0};r(y.x),a(y.y),o(y.width),l(y.height)},[]);return qe(p,h),{ref:v,contentRect:d}}function vf(t){var[e,r]=u.useState(!0);return u.useEffect(()=>{var n=setTimeout(()=>{r(!1)},t);return()=>{clearTimeout(n)}},[t]),e}function hf(t){var[e,r]=u.useState(t);return u.useEffect(()=>{r(t)},[t]),[e,r]}function mf(t,e,r,n){var a=u.useRef(0);u.useEffect(()=>{a.current>=r||n&&(a.current+=1,t())},[r,n,...e])}function Ya(t,e){var r=u.useRef(t),n=e(r.current,t)?r.current:t;return r.current=n,n}function gf(t){t.preventDefault()}function qa(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=u.useMemo(()=>"useSubmitButtonRef-".concat(je()),[]),r=u.useCallback(i=>{i==null||i.UNSAFE_getDOMNode().setAttribute("form",e)},[e]),n=u.useMemo(()=>({id:e,onSubmit:t?void 0:gf}),[e,t]),a=u.useMemo(()=>({form:e,ref:r}),[e,r]);return{formProps:n,submitButtonProps:a}}function Xa(t,e,r){var{getItem:n,selectedKeys:a,items:i}=t;return u.useMemo(()=>{var{selection:o,isInverted:s}=Ga(a,i.length,r);return{selection:Wa(o,n,e),isInverted:s}},[a,i.length,r,n,e])}function Ja(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vn,r=u.useRef();return u.useEffect(()=>()=>{var n;return(n=r.current)===null||n===void 0?void 0:n.call(r)},[]),u.useCallback(n=>{var a;(a=r.current)===null||a===void 0||a.call(r);var i=e(n);i&&(i.addEventListener("scroll",t),r.current=()=>{i.removeEventListener("scroll",t),r.current=void 0})},[e,t])}function pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function vr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pr(Object(r),!0).forEach(function(n){bf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bf(t,e,r){return e=yf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yf(t){var e=Of(t,"string");return typeof e=="symbol"?e:String(e)}function Of(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pf(t,e,r,n){var a=arguments.length===4;return u.useCallback(i=>{var o=a?i??n:i;r(vr(vr({},t),{},{[e]:o}))},[r,t,e,a,n])}function _e(t,e){var[r,n]=u.useState(!0),[a,i]=u.useState(t),[o,s]=u.useState(t),[l,d]=u.useState(e);return(t!==o||e!==l)&&(n(!0),s(t),d(e)),u.useEffect(()=>{var p=!1,f=setTimeout(()=>{p||(n(!1),i(t))},e);return()=>{p=!0,clearTimeout(f)}},[t,e]),{isDebouncing:r,value:a}}function Za(t,e){return u.useCallback(r=>{if(r!=null){var n=e==null?[r]:r.querySelectorAll(e);n.forEach(a=>{Object.entries(t).forEach(i=>{var[o,s]=i;a.setAttribute(o,s)})})}},[t,e])}var Qa={spellCheck:!1};function Sf(t){var e=Za(Qa,t);return Yt(e,Ve)}const wf=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:Qa,createValidationProps:Pc,defaultGetKey:Sc,extractSpectrumHTMLElement:Ve,extractSpectrumLastChildHTMLElement:wc,findSpectrumComboBoxScrollArea:xc,findSpectrumPickerScrollArea:Cc,findSpectrumPopoverScrollArea:Ec,getPositionOfSelectedItem:Tc,getSelectedItemCountOrAll:ff,identityExtractHTMLElement:jc,isElementOfType:_c,isSelectionEqual:Ba,isSelectionMaybeInvertedEqual:Ha,mapSelection:Wa,optimizeSelection:Ga,useAsyncInterval:Ws,useCallbackWithAction:pf,useCheckOverflow:Ic,useContentRect:za,useContextOrThrow:Gs,useCopyToClipboard:wu,useDebouncedCallback:Ue,useDebouncedValue:_e,useDelay:vf,useDependentState:hf,useEffectNTimesWhen:mf,useFormWithDetachedSubmitButton:qa,useForwardedRef:zs,useIsEqualMemo:Ya,useIsMountedRef:Ys,useMappedRef:Yt,useMappedSelection:Xa,useOnScrollOffsetChangeCallback:$c,useOnScrollRef:Ja,usePopoverOnScrollRef:Dc,usePrevious:qs,usePromiseFactory:Ee,usePropChangeCallback:Pf,useResizeObserver:qe,useSetAttributesCallback:Za,useSpectrumDisableSpellcheckRef:Sf,useThrottledCallback:Xs,useWindowedListData:Nc},Symbol.toStringTag,{value:"Module"}));var xf=["aria-label","aria-labelledby","aria-describedby","aria-details","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden"];function Cf(t,e){if(t==null)return{};var r=Ef(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ef(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function ei(t){var{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a,marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:v,flex:h,flexGrow:g,flexShrink:w,flexBasis:m,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:I,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:$,end:M,left:U,right:H,isHidden:G}=t,C=Cf(t,xf);return{ariaLabelProps:{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a},styleProps:{marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:v,flex:h,flexGrow:g,flexShrink:w,flexBasis:m,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:I,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:$,end:M,left:U,right:H,isHidden:G},componentProps:C}}function ti(t){var{normalizedItems:e,defaultSelectedKeys:r,disabledKeys:n,selectedKeys:a,onChange:i}=t,o=u.useMemo(()=>Le(a),[a]),s=u.useMemo(()=>Le(r),[r]),l=u.useMemo(()=>Le(n),[n]),d=u.useCallback(p=>{if(i!=null){if(p==="all"){i("all");return}var f=new Set;e.forEach(v=>{p.has(String(pt(v)))&&f.add(pt(v))}),i(f)}},[e,i]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:d}}function Tf(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:r}=Ge(),n=u.useCallback(a=>{e(a)},[e]);return c.jsx(En,{label:"Pick a color scheme",items:r,selectedKey:t,onSelectionChange:n,children:a=>c.jsx(It,{children:a.name},a.themeKey)})}function jf(t){var{className:e,style:r}=t;return c.jsx("div",{className:R("dh-logo",e),style:r})}var _f=["UNSAFE_className"],If=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function mr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hr(Object(r),!0).forEach(function(n){$f(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $f(t,e,r){return e=Df(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Df(t){var e=Nf(t,"string");return typeof e=="symbol"?e:String(e)}function Nf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gr(t,e){if(t==null)return{};var r=Af(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Af(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var ri=W.forwardRef(function(e,r){var{UNSAFE_className:n}=e,a=gr(e,_f),i=Ia(a),{defaultSelectedKey:o,disabledKeys:s,selectedKey:l,ref:d}=i,p=gr(i,If),f=Ac(r,d);return c.jsx(En,mr(mr({},p),{},{ref:f,UNSAFE_className:R("dh-picker",n),defaultSelectedKey:o,disabledKeys:s,selectedKey:l}))});ri.displayName="Picker";var kf=["UNSAFE_className"],Rf=["forceRerenderKey","ref"];function br(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function yr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?br(Object(r),!0).forEach(function(n){Mf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mf(t,e,r){return e=Lf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lf(t){var e=Ff(t,"string");return typeof e=="symbol"?e:String(e)}function Ff(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Or(t,e){if(t==null)return{};var r=Vf(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Vf(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function ni(t){var{UNSAFE_className:e}=t,r=Or(t,kf),n=$a(r),{forceRerenderKey:a,ref:i}=n,o=Or(n,Rf);return u.createElement(Tn,yr(yr({},o),{},{key:a,ref:i,UNSAFE_className:R("dh-combobox","dh-combobox-normalized",e)}))}var Uf=["onScroll"];function Pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pr(Object(r),!0).forEach(function(n){Kf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Kf(t,e,r){return e=Bf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bf(t){var e=Hf(t,"string");return typeof e=="symbol"?e:String(e)}function Hf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wf(t,e){if(t==null)return{};var r=Gf(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Gf(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function qt(t){var e,r,{ariaLabelProps:n,componentProps:a,styleProps:i}=ei(t),{onScroll:o=kt}=a,s=Wf(a,Uf),{scale:l}=Ut(),d=Ja(o,Ve),{ref:p,contentRect:f}=za(Ve);return c.jsx(jn,Ie(Ie({direction:"column",ref:p},i),{},{minHeight:(e=i.minHeight)!==null&&e!==void 0?e:1,UNSAFE_className:R("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((r=s.density)!==null&&r!==void 0?r:"regular"),"dh-list-view-wrapper-scale-".concat(l),i.UNSAFE_className),children:f.height===0?null:c.jsx(Zi,Ie(Ie({ref:d},n),s))}))}var zf=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Sr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sr(Object(r),!0).forEach(function(n){Yf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Yf(t,e,r){return e=qf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qf(t){var e=Xf(t,"string");return typeof e=="symbol"?e:String(e)}function Xf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jf(t,e){if(t==null)return{};var r=Zf(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Zf(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Qf(t){var{children:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,UNSAFE_className:o,onChange:s,onScroll:l=kt,onSelectionChange:d}=t,p=Jf(t,zf),f=u.useMemo(()=>Kt(r,"bottom"),[r]),v=u.useMemo(()=>Da(e,f),[e,f]);return c.jsx(qt,wr(wr({},p),{},{UNSAFE_className:R("dh-list-view",o),selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onScroll:l,onSelectionChange:s??d,children:v}))}var ep=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function xr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Cr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xr(Object(r),!0).forEach(function(n){tp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tp(t,e,r){return e=rp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rp(t){var e=np(t,"string");return typeof e=="symbol"?e:String(e)}function np(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ap(t,e){if(t==null)return{};var r=ip(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ip(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function ai(t){var{normalizedItems:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,showItemIcons:o,actions:s,UNSAFE_className:l,onChange:d,onSelectionChange:p}=t,f=ap(t,ep),v=u.useMemo(()=>Kt(r,"bottom"),[r]),h=Na({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:o,tooltipOptions:v,actions:s}),g="".concat(o,"-").concat(v==null?void 0:v.placement),{selectedStringKeys:w,defaultSelectedStringKeys:m,disabledStringKeys:y,onStringSelectionChange:O}=ti({normalizedItems:e,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onChange:d??p});return u.createElement(qt,Cr(Cr({},f),{},{UNSAFE_className:R("dh-list-view-normalized",l),key:g,items:e,selectedKeys:w,defaultSelectedKeys:m,disabledKeys:y,onSelectionChange:O}),h)}var op=["color","UNSAFE_style"];function Er(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Er(Object(r),!0).forEach(function(n){sp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Er(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sp(t,e,r){return e=lp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lp(t){var e=up(t,"string");return typeof e=="symbol"?e:String(e)}function up(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cp(t,e){if(t==null)return{};var r=dp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function dp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var Xt=u.forwardRef((t,e)=>{var{color:r,UNSAFE_style:n}=t,a=cp(t,op),i=u.useMemo(()=>$e($e({},n),{},{color:q(r)}),[r,n]);return c.jsx(_n,$e($e({},a),{},{ref:e,UNSAFE_style:i}))});Xt.displayName="Heading";var fp=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Tr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tr(Object(r),!0).forEach(function(n){pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function pp(t,e,r){return e=vp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vp(t){var e=hp(t,"string");return typeof e=="symbol"?e:String(e)}function hp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mp(t,e){if(t==null)return{};var r=gp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function gp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var ii=u.forwardRef((t,e)=>{var{backgroundColor:r,borderColor:n,borderStartColor:a,borderEndColor:i,borderTopColor:o,borderBottomColor:s,borderXColor:l,borderYColor:d,UNSAFE_style:p}=t,f=mp(t,fp),{direction:v}=Qi(),h=u.useMemo(()=>{var g={};return n!==void 0&&(g.borderColor=q(n)),l!==void 0&&(g.borderLeftColor=q(l),g.borderRightColor=q(l)),d!==void 0&&(g.borderTopColor=q(d),g.borderBottomColor=q(d)),a!==void 0&&(g[v==="rtl"?"borderRightColor":"borderLeftColor"]=q(a)),i!==void 0&&(g[v==="rtl"?"borderLeftColor":"borderRightColor"]=q(i)),o!==void 0&&(g.borderTopColor=q(o)),s!==void 0&&(g.borderBottomColor=q(s)),De(De({},p),{},{backgroundColor:q(r)},g)},[r,p,n,a,i,o,s,l,d,v]);return c.jsx(eo,De(De({},f),{},{ref:e,UNSAFE_style:h}))});ii.displayName="View";var bp=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(r),!0).forEach(function(n){yp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yp(t,e,r){return e=Op(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Op(t){var e=Pp(t,"string");return typeof e=="symbol"?e:String(e)}function Pp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Sp(t,e){if(t==null)return{};var r=wp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function wp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function oi(t){var{ariaLabel:e,icon:r,isQuiet:n,labelText:a,children:i,onOpenChange:o,tooltip:s}=t,l=Sp(t,bp),d=a==null&&s!=null?"action-button-icon-with-tooltip":void 0;return c.jsxs(In,{type:"popover",onOpenChange:o,children:[c.jsxs($t,_r(_r({},l),{},{"aria-label":e??a,isQuiet:n,children:[c.jsx(He,{UNSAFE_className:d,children:c.jsx(J,{icon:r})}),a==null?null:c.jsx(Bt,{children:a}),s==null?null:c.jsx(ze,{children:s})]})),i]})}function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(n){xp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xp(t,e,r){return e=Cp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cp(t){var e=Ep(t,"string");return typeof e=="symbol"?e:String(e)}function Ep(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function si(t){var{heading:e,confirmationButtonLabel:r,children:n,onCancel:a,onConfirm:i}=t,{formProps:o,submitButtonProps:s}=qa();return c.jsxs($n,{children:[c.jsx(Xt,{level:3,UNSAFE_className:Ht.spectrumDialogComponentHeading,children:e}),c.jsx(Dn,{}),c.jsx(Dt,{children:c.jsx(Nn,Ne(Ne({},o),{},{children:n}))}),c.jsxs(An,{children:[c.jsx(ot,{variant:"secondary",onPress:a,children:"Cancel"}),c.jsx(ot,Ne(Ne({},s),{},{style:"fill",variant:"negative",onPress:i,type:"submit",children:r}))]})]})}function Tp(t){var{ariaLabel:e,heading:r,confirmationButtonLabel:n,isHidden:a,children:i,tooltip:o,onConfirm:s}=t,l=u.useCallback(d=>c.jsx(si,{heading:r,confirmationButtonLabel:n,onCancel:d,onConfirm:()=>{d(),s()},children:i}),[i,n,r,s]);return c.jsx(oi,{ariaLabel:e,icon:Un,isHidden:a,isQuiet:!0,height:Wt,tooltip:o,children:l})}var jp=["icon","label","tooltip"];function $r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$r(Object(r),!0).forEach(function(n){_p(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _p(t,e,r){return e=Ip(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ip(t){var e=$p(t,"string");return typeof e=="symbol"?e:String(e)}function $p(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dp(t,e){if(t==null)return{};var r=Np(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Np(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function li(t){var{icon:e,label:r,tooltip:n}=t,a=Dp(t,jp);return c.jsxs($t,Dr(Dr({},a),{},{"aria-label":r,isQuiet:!0,height:Wt,children:[c.jsx(He,{UNSAFE_className:n==null?void 0:"action-button-icon-with-tooltip",children:c.jsx(J,{icon:e})}),n==null?null:c.jsx(ze,{children:n})]}))}li.displayName="IconActionButton";function Nr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ap(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nr(Object(r),!0).forEach(function(n){te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function te(t,e,r){return e=kp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kp(t){var e=Rp(t,"string");return typeof e=="symbol"?e:String(e)}function Rp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Mp=100,ht;(function(t){t.UP="UP",t.DOWN="DOWN"})(ht||(ht={}));class X extends u.Component{constructor(e){super(e),te(this,"popper",void 0),te(this,"cbContainer",void 0),te(this,"menuContainer",void 0),te(this,"input",void 0),te(this,"getCachedFilteredOptions",to((n,a)=>n.filter(i=>i.title.toLowerCase().indexOf(a.toLowerCase())>=0)));var{popperOptions:r}=this.props;r=Ap({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},r),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:r},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=xe(this.updateInputValue,Mp),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=W.createRef(),this.cbContainer=W.createRef(),this.menuContainer=W.createRef(),this.input=W.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(e){if(!e)return this.setState({invalid:!1}),{value:e,isValid:!1};var{options:r}=this.props,n=r.filter(a=>a.title.toLowerCase()===e.toLowerCase());return n.length<1?(this.setState({invalid:!0}),{value:e,isValid:!1}):(this.setState({invalid:!1}),{value:n[0].value,isValid:!0})}updateInputValue(e){var{menuIsOpen:r}=this.state,{value:n,isValid:a}=this.getValueAndValidate(e);r&&this.processFilterChange(e),this.fireOnChange(n,a)}fireOnChange(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,{onChange:n}=this.props;n(e,r)}processFilterChange(e){var r,{options:n}=this.props,{menuIsOpen:a}=this.state,i=e?this.getCachedFilteredOptions(n,e):n,o=i.length===1&&i[0].title===e;if(this.setState({filteredOptions:i,keyboardOptionIndex:0}),o&&a){this.closeMenu();return}(r=this.popper.current)===null||r===void 0||r.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var r,{filteredOptions:n,keyboardOptionIndex:a}=this.state,i=n[a];switch(e.key){case"Enter":case"ArrowRight":e.stopPropagation(),e.preventDefault(),i!=null&&(this.setState({title:i.title,invalid:!1}),this.fireOnChange(i.value)),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(e.stopPropagation(),e.preventDefault(),e.shiftKey){this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":e.preventDefault(),e.stopPropagation(),this.closeMenu();break}}navigateMenu(e){var{filteredOptions:r,keyboardOptionIndex:n}=this.state,a=n;e===X.MENU_NAVIGATION_DIRECTION.UP?n>0?(a=(a-1)%r.length,this.setState({keyboardOptionIndex:a})):n===0&&(a=r.length-1,this.setState({keyboardOptionIndex:a})):e===X.MENU_NAVIGATION_DIRECTION.DOWN&&n<r.length&&(a=(a+1)%r.length,this.setState({keyboardOptionIndex:a})),this.scrollOptionIntoView(a)}handleInputKeyDown(e){var{onEnter:r}=this.props,{menuIsOpen:n}=this.state;n?this.handleMenuKeyDown(e):e.key==="Enter"?r():e.key==="Escape"?(this.resetValue(),e.preventDefault(),e.stopPropagation()):e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Tab"||e.key==="Shift"||this.openMenu()}handleInputChange(e){this.setState({title:e.target.value}),this.updateInputValue(e.target.value)}handleOptionClick(e){var r;this.setState({title:e.title,invalid:!1}),this.fireOnChange(e.value),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus()}handelInputFocus(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputClick(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputBlur(e){var{menuIsOpen:r}=this.state;r&&e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(e){e.relatedTarget===this.input.current||e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;(e=this.input.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var{title:e}=this.state;this.processFilterChange(e),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var r;(r=this.popper.current)===null||r===void 0||r.show()})}closeMenu(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),r){var n;(n=this.input.current)===null||n===void 0||n.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}scrollOptionIntoView(e){if(this.menuContainer.current){var r;(r=this.menuContainer.current.children.item(e))===null||r===void 0||r.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:R("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:e},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var{noMatchText:e}=this.props,{title:r,filteredOptions:n}=this.state;return r&&n.length===0?c.jsx("div",{className:"no-match",children:e}):n.map((a,i)=>this.renderOption(a,i))}renderOption(e,r){var{keyboardOptionIndex:n}=this.state,a="option-".concat(r,"-").concat(e.value);return c.jsx("button",{type:"button",className:R("aci-option-btn",{"keyboard-active":n===r}),onClick:()=>this.handleOptionClick(e),onFocus:()=>this.setState({keyboardOptionIndex:r}),children:e.title},a)}render(){var{options:e,inputPlaceholder:r,disabled:n,className:a,defaultTitle:i,spellCheck:o,"data-testid":s}=this.props,{title:l,menuIsOpen:d,popperOptions:p,invalid:f}=this.state;return c.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[c.jsx("input",{value:l||i,className:R("form-control",a,"aci-input",{"is-invalid":f&&!d}),ref:this.input,onChange:this.handleInputChange,placeholder:r||e[0].title,disabled:n,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":s}),c.jsx(Rt,{ref:this.popper,options:p,className:R("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}te(X,"propTypes",{options:L.arrayOf(L.shape({title:L.string.isRequired,value:L.string.isRequired})).isRequired,popperOptions:L.shape({}),onChange:L.func,inputPlaceholder:L.string,disabled:L.bool,className:L.string,defaultTitle:L.string,spellCheck:L.bool,onEnter:L.func,noMatchText:L.string,"data-testid":L.string});te(X,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});te(X,"MENU_NAVIGATION_DIRECTION",ht);const Lp=X;function Jt(t){var{className:e="",value:r,onChange:n,spellCheck:a=!1,placeholder:i="",disabled:o=!1,delimiter:s="",id:l="","data-testid":d}=t,[p,f]=u.useState(r),[v,h]=u.useState(!1),g=u.useRef(null);u.useEffect(function(){f(r)},[r]);function w(I){return I.trim().split(s).filter(_=>_).join(`
1
+ import{r as u,K as je,D as c,$ as En,L as It,F as R,H as W,M as Tn,N as jn,O as Zi,P as _n,Q as Qi,S as eo,T as In,U as $t,V as He,G as J,W as $n,X as Dn,Y as Dt,Z as Nn,a0 as An,a1 as ot,a2 as to,a3 as xe,a4 as L,a5 as kn,E as Rn,a6 as Mn,a7 as ro,a8 as no,a9 as ao,aa as Ln,ab as io,ac as oo,ad as so,ae as lo,af as uo,ag as co,ah as fo,ai as po,aj as vo,ak as ho,al as mo,am as go,an as bo,ao as yo,ap as Oo,aq as Po,ar as So,as as wo,at as xo,au as Co,av as Eo,aw as To,ax as jo,ay as _o,az as Io,aA as $o,aB as Do,aC as No,aD as Ao,aE as ko,aF as Ro,aG as Mo,aH as Lo,aI as Fo,aJ as Vo,aK as Uo,aL as Ko,aM as Bo,aN as Ho,aO as Wo,aP as Go,aQ as zo,aR as Yo,aS as qo,aT as ye,I as Xo,J as Jo,R as Zo,aU as Qo,aV as es,aW as ts,aX as rs,aY as ns,aZ as Fn,a_ as as,a$ as is}from"./vendor-2024ba0c.js";import{i as Vn,v as Un,M as Kn,b as Bn,L as K,c as os,d as ss,e as ls,f as us,g as cs,h as Hn,j as ds,k as fs,r as Wn,l as Nt,m as ps,T as st,C as vs,D as hs,n as ms,o as gs,p as bs,a as ce,q as At,s as ys,N as Os,S as Ps,t as Ss,u as ws,W as xs,w as Cs,x as Es,y as Ts,z as js,A as _s,B as Is,E as $s,F as Ds,G as Ns,H as As,I as ks,J as Rs,K as Ms,O as Ls,P as Fs,Q as Vs,R as We,U as Us,V as Ks,X as Bs}from"./index-a71fabf8.js";import{k as Hs,l as Ws,m as Gs,n as zs,o as Ys,p as qs,q as Xs,r as Ge,t as kt,T as ze,P as Rt,v as Me,D as Gn,R as ur,I as lt,B as re,C as ut,w as zn,x as Yn,y as Js,z as Zs,A as Qs,F as el,b as tl,G as rl,H as nl,K as al,M as il,J as ol,L as qn,N as Xn,S as sl,c as ll,O as ul,Q as cl,U as Jn,V as dl,W as Zn,X as fl,Y as pl,Z as Qn,_ as vl,$ as ea,g as hl,a0 as ml,a1 as gl,a2 as bl,a3 as ta,u as de,a4 as yl,a5 as Ol,a6 as Pl,a7 as Sl,a8 as wl,a9 as xl,aa as we,E as Cl,ab as ra,ac as na,ad as aa,ae as Ye,af as El,ag as ia,ah as oa,ai as Tl,aj as ct,ak as jl,al as sa,am as _l,an as dt,ao as Il,ap as $l,aq as Dl,ar as la,as as ua,at as Nl,au as ca,av as Al,aw as kl,ax as da,ay as fa,az as pa,aA as va,j as ha,aB as Rl,aC as Ml,aD as Ll,aE as Fl,aF as Vl,aG as Ul,aH as Kl,aI as Bl,aJ as Hl,e as Wl,a as Gl,aK as zl,aL as Yl,aM as ql,aN as Xl,aO as Jl,aP as Zl,aQ as Ql,aR as eu,aS as tu,aT as ru,aU as ma,aV as nu,aW as au,aX as iu,aY as ou,aZ as ue,a_ as su,a$ as lu}from"./LogPanel-f8b9e855.js";import{e as qe,C as uu,g as ga,h as cu,a as Oe,F as du,f as fu,i as pu,d as vu,j as Ce,U as Xe,k as ba,m as ya,D as cr,n as hu,o as mu,p as gu,l as bu,s as yu,q as Ou,c as Pu,S as Su}from"./LocalWorkspaceStorage-fa1ead89.js";import{A as Rg,w as Mg,x as Lg,G as Fg,L as Vg,r as Ug,B as Kg,z as Bg,v as Hg,t as Wg,y as Gg,u as zg,b as Yg}from"./LocalWorkspaceStorage-fa1ead89.js";import{u as wu,C as Oa,F as Mt,a as xu,S as Cu,X as Eu,b as Tu,c as ju,d as _u,B as Iu,e as $u,D as Du,f as Nu,g as Lt,h as ft,I as Au,i as ku,T as Ru,j as Mu,k as Ft,l as Lu,m as Fu,n as Pa,o as Sa,p as Vu,q as wa,r as Vt,s as xa,t as Ca,v as Uu,w as Ku,x as Bu,y as Hu,z as Wu,A as Ea,E as Gu,G as zu,H as Yu,J as Ta,K as ja,L as qu,M as Xu,N as Ju,O as Zu,P as _a,Q as Qu,R as ec,U as tc,V as dr,W as rc,Y as nc,Z as ac,_ as ic,$ as oc,a0 as sc,a1 as lc,a2 as uc,a3 as cc,a4 as dc,a5 as fc,a6 as pc,a7 as vc,a8 as hc,a9 as mc,aa as gc,ab as bc,ac as yc}from"./index-2bf60370.js";import{D as Oc}from"./DownsamplingError-8e6bdb73.js";import{e as Ve,c as Pc,d as Sc,a as wc,f as xc,b as Cc,g as Ec,h as Tc,i as jc,j as _c,u as Ic,k as Ue,l as $c,m as Dc,n as Ee,o as Nc,p as Le,q as pt,r as Ia,s as Ac,t as $a,v as Ut,w as Kt,x as Da,y as Na,z as q,T as Bt,A as Ht,B as Wt,M as Gt,D as Aa,C as kc,E as vt,F as Rc,G as Mc,H as Lc,I as Fc,J as Vc,K as Uc,L as Kc,N as Bc,O as Hc,P as ka,Q as Wc,R as Gc,S as zc,U as Yc,V as Ra,W as qc,X as Xc,Y as Jc,Z as Zc,_ as Qc,$ as Ma,a0 as ed,a1 as td,a2 as rd,a3 as nd,a4 as ad,a5 as id,a6 as od,a7 as sd,a8 as ld,a9 as ud,aa as cd,ab as dd,ac as fd,ad as pd,ae as vd,af as La,ag as hd,ah as md,ai as gd,aj as bd,ak as yd,al as Fe,am as Od,an as Fa,ao as Pd,ap as zt,aq as le,ar as fr,as as Va,at as Ua,au as Sd,av as wd,aw as xd,ax as Cd,ay as Ed,az as Td,aA as jd,aB as _d,aC as Id,aD as $d,aE as Dd,aF as Nd,aG as Ad,aH as kd,aI as Rd,aJ as Md,aK as Ld,aL as Fd,aM as Vd,aN as Ud,aO as Kd,aP as Bd,aQ as Hd,aR as Wd,aS as Gd,aT as zd,aU as Yd,aV as qd,aW as Xd,aX as Jd,aY as Zd,aZ as Ka,a_ as Qd,a$ as ef,b0 as tf,b1 as rf,b2 as nf,b3 as af,b4 as of,b5 as sf,b6 as lf,b7 as uf,b8 as cf,b9 as df}from"./IrisGridThemeProvider-6cca4e5e.js";import"./helpers-de833af9.js";function ff(t,e){return t===0?0:e==="all"||t===e.size?"all":e.size}function Ba(t,e){return t===e?!0:t==="all"||e==="all"||t.size!==e.size?!1:[...t.keys()].every(r=>e.has(r))}function Ha(t,e){return t.isInverted===e.isInverted&&Ba(t.selection,e.selection)}function Wa(t,e,r){if(t==="all")return"all";var n=[...t.keys()];return new Set(n.map(a=>r(e(a))))}function Ga(t,e,r){var n=t==="all"||t.size>e/2,a=t;return n&&(a=t==="all"?new Set:new Set([...Hs(0,e-1)].map(r).filter(i=>!t.has(i)))),{selection:a,isInverted:n}}function pf(t,e){return u.useCallback(function(){var r=t(...arguments);return e(),r},[e,t])}function Yt(t,e){return u.useCallback(r=>{typeof t=="function"?t(e(r)):t.current=e(r)},[e,t])}function za(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:Vn,[e,r]=u.useState(0),[n,a]=u.useState(0),[i,o]=u.useState(0),[s,l]=u.useState(0),d=u.useMemo(()=>new DOMRect(e,n,i,s),[s,i,e,n]),[p,f]=u.useState(null),v=Yt(f,t),h=u.useCallback(g=>{var w,[m]=g,y=(w=m==null?void 0:m.contentRect)!==null&&w!==void 0?w:{x:0,y:0,width:0,height:0};r(y.x),a(y.y),o(y.width),l(y.height)},[]);return qe(p,h),{ref:v,contentRect:d}}function vf(t){var[e,r]=u.useState(!0);return u.useEffect(()=>{var n=setTimeout(()=>{r(!1)},t);return()=>{clearTimeout(n)}},[t]),e}function hf(t){var[e,r]=u.useState(t);return u.useEffect(()=>{r(t)},[t]),[e,r]}function mf(t,e,r,n){var a=u.useRef(0);u.useEffect(()=>{a.current>=r||n&&(a.current+=1,t())},[r,n,...e])}function Ya(t,e){var r=u.useRef(t),n=e(r.current,t)?r.current:t;return r.current=n,n}function gf(t){t.preventDefault()}function qa(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!1,e=u.useMemo(()=>"useSubmitButtonRef-".concat(je()),[]),r=u.useCallback(i=>{i==null||i.UNSAFE_getDOMNode().setAttribute("form",e)},[e]),n=u.useMemo(()=>({id:e,onSubmit:t?void 0:gf}),[e,t]),a=u.useMemo(()=>({form:e,ref:r}),[e,r]);return{formProps:n,submitButtonProps:a}}function Xa(t,e,r){var{getItem:n,selectedKeys:a,items:i}=t;return u.useMemo(()=>{var{selection:o,isInverted:s}=Ga(a,i.length,r);return{selection:Wa(o,n,e),isInverted:s}},[a,i.length,r,n,e])}function Ja(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Vn,r=u.useRef();return u.useEffect(()=>()=>{var n;return(n=r.current)===null||n===void 0?void 0:n.call(r)},[]),u.useCallback(n=>{var a;(a=r.current)===null||a===void 0||a.call(r);var i=e(n);i&&(i.addEventListener("scroll",t),r.current=()=>{i.removeEventListener("scroll",t),r.current=void 0})},[e,t])}function pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function vr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pr(Object(r),!0).forEach(function(n){bf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function bf(t,e,r){return e=yf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yf(t){var e=Of(t,"string");return typeof e=="symbol"?e:String(e)}function Of(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pf(t,e,r,n){var a=arguments.length===4;return u.useCallback(i=>{var o=a?i??n:i;r(vr(vr({},t),{},{[e]:o}))},[r,t,e,a,n])}function _e(t,e){var[r,n]=u.useState(!0),[a,i]=u.useState(t),[o,s]=u.useState(t),[l,d]=u.useState(e);return(t!==o||e!==l)&&(n(!0),s(t),d(e)),u.useEffect(()=>{var p=!1,f=setTimeout(()=>{p||(n(!1),i(t))},e);return()=>{p=!0,clearTimeout(f)}},[t,e]),{isDebouncing:r,value:a}}function Za(t,e){return u.useCallback(r=>{if(r!=null){var n=e==null?[r]:r.querySelectorAll(e);n.forEach(a=>{Object.entries(t).forEach(i=>{var[o,s]=i;a.setAttribute(o,s)})})}},[t,e])}var Qa={spellCheck:!1};function Sf(t){var e=Za(Qa,t);return Yt(e,Ve)}const wf=Object.freeze(Object.defineProperty({__proto__:null,SPELLCHECK_FALSE_ATTRIBUTE:Qa,createValidationProps:Pc,defaultGetKey:Sc,extractSpectrumHTMLElement:Ve,extractSpectrumLastChildHTMLElement:wc,findSpectrumComboBoxScrollArea:xc,findSpectrumPickerScrollArea:Cc,findSpectrumPopoverScrollArea:Ec,getPositionOfSelectedItem:Tc,getSelectedItemCountOrAll:ff,identityExtractHTMLElement:jc,isElementOfType:_c,isSelectionEqual:Ba,isSelectionMaybeInvertedEqual:Ha,mapSelection:Wa,optimizeSelection:Ga,useAsyncInterval:Ws,useCallbackWithAction:pf,useCheckOverflow:Ic,useContentRect:za,useContextOrThrow:Gs,useCopyToClipboard:wu,useDebouncedCallback:Ue,useDebouncedValue:_e,useDelay:vf,useDependentState:hf,useEffectNTimesWhen:mf,useFormWithDetachedSubmitButton:qa,useForwardedRef:zs,useIsEqualMemo:Ya,useIsMountedRef:Ys,useMappedRef:Yt,useMappedSelection:Xa,useOnScrollOffsetChangeCallback:$c,useOnScrollRef:Ja,usePopoverOnScrollRef:Dc,usePrevious:qs,usePromiseFactory:Ee,usePropChangeCallback:Pf,useResizeObserver:qe,useSetAttributesCallback:Za,useSpectrumDisableSpellcheckRef:Sf,useThrottledCallback:Xs,useWindowedListData:Nc},Symbol.toStringTag,{value:"Module"}));var xf=["aria-label","aria-labelledby","aria-describedby","aria-details","marginX","marginY","width","height","minWidth","minHeight","maxWidth","maxHeight","flex","flexGrow","flexShrink","flexBasis","justifySelf","alignSelf","order","gridArea","gridColumn","gridRow","gridColumnStart","gridColumnEnd","gridRowStart","gridRowEnd","position","zIndex","top","bottom","start","end","left","right","isHidden"];function Cf(t,e){if(t==null)return{};var r=Ef(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ef(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function ei(t){var{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a,marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:v,flex:h,flexGrow:g,flexShrink:w,flexBasis:m,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:I,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:$,end:M,left:U,right:H,isHidden:G}=t,C=Cf(t,xf);return{ariaLabelProps:{"aria-label":e,"aria-labelledby":r,"aria-describedby":n,"aria-details":a},styleProps:{marginX:i,marginY:o,width:s,height:l,minWidth:d,minHeight:p,maxWidth:f,maxHeight:v,flex:h,flexGrow:g,flexShrink:w,flexBasis:m,justifySelf:y,alignSelf:O,order:j,gridArea:T,gridColumn:b,gridRow:E,gridColumnStart:I,gridColumnEnd:_,gridRowStart:k,gridRowEnd:A,position:B,zIndex:x,top:P,bottom:S,start:$,end:M,left:U,right:H,isHidden:G},componentProps:C}}function ti(t){var{normalizedItems:e,defaultSelectedKeys:r,disabledKeys:n,selectedKeys:a,onChange:i}=t,o=u.useMemo(()=>Le(a),[a]),s=u.useMemo(()=>Le(r),[r]),l=u.useMemo(()=>Le(n),[n]),d=u.useCallback(p=>{if(i!=null){if(p==="all"){i("all");return}var f=new Set;e.forEach(v=>{p.has(String(pt(v)))&&f.add(pt(v))}),i(f)}},[e,i]);return{selectedStringKeys:o,defaultSelectedStringKeys:s,disabledStringKeys:l,onStringSelectionChange:d}}function Tf(){var{selectedThemeKey:t,setSelectedThemeKey:e,themes:r}=Ge(),n=u.useCallback(a=>{e(a)},[e]);return c.jsx(En,{label:"Pick a color scheme",items:r,selectedKey:t,onSelectionChange:n,children:a=>c.jsx(It,{children:a.name},a.themeKey)})}function jf(t){var{className:e,style:r}=t;return c.jsx("div",{className:R("dh-logo",e),style:r})}var _f=["UNSAFE_className"],If=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function hr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function mr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?hr(Object(r),!0).forEach(function(n){$f(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):hr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function $f(t,e,r){return e=Df(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Df(t){var e=Nf(t,"string");return typeof e=="symbol"?e:String(e)}function Nf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function gr(t,e){if(t==null)return{};var r=Af(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Af(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var ri=W.forwardRef(function(e,r){var{UNSAFE_className:n}=e,a=gr(e,_f),i=Ia(a),{defaultSelectedKey:o,disabledKeys:s,selectedKey:l,ref:d}=i,p=gr(i,If),f=Ac(r,d);return c.jsx(En,mr(mr({},p),{},{ref:f,UNSAFE_className:R("dh-picker",n),defaultSelectedKey:o,disabledKeys:s,selectedKey:l}))});ri.displayName="Picker";var kf=["UNSAFE_className"],Rf=["forceRerenderKey","ref"];function br(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function yr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?br(Object(r),!0).forEach(function(n){Mf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):br(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Mf(t,e,r){return e=Lf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Lf(t){var e=Ff(t,"string");return typeof e=="symbol"?e:String(e)}function Ff(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Or(t,e){if(t==null)return{};var r=Vf(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Vf(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function ni(t){var{UNSAFE_className:e}=t,r=Or(t,kf),n=$a(r),{forceRerenderKey:a,ref:i}=n,o=Or(n,Rf);return u.createElement(Tn,yr(yr({},o),{},{key:a,ref:i,UNSAFE_className:R("dh-combobox","dh-combobox-normalized",e)}))}var Uf=["onScroll"];function Pr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ie(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Pr(Object(r),!0).forEach(function(n){Kf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Pr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Kf(t,e,r){return e=Bf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bf(t){var e=Hf(t,"string");return typeof e=="symbol"?e:String(e)}function Hf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Wf(t,e){if(t==null)return{};var r=Gf(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Gf(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function qt(t){var e,r,{ariaLabelProps:n,componentProps:a,styleProps:i}=ei(t),{onScroll:o=kt}=a,s=Wf(a,Uf),{scale:l}=Ut(),d=Ja(o,Ve),{ref:p,contentRect:f}=za(Ve);return c.jsx(jn,Ie(Ie({direction:"column",ref:p},i),{},{minHeight:(e=i.minHeight)!==null&&e!==void 0?e:1,UNSAFE_className:R("dh-list-view-wrapper","dh-list-view-wrapper-density-".concat((r=s.density)!==null&&r!==void 0?r:"regular"),"dh-list-view-wrapper-scale-".concat(l),i.UNSAFE_className),children:f.height===0?null:c.jsx(Zi,Ie(Ie({ref:d},n),s))}))}var zf=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","UNSAFE_className","onChange","onScroll","onSelectionChange"];function Sr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function wr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Sr(Object(r),!0).forEach(function(n){Yf(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Sr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Yf(t,e,r){return e=qf(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function qf(t){var e=Xf(t,"string");return typeof e=="symbol"?e:String(e)}function Xf(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Jf(t,e){if(t==null)return{};var r=Zf(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Zf(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Qf(t){var{children:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,UNSAFE_className:o,onChange:s,onScroll:l=kt,onSelectionChange:d}=t,p=Jf(t,zf),f=u.useMemo(()=>Kt(r,"bottom"),[r]),v=u.useMemo(()=>Da(e,f),[e,f]);return c.jsx(qt,wr(wr({},p),{},{UNSAFE_className:R("dh-list-view",o),selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onScroll:l,onSelectionChange:s??d,children:v}))}var ep=["normalizedItems","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","showItemIcons","actions","UNSAFE_className","onChange","onSelectionChange"];function xr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Cr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?xr(Object(r),!0).forEach(function(n){tp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):xr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function tp(t,e,r){return e=rp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rp(t){var e=np(t,"string");return typeof e=="symbol"?e:String(e)}function np(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function ap(t,e){if(t==null)return{};var r=ip(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function ip(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function ai(t){var{normalizedItems:e,tooltip:r=!0,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,showItemIcons:o,actions:s,UNSAFE_className:l,onChange:d,onSelectionChange:p}=t,f=ap(t,ep),v=u.useMemo(()=>Kt(r,"bottom"),[r]),h=Na({itemIconSlot:"illustration",showItemDescriptions:!1,showItemIcons:o,tooltipOptions:v,actions:s}),g="".concat(o,"-").concat(v==null?void 0:v.placement),{selectedStringKeys:w,defaultSelectedStringKeys:m,disabledStringKeys:y,onStringSelectionChange:O}=ti({normalizedItems:e,selectedKeys:n,defaultSelectedKeys:a,disabledKeys:i,onChange:d??p});return u.createElement(qt,Cr(Cr({},f),{},{UNSAFE_className:R("dh-list-view-normalized",l),key:g,items:e,selectedKeys:w,defaultSelectedKeys:m,disabledKeys:y,onSelectionChange:O}),h)}var op=["color","UNSAFE_style"];function Er(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function $e(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Er(Object(r),!0).forEach(function(n){sp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Er(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function sp(t,e,r){return e=lp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function lp(t){var e=up(t,"string");return typeof e=="symbol"?e:String(e)}function up(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function cp(t,e){if(t==null)return{};var r=dp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function dp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var Xt=u.forwardRef((t,e)=>{var{color:r,UNSAFE_style:n}=t,a=cp(t,op),i=u.useMemo(()=>$e($e({},n),{},{color:q(r)}),[r,n]);return c.jsx(_n,$e($e({},a),{},{ref:e,UNSAFE_style:i}))});Xt.displayName="Heading";var fp=["backgroundColor","borderColor","borderStartColor","borderEndColor","borderTopColor","borderBottomColor","borderXColor","borderYColor","UNSAFE_style"];function Tr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function De(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tr(Object(r),!0).forEach(function(n){pp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function pp(t,e,r){return e=vp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function vp(t){var e=hp(t,"string");return typeof e=="symbol"?e:String(e)}function hp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mp(t,e){if(t==null)return{};var r=gp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function gp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}var ii=u.forwardRef((t,e)=>{var{backgroundColor:r,borderColor:n,borderStartColor:a,borderEndColor:i,borderTopColor:o,borderBottomColor:s,borderXColor:l,borderYColor:d,UNSAFE_style:p}=t,f=mp(t,fp),{direction:v}=Qi(),h=u.useMemo(()=>{var g={};return n!==void 0&&(g.borderColor=q(n)),l!==void 0&&(g.borderLeftColor=q(l),g.borderRightColor=q(l)),d!==void 0&&(g.borderTopColor=q(d),g.borderBottomColor=q(d)),a!==void 0&&(g[v==="rtl"?"borderRightColor":"borderLeftColor"]=q(a)),i!==void 0&&(g[v==="rtl"?"borderLeftColor":"borderRightColor"]=q(i)),o!==void 0&&(g.borderTopColor=q(o)),s!==void 0&&(g.borderBottomColor=q(s)),De(De({},p),{},{backgroundColor:q(r)},g)},[r,p,n,a,i,o,s,l,d,v]);return c.jsx(eo,De(De({},f),{},{ref:e,UNSAFE_style:h}))});ii.displayName="View";var bp=["ariaLabel","icon","isQuiet","labelText","children","onOpenChange","tooltip"];function jr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function _r(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?jr(Object(r),!0).forEach(function(n){yp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):jr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function yp(t,e,r){return e=Op(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Op(t){var e=Pp(t,"string");return typeof e=="symbol"?e:String(e)}function Pp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Sp(t,e){if(t==null)return{};var r=wp(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function wp(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function oi(t){var{ariaLabel:e,icon:r,isQuiet:n,labelText:a,children:i,onOpenChange:o,tooltip:s}=t,l=Sp(t,bp),d=a==null&&s!=null?"action-button-icon-with-tooltip":void 0;return c.jsxs(In,{type:"popover",onOpenChange:o,children:[c.jsxs($t,_r(_r({},l),{},{"aria-label":e??a,isQuiet:n,children:[c.jsx(He,{UNSAFE_className:d,children:c.jsx(J,{icon:r})}),a==null?null:c.jsx(Bt,{children:a}),s==null?null:c.jsx(ze,{children:s})]})),i]})}function Ir(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ir(Object(r),!0).forEach(function(n){xp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ir(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function xp(t,e,r){return e=Cp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Cp(t){var e=Ep(t,"string");return typeof e=="symbol"?e:String(e)}function Ep(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function si(t){var{heading:e,confirmationButtonLabel:r,children:n,onCancel:a,onConfirm:i}=t,{formProps:o,submitButtonProps:s}=qa();return c.jsxs($n,{children:[c.jsx(Xt,{level:3,UNSAFE_className:Ht.spectrumDialogComponentHeading,children:e}),c.jsx(Dn,{}),c.jsx(Dt,{children:c.jsx(Nn,Ne(Ne({},o),{},{children:n}))}),c.jsxs(An,{children:[c.jsx(ot,{variant:"secondary",onPress:a,children:"Cancel"}),c.jsx(ot,Ne(Ne({},s),{},{style:"fill",variant:"negative",onPress:i,type:"submit",children:r}))]})]})}function Tp(t){var{ariaLabel:e,heading:r,confirmationButtonLabel:n,isHidden:a,children:i,tooltip:o,onConfirm:s}=t,l=u.useCallback(d=>c.jsx(si,{heading:r,confirmationButtonLabel:n,onCancel:d,onConfirm:()=>{d(),s()},children:i}),[i,n,r,s]);return c.jsx(oi,{ariaLabel:e,icon:Un,isHidden:a,isQuiet:!0,height:Wt,tooltip:o,children:l})}var jp=["icon","label","tooltip"];function $r(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Dr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?$r(Object(r),!0).forEach(function(n){_p(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):$r(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function _p(t,e,r){return e=Ip(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ip(t){var e=$p(t,"string");return typeof e=="symbol"?e:String(e)}function $p(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Dp(t,e){if(t==null)return{};var r=Np(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Np(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function li(t){var{icon:e,label:r,tooltip:n}=t,a=Dp(t,jp);return c.jsxs($t,Dr(Dr({},a),{},{"aria-label":r,isQuiet:!0,height:Wt,children:[c.jsx(He,{UNSAFE_className:n==null?void 0:"action-button-icon-with-tooltip",children:c.jsx(J,{icon:e})}),n==null?null:c.jsx(ze,{children:n})]}))}li.displayName="IconActionButton";function Nr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ap(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Nr(Object(r),!0).forEach(function(n){te(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Nr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function te(t,e,r){return e=kp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function kp(t){var e=Rp(t,"string");return typeof e=="symbol"?e:String(e)}function Rp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Mp=100,ht;(function(t){t.UP="UP",t.DOWN="DOWN"})(ht||(ht={}));class X extends u.Component{constructor(e){super(e),te(this,"popper",void 0),te(this,"cbContainer",void 0),te(this,"menuContainer",void 0),te(this,"input",void 0),te(this,"getCachedFilteredOptions",to((n,a)=>n.filter(i=>i.title.toLowerCase().indexOf(a.toLowerCase())>=0)));var{popperOptions:r}=this.props;r=Ap({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},r),this.state={title:"",filteredOptions:[],keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,invalid:!1,popperOptions:r},this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.handleMenuBlur=this.handleMenuBlur.bind(this),this.handleInputChange=this.handleInputChange.bind(this),this.handleInputKeyDown=this.handleInputKeyDown.bind(this),this.handleInputBlur=this.handleInputBlur.bind(this),this.handelInputFocus=this.handelInputFocus.bind(this),this.handleInputClick=this.handleInputClick.bind(this),this.updateInputValue=xe(this.updateInputValue,Mp),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.popper=W.createRef(),this.cbContainer=W.createRef(),this.menuContainer=W.createRef(),this.input=W.createRef()}setInputWidth(){this.cbContainer.current&&this.setState({inputWidth:this.cbContainer.current.getBoundingClientRect().width})}getValueAndValidate(e){if(!e)return this.setState({invalid:!1}),{value:e,isValid:!1};var{options:r}=this.props,n=r.filter(a=>a.title.toLowerCase()===e.toLowerCase());return n.length<1?(this.setState({invalid:!0}),{value:e,isValid:!1}):(this.setState({invalid:!1}),{value:n[0].value,isValid:!0})}updateInputValue(e){var{menuIsOpen:r}=this.state,{value:n,isValid:a}=this.getValueAndValidate(e);r&&this.processFilterChange(e),this.fireOnChange(n,a)}fireOnChange(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0,{onChange:n}=this.props;n(e,r)}processFilterChange(e){var r,{options:n}=this.props,{menuIsOpen:a}=this.state,i=e?this.getCachedFilteredOptions(n,e):n,o=i.length===1&&i[0].title===e;if(this.setState({filteredOptions:i,keyboardOptionIndex:0}),o&&a){this.closeMenu();return}(r=this.popper.current)===null||r===void 0||r.scheduleUpdate()}resetValue(){this.setState({title:""}),this.fireOnChange("")}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var r,{filteredOptions:n,keyboardOptionIndex:a}=this.state,i=n[a];switch(e.key){case"Enter":case"ArrowRight":e.stopPropagation(),e.preventDefault(),i!=null&&(this.setState({title:i.title,invalid:!1}),this.fireOnChange(i.value)),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus();break;case"ArrowUp":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break;case"ArrowDown":e.stopPropagation(),e.preventDefault(),this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Tab":if(e.stopPropagation(),e.preventDefault(),e.shiftKey){this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.UP);break}this.navigateMenu(X.MENU_NAVIGATION_DIRECTION.DOWN);break;case"Escape":e.preventDefault(),e.stopPropagation(),this.closeMenu();break}}navigateMenu(e){var{filteredOptions:r,keyboardOptionIndex:n}=this.state,a=n;e===X.MENU_NAVIGATION_DIRECTION.UP?n>0?(a=(a-1)%r.length,this.setState({keyboardOptionIndex:a})):n===0&&(a=r.length-1,this.setState({keyboardOptionIndex:a})):e===X.MENU_NAVIGATION_DIRECTION.DOWN&&n<r.length&&(a=(a+1)%r.length,this.setState({keyboardOptionIndex:a})),this.scrollOptionIntoView(a)}handleInputKeyDown(e){var{onEnter:r}=this.props,{menuIsOpen:n}=this.state;n?this.handleMenuKeyDown(e):e.key==="Enter"?r():e.key==="Escape"?(this.resetValue(),e.preventDefault(),e.stopPropagation()):e.key==="ArrowRight"||e.key==="ArrowLeft"||e.key==="Tab"||e.key==="Shift"||this.openMenu()}handleInputChange(e){this.setState({title:e.target.value}),this.updateInputValue(e.target.value)}handleOptionClick(e){var r;this.setState({title:e.title,invalid:!1}),this.fireOnChange(e.value),this.closeMenu(),(r=this.input.current)===null||r===void 0||r.focus()}handelInputFocus(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputClick(){var{menuIsOpen:e}=this.state;e||this.openMenu()}handleInputBlur(e){var{menuIsOpen:r}=this.state;r&&e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuBlur(e){e.relatedTarget===this.input.current||e.relatedTarget instanceof Element&&this.popper.current!==null&&this.popper.current.element.contains(e.relatedTarget)||this.closeMenu(!1)}handleMenuOpened(){var e;(e=this.input.current)===null||e===void 0||e.focus()}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}openMenu(){var{title:e}=this.state;this.processFilterChange(e),this.setInputWidth(),this.setState({menuIsOpen:!0}),window.requestAnimationFrame(()=>{var r;(r=this.popper.current)===null||r===void 0||r.show()})}closeMenu(){var e,r=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1,keyboardOptionIndex:0}),r){var n;(n=this.input.current)===null||n===void 0||n.focus()}(e=this.popper.current)===null||e===void 0||e.hide()}scrollOptionIntoView(e){if(this.menuContainer.current){var r;(r=this.menuContainer.current.children.item(e))===null||r===void 0||r.scrollIntoView({behavior:"smooth",block:"nearest"})}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:R("aci-options"),ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,style:{width:e},onBlur:this.handleMenuBlur,children:this.renderOptions()})}renderOptions(){var{noMatchText:e}=this.props,{title:r,filteredOptions:n}=this.state;return r&&n.length===0?c.jsx("div",{className:"no-match",children:e}):n.map((a,i)=>this.renderOption(a,i))}renderOption(e,r){var{keyboardOptionIndex:n}=this.state,a="option-".concat(r,"-").concat(e.value);return c.jsx("button",{type:"button",className:R("aci-option-btn",{"keyboard-active":n===r}),onClick:()=>this.handleOptionClick(e),onFocus:()=>this.setState({keyboardOptionIndex:r}),children:e.title},a)}render(){var{options:e,inputPlaceholder:r,disabled:n,className:a,defaultTitle:i,spellCheck:o,"data-testid":s}=this.props,{title:l,menuIsOpen:d,popperOptions:p,invalid:f}=this.state;return c.jsxs("div",{className:"aci-container",ref:this.cbContainer,children:[c.jsx("input",{value:l||i,className:R("form-control",a,"aci-input",{"is-invalid":f&&!d}),ref:this.input,onChange:this.handleInputChange,placeholder:r||e[0].title,disabled:n,onFocus:this.handelInputFocus,onClick:this.handleInputClick,onBlur:this.handleInputBlur,onKeyDown:this.handleInputKeyDown,spellCheck:o,"data-testid":s}),c.jsx(Rt,{ref:this.popper,options:p,className:R("aci-options-popper interactive"),onEntered:this.handleMenuOpened,onExited:this.handleMenuExited,children:this.renderMenuElement()})]})}}te(X,"propTypes",{options:L.arrayOf(L.shape({title:L.string.isRequired,value:L.string.isRequired})).isRequired,popperOptions:L.shape({}),onChange:L.func,inputPlaceholder:L.string,disabled:L.bool,className:L.string,defaultTitle:L.string,spellCheck:L.bool,onEnter:L.func,noMatchText:L.string,"data-testid":L.string});te(X,"defaultProps",{onChange(){},inputPlaceholder:"",disabled:!1,className:"",defaultTitle:"",popperOptions:null,spellCheck:!0,onEnter(){},noMatchText:"No matching items found","data-testid":void 0});te(X,"MENU_NAVIGATION_DIRECTION",ht);const Lp=X;function Jt(t){var{className:e="",value:r,onChange:n,spellCheck:a=!1,placeholder:i="",disabled:o=!1,delimiter:s="",id:l="","data-testid":d}=t,[p,f]=u.useState(r),[v,h]=u.useState(!1),g=u.useRef(null);u.useEffect(function(){f(r)},[r]);function w(I){return I.trim().split(s).filter(_=>_).join(`
2
2
  `.concat(s.trim()))}function m(I){return I.split(`
3
3
  `).map(_=>_.trim()).join(" ")}function y(){if(g.current){g.current.style.height="0";var I=g.current.scrollHeight+(g.current.offsetHeight-g.current.clientHeight);I>0&&(g.current.style.height="".concat(I,"px"))}}function O(I){var _=I.target.value;v&&(s&&(_=w(_)),h(!1)),f(_),n(_)}function j(){g.current&&(s&&(f(w(p)),y()),g.current.scrollLeft=0)}function T(){g.current&&document.activeElement!==g.current&&g.current.focus()}function b(){s&&(f(m(p)),n(m(p)))}function E(){h(!0)}return u.useEffect(function(){y()},[p]),c.jsx("textarea",{ref:g,id:l,className:R(e,"auto-resize-textarea form-control"),placeholder:i,value:p,rows:1,onChange:O,onFocus:j,onMouseDown:T,onBlur:b,onPaste:E,spellCheck:a,disabled:o,"data-testid":d})}Jt.propTypes={value:L.string.isRequired,onChange:L.func.isRequired,className:L.string,placeholder:L.string,spellCheck:L.bool,disabled:L.bool,delimiter:L.string,id:L.string,"data-testid":L.string};Jt.defaultProps={className:"",id:"",placeholder:"",disabled:!1,spellCheck:!1,delimiter:"","data-testid":void 0};function ui(t){var{blockInteraction:e=!0,children:r,debounceMs:n,isOpen:a=!1}=t,{value:i}=_e(a,n);return c.jsxs(c.Fragment,{children:[e&&a&&c.jsx("div",{className:"modal-backdrop",style:{backgroundColor:"transparent"},"data-testid":"debounced-modal-backdrop"}),W.cloneElement(r,{isOpen:a&&i})]})}function ci(t){var{className:e,icon:r,isOpen:n=!1,subtitle:a,title:i}=t;return c.jsx(Kn,{isOpen:n,className:e,children:c.jsx(Bn,{children:c.jsxs("div",{className:"info-modal",children:[r!=null&&c.jsx("div",{className:"message-icon",children:c.jsx(J,{icon:r})}),c.jsx("div",{className:"message-header",children:i}),a!=null&&c.jsx("div",{className:"message-content",children:a})]})})})}function Ar(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function kr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ar(Object(r),!0).forEach(function(n){Fp(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ar(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Fp(t,e,r){return e=Vp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vp(t){var e=Up(t,"string");return typeof e=="symbol"?e:String(e)}function Up(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Kp(t){var{styleProps:e,selectedItemCount:r,onClearSelection:n}=t;return c.jsx(kn,kr(kr({UNSAFE_className:Ht.spectrumActionBar},e),{},{isEmphasized:!0,selectedItemCount:r,onClearSelection:n}))}function di(t,e,r){return e=Bp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Bp(t){var e=Hp(t,"string");return typeof e=="symbol"?e:String(e)}function Hp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Q extends u.Component{static handleEnter(e){var r=e;r.style.height="0"}static handleEntering(e){var r=e;r.style.height="".concat(Q.getHeight(r),"px")}static handleExiting(e){var r=e;r.style.height="0"}static handleExit(e){var r=e;r.style.height="".concat(Q.getHeight(r),"px")}static getHeight(e){var r=e.scrollWidth-e.clientWidth;return e.scrollHeight-r}constructor(e){super(e),this.handleEntered=this.handleEntered.bind(this)}handleEntered(e){var r=e;r.style.height="";var{autoFocusOnShow:n}=this.props;if(n!==void 0&&n){var a=r.querySelector("input, select, textarea");a!=null&&a.focus()}}render(){var{children:e,className:r,in:n,"data-testid":a}=this.props;return c.jsx(Rn,{in:n,classNames:{enterActive:"collapsing",enterDone:"collapse show",exitActive:"collapsing",exitDone:"collapse"},onEnter:Q.handleEnter,onEntering:Q.handleEntering,onEntered:this.handleEntered,onExit:Q.handleExit,onExiting:Q.handleExiting,timeout:350,children:i=>c.jsx("div",{className:R({collapse:i==="exited"},r),"data-testid":a,children:e})})}}di(Q,"propTypes",{className:L.string,in:L.bool.isRequired,children:L.node.isRequired,autoFocusOnShow:L.bool,"data-testid":L.string});di(Q,"defaultProps",{className:"",autoFocusOnShow:!1,"data-testid":void 0});const Wp=Q;var Gp=K.module("TimeInput"),zp="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]",Yp=["00:00:00","12:34:56","23:59:59"];function Rr(t){return t!=null?"".concat(t.substring(0,8).replace(/\u2007/g,"0")).concat("00:00:00".substring(t.length)):t}var fi=W.forwardRef((t,e)=>{var{allowValueWrapping:r=!0,className:n="",onChange:a=()=>!1,value:i=0,onFocus:o=()=>!1,onBlur:s=()=>!1,onSelect:l=()=>!1,"data-testid":d}=t,[p,f]=u.useState(Me.formatTime(i)),v=u.useRef(i),[h,g]=u.useState(),w=u.useRef(null);u.useImperativeHandle(e,()=>({focus:()=>{var b;(b=w.current)===null||b===void 0||b.focus()},setSelection:b=>{var E;(E=w.current)===null||E===void 0||E.focus(),g(b)}}),[]),u.useEffect(function(){v.current!==i&&(f(Me.formatTime(i)),v.current=i)},[v,i]);function m(b,E,I){var _=b.selectionStart===0?24:60,k=parseInt(I,10)-E;return Number.isNaN(k)?k=0:r?k=(k%_+_)%_:k=Math.min(Math.max(0,k),_-1),"".concat(k).padStart(2,"0")}function y(b,E,I,_,k){return _===0&&k===2&&E===1&&parseInt(I,10)>1?"0".concat(I).concat(b.substring(2)):Aa(b,E,I)}var O=u.useCallback(b=>{Gp.debug("handleChange",b),f(b),v.current=Me.parseTime(Rr(b)),a(v.current)},[a]),j=u.useCallback(()=>{var b=Rr(p);b!==p&&f(b),s()},[p,s]),T=u.useCallback(b=>{g(b),l(b)},[l]);return c.jsx(Gt,{ref:w,className:n,example:Yp,getNextSegmentValue:m,getPreferredReplacementString:y,onChange:O,onSelect:T,pattern:zp,selection:h,value:p,onFocus:o,onBlur:j,"data-testid":d})});fi.defaultProps={allowValueWrapping:!0,className:"",onChange:()=>!1,onSelect:()=>!1,value:0,onFocus:()=>!1,onBlur:()=>!1,"data-testid":void 0};const Ke=fi;function Mr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function qp(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Mr(Object(r),!0).forEach(function(n){se(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Mr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function se(t,e,r){return e=Xp(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xp(t){var e=Jp(t,"string");return typeof e=="symbol"?e:String(e)}function Jp(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Lr=-1,mt;(function(t){t.UP="UP",t.DOWN="DOWN"})(mt||(mt={}));class z extends u.Component{constructor(e){super(e),se(this,"csContainer",void 0),se(this,"menuContainer",void 0),se(this,"button",void 0),se(this,"input",void 0);var{value:r,valueToTime:n}=e;this.toggleMenu=this.toggleMenu.bind(this),this.handleMenuKeyDown=this.handleMenuKeyDown.bind(this),this.closeMenu=this.closeMenu.bind(this),this.handleOptionClick=this.handleOptionClick.bind(this),this.handleOptionFocus=this.handleOptionFocus.bind(this),this.handleMenuOpened=this.handleMenuOpened.bind(this),this.handleMenuExited=this.handleMenuExited.bind(this),this.handleCustomInput=this.handleCustomInput.bind(this),this.csContainer=W.createRef(),this.menuContainer=W.createRef(),this.button=W.createRef(),this.input=W.createRef(),this.state={keyboardOptionIndex:0,menuIsOpen:!1,inputWidth:100,customTime:n(r),inputFocused:!1}}getSelectedText(){var{options:e,value:r,placeholder:n}=this.props,{customTime:a}=this.state;if(r===null)return n;for(var i=0;i<e.length;i+=1){var o=e[i];if(o.value===r)return o.title}return Me.formatTime(a)}setInputWidth(){this.csContainer.current&&this.setState({inputWidth:this.csContainer.current.getBoundingClientRect().width})}focus(){var e;(e=this.button.current)===null||e===void 0||e.focus()}updateInputValue(e){var{onChange:r}=this.props;r(e)}handleResize(){this.setInputWidth()}handleMenuKeyDown(e){var r,{keyboardOptionIndex:n,inputFocused:a}=this.state,{options:i}=this.props;switch(e.key){case"Enter":case" ":a?this.updateFromCustom():this.updateInputValue(i[n].value),this.closeMenu(),(r=this.button.current)===null||r===void 0||r.focus(),e.stopPropagation(),e.preventDefault();break;case"Tab":e.shiftKey?this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.UP):this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"ArrowUp":this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.UP),e.stopPropagation(),e.preventDefault();break;case"ArrowDown":this.handleMenuNavigation(z.MENU_NAVIGATION_DIRECTION.DOWN),e.stopPropagation(),e.preventDefault();break;case"Escape":this.closeMenu();break}}handleMenuNavigation(e){var{keyboardOptionIndex:r,inputFocused:n}=this.state,{options:a}=this.props,i=a.length,o=r;switch(e){case z.MENU_NAVIGATION_DIRECTION.UP:if(!n&&r===0){this.focusInput();break}else n&&this.focusOption(r);r>0&&!n?(o=(o-1)%i,this.setState({keyboardOptionIndex:o})):r===0&&(o=i-1,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break;case z.MENU_NAVIGATION_DIRECTION.DOWN:if(!n&&r===i-1){this.focusInput();break}else n&&this.focusOption(r);r<i&&!(n&&r===0)&&(o=(o+1)%i,this.setState({keyboardOptionIndex:o})),this.scrollOptionIntoView(o);break}}handleOptionClick(e){var r=Number(e.currentTarget.value),{options:n,timeToValue:a}=this.props,{customTime:i}=this.state;if(r===Lr){var o=a(i);this.updateAndClose(o)}else this.updateAndClose(n[r].value)}updateAndClose(e){var r;this.updateInputValue(e),this.closeMenu(),(r=this.button.current)===null||r===void 0||r.focus()}handleOptionFocus(e){this.setState({keyboardOptionIndex:Number(e.target.value)})}handleMenuOpened(){var e,{options:r,value:n}=this.props,{keyboardOptionIndex:a}=this.state;this.scrollOptionIntoView(a);var i=(e=this.menuContainer.current)===null||e===void 0?void 0:e.querySelector(".cs-option-btn.keyboard-active");if(i instanceof HTMLElement&&i.focus(),n!==null){var o=r.map(s=>s.value).indexOf(n);o<0&&this.focusInput()}}focusInput(){var e;(e=this.input.current)===null||e===void 0||e.focus()}focusOption(e){var r,n=(r=this.menuContainer.current)===null||r===void 0?void 0:r.querySelector(".cs-options");if(n&&n.children!=null){var a=n.children.item(e);a instanceof HTMLElement&&a.focus()}}handleMenuExited(){var{menuIsOpen:e}=this.state;e&&this.setState({menuIsOpen:!1,keyboardOptionIndex:0})}handleCustomInput(e){var{timeToValue:r}=this.props,n=r(e);this.updateInputValue(n),this.setState({customTime:e})}updateFromCustom(){var{timeToValue:e}=this.props,{customTime:r}=this.state,n=e(r);this.updateInputValue(n)}toggleMenu(e){var{menuIsOpen:r}=this.state;r?this.closeMenu():this.openMenu(),e.stopPropagation()}openMenu(){this.updateKeyboardIndex(),this.setInputWidth(),this.setState({menuIsOpen:!0})}closeMenu(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:!0;if(this.setState({menuIsOpen:!1}),e){var r;(r=this.button.current)===null||r===void 0||r.focus()}}updateKeyboardIndex(){var{options:e,value:r}=this.props;if(r!==null){var n=e.map(a=>a.value).indexOf(r);n>0&&this.setState({keyboardOptionIndex:n})}}scrollOptionIntoView(e){var r,n=(r=this.menuContainer.current)===null||r===void 0?void 0:r.querySelector(".cs-options");if(n&&n.children!=null){var a=n.children.item(e);a instanceof HTMLElement&&a.offsetTop>z.DROP_DOWN_MENU_HEIGHT?n.scrollTop=a.offsetTop-z.DROP_DOWN_MENU_HEIGHT:(a instanceof HTMLElement&&a.offsetTop<0||e===0)&&(n.scrollTop=0)}}renderMenuElement(){var{inputWidth:e}=this.state;return c.jsx("div",{className:"cs-menu-container",ref:this.menuContainer,role:"presentation",onKeyDown:this.handleMenuKeyDown,onClick:r=>{r.stopPropagation()},style:{width:e},children:c.jsx("div",{className:"cs-options-container",children:c.jsx("div",{className:"cs-options",children:this.renderOptions()})})})}renderOptions(){for(var{options:e,value:r,icon:n,customText:a}=this.props,{keyboardOptionIndex:i,customTime:o,inputFocused:s}=this.state,l=!1,d=[],p=0;p<e.length;p+=1){var f=e[p],v="option-".concat(p,"-").concat(f.value);l=l||f.value===r,d.push(c.jsxs("button",{type:"button",value:p,className:R("cs-option-btn",{"keyboard-active":i===p&&!s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[f.value===r&&c.jsx(J,{icon:n,className:"mr-2"}),f.value!==r&&c.jsx("span",{className:"mr-4"}),f.title]},v))}return d.push(c.jsx("hr",{className:"cs-divider"},"option-divider")),d.push(c.jsxs("button",{type:"button",value:Lr,className:R("cs-option-btn",{"keyboard-active":s}),onClick:this.handleOptionClick,onFocus:this.handleOptionFocus,children:[!l&&r!==null?c.jsx(J,{icon:n,className:"mr-2"}):c.jsx("span",{className:"mr-4"}),a]},"option-custom-label")),d.push(c.jsxs("div",{className:"cs-custom-container",children:[c.jsx("span",{className:"mr-2"}),c.jsx(Ke,{ref:this.input,onChange:this.handleCustomInput,value:o,onFocus:()=>this.setState({inputFocused:!0}),onBlur:()=>this.setState({inputFocused:!1})},"option-input"),c.jsx("span",{className:"ml-2"})]},"cs-custom-container")),d.push(c.jsx("hr",{className:"mb-2"},"option-end")),d}render(){var{disabled:e,invalid:r,value:n,"data-testid":a}=this.props,{menuIsOpen:i}=this.state,{popperOptions:o}=this.props;return o=qp({placement:"bottom-end",modifiers:{preventOverflow:{enabled:!1}}},o),c.jsx("div",{className:"input-group cs-container context-menu",ref:this.csContainer,"data-testid":a,children:c.jsx("div",{className:R("input-group-append cs-dropdown",{"cs-dropdown-invalid":r}),children:c.jsxs("button",{type:"button",className:R("btn cs-btn form-control",{"cs-btn-invalid":r}),ref:this.button,onClick:this.toggleMenu,disabled:e,children:[c.jsx("span",{className:R({"text-muted":n===null}),children:this.getSelectedText()}),c.jsx("span",{className:"cs-caret"}),c.jsx(Gn,{isShown:i,actions:{menuElement:this.renderMenuElement()},popperOptions:o,popperClassName:"CustomTimeSelect",onMenuOpened:this.handleMenuOpened,onMenuClosed:this.handleMenuExited,menuStyle:{maxWidth:"100rem"}})]})})})}}se(z,"MENU_NAVIGATION_DIRECTION",mt);se(z,"DROP_DOWN_MENU_HEIGHT",125);se(z,"defaultProps",{onChange(){},value:null,disabled:!1,popperOptions:{},icon:os,customText:"Custom",placeholder:"Select a time",valueToTime:t=>t===null?0:Math.round(t/1e3),timeToValue:t=>t*1e3,invalid:!1,"data-testid":void 0});const Zp=z;var Qp=K.module("DateInput"),ev="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",tv=["2000-01-01","2022-12-31"],rv="YYYY-MM-DD",pi=W.forwardRef((t,e)=>{var{className:r="",onChange:n=()=>{},defaultValue:a="",onFocus:i=()=>{},onBlur:o=()=>{},"data-testid":s}=t,[l,d]=u.useState(a),[p,f]=u.useState(),v=u.useCallback(h=>{Qp.debug("handleChange",h),d(h),n(h)},[n]);return c.jsx("div",{className:"d-flex flex-row align-items-center",children:c.jsx(Gt,{ref:e,className:R(r),example:tv,getNextSegmentValue:kc,onChange:v,onSelect:f,pattern:ev,placeholder:rv,selection:p,value:l,onFocus:i,onBlur:o,"data-testid":s})})});pi.displayName="DateInput";const nv=pi;function av(t){var{isInvalid:e=!1,items:r,onAdd:n=()=>{},onDelete:a=()=>{},validate:i=()=>null}=t,[o,s]=u.useState(null),[l,d]=u.useState([]),[p,f]=u.useState(""),v=u.useCallback(j=>{d(j)},[]),h=u.useCallback(()=>{a(ur.getItemsInRanges(r,l)),d([])},[r,l,a]),g=u.useCallback(()=>{if(p!==""){var j=i(p);j==null?(n(p),f("")):s(j)}},[p,n,i]),w=u.useCallback(j=>{var{value:T}=j.target;f(T),s(T===""?null:i(T))},[i]),m=u.useCallback(()=>{d([])},[]),y=u.useCallback(j=>{j.key==="Enter"&&g()},[g]),O=u.useMemo(()=>14+Mn(r.length,1,6)*lt.DEFAULT_ROW_HEIGHT,[r.length]);return c.jsxs("div",{className:R("editable-item-list-container",{"is-invalid":e}),children:[c.jsx("div",{style:{height:O},children:c.jsx(lt,{itemCount:r.length,items:r.map((j,T)=>({value:j,isSelected:ur.isSelected(l,T)})),offset:0,selectedRanges:l,onSelectionChange:v,isMultiSelect:!0})}),c.jsxs("div",{className:"d-flex flex-row pt-2",children:[c.jsx("div",{className:"d-flex flex-grow-1",children:c.jsx("input",{className:R("form-control",{"is-invalid":o!=null}),placeholder:"Enter value",type:"text",value:p,onChange:w,onFocus:m,onKeyDown:y})}),c.jsxs("div",{className:"d-flex align-items-start mt-1 ml-2",children:[c.jsx(re,{kind:"ghost",onClick:g,disabled:o!=null||p==="",icon:ss,tooltip:"Add new item","data-testid":"add-item-button"}),c.jsx(re,{kind:"ghost",onClick:h,disabled:l.length===0,icon:Un,tooltip:"Delete selected items","data-testid":"delete-item-button"})]})]})]})}function iv(t){var{message:e,isExpanded:r=!1,type:n="Error"}=t,[a,i]=u.useState(!1),[o,s]=u.useState(!1),l=u.useRef(null),d=u.useRef(null),p=u.useCallback(()=>{if(!(o||r||d.current==null)){var v=d.current.scrollHeight>d.current.clientHeight;i(v)}},[o,r]),f=Ue(p,100);return qe(l.current,f),u.useLayoutEffect(f,[f]),c.jsxs("div",{className:R("error-view",{expanded:o||r}),ref:l,children:[c.jsxs("div",{className:"error-view-header",children:[c.jsxs("div",{className:"error-view-header-text",children:[c.jsx(J,{icon:ls}),c.jsx("span",{children:n})]}),c.jsxs("div",{className:"error-view-buttons",children:[c.jsx(Oa,{kind:"danger",className:"error-view-copy-button",tooltip:"Copy exception contents",copy:"".concat(n,": ").concat(e).trim()}),(a||o)&&!r&&c.jsx(re,{kind:"danger",className:"error-view-expand-button",onClick:()=>{s(!o)},icon:o?us:cs,children:o?"Show Less":"Show More"})]})]}),c.jsx("pre",{className:"error-view-text",ref:d,children:e})]})}function ov(t,e,r){return e=sv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sv(t){var e=lv(t,"string");return typeof e=="symbol"?e:String(e)}function lv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class me extends u.Component{static isParentSelected(e,r){var n=r.get(e);if(n===void 0)return!1;if(typeof n=="boolean")return n;var a=Array.from(n.values()).includes(!0),i=Array.from(n.values()).includes(!1);return a&&i?null:a}constructor(e){super(e),this.toggleMenu=this.toggleMenu.bind(this),this.toggleValueFor=this.toggleValueFor.bind(this),this.selectAll=this.selectAll.bind(this),this.clear=this.clear.bind(this),this.state={menuIsOpen:!1}}toggleMenu(e){e.stopPropagation(),e.preventDefault(),this.setState(r=>{var{menuIsOpen:n}=r;return{menuIsOpen:!n}})}toggleValueFor(e,r){var{valueMap:n,onUpdateValueMap:a}=this.props,i=new Map(n),o=i.get(e);if(o instanceof Map){var s=new Map(o);if(r!=null)s.set(r,o.get(r)!==!0);else{var l=me.isParentSelected(e,i),d=l==null||!l;o.forEach((v,h)=>s.set(h,d))}i.set(e,s)}else i.set(e,o==null||!o);var p=i.get(e);if(r===void 0&&p!==void 0&&typeof p!="boolean"){var f=me.isParentSelected(e,n);f!=null&&f?p.forEach((v,h)=>p.set(h,!1)):p.forEach((v,h)=>p.set(h,!0))}a(i)}setAllValues(e){var{valueMap:r,onUpdateValueMap:n}=this.props,a=new Map;r.forEach((i,o)=>{if(typeof i=="boolean")a.set(o,e);else{var s=new Map;i.forEach((l,d)=>s.set(d,e)),a.set(o,s)}}),n(a)}selectAll(){this.setAllValues(!0)}clear(){this.setAllValues(!1)}renderMenuElement(){var{valueMap:e,"data-testid":r}=this.props;return c.jsxs("div",{className:"hcm-menu-container",children:[Array.from(e.entries()).map(n=>{var[a,i]=n;return c.jsxs("div",{children:[c.jsx(ut,{className:"hcm-parent",checked:me.isParentSelected(a,e),onChange:()=>this.toggleValueFor(a),children:a}),i!==void 0&&typeof i!="boolean"&&Array.from(i.entries()).map(o=>{var[s,l]=o;return c.jsx(ut,{className:"hcm-child",checked:l,onChange:()=>this.toggleValueFor(a,s),children:s},s)})]},a)}),c.jsx(re,{kind:"ghost",onClick:this.selectAll,"data-testid":r!==void 0?"".concat(r,"-btn-select-all"):void 0,children:"Select All"}),c.jsx(re,{kind:"ghost",onClick:this.clear,"data-testid":r!==void 0?"".concat(r,"-btn-clear"):void 0,children:"Clear"})]})}render(){var{menuText:e,className:r,icon:n,id:a,"data-testid":i}=this.props,{menuIsOpen:o}=this.state;return c.jsxs("button",{type:"button",className:R("btn hcm-btn",r),onClick:this.toggleMenu,id:a,"data-testid":i,children:[c.jsxs("span",{children:[n&&c.jsx(J,{icon:n,className:"hcm-icon mr-1"}),e]}),c.jsx("span",{className:"cs-caret"}),c.jsx(Rt,{options:{placement:"bottom"},isShown:o,onExited:()=>{this.setState({menuIsOpen:!1})},closeOnBlur:!0,interactive:!0,children:this.renderMenuElement()})]})}}ov(me,"defaultProps",{className:"",icon:null,id:"","data-testid":void 0});const uv=me;function Fr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function et(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Fr(Object(r),!0).forEach(function(n){cv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Fr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function cv(t,e,r){return e=dv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dv(t){var e=fv(t,"string");return typeof e=="symbol"?e:String(e)}function fv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var vi=u.memo(t=>{var{tab:e,onClose:r,onSelect:n,isActive:a,activeRef:i,index:o,isDraggable:s,contextActions:l}=t,{key:d,isClosable:p=r!=null,title:f,icon:v}=e,h;return v!=null&&(h=W.isValidElement(v)?v:c.jsx(J,{icon:v})),c.jsx(ro,{draggableId:d,index:o,isDragDisabled:!s,children:(g,w)=>c.jsxs("div",{className:"context-menu-wrapper",ref:a?i:null,children:[c.jsxs("div",et(et(et({ref:g.innerRef},g.draggableProps),g.dragHandleProps),{},{className:R("btn btn-link btn-nav-tab",{active:a},{dragging:w.isDragging}),"data-testid":"btn-nav-tab-".concat(f),role:"tab",tabIndex:0,onAuxClick:m=>{p&&m.button===1&&m.buttons===0&&(r==null||r(d))},onClick:m=>{if(p&&m.button===1&&m.buttons===0){r==null||r(d);return}m.button===0&&m.buttons===0&&(m.target.focus(),n(d))},onKeyPress:m=>{m.key==="Enter"&&n(d)},children:[h,f,p&&c.jsx(re,{kind:"ghost",className:"btn-nav-tab-close",onClick:m=>{r==null||r(d),m.stopPropagation(),m.preventDefault()},icon:Hn,tooltip:"Close"})]})),c.jsx(zn,{actions:l})]})},d)});vi.displayName="NavTab";const pv=vi;function Vr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Ur(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Vr(Object(r),!0).forEach(function(n){vv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Vr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function vv(t,e,r){return e=hv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function hv(t){var e=mv(t,"string");return typeof e=="symbol"?e:String(e)}function mv(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var gv=500,bv=.01,yv=5e-4;function Kr(t){return t.scrollLeft===0}function Br(t){return t.scrollLeft+t.clientWidth===t.scrollWidth||t.scrollWidth===0}function Ov(t,e,r){var{isClosable:n=!1,key:a}=t,i=[];if(n&&r!=null){i.push({title:"Close",order:10,group:20,action:()=>{r(a)}});for(var o=!0,s=e.length-1;s>0&&e[s].key!==t.key;s-=1)if(e[s].isClosable===!0){o=!1;break}i.push({title:"Close to the Right",order:20,group:20,action:()=>{for(var l=e.length-1;l>0&&e[l].key!==a;l-=1)e[l].isClosable===!0&&r(e[l].key)},disabled:o}),i.push({title:"Close All",order:30,group:20,action:()=>{e.forEach(l=>{l.isClosable===!0&&r(l.key)})}})}return i}function Pv(t){var{activeKey:e,tabs:r,onSelect:n,onReorder:a,onClose:i,makeContextActions:o}=t,s=u.useRef(),[l,d]=u.useState(!0),[p,f]=u.useState(!0),[v,h]=u.useState(!0),g=u.useCallback(()=>{s.current!=null&&(s.current.clientWidth<s.current.scrollWidth&&r.length>0?d(!0):d(!1),f(Kr(s.current)),h(Br(s.current)))},[r]);qe(s.current,g);var w=u.useCallback(P=>{vt.stopDragging(),P.destination&&(a==null||a(P.source.index,P.destination.index))},[a]),m=u.useCallback(()=>{if(s.current!=null){var P=Kr(s.current);P!==p&&f(P);var S=Br(s.current);S!==v&&h(S)}},[p,v]),y=u.useRef({cancelClick:!1}),O=u.useCallback(()=>{if(!(s.current==null||y.current.cancelClick))for(var{children:P}=s.current,S=P.length-1;S>=0;S-=1){var $=P[S];if($.offsetLeft<s.current.scrollLeft-5){$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"start"});return}}},[]),j=u.useCallback(()=>{if(!(s.current==null||y.current.cancelClick))for(var{children:P}=s.current,S=0;S<P.length;S+=1){var $=P[S];if($.offsetLeft+5>s.current.scrollLeft+s.current.offsetWidth){$.scrollIntoView({behavior:"smooth",block:"nearest",inline:"end"});return}}},[]),T=u.useCallback(function(P,S){var $=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0,M=arguments.length>3?arguments[3]:void 0,U=s.current;U!=null&&(y.current.cancelClick=!0,P==="left"?U.scrollLeft=S-$:P==="right"&&(U.scrollLeft=S+$),y.current.rAF=requestAnimationFrame(H=>{var G=M??H,C=H-G,D=bv*C+.5*yv*C**2;D=Math.min(D,U.scrollWidth),T(P,S,D,G)}))},[]),b=u.useCallback(()=>{var{holdTimer:P,rAF:S}=y.current;P!=null&&(clearTimeout(P),y.current.holdTimer=void 0),S!=null&&(cancelAnimationFrame(S),y.current.rAF=void 0),window.removeEventListener("mouseup",b)},[]);u.useEffect(()=>()=>window.removeEventListener("mouseup",b),[b]);var E=u.useCallback(P=>{s.current!=null&&(y.current.holdTimer=window.setTimeout(T,gv,P,s.current.scrollLeft)),y.current.cancelClick=!1,window.addEventListener("mouseup",b)},[b,T]),I=u.useCallback(()=>{E("left")},[E]),_=u.useCallback(()=>{E("right")},[E]);u.useEffect(function(){var S,$=M=>{M.stopPropagation(),M.preventDefault();var U=M.currentTarget,H=Math.abs(M.deltaY)>Math.abs(M.deltaX)?M.deltaY:M.deltaX;U.scrollLeft+=Mn(H,-30,30)};return(S=s.current)===null||S===void 0||S.addEventListener("wheel",$),()=>{var M;(M=s.current)===null||M===void 0||M.removeEventListener("wheel",$)}},[]);var k=u.useMemo(()=>{var P=new Map;return r.forEach(S=>{var{key:$}=S,M=[()=>Ov(S,r,i),()=>{var U;return(U=o==null?void 0:o(S))!==null&&U!==void 0?U:[]}];P.set($,M)}),P},[o,r,i]),A=u.useRef(null),B=r.find(P=>P.key===e),x=r.map((P,S)=>{var{key:$}=P,M=P===B;return c.jsx(pv,{tab:P,index:S,isActive:M,activeRef:A,onSelect:n,onClose:i,isDraggable:a!=null,contextActions:k.get($)},$)});return u.useEffect(function(){A.current!=null&&A.current.scrollIntoView({block:"nearest",inline:"nearest"})},[e]),c.jsxs("nav",{className:"nav-container",children:[l&&c.jsx(re,{kind:"ghost",icon:c.jsx(J,{icon:ds,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-left",tooltip:"Scroll left",onClick:O,onMouseDown:I,disabled:p}),c.jsx(no,{onDragStart:vt.startDragging,onDragEnd:w,children:c.jsx(ao,{droppableId:"droppable-tab-navigation",direction:"horizontal",children:(P,S)=>c.jsxs("div",Ur(Ur({ref:$=>{$!=null&&(s.current=$,P.innerRef($))}},P.droppableProps),{},{className:R("nav nav-tabs",{dragging:S.draggingFromThisWith}),role:"tablist",onScroll:m,children:[x,P.placeholder]}))})}),l&&c.jsx(re,{kind:"ghost",icon:c.jsx(J,{icon:fs,transform:"grow-4"}),className:"tab-controls-btn tab-controls-btn-right",tooltip:"Scroll right",onClick:j,onMouseDown:_,disabled:v})]})}var Sv=.025,wv=.9,xv=.1,Cv=.618,Hr=80,fe={SIZE:8,DOT_SIZE:2},ae=18,Ev=250,Tv=60*1e3,jv={background:"var(--dh-color-random-area-plot-animation-bg)",foregroundFill:"var(--dh-color-random-area-plot-animation-fg-fill)",foregroundStroke:"var(--dh-color-random-area-plot-animation-fg-stroke)",gridColor:"var(--dh-color-random-area-plot-animation-grid)"};function _v(){return Wn(jv)}var Iv=W.memo(()=>{var{activeThemes:t}=Ge(),e=u.useMemo(_v,[t]),r=u.useRef(null),n=u.useRef(null),[a,i]=u.useState(!1),o=window.devicePixelRatio,s,l,d,p,f,v=null,h=[];function g(){var x;n.current!=null&&(d=n.current.offsetWidth,p=n.current.offsetHeight),r.current!=null&&(r.current.style.width="".concat(d,"px"),r.current.style.height="".concat(p,"px"),r.current.width=d*o,r.current.height=p*o),(x=s)===null||x===void 0||x.scale(o,o)}function w(){var{foregroundFill:x,foregroundStroke:P}=e,S=document.createElement("canvas");S.width=fe.SIZE,S.height=fe.SIZE;var $=S.getContext("2d");return $!=null&&($.fillStyle=P,$.fillRect(0,0,fe.DOT_SIZE,fe.DOT_SIZE),$.fillStyle=x,$.fillRect(0,0,fe.SIZE,fe.SIZE)),$==null?void 0:$.createPattern(S,"repeat")}function m(x){var P=Math.random()-.5,S=Sv*P;return x<xv?S=Math.abs(S):x>wv&&(S=-Math.abs(S)),x+S}function y(){for(var x=[],P=Cv,S=0;S<d+ae;S+=1)P=m(P),x.push(P);return x}function O(){for(;h.length>=d+ae;)h.pop();for(;h.length<d+ae;)h.push(m(h[h.length-1]))}function j(x,P){P.beginPath(),P.moveTo(-1,p+1),P.lineTo(-1,p*x[0]);for(var S=0;S<x.length;S+=1)P.lineTo(S,p*x[S]);P.lineTo(d+ae,p*x[x.length-1]),P.lineTo(d+ae,p+1),P.closePath()}function T(x){x.beginPath();for(var P=1;P<d;P+=Hr)x.moveTo(P,0),x.lineTo(P,p);for(var S=1;S<p;S+=Hr)x.moveTo(0,S),x.lineTo(d,S)}function b(x){var P,S,$;v=(P=v)!==null&&P!==void 0?P:x;var{background:M,foregroundStroke:U,gridColor:H}=e;Nt(s),s.fillStyle=M,s.fillRect(0,0,d,p),T(s),s.lineWidth=1,s.strokeStyle=H,s.stroke();var G=(((S=v)!==null&&S!==void 0?S:0)-(x??0))/(1e3/ae);if(s.translate(G,0),j(h,s),s.lineWidth=2,s.strokeStyle=U,s.stroke(),s.translate(-G,0),l!=null&&(s.fillStyle=l),s.fill(),s.setTransform(o,0,0,o,0,0),(x??0)-(($=v)!==null&&$!==void 0?$:0)>1e3/ae){for(var C,D=Math.floor(((x??0)-((C=v)!==null&&C!==void 0?C:0))/(1e3/ae)),N=0;N<D;N+=1)h.shift(),h.push(m(h[h.length-1]));v=x}f!=null&&cancelAnimationFrame(f),f=requestAnimationFrame(b)}var E=xe(()=>{f=requestAnimationFrame(x=>{g(),O(),i(!1),b(x)})},Ev,{leading:!0});function I(){i(!0),f!=null&&cancelAnimationFrame(f),f=null,v=null}var _=xe(()=>{I()},Tv);function k(){f==null&&(i(!1),g(),O(),f=requestAnimationFrame(b)),_()}function A(){document.hasFocus()&&k()}function B(){f!=null&&cancelAnimationFrame(f),_(),E()}return u.useEffect(()=>{var x;return s=(x=r.current)===null||x===void 0?void 0:x.getContext("2d",{alpha:!1}),g(),h=y(),l=w(),b(),_(),window.addEventListener("resize",B),window.addEventListener("focus",k),window.addEventListener("blur",I),window.addEventListener("mousemove",A),window.addEventListener("keydown",A),()=>{f!=null&&cancelAnimationFrame(f),window.removeEventListener("resize",B),window.removeEventListener("focus",k),window.removeEventListener("blur",I),window.removeEventListener("mousemove",A),window.removeEventListener("keydown",A),_.cancel(),E.cancel()}},[e]),c.jsx("div",{className:"random-area-plot-animation-container",ref:n,children:c.jsx("canvas",{ref:r,className:a?"shade":""})})});const hi=Iv;function mi(t){var{text:e,placement:r="top-start"}=t,n=u.useMemo(()=>({placement:r}),[r]);return c.jsxs(c.Fragment,{children:[c.jsx(Bt,{UNSAFE_className:Ht.spectrumEllipsis,children:e??c.jsx(c.Fragment,{children:" "})}),e==null||e===""?null:c.jsx(ze,{options:n,children:e})]})}var $v=["scrollRef","getItemDisplayText","getKey"];function Wr(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function Gr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Wr(Object(r),!0).forEach(function(n){Dv(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Wr(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Dv(t,e,r){return e=Nv(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Nv(t){var e=Av(t,"string");return typeof e=="symbol"?e:String(e)}function Av(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function kv(t,e){if(t==null)return{};var r=Rv(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Rv(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Mv(t){var{scrollRef:e,getItemDisplayText:r,getKey:n}=t,a=kv(t,$v),i=u.useCallback(o=>{var s=n(o),l=r(o);return c.jsx(It,{textValue:l??String(s),children:c.jsx(mi,{text:l})},s)},[r,n]);return c.jsx(Tn,Gr(Gr({},a),{},{ref:e,menuTrigger:"focus",onSelectionChange:a.onSelectionChange,children:i}))}var Lv=500;function Fv(t){var{heading:e,content:r,delayMs:n=Lv}=t,[a,i]=u.useState(!1);return u.useEffect(()=>{window.setTimeout(()=>{i(!0)},n)},[n]),a?c.jsxs(Ln,{children:[c.jsx(He,{size:"XXL",children:c.jsx(J,{icon:ps})}),c.jsx(_n,{children:e}),r==null?null:c.jsx(Dt,{children:r})]}):null}const Vv="_modified_5rbci_24",Uv="_track_5rbci_35",Kv="_handle_5rbci_15",Bv="_ticks_5rbci_103",gi={"handle-size":"15px","popover-width":"90px","time-slider":"_time-slider_5rbci_5","time-slider-popovers":"_time-slider-popovers_5rbci_10","handle-popper":"_handle-popper_5rbci_15",modified:Vv,"flex-spacer":"_flex-spacer_5rbci_31",track:Uv,"track-fills":"_track-fills_5rbci_42","track-fill":"_track-fill_5rbci_42","track-fill-start":"_track-fill-start_5rbci_60","track-fill-middle":"_track-fill-middle_5rbci_61","track-fill-end":"_track-fill-end_5rbci_64","handle-track":"_handle-track_5rbci_67",handle:Kv,ticks:Bv,"tick-labels":"_tick-labels_5rbci_121","tick-label":"_tick-label_5rbci_121","tick-label-wrapper":"_tick-label-wrapper_5rbci_137"};var Ae=parseInt(gi["handle-size"],10),zr=parseInt(gi["popover-width"],10),Y=24*60*60-1,Yr=5*60;function Hv(t){var{startTime:e,endTime:r,onChange:n,isStartModified:a=!1,isEndModified:i=!1,"data-testid":o}=t,[s,l]=u.useState(e),[d,p]=u.useState(r),f=u.useRef(null);u.useEffect(function(){l(e),p(r)},[e,r]);var v=u.useCallback((w,m)=>{var y=w,O=m;y===O&&(O<Y?O+=1:y-=1),l(y),p(O),n({startTime:y,endTime:O})},[l,p,n]),h=u.useCallback(w=>{v(w,d)},[v,d]),g=u.useCallback(w=>{v(s,w)},[v,s]);return c.jsxs("div",{className:"time-slider","data-testid":o,children:[c.jsx(Wv,{startTime:s,endTime:d,onStartTimeChange:h,onEndTimeChange:g,isStartModified:a,isEndModified:i}),c.jsxs("div",{className:"track",ref:f,children:[c.jsx(Gv,{startTime:s,endTime:d}),c.jsx("div",{className:"ticks",children:Array(24).fill(null).map((w,m)=>c.jsx("div",{className:"tick"},m))}),c.jsx(qr,{track:f,time:s,setTime:h}),c.jsx(qr,{track:f,time:d,setTime:g})]}),c.jsxs("div",{className:"tick-labels",children:[c.jsx("div",{className:"tick-label",children:"0:00"}),c.jsx("div",{className:"tick-label-wrapper",children:Array(24).fill(null).map((w,m)=>c.jsx("div",{className:"tick-label",children:"".concat(m+1,":00")},m))})]})]})}function Wv(t){var{startTime:e,endTime:r,onStartTimeChange:n,onEndTimeChange:a,isStartModified:i,isEndModified:o,"data-testid":s}=t,l=e>r,[d,p]=u.useState(l?r:e),[f,v]=u.useState(l?e:r),h=u.useRef(null),g=u.useRef(null),w=u.useRef(null),m=u.useRef(null);u.useEffect(function(){p(e>r?r:e),v(e>r?e:r)},[e,r]),u.useEffect(function(){if(w.current!==null){var E;(E=g.current)===null||E===void 0||E.setSelection(w.current)}if(m.current!==null){var I;(I=h.current)===null||I===void 0||I.setSelection(m.current)}},[l]);function y(b){e<=r?n(b):a(b)}function O(b){e<=r?a(b):n(b)}var j=u.useCallback(b=>{w.current=b,m.current=null},[]),T=u.useCallback(b=>{w.current=null,m.current=b},[]);return c.jsxs("div",{className:"time-slider-popovers",children:[c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat(d/Y*100,"% - ").concat(zr/2,"px)")}}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:R({modified:l?o:i}),children:l?"End Time":"Start Time"}),c.jsx(Ke,{ref:h,allowValueWrapping:!1,value:d,onChange:y,onSelect:j,"data-testid":s!==void 0?"".concat(s,"-input-1"):void 0})]}),c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"handle-popper",children:[c.jsx("label",{className:R({modified:l?i:o}),children:l?"Start Time":"End Time"}),c.jsx(Ke,{ref:g,allowValueWrapping:!1,value:f,onChange:O,onSelect:T,"data-testid":s!==void 0?"".concat(s,"-input-2"):void 0})]}),c.jsx("div",{className:"flex",style:{flexBasis:"calc(".concat((Y-f)/Y*100,"% - ").concat(zr/2,"px)")}})]})}function Gv(t){var{startTime:e,endTime:r,"data-testid":n}=t;return c.jsxs("div",{className:"track-fills","data-testid":n,children:[e>r&&c.jsxs(c.Fragment,{children:[c.jsx("div",{className:"track-fill track-fill-start",style:{transform:"scaleX(".concat(r/Y,")")}}),c.jsx("div",{className:"track-fill track-fill-end",style:{transform:"scaleX(".concat((Y-e)/Y,")")}})]}),e<r&&c.jsx("div",{className:"track-fill track-fill-middle",style:{transform:"translateX(".concat(e/Y*100,"%) scaleX(").concat((r-e)/Y,")")}})]})}function qr(t){var{track:e,time:r,setTime:n,"data-testid":a}=t,i=u.useMemo(()=>{var v=3600,h=Ae/2;return r<v?h=r/v*(Ae/2):r>23*v&&(h=Ae/2+1/(Y-23*v)*(r-23*v)*(Ae/2)),"translateX(calc(".concat(r/Y*100,"% - ").concat(h,"px))")},[r]),o=u.useCallback(v=>{if(!e.current)return 0;var h=e.current.getBoundingClientRect(),g=Math.max(v-h.left,0),w=Y*Math.min(1,g/h.width),m=Yr*Math.round(w/Yr),y=Math.min(Y,m);return y},[e]),s=u.useCallback(v=>{var{clientX:h}=v;n(o(h))},[n,o]),l=u.useCallback(v=>{var{clientX:h}=v;n(o(h)),window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[n,o,s]),d=u.useCallback(()=>{window.addEventListener("mousemove",s),window.addEventListener("mouseup",l),document.documentElement.classList.add("drag-pointer-events-none")},[s,l]),p=u.useCallback(()=>{window.removeEventListener("mousemove",s),window.removeEventListener("mouseup",l),document.documentElement.classList.remove("drag-pointer-events-none")},[s,l]),f=u.useCallback(()=>{d()},[d]);return u.useEffect(function(){return()=>{p()}},[p]),c.jsx("div",{className:"handle-track",style:{transform:i},children:c.jsx("button",{className:"handle",type:"button","aria-label":"Change time",onMouseDown:f,"data-testid":a})})}function bi(t){var{buttons:e,isShown:r=!1,classNames:n,message:a,type:i,onClick:o,onDismiss:s,"data-testid":l}=t,d=e&&e.length!==0;return c.jsx(Rn,{in:r,timeout:st.transitionMs,classNames:"toast-notification-slide-up",mountOnEnter:!0,unmountOnExit:!0,children:c.jsxs("div",{className:R("toast-notification",n,i),role:"presentation",onClick:o,onKeyPress:o,"data-testid":l,children:[c.jsx("div",{className:"message-container",children:c.jsx("span",{className:"message",children:a})}),c.jsx(Mt,{in:d,timeout:st.transitionSlowMs,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx("div",{className:"buttons-container",children:e})}),s&&c.jsx(re,{kind:"ghost",icon:Hn,tooltip:"Close notification",className:"my-2",onClick:s})]})})}bi.TYPE=Object.freeze({ERROR:"error"});const zv=Object.freeze(Object.defineProperty({__proto__:null,ACTION_ICON_HEIGHT:Wt,ActionBar:kn,ActionButton:$t,ActionButtonDialogTrigger:oi,ActionGroup:Rc,ActionMenu:Mc,AlertDialog:io,AutoCompleteInput:Lp,AutoResizeTextarea:Jt,Avatar:oo,Badge:so,BasicModal:Yn,Breadcrumbs:lo,BulkActionBar:Kp,Button:Js,ButtonGroup:An,CSS_VAR_EXPRESSION_PREFIX:vs,Calendar:uo,CardFlip:xu,Checkbox:ut,CheckboxGroup:co,Collapse:Wp,ColorValues:Lc,ComboBox:Fc,ComboBoxNormalized:ni,ConfirmActionButton:Tp,ConfirmationDialog:si,Content:Dt,ContextActionUtils:Zs,ContextActions:zn,ContextMenuItem:Qs,ContextMenuRoot:uu,ContextualHelp:fo,CopyButton:Oa,CustomTimeSelect:Zp,DEFAULT_DARK_THEME_KEY:hs,DEFAULT_DARK_THEME_PALETTE:ms,DEFAULT_GET_PREFERRED_REPLACEMENT_STRING:Aa,DEFAULT_LIGHT_THEME_KEY:gs,DEFAULT_PRELOAD_DATA_VARIABLES:bs,DateField:po,DateInput:nv,DatePicker:vo,DateRangePicker:ho,DateTimeInput:Vc,DebouncedModal:ui,DebouncedSearchInput:el,Dialog:$n,DialogContainer:mo,DialogTrigger:In,Divider:Dn,DragUtils:vt,DraggableItemList:Uc,DropdownMenu:Gn,EditableItemList:av,ErrorBoundary:tl,ErrorView:iv,FadeTransition:Mt,Flex:jn,Footer:go,Form:Nn,GLOBAL_SHORTCUTS:rl,Grid:bo,Heading:Xt,HierarchicalCheckboxMenu:uv,ITEM_EMPTY_STRING_TEXT_VALUE:Kc,Icon:He,IconActionButton:li,IllustratedMessage:Ln,Image:yo,InfoModal:ci,InlineAlert:Oo,Item:It,ItemContent:Bc,ItemList:lt,ItemListItem:nl,ItemTooltip:Hc,get KEY(){return al},Keyboard:Po,LIST_VIEW_ROW_HEIGHTS:ka,LabeledValue:So,Link:wo,ListActionGroup:Wc,ListActionMenu:Gc,ListView:Qf,ListViewNormalized:ai,ListViewWrapper:qt,LoadingOverlay:ce,LoadingSpinner:At,LogicButton:xo,Logo:jf,get MODIFIER(){return il},MaskedInput:Gt,Menu:zc,MenuItem:Yc,MenuTrigger:Co,Meter:Eo,Modal:Kn,ModalBody:Bn,ModalFooter:ol,ModalHeader:ys,NON_WHITESPACE_REGEX:Os,NavTabList:Pv,NumberField:To,Option:Ra,PICKER_ITEM_HEIGHTS:qc,PICKER_TOP_OFFSET:Xc,Page:Jc,Picker:ri,PickerNormalized:Zc,Popper:Rt,ProgressBar:jo,ProgressCircle:_o,Radio:Io,RadioGroup:$o,RandomAreaPlotAnimation:hi,RangeCalendar:Do,RangeSlider:No,SVG_ICON_MANUAL_COLOR_MAP:Ps,SearchInput:qn,SearchableCombobox:Mv,Section:Qc,Select:Xn,SelectValueList:Ma,Shortcut:sl,ShortcutRegistry:ll,SlideTransition:ed,Slider:Ao,SocketedButton:Cu,SpectrumButton:ot,SpectrumCheckbox:ko,SplitButtonGroup:ul,Stack:td,StatusLight:Ro,Switch:Mo,TABLE_ROW_HEIGHT:rd,THEME_CACHE_LOCAL_STORAGE_KEY:Ss,TMP_CSS_PROP_PREFIX:ws,TabList:Lo,TabPanels:Fo,TableViewEmptyState:Fv,Tabs:Vo,TagGroup:Uo,Text:Bt,TextArea:Ko,TextField:Bo,TextWithTooltip:mi,ThemeContext:cl,ThemeExport:st,ThemePicker:Tf,ThemeProvider:Jn,TimeField:Ho,TimeInput:Ke,TimeSlider:Hv,ToastNotification:bi,ToggleButton:Wo,Tooltip:ze,UISwitch:dl,View:ii,WHITESPACE_REGEX:xs,Well:Go,XComponentMapContext:Eu,XComponentMapProvider:Tu,baseStyleProps:zo,calculatePreloadStyleContent:Cs,canHaveRef:Zn,colorValueStyle:q,createCssVariableResolver:Es,createPreloadStyleElement:Ts,createXComponent:ju,extractDistinctCssVariableExpressions:js,fillToLength:nd,getActiveThemes:_s,getDefaultBaseThemes:Is,getExpressionRanges:$s,getItemKey:pt,getItemTextValue:ad,getPositionOfSelectedItemElement:id,getThemeKey:Ds,getThemePreloadData:Ns,isClassComponent:fl,isDHColorValue:od,isForwardRefComponentType:pl,isItemElement:sd,isItemElementWithDescription:ld,isItemOrSection:ud,isNormalizedItemsWithKeysList:cd,isNormalizedSection:dd,isSectionElement:fd,isWrappedComponent:Qn,itemSelectionToStringSet:Le,normalizeTooltipOptions:Kt,overrideSVGFillColors:As,preloadTheme:ks,replaceSVGFillColor:Rs,resolveCssVariablesInRecord:Wn,resolveCssVariablesInString:Ms,separateSpectrumProps:ei,setThemePreloadData:Ls,themeDHDefault:vl,themeDark:Fs,themeLight:Vs,trimTrailingMask:pd,useOnChangeTrackUncontrolled:vd,usePickerItemScale:La,usePickerNormalizedProps:$a,usePickerProps:Ia,usePickerScrollOnOpen:hd,useRenderNormalizedItem:Na,useSpectrumThemeProvider:Ut,useStaticItemInitialScrollPosition:md,useStringifiedMultiSelection:ti,useStringifiedSelection:gd,useStyleProps:Yo,useTheme:Ge,useXComponent:_u,viewStyleProps:qo,wrapIcon:bd,wrapItemChildren:Da,wrapPrimitiveWithText:yd},Symbol.toStringTag,{value:"Module"}));function Xr(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Yv(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Xr(i,n,a,o,s,"next",l)}function s(l){Xr(i,n,a,o,s,"throw",l)}o(void 0)})}}var yi=u.createContext(null);function Oi(t){var[e,r]=u.useState(null),[n,a]=u.useState(null),i=u.useContext(yi),o=u.useContext(We);return u.useEffect(()=>{if(i==null){if(o!=null){r(o),a(null);return}r(null),a(new Error("No API available in useDeferredApi. Was code wrapped in ApiBootstrap or DeferredApiContext.Provider?"));return}var s=!1;function l(){return d.apply(this,arguments)}function d(){return d=Yv(function*(){if(typeof i=="function")try{var p=yield i(t);s||(r(p),a(null))}catch(f){s||(r(null),a(f))}else r(i)}),d.apply(this,arguments)}return l(),()=>{s=!0}},[o,i,t]),[e,n]}var Pi=W.memo(t=>{var{children:e,onError:r,widget:n}=t,[a,i]=Oi(n);return i!=null?(r==null||r(i),null):a==null?null:c.jsx(We.Provider,{value:a,children:e})});Pi.displayName="DeferredApiBootstrap";var Zt=u.createContext(null);function Si(t){var[e,r]=u.useState({status:"loading"}),n=u.useContext(Zt);return u.useEffect(()=>{if(n==null){r({error:new Error("No ObjectFetchManager available in context"),status:"error"});return}return r(a=>a.status==="loading"?a:{status:"loading"}),n.subscribe(t,r)},[t,n]),e}function Jr(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function qv(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Jr(i,n,a,o,s,"next",l)}function s(l){Jr(i,n,a,o,s,"throw",l)}o(void 0)})}}var ke=K.module("useWidget");function Xv(t){var[e,r]=u.useState(()=>({widget:null,error:null})),n=Si(t);return u.useEffect(function(){ke.debug("loadWidget",t);var{status:i}=n;if(i==="error"){r({widget:null,error:n.error});return}if(i==="loading"){r({widget:null,error:null});return}var{fetch:o}=n,s=!1;function l(){return d.apply(this,arguments)}function d(){return d=qv(function*(){try{Nt(o);var p=yield o();if(s){ke.debug2("loadWidgetInternal cancelled",t,p),p.close(),"exportedObjects"in p&&p.exportedObjects.forEach(f=>{f.close()});return}ke.debug("loadWidgetInternal done",t,p),r({widget:p,error:null})}catch(f){if(s)return;ke.error("loadWidgetInternal error",t,f),r({widget:null,error:f??new Error("Null error")})}}),d.apply(this,arguments)}return l(),()=>{s=!0}},[t,n]),e}const Jv=Object.freeze(Object.defineProperty({__proto__:null,ApiBootstrap:Us,ApiContext:We,ClientBootstrap:ga,ClientContext:cu,DeferredApiBootstrap:Pi,DeferredApiContext:yi,ObjectFetchManagerContext:Zt,ObjectFetcherContext:ea,getVariableDescriptor:hl,isIdVariableDescriptor:ml,isNameVariableDescriptor:gl,isVariableDescriptor:bl,sanitizeVariableDescriptor:ta,useApi:de,useClient:Oe,useDeferredApi:Oi,useObjectFetch:Si,useObjectFetcher:yl,useWidget:Xv},Symbol.toStringTag,{value:"Module"}));function Zv(t){return function(r){var{children:n}=r;return c.jsx(We.Provider,{value:t,children:n})}}function Zr(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Qv(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Zr(i,n,a,o,s,"next",l)}function s(l){Zr(i,n,a,o,s,"throw",l)}o(void 0)})}}var tt=K.module("MessageUtils"),wi="io.deephaven.message.LoginOptions.request",xi="io.deephaven.message.SessionDetails.request",Ci="io.deephaven.broadcast",Qt="io.deephaven.broadcast.Login",Ei="io.deephaven.broadcast.Logout";function Je(t){var e=t;return e!=null&&typeof e.id=="string"&&typeof e.message=="string"}function Ti(t){return Je(t)&&t.message===Qt}function ji(t){return Je(t)&&t.message===Ei}function _i(t){var e=t;return e!=null&&typeof e.id=="string"}function er(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:je(),r=arguments.length>2?arguments[2]:void 0;return{message:t,id:e,payload:r}}function eh(t,e){return{id:t,payload:e}}function tr(){return window.opener!=null?window.opener:window.parent!=null&&window.parent!==window?window.parent:null}function rr(t){return gt.apply(this,arguments)}function gt(){return gt=Qv(function*(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:3e4,r=tr();if(r==null)throw new Error("window parent is null, unable to send request.");return new Promise((n,a)=>{var i,o=je(),s=l=>{var{data:d}=l;if(!_i(d)){tt.debug("Ignoring non-deephaven response",d);return}if(tt.debug("Received message",d),(d==null?void 0:d.id)!==o){tt.debug("Ignore message, id doesn't match",d);return}window.clearTimeout(i),window.removeEventListener("message",s),n(d.payload)};window.addEventListener("message",s),i=window.setTimeout(()=>{window.removeEventListener("message",s),a(new Ol("Request timed out"))},e),r.postMessage(er(t,o),"*")})}),gt.apply(this,arguments)}function th(t,e,r){return e=rh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function rh(t){var e=nh(t,"string");return typeof e=="symbol"?e:String(e)}function nh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ii extends Error{constructor(){super(...arguments),th(this,"isNoConsolesError",!0)}}function $i(t){return t.isNoConsolesError}function Qr(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Ze(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Qr(i,n,a,o,s,"next",l)}function s(l){Qr(i,n,a,o,s,"throw",l)}o(void 0)})}}var ve=K.module("SessionUtils");function ah(t,e){return ve.info("Starting connection to '".concat(e,"'...")),new t.IdeConnection(e)}function Di(t,e,r){return bt.apply(this,arguments)}function bt(){return bt=Ze(function*(t,e,r){ve.info("Getting console types...");var n=yield e.getConsoleTypes();if(n.length===0)throw new Ii("No console types available");ve.info("Available types:",n);var a=n[0];ve.info("Starting session with type",a);var i=yield e.startSession(a),o={type:a,id:je()};return ve.info("Console session established",o),{session:i,config:o,connection:e,details:r,dh:t}}),bt.apply(this,arguments)}function ih(t,e,r){return ve.info("createCoreClient",e),new t.CoreClient(e,r)}function oh(t){return t!=null&&typeof t=="object"}function sh(){return yt.apply(this,arguments)}function yt(){return yt=Ze(function*(){var t=yield rr(xi);if(!oh(t))throw new Error("Unexpected session details response: ".concat(t));return t}),yt.apply(this,arguments)}function lh(){return Ot.apply(this,arguments)}function Ot(){return Ot=Ze(function*(){var t=new URLSearchParams(window.location.search);switch(t.get("authProvider")){case"parent":return sh()}return{}}),Ot.apply(this,arguments)}function uh(t,e,r){return Pt.apply(this,arguments)}function Pt(){return Pt=Ze(function*(t,e,r){var n;try{n=yield Di(t,e,r)}catch(a){if(!$i(a))throw a}return n}),Pt.apply(this,arguments)}const ch=Object.freeze(Object.defineProperty({__proto__:null,BROADCAST_CHANNEL_NAME:Ci,BROADCAST_LOGIN_MESSAGE:Qt,BROADCAST_LOGOUT_MESSAGE:Ei,BooleanColumnFormatter:Iu,CharColumnFormatter:$u,DateTimeColumnFormatter:Pl,DateUtils:Du,DecimalColumnFormatter:Sl,DefaultColumnFormatter:Nu,FETCH_TIMEOUT:du,Formatter:Lt,FormatterUtils:ft,ITEM_KEY_PREFIX:Au,IntegerColumnFormatter:wl,LOGIN_OPTIONS_REQUEST:wi,NoConsolesError:Ii,SESSION_DETAILS_REQUEST:xi,StringColumnFormatter:ku,TableColumnFormatter:xl,TableUtils:Ru,createComboboxFilterArgs:Mu,createConnection:ah,createCoreClient:ih,createFilterConditionFactory:Ft,createFormatterFromSettings:Lu,createKeyFromOffsetRow:Fu,createKeyedItemKey:Pa,createNotNullOrEmptyFilterCondition:Sa,createOnTableUpdatedHandler:Vu,createSearchTextFilter:wa,createSelectedValuesFilter:Vt,createSessionWrapper:Di,createShowOnlyEmptyFilterCondition:xa,createValueFilter:Ca,defaultRowDeserializer:Uu,fetchVariableDefinition:fu,generateEmptyKeyedItems:Ku,getColumnFormats:Bu,getDateTimeFormatterOptions:Hu,getSessionDetails:lh,getSize:Wu,getWindowParent:tr,isBroadcastLoginMessage:Ti,isBroadcastLogoutMessage:ji,isClosed:Ea,isCustomColumnFormatDefined:Gu,isMessage:Je,isNoConsolesError:$i,isResponse:_i,isSortDirection:zu,loadSessionWrapper:uh,makeMessage:er,makeResponse:eh,padFirstAndLastRow:Yu,requestParentResponse:rr},Symbol.toStringTag,{value:"Module"}));function dh(t,e,r){return e=fh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function fh(t){var e=ph(t,"string");return typeof e=="symbol"?e:String(e)}function ph(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class vh extends Error{constructor(){super(...arguments),dh(this,"isColumnNameError",!0)}}const hh=vh;function mh(t,e,r){return e=gh(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function gh(t){var e=bh(t,"string");return typeof e=="symbol"?e:String(e)}function bh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class yh extends Error{constructor(){super(...arguments),mh(this,"isTableDisconnectError",!0)}}const Oh=yh;var Re=K.module("useTable"),Ph=(t,e,r,n)=>{var a=de(),[i,o]=u.useState(void 0),[s,l]=u.useState([]),[d,p]=u.useState(null),[f,v]=u.useState(null);u.useEffect(()=>{if(n===void 0){o(t==null?void 0:t.columns),p(null);return}try{o(t==null?void 0:t.findColumns(n)),p(null)}catch(m){Re.error("Column not found",m,n),p(new hh("Invalid columnNames argument"))}},[t,n]),u.useEffect(()=>{if(!i||!t){Re.debug2("Table or column not initialized, skip viewport update.");return}Re.debug2("Setting viewport",e,r),t.setViewport(e,r,i)},[i,t,e,r]);var h=u.useCallback(m=>{var{detail:y}=m;if(!i){Re.error("Columns not initialized.");return}var O=i.map(j=>y.rows.map(T=>T.get(j)));l(O)},[i]),g=u.useCallback(()=>{v(new Oh("Table disconnected"))},[]),w=u.useCallback(()=>{v(null)},[]);return Fe(t,a.Table.EVENT_UPDATED,h),Fe(t,a.Table.EVENT_DISCONNECT,g),Fe(t,a.Table.EVENT_RECONNECT,w),{columns:i,data:s,error:f??d}};const Ni=Ph;var Sh=(t,e,r,n)=>{var a=u.useMemo(()=>[n],[n]),{columns:i=[],data:o=[],error:s}=Ni(t,e,r,a);return{column:i[0],data:o[0],error:s}};const Ai=Sh;function en(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function wh(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){en(i,n,a,o,s,"next",l)}function s(l){en(i,n,a,o,s,"throw",l)}o(void 0)})}}var ee=K.module("TableInput"),rt=250;function nr(t){var e,r,{className:n=void 0,columnName:a,settings:i,defaultValue:o=[],isInvalid:s=!1,onChange:l=()=>!1,onBlur:d=()=>!1,table:p}=t,f=u.useRef(null),v=de(),h=u.useMemo(()=>{var C=ft.getColumnFormats(i),D=ft.getDateTimeFormatterOptions(i),{defaultDecimalFormatOptions:N={},defaultIntegerFormatOptions:V={}}=i;return new Lt(v,C,D,N,V)},[v,i]),[g,w]=u.useState(""),[m,y]=u.useState(new Set(o)),[O,j]=u.useState(),T=u.useRef(null),b=Math.min((e=O==null?void 0:O.size)!==null&&e!==void 0?e:0,rt),{column:E,data:I,error:_}=Ai(O,0,rt-1,a),k=u.useCallback(C=>E?h.getFormattedString(C,E.type,E.name):"".concat(C),[E,h]),[A,B]=u.useMemo(()=>{var C=new Set(m),D=[];if(I==null)return[D,null];if(I.forEach(V=>{var ne="".concat(V),lr=m.has(ne);lr&&C.delete(ne),D.push({value:ne,displayValue:k(V),isSelected:lr})}),C.size>0){ee.debug2("Selection has items that are missing from the viewport");var N=new Set(m);return Array.from(C).forEach(V=>{N.delete(V)}),[D,N]}return[D,null]},[I,m,k]);u.useEffect(()=>{B!==null&&(y(B),l(Array.from(B)))},[l,B]);var x=u.useCallback(function(){var C=wh(function*(D){try{var N=yield D;ee.debug("Table resolved",N),j(N)}catch(V){if(we.isCanceled(V))return;ee.error(V)}});return function(D){return C.apply(this,arguments)}}(),[]);u.useEffect(()=>{var C=we.makeCancelable(p);return x(C),()=>{ee.debug2("Cancel table promise"),C.cancel()}},[p,x]);var P=u.useCallback(C=>{var{value:D}=C.target;w(D);var N=A.findIndex(ne=>ne.displayValue.includes(D));if(N>-1){var V;ee.debug2("Found ".concat(D," at index ").concat(N)),(V=T.current)===null||V===void 0||V.scrollIntoView(N)}else ee.debug2("".concat(D," not found"))},[A,T]),S=u.useCallback(C=>{if(ee.debug("handleSelect",C),C>=A.length){ee.error("Invalid index",C);return}var D=A[C].value,N=new Set(m);A[C].isSelected?N.delete(D):N.add(D),y(N),l(Array.from(N))},[l,A,m]),$=u.useCallback(()=>{var C=A.map(N=>N.value),D=new Set(C);y(D),l(C)},[A,l]),M=u.useCallback(()=>{y(new Set),l([])},[l]),U=u.useCallback(()=>{},[]),H=u.useCallback(C=>{var D,{relatedTarget:N}=C;ee.debug("handleChildBlur",N,N instanceof HTMLElement,f.current,(D=f.current)===null||D===void 0?void 0:D.contains(N)),(!N||f.current&&N instanceof HTMLElement&&!f.current.contains(N))&&d()},[d]),G=A.length===0;return c.jsxs("div",{ref:f,className:R("table-input-container d-flex flex-column position-relative",n),children:[c.jsx(qn,{disabled:!!_||G,value:g,placeholder:"Search",onChange:P,className:"mb-2 d-flex",onBlur:H}),c.jsx(Ma,{className:"table-input-list",disabled:O===void 0||G,isInvalid:s,items:G?[{value:"Empty",isSelected:!1}]:A,itemCount:b,offset:0,onSelect:S,onViewportChange:U,ref:T,onBlur:H}),O&&c.jsxs("div",{className:"meta-row",children:[c.jsx("div",{className:"d-flex align-items-center text-muted small",children:O!=null&&O.size>b&&c.jsxs(c.Fragment,{children:["Table is too large, showing the first ",rt," items."]})}),c.jsxs("div",{children:[c.jsx("button",{type:"button",className:"btn btn-link",onBlur:H,onClick:$,children:"Select All"}),c.jsx("button",{type:"button",className:"btn btn-link mr-a",onBlur:H,onClick:M,children:"Clear"})]})]}),O==null||_&&c.jsx("div",{className:"h-100 w-100 position-absolute",children:c.jsx(ce,{isLoaded:O!=null,isLoading:O==null&&_==null,errorMessage:(r=_==null?void 0:_.message)!==null&&r!==void 0?r:null})})]})}nr.displayName="TableInput";nr.defaultProps={isInvalid:!1,className:void 0};var tn=K.module("useBroadcastChannel");function ar(){var t=arguments.length>0&&arguments[0]!==void 0?arguments[0]:kt,e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:Ci,r=u.useMemo(()=>new BroadcastChannel(e),[e]);return u.useEffect(()=>()=>{r.close()},[r]),u.useEffect(()=>{function n(a){var{data:i}=a;if(!Je(i)){tn.debug("Ignoring non-deephaven message",i);return}tn.debug("event received",i),t(a)}return r.addEventListener("message",n),()=>{r.removeEventListener("message",n)}},[r,t]),r}function Qe(t,e){var r=u.useCallback(n=>{Ti(n.data)?t==null||t(n.data):ji(n.data)&&(e==null||e(n.data))},[t,e]);ar(r)}var Be="io.deephaven.web.client.auth.refreshToken",ki=u.createContext(null),xh=K.module("RefreshTokenUtils");function St(){var t=ye.get(Be);try{if(t!=null)return JSON.parse(t)}catch(e){xh.error("Error parsing refresh token",t,e)}return null}function wt(t){if(t==null){ye.remove(Be);return}var e=JSON.stringify({bytes:t.bytes,expiry:t.expiry}),r=new Date(t.expiry);ye.set(Be,e,{secure:!0,sameSite:"strict",expires:r})}function Ri(t){var{children:e}=t,r=de(),n=Oe(),[a,i]=u.useState(St());u.useEffect(function(){var d=n.addEventListener(r.CoreClient.EVENT_REFRESH_TOKEN_UPDATED,p=>{var{detail:f}=p;wt(f),i(f)});return d},[r,n,a]);var o=u.useCallback(()=>{i(St())},[]),s=u.useCallback(()=>{wt(null),i(null)},[]);return Qe(o,s),c.jsx(ki.Provider,{value:a,children:e})}var Ch=["onInputChange","onSearchTextChange"];function rn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function nn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?rn(Object(r),!0).forEach(function(n){Eh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):rn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Eh(t,e,r){return e=Th(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Th(t){var e=jh(t,"string");return typeof e=="symbol"?e:String(e)}function jh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _h(t,e){if(t==null)return{};var r=Ih(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Ih(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function $h(t){var e=Od(t),{onInputChange:r,onSearchTextChange:n}=e,a=_h(e,Ch),i=u.useCallback(o=>{r==null||r(o),n(o)},[r,n]);return c.jsx(ni,nn(nn({},a),{},{onInputChange:i}))}var Dh=["table","keyColumn","labelColumn","iconColumn","settings"];function an(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function on(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?an(Object(r),!0).forEach(function(n){Nh(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):an(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Nh(t,e,r){return e=Ah(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ah(t){var e=kh(t,"string");return typeof e=="symbol"?e:String(e)}function kh(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Rh(t,e){if(t==null)return{};var r=Mh(t,e),n,a;if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);for(a=0;a<i.length;a++)n=i[a],!(e.indexOf(n)>=0)&&Object.prototype.propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}function Mh(t,e){if(t==null)return{};var r={},n=Object.keys(t),a,i;for(i=0;i<n.length;i++)a=n[i],!(e.indexOf(a)>=0)&&(r[a]=t[a]);return r}function Lh(t){var e,{table:r,keyColumn:n,labelColumn:a,iconColumn:i,settings:o}=t,s=Rh(t,Dh),{scale:l}=Ut(),d=ka[(e=s.density)!==null&&e!==void 0?e:"regular"][l],{getFormattedString:p}=Fa(o),f=Pd({table:r,iconColumnName:i,keyColumnName:n,labelColumnName:a,formatValue:p}),{viewportData:v,onScroll:h}=zt({reuseItemsOnTableResize:!0,table:r,itemHeight:d,deserializeRow:f});return c.jsx(ai,on(on({},s),{},{normalizedItems:v.items,showItemIcons:i!=null,onScroll:h}))}function Fh(t){return typeof t=="object"&&t!=null&&"equals"in t&&typeof t.equals=="function"}function Vh(t){return"".concat(t)}function Uh(t){var{column:e,table:r,filter:n=Cl,onChange:a,selectedValue:i,disabled:o,className:s,formatValue:l=Vh,maxSize:d=1e3}=t,p=de(),[f,v]=u.useState([]);u.useEffect(()=>{if(r==null){v([]);return}var m=e??r.columns[0];r.applyFilter(n);var y=r.setViewport(0,d,[m]);return y.addEventListener(p.Table.EVENT_UPDATED,O=>{var{detail:j}=O,T=j.rows.map(b=>{var E;return(E=b.get(m))!==null&&E!==void 0?E:null});v(T)}),()=>{y.close()}},[e,p,n,d,r]);var h=u.useMemo(()=>i===void 0?[void 0,...f]:f,[i,f]),g=u.useMemo(()=>h.findIndex(m=>m===i||Fh(m)&&m.equals(i)),[i,h]),w=u.useCallback(m=>{a(h[m])},[a,h]);return c.jsx(Xn,{className:s,value:g,onChange:w,disabled:o,children:h.map((m,y)=>c.jsx(Ra,{value:y,children:l(m)},"".concat(y)))})}function Kh(t,e,r,n){var a=le(),[i,o]=u.useState(""),{value:s}=_e(i,r),l=u.useCallback(v=>{o(v.trim())},[]),{data:d,isLoading:p}=Ee(a.doesColumnValueExist,[t,e,s,n]),f=p||i!==s?null:d;return{valueTrimmed:i,valueTrimmedDebounced:s,valueExists:f,trimAndUpdateValue:l}}var sn=K.module("useDebouncedViewportSearch"),Bh=200;function Hh(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Bh,n=le(),{table:a,applyFiltersAndRefresh:i}=t,o=u.useMemo(()=>xe(s=>{if(sn.debug("Applying debounced searchText '".concat(s,"'")),a!=null){var l=s.trim();if(l===""){i([]);return}var d=a.findColumn(e),p=n.makeFilterValue(d.type,l),f=[d.filter().contains(p)];i(f)}},r),[i,e,r,a,n]);return u.useEffect(()=>()=>{sn.debug("Cancelling debounced search function"),o.cancel()},[o]),o}var Mi=300;function Wh(t){var{viewportData:e,columnName:r,shouldSelectAllOnNoSelection:n,mapItemToValue:a}=t,i=le(),o=Xa(e,a,Pa),{value:s}=_e(o,Mi),l=Ya(s,Ha);return u.useMemo(()=>Vt(i,r,l.selection,n,l.isInverted),[r,l,n,i])}function Gh(t,e,r,n){var a=u.useRef("");return a.current=r,u.useMemo(()=>{var i=t.length>0&&t[0].item==null;return!i&&n!=null&&(a.current===""||n.toLowerCase().includes(a.current.toLowerCase()))?[{key:n,item:{[e]:n}},...t]:t},[n,e,t])}function ln(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function zh(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){ln(i,n,a,o,s,"next",l)}function s(l){ln(i,n,a,o,s,"throw",l)}o(void 0)})}}function Yh(t){var{table:e,columnName:r,defaultValue:n,itemHeight:a,topOffset:i=0,value:o}=t;return u.useCallback(zh(function*(){if(e==null||o===""||o===n)return i;var s=e.findColumn(r),l=yield e.seekRow(0,s,"String",o),d=n==null?0:1;return(l+d)*a+i}),[r,n,a,e,i,o])}function qh(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"or",r=le(),n=u.useMemo(()=>Sa(r),[r]);return u.useMemo(()=>Ft(t,n,e),[t,e,n])}function Li(t){u.useEffect(()=>()=>{t!=null&&(Ea(t)||t.close())},[t])}function Xh(t){var{maybeTable:e,columnName:r,mapItemToValue:n,filterConditionFactories:a=[],trimSearchText:i=!1,timeZone:o}=t,{itemHeight:s}=La(),l=le(),[d,p]=u.useState(""),[f,v]=u.useState(""),h=u.useCallback(C=>{v(i?C.trim():C)},[i]),g=u.useMemo(()=>i?d.trim():d,[d,i]),[w,m]=u.useState(null),[y,O]=u.useState(()=>new Map),{data:j,isLoading:T}=Ee(l.doesColumnValueExist,[e,r,f,!1]),{isDebouncing:b}=_e(f,fr),E=b||T?null:j,I=u.useMemo(()=>wa(l,r,f,o),[f,r,l,o]),_=u.useMemo(()=>Vt(l,r,new Set(y.keys()),!1,!0),[r,y,l]),{data:k}=Ee(l.createDistinctSortedColumnTable,[e,r,"asc",...a]);Li(k);var A=zt({table:k,itemHeight:s,viewportSize:Sd,viewportPadding:wd}),B=g.length>0&&A.size===0,x=y.has(g),P=Ue(h,fr),S=u.useCallback(C=>{p(C),P(C)},[P]),$=Ue(m,0),M=u.useCallback(C=>{if(p(""),h(""),m(C),$(null),C!=null){var D=A.viewportData.findItem(C);if(D!=null){var N=n(D);O(V=>{var ne=new Map(V);return ne.set(N,{value:N}),ne})}}},[h,$,A.viewportData,n]),U=u.useCallback(C=>{O(D=>{if(C.size===0)return D;var N=new Map(D);for(var V of C)N.set(V,{value:V});return N})},[]),H=u.useCallback(C=>{O(D=>{if(C==="all")return new Map;var N=new Map(D);for(var V of C)N.delete(V);return N})},[]),G=Va(A.table,I,_);return Ua(A,G),u.useMemo(()=>({list:A,hasSearchTextWithZeroResults:B,searchText:d,searchTextExists:E,searchTextIsInSelectedValues:x,selectedKey:w,selectedValueMap:y,onSearchTextChange:S,onSelectKey:M,onAddValues:U,onRemoveValues:H}),[B,A,U,H,S,M,d,E,x,w,y])}function un(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function Jh(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){un(i,n,a,o,s,"next",l)}function s(l){un(i,n,a,o,s,"throw",l)}o(void 0)})}}function Zh(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];var a=u.useCallback(Jh(function*(){var d;return(d=t==null?void 0:t.selectDistinct(t.findColumns(r)))!==null&&d!==void 0?d:null}),[t,...r]),{data:i,error:o,isError:s,isLoading:l}=Ee(a,[]);return u.useEffect(()=>()=>{i==null||i.close()},[i]),{distinctTable:i,error:o,isError:s,isLoading:l}}function Qh(t,e){var r=le(),n=u.useMemo(()=>xa(r,t),[t,r]);return u.useMemo(()=>Ft(e,n),[e,n])}function em(t,e,r){var n=le();return u.useMemo(()=>Ca(n,t,e,r),[t,r,n,e])}const tm=Object.freeze(Object.defineProperty({__proto__:null,ComboBox:$h,DEBOUNCE_MS:Mi,ListView:Lh,Picker:xd,REFRESH_TOKEN_KEY:Be,RefreshTokenBootstrap:Ri,RefreshTokenContext:ki,TableDropdown:Uh,TableInput:nr,makeApiContextWrapper:Zv,readRefreshToken:St,storeRefreshToken:wt,useBroadcastChannel:ar,useBroadcastLoginListener:Qe,useCheckIfExistsValue:Kh,useDebouncedViewportSearch:Hh,useDebouncedViewportSelectionFilter:Wh,useFilterConditionFactories:Va,useFilteredItemsWithDefaultValue:Gh,useFormatter:Fa,useGetItemIndexByValue:Cd,useGetItemPosition:Yh,useInitializeViewportData:Ed,useNotNullOrEmptyFilter:qh,usePickerWithSelectedValues:Xh,useSearchableViewportData:Td,useSelectDistinctTable:Zh,useSetPaddedViewportCallback:jd,useShowOnlyEmptyFilter:Qh,useTable:Ni,useTableClose:Li,useTableColumn:Ai,useTableListener:Fe,useTableSize:_d,useTableUtils:le,useValueFilter:em,useViewportData:zt,useViewportFilter:Ua},Symbol.toStringTag,{value:"Module"}));var Fi=u.createContext(!1);function rm(t){var{fontClassNames:e=["fira-sans-regular","fira-sans-semibold","fira-mono"],children:r}=t,[n,a]=u.useState(!1);return u.useEffect(function(){document.fonts.ready.then(()=>{a(!0)})},[]),c.jsxs(c.Fragment,{children:[c.jsx(Fi.Provider,{value:n,children:r}),c.jsx("div",{id:"preload-fonts",style:{visibility:"hidden",position:"absolute",top:-1e4},children:e.map(i=>c.jsx("p",{className:i,children:"preload"},i))})]})}function nm(t){var{fetch:e,type:r}=t,n=ra(),a=u.useMemo(()=>[...n.values()].filter(na).find(o=>[o.supportedTypes].flat().includes(r)),[n,r]);if(a!=null){var i=a.component;return c.jsx(i,{fetch:e})}throw new Error("Unknown widget type '".concat(r,"'"))}const am=Object.freeze(Object.defineProperty({__proto__:null,PluginType:aa,PluginsContext:Ye,WidgetView:nm,getDashboardPlugins:pu,getIconForPlugin:El,getThemeDataFromPlugins:ia,isAuthPlugin:oa,isDashboardPlugin:Tl,isLegacyAuthPlugin:ct,isLegacyDashboardPlugin:jl,isLegacyPlugin:sa,isLegacyTablePlugin:_l,isPlugin:dt,isTablePlugin:Il,isThemePlugin:$l,isWidgetPlugin:na,pluginSupportsType:Dl,useDashboardPlugins:vu,usePlugins:ra},Symbol.toStringTag,{value:"Module"}));function im(t){if(t==null)return!1;var e=t;return e.Component!==void 0&&typeof e.isAvailable=="function"}var Vi="io.deephaven.auth.AnonymousAuthenticationHandler",om="io.deephaven.authentication.psk.PskAuthenticationHandler";function cn(t,e,r){return e=sm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function sm(t){var e=lm(t,"string");return typeof e=="symbol"?e:String(e)}function lm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class um extends Error{constructor(){super(...arguments),cn(this,"name","AuthenticationError"),cn(this,"isAuthenticationError",!0)}}const Ui=um;function dn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function cm(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){dn(i,n,a,o,s,"next",l)}function s(l){dn(i,n,a,o,s,"throw",l)}o(void 0)})}}var fn=K.module("AuthPluginBase");function ir(t){var{children:e,getLoginOptions:r}=t,n=Oe(),[a,i]=u.useState(),[o,s]=u.useState(!1);return u.useEffect(()=>{var l=!1;function d(){if(l)throw new la("Login canceled.")}function p(){return f.apply(this,arguments)}function f(){return f=cm(function*(){try{var v=yield r();d(),fn.info("Logging in..."),yield n.login(v),d(),s(!0)}catch(w){if(!l){var h;fn.error("Unable to login:",w);var g=(h=Ce(w))!==null&&h!==void 0?h:"Unable to login. Verify credentials.";i(new Ui(g)),s(!1)}}}),f.apply(this,arguments)}return p(),()=>{l=!0}},[n,r]),o?c.jsx(c.Fragment,{children:e}):c.jsx(ce,{"data-testid":"auth-base-loading",isLoading:a==null,isLoaded:!1,errorMessage:Ce(a)})}var dm={canLogout:!1};function fm(t){var{children:e}=t,r=de(),n=u.useCallback(()=>({type:r.CoreClient.LOGIN_TYPE_ANONYMOUS}),[r]);return c.jsx(ir,{getLoginOptions:n,children:c.jsx(Xe.Provider,{value:dm,children:e})})}var pm={Component:fm,isAvailable:t=>t.includes(Vi)};const Ki=pm;function pn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function vm(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){pn(i,n,a,o,s,"next",l)}function s(l){pn(i,n,a,o,s,"throw",l)}o(void 0)})}}var hm=K.module("AuthPluginParent"),mm={canLogout:!1};function gm(t){return t!=null&&typeof t.type=="string"}function bm(){return xt.apply(this,arguments)}function xt(){return xt=vm(function*(){hm.info("Logging in by delegating to parent window...");var t=yield rr(wi);if(!gm(t))throw new Error("Unexpected login options response: ".concat(t));return t}),xt.apply(this,arguments)}function ym(){var t;return(t=new URLSearchParams(window.location.search).get("authProvider"))!==null&&t!==void 0?t:""}function Om(t){var{children:e}=t;return c.jsx(ir,{getLoginOptions:bm,children:c.jsx(Xe.Provider,{value:mm,children:e})})}var Pm={Component:Om,isAvailable:()=>tr()!=null&&ym()==="parent"};const Bi=Pm;function Hi(t){var{children:e,errorMessage:r,isLoggingIn:n=!1,onSubmit:a}=t;return c.jsxs("form",{className:"login-form",onSubmit:i=>{i.preventDefault(),i.stopPropagation(),a==null||a(i)},children:[c.jsx("div",{className:"flex-spacer"}),c.jsxs("div",{className:"flex-wrapper",children:[c.jsx("fieldset",{disabled:n,className:"container-fluid",children:e}),c.jsx("div",{className:"form-group d-flex justify-content-end align-items-center mb-0",children:c.jsxs("button",{type:"submit",className:R("btn btn-primary",{"btn-spinner":n},{"btn-cancelable":n}),"data-testid":"btn-login",children:[n&&c.jsxs("span",{children:[c.jsx(At,{className:"mr-2 loading-spinner-vertical-align"}),c.jsx("span",{className:"btn-normal-content",children:"Logging in"}),c.jsx("span",{className:"btn-hover-content",children:"Cancel"})]}),!n&&"Login"]})})]}),c.jsx("div",{className:"flex-spacer",children:r!=null&&c.jsx("p",{className:"error-message mb-0",role:"alert",children:"".concat(r)})})]})}function Wi(t){var{children:e,logoPath:r="./logo.png"}=t;return c.jsxs("div",{className:"login-container",children:[c.jsx(hi,{}),c.jsxs("div",{className:"login-box",children:[c.jsx("div",{className:"logo",children:c.jsx("img",{src:r,alt:"Deephaven Data Labs"})}),e,c.jsxs("p",{className:"footer",children:["© 2016-",new Date().getFullYear()," Deephaven Data Labs LLC. Patent Pending."]})]})]})}function vn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function nt(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){vn(i,n,a,o,s,"next",l)}function s(l){vn(i,n,a,o,s,"throw",l)}o(void 0)})}}var Ct="io.deephaven.authentication.psk.PskAuthenticationHandler",Gi="psk",Et="io.deephaven.web.client.auth.psk.token",he=K.module("AuthPluginPsk");function Sm(){return new URLSearchParams(window.location.search).get(Gi)}function wm(){he.debug2("clearWindowToken");var t=new URL(window.location.href);t.searchParams.delete(Gi),window.history.replaceState(null,"",t.href)}function hn(){var t;return(t=ye.get(Et))!==null&&t!==void 0?t:null}function at(t){he.debug2("Storing token in cookie",t),t!=null?ye.set(Et,t,{secure:!0,sameSite:"strict"}):ye.remove(Et)}function xm(t){var{children:e,logoPath:r}=t,n=Oe(),a=u.useRef(null),i=u.useRef(null),[o,s]=u.useState(),[l,d]=u.useState(!1),[p,f]=u.useState(!1),[v,h]=u.useState(!1),[g,w]=u.useState(""),m=u.useCallback(function(){var b=nt(function*(E){var I=arguments.length>1&&arguments[1]!==void 0?arguments[1]:!0;he.info("Logging in..."),h(!0);var _=null;try{if(_=n.login({type:Ct,token:E}),i.current=_,yield _,he.info("Logged in successfully"),i.current!==_)return;at(E),f(!0)}catch(B){if(i.current!==_)return;if(d(!0),I){var k;he.error("Unable to login",B);var A=(k=Ce(B))!==null&&k!==void 0?k:"Unable to login: Verify credentials.";s(new Ui(A))}}h(!1)});return function(E){return b.apply(this,arguments)}}(),[n]),y=u.useCallback(()=>{i.current=null,h(!1)},[]),O=u.useCallback(nt(function*(){he.debug("onLogin");var b=hn();p||v||b==null||m(b,!1)}),[p,v,m]),j=u.useCallback(()=>{at(null)},[]);Qe(O,j),u.useEffect(()=>{var b=!1;function E(){return I.apply(this,arguments)}function I(){return I=nt(function*(){var _,k=(_=Sm())!==null&&_!==void 0?_:hn();if(wm(),k==null){d(!0);return}h(!0);try{yield n.login({type:Ct,token:k}),b||(at(k),f(!0),h(!1))}catch{b||(d(!0),h(!1))}}),I.apply(this,arguments)}return E(),()=>{b=!0}},[n]);var T=u.useCallback(()=>{v?y():m(g)},[y,v,m,g]);return u.useEffect(function(){var E;(E=a.current)===null||E===void 0||E.focus()},[a,l]),c.jsxs(c.Fragment,{children:[p&&e,l&&c.jsx(Mt,{in:!p,mountOnEnter:!0,unmountOnExit:!0,children:c.jsx(Wi,{logoPath:r,children:c.jsx(Hi,{errorMessage:Ce(o),isLoggingIn:v,onSubmit:T,children:c.jsxs("div",{className:"form-group",children:[c.jsx("label",{htmlFor:"auth-psk-token-input",children:"Token"}),c.jsx("input",{id:"auth-psk-token-input",name:"token",className:"input-token form-control",type:"text",autoComplete:"username",autoCapitalize:"none",autoCorrect:"off",spellCheck:"false",ref:a,value:g,onChange:b=>{s(void 0),w(b.target.value)}})]})})})}),c.jsx(ce,{"data-testid":"auth-psk-loading",isLoaded:p||l,isLoading:!p&&!l})]})}var Cm={Component:xm,isAvailable:t=>t.includes(Ct)};const zi=Cm;function mn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function it(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mn(Object(r),!0).forEach(function(n){Em(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function Em(t,e,r){return e=Tm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Tm(t){var e=jm(t,"string");return typeof e=="symbol"?e:String(e)}function jm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var _m=K.module("UserUtils");function Yi(t,e){return t.get("internal.webClient.appInit.".concat(e))}function qi(t){var e,r,n,a,i=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{},o=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{};function s(m){return Yi(t,m)}function l(m,y){var O=s(m);return O==="true"?!0:O==="false"?!1:(O!==void 0&&_m.warn("Unexpected value for ".concat(m,": ").concat(O)),y)}var d=(e=s("name"))!==null&&e!==void 0?e:"",p=(r=s("operateAs"))!==null&&r!==void 0?r:d,f=(n=(a=s("groups"))===null||a===void 0?void 0:a.split(","))!==null&&n!==void 0?n:[],v=l("canCopy",!0),h=l("canDownloadCsv",!0),g=l("canUsePanels",!0),w=l("canLogout",!0);return it(it({name:d,operateAs:p,groups:f},i),{},{permissions:it({canUsePanels:g,canCopy:v,canDownloadCsv:h,canLogout:w},o)})}const Im=Object.freeze(Object.defineProperty({__proto__:null,AUTH_HANDLER_TYPE_ANONYMOUS:Vi,AUTH_HANDLER_TYPE_PSK:om,AuthPluginAnonymous:Ki,AuthPluginBase:ir,AuthPluginParent:Bi,AuthPluginPsk:zi,Login:Wi,LoginForm:Hi,UserContext:ba,UserOverrideContext:ya,UserPermissionsOverrideContext:Xe,getAppInitValue:Yi,getUserFromConfig:qi,isAuthPlugin:im},Symbol.toStringTag,{value:"Module"}));function ge(t,e,r){return e=$m(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $m(t){var e=Dm(t,"string");return typeof e=="symbol"?e:String(e)}function Dm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class F extends Ta{static get theme(){return F._theme==null&&(F._theme=ua()),F._theme}static makeRandomSeries(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:100,a=[],i=[],o=[],s=[],l=new Date("2018-06-01"),d=0;d<n;d+=1){var p=new Date(l.getFullYear(),l.getMonth(),l.getDate()+d-n);a.push("".concat(p.getFullYear(),"-").concat(p.getMonth()+1,"-").concat(p.getDate()));var f=(Math.sin(d/n*e)*n/3+Math.cos(d*.2)*n/6+Math.sin(d*.5)*n/10+F.random()*n/5+d*F.smoothing)*r;f=Math.round(f*100)/100,i.push(f),s.push(40+d*F.smoothing),o.push(Math.sin(d/n*e)*n/3+F.random()*n/10+d*F.smoothing)}return{x:a,y:i,s:o,l:s}}static makeScatter(e){return{name:"SCTR",x:e.x,y:e.y,type:"scatter",mode:"markers",hoverinfo:"skip",marker:{size:5}}}static makeArea(e){return{name:"AREA",x:e.x,y:e.s,type:"scatter",mode:"line",fill:"tozeroy",hoverinfo:"all",line:{width:3}}}static makeTrendline(e){return{name:"Trendline <br>R<sup>2</sup> = 0.91",x:e.x,y:e.l,type:"scatter",mode:"line",hoverinfo:"skip",line:{width:3,dash:"dot"}}}static makeErrorBand(e){for(var r=[],n=[],a=0;a<e.y.length;a+=1){var i=e.y[a];r[a]=Math.round((i+18)*100)/100,n[a]=Math.round((i-18)*100)/100}var o=r.concat(n.reverse());return{name:"error",x:e.x.concat(e.x.slice().reverse()),y:o,type:"scatter",mode:"line",hoverinfo:"skip",fill:"toself",line:{width:0,color:F.theme.error_band_line_color,shape:"spline"}}}static makeLine(e){return{name:"LINE",x:e.x,y:e.y,type:"scatter",mode:"line",hoverinfo:"x+y+text+name",line:{width:3}}}static makeRandomData(){var e=F.makeRandomSeries(6),r=F.makeArea(e),n=F.makeTrendline(e),a=F.makeRandomSeries(2),i=F.makeLine(a),o=F.makeErrorBand(a);return[r,n,i,o]}static makeDefaultLayout(e){var r={template:new ja(e).makeDefaultTemplate(F.theme)};return r.title="Chart",r.xaxis={title:"Datestamp"},r.yaxis={title:"Price"},r}constructor(e){var{data:r=F.makeRandomData(),layout:n=F.makeDefaultLayout(e),filterFields:a=[]}=arguments.length>1&&arguments[1]!==void 0?arguments[1]:{};super(e),ge(this,"data",void 0),ge(this,"filterFields",void 0),ge(this,"layout",void 0),this.data=r,this.layout=n,this.filterFields=a}getData(){return this.data}getLayout(){return this.layout}getFilterColumnMap(){for(var e=new Map,r=0;r<this.filterFields.length;r+=1){var n=this.filterFields[r],a="java.lang.String";e.set(n,{name:n,type:a})}return e}isFilterRequired(){return this.filterFields.length>0}setFilter(){this.fireUpdate(this.data)}}ge(F,"random",Math.random.bind(Math));ge(F,"smoothing",1.5);ge(F,"_theme",void 0);const Nm=F,Am=Object.freeze(Object.defineProperty({__proto__:null,Chart:qu,ChartModel:Ta,ChartModelFactory:Xu,ChartThemeContext:Nl,ChartThemeProvider:ca,ChartUtils:ja,DownsamplingError:Oc,FigureChartModel:Ju,MockChartModel:Nm,Plot:Al,defaultChartTheme:ua,isFigureChartModel:Zu,useChartTheme:kl},Symbol.toStringTag,{value:"Module"}));function km(t){var{dashboardProps:e,componentName:r,component:n,supportedTypes:a,hydrate:i,dehydrate:o}=t,{id:s,layout:l,registerComponent:d}=e,p=u.useCallback(f=>{var{dragEvent:v,panelId:h=je(),widget:g}=f,{name:w,type:m}=g,y=m!=null&&(Array.isArray(a)&&a.includes(m)||m===a);if(y){var O={localDashboardId:s,metadata:g};i!=null&&(O=i(O,s));var j={type:"react-component",component:r,props:O,title:w??void 0,id:h},{root:T}=l;da.openComponent({root:T,config:j,dragEvent:v})}},[r,i,s,l,a]);_a(d,n,i,o),fa(l.eventHub,p)}function Rm(){var t=u.useContext(pa);if(t==null)throw new Error("LayoutManager not available, did you add a LayoutManagerContext.Provider to the tree?");return t}function Mm(t,e){var r=Xo(),n=Jo(i=>va(i,t,e)),a=u.useCallback(i=>r(ha(t,e,i)),[t,e,r]);return[n,a]}const Lm=Object.freeze(Object.defineProperty({__proto__:null,CREATE_DASHBOARD:hu,DEFAULT_DASHBOARD_ID:Rl,Dashboard:cr,DashboardLayout:Ml,DashboardUtils:Ll,GLPropTypes:Fl,LayoutManagerContext:pa,LayoutUtils:da,LazyDashboard:mu,PanelErrorBoundary:Vl,PanelEvent:Ul,PanelManager:Kl,SET_DASHBOARD_DATA:Bl,assertIsDashboardPluginProps:Qu,canHaveRef:Zn,default:cr,dehydrate:Hl,emitCreateDashboard:gu,emitPanelOpen:Wl,getAllDashboardsData:Gl,getClosedPanelsForDashboard:zl,getDashboardData:Yl,getOpenedPanelMapForDashboard:ql,getPluginDataForDashboard:va,getPluginDataMapForDashboard:Xl,hydrate:Jl,isDashboardPluginProps:ec,isWrappedComponent:Qn,listenForCreateDashboard:bu,listenForPanelOpen:Zl,reducers:Ql,setDashboardData:eu,setDashboardPluginData:ha,stopListenForCreateDashboard:yu,updateDashboardData:tu,useAppDispatch:ru,useAppSelector:ma,useAppStore:nu,useDashboardPanel:km,useDashboardPluginData:Mm,useLayoutManager:Rm,useListener:au,usePanelOpenListener:fa,usePanelRegistration:_a},Symbol.toStringTag,{value:"Module"}));function Fm(t){var{children:e}=t,{activeThemes:r}=Ge();return u.useEffect(function(){r!=null&&iu.initTheme()},[r]),c.jsx(c.Fragment,{children:e})}function Xi(t,e,r){return e=Vm(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vm(t){var e=Um(t,"string");return typeof e=="symbol"?e:String(e)}function Um(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class be{static valueForCell(e,r,n){var a="".concat(e,",").concat(r);return n!==void 0&&n&&(a="(".concat(a,")")),a}constructor(e){Xi(this,"dh",void 0),this.dh=e}makeColumn(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:be.DEFAULT_TYPE,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:0;return new this.dh.Column({index:n,name:e,type:r})}makeRollupTableConfig(){return new this.dh.RollupTableConfig}makeColumns(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=[],a=0;a<e;a+=1)n.push(this.makeColumn("".concat(r).concat(a),be.DEFAULT_TYPE,a));return n}static makeUserColumnWidths(){for(var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5,r=new Map,n=0;n<e;n+=1)r.set(n.toString(),100);return r}makeRow(e){var r=new this.dh.Row({index:e,name:"".concat(e)});return r.get=jest.fn(n=>be.valueForCell(e,n.index)),r}makeFilter(){return new this.dh.FilterCondition}makeSort(){return new this.dh.Sort}makeTable(){var{columns:e=this.makeColumns(),size:r=1e9,sort:n=[],layoutHints:a={}}=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},i=new this.dh.Table({columns:e,size:r,sort:n});return i.copy=jest.fn(()=>Promise.resolve(i)),i.freeze=jest.fn(()=>Promise.resolve(i)),i.layoutHints=a,i}makeTreeTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeColumns(),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[],n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:1e9,a=arguments.length>3&&arguments[3]!==void 0?arguments[3]:[],i=arguments.length>4?arguments[4]:void 0,o=new this.dh.TreeTable({columns:e,groupedColumns:r,size:n,sort:a,layoutHints:i});return o.copy=jest.fn(()=>Promise.resolve(o)),o}makeInputTable(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[];return new this.dh.InputTable(e)}makeSubscription(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable();return new this.dh.TableViewportSubscription({table:e})}makeModel(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:this.makeTable(),r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:a}=this;return new tc(a,e,r??new Lt(a),n)}}Xi(be,"DEFAULT_TYPE","java.lang.String");const Km=be,Bm=Object.freeze(Object.defineProperty({__proto__:null,AdvancedSettings:rc,AdvancedSettingsType:nc,AggregationEdit:Id,AggregationUtils:ac,Aggregations:$d,BarIcon:Dd,ChartBuilder:Nd,ColumnHeaderGroup:ic,CustomColumnBuilder:Ad,DownloadServiceWorkerUtils:kd,FormatColumnWhereIcon:Rd,FormatRowWhereIcon:Md,HistogramIcon:Ld,InputEditor:Fd,IrisGrid:dr,IrisGridCellOverflowMouseHandler:Vd,IrisGridColumnSelectMouseHandler:Ud,IrisGridColumnTooltipMouseHandler:Kd,IrisGridContextMenuHandler:Bd,IrisGridCopyCellMouseHandler:Hd,IrisGridDataSelectMouseHandler:Wd,IrisGridFilterMouseHandler:Gd,IrisGridMetricCalculator:zd,IrisGridModel:oc,IrisGridModelFactory:sc,IrisGridPartitionedTableModel:lc,IrisGridPartitionedTableMouseHandler:Yd,IrisGridRenderer:qd,IrisGridRowTreeMouseHandler:Xd,IrisGridSortMouseHandler:Jd,IrisGridTableModel:uc,IrisGridTableModelTemplate:cc,IrisGridTestUtils:Km,IrisGridThemeContext:Zd,IrisGridThemeProvider:Ka,IrisGridTokenMouseHandler:Qd,IrisGridTreeTableModel:dc,IrisGridUtils:fc,LineIcon:ef,OptionType:tf,PendingMouseHandler:rf,PieIcon:nf,RollupRows:af,SHORTCUTS:of,ScatterIcon:sf,TableCsvExporter:lf,TableSaver:uf,VisibilityOrderingBuilder:cf,createDefaultIrisGridTheme:df,default:dr,isIrisGridTableModelTemplate:pc,isPanelStateV1:vc,isPanelStateV2:hc,isPartitionedGridModel:mc,isPartitionedGridModelProvider:gc},Symbol.toStringTag,{value:"Module"}));var Ji={react:W,"react-dom":Zo,redux:Qo,"react-redux":es,"@adobe/react-spectrum":ts,"@deephaven/auth-plugins":Im,"@deephaven/chart":Am,"@deephaven/components":zv,"@deephaven/dashboard":Lm,"@deephaven/dashboard-core-plugins":bc,"@deephaven/icons":Ks,"@deephaven/iris-grid":Bm,"@deephaven/jsapi-bootstrap":Jv,"@deephaven/jsapi-components":tm,"@deephaven/jsapi-utils":ch,"@deephaven/log":K,"@deephaven/plugin":am,"@deephaven/react-hooks":wf},Hm=rs.createRequires(Ji),Wm=ns({requires:Hm});const Gm=Wm;function gn(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(t);e&&(n=n.filter(function(a){return Object.getOwnPropertyDescriptor(t,a).enumerable})),r.push.apply(r,n)}return r}function bn(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?gn(Object(r),!0).forEach(function(n){zm(t,n,r[n])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):gn(Object(r)).forEach(function(n){Object.defineProperty(t,n,Object.getOwnPropertyDescriptor(r,n))})}return t}function zm(t,e,r){return e=Ym(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ym(t){var e=qm(t,"string");return typeof e=="symbol"?e:String(e)}function qm(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function or(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){yn(i,n,a,o,s,"next",l)}function s(l){yn(i,n,a,o,s,"throw",l)}o(void 0)})}}var oe=K.module("@deephaven/app-utils.PluginUtils");function Xm(t){return Tt.apply(this,arguments)}function Tt(){return Tt=or(function*(t){var e=yield Gm(t);return e}),Tt.apply(this,arguments)}function Jm(t){return jt.apply(this,arguments)}function jt(){return jt=or(function*(t){var e=yield fetch(t);if(!e.ok)throw new Error(e.statusText);try{return yield e.json()}catch{throw new Error("Could not be parsed as JSON")}}),jt.apply(this,arguments)}function Zm(t){return typeof t=="object"&&t!=null&&typeof t.default=="object"}function Qm(t){return dt(t)?t:Zm(t)&&dt(t.default)?t.default:sa(t)?t:null}function eg(t){return _t.apply(this,arguments)}function _t(){return _t=or(function*(t){oe.debug("Loading plugins...");try{var e=yield Jm("".concat(t,"/manifest.json"));if(!Array.isArray(e.plugins))throw new Error("Plugin manifest JSON does not contain plugins array");oe.debug("Plugin manifest loaded:",e);for(var r=[],n=0;n<e.plugins.length;n+=1){var{name:a,main:i}=e.plugins[n],o="".concat(t,"/").concat(a,"/").concat(i);r.push(Xm(o))}for(var s=yield Promise.allSettled(r),l=new Map,d=0;d<s.length;d+=1){var p=s[d],{name:f,version:v}=e.plugins[d];if(p.status==="fulfilled"){var h=Qm(p.value);h==null?oe.error("Plugin '".concat(f,"' is missing an exported value.")):l.set(f,bn(bn({},h),{},{version:v}))}else oe.error("Unable to load plugin '".concat(f,"'"),p.reason)}return oe.info("Plugins loaded:",l),l}catch(g){return oe.error("Unable to load plugins:",g),new Map}}),_t.apply(this,arguments)}function tg(t){var e,r;return(e=(r=t.get("AuthHandlers"))===null||r===void 0?void 0:r.split(","))!==null&&e!==void 0?e:[]}function rg(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:new Map,n=tg(e),a=[...t.entries(),...r.entries()].filter(l=>{var[,d]=l;return oa(d)||ct(d)}).map(l=>{var[d,p]=l;return ct(p)?{type:aa.AUTH_PLUGIN,name:d,component:p.AuthPlugin.Component,isAvailable:p.AuthPlugin.isAvailable}:p}),i=a.filter(l=>{var{isAvailable:d}=l;return d(n,e)});if(i.length===0)throw new Error("No login plugins found, please register a login plugin for auth handlers: ".concat(n));i.length>1&&oe.warn("More than one login plugin available, will use the first one: ",i.map(l=>{var{name:d}=l;return d}).join(", "));var{name:o,component:s}=i[0];return oe.info("Using LoginPlugin",o),s}var ng=Fn.createRequires(()=>Ji),ag=Fn.createRemoteComponent({requires:ng});const $g=ag;function On(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function ig(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){On(i,n,a,o,s,"next",l)}function s(l){On(i,n,a,o,s,"throw",l)}o(void 0)})}}function og(t){var{pluginsUrl:e,getCorePlugins:r,children:n}=t,[a,i]=u.useState(null);return u.useEffect(function(){var s=!1;function l(){return d.apply(this,arguments)}function d(){return d=ig(function*(){var p,f=(p=yield r==null?void 0:r())!==null&&p!==void 0?p:[],v=yield eg(e);if(!s){var h=f.map(g=>[g.name,g]);i(new Map([...h,...v]))}}),d.apply(this,arguments)}return l(),()=>{s=!0}},[e,r]),c.jsx(Ye.Provider,{value:a,children:n})}function sg(){var t=ar();return u.useEffect(function(){t.postMessage(er(Qt))},[t]),null}function Pn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function lg(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Pn(i,n,a,o,s,"next",l)}function s(l){Pn(i,n,a,o,s,"throw",l)}o(void 0)})}}var ug=new Map([["@deephaven/auth-plugins.AuthPluginParent",{AuthPlugin:Bi}],["@deephaven/auth-plugins.AuthPluginPsk",{AuthPlugin:zi}],["@deephaven/auth-plugins.AuthPluginAnonymous",{AuthPlugin:Ki}]]);function cg(t){var{children:e}=t,r=Oe(),n=u.useContext(Ye),[a,i]=u.useState(),[o,s]=u.useState();u.useEffect(function(){var f=!1;function v(){return h.apply(this,arguments)}function h(){return h=lg(function*(){try{var g=yield r.getAuthConfigValues();f||i(new Map(g))}catch(w){f||s(w)}}),h.apply(this,arguments)}return v(),()=>{f=!0}},[r]);var l=u.useMemo(()=>{if(!(n==null||a==null))try{return rg(n,a,ug)}catch(p){s(p)}},[a,n]),d=l==null||a==null;return d||o!=null?c.jsx(ce,{isLoading:d&&o==null,errorMessage:Ce(o)}):c.jsx(l,{authConfigValues:a,children:c.jsxs(c.Fragment,{children:[c.jsx(sg,{}),e]})})}function Sn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function wn(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Sn(i,n,a,o,s,"next",l)}function s(l){Sn(i,n,a,o,s,"throw",l)}o(void 0)})}}var Pe=K.module("@deephaven/app-utils.ConnectionBootstrap");function dg(t){var{children:e}=t,r=de(),n=Oe(),[a,i]=u.useState(),[o,s]=u.useState(),[l,d]=u.useState("connecting"),p=l==="failed",f=l==="shutdown",v=l==="reconnecting",h=l==="not_connecting";u.useEffect(function(){var O=!1;function j(){return T.apply(this,arguments)}function T(){return T=wn(function*(){try{var b=yield n.getAsIdeConnection();if(O)return;s(b),d("connected")}catch(E){if(O)return;i(E),d("not_connecting")}}),T.apply(this,arguments)}return j(),()=>{O=!0}},[r,n]),u.useEffect(function(){if(o==null||f)return;function O(T){var{detail:b}=T;Pe.info("Disconnect","".concat(JSON.stringify(b))),d("reconnecting")}var j=o.addEventListener(r.IdeConnection.EVENT_DISCONNECT,O);return j},[r,o,f]),u.useEffect(function(){if(o==null||f)return;function O(T){var{detail:b}=T;Pe.info("Reconnect","".concat(JSON.stringify(b))),d("connected")}var j=o.addEventListener(r.CoreClient.EVENT_RECONNECT,O);return j},[r,o,f]),u.useEffect(function(){if(o==null)return;function O(T){var{detail:b}=T;Pe.info("Shutdown","".concat(JSON.stringify(b))),i("Server shutdown: ".concat(b??"Unknown reason")),d("shutdown")}var j=o.addEventListener(r.IdeConnection.EVENT_SHUTDOWN,O);return j},[r,o]),u.useEffect(function(){if(o==null||f)return;function O(T){var{detail:b}=T;Pe.warn("Reconnect authentication failed","".concat(JSON.stringify(b))),i("Reconnect authentication failed: ".concat(b??"Unknown reason")),d("failed")}var j=o.addEventListener(r.CoreClient.EVENT_RECONNECT_AUTH_FAILED,O);return j},[r,o,f]);var g=u.useCallback(function(){var y=wn(function*(O){return Nt(o,"No connection available to fetch object with"),o.getObject(ta(O))});return function(O){return y.apply(this,arguments)}}(),[o]),w=u.useMemo(()=>({subscribe:(y,O)=>(O({fetch:()=>g(y),status:"ready"}),()=>{})}),[g]);function m(){Pe.info("Refreshing application"),window.location.reload()}return f||l==="connecting"||h?c.jsx(ce,{"data-testid":"connection-bootstrap-loading",isLoading:!1,errorMessage:a!=null?"".concat(a):void 0}):c.jsx(Ou.Provider,{value:o??null,children:c.jsx(ea.Provider,{value:g,children:c.jsxs(Zt.Provider,{value:w,children:[e,c.jsx(ui,{isOpen:v,debounceMs:1e3,children:c.jsx(ci,{icon:Bs,title:c.jsxs(c.Fragment,{children:[c.jsx(At,{})," Attempting to reconnect..."]}),subtitle:"Please check your network connection."})}),c.jsx(Yn,{confirmButtonText:"Refresh",onConfirm:m,isOpen:p,headerText:"Authentication failed",bodyText:"Credentials are invalid. Please refresh your browser to try and reconnect."})]})})})}function Dg(t){return new URL(t,"".concat(window.location))}function fg(){var t=new URLSearchParams(window.location.search);return t.get("envoyPrefix")}function pg(){var t=fg();return t!=null?{headers:{"envoy-prefix":t}}:{headers:{}}}function vg(t){var{children:e}=t,r=u.useContext(Fi);return r?c.jsx(c.Fragment,{children:e}):c.jsx(ce,{"data-testid":"fonts-loaded-loading"})}function hg(t){var{children:e}=t,r=Pu(),n=u.useContext(ya),a=u.useContext(Xe),i=qi(r,n,a);return c.jsx(ba.Provider,{value:i,children:e})}function mg(t){var{children:e}=t,r=u.useContext(Ye),n=u.useMemo(()=>r==null?null:ia(r),[r]),a=ma(ou);return c.jsx(Jn,{themes:n,children:c.jsx(ca,{children:c.jsx(Fm,{children:c.jsx(Ka,{density:a.gridDensity,children:e})})})})}function Ng(t){var{fontClassNames:e,pluginsUrl:r,getCorePlugins:n,serverUrl:a,children:i}=t,o=u.useMemo(()=>pg(),[]),[s,l]=u.useState(0),d=u.useCallback(()=>{},[]),p=u.useCallback(()=>{l(f=>f+1)},[]);return Qe(d,p),c.jsx(as,{store:yc,children:c.jsx(rm,{fontClassNames:e,children:c.jsx(og,{getCorePlugins:n,pluginsUrl:r,children:c.jsx(mg,{children:c.jsx(ga,{serverUrl:a,options:o,children:c.jsx(Ri,{children:c.jsx(cg,{children:c.jsx(Su,{children:c.jsx(hg,{children:c.jsx(dg,{children:c.jsx(vg,{children:i})})})})})})},s)})})})})}function xn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function gg(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){xn(i,n,a,o,s,"next",l)}function s(l){xn(i,n,a,o,s,"throw",l)}o(void 0)})}}function Z(t,e,r){return e=bg(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function bg(t){var e=yg(t,"string");return typeof e=="symbol"?e:String(e)}function yg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Se=K.module("GrpcFileStorageTable");class Te{constructor(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"",n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:r;Z(this,"storageService",void 0),Z(this,"baseRoot",void 0),Z(this,"root",void 0),Z(this,"currentSize",0),Z(this,"currentViewport",void 0),Z(this,"listeners",[]),Z(this,"viewportUpdatePromise",void 0),Z(this,"currentViewportData",void 0),Z(this,"childTables",new Map),this.storageService=e,this.baseRoot=r,this.root=n,n===r&&(this.doRefresh=xe(this.doRefresh.bind(this),Te.REFRESH_DEBOUNCE))}removeBaseRoot(e){return ue.removeRoot(this.baseRoot,e)}getViewportData(){var e;return this.viewportUpdatePromise||this.refreshInternal(),(e=this.viewportUpdatePromise)!==null&&e!==void 0?e:Promise.resolve({items:[],offset:0})}getSnapshot(e){throw new Error("Method not implemented.")}get size(){return this.currentSize}setExpanded(e,r){var n=e.split("/"),a=n.shift();if((a===void 0||a==="")&&(a=n.shift()),a===void 0||a==="")throw new Error("Invalid path: ".concat(e));var i=n.join("/");if(r){if(!this.childTables.has(a)){var o=new Te(this.storageService,this.baseRoot,"".concat(this.root,"/").concat(a));this.childTables.set(a,o)}if(i){var s=this.childTables.get(a);s==null||s.setExpanded(i,r)}}else if(this.childTables.has(a))if(i){var l=this.childTables.get(a);l==null||l.setExpanded(i,r)}else this.childTables.delete(a);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(r=>r!==e)}}doRefresh(e){Se.debug2("doRefresh",this.root),e(this.fetchData())}refresh(){var e;Se.debug2("refresh",this.root),(e=this.viewportUpdatePromise)===null||e===void 0||e.cancel();var r=new Promise(a=>{this.doRefresh(a)}),n=we.makeCancelable(r.then(a=>{if(this.viewportUpdatePromise!==n)throw new la;return this.currentViewportData=a,this.sendUpdate(),a}));n.catch(a=>{we.isCanceled(a)||Se.error("Error updating viewport",a)}),this.viewportUpdatePromise=n}refreshInternal(){try{this.refresh()}catch(e){we.isCanceled(e)||Se.error("Unable to refresh data",e)}}fetchData(){var e=this;return gg(function*(){var{currentViewport:r}=e;if(!r)throw new Error("No viewport set");for(var n=yield e.storageService.listItems(e.root),a=n.map(f=>({type:f.type,filename:e.removeBaseRoot(f.filename),basename:f.basename,id:e.removeBaseRoot(f.filename),isExpanded:f.type==="directory"?e.childTables.has(f.basename):void 0})).sort((f,v)=>f.type!==v.type?f.type==="directory"?-1:1:f.basename.localeCompare(v.basename)),i=0;i<a.length;i+=1){var o=a[i],{basename:s,filename:l}=o;if(l===e.removeBaseRoot("".concat(e.root,"/").concat(s))&&o.type==="directory"){var d=e.childTables.get(s);if(d!=null){d.setViewport({top:0,bottom:r.bottom-i});var p=yield d.getViewportData();a.splice(i+1,0,...p.items)}}}return e.currentSize=a.length,Se.debug2(e.root,"items",a,r),a=a.slice(r.top,r.bottom),{items:a,offset:r.top}})()}sendUpdate(){for(var e,{listeners:r}=this,n=(e=this.currentViewportData)!==null&&e!==void 0?e:{items:[],offset:0},a=0;a<r.length;a+=1)r[a](n)}}Z(Te,"REFRESH_DEBOUNCE",50);function Cn(t,e,r,n,a,i,o){try{var s=t[i](o),l=s.value}catch(d){r(d);return}s.done?e(l):Promise.resolve(l).then(n,a)}function ie(t){return function(){var e=this,r=arguments;return new Promise(function(n,a){var i=t.apply(e,r);function o(l){Cn(i,n,a,o,s,"next",l)}function s(l){Cn(i,n,a,o,s,"throw",l)}o(void 0)})}}function pe(t,e,r){return e=Og(e),e in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Og(t){var e=Pg(t,"string");return typeof e=="symbol"?e:String(e)}function Pg(t,e){if(typeof t!="object"||t===null)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var n=r.call(t,e||"default");if(typeof n!="object")return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Sg=K.module("GrpcFileStorage");class sr{constructor(e,r){var n=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"";pe(this,"dh",void 0),pe(this,"storageService",void 0),pe(this,"tables",[]),pe(this,"root",void 0),pe(this,"refreshTables",is(()=>{this.tables.forEach(a=>a.refresh())},sr.REFRESH_THROTTLE)),this.dh=e,this.storageService=r,this.root=n}removeRoot(e){return ue.removeRoot(this.root,e)}addRoot(e){return ue.addRoot(this.root,e)}createDirectory(e){var r=this;return ie(function*(){return yield r.storageService.createDirectory(r.addRoot(e)),r.refreshTables(),{type:"directory",id:e,filename:e,basename:ue.getBaseName(e)}})()}getTable(){var e=this;return ie(function*(){var r=new Te(e.storageService,e.root);return e.tables.push(r),r})()}saveFile(e){var r=this;return ie(function*(){var n=r.dh.storage.FileContents.text(e.content);return yield r.storageService.saveFile(r.addRoot(e.filename),n,!0),r.refreshTables(),e})()}loadFile(e){var r=this;return ie(function*(){var n=yield r.storageService.loadFile(r.addRoot(e)),a=yield n.text();return{filename:e,basename:ue.getBaseName(e),content:a}})()}copyFile(e,r){var n=this;return ie(function*(){var a=yield n.storageService.loadFile(n.addRoot(e));yield n.storageService.saveFile(n.addRoot(r),a,!1),n.refreshTables()})()}deleteFile(e){var r=this;return ie(function*(){yield r.storageService.deleteItem(r.addRoot(e)),r.refreshTables()})()}moveFile(e,r){var n=this;return ie(function*(){yield n.storageService.moveItem(n.addRoot(e),n.addRoot(r)),n.refreshTables()})()}info(e){var r=this;return ie(function*(){var n=yield r.storageService.listItems(r.addRoot(ue.getPath(e)),ue.getBaseName(e));if(n.length===0)throw new su;if(n.length>1)throw Sg.error("More than one matching file found, should never happen.",n),new Error("More than one matching file found");var a=n[0];if(!lu(a.type))throw new Error("Unexpected file type: ".concat(a.type));return{filename:r.removeRoot(a.filename),basename:a.basename,id:r.removeRoot(a.filename),type:a.type}})()}}pe(sr,"REFRESH_THROTTLE",150);export{Ng as AppBootstrap,Rg as AppDashboards,cg as AuthBootstrap,dg as ConnectionBootstrap,Ou as ConnectionContext,Mg as DEFAULT_LAYOUT_CONFIG,Lg as DEFAULT_LAYOUT_CONFIG_NO_CONSOLE,rm as FontBootstrap,vg as FontsLoaded,Fi as FontsLoadedContext,sr as GrpcFileStorage,Te as GrpcFileStorageTable,Fg as GrpcLayoutStorage,Vg as LocalWorkspaceStorage,og as PluginsBootstrap,$g as RemoteComponent,mg as ThemeBootstrap,Ug as UserLayoutUtils,Kg as exportLayout,tg as getAuthHandlers,rg as getAuthPluginComponent,Dg as getBaseUrl,pg as getConnectOptions,Bg as getDefaultLayout,fg as getEnvoyPrefix,Qm as getPluginModuleValue,Hg as isLayoutV1,Wg as isLayoutV2,Jm as loadJson,Xm as loadModulePlugin,eg as loadModulePlugins,Gg as normalizeLayout,zg as useConnection,Pu as useServerConfig,Yg as useUser};
4
- //# sourceMappingURL=index-1bea624d.js.map
4
+ //# sourceMappingURL=index-aa1c8197.js.map