@deephaven/code-studio 1.28.1 → 1.29.1-plugin-optional-deps.fd4cf96.0.sha-fd4cf96

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 (56) hide show
  1. package/build/assets/{AppRoot-CtUuR9HT.js → AppRoot-BYgUP461.js} +7 -7
  2. package/build/assets/{AppRoot-CtUuR9HT.js.map → AppRoot-BYgUP461.js.map} +1 -1
  3. package/build/assets/{Chart-D0szrevz.js → Chart-BQ8I4i7L.js} +3 -3
  4. package/build/assets/{Chart-D0szrevz.js.map → Chart-BQ8I4i7L.js.map} +1 -1
  5. package/build/assets/{ControlType-CtXY1n1b.js → ControlType-dZUYFjWs.js} +43 -43
  6. package/build/assets/ControlType-dZUYFjWs.js.map +1 -0
  7. package/build/assets/{FormatterUtils-DlljNd83.js → FormatterUtils-BexTF7Pg.js} +2 -2
  8. package/build/assets/{FormatterUtils-DlljNd83.js.map → FormatterUtils-BexTF7Pg.js.map} +1 -1
  9. package/build/assets/Grid-Tx2xMiLi.js +7 -0
  10. package/build/assets/Grid-Tx2xMiLi.js.map +1 -0
  11. package/build/assets/IrisGrid-BrXTJDXQ.js +14 -0
  12. package/build/assets/IrisGrid-BrXTJDXQ.js.map +1 -0
  13. package/build/assets/IrisGridModel-C29Knup_.js +5 -0
  14. package/build/assets/IrisGridModel-C29Knup_.js.map +1 -0
  15. package/build/assets/{IrisGridShortcuts-C6vL7IZi.js → IrisGridShortcuts-C-HT1iXy.js} +2 -2
  16. package/build/assets/{IrisGridShortcuts-C6vL7IZi.js.map → IrisGridShortcuts-C-HT1iXy.js.map} +1 -1
  17. package/build/assets/{LocalWorkspaceStorage-UZ320sjQ.js → LocalWorkspaceStorage-CGX54FlI.js} +2 -2
  18. package/build/assets/{LocalWorkspaceStorage-UZ320sjQ.js.map → LocalWorkspaceStorage-CGX54FlI.js.map} +1 -1
  19. package/build/assets/{MarkdownEditor-BR5w9NeU.js → MarkdownEditor-BTW0kH2X.js} +2 -2
  20. package/build/assets/{MarkdownEditor-BR5w9NeU.js.map → MarkdownEditor-BTW0kH2X.js.map} +1 -1
  21. package/build/assets/{MarkdownNotebook-CapbcK55.js → MarkdownNotebook-CO6sIiLu.js} +2 -2
  22. package/build/assets/{MarkdownNotebook-CapbcK55.js.map → MarkdownNotebook-CO6sIiLu.js.map} +1 -1
  23. package/build/assets/MissingPartitionError-DvnHZsCQ.js +7 -0
  24. package/build/assets/MissingPartitionError-DvnHZsCQ.js.map +1 -0
  25. package/build/assets/{MockChartModel-C9ZERWJD.js → MockChartModel-aVTbWE3h.js} +2 -2
  26. package/build/assets/{MockChartModel-C9ZERWJD.js.map → MockChartModel-aVTbWE3h.js.map} +1 -1
  27. package/build/assets/PasteKeyHandler-C2c93kPX.js +15 -0
  28. package/build/assets/PasteKeyHandler-C2c93kPX.js.map +1 -0
  29. package/build/assets/Picker-fFRNaQIf.js +26 -0
  30. package/build/assets/Picker-fFRNaQIf.js.map +1 -0
  31. package/build/assets/{StyleGuideRoot-CqAei-DM.js → StyleGuideRoot-BuzXY_Hc.js} +2 -2
  32. package/build/assets/{StyleGuideRoot-CqAei-DM.js.map → StyleGuideRoot-BuzXY_Hc.js.map} +1 -1
  33. package/build/assets/{index-DMSPOHPd.js → index-Bw2lPjhG.js} +25 -25
  34. package/build/assets/{index-DMSPOHPd.js.map → index-Bw2lPjhG.js.map} +1 -1
  35. package/build/assets/{index-CH6HLWgt.js → index-CrdwB1d9.js} +11 -11
  36. package/build/assets/index-CrdwB1d9.js.map +1 -0
  37. package/build/assets/index-CyLZEMYM.js +27 -0
  38. package/build/assets/index-CyLZEMYM.js.map +1 -0
  39. package/build/index.html +2 -2
  40. package/package.json +31 -31
  41. package/build/assets/ControlType-CtXY1n1b.js.map +0 -1
  42. package/build/assets/Grid-C8RUSj63.js +0 -5
  43. package/build/assets/Grid-C8RUSj63.js.map +0 -1
  44. package/build/assets/IrisGrid-D8eFxgVO.js +0 -14
  45. package/build/assets/IrisGrid-D8eFxgVO.js.map +0 -1
  46. package/build/assets/IrisGridModel-Cz3-J_KF.js +0 -5
  47. package/build/assets/IrisGridModel-Cz3-J_KF.js.map +0 -1
  48. package/build/assets/MissingPartitionError-Cyo7_iZi.js +0 -6
  49. package/build/assets/MissingPartitionError-Cyo7_iZi.js.map +0 -1
  50. package/build/assets/PasteKeyHandler-gbxW-Zo-.js +0 -15
  51. package/build/assets/PasteKeyHandler-gbxW-Zo-.js.map +0 -1
  52. package/build/assets/Picker-CrotsLla.js +0 -26
  53. package/build/assets/Picker-CrotsLla.js.map +0 -1
  54. package/build/assets/index-CH6HLWgt.js.map +0 -1
  55. package/build/assets/index-iNF_lksg.js +0 -27
  56. package/build/assets/index-iNF_lksg.js.map +0 -1
@@ -0,0 +1,15 @@
1
+ import{r as I,I as E,cz as bi,K as we,a7 as Ci,cA as wi,bB as yi,U as Xe,ax as Si,cB as ei,cC as Ri,cD as Pi,cE as Ti,cF as Oi,cG as lt,cH as Hi,cI as Wi,b1 as ji,cJ as Mi,cK as $i,cL as ki,M as Vr,a1 as gr,bC as Bi,bE as Ai,aw as Ie,cM as Yr}from"./vendor-06-vIFQy.js";import{V as Zr,o as Ar,W as ot,U as Fi,h as nt,q as Ii,r as Di,J as ri,n as ti,O as Ei,m as Li,x as Ki,N as Ni,H as ii,C as xr,z as _i,S as st}from"./IrisGridShortcuts-C-HT1iXy.js";import{c7 as ai,e3 as Jr,aQ as zi,t as Xi,aV as ut,aU as Vi,b4 as Yi,B as dt,aS as xi,C as Ui,at as ht}from"./ControlType-dZUYFjWs.js";import{u as li}from"./useMergeRef-BWn972oh.js";import{L as oi,aX as Gi,aK as qi,aJ as Zi,k as Ji,bB as m,br as Qi}from"./index-CrdwB1d9.js";import{g as Oe,f as ne,m as De,h as ea,G as ra}from"./IrisGridModel-C29Knup_.js";var ta=["defaultSelectedKeys","disabledKeys","children","selectedKeys","UNSAFE_className","onChange","onSelectionChange"];function vt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function ct(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?vt(Object(r),!0).forEach(function(i){ia(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):vt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function ia(t,e,r){return(e=aa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function aa(t){var e=la(t,"string");return typeof e=="symbol"?e:e+""}function la(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function oa(t,e){if(t==null)return{};var r,i,l=na(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function na(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function sa(t){var e=t.defaultSelectedKeys,r=t.disabledKeys,i=t.children,l=t.selectedKeys,a=t.UNSAFE_className,o=t.onChange,n=t.onSelectionChange,s=oa(t,ta),u=I.useMemo(()=>typeof i=="function"?i:Zr(i,null),[i]);return E.jsx(bi,ct(ct({},s),{},{UNSAFE_className:we("dh-action-group",a),defaultSelectedKeys:e,disabledKeys:r,selectedKeys:l,onSelectionChange:o??n,children:u}))}function ua(t){return null}function da(t){return null}function ft(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function jr(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?ft(Object(r),!0).forEach(function(i){ha(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):ft(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function ha(t,e,r){return(e=va(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function va(t){var e=ca(t,"string");return typeof e=="symbol"?e:e+""}function ca(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function fa(t){var e=t.itemIconSlot,r=t.showItemDescriptions,i=t.showItemIcons,l=t.tooltipOptions,a=t.actions;return I.useCallback(o=>{var n,s,u,d,h,c=Ar(o),v=ot((n=o.item)===null||n===void 0?void 0:n.content),f=(s=(u=o.item)===null||u===void 0?void 0:u.textValue)!==null&&s!==void 0?s:c==null?void 0:String(c),C=r?ot((d=o.item)===null||d===void 0?void 0:d.description,"description"):null,S=i?Fi((h=o.item)===null||h===void 0?void 0:h.icon,e):null,y=null;return nt(a,ua)?y=E.jsx(sa,jr(jr({},a.props),{},{onAction:g=>a.props.onAction(g,c),onChange:g=>{var P,p;return(P=(p=a.props).onChange)===null||P===void 0?void 0:P.call(p,g,c)}})):nt(a,da)&&(y=E.jsx(Sa,jr(jr({},a.props),{},{onAction:g=>a.props.onAction(g,c),onOpenChange:g=>{var P,p;return(P=(p=a.props).onOpenChange)===null||P===void 0?void 0:P.call(p,g,c)}}))),E.jsx(Ci,{textValue:f===""?Ii:f,children:E.jsxs(Di,{tooltipOptions:l,children:[S,v,C,y]})},c)},[a,e,r,i,l])}function ma(t){var e=t.normalizedItems,r=t.defaultSelectedKey,i=t.selectedKey,l=t.disabledKeys,a=t.onChange,o=I.useMemo(()=>i==null?i:String(i),[i]),n=I.useMemo(()=>r==null?r:String(r),[r]),s=I.useMemo(()=>ri(l),[l]),u=I.useCallback(d=>{var h;if(a!=null){var c=e.find(f=>String(Ar(f))===d),v=(h=Ar(c))!==null&&h!==void 0?h:d;a(v)}},[e,a]);return{selectedStringKey:o,defaultSelectedStringKey:n,disabledStringKeys:s,onStringSelectionChange:u}}var ga=["disabledKeys","children","UNSAFE_className"];function mt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function gt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?mt(Object(r),!0).forEach(function(i){pa(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):mt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function pa(t,e,r){return(e=ba(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function ba(t){var e=Ca(t,"string");return typeof e=="symbol"?e:e+""}function Ca(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function wa(t,e){if(t==null)return{};var r,i,l=ya(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function ya(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function Sa(t){var e=t.disabledKeys,r=t.children,i=t.UNSAFE_className,l=wa(t,ga),a=I.useMemo(()=>typeof r=="function"?r:Zr(r,null),[r]);return E.jsx(wi,gt(gt({},l),{},{UNSAFE_className:we("dh-action-menu",i),disabledKeys:e,children:a}))}var Ra=["defaultSelectedKey","disabledKeys","getInitialScrollPosition","normalizedItems","onChange","onOpenChange","onScroll","onSelectionChange","selectedKey","showItemIcons","tooltip"];function pt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function bt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?pt(Object(r),!0).forEach(function(i){Pa(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):pt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Pa(t,e,r){return(e=Ta(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ta(t){var e=Oa(t,"string");return typeof e=="symbol"?e:e+""}function Oa(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Ha(t,e){if(t==null)return{};var r,i,l=Wa(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function Wa(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function ja(t){var e=t.defaultSelectedKey,r=t.disabledKeys,i=t.getInitialScrollPosition,l=t.normalizedItems,a=t.onChange,o=t.onOpenChange,n=t.onScroll,s=n===void 0?ai:n,u=t.onSelectionChange,d=t.selectedKey,h=t.showItemIcons,c=t.tooltip,v=c===void 0?!0:c,f=Ha(t,Ra),C=I.useMemo(()=>ti(v),[v]),S=fa({itemIconSlot:"icon",showItemDescriptions:!1,showItemIcons:h,tooltipOptions:C}),y="".concat(h,"-").concat(C==null?void 0:C.placement),g=Ei({getInitialScrollPosition:i,onScroll:s,onOpenChange:o}),P=g.ref,p=g.onOpenChange,M=ma({normalizedItems:l,selectedKey:d,defaultSelectedKey:e,disabledKeys:r,onChange:a??u}),T=M.selectedStringKey,k=M.defaultSelectedStringKey,O=M.disabledStringKeys,W=M.onStringSelectionChange,A=I.useCallback(B=>{if(Li(B)){var K,j;return E.jsx(Ki,{title:(K=B.item)===null||K===void 0?void 0:K.title,items:(j=B.item)===null||j===void 0?void 0:j.items,children:S},Ar(B))}return S(B)},[S]);return bt(bt({},f),{},{children:A,forceRerenderKey:y,ref:P,items:l,selectedKey:T,defaultSelectedKey:k,disabledKeys:O,onSelectionChange:W,onOpenChange:p})}var Ma=["UNSAFE_className"],$a=["forceRerenderKey"];function Ct(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function wt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Ct(Object(r),!0).forEach(function(i){ka(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Ct(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function ka(t,e,r){return(e=Ba(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Ba(t){var e=Aa(t,"string");return typeof e=="symbol"?e:e+""}function Aa(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function yt(t,e){if(t==null)return{};var r,i,l=Fa(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function Fa(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function Wn(t){var e=t.UNSAFE_className,r=yt(t,Ma),i=ja(r),l=i.forceRerenderKey,a=yt(i,$a);return I.createElement(yi,wt(wt({},a),{},{key:l,UNSAFE_className:we("dh-picker","dh-picker-normalized",e)}))}var Ia=["UNSAFE_className"],Da=["defaultSelectedKey","disabledKeys","selectedKey","ref"];function St(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function Rt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?St(Object(r),!0).forEach(function(i){Ea(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):St(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Ea(t,e,r){return(e=La(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function La(t){var e=Ka(t,"string");return typeof e=="symbol"?e:e+""}function Ka(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Pt(t,e){if(t==null)return{};var r,i,l=Na(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function Na(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}var _a=Xe.forwardRef(function(e,r){var i=e.UNSAFE_className,l=Pt(e,Ia),a=Ni(l),o=a.defaultSelectedKey,n=a.disabledKeys,s=a.selectedKey,u=a.ref,d=Pt(a,Da),h=li(r,u);return E.jsx(Si,Rt(Rt({},d),{},{UNSAFE_className:we("dh-combobox",i),ref:h,defaultSelectedKey:o,disabledKeys:n,selectedKey:s}))});_a.displayName="ComboBox";function Tt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function Ot(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Tt(Object(r),!0).forEach(function(i){za(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Tt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function za(t,e,r){return(e=Xa(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Xa(t){var e=Va(t,"string");return typeof e=="symbol"?e:e+""}function Va(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Qr(t){return t.replace(/^\.\$/,"")}function Ht(t){var e;if(t.key==null)return null;var r=Qr(String(t.key)),i=(e=_i(t))!==null&&e!==void 0?e:typeof t.props.children=="string"?t.props.children:r;return{kind:"item",key:r,label:i}}function et(t){return t.kind==="section"}function Ya(t){var e=[];return t.forEach(r=>{if(ii(r)){var i=r,l=i.key!=null?Qr(String(i.key)):String(e.length),a=[];Jr(i.props.children).forEach(n=>{if(xr(n)){var s=Ht(n);s!=null&&a.push(s)}}),e.push({kind:"section",key:l,title:i.props.title,items:a});return}if(xr(r)){var o=Ht(r);o!=null&&e.push(o)}}),e}function ni(t){return t.flatMap(e=>et(e)?e.items:[e])}function xa(t,e,r){var i=[];return t.forEach(l=>{if(et(l)){var a=l.items.filter(o=>r(o.label,e));a.length>0&&i.push(Ot(Ot({},l),{},{items:a}))}else r(l.label,e)&&i.push(l)}),i}function Ua(t){var e=new Set;return t.forEach(r=>{et(r)?r.items.forEach(i=>e.add(i.key)):e.add(r.key)}),e}function si(t,e){var r=[];return t.forEach(i=>{if(ii(i)){var l=i,a=si(Jr(l.props.children).filter(n=>n!=null),e);a.length>0&&r.push(I.cloneElement(l,{children:a}));return}if(xr(i)){var o=i;o.key!=null&&e.has(Qr(String(o.key)))&&r.push(i)}}),r}function Wt(t,e){return t==null?new Set:t==="all"?new Set(e):new Set([...t].map(String))}function Ga(t,e){return Qa(t)||Ja(t,e)||Za(t,e)||qa()}function qa(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
2
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Za(t,e){if(t){if(typeof t=="string")return jt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?jt(t,e):void 0}}function jt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Ja(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function Qa(t){if(Array.isArray(t))return t}function el(t){var e=t.selectedKeys,r=t.defaultSelectedKeys,i=t.disabledKeys,l=t.onChange,a=t.onSelectionChange,o=t.allKeys,n=I.useMemo(()=>e!==void 0?Wt(e,o):void 0,[e,o]),s=I.useCallback(P=>{var p=l??a;p==null||p(P)},[l,a]),u=I.useRef(void 0);u.current===void 0&&(u.current=Wt(r,o));var d=ei(n,u.current,s),h=Ga(d,2),c=h[0],v=h[1],f=I.useRef(c);f.current=c;var C=I.useMemo(()=>ri(i),[i]),S=I.useCallback(P=>{var p=new Set(f.current);p.has(P)?p.delete(P):p.add(P),v(p)},[v]),y=I.useCallback((P,p)=>{if(P==="all"){v(new Set(o));return}var M=new Set(p.map(k=>k.key)),T=new Set([...f.current].filter(k=>!M.has(k)));P.forEach(k=>T.add(String(k))),v(T)},[o,v]),g=I.useMemo(()=>[...c],[c]);return{selectedKeys:c,selectedKeyArray:g,listBoxDisabledKeys:C,toggleKey:S,applyListBoxSelection:y}}function rl(t,e){return ll(t)||al(t,e)||il(t,e)||tl()}function tl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
3
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function il(t,e){if(t){if(typeof t=="string")return Mt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Mt(t,e):void 0}}function Mt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function al(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function ll(t){if(Array.isArray(t))return t}function ol(t){var e=t.allEntries,r=t.wrappedChildren,i=t.inputValue,l=t.defaultInputValue,a=t.onInputChange,o=t.onSearchTextChange,n=ei(i,l,a),s=rl(n,2),u=s[0],d=s[1],h=I.useCallback(g=>{d(g),o==null||o(g)},[d,o]),c=Ri({sensitivity:"base"}),v=c.contains,f=o!=null||u==="",C=I.useMemo(()=>f?e:xa(e,u,v),[e,u,v,f]),S=I.useMemo(()=>ni(C),[C]),y=I.useMemo(()=>{if(f)return r;var g=Ua(C);return si(r,g)},[r,C,f]);return{searchText:u,setSearchText:h,filteredItems:S,filteredJsxChildren:y}}function nl(t,e){return hl(t)||dl(t,e)||ul(t,e)||sl()}function sl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
4
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function ul(t,e){if(t){if(typeof t=="string")return $t(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?$t(t,e):void 0}}function $t(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function dl(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function hl(t){if(Array.isArray(t))return t}function vl(t){return t.replace(/\s+/g,"")}function cl(t){var e=t.filteredItems,r=t.allItems,i=t.shouldFocusWrap,l=t.overlayState,a=t.openOverlay,o=t.closeOverlay,n=t.isReadOnly,s=t.isDisabled,u=t.searchText,d=t.setSearchText,h=t.selectedKeys,c=t.toggleKey,v=t.allowsCustomValue,f=t.menuTrigger,C=t.onKeyDown,S=t.listBoxContainerRef,y=t.inputRef,g=I.useState(null),P=nl(g,2),p=P[0],M=P[1],T=I.useCallback(W=>{var A=e.length;A!==0&&M(B=>{var K=B==null?-1:e.findIndex(L=>L.key===B),j;return W==="down"?K===-1?j=0:i?j=(K+1)%A:j=Math.min(K+1,A-1):K===-1?j=A-1:i?j=(K-1+A)%A:j=Math.max(K-1,0),e[j].key})},[e,i]),k=I.useCallback(W=>{if(!s){switch(W.key){case"ArrowDown":W.preventDefault(),l.isOpen?T("down"):a("manual");break;case"ArrowUp":W.preventDefault(),l.isOpen&&T("up");break;case"Enter":{if(!l.isOpen){W.preventDefault(),a("manual");break}var A=p!=null&&e.some(F=>F.key===p);if(!n&&A)W.preventDefault(),c(p);else if(!n&&v&&u.trim()!==""){W.preventDefault();var B=u.trim(),K=r.find(F=>F.label.toLowerCase()===B.toLowerCase());c(K!=null?K.key:B),d("")}else d(""),o();break}case"Escape":l.isOpen&&(W.preventDefault(),o());break;case"Tab":l.isOpen&&o();break;case"Backspace":if(u===""&&!n&&h.size>0){var j=[...h],L=j[j.length-1];L!=null&&c(L)}break}C==null||C(W)}},[s,l,a,o,T,n,p,e,r,v,c,u,d,h,C]),O=I.useRef(!1);return I.useEffect(()=>{O.current&&!l.isOpen&&(v||d(""),M(null)),O.current=l.isOpen},[l.isOpen,d,v]),I.useEffect(()=>{f!=="manual"&&u!==""&&!l.isOpen&&!s&&a("input")},[u]),I.useEffect(()=>{var W=S.current;if(W==null){var A;(A=y.current)===null||A===void 0||A.removeAttribute("aria-activedescendant");return}var B=W.querySelectorAll('[role="option"]'),K=p!=null?"-option-".concat(vl(p)):null,j;B.forEach(F=>{var z=K!=null&&F.id.endsWith(K);z?(F.setAttribute("data-dh-focused","true"),F.scrollIntoView({block:"nearest"}),j=F.id):F.removeAttribute("data-dh-focused")});var L=y.current;L!=null&&(j!=null?L.setAttribute("aria-activedescendant",j):L.removeAttribute("aria-activedescendant"))},[p,e,y,S]),{handleInputKeyDown:k}}function fl(t,e){return bl(t)||pl(t,e)||gl(t,e)||ml()}function ml(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
5
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function gl(t,e){if(t){if(typeof t=="string")return kt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?kt(t,e):void 0}}function kt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function pl(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function bl(t){if(Array.isArray(t))return t}var Cl=500;function wl(t){var e=t.loadingState,r=t.searchText,i=t.isOpen,l=t.menuTrigger,a=I.useState(!1),o=fl(a,2),n=o[0],s=o[1],u=I.useRef(null),d=e==="loading"||e==="filtering",h=I.useRef(r);return I.useEffect(()=>{if(d&&!n){var c=r!==h.current;u.current!==null&&c&&(clearTimeout(u.current),u.current=null),u.current===null&&(u.current=setTimeout(()=>{s(!0)},Cl))}else d||(s(!1),u.current!=null&&(clearTimeout(u.current),u.current=null));h.current=r},[d,n,r]),I.useEffect(()=>()=>{u.current!=null&&(clearTimeout(u.current),u.current=null)},[]),n&&(i||l==="manual"||e==="loading")}function yl(t,e){return Tl(t)||Pl(t,e)||Rl(t,e)||Sl()}function Sl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
6
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Rl(t,e){if(t){if(typeof t=="string")return Bt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Bt(t,e):void 0}}function Bt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Pl(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function Tl(t){if(Array.isArray(t))return t}function Ol(t){var e=t.containerRef,r=t.isOpen,i=t.onScroll,l=I.useState(null),a=yl(l,2),o=a[0],n=a[1],s=I.useRef(i);s.current=i,I.useEffect(()=>{if(!r){n(null);return}var u=window.requestAnimationFrame(()=>{var d=e.current;if(d!=null){var h=d.querySelector('[role="listbox"]');n(h??d)}});return()=>{window.cancelAnimationFrame(u)}},[r,e]),I.useEffect(()=>{if(o!=null){var u=d=>{s.current(d)};return o.addEventListener("scroll",u),()=>{o.removeEventListener("scroll",u)}}},[o])}function Hl(t){var e=t.tagKey,r=t.label,i=t.isDisabled,l=t.isReadOnly,a=t.onRemove;return E.jsxs("span",{className:"dh-multi-select-tag",children:[E.jsx("span",{className:"dh-multi-select-tag-label",children:r}),!i&&!l&&E.jsx("button",{type:"button",className:"dh-multi-select-tag-remove",tabIndex:-1,"aria-label":"Remove ".concat(r),onPointerDown:o=>o.preventDefault(),onClick:()=>a(e),children:E.jsx(Pi,{})})]})}function Wl(t){var e=t.listBoxRef,r=t.listBoxId,i=t.loadingState,l=t.children,a=t.selectedKeys,o=t.disabledKeys,n=t.onSelectionChange,s=t.ariaLabel,u=t.emptyMessage;return u!=null?E.jsx("div",{className:"dh-multi-select-empty",children:u}):E.jsx(Ti,{ref:e,id:r,selectionMode:"multiple",selectedKeys:a,onSelectionChange:n,disabledKeys:o,"aria-label":s,isLoading:i==="loadingMore",UNSAFE_style:{maxHeight:"inherit"},children:l})}var jl=["children","tooltip","selectedKeys","defaultSelectedKeys","disabledKeys","onChange","onSelectionChange","onOpenChange","onScroll","label","description","errorMessage","isRequired","isDisabled","isReadOnly","validationState","isQuiet","labelPosition","labelAlign","necessityIndicator","contextualHelp","inputValue","defaultInputValue","onInputChange","shouldFocusWrap","loadingState","menuTrigger","align","direction","shouldFlip","menuWidth","allowsCustomValue","formValue","validationBehavior","autoFocus","name","id","isHidden","onFocus","onBlur","onFocusChange","onKeyDown","onKeyUp","onSearchTextChange","selectedItemLabels","UNSAFE_className","aria-label","aria-labelledby","aria-describedby","aria-details"];function At(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function Ft(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?At(Object(r),!0).forEach(function(i){Ml(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):At(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Ml(t,e,r){return(e=$l(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function $l(t){var e=kl(t,"string");return typeof e=="symbol"?e:e+""}function kl(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function Bl(t,e){if(t==null)return{};var r,i,l=Al(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function Al(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function Fl(t){if(t!=null)return typeof t=="number"?"".concat(t,"px"):/^(size|static-size)-/.test(t)?"var(--spectrum-global-dimension-".concat(t,")"):t}function Il(t,e){var r,i,l,a=t.children,o=t.tooltip,n=o===void 0?!0:o,s=t.selectedKeys,u=t.defaultSelectedKeys,d=t.disabledKeys,h=t.onChange,c=t.onSelectionChange,v=t.onOpenChange,f=t.onScroll,C=f===void 0?ai:f,S=t.label,y=t.description,g=t.errorMessage,P=t.isRequired,p=P===void 0?!1:P,M=t.isDisabled,T=M===void 0?!1:M,k=t.isReadOnly,O=k===void 0?!1:k,W=t.validationState,A=t.isQuiet,B=A===void 0?!1:A,K=t.labelPosition,j=K===void 0?"top":K,L=t.labelAlign,F=t.necessityIndicator,z=t.contextualHelp,N=t.inputValue,X=t.defaultInputValue,U=X===void 0?"":X,x=t.onInputChange,V=t.shouldFocusWrap,b=V===void 0?!1:V,w=t.loadingState,H=t.menuTrigger,R=H===void 0?"input":H,$=t.align,D=$===void 0?"start":$,Y=t.direction,q=Y===void 0?"bottom":Y,_=t.shouldFlip,G=_===void 0?!0:_,te=t.menuWidth,ie=t.allowsCustomValue,le=ie===void 0?!1:ie,re=t.formValue,oe=re===void 0?"key":re,J=t.validationBehavior,Q=J===void 0?"aria":J,ue=t.autoFocus,se=ue===void 0?!1:ue,he=t.name,de=t.id,ae=t.isHidden,Ce=ae===void 0?!1:ae,ye=t.onFocus,fe=t.onBlur,ve=t.onFocusChange,pe=t.onKeyDown,Pe=t.onKeyUp,He=t.onSearchTextChange,Te=t.selectedItemLabels,We=t.UNSAFE_className,$e=t["aria-label"],Ve=t["aria-labelledby"],Ye=t["aria-describedby"],ke=t["aria-details"],Be=Bl(t,jl),xe=I.useRef(void 0),nr=I.useCallback(Z=>{v==null||v(Z,xe.current)},[v]),ee=Oi({onOpenChange:nr}),je=I.useCallback(Z=>{xe.current=Z,ee.open()},[ee]),Ae=I.useCallback(()=>{xe.current=void 0,ee.close()},[ee]),sr=I.useId(),Ir="".concat(q," ").concat(D),Me=I.useRef(null),Ue=I.useRef(null),br=I.useRef(null),Ge=lt(br),Cr=I.useRef(null),ur=lt(Cr),Ee=I.useRef(!1),wr=li(Me,e),Le=I.useMemo(()=>ti(n),[n]),ir=I.useMemo(()=>Jr(Zr(a,Le)),[a,Le]),Se=I.useMemo(()=>Ya(ir),[ir]),Ke=I.useMemo(()=>ni(Se),[Se]),yr=I.useMemo(()=>Ke.map(Z=>Z.key),[Ke]),Sr=I.useRef(new Map),Rr=I.useMemo(()=>{var Z=Sr.current;return Ke.forEach(ce=>Z.set(ce.key,ce.label)),new Map(Z)},[Ke]),Pr=I.useCallback(Z=>{var ce,Je;return(ce=(Je=Rr.get(Z))!==null&&Je!==void 0?Je:Te==null?void 0:Te.get(Z))!==null&&ce!==void 0?ce:Z},[Rr,Te]),ar=ol({allEntries:Se,wrappedChildren:ir,inputValue:N,defaultInputValue:U,onInputChange:x,onSearchTextChange:He}),dr=ar.searchText,Tr=ar.setSearchText,qe=ar.filteredItems,Dr=ar.filteredJsxChildren,Er=I.useMemo(()=>{if(!(qe.length>0)){if(w==="loading")return"Loading...";if(w!=="loadingMore")return"No results"}},[qe.length,w]),Ze=el({selectedKeys:s,defaultSelectedKeys:u,disabledKeys:d,onChange:h,onSelectionChange:c,allKeys:yr}),Or=Ze.selectedKeys,hr=Ze.selectedKeyArray,Lr=Ze.listBoxDisabledKeys,vr=Ze.toggleKey,Hr=Ze.applyListBoxSelection,Fe=cl({filteredItems:qe,allItems:Ke,shouldFocusWrap:b,overlayState:ee,openOverlay:je,closeOverlay:Ae,isReadOnly:O,isDisabled:T,searchText:dr,setSearchText:Tr,selectedKeys:Or,toggleKey:vr,allowsCustomValue:le,menuTrigger:R,onKeyDown:pe,listBoxContainerRef:ur,inputRef:Ue}),cr=Fe.handleInputKeyDown;Ol({containerRef:ur,isOpen:ee.isOpen,onScroll:C});var hi=wl({loadingState:w,searchText:dr,isOpen:ee.isOpen,menuTrigger:R}),Wr=I.useCallback(()=>{requestAnimationFrame(()=>{var Z;(Z=Ue.current)===null||Z===void 0||Z.focus()})},[]),vi=I.useCallback(Z=>{vr(Z),Wr()},[vr,Wr]),ci=I.useCallback(Z=>{O||(Hr(Z,qe),Wr())},[O,Hr,qe,Wr]),fi=I.useCallback(Z=>{Ee.current||(Ee.current=!0,R==="focus"&&!ee.isOpen&&!T&&je("focus"),ye==null||ye(Z),ve==null||ve(!0))},[ye,ve,R,ee,T,je]),mi=I.useCallback(Z=>{var ce=Z.relatedTarget;if(ce!=null){if(Me.current!=null&&Me.current.contains(ce)||Ge.current!=null&&Ge.current.contains(ce))return}else{requestAnimationFrame(()=>{var Je=document.activeElement;Je!=null&&(Me.current!=null&&Me.current.contains(Je)||Ge.current!=null&&Ge.current.contains(Je))||(Ee.current=!1,ee.isOpen&&Ae(),fe==null||fe(Z),ve==null||ve(!1))});return}Ee.current=!1,ee.isOpen&&Ae(),fe==null||fe(Z),ve==null||ve(!1)},[fe,ve,ee,Ae,Ge]),gi=I.useCallback(()=>{var Z;T||(ee.isOpen||je("manual"),(Z=Ue.current)===null||Z===void 0||Z.focus())},[T,ee,je]),pi=I.useCallback(Z=>{var ce;Z.stopPropagation(),!T&&(ee.isOpen?Ae():je("manual"),(ce=Ue.current)===null||ce===void 0||ce.focus())},[T,ee,je,Ae]);return E.jsx(Hi,Ft(Ft({},Be),{},{label:S,description:y,errorMessage:W==="invalid"?g:void 0,isRequired:p,isDisabled:T,validationState:W,labelPosition:j,labelAlign:L,necessityIndicator:F,contextualHelp:z,wrapperClassName:we("dh-multi-select",We),children:E.jsxs("div",{style:Ce?{display:"none"}:void 0,children:[E.jsx(Wi,{within:!0,focusRingClass:"focus-ring",focusClass:"is-focused",children:E.jsxs("div",{ref:wr,id:de,onClick:gi,className:we("dh-multi-select-trigger",{"is-disabled":T,"is-read-only":O,"is-quiet":B,"is-invalid":W==="invalid"}),children:[E.jsxs("div",{className:"dh-multi-select-content",children:[hr.map(Z=>E.jsx(Hl,{tagKey:Z,label:Pr(Z),isDisabled:T,isReadOnly:O,onRemove:vi},Z)),E.jsx("input",{ref:Ue,className:"dh-multi-select-input",value:dr,onChange:Z=>Tr(Z.target.value),onFocus:fi,onBlur:mi,onKeyDown:cr,onKeyUp:Pe,disabled:T,readOnly:O,autoFocus:se,role:"combobox","aria-haspopup":"listbox","aria-expanded":ee.isOpen,"aria-controls":ee.isOpen?sr:void 0,"aria-autocomplete":"list","aria-label":$e,"aria-labelledby":Ve,"aria-describedby":Ye,"aria-details":ke})]}),hi&&E.jsx("div",{className:"dh-multi-select-loading-circle",children:E.jsx(ji,{"aria-label":"Loading",isIndeterminate:!0,size:"S"})}),W==="invalid"&&!T&&E.jsx("div",{className:"dh-multi-select-invalid-icon","aria-hidden":"true",children:E.jsx(Mi,{})}),E.jsx("div",{className:we("dh-multi-select-chevron",{"is-open":ee.isOpen}),onClick:pi,onPointerDown:Z=>Z.preventDefault(),role:"button",tabIndex:-1,"aria-label":"Toggle dropdown",children:E.jsx($i,{})})]})}),he!=null&&E.jsx("input",{type:"hidden",name:he,value:oe==="text"?hr.map(Pr).join(","):hr.join(","),required:Q==="native"&&p?!0:void 0}),ee.isOpen&&!T&&E.jsx(ki,{ref:br,triggerRef:Me,state:ee,hideArrow:!0,isNonModal:!0,placement:Ir,shouldFlip:G,shouldCloseOnInteractOutside:Z=>{var ce;return((ce=Me.current)===null||ce===void 0?void 0:ce.contains(Z))!==!0},UNSAFE_style:{width:(r=(i=Fl(te))!==null&&i!==void 0?i:(l=Me.current)===null||l===void 0?void 0:l.offsetWidth)!==null&&r!==void 0?r:void 0},children:E.jsx(Wl,{listBoxRef:Cr,listBoxId:sr,loadingState:w,selectedKeys:Or,disabledKeys:Lr,onSelectionChange:ci,ariaLabel:typeof S=="string"?S:"Options",emptyMessage:Er,children:Dr})})]})}))}var Dl=Xe.forwardRef(Il);Dl.displayName="MultiSelect";function El(t,e,r){return t.substring(0,e)+r+t.substring(e+1)}function Ll(t,e,r){return t.length<r?"".concat(t).concat(e.substring(t.length,r)):t}function It(t,e){for(var r=t.length,i=t.length-1;i>=0&&e[i]===t[i];i-=1)r=i;return t.substring(0,r)}function Dt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function Kl(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Dt(Object(r),!0).forEach(function(i){Nl(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Dt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function Nl(t,e,r){return(e=_l(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function _l(t){var e=zl(t,"string");return typeof e=="symbol"?e:e+""}function zl(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}var Re=oi.module("MaskedInput"),Qe={BACKWARD:"backward",NONE:"none"},Mr=" ",Xl=Xe.forwardRef((t,e)=>{var r=t.className,i=t.example,l=t.getNextSegmentValue,a=l===void 0?(b,w,H)=>H:l,o=t.getPreferredReplacementString,n=o===void 0?El:o,s=t.normalizePastedText,u=s===void 0?b=>b:s,d=t.onChange,h=d===void 0?()=>!1:d,c=t.onSelect,v=c===void 0?()=>!1:c,f=t.onSubmit,C=t.pattern,S=t.placeholder,y=t.selection,g=t.value,P=t.onFocus,p=P===void 0?()=>!1:P,M=t.onBlur,T=M===void 0?()=>!1:M,k=t["data-testid"],O=zi(e),W=I.useMemo(()=>Array.isArray(i)?i:[i],[i]),A=I.useMemo(()=>W[0].replace(/[a-zA-Z0-9]/g,Mr),[W]);I.useEffect(function(){if(y!=null){var w;Re.debug("setting selection...",y);var H=y.selectionStart,R=y.selectionEnd,$=y.selectionDirection;(w=O.current)===null||w===void 0||w.setSelectionRange(H,R,$),Re.debug("selection set!")}},[y,O]);var B=I.useCallback(b=>{for(var w=b,H=b,R=W.length>0?W[0]:g,$=w-1;$>=0&&/[a-zA-Z0-9]/g.test(R.charAt($));$-=1)w=$;for(var D=H;D<R.length&&/[a-zA-Z0-9]/g.test(R.charAt(D));D+=1)H=D+1;var Y=w===H?Qe.NONE:Qe.BACKWARD;return{selectionStart:w,selectionEnd:H,selectionDirection:Y}},[W,g]);function K(b,w){for(var H=arguments.length>2&&arguments[2]!==void 0?arguments[2]:b.length,R="",$=0;$<H;$+=1)b.charAt($)!==Mr?R=R.concat(b[$]):R=R.concat(w[$]);return R=R.concat(w.substring(H)),R}var j=I.useCallback(function(b){var w=arguments.length>1&&arguments[1]!==void 0?arguments[1]:b.length,H=new RegExp("^".concat(C,"$"));if(H.test(b))return!0;for(var R=0;R<W.length;R+=1){var $=K(b,W[R],w);if(H.test($))return!0}return!1},[C,W]);function L(b){var w=B(b),H=w.selectionEnd+1;return H>=g.length?w:B(H)}function F(b){var w=B(b),H=w.selectionStart-1;return H<=0?w:B(H)}function z(b,w){var H=B(b),R=g.substring(H.selectionStart,H.selectionEnd),$=a(H,w,R,g),D=g.substring(0,H.selectionStart)+$+g.substring(H.selectionEnd);j(D,H.selectionEnd)&&(h(D),v(H))}var N=I.useCallback(b=>{var w=b.target,H=w.selectionStart,R=H===void 0?0:H,$=w.selectionEnd,D=$===void 0?0:$,Y=w.selectionDirection,q=Y===void 0?"none":Y;if(R===null||D===null||q===null){Re.error("Selection attempted on non-text input element",b.target);return}if(Re.debug2("handleSelect",R,D,q),!(y!=null&&R===y.selectionStart&&D===y.selectionEnd)){if(y!=null&&R===g.length&&D===g.length&&b.nativeEvent.type!=="mouseup"){v(Kl({},y));return}if(R===D){var _=B(R);Re.debug("Selection segment from ",R,D,"=>",_),v(_)}else v({selectionStart:R,selectionEnd:D,selectionDirection:q})}},[B,v,y,g]),X=I.useCallback(b=>{var w;if(O.current){Re.debug("handleSelectCapture",b);var H=(w=O.current.selectionStart)!==null&&w!==void 0?w:0;H===g.length&&y!=null&&H!==y.selectionStart&&(b.preventDefault(),b.stopPropagation())}},[O,y,g]);function U(b){if(b.preventDefault(),b.stopPropagation(),!!O.current){var w=b.key,H=O.current,R=H.selectionStart,$=R===void 0?0:R,D=H.selectionEnd,Y=D===void 0?0:D;if($===null||Y===null){Re.error("Selection arrow nvaigation attempted on non-text input element",b.target);return}w==="ArrowLeft"?v(F($)):w==="ArrowRight"?v(L(Y)):w==="ArrowUp"?z($,-1):w==="ArrowDown"&&z($,1)}}var x=I.useCallback(b=>{if(b.preventDefault(),b.stopPropagation(),!!O.current){var w=b.clipboardData.getData("text/plain");Re.debug("handlePaste",w);var H=u(w);j(H,H.length)&&(h(H),v({selectionStart:H.length,selectionEnd:H.length,selectionDirection:Qe.NONE}))}},[O,h,v,j,u]);function V(b){if(O.current){Re.debug("handleKeyDown",b);var w=b.key,H=O.current,R=H.selectionStart,$=R===void 0?0:R,D=H.selectionEnd,Y=D===void 0?0:D;if($===null||Y===null){Re.error("Selection key event on non-text input element",b.target);return}if(w==="Enter"){f==null||f(b);return}if(w.startsWith("Arrow")){U(b);return}if(w==="Delete"||w==="Backspace"){if(b.preventDefault(),b.stopPropagation(),Y>=It(g,A).length){var q=g.substring(0,$===Y?$-1:$),_=It(q,A);_!==g&&(h(_),v({selectionStart:_.length,selectionEnd:_.length,selectionDirection:Qe.NONE}));return}if($!==Y){var G=g.substring(0,$)+g.substring($,Y).replace(/[a-zA-Z0-9]/g,Mr)+g.substring(Y);Re.debug("Range ",$,Y,"deleted, setting value",G),h(G),v({selectionStart:$,selectionEnd:$,selectionDirection:Qe.NONE})}else if($>0)for(var te=$-1;te>=0;te-=1){var ie=g.substring(0,te)+g.substring(te,$).replace(/[a-zA-Z0-9]/g,Mr)+g.substring($);if(ie!==g){h(ie),v({selectionStart:te,selectionEnd:te,selectionDirection:Qe.NONE});return}}return}if(!(b.altKey||b.metaKey||b.ctrlKey||w.length>1)){b.preventDefault(),b.stopPropagation();for(var le=Array.from(new Set([w,w.toUpperCase(),w.toLowerCase()])),re=0;re<le.length;re+=1)for(var oe=le[re],J=/[a-zA-Z0-9]/g.test(oe)?W[0].length-1:$,Q=$;Q<=J;Q+=1){var ue=Ll(g,W[0],Q+1),se=n(ue,Q,oe,$,Y);if(j(se,Q+1)){var he=B(Q),de=Q+1,ae={selectionStart:de,selectionEnd:de,selectionDirection:Qe.NONE};if(de>=he.selectionEnd){var Ce=L(Q);Ce.selectionStart!==he.selectionStart&&(ae=Ce)}Re.debug("handleKeyDown",w,"=>",se,ae),h(se),v(ae);return}}}}}return E.jsx("input",{ref:O,className:we("form-control masked-input",r),type:"text",pattern:C,placeholder:S,value:g,onChange:()=>{},onKeyDown:V,onPaste:x,onSelect:N,onSelectCapture:X,onFocus:p,onBlur:T,"data-testid":k})});function lr(t,e,r,i,l){var a=i-r+1,o=((parseInt(e,10)-t-r)%a+a)%a+r;return"".concat(o).padStart(l,"0")}function Vl(t,e,r){var i=t.selectionStart;return i===0?lr(e,r,1900,2099,4):i===5?lr(e,r,1,12,2):i===8?lr(e,r,1,31,2):i===11?lr(e,r,0,23,2):i===17||i===14?lr(e,r,0,59,2):i===20||i===24||i===28?lr(e,r,0,999,3):r}function $r(t){var e=t.substring(0,23),r=t.substring(23,26),i=t.substring(26);return[e,r,i].filter(l=>l!=="").join("​")}function Kr(t,e){return Gl(t)||Ul(t,e)||xl(t,e)||Yl()}function Yl(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
7
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function xl(t,e){if(t){if(typeof t=="string")return Et(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Et(t,e):void 0}}function Et(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Ul(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function Gl(t){if(Array.isArray(t))return t}var ql=oi.module("DateTimeInput"),Zl="[12][0-9]{3}-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])",Jl="([01][0-9]|2[0-3]):[0-5][0-9]:[0-5][0-9]\\.[0-9]{3}​[0-9]{3}​[0-9]{3}",Ql="".concat(Zl," ").concat(Jl),kr="2022-01-01",ui="".concat(kr," 00:00:00.000000000"),eo="YYYY-MM-DD HH:MM:SS.SSSSSSSSS";function Nr(t){return t!=null&&t.length>=kr.length?"".concat(t.substring(0,kr.length)).concat(t.substring(kr.length).replace(/\u2007/g,"0")).concat(ui.substring(t.length)):t}function _r(t){return t.replace(/\u200B/g,"")}var ro=[$r(ui)],to=Xe.forwardRef((t,e)=>{var r=t.className,i=r===void 0?"":r,l=t.onChange,a=l===void 0?()=>{}:l,o=t.defaultValue,n=o===void 0?"":o,s=t.onFocus,u=s===void 0?()=>{}:s,d=t.onBlur,h=d===void 0?()=>{}:d,c=t.onSubmit,v=t["data-testid"],f=I.useState(n.length>0?$r(n):""),C=Kr(f,2),S=C[0],y=C[1],g=I.useState(),P=Kr(g,2),p=P[0],M=P[1],T=I.useCallback(W=>{var A=W.replace(/T/," "),B=A.match(/^(\d{4}-\d{2}-\d{2}\s+\d{2}:\d{2}:\d{2}(?:\.\d+)?)/);if(B){var K=Kr(B,2);A=K[1]}return $r(A)},[]);I.useEffect(()=>{if(n.length>0){var W=T(n);y(W),a(Nr(_r(W)))}else y(""),a("")},[n,T,a]);var k=I.useCallback(W=>{ql.debug("handleChange",W),y(W),a(Nr(_r(W)))},[a]),O=I.useCallback(()=>{var W=_r(S),A=Nr(W);A!==W&&y($r(A)),h()},[S,h]);return E.jsx("div",{className:"d-flex flex-row align-items-center",children:E.jsx(Xl,{ref:e,className:we(i),example:ro,getNextSegmentValue:Vl,normalizePastedText:T,onChange:k,onSelect:M,onSubmit:c,pattern:Ql,placeholder:eo,selection:p,value:S,onFocus:u,onBlur:O,"data-testid":v})})});to.displayName="DateTimeInput";var Ur;function Lt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function Ne(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?Lt(Object(r),!0).forEach(function(i){rr(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):Lt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function rr(t,e,r){return(e=io(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function io(t){var e=ao(t,"string");return typeof e=="symbol"?e:e+""}function ao(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ze extends I.PureComponent{static renderHandle(){return E.jsxs("div",{children:[E.jsx(Xi,{children:"Drag to re-order"}),E.jsx(Vr,{icon:Gi})]})}static renderBadge(e){var r=e.text;return r!=null&&r.length>0?E.jsx("span",{className:"number-badge",children:r}):null}static renderTextItem(e){var r=e.text,i=e.badgeText,l=i===void 0?"":i,a=e.className,o=a===void 0?"":a;return E.jsxs("div",{className:we("item-list-item-content","draggable-item-list-item-content",o),children:[E.jsx("span",{className:"title",children:r}),ze.renderBadge({text:l}),ze.renderHandle()]})}static renderItem(e){var r,i,l=e.item,a=e.isClone,o=e.selectedCount,n=l!=null?(r=(i=l.displayValue)!==null&&i!==void 0?i:l.value)!==null&&r!==void 0?r:"".concat(l):"",s=a!==void 0&&a?"".concat(o):"",u=a!==void 0&&a?"item-list-item-clone":"";return ze.renderTextItem({text:n,badgeText:s,className:u})}static getDraggableId(e,r){return"".concat(e,"/").concat(r)}static getDraggableIndex(e){var r=e.split("/").pop();return parseInt(r!==void 0?r:"",10)}constructor(e){super(e),rr(this,"itemList",void 0),rr(this,"getCachedDraggableItem",gr((r,i,l,a,o,n,s,u)=>E.jsx(Bi,{draggableId:ze.getDraggableId(r,a),index:a,isDragDisabled:s,children:d=>E.jsx("div",Ne(Ne(Ne({role:"menuitem",className:"draggable-item-list-item",ref:d.innerRef,tabIndex:-1},d.draggableProps),d.dragHandleProps),{},{children:i({item:l,itemIndex:a,isFocused:o,isSelected:n,style:u,isClone:!1})}))},a),{max:ut.CACHE_SIZE})),rr(this,"getCachedRenderDraggableItem",gr((r,i,l)=>a=>{var o=a.item,n=a.itemIndex,s=a.isFocused,u=a.isSelected,d=a.style;return this.getCachedDraggableItem(r,l,o,n,s,u,i,d)},{max:1})),rr(this,"getCachedRenderClone",gr((r,i,l,a)=>(o,n,s)=>{var u=this.state.selectedCount,d=o.draggableProps,h=o.dragHandleProps,c=o.innerRef,v=s.source.index,f=i[v-l];return E.jsx("div",Ne(Ne(Ne({className:we("draggable-item-list-dragging-item-container",r)},d),h),{},{ref:c,children:E.jsx("div",{className:we("draggable-item-list-dragging-item",{"two-dragged":u===2},{"multiple-dragged":u>2}),children:a({item:f,itemIndex:v,isFocused:!1,isSelected:!0,style:{},isClone:!0,selectedCount:u})})}))},{max:1})),this.handleSelectionChange=this.handleSelectionChange.bind(this),this.itemList=Xe.createRef(),this.state={selectedCount:0}}selectItem(e){var r;(r=this.itemList.current)===null||r===void 0||r.selectItem(e)}focusItem(e){var r;(r=this.itemList.current)===null||r===void 0||r.focusItem(e)}scrollToItem(e){var r;(r=this.itemList.current)===null||r===void 0||r.scrollToItem(e)}handleSelectionChange(e){this.setState({selectedCount:Vi.count(e)});var r=this.props.onSelectionChange;r(e)}render(){var e=this.props,r=e.className,i=e.draggablePrefix,l=e.draggingItemClassName,a=e.droppableId,o=e.isDoubleClickSelect,n=e.isDragDisabled,s=e.isDropDisabled,u=e.hasPlaceholder,d=e.isMultiSelect,h=e.isStickyBottom,c=e.itemCount,v=e.items,f=e.offset,C=e.onFocusChange,S=e.onSelect,y=e.onViewportChange,g=e.renderItem,P=e.rowHeight,p=e.selectedRanges,M=e.style,T=e["data-testid"];return E.jsx(Ai,{isDropDisabled:s,droppableId:a,mode:"virtual",renderClone:this.getCachedRenderClone(l,v,f,g),"data-testid":T,children:(k,O)=>E.jsxs("div",Ne(Ne({role:"menu",className:we("draggable-item-list",r,{"is-drop-disabled":s,"is-drag-disabled":n,"is-dragging-from-this":O.draggingFromThisWith,"is-dragging-over":O.isDraggingOver,"is-dropping":O.draggingOverWith}),style:M,ref:k.innerRef},k.droppableProps),{},{children:[E.jsx(ut,{focusSelector:".draggable-item-list-item",isDoubleClickSelect:o,isDragSelect:!1,isMultiSelect:d,isStickyBottom:h,itemCount:c,items:v,onFocusChange:C,onSelect:S,onSelectionChange:this.handleSelectionChange,onViewportChange:y,offset:f,ref:this.itemList,renderItem:this.getCachedRenderDraggableItem(i,n,g),rowHeight:P,selectedRanges:p}),u&&k.placeholder]}))})}}Ur=ze;rr(ze,"DEFAULT_ROW_HEIGHT",30);rr(ze,"defaultProps",{className:"",draggingItemClassName:"",offset:0,items:[],rowHeight:Ur.DEFAULT_ROW_HEIGHT,isDeselectOnClick:!0,isDoubleClickSelect:!0,isDropDisabled:!1,hasPlaceholder:!1,isDragDisabled:!1,isMultiSelect:!1,isStickyBottom:!1,disableSelect:!1,style:null,onFocusChange(){},onSelect(){},onSelectionChange(){},onViewportChange(){},renderItem:Ur.renderItem,selectedRanges:[],draggablePrefix:"draggable-item",droppableId:"droppable-item-list","data-testid":void 0});function Kt(t){return t.isOn!==void 0}function lo(t){var e=t.item,r=t.onSelect,i=r===void 0?()=>{}:r,l=t["data-testid"],a=e.icon,o=e.subtitle,n=e.title,s=I.useMemo(()=>Kt(e)?()=>{e.onChange(!e.isOn)}:i,[e,i]);return E.jsxs("div",{className:"btn btn-navigation-menu-item","data-testid":"menu-item-".concat(n),onClick:s,onKeyDown:u=>{(u.key==="Enter"||u.key===" ")&&s()},tabIndex:0,role:"menuitem",children:[a!==void 0&&E.jsx("div",{className:"icon",children:E.jsx(Vr,{icon:a})}),E.jsx("div",{className:"title",children:n}),o!==void 0&&E.jsx("div",{className:"shortcut",children:o}),E.jsx("div",{className:"accessory","data-testid":l,children:Kt(e)?E.jsx(Yi,{on:e.isOn,onClick:u=>{u.stopPropagation(),s()}}):E.jsx(Vr,{icon:qi})})]})}function jn(t){var e=t.items,r=t.onSelect,i=r===void 0?()=>{}:r,l=t["data-testid"];return E.jsx("div",{className:"navigation-menu-view","data-testid":l,children:E.jsx("ul",{className:"navigation-menu-list",children:e.map((a,o)=>E.jsx("li",{children:E.jsx(lo,{item:a,onSelect:()=>{i(o)}})},a.title))})})}function Mn(t){var e=t.children,r=t.onBack,i=t.onClose,l=t.title,a=t["data-testid"];return E.jsxs("div",{className:"navigation-page","data-testid":a,children:[E.jsxs("div",{className:"navigation-title-bar",children:[E.jsx("div",{className:"navigation-left-buttons",children:r!==void 0&&E.jsx(dt,{kind:"ghost",className:"btn-back m-1 btn-sm","data-testid":"btn-page-back",onClick:r,icon:Zi,children:"Back"})}),E.jsx("div",{className:"navigation-title",children:l}),E.jsx("div",{className:"navigation-right-buttons",children:i!==void 0&&E.jsx(dt,{kind:"ghost",className:"btn-close btn-sm px-2 m-1","data-testid":"btn-page-close",onClick:i,icon:Ji,tooltip:"Close"})})]}),E.jsx("div",{className:"navigation-content",children:e})]})}function zr(t,e){return uo(t)||so(t,e)||no(t,e)||oo()}function oo(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
8
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function no(t,e){if(t){if(typeof t=="string")return Nt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Nt(t,e):void 0}}function Nt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function so(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function uo(t){if(Array.isArray(t))return t}function Gr(t){return Xe.isValidElement(t)?t.key:null}function _t(t,e){var r;return e==null?null:(r=t.find(i=>Gr(i)===e))!==null&&r!==void 0?r:null}function $n(t){var e=t.children,r=t["data-testid"],i=I.useMemo(()=>Xe.Children.toArray(e),[e]),l=xi(i),a=I.useState(()=>Gr(i[i.length-1])),o=zr(a,2),n=o[0],s=o[1],u=I.useState(null),d=zr(u,2),h=d[0],c=d[1],v=I.useState(null),f=zr(v,2),C=f[0],S=f[1];I.useEffect(function(){if(!(l===void 0||i===l)){var T=Gr(i[i.length-1]);h!==null||C!==null?h!==null?T!==h&&c(T):T!==n&&s(T):i.length===l.length||l.length===0?T!==n&&s(T):i.length>l.length?c(T):(s(T),S(l[l.length-1]))}},[i,l,h,C,n]);var y=I.useCallback(()=>{s(h),c(null)},[h]),g=I.useCallback(()=>{S(null)},[]),P=_t(i,n),p=_t(i,h);return E.jsxs("div",{className:"navigation-stack",children:[E.jsx("div",{className:"main-view","data-testid":r,children:P}),E.jsx(st,{direction:"right",in:C!=null,onEntered:g,children:E.jsx(E.Fragment,{children:C!=null&&E.jsx("div",{className:"popping-view",children:C})})}),E.jsx(st,{in:p!=null,onEntered:y,children:E.jsx(E.Fragment,{children:p!=null&&E.jsx("div",{className:"pushing-view",children:p})})})]})}var ho=["children"];function zt(t,e){var r=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(l){return Object.getOwnPropertyDescriptor(t,l).enumerable})),r.push.apply(r,i)}return r}function Xt(t){for(var e=1;e<arguments.length;e++){var r=arguments[e]!=null?arguments[e]:{};e%2?zt(Object(r),!0).forEach(function(i){vo(t,i,r[i])}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(r)):zt(Object(r)).forEach(function(i){Object.defineProperty(t,i,Object.getOwnPropertyDescriptor(r,i))})}return t}function vo(t,e,r){return(e=co(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function co(t){var e=fo(t,"string");return typeof e=="symbol"?e:e+""}function fo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function mo(t,e){if(t==null)return{};var r,i,l=go(t,e);if(Object.getOwnPropertySymbols){var a=Object.getOwnPropertySymbols(t);for(i=0;i<a.length;i++)r=a[i],e.indexOf(r)===-1&&{}.propertyIsEnumerable.call(t,r)&&(l[r]=t[r])}return l}function go(t,e){if(t==null)return{};var r={};for(var i in t)if({}.hasOwnProperty.call(t,i)){if(e.indexOf(i)!==-1)continue;r[i]=t[i]}return r}function kn(t){var e=t.children,r=mo(t,ho);return E.jsx("option",Xt(Xt({},r),{},{children:e}))}function or(t,e,r){return(e=po(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function po(t){var e=bo(t,"string");return typeof e=="symbol"?e:e+""}function bo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Co extends I.PureComponent{constructor(e){super(e),or(this,"list",void 0),or(this,"topRow",void 0),or(this,"bottomRow",void 0),or(this,"getCachedItem",gr((r,i,l,a,o,n,s)=>{var u={height:o},d=a??"".concat(l);return E.jsx("li",{className:"value-list-item",style:u,tabIndex:-1,children:E.jsx(Ui,{checked:n,disabled:s,onChange:()=>this.handleSelect(r),children:d})},i)},{max:1e3})),or(this,"getCachedItems",gr((r,i,l,a)=>{for(var o=[],n=0;n<r.length;n+=1){var s=r[n],u=s.value,d=s.displayValue,h=s.isSelected,c=l+n,v=c,f=this.getCachedItem(c,v,u,d,i,h,a);o.push(f)}return o},{max:1})),this.handleBlur=this.handleBlur.bind(this),this.handleScroll=this.handleScroll.bind(this),this.handleSelect=this.handleSelect.bind(this),this.list=Xe.createRef(),this.topRow=null,this.bottomRow=null}componentDidMount(){this.sendViewportUpdate()}componentDidUpdate(){this.sendViewportUpdate()}handleBlur(e){if(!e.relatedTarget||this.list.current&&e.relatedTarget instanceof HTMLElement&&!this.list.current.contains(e.relatedTarget)){var r=this.props.onBlur;r==null||r(e)}}handleScroll(){this.sendViewportUpdate()}handleSelect(e){var r=this.props,i=r.items,l=r.offset,a=r.onSelect,o=e-l;if(o>=0&&o<i.length){var n=i[o],s=n.value;a(e,s)}else a(e,null)}sendViewportUpdate(){if(!(!this.list.current||this.list.current.clientHeight===0)){var e=this.props,r=e.onViewportChange,i=e.rowHeight,l=this.list.current.scrollTop,a=l+this.list.current.clientHeight,o=Math.floor(l/i),n=Math.ceil(a/i);(this.topRow!==o||this.bottomRow!==n)&&(this.topRow=o,this.bottomRow=n,r(o,n))}}getElement(e){if(this.list.current==null)return null;var r=this.list.current.querySelectorAll(".value-list-item");return r[e]}scrollIntoView(e){var r=this.getElement(e);r==null||r.scrollIntoView({block:"center"})}render(){var e=this.props,r=e.className,i=e.disabled,l=e.isInvalid,a=e.items,o=e.itemCount,n=e.offset,s=e.rowHeight,u=e["data-testid"],d=this.getCachedItems(a,s,n,i);return E.jsx("div",{className:we("select-value-list-scroll-pane h-100 w-100",{"is-invalid":l},r),onBlur:this.handleBlur,onScroll:this.handleScroll,ref:this.list,"data-testid":u,children:E.jsx("div",{className:"select-value-list",style:{height:o*s},children:E.jsx("ol",{className:"select-value-list-content",style:{position:"absolute",height:a.length*s,top:n*s,left:0},children:d})})})}}or(Co,"defaultProps",{disabled:!1,rowHeight:21,onBlur:()=>{},"data-testid":void 0});var Vt=10;function wo(t,e,r){return(e=yo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function yo(t){var e=So(t,"string");return typeof e=="symbol"?e:e+""}function So(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Ro extends Error{constructor(){super(...arguments),wo(this,"isAssertionFailed",!0)}}function rt(t){return(t==null?void 0:t.isEditable)!==void 0}function Bn(t){if(!rt(t))throw new Ro("Expected 'model' to be editable, but received ".concat(t))}function Po(t,e){return Wo(t)||Ho(t,e)||Oo(t,e)||To()}function To(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
9
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Oo(t,e){if(t){if(typeof t=="string")return Yt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Yt(t,e):void 0}}function Yt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Ho(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function Wo(t){if(Array.isArray(t))return t}function me(t,e,r){return(e=jo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function jo(t){var e=Mo(t,"string");return typeof e=="symbol"?e:e+""}function Mo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}function _e(t){var e=arguments.length>1&&arguments[1]!==void 0?arguments[1]:pr.CACHE_SIZE,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:Math.floor(e/2);if(t.size>e)for(var i=t.keys();t.size>r;)t.delete(i.next().value)}function xt(t,e,r,i,l){for(var a=new Map,o=0,n=0;n<t&&n<r;n+=1)a.set(n,o),o+=m(l,n);o=i;for(var s=0;s<e&&r-s-1>=0;s+=1)o-=m(l,r-s-1),a.set(r-s-1,o);return a}class pr{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:{},r=e.userColumnWidths,i=r===void 0?new Map:r,l=e.userRowHeights,a=l===void 0?new Map:l,o=e.calculatedColumnWidths,n=o===void 0?new Map:o,s=e.calculatedRowHeights,u=s===void 0?new Map:s,d=e.contentColumnWidths,h=d===void 0?new Map:d,c=e.contentRowHeights,v=c===void 0?new Map:c,f=e.fontWidthsLower,C=f===void 0?new Map:f,S=e.fontWidthsUpper,y=S===void 0?new Map:S,g=e.allCharWidths,P=g===void 0?new Map:g,p=e.modelRows,M=p===void 0?new Map:p,T=e.modelColumns,k=T===void 0?new Map:T,O=e.movedRows,W=O===void 0?[]:O,A=e.movedColumns,B=A===void 0?[]:A,K=e.initialRowHeights,j=K===void 0?new Map:K,L=e.initialColumnWidths,F=L===void 0?new Map:L;me(this,"initialRowHeights",void 0),me(this,"initialColumnWidths",void 0),me(this,"userColumnWidths",void 0),me(this,"userRowHeights",void 0),me(this,"calculatedColumnWidths",void 0),me(this,"calculatedRowHeights",void 0),me(this,"contentColumnWidths",void 0),me(this,"contentRowHeights",void 0),me(this,"fontWidthsLower",void 0),me(this,"fontWidthsUpper",void 0),me(this,"allCharWidths",void 0),me(this,"modelRows",void 0),me(this,"modelColumns",void 0),me(this,"movedRows",void 0),me(this,"movedColumns",void 0),this.userColumnWidths=i,this.userRowHeights=a,this.calculatedRowHeights=u,this.calculatedColumnWidths=n,this.allCharWidths=P,this.fontWidthsLower=C,this.contentColumnWidths=h,this.contentRowHeights=v,this.fontWidthsUpper=y,this.modelRows=M,this.modelColumns=k,this.movedRows=W,this.movedColumns=B,this.initialRowHeights=j,this.initialColumnWidths=F}getMetrics(e){var r=e.left,i=e.top,l=e.leftOffset,a=e.topOffset,o=e.width,n=e.height,s=e.theme,u=e.model,d=e.movedRows,h=e.movedColumns,c=e.draggingColumn,v=s.rowHeight,f=s.rowHeaderWidth,C=s.rowFooterWidth,S=s.columnWidth,y=s.columnHeaderHeight,g=s.minScrollHandleSize,P=s.scrollBarSize;d!==this.movedRows&&(this.movedRows=d,this.modelRows.clear()),h!==this.movedColumns&&(this.movedColumns=h,this.modelColumns.clear());var p=u.columnCount,M=u.rowCount,T=u.floatingTopRowCount,k=u.floatingBottomRowCount,O=u.floatingLeftColumnCount,W=u.floatingRightColumnCount,A=u.columnHeaderMaxDepth,B=this.getFirstRow(e),K=this.getFirstColumn(e),j=this.getGridX(e),L=this.getGridY(e),F=Oe(u)&&u.hasExpandableRows?this.calculateTreePaddingX(e):0,z=0,N=this.getVisibleRowHeights(e),X=this.getVisibleColumnWidths(e,K,F),U=Po(X,2),x=U[0],V=U[1],b=Array.from(N.keys()),w=Array.from(x.keys()),H=new Map([...N,...this.getFloatingRowHeights(e)]),R=new Map([...x,...this.getFloatingColumnWidths(e)]),$=this.getVisibleColumnXs(R,w,l),D=this.getVisibleRowYs(H,b,a),Y=b.length>0?b[b.length-1]:i,q=w.length>0?w[w.length-1]:r,_=this.getBottomViewport(e,b,D,H),G=this.getRightViewport(e,w,$,R),te=this.getFloatingTopHeight(e,H),ie=this.getFloatingBottomHeight(e,H),le=this.getFloatingLeftWidth(e,R),re=this.getFloatingRightWidth(e,R),oe=Array.from(R.values()),J=Array.from(H.values()),Q=oe.reduce((Fe,cr)=>Fe+cr,0)-l,ue=J.reduce((Fe,cr)=>Fe+cr,0)-a,se=l+Q+C,he=a+ue,de=o-j,ae=n-L,Ce=this.getLastLeft(e,null,de-C),ye=this.getLastLeft(e,null,de-C-P),fe=this.getLastTop(e,null,ae-ie),ve=this.getLastTop(e,null,ae-ie-P),pe=ye,Pe=ve;Ce===0&&fe===0&&(pe=0,Pe=0);var He=pe>0,Te=He?P:0,We=Pe>0,$e=We?P:0,Ve=j,Ye=A*y,ke=o-Ve-$e,Be=n-Ye-Te,xe=p===1?ke/se:(p-pe)/p,nr=M===1?Be/he:(M-Pe)/M,ee=He?Ie(ke*xe,g,ke-1):0,je=We?Ie(Be*nr,g,Be-1):0,Ae=m(R,r,0),sr=m(H,i,0),Ir=Ae>0?l/Ae:0,Me=sr>0?a/sr:0,Ue=p===1?l/(se-de):(r+Ir)/pe,br=M===1?a/(he-ae):(i+Me)/Pe,Ge=He?Ue*(ke-ee):0,Cr=We?br*(Be-je):0,ur=[...Array(T).keys(),...[...Array(k).keys()].map(Fe=>M-Fe-1)],Ee=new Map([...D,...this.getFloatingRowYs(e,H,Math.floor(n-L-Te))]),wr=[...Array(O).keys(),...[...Array(W).keys()].map(Fe=>p-Fe-1)],Le=new Map([...$,...this.getFloatingColumnXs(e,R,Math.floor(o-j-$e))]),ir=[];if(c)for(var Se=c.range[0];Se<=c.range[1];Se+=1)ir.push(Se),R.has(Se)||R.set(Se,this.getVisibleColumnWidth(Se,e)),Le.has(Se)||Le.set(Se,0);var Ke=b.concat(ur),yr=w.concat(wr).concat(ir),Sr=this.getModelRows(Ke,e),Rr=this.getModelColumns(yr,e),Pr=this.getVisibleRowTreeBoxes(H,Sr,e),ar=this.getTopVisible(e,Ee,H,b),dr=this.getLeftVisible(e,Le,R,w),Tr=Pe>0?this.getBottomVisible(e,Ee,H,b,L):Y,qe=pe>0?this.getRightVisible(e,Le,R,w,j):q,Dr=this.fontWidthsLower,Er=this.fontWidthsUpper,Ze=this.userColumnWidths,Or=this.userRowHeights,hr=this.calculatedRowHeights,Lr=this.calculatedColumnWidths,vr=this.contentColumnWidths,Hr=this.contentRowHeights;return{rowHeight:v,rowHeaderWidth:f,rowFooterWidth:C,rowCount:M,columnWidth:S,columnCount:p,columnHeaderHeight:y,floatingTopRowCount:T,floatingBottomRowCount:k,floatingLeftColumnCount:O,floatingRightColumnCount:W,gridX:j,gridY:L,firstRow:B,firstColumn:K,treePaddingX:F,treePaddingY:z,left:r,top:i,bottom:Y,right:q,topOffset:a,leftOffset:l,topVisible:ar,leftVisible:dr,bottomVisible:Tr,rightVisible:qe,bottomViewport:_,rightViewport:G,width:o,height:n,maxX:Q,maxY:ue,lastLeft:pe,lastTop:Pe,barHeight:Be,barTop:Ye,barWidth:ke,barLeft:Ve,handleHeight:je,handleWidth:ee,hasHorizontalBar:He,hasVerticalBar:We,verticalBarWidth:$e,horizontalBarHeight:Te,scrollX:Ge,scrollY:Cr,scrollableContentWidth:se,scrollableContentHeight:he,scrollableViewportWidth:de,scrollableViewportHeight:ae,visibleRows:b,visibleColumns:w,columnsForRender:V,visibleRowHeights:N,visibleColumnWidths:x,contentColumnWidths:vr,contentRowHeights:Hr,floatingRows:ur,floatingColumns:wr,allRows:Ke,allColumns:yr,allRowHeights:H,allColumnWidths:R,floatingTopHeight:te,floatingBottomHeight:ie,floatingLeftWidth:le,floatingRightWidth:re,visibleRowYs:D,visibleColumnXs:$,allRowYs:Ee,allColumnXs:Le,visibleRowTreeBoxes:Pr,modelRows:Sr,modelColumns:Rr,movedRows:d,movedColumns:h,fontWidthsLower:Dr,fontWidthsUpper:Er,userColumnWidths:Ze,userRowHeights:Or,calculatedRowHeights:hr,calculatedColumnWidths:Lr,columnHeaderMaxDepth:A}}getGridX(e){var r=e.theme,i=r.rowHeaderWidth;return i}getGridY(e){var r=e.theme,i=e.model,l=r.columnHeaderHeight,a=i.columnHeaderMaxDepth;return a*l}getVisibleHeight(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFloatingRowHeights(e),i=e.height,l=e.theme,a=l.scrollBarSize,o=this.getGridY(e),n=this.getFloatingBottomHeight(e,r),s=this.getFloatingTopHeight(e,r);return i-n-s-o-a}getVisibleWidth(e){var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFloatingColumnWidths(e),i=e.width,l=e.theme,a=l.scrollBarSize,o=l.rowFooterWidth,n=this.getGridX(e),s=this.getFloatingRightWidth(e,r),u=this.getFloatingLeftWidth(e,r);return i-u-s-n-a-o}getFirstIndex(e,r,i){for(var l=e.size+1,a=0;a<l;a+=1){var o=r(a,i);if(e.get(o)!==0)return a}return 0}getFirstColumn(e){return this.getFirstIndex(this.userColumnWidths,this.getModelColumn.bind(this),e)}getFirstRow(e){return this.getFirstIndex(this.userRowHeights,this.getModelRow.bind(this),e)}getLastLeft(e,r,i){var l=e.model,a=l.columnCount,o=l.floatingRightColumnCount;if(a===0)return 0;var n=Math.max(0,a-o-1);r!=null&&(n=r);for(var s=0;n>=0;){var u=this.getVisibleColumnWidth(n,e);if(s+=u,s>=i)return Ie(n+1,0,r??a-1);n-=1}return 0}getLastTop(e,r,i){var l=e.model,a=l.rowCount,o=l.floatingBottomRowCount,n=Math.max(0,a-o-1);r!=null&&(n=r);for(var s=0;n>=0;){var u=this.getVisibleRowHeight(n,e);if(s+=u,s>=i)return Ie(n+1,0,a-1);n-=1}return 0}getTopForTopVisible(e,r){for(var i=this.getFloatingTopHeight(e),l=r,a=0;l>0&&a<i;)l-=1,a+=this.getVisibleRowHeight(l,e);return l}getTopForBottomVisible(e,r){var i=e.height,l=e.theme,a=l.scrollBarSize,o=this.getGridY(e),n=this.getFloatingBottomHeight(e),s=i-o-n-a;return this.getLastTop(e,r,s)}getLeftForLeftVisible(e,r){for(var i=this.getFloatingLeftWidth(e),l=r,a=0;l>0&&a<i;)l-=1,a+=this.getVisibleColumnWidth(l,e);return l}getLeftForRightVisible(e,r){var i=e.width,l=e.theme,a=l.scrollBarSize,o=this.getGridX(e),n=this.getFloatingRightWidth(e),s=i-o-n-a;return this.getLastLeft(e,r,s)}getFloatingRowHeights(e){for(var r=e.model,i=r.floatingTopRowCount,l=r.floatingBottomRowCount,a=r.rowCount,o=new Map,n=0;n<i&&n<a;n+=1)o.set(n,this.getVisibleRowHeight(n,e));for(var s=0;s<l&&a-s-1>=0;s+=1){var u=a-s-1;o.set(u,this.getVisibleRowHeight(u,e))}return o}getVisibleRowHeights(e){for(var r=e.top,i=e.topOffset,l=e.height,a=e.model,o=0,n=r,s=new Map,u=a.rowCount,d=a.floatingBottomRowCount;o<l+i&&n<u-d;){var h=this.getVisibleRowHeight(n,e);s.set(n,h),o+=h,n+=1}return s}getFloatingColumnWidths(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFirstColumn(e),i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.calculateTreePaddingX(e),l=e.model,a=l.columnCount,o=l.floatingLeftColumnCount,n=l.floatingRightColumnCount,s=new Map,u=0;u<o&&u<a;u+=1)s.set(u,this.getVisibleColumnWidth(u,e,r,i));for(var d=0;d<n&&a-d-1>=0;d+=1){var h=a-d-1;s.set(h,this.getVisibleColumnWidth(h,e,r,i))}return s}getVisibleColumnWidths(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFirstColumn(e),i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.calculateTreePaddingX(e),l=e.left,a=e.leftOffset,o=e.width,n=e.model,s=0,u=l,d=new Map,h=[],c=n.columnCount,v=n.floatingRightColumnCount;s<o+a&&u<c-v;){var f=this.getVisibleColumnWidth(u,e,r,i);d.set(u,f),f>0&&h.push(u),s+=f,u+=1}return[d,h]}getFloatingColumnXs(e,r,i){var l=e.model,a=l.columnCount,o=l.floatingLeftColumnCount,n=l.floatingRightColumnCount;return xt(o,n,a,i,r)}getVisibleColumnXs(e,r,i){for(var l=new Map,a=-i,o=0;o<r.length;o+=1){var n=r[o],s=m(e,n);l.set(n,a),a+=s}return l}getFloatingRowYs(e,r,i){var l=e.model,a=l.floatingTopRowCount,o=l.floatingBottomRowCount,n=l.rowCount;return xt(a,o,n,i,r)}getVisibleRowYs(e,r,i){for(var l=new Map,a=-i,o=0;o<r.length;o+=1){var n=r[o],s=m(e,n);l.set(n,a),a+=s}return l}getVisibleRowTreeBoxes(e,r,i){var l=new Map,a=i.model,o=i.theme,n=o.treeDepthIndent,s=o.treeHorizontalPadding;return Oe(a)&&a.hasExpandableRows&&e.forEach((u,d)=>{var h=m(r,d);if(a.isRowExpandable(h)){var c=a.depthForRow(h),v=c*n+s,f=(c+1)*n+s,C=0,S=u;l.set(d,{x1:v,y1:C,x2:f,y2:S})}}),l}getFloatingLeftWidth(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFloatingColumnWidths(e),i=e.model,l=i.floatingLeftColumnCount,a=0,o=0;o<l;o+=1)a+=m(r,o);return a}getFloatingRightWidth(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFloatingColumnWidths(e),i=e.model,l=i.floatingRightColumnCount,a=i.columnCount,o=0,n=0;n<l;n+=1)o+=m(r,a-n-1);return o}getFloatingTopHeight(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFloatingRowHeights(e),i=e.model,l=i.floatingTopRowCount,a=0,o=0;o<l;o+=1)a+=m(r,o);return a}getFloatingBottomHeight(e){for(var r=arguments.length>1&&arguments[1]!==void 0?arguments[1]:this.getFloatingRowHeights(e),i=e.model,l=i.floatingBottomRowCount,a=i.rowCount,o=0,n=0;n<l;n+=1)o+=m(r,a-n-1);return o}getTopVisible(e,r,i,l){for(var a=this.getFloatingTopHeight(e,i),o=0;o<l.length;o+=1){var n=l[o],s=m(r,n);if(s>=a)return n}return 0}getLeftVisible(e,r,i,l){for(var a=this.getFloatingLeftWidth(e,i),o=0;o<l.length;o+=1){var n=l[o],s=m(r,n);if(s>=a)return n}return 0}getBottomVisible(e,r,i,l,a){for(var o=e.height,n=e.theme,s=n.scrollBarSize,u=this.getFloatingBottomHeight(e,i),d=o-a-s-u,h=l.length-1;h>=0;h-=1){var c=l[h],v=m(r,c),f=m(i,c);if(v+f<=d)return c}return 0}getRightVisible(e,r,i,l,a){for(var o=e.width,n=e.theme,s=n.scrollBarSize,u=this.getFloatingRightWidth(e,i),d=o-a-s-u,h=l.length-1;h>=0;h-=1){var c=l[h],v=m(r,c),f=m(i,c);if(v+f<=d)return c}return 0}getBottomViewport(e,r,i,l){var a=e.height,o=e.theme,n=o.rowHeight;return this.getLastIndexViewport(r,i,l,a,n)}getRightViewport(e,r,i,l){var a=e.width,o=e.theme,n=o.columnWidth;return this.getLastIndexViewport(r,i,l,a,n)}getLastIndexViewport(e,r,i,l,a){var o=0,n=0;return e.length>0&&(o=e[e.length-1],n=m(r,o)+m(i,o)),n<l&&(o+=Math.ceil((l-n)/a)),o}getVisibleItemSize(e,r,i){var l;return(l=r.get(e))!==null&&l!==void 0?l:i()}getVisibleRowHeight(e,r){var i=this.getModelRow(e,r),l=this.calculateRowHeight(e,i,r);return this.getVisibleItemSize(i,this.userRowHeights,()=>{var a=this.initialRowHeights.get(i);return a!==void 0?a:l})}getVisibleColumnWidth(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:this.getFirstColumn(r),l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.calculateTreePaddingX(r),a=this.getModelColumn(e,r),o=this.calculateColumnWidth(e,a,r,i,l);return this.getVisibleItemSize(a,this.userColumnWidths,()=>{var n=this.initialColumnWidths.get(a);return n!==void 0?n:o})}getModelRows(e,r){for(var i=new Map,l=0;l<e.length;l+=1){var a=e[l],o=this.getModelRow(a,r);i.set(a,o)}return i}getModelRow(e,r){if(this.modelRows.has(e))return m(this.modelRows,e);var i=r.movedRows,l=ne.getModelIndex(e,i);return this.modelRows.set(e,l),l}getModelColumns(e,r){for(var i=new Map,l=0;l<e.length;l+=1){var a=e[l],o=this.getModelColumn(a,r);i.set(a,o)}return i}getModelColumn(e,r){var i=this.modelColumns.has(e);if(i)return m(this.modelColumns,e);var l=r.movedColumns,a=ne.getModelIndex(e,l);return this.modelColumns.set(e,a),a}calculateRowHeight(e,r,i){var l=i.theme,a=l.autoSizeRows,o=l.rowHeight;if(!a)return o;this.contentRowHeights.set(r,Math.ceil(o)),_e(this.contentRowHeights);var n=this.calculatedRowHeights.get(r);return n!=null&&n>o?n:(this.calculatedRowHeights.set(r,Math.ceil(o)),_e(this.calculatedRowHeights),o)}calculateColumnWidth(e,r,i){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:this.getFirstColumn(i),a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:this.calculateTreePaddingX(i),o=i.theme,n=o.autoSizeColumns,s=o.minColumnWidth,u=o.maxColumnWidth;if(!n){var d=o.columnWidth;return d}var h=this.calculatedColumnWidths.get(r);if(h!=null&&this.isColumnHidden(r))return h;var c=this.calculateColumnHeaderWidth(r,i,u),v=this.calculateColumnDataWidth(r,i,u),f=Math.ceil(Math.max(c,v));return f=Math.max(s,f),f=Math.min(u,f),this.contentColumnWidths.set(r,f),_e(this.contentColumnWidths),h!=null&&h>f?f=h:(this.calculatedColumnWidths.set(r,f),_e(this.calculatedColumnWidths)),e===l&&(f+=a),f}isColumnHidden(e){var r=this.userColumnWidths.get(e);return r===0||r===void 0&&this.initialColumnWidths.get(e)===0}calculateColumnHeaderWidth(e,r,i){var l=r.model,a=r.theme,o=r.context,n=a.headerHorizontalPadding,s=a.headerFont;this.calculateLowerFontWidth(s,o),this.calculateUpperFontWidth(s,o);var u=n*2,d=l.textForColumnHeader(e,0);return d!==void 0&&d!==""?this.calculateTextWidth(o,s,d,i-u)+u:u}calculateColumnDataWidth(e,r,i){var l=r.top,a=r.height,o=r.width,n=r.model,s=r.theme,u=r.context,d=n.floatingTopRowCount,h=n.floatingBottomRowCount,c=n.rowCount,v=s.font,f=s.cellHorizontalPadding,C=s.rowHeight,S=s.rowHeaderWidth,y=s.rowFooterWidth,g=s.scrollBarSize,P=s.dataBarHorizontalPadding;this.calculateLowerFontWidth(v,u),this.calculateUpperFontWidth(v,u);var p=0,M=this.getGridY(r),T=Math.floor((a-M)/C),k=Math.ceil(l+T),O=f*2;return ne.iterateAllItems(l,k,d,h,c,W=>{var A=this.getModelRow(W,r),B=n.textForCell(e,A),K=n.renderTypeForCell(e,A),j=0;B&&(j=this.calculateTextWidth(u,v,B,i-O)+O),K==="dataBar"&&(j+=P),p=Math.max(p,j)}),p=Math.max(Math.min(p,(o-S-g-y)*pr.MAX_COLUMN_WIDTH),O),p}calculateTextWidth(e,r,i,l){if(i.length===0)return 0;e.font=r,this.allCharWidths.has(r)||this.allCharWidths.set(r,new Map);for(var a=m(this.allCharWidths,r),o=0,n=0;n<i.length;n+=1){var s=i[n],u=i[n+1];if(a.has(s)||a.set(s,e.measureText(s).width),u!==void 0){a.has(u)||a.set(u,e.measureText(u).width);var d=s+u;if(a.has(d)||a.set(d,e.measureText(d).width),o+=m(a,d),n>0&&(o-=m(a,s)),l!==void 0&&o>l)return l}else o===0&&(o=m(a,s))}return o}calculateTreePaddingX(e){var r=e.top,i=e.height,l=e.model,a=e.theme,o=a.rowHeight,n=a.treeDepthIndent;if(!Oe(l)||!l.hasExpandableRows)return 0;for(var s=0,u=i/o,d=Math.ceil(r+u),h=r;h<=d;h+=1){var c=this.getModelRow(h,e),v=l.depthForRow(c);s=Math.max(s,n*(v+1))}return s}calculateLowerFontWidth(e,r){if(!this.fontWidthsLower.has(e)){r.font=e;var i=r.measureText("."),l=i.width;this.fontWidthsLower.set(e,l),this.fontWidthsLower.set(r.font,l)}}calculateUpperFontWidth(e,r){if(!this.fontWidthsUpper.has(e)){r.font=e;var i=r.measureText("m"),l=i.width;this.fontWidthsUpper.set(e,l),this.fontWidthsUpper.set(r.font,l)}}setColumnWidth(e,r){var i=new Map(this.userColumnWidths);i.set(e,Math.ceil(r)),_e(i),this.userColumnWidths=i}resetColumnWidth(e){var r=new Map(this.userColumnWidths);r.delete(e),this.userColumnWidths=r}setCalculatedColumnWidth(e,r){var i=new Map(this.calculatedColumnWidths);i.set(e,Math.ceil(r)),_e(i),this.calculatedColumnWidths=i}resetCalculatedColumnWidths(){this.calculatedColumnWidths=new Map}setRowHeight(e,r){var i=new Map(this.userRowHeights);i.set(e,Math.ceil(r)),_e(i),this.userRowHeights=i}resetRowHeight(e){var r=new Map(this.userRowHeights);r.delete(e),this.userRowHeights=r,this.calculatedRowHeights.delete(e)}setCalculatedRowHeight(e,r){var i=new Map(this.calculatedRowHeights);i.set(e,Math.ceil(r)),_e(i),this.calculatedColumnWidths=i}resetCalculatedRowHeights(){this.calculatedRowHeights=new Map}}me(pr,"CACHE_SIZE",1e4);me(pr,"MAX_COLUMN_WIDTH",.8);var An=Object.freeze({allowColumnResize:!0,allowRowResize:!0,autoSelectRow:!1,autoSelectColumn:!1,autoSizeColumns:!0,autoSizeRows:!0,backgroundColor:"#000000",black:"#000000",white:"#ffffff",cellHorizontalPadding:5,headerHorizontalPadding:5,font:"12px Arial, sans-serif",gridColumnColor:"#8f8f8f66",gridRowColor:"#8f8f8f66",headerBackgroundColor:"#222222",headerSeparatorColor:"#000000",headerSeparatorHoverColor:"#888888",headerSeparatorHandleSize:5,headerHiddenSeparatorSize:5,headerHiddenSeparatorHoverColor:"#8888FF",headerColor:"#d5d5d5",headerFont:"10px Arial, sans-serif",columnHoverBackgroundColor:"#444444",selectedColumnHoverBackgroundColor:"#494949",rowBackgroundColors:"#333333 #222222",rowHoverBackgroundColor:"#444444",selectedRowHoverBackgroundColor:"#494949",minScrollHandleSize:50,scrollBarBackgroundColor:"#111111",scrollBarHoverBackgroundColor:"#333333",scrollBarCasingColor:"#000000",scrollBarCornerColor:"#000000",scrollBarColor:"#555555",scrollBarHoverColor:"#888888",scrollBarActiveColor:"#AAAAAA",scrollBarSize:12,scrollBarHoverSize:16,scrollBarCasingWidth:1,scrollSnapToColumn:!1,scrollSnapToRow:!1,activeCellSelectionBorderWidth:2,selectionColor:"#4286f433",selectionOutlineColor:"#4286f4",selectionOutlineCasingColor:"#222222",scrollBarSelectionTick:!0,scrollBarSelectionTickColor:"#4286f433",scrollBarActiveSelectionTickColor:"#4286f480",shadowBlur:8,shadowAlpha:.15,shadowColor:"#000000",textColor:"#ffffff",hyperlinkColor:"#4878ea",maxDepth:6,treeDepthIndent:10,treeHorizontalPadding:5,treeLineColor:"#888888",treeMarkerColor:"#cccccc",treeMarkerHoverColor:"#ffffff",rowHeight:20,columnWidth:100,minRowHeight:20,minColumnWidth:55,maxColumnWidth:600,columnHeaderHeight:20,rowHeaderWidth:30,rowFooterWidth:0,headerResizeSnapThreshold:10,headerResizeHiddenSnapThreshold:8,allowColumnReorder:!0,allowRowReorder:!0,reorderOffset:2,floatingGridColumnColor:"#8f8f8f66",floatingGridRowColor:"#8f8f8f66",floatingRowBackgroundColors:"#393939 #292929",floatingDividerOuterColor:"#000000",floatingDividerInnerColor:"#cccccc",zeroLineColor:"#888888",positiveBarColor:"#00ff00",negativeBarColor:"#ff0000",markerBarColor:"#ffffff",dataBarHorizontalPadding:90});function $o(t,e){return Fo(t)||Ao(t,e)||Bo(t,e)||ko()}function ko(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
10
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function Bo(t,e){if(t){if(typeof t=="string")return Ut(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Ut(t,e):void 0}}function Ut(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function Ao(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e!==0)for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function Fo(t){if(Array.isArray(t))return t}function Io(t,e){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:6,i=Yr.hex.lab.raw(t),l=i[0]<50?17:10;return i[0]=Math.max(i[0]-l/r*e,0),"#".concat(Yr.lab.hex(i))}function Do(t,e){var r=Yr.hex.rgb(t),i=$o(r,3),l=i[0],a=i[1],o=i[2];return"rgba(".concat(l,", ").concat(a,", ").concat(o,", ").concat(e,")")}var Eo=t=>{var e=t.r,r=t.g,i=t.b,l=.4122214708*e+.5363325363*r+.0514459929*i,a=.2119034982*e+.6806995451*r+.1073969566*i,o=.0883024619*e+.2817188376*r+.6299787005*i,n=Math.cbrt(l),s=Math.cbrt(a),u=Math.cbrt(o);return{L:.2104542553*n+.793617785*s-.0040720468*u,a:1.9779984951*n-2.428592205*s+.4505937099*u,b:.0259040371*n+.7827717662*s-.808675766*u}},Lo=t=>{var e=t.L,r=t.a,i=t.b,l=e+.3963377774*r+.2158037573*i,a=e-.1055613458*r-.0638541728*i,o=e-.0894841775*r-1.291485548*i,n=l*l*l,s=a*a*a,u=o*o*o;return{r:Ie(4.0767416621*n-3.3077115913*s+.2309699292*u,0,255),g:Ie(-1.2684380046*n+2.6097574011*s-.3413193965*u,0,255),b:Ie(-.0041960863*n-.7034186147*s+1.707614701*u,0,255)}},Ko=t=>{var e,r,i=(e=(r=t.replace(/^#?([a-f\d])([a-f\d])([a-f\d])$/i,(l,a,o,n)=>"#".concat(a).concat(a).concat(o).concat(o).concat(n).concat(n)).substring(1).match(/.{2}/g))===null||r===void 0?void 0:r.map(l=>parseInt(l,16)))!==null&&e!==void 0?e:[0,0,0];return{r:i[0],g:i[1],b:i[2]}},No=t=>{var e=Math.round(t.r),r=Math.round(t.g),i=Math.round(t.b);return"#".concat([e,r,i].map(l=>{var a=l.toString(16);return a.length===1?"0".concat(a):a}).join(""))},_o=(t,e,r)=>{var i=t.L,l=t.a,a=t.b,o=e.L,n=e.a,s=e.b,u=i+(o-i)*r,d=l+(n-l)*r,h=a+(s-a)*r;return{L:u,a:d,b:h}};const er={colorWithAlpha:Do,darkenForDepth:Io,linearSRGBToOklab:Eo,OklabToLinearSRGB:Lo,hexToRgb:Ko,rgbToHex:No,lerpColor:_o};function Gt(t,e,r){return(e=zo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zo(t){var e=Xo(t,"string");return typeof e=="symbol"?e:e+""}function Xo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class tt{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3;Gt(this,"order",void 0),Gt(this,"cursor",null),this.order=e}onDown(e,r,i){return!1}onMove(e,r,i){return!1}onDrag(e,r,i){return!1}onLeave(e,r,i){return!1}onClick(e,r,i){return!1}onContextMenu(e,r,i){return!1}onDoubleClick(e,r,i){return!1}onUp(e,r,i){return!1}onWheel(e,r,i){return!1}}function fr(t,e,r){return(e=Vo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Vo(t){var e=Yo(t,"string");return typeof e=="symbol"?e:e+""}function Yo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class xo extends tt{constructor(){super(...arguments),fr(this,"draggingIndex",void 0),fr(this,"resizingItems",[]),fr(this,"hiddenItems",[]),fr(this,"targetSizes",new Map),fr(this,"dragOffset",0)}onDown(e,r){var i=r.metrics,l=r.props.model,a=r.getTheme();if(!i)throw new Error("metrics not set");var o=this.getSeparator(e,i,l,a);if(o!=null){var n=o.index;return this.dragOffset=0,this.draggingIndex=n,this.resizingItems=[n],this.hiddenItems=this.getHiddenItems(n,i).reverse(),this.targetSizes.clear(),this.addTargetSize(i,n),this.updateCursor(i,n),this.updateSeparator(r,o),!0}return!1}onMove(e,r){var i=r.metrics,l=r.props.model,a=r.getTheme();if(!i)throw new Error("metrics not set");var o=this.getSeparator(e,i,l,a);return o!=null?(this.updateCursor(i,o.index),!0):!1}onDrag(e,r){if(this.draggingIndex==null)return!1;var i=e[this.pointProperty],l=r.metricCalculator,a=r.metrics;if(!a)throw new Error("metrics not set");for(var o=r.getTheme(),n=a[this.visibleOffsetProperty],s=a[this.marginProperty],u=a[this.calculatedSizesProperty],d=a[this.modelIndexesProperty],h=a[this.firstIndexProperty],c=a[this.treePaddingProperty],v=new Map,f=this.resizingItems[this.resizingItems.length-1];f!=null;){var C=m(n,f),S=i-s-C-this.dragOffset,y=m(d,f),g=this.targetSizes.get(y),P=this.resizingItems.length>1,p=this.hiddenItems.indexOf(f),M=u.get(y);M!=null&&f===h&&(M+=c);var T=S;if(M!=null&&Math.abs(S-M)<=o.headerResizeSnapThreshold?T=M:g!==void 0&&S>g&&(P&&p!==0||p>0)?T=g:S<=o.headerResizeHiddenSnapThreshold&&(T=0),v.set(y,T),S<-o.headerResizeSnapThreshold&&T===0)if(p>=0&&P){var k;this.resizingItems.pop(),this.removeTargetSize(a,f),f=this.resizingItems[this.resizingItems.length-1],this.dragOffset-=(k=this.targetSizes.get(m(d,f)))!==null&&k!==void 0?k:0}else f=this.getNextShownItem(f,a),f!==null&&(this.resizingItems.push(f),this.addTargetSize(a,f));else g!==void 0&&S>g+o.headerResizeSnapThreshold&&T===g?p>0?(this.dragOffset+=T,f=this.hiddenItems[p-1],this.resizingItems.push(f),this.addTargetSize(a,f)):P?(this.resizingItems.pop(),this.removeTargetSize(a,f),f=this.resizingItems[this.resizingItems.length-1]):f=null:f=null}return v.forEach((O,W)=>{var A,B=(A=l[this.initialSizesProperty].get(W))!==null&&A!==void 0?A:u.get(W);O===B?this.resetSize(l,W):this.setSize(l,W,O)}),this.updateCursor(a,this.draggingIndex),!0}onUp(e,r){return this.draggingIndex!=null&&(this.draggingIndex=void 0,this.resizingItems=[],this.hiddenItems=[],this.targetSizes.clear(),this.updateSeparator(r,null)),!1}onDoubleClick(e,r){var i=r.metrics,l=r.metricCalculator,a=r.props.model,o=r.getTheme();if(!i)throw new Error("metrics not set");var n=this.getSeparator(e,i,a,o);if(n!=null){var s=i[this.modelIndexesProperty],u=m(s,n.index);return this.resetSize(l,u),r.forceUpdate(),!0}return!1}updateCursor(e,r){var i=e[this.visibleSizesProperty],l=m(i,r);l===0?this.cursor=this.hiddenCursor:this.cursor=this.defaultCursor}addTargetSize(e,r){var i=e[this.modelIndexesProperty],l=e[this.userSizesProperty],a=e[this.calculatedSizesProperty],o=r===0?e[this.treePaddingProperty]:0,n=m(i,r),s=l.get(n);if(s==null||s===0){var u;s=((u=a.get(n))!==null&&u!==void 0?u:0)+o}this.targetSizes.set(n,s)}removeTargetSize(e,r){var i=e[this.modelIndexesProperty],l=m(i,r);this.targetSizes.delete(l)}}function be(t,e,r){return(e=Uo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Uo(t){var e=Go(t,"string");return typeof e=="symbol"?e:e+""}function Go(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class it extends xo{constructor(){super(...arguments),be(this,"hiddenCursor","e-resize"),be(this,"defaultCursor","col-resize"),be(this,"pointProperty","x"),be(this,"userSizesProperty","userColumnWidths"),be(this,"visibleOffsetProperty","visibleColumnXs"),be(this,"visibleSizesProperty","visibleColumnWidths"),be(this,"marginProperty","rowHeaderWidth"),be(this,"calculatedSizesProperty","calculatedColumnWidths"),be(this,"initialSizesProperty","initialColumnWidths"),be(this,"modelIndexesProperty","modelColumns"),be(this,"firstIndexProperty","firstColumn"),be(this,"treePaddingProperty","treePaddingX"),be(this,"getHiddenItems",ne.getHiddenColumns),be(this,"getNextShownItem",ne.getNextShownColumn),be(this,"getSeparator",it.getColumnSeparator)}static getColumnSeparator(e,r,i,l){if(!l.allowColumnResize)return null;var a=e.x,o=e.y,n=e.columnHeaderDepth,s=r.modelColumns,u=ne.getColumnSeparatorIndex(a,o,r,l,i);if(u==null||n==null)return null;var d=s.get(u);return d!=null?{index:u,depth:n}:null}setSize(e,r,i){e.setColumnWidth(r,i)}resetSize(e,r){e.resetColumnWidth(r)}updateSeparator(e,r){e.setState({draggingColumnSeparator:r,isDragging:r!==null})}}function qo(t,e,r){return(e=Zo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Zo(t){var e=Jo(t,"string");return typeof e=="symbol"?e:e+""}function Jo(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class di{constructor(){qo(this,"getCachedTruncatedString",De((e,r,i,l,a,o)=>ge.truncateToWidth(e,r,i,l,a,o),{max:1e4}))}drawCellRowTreeMarker(e,r,i){var l=r.metrics,a=r.model,o=r.mouseX,n=r.mouseY,s=r.theme,u=l.firstColumn,d=l.gridX,h=l.gridY,c=l.allColumnXs,v=l.allColumnWidths,f=l.allRowYs,C=l.allRowHeights,S=l.visibleRowTreeBoxes,y=s.treeMarkerColor,g=s.treeMarkerHoverColor,P=m(c,u),p=m(v,u),M=m(f,i),T=m(C,i);if(!(!Oe(a)||!a.isRowExpandable(i))){var k=m(S,i),O=o!=null&&n!=null&&o>=d+P&&o<=d+P+p&&n>=h+M&&n<=h+M+T?g:y;this.drawTreeMarker(e,r,P,M,k,O,a.isRowExpanded(i))}}drawTreeMarker(e,r,i,l,a,o,n){var s=a.x1,u=a.y1,d=a.x2,h=a.y2,c=n?"⊟":"⊞",v=i+(s+d)*.5+.5,f=l+(u+h)*.5+.5;e.fillStyle=o,e.textAlign="center",e.fillText(c,v,f)}}function qt(t){return(t==null?void 0:t.dataBarOptionsForCell)!==void 0}function qr(t,e,r){return(e=Qo(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Qo(t){var e=en(t,"string");return typeof e=="symbol"?e:e+""}function en(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class Fr extends di{constructor(){super(...arguments),qr(this,"getCachedWidth",De((e,r)=>e.measureText(r).width,{max:1e4})),qr(this,"getCachedWidestValueForColumn",De((e,r,i,l,a)=>{for(var o=0,n=0;n<r.length;n+=1){var s=r[n],u=m(i,s),d=l.textForCell(a,u);o=Math.max(o,this.getCachedWidth(e,d))}return o},{max:1e3}))}drawCellContent(e,r,i,l){var a=r.metrics,o=r.model,n=r.theme;if(qt(o)){var s=a.modelColumns,u=a.modelRows,d=a.allRowHeights,h=a.allRowYs,c=a.firstColumn,v=a.fontWidthsLower,f=a.fontWidthsUpper,C=i===c,S=m(d,l),y=m(u,l),g=m(s,i),P=m(h,l),p=o.textAlignForCell(g,y),M=o.textForCell(g,y),T=ne.getTextRenderMetrics(r,i,l),k=T.x,O=T.y,W=T.width,A=v.get(e.font),B=f.get(e.font),K=o.truncationCharForCell(g,y),j=this.getCachedTruncatedString(e,M,W,A,B,K),L=o.dataBarOptionsForCell(g,y,n),F=L.columnMin,z=L.columnMax,N=L.axis,X=L.color,U=L.textColor,x=L.valuePlacement,V=L.opacity,b=L.markers,w=L.direction,H=L.value,R=Array.isArray(X)&&X.length>1;if(!(F==null||z==null)){var $=this.getDataBarRenderMetrics(e,r,i,l),D=$.maxWidth,Y=$.x,q=$.y,_=$.zeroPosition,G=$.leftmostPosition,te=$.markerXs,ie=$.totalValueRange,le=$.dataBarWidth;e.save(),e.textAlign=p,e.fillStyle=U,e.textBaseline="middle",e.font=n.font,x!=="hide"&&e.fillText(j,k,O);var re=n.gridRowColor!=null,oe=re?2:1;if(e.save(),e.beginPath(),e.roundRect(Y,P+oe,le,S-1-oe,1),e.clip(),e.globalAlpha=V,R){var J=0,Q=0;e.save(),H<0?w==="LTR"?(J=Math.round(Math.abs(F)/ie*D),Q=Math.round(G),e.translate(Q,0)):w==="RTL"&&(J=Math.round(D-Math.abs(z)/ie*D),Q=Math.round(_),e.translate(Q+J,0),e.scale(-1,1)):w==="LTR"?(J=Math.round(D-Math.abs(F)/ie*D)-1,Q=Math.round(_),e.translate(Q,0)):w==="RTL"&&(J=Math.round(Math.abs(z)/ie*D),Q=Math.round(G),e.translate(Q+J,0),e.scale(-1,1));var ue=Fr.getGradient(J,X);e.fillStyle=ue,e.fillRect(0,q,J,S),e.restore()}else{var se=Array.isArray(X)?X[0]:X;e.fillStyle=se,e.beginPath(),e.roundRect(Y,q,le,S,1),e.fill()}D>0&&te.forEach((de,ae)=>{e.fillStyle=b[ae].color,e.fillRect(de,q,1,S)}),e.restore();var he=!(N==="directional"&&(x==="beside"&&p==="right"&&w==="LTR"||x==="beside"&&p==="left"&&w==="RTL"||x!=="beside"));he&&(e.strokeStyle=n.zeroLineColor,e.beginPath(),e.setLineDash([2,1]),e.moveTo(_,P),e.lineTo(_,P+S),e.stroke()),e.restore(),C&&Oe(o)&&o.hasExpandableRows&&this.drawCellRowTreeMarker(e,r,l)}}}getDataBarRenderMetrics(e,r,i,l){var a=r.metrics,o=r.model,n=r.theme;if(!qt(o))throw new Error("Grid model is not a data bar grid model");var s=a.firstColumn,u=a.allColumnXs,d=a.allColumnWidths,h=a.allRowYs,c=a.modelColumns,v=a.modelRows,f=a.visibleRows,C=n.cellHorizontalPadding,S=n.treeDepthIndent,y=n.treeHorizontalPadding,g=m(c,i),P=m(v,l),p=m(u,i),M=m(h,l),T=m(d,i),k=i===s,O=0;Oe(o)&&o.hasExpandableRows&&k&&(O=S*(o.depthForRow(l)+1)+y);var W=o.textAlignForCell(g,P),A=o.dataBarOptionsForCell(g,P,n),B=A.columnMin,K=A.columnMax,j=A.axis,L=A.valuePlacement,F=A.markers,z=A.direction,N=A.value,X=this.getCachedWidestValueForColumn(e,f,v,o,g),U=2,x=L==="beside"&&W==="right"?2:1,V=K-B;K>=0&&B>=0||B===K?V=K:K<=0&&B<=0&&(V=Math.abs(B));var b=T-O-x-U;L==="beside"&&(b=b-C-X),b<0&&(b=0);var w=Math.max(Math.abs(B),Math.abs(K)),H=Math.abs(N)/V*b;b===0?H=0:j==="middle"?H=Math.abs(N)/w*(b/2):j==="directional"&&(H=Math.abs(N)/w*b);var R=B>=0?0:Math.abs(B)/V*b,$=N>=0?R:R-Math.abs(N)/V*b,D=F.map(_=>{var G=_.value,te=Math.abs(G)/V*b;return G>=0?R+te:R-te}),Y=L==="beside"&&W==="left"?C+X+U:U,q=L==="beside"&&W==="right"?T-C-X-x:x;return z==="RTL"&&(R=B>=0?T:T-Math.abs(B)/V*b,$=N>=0?R-N/V*b:R,D=F.map(_=>{var G=_.value;return G>=0?R-Math.abs(G)/V*b:R+Math.abs(G)/V*b})),j==="middle"?(R=b/2,z==="LTR"?($=N>=0?R:R-Math.abs(N)/w*(b/2),D=F.map(_=>{var G=_.value;return G>=0?R+Math.abs(G)/w*(b/2):R-Math.abs(G)/w*(b/2)})):z==="RTL"&&($=N<=0?R:R-Math.abs(N)/w*(b/2),D=F.map(_=>{var G=_.value;return G<=0?R+Math.abs(G)/w*(b/2):R-Math.abs(G)/w*(b/2)}))):j==="directional"&&(z==="LTR"?(R=0,$=R,D=F.map(_=>{var G=_.value;return R+Math.abs(G)/w*b})):z==="RTL"&&(R=T,$=R-Math.abs(N)/w*b,D=F.map(_=>{var G=_.value;return R-Math.abs(G)/w*b}))),z==="LTR"?(R+=p+U+O,$+=p+U+O,D=D.map(_=>_+p+U+O),L==="beside"&&W==="left"&&(R+=X+C,$+=X+C,D=D.map(_=>_+X+C))):z==="RTL"&&(R=R+p-x,$=$+p-x,D=D.map(_=>_+p-x),L==="beside"&&W==="right"&&(R=R-C-X,$=$-C-X,D=D.map(_=>_-C-X))),Y+=p+O,q+=p,{maxWidth:b,x:$,y:M,zeroPosition:R,leftmostPosition:Y,rightmostPosition:q,totalValueRange:V,dataBarWidth:H,markerXs:D}}}qr(Fr,"getGradient",De((t,e)=>{var r=document.createElement("canvas"),i=r.getContext("2d");if(i==null)throw new Error("Failed to create canvas context");if(Number.isNaN(t))return i.createLinearGradient(0,0,0,0);for(var l=i.createLinearGradient(0,0,t,0),a=e.map(h=>er.linearSRGBToOklab(er.hexToRgb(h))),o=0;o<t;o+=1){var n=o/t,s=1/(e.length-1),u=Math.floor(n/s),d=er.lerpColor(a[u],a[u+1],n%s/s);l.addColorStop(o/t,er.rgbToHex(er.OklabToLinearSRGB(d)))}return l},{max:1e3,primitive:!0}));function rn(t,e,r){return(e=tn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function tn(t){var e=an(t,"string");return typeof e=="symbol"?e:e+""}function an(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ln extends di{constructor(){super(...arguments),rn(this,"getCachedTokenBoxesForVisibleCell",De((e,r,i,l,a,o)=>{for(var n=0,s=a,u=[],d=0,h=0,c=0;c<r.length;c+=1){var v=r[c],f=v.start,C=v.end,S=C>e.length?e.substring(f):v.value;h+=o.measureText(e.substring(d,f)).width;var y=o.measureText(S).width,g=h,P=g+y,p={x1:g,y1:n,x2:P,y2:s,token:v};u.push(p),d=C,h+=y}return u},{max:1e4}))}drawCellContent(e,r,i,l){var a=r.metrics,o=r.model,n=r.theme,s=a.fontWidthsLower,u=a.fontWidthsUpper,d=a.modelColumns,h=a.modelRows,c=a.allRowHeights,v=a.firstColumn,f=i===v,C=n.textColor,S=m(c,l),y=m(h,l),g=m(d,i),P=o.textForCell(g,y),p=o.truncationCharForCell(g,y);if(P&&S>0){var M=o.textAlignForCell(g,y)||"left";e.textAlign=M;var T=o.colorForCell(g,y,n)||C;e.fillStyle=T,e.save();var k=ne.getTextRenderMetrics(r,i,l),O=k.width,W=k.x,A=k.y,B=s.get(e.font),K=u.get(e.font),j=this.getCachedTruncatedString(e,P,O,B,K,p),L=o.tokensForCell(g,y,j.length);if(j)for(var F=0,z=0,N=W,X=e.measureText(j),U=X.actualBoundingBoxDescent;z<j.length;){var x,V,b=L[F],w=z===(b==null?void 0:b.start)?b:null,H=(x=(V=w==null?void 0:w.end)!==null&&V!==void 0?V:b==null?void 0:b.start)!==null&&x!==void 0?x:j.length,R=j.substring(z,H),$=e.measureText(R),D=$.width,Y=R.endsWith("…")?D-e.measureText("…").width:D;w!=null?(e.fillStyle=n.hyperlinkColor,e.fillText(R,N,A),e.fillRect(N,A+U,Y,1)):(e.fillStyle=T,e.fillText(R,N,A)),N+=D,z=H,w!=null&&(F+=1)}e.restore()}f&&Oe(o)&&o.hasExpandableRows&&this.drawCellRowTreeMarker(e,r,l)}getTokenBoxesForVisibleCell(e,r,i){var l=i.metrics,a=i.context,o=i.model,n=i.theme;if(a==null||l==null)return ht;var s=l.modelRows,u=l.modelColumns,d=m(s,r),h=m(u,e),c=o.textForCell(h,d),v=ne.getTextRenderMetrics(i,e,r),f=v.width,C=v.x,S=v.y,y=l.fontWidthsLower,g=l.fontWidthsUpper;a.save(),this.configureContext(a,i);var P=y.get(a.font),p=g.get(a.font),M=o.truncationCharForCell(h,d),T=this.getCachedTruncatedString(a,c,f,P,p,M),k=a.measureText(T),O=k.actualBoundingBoxAscent,W=k.actualBoundingBoxDescent,A=O+W,B=o.tokensForCell(h,d,T.length);if(B.length===0)return a.restore(),ht;var K=this.getCachedTokenBoxesForVisibleCell(T,B,n.font,"middle",A,a).map(j=>({x1:j.x1+C,y1:j.y1+(S-O),x2:j.x2+C,y2:j.y2+(S-O),token:j.token}));return a.restore(),K}configureContext(e,r){var i=r.theme;e.font=i.font,e.textBaseline="middle",e.lineCap="butt"}}function Zt(t){return typeof t.getColumnTickRanges=="function"&&typeof t.getRowTickRanges=="function"}function Xr(t,e){return un(t)||sn(t,e)||nn(t,e)||on()}function on(){throw new TypeError(`Invalid attempt to destructure non-iterable instance.
11
+ In order to be iterable, non-array objects must have a [Symbol.iterator]() method.`)}function nn(t,e){if(t){if(typeof t=="string")return Jt(t,e);var r={}.toString.call(t).slice(8,-1);return r==="Object"&&t.constructor&&(r=t.constructor.name),r==="Map"||r==="Set"?Array.from(t):r==="Arguments"||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jt(t,e):void 0}}function Jt(t,e){(e==null||e>t.length)&&(e=t.length);for(var r=0,i=Array(e);r<e;r++)i[r]=t[r];return i}function sn(t,e){var r=t==null?null:typeof Symbol<"u"&&t[Symbol.iterator]||t["@@iterator"];if(r!=null){var i,l,a,o,n=[],s=!0,u=!1;try{if(a=(r=r.call(t)).next,e===0){if(Object(r)!==r)return;s=!1}else for(;!(s=(i=a.call(r)).done)&&(n.push(i.value),n.length!==e);s=!0);}catch(d){u=!0,l=d}finally{try{if(!s&&r.return!=null&&(o=r.return(),Object(o)!==o))return}finally{if(u)throw l}}return n}}function un(t){if(Array.isArray(t))return t}function tr(t,e,r){return(e=dn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function dn(t){var e=hn(t,"string");return typeof e=="symbol"?e:e+""}function hn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class ge{constructor(){tr(this,"textCellRenderer",new ln),tr(this,"dataBarCellRenderer",new Fr),tr(this,"getCachedHeaderWidth",De((e,r)=>e.measureText(r).width,{max:1e3}))}static truncate(e,r){return r<e.length?e.substr(0,r)+"…":e}static binaryTruncateToWidth(e,r,i){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:r.length,o=arguments.length>5?arguments[5]:void 0;if(a>=r.length&&e.measureText(r).width<=i)return r;if(o!==void 0){var n=e.measureText(o).width;return o.repeat(Math.max(1,Math.floor(i/n)))}for(var s=l,u=Math.min(r.length-1,a),d=r;u>=s;){var h=Math.ceil((u+s)/2),c=ge.truncate(r,h);if(e.measureText(c).width<=i){if(d=c,s===h)break;s=h}else if(h===0){d=c;break}else u=h-1}return d}static truncateToWidth(e,r,i){var l=arguments.length>3&&arguments[3]!==void 0?arguments[3]:Vt/2,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:Vt*2,o=arguments.length>5?arguments[5]:void 0;if(i<=0||r.length<=0)return"";var n=Math.min(Math.max(0,Math.floor(i/a)-5),r.length),s=Math.min(Math.ceil(i/l),r.length);return ge.binaryTruncateToWidth(e,r,i,n,s,o)}drawCanvas(e){var r=e.context;r.save(),this.configureContext(r,e),this.drawBackground(r,e),this.drawGrid(r,e),this.drawHeaders(r,e),this.drawFooters(r,e),this.drawDraggingColumn(r,e),this.drawDraggingRow(r,e),this.drawScrollBars(r,e),r.restore()}configureContext(e,r){var i=r.theme;e.font=i.font,e.textBaseline="middle",e.lineCap="butt"}drawBackground(e,r){var i=r.theme,l=r.metrics,a=l.width,o=l.height;e.fillStyle=i.backgroundColor,e.fillRect(0,0,a,o)}drawGrid(e,r){var i=r.metrics,l=r.draggingRow,a=r.draggingColumn,o=i.gridX,n=i.gridY;e.translate(o,n),this.drawGridBackground(e,r,l==null&&a==null),this.drawCellContents(e,r),this.drawFloatingRows(e,r),this.drawFloatingColumns(e,r),e.translate(-o,-n)}drawFloatingRows(e,r){var i=r.draggingRow,l=r.draggingColumn,a=r.metrics,o=r.theme,n=a.floatingTopRowCount,s=a.floatingBottomRowCount,u=a.floatingRows,d=a.rowCount,h=a.columnsForRender,c=a.allRowYs,v=a.allRowHeights;if(u.length!==0){o.floatingRowBackgroundColors&&this.drawRowStripesForRows(e,r,u,o.floatingRowBackgroundColors),i==null&&l==null&&this.drawFloatingMouseRowHover(e,r),this.drawGridLinesForItems(e,r,h,u,o.floatingGridColumnColor,o.floatingGridRowColor),this.drawCellBackgroundsForItems(e,r,h,u),this.drawFloatingBorders(e,r),n>0&&this.drawSelectedRanges(e,r,{top:0,bottom:n-1,maxY:m(c,n-1)+m(v,n-1)-.5}),s>0&&this.drawSelectedRanges(e,r,{top:d-s-1,bottom:d-1,minY:m(c,d-s)+.5,maxY:m(c,d-1)+m(v,d-1)-.5});for(var f=0;f<h.length;f+=1)for(var C=h[f],S=0;S<u.length;S+=1){var y=u[S];this.drawCellContent(e,r,C,y)}}}drawFloatingColumns(e,r){var i=r.draggingRow,l=r.draggingColumn,a=r.metrics,o=r.theme,n=a.floatingLeftColumnCount,s=a.floatingRightColumnCount,u=a.floatingLeftWidth,d=a.floatingRightWidth,h=a.floatingColumns,c=a.gridX,v=a.maxX,f=a.columnCount,C=a.visibleRows,S=a.allColumnXs,y=a.allColumnWidths,g=a.width,P=a.height;if(h.length!==0){o.floatingRowBackgroundColors&&(this.drawRowStripesForRows(e,r,C,o.floatingRowBackgroundColors,0,u),this.drawRowStripesForRows(e,r,C,o.floatingRowBackgroundColors,g-c-d,v)),i==null&&l==null&&this.drawFloatingMouseRowHover(e,r),e.save(),e.beginPath(),e.rect(0,0,u,P),e.clip(),this.drawGridLinesForItems(e,r,h,C,o.floatingGridColumnColor,o.floatingGridRowColor),e.restore(),this.drawCellBackgroundsForItems(e,r,h,C),this.drawFloatingBorders(e,r),n>0&&this.drawSelectedRanges(e,r,{left:0,right:n-1,maxX:m(S,n-1)+m(y,n-1)}),s>0&&this.drawSelectedRanges(e,r,{left:f-s,right:f-1,minX:m(S,f-s)+.5,maxX:m(S,f-1)+m(y,f-1)});for(var p=0;p<h.length;p+=1)for(var M=h[p],T=0;T<C.length;T+=1){var k=C[T];this.drawCellContent(e,r,M,k)}}}drawFloatingBorders(e,r){var i=r.metrics,l=r.theme,a=i.floatingTopRowCount,o=i.floatingBottomRowCount,n=i.floatingLeftColumnCount,s=i.floatingRightColumnCount,u=i.rowCount,d=i.columnCount,h=i.allRowYs,c=i.allColumnXs,v=i.allRowHeights,f=i.allColumnWidths,C=i.maxX,S=i.maxY,y=l.floatingDividerOuterColor,g=l.floatingDividerInnerColor;if(e.lineWidth=3,e.beginPath(),e.strokeStyle=y,a>0){var P=m(h,a-1)+m(v,a-1)+.5;e.moveTo(0,P),e.lineTo(C,P)}if(o>0){var p=m(h,u-o)-.5;e.moveTo(0,p),e.lineTo(C,p)}if(n>0){var M=m(c,n-1)+m(f,n-1)+.5;e.moveTo(M,0),e.lineTo(M,S)}if(s>0){var T=m(c,d-s)-.5;e.moveTo(T,0),e.lineTo(T,S)}if(e.stroke(),e.beginPath(),e.lineWidth=1,e.strokeStyle=g,a>0){var k=m(h,a-1)+m(v,a-1)+.5;e.moveTo(0,k),e.lineTo(C,k)}if(o>0){var O=m(h,u-o)-.5;e.moveTo(0,O),e.lineTo(C,O)}if(n>0){var W=m(c,n-1)+m(f,n-1)+.5;e.moveTo(W,0),e.lineTo(W,S)}if(s>0){var A=m(c,d-s)-.5;e.moveTo(A,0),e.lineTo(A,S)}e.stroke()}drawGridBackground(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1;this.drawRowStripes(e,r),i&&(this.drawMouseColumnHover(e,r),this.drawMouseRowHover(e,r)),this.drawGridLines(e,r),this.drawCellBackgrounds(e,r);var l=r.metrics,a=l.bottom,o=l.right,n=l.floatingBottomRowCount,s=l.floatingLeftColumnCount,u=l.floatingRightColumnCount,d=l.floatingTopRowCount,h=l.columnCount,c=l.rowCount,v=l.allRowHeights,f=l.allRowYs,C=l.allColumnXs,S=l.allColumnWidths,y=l.width,g=l.height;this.drawSelectedRanges(e,r,{bottom:Math.min(a,c-n-1),right:Math.min(o,h-u-1),minX:s>0&&C.has(s+1)?m(C,s+1):-10,minY:d>0&&f.has(d+1)?m(f,d+1):-10,maxX:u>0&&C.has(h-u-1)?m(C,h-u-1)+m(S,h-u-1)-.5:y+10,maxY:n>0&&f.has(c-n-1)?m(f,c-n-1)+m(v,c-n-1)-.5:g+10}),this.drawGestureDragOutline(e,r)}drawRowStripes(e,r){var i=r.metrics,l=r.theme,a=i.visibleRows,o=l.rowBackgroundColors;o&&this.drawRowStripesForRows(e,r,a,o)}drawRowStripesForRows(e,r,i,l){for(var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:r.metrics.maxX,n=r.theme,s=r.metrics,u=r.model,d=n.maxDepth,h=n.shadowBlur,c=n.shadowColor,v=n.shadowAlpha,f=ge.getCachedBackgroundColors(l,d),C=s.allRowYs,S=s.allRowHeights,y=new Map,g=[],P=[],p=(b,w)=>{var H=Oe(u)?u.depthForRow(b):0,R=f[b%f.length],$=R[Math.min(H,R.length-1)];if(y.has($)||y.set($,[]),y.get($).push(b),w!=null){var D=Oe(u)?u.depthForRow(w):0;D<H?g.push(b):D>H&&P.push(w)}},M=0;M<i.length;M+=1){var T=i[M],k=M>0?i[M-1]:void 0;p(T,k)}if(y.forEach((b,w)=>{e.fillStyle=w,e.beginPath();for(var H=0;H<b.length;H+=1){var R=b[H],$=m(C,R),D=m(S,R);e.rect(a,$,o,D)}e.fill()}),g.length>0){e.save();var O=ge.getCachedColorWithAlpha(c,v),W=ge.getCachedColorWithAlpha(c,0),A=e.createLinearGradient(0,0,0,h);A.addColorStop(0,O),A.addColorStop(1,W),e.fillStyle=A;for(var B=0;B<g.length;B+=1){var K=g[B],j=m(C,K);e.translate(0,j),e.fillRect(a,0,o,h),e.translate(0,-j)}e.restore()}if(P.length>0){e.save();var L=ge.getCachedColorWithAlpha(c,0),F=ge.getCachedColorWithAlpha(c,v),z=e.createLinearGradient(0,0,0,h);z.addColorStop(0,L),z.addColorStop(1,F),e.fillStyle=z;for(var N=0;N<P.length;N+=1){var X=P[N],U=m(C,X),x=m(S,X),V=U+x-h;e.translate(0,V),e.fillRect(a,0,o,h),e.translate(0,-V)}e.restore()}}drawMouseColumnHover(e,r){var i=r.mouseX,l=r.mouseY,a=r.theme,o=r.metrics;if(!(i==null||l==null)){var n=ne.getColumnAtX(i,o);if(!(n==null||a.columnHoverBackgroundColor==null)){var s=o.allColumnWidths,u=o.allColumnXs,d=o.maxY;if(!(l>d)){var h=m(u,n),c=m(s,n);e.fillStyle=a.columnHoverBackgroundColor,e.fillRect(h,0,c,d)}}}}drawMouseRowHover(e,r){var i=r.mouseX,l=r.mouseY,a=r.theme,o=r.metrics;if(!(i==null||l==null)){var n=o.maxX;if(!(i>n||a.rowHoverBackgroundColor==null)){var s=ne.getRowAtY(l,o);s!=null&&this.drawMouseRowHoverForRow(e,r,s)}}}drawFloatingMouseRowHover(e,r){var i=r.mouseX,l=r.mouseY,a=r.theme,o=r.metrics,n=o.maxX,s=o.floatingTopRowCount,u=o.floatingBottomRowCount,d=o.rowCount,h=o.rowFooterWidth;if(!(i==null||l==null||i>n+h||a.rowHoverBackgroundColor==null)){var c=ne.getRowAtY(l,o);c!=null&&(c<s||d-u<=c)&&this.drawMouseRowHoverForRow(e,r,c)}}drawMouseRowHoverForRow(e,r,i){var l=r.metrics,a=r.selection,o=r.theme,n=l.allRowHeights,s=l.allRowYs,u=l.columnsForRender,d=l.maxX,h=m(s,i),c=m(n,i);if(o.rowHoverBackgroundColor!=null&&(e.fillStyle=o.rowHoverBackgroundColor),o.selectedRowHoverBackgroundColor!=null){for(var v=0;v<u.length;v+=1)if(a.isCellSelected(u[v],i)){e.fillStyle=o.selectedRowHoverBackgroundColor;break}}e.fillRect(0,h,d,c)}drawGridLines(e,r){var i=r.metrics,l=r.theme,a=i.columnsForRender,o=i.visibleRows;this.drawGridLinesForItems(e,r,a,o,l.gridColumnColor,l.gridRowColor)}drawGridLinesForItems(e,r,i,l,a,o){a==null&&o==null||(e.lineWidth=1,e.beginPath(),a!=null&&(e.strokeStyle=a,this.drawGridLinesForColumns(e,r,i)),o!=null&&(e.strokeStyle=o,this.drawGridLinesForRows(e,r,l)),e.stroke())}drawGridLinesForColumns(e,r,i){for(var l=r.metrics,a=l.allColumnXs,o=l.maxY,n=0;n<i.length;n+=1){var s=i[n],u=m(a,s)+.5;e.moveTo(u,0),e.lineTo(u,o)}}drawGridLinesForRows(e,r,i){for(var l=r.metrics,a=l.allRowYs,o=l.maxX,n=o,s=0;s<i.length;s+=1){var u=i[s],d=m(a,u)+.5;e.moveTo(.5,d),e.lineTo(n-.5,d)}}drawCellBackgrounds(e,r){var i=r.metrics,l=i.columnsForRender,a=i.visibleRows;this.drawCellBackgroundsForItems(e,r,l,a)}drawCellBackgroundsForItems(e,r,i,l){e.save();for(var a=0;a<i.length;a+=1)for(var o=i[a],n=0;n<l.length;n+=1){var s=l[n],u=n+1<l.length?l[n+1]:void 0;this.drawCellBackground(e,r,o,s,u)}e.restore()}drawCellBackground(e,r,i,l,a){var o=r.metrics,n=r.model,s=r.theme,u=o.firstColumn,d=o.modelColumns,h=o.modelRows,c=o.allColumnXs,v=o.allColumnWidths,f=o.allRowYs,C=o.allRowHeights,S=m(h,l),y=m(d,i),g=n.backgroundColorForCell(y,S,s),P=i===u,p=Oe(n)&&n.hasExpandableRows;if(g!=null){var M=m(c,i)+1,T=m(f,l)+1,k=m(v,i)-1,O=m(C,l)-1;e.fillStyle=g,e.fillRect(M,T,k,O)}P&&p&&this.drawCellRowTreeDepthLines(e,r,l,a)}drawCellContents(e,r){for(var i=r.metrics,l=i.columnsForRender,a=0;a<l.length;a+=1){var o=l[a];this.drawColumnCellContents(e,r,o)}}drawColumnCellContents(e,r,i){var l=r.metrics,a=l.allColumnXs,o=l.allColumnWidths,n=l.visibleRows,s=l.height,u=m(a,i),d=m(o,i);e.save(),e.beginPath(),e.rect(u,0,d,s),e.clip();for(var h=0;h<n.length;h+=1){var c=n[h];this.drawCellContent(e,r,i,c)}e.restore()}drawCellContent(e,r,i,l){var a=r.metrics,o=r.model,n=a.modelColumns,s=a.modelRows,u=m(s,l),d=m(n,i),h=o.renderTypeForCell(d,u),c=this.getCellRenderer(h);c.drawCellContent(e,r,i,l)}getCellRenderer(e){switch(e){case"dataBar":return this.dataBarCellRenderer;default:return this.textCellRenderer}}drawCellRowTreeDepthLines(e,r,i,l){var a=r.metrics,o=r.model,n=r.theme;if(Oe(o)){var s=o.depthForRow(i);if(s!==0){var u=a.firstColumn,d=a.allColumnXs,h=a.allRowYs,c=a.allRowHeights,v=n.treeDepthIndent,f=n.treeHorizontalPadding,C=n.treeLineColor,S=m(d,u),y=m(h,i),g=m(c,i),P=l!==void 0?o.depthForRow(l):0,p=s>P?s-P:0;if(e.strokeStyle=C,e.lineWidth=1,s-p>0){e.beginPath();for(var M=0;M<s-p;M+=1){var T=Math.floor(S+M*v+v*.5+f)+.5;e.moveTo(T,y),e.lineTo(T,y+g)}e.stroke()}if(p>0){e.beginPath();for(var k=s-p;k<s;k+=1){var O=Math.floor(S+k*v+v*.5+f)+.5;e.moveTo(O,y),e.lineTo(O,y+Math.floor(g/2)),e.moveTo(O-.5,y+Math.floor(g/2)+.5),e.lineTo(O+v-.5,y+Math.floor(g/2)+.5)}e.stroke()}}}}drawHeaders(e,r){var i=r.theme;e.font=i.headerFont,this.drawColumnHeaders(e,r),this.drawRowHeaders(e,r)}drawFooters(e,r){var i=r.theme;e.font=i.headerFont,this.drawRowFooters(e,r)}drawColumnHeaders(e,r){var i=r.mouseX,l=r.mouseY,a=r.theme,o=r.metrics,n=r.draggingColumnSeparator,s=r.isDragging,u=r.model,d=o.columnHeaderHeight,h=o.floatingColumns,c=o.gridX,v=o.width,f=o.visibleColumns,C=o.allColumnWidths,S=o.allColumnXs,y=o.floatingLeftColumnCount,g=o.floatingLeftWidth,P=o.floatingRightWidth,p=o.movedColumns,M=o.columnCount,T=o.columnHeaderMaxDepth;if(!(d<=0)){var k=a.headerHiddenSeparatorSize,O=a.headerHiddenSeparatorHoverColor,W=a.headerSeparatorColor,A=a.headerSeparatorHoverColor,B=d*.5,K=d*(T-1)+d*.5-B*.5,j=y>0;if(e.save(),this.drawColumnHeadersForRange(e,r,[f[0],f[f.length-1]],{minX:c+g,maxX:v-P}),j&&this.drawColumnHeadersForRange(e,r,[h[0],h[h.length-1]],{minX:c,maxX:c+g}),W){e.strokeStyle=W;var L=[...C.entries()].filter(ie=>{var le=Xr(ie,2);le[0];var re=le[1];return re===0}).map(ie=>{var le=Xr(ie,1),re=le[0];return re});e.beginPath(),e.fillStyle=W;for(var F=0;F<L.length;F+=1){var z=L[F],N=m(S,z),X=m(C,z),U=c+N+X+.5-k*.5;e.rect(U,K,k,B)}e.fill()}if(A){var x=n??{},V=x.index,b=x.depth;if(V==null&&i!=null&&l!=null){var w=it.getColumnSeparator(ne.getGridPointFromXY(i,l,o),o,u,a);V=w==null?void 0:w.index,b=w==null?void 0:w.depth}var H;if(V==null?H=!1:H=ne.hasColumnSeparatorAtDepth(u,b,V,M,p),H&&V!=null&&b!=null&&(!s||n!=null)){e.strokeStyle=A;var R=m(S,V),$=m(C,V),D=c+R+$+.5,Y=f.indexOf(V),q=Y<f.length-1?f[Y+1]:null,_=q!=null?C.get(q):null,G=$===0,te=_!=null&&_===0;G?(e.strokeStyle=O,e.fillStyle=O,e.fillRect(D,K,k*.5,B)):te&&(e.fillStyle=A,e.fillRect(D-k*.5,K,k*.5,B)),e.beginPath(),e.moveTo(D,(T-b-1)*d),e.lineTo(D,(T-b)*d-1),e.stroke()}}e.restore()}}drawColumnHeadersForRange(e,r,i,l){var a=r.model,o=a.columnHeaderMaxDepth;if(o!==0)for(var n=0;n<=o;n+=1)this.drawColumnHeadersAtDepth(e,r,i,l,n)}drawColumnHeadersAtDepth(e,r,i,l,a){var o=r.metrics,n=r.model,s=r.theme,u=o.modelColumns,d=o.allColumnXs,h=o.gridX,c=o.userColumnWidths,v=o.allColumnWidths,f=o.movedColumns,C=s.columnHeaderHeight,S=s.columnWidth,y=n.columnHeaderMaxDepth,g=l.minX,P=l.maxX,p=P-g;if(y!==0){var M=i[0],T=i[1];if(e.save(),e.translate(0,(y-a-1)*C),a===0){this.drawColumnHeader(e,r,"",g,P);for(var k=M;k<=T;k+=1)this.drawColumnHeaderAtIndex(e,r,k,l)}if(a>0)for(var O=M;O<=T;){var W=o.columnCount,A=o.calculatedColumnWidths,B=m(u,O),K=n.textForColumnHeader(B,a),j=n.colorForColumnHeader(B,a),L=m(d,O)+h,F=L+m(v,O);if(K!=null){for(var z=O-1;z>=0&&(F-L<p||L>g);){var N,X,U,x,V=(N=u.get(z))!==null&&N!==void 0?N:ne.getModelIndex(z,f);if(V==null||!ne.isSameColumnGroupAtDepth(n,a,B,V))break;var b=(X=(U=(x=c.get(V))!==null&&x!==void 0?x:v.get(z))!==null&&U!==void 0?U:A.get(V))!==null&&X!==void 0?X:S;L-=b,z-=1}for(var w=O+1;w<W&&(F-L<p||F<P);){var H,R,$,D=(H=u.get(w))!==null&&H!==void 0?H:ne.getModelIndex(w,f);if(!ne.isSameColumnGroupAtDepth(n,a,B,D))break;var Y=(R=($=c.get(D))!==null&&$!==void 0?$:v.get(w))!==null&&R!==void 0?R:S;F+=Y,w+=1}O=w-1;var q=F-L>=p,_=L;q&&(F<P?_=F-p:L<g&&(_=g)),this.drawColumnHeader(e,r,K,_,Math.min(F-L,p),{backgroundColor:j??void 0},l)}O+=1}e.restore()}}drawColumnHeaderAtIndex(e,r,i,l){var a,o=r.metrics,n=r.model,s=o.modelColumns,u=o.allColumnWidths,d=o.allColumnXs,h=o.gridX,c=m(u,i),v=m(d,i)+h,f=m(s,i),C=n.textForColumnHeader(f);C!=null&&this.drawColumnHeader(e,r,C,v,c,{backgroundColor:(a=n.colorForColumnHeader(f))!==null&&a!==void 0?a:void 0},l)}drawColumnHeader(e,r,i,l,a,o,n){if(!(a<=0)){var s=r.metrics,u=r.theme,d=u.headerHorizontalPadding,h=u.columnHeaderHeight,c=u.headerBackgroundColor,v=u.headerColor,f=u.headerSeparatorColor,C=u.black,S=u.white,y=s.fontWidthsLower,g=s.fontWidthsUpper,P=s.width,p=a-d*2,M=o??{},T=M.backgroundColor,k=T===void 0?c:T,O=M.separatorColor,W=O===void 0?f:O,A=o??{},B=A.textColor,K=B===void 0?v:B;try{var j=ge.getCachedColorIsDark(k),L=ge.getCachedColorIsDark(K);j&&L?K=S:!j&&!L&&(K=C)}catch{}var F=n??{},z=F.minX,N=z===void 0?0:z,X=F.maxX,U=X===void 0?P:X;e.save(),e.rect(N,0,U-N,h),e.clip(),k!=null&&(e.fillStyle=k,e.fillRect(l,0,a,h)),W!=null&&(e.strokeStyle=W,e.beginPath(),l>0&&(e.moveTo(l+.5,0),e.lineTo(l+.5,h)),e.moveTo(l+a+.5,0),e.lineTo(l+a+.5,h),e.moveTo(l,h-.5),e.lineTo(l+a,h-.5),e.stroke()),e.beginPath(),e.rect(l,0,a,h),e.clip(),e.fillStyle=K;var x=y.get(e.font),V=g.get(e.font),b=this.textCellRenderer.getCachedTruncatedString(e,i,p,x,V),w=l+a*.5,H=h*.5;N+=d,U-=d;var R=l+d,$=Ie(R,N,U),D=l+a-d,Y=Ie(D,N,U),q=Y-$,_=this.getCachedHeaderWidth(e,b),G=w-_*.5<N,te=w+_*.5>U;G?_<q?w=N+_*.5:w=D-_*.5:te&&(_<q?w=U-_*.5:w=R+_*.5),e.textAlign="center",e.fillText(b,w,H),e.restore()}}drawRowHeaders(e,r){var i=r.mouseX,l=r.mouseY,a=r.metrics,o=r.theme,n=r.draggingRowSeparator,s=a.gridY,u=a.rowHeaderWidth,d=a.height,h=a.visibleRows,c=a.allRowHeights,v=a.allRowYs;if(!(u<=0)){var f=o.headerBackgroundColor,C=o.headerColor,S=o.headerHiddenSeparatorSize,y=o.headerHiddenSeparatorHoverColor,g=o.headerSeparatorColor,P=o.headerSeparatorHoverColor,p=u*.5,M=u*.5-p*.5;if(e.save(),e.beginPath(),e.fillStyle=f,e.fillRect(0,0,u,d),g){e.strokeStyle=g,e.beginPath(),e.moveTo(0,s+.5),e.lineTo(u,s+.5);for(var T=[],k=!1,O=0;O<h.length;O+=1){var W=h[O],A=m(v,W),B=m(c,W);if(B>0){var K=s+A+B+.5;e.moveTo(0,K),e.lineTo(u,K),k=!1}else k||(k=!0,T.push(W))}e.moveTo(u-.5,0),e.lineTo(u-.5,d),e.stroke(),e.beginPath(),e.fillStyle=g;for(var j=0;j<T.length;j+=1){var L=T[j],F=m(v,L),z=m(c,L),N=s+F+z+.5-S*.5;e.rect(M,N,p,S)}e.fill()}if(P){var X=n??{},U=X.index,x=U===void 0?null:U;if(x==null&&i!=null&&l!=null&&(x=ne.getRowSeparatorIndex(i,l,a,o)),x!=null){e.strokeStyle=P;var V=m(v,x),b=m(c,x),w=s+V+b+.5,H=h.indexOf(x),R=H<h.length-1?h[H+1]:null,$=R!=null?c.get(R):null,D=b===0,Y=$!=null&&$===0;D?(e.strokeStyle=y,e.fillStyle=y,e.fillRect(M,w,p,S*.5)):Y&&(e.fillStyle=P,e.fillRect(M,w-S*.5,p,S*.5)),e.beginPath(),e.moveTo(.5,w),e.lineTo(u+.5,w),e.stroke()}}e.beginPath(),e.rect(0,s,u,d),e.clip(),e.fillStyle=C,e.textAlign="right";for(var q=0;q<h.length;q+=1){var _=h[q],G=m(c,_),te=m(v,_)+s;this.drawRowHeader(e,r,_,te,G)}e.restore()}}drawRowHeader(e,r,i,l,a){if(!(a<=0)){var o=r.metrics,n=r.model,s=r.theme,u=o.modelRows,d=o.rowHeaderWidth,h=m(u,i),c=d-s.cellHorizontalPadding,v=l+a*.5;e.fillText(n.textForRowHeader(h),c,v)}}drawRowFooters(e,r){var i=r.mouseX,l=r.mouseY,a=r.metrics,o=r.model,n=r.theme,s=r.draggingRowSeparator,u=a.gridY,d=a.gridX,h=a.maxX,c=a.modelRows,v=a.rowFooterWidth,f=a.height,C=a.verticalBarWidth,S=a.visibleRows,y=a.allRowHeights,g=a.allRowYs,P=a.width;if(!(v<=0)){var p=n.cellHorizontalPadding,M=n.headerBackgroundColor,T=n.headerColor,k=n.headerHiddenSeparatorSize,O=n.headerHiddenSeparatorHoverColor,W=n.headerSeparatorColor,A=n.headerSeparatorHoverColor,B=v*.5,K=v*.5-B*.5,j=Math.min(d+h,P-v-C);if(e.save(),e.beginPath(),e.fillStyle=M,e.fillRect(j,u,v,f),W){e.strokeStyle=W,e.beginPath(),e.moveTo(j,u+.5),e.lineTo(v,u+.5);for(var L=[],F=!1,z=0;z<S.length;z+=1){var N=S[z],X=m(g,N),U=m(y,N);if(U>0){var x=u+X+U+.5;e.moveTo(j+.5,x),e.lineTo(j+v-.5,x),F=!1}else F||(F=!0,L.push(N))}e.moveTo(j+.5,u),e.lineTo(j+.5,f),e.stroke(),e.beginPath(),e.fillStyle=W;for(var V=0;V<L.length;V+=1){var b=L[V],w=m(g,b),H=m(y,b),R=u+w+H+.5-k*.5;e.rect(j+K,R,B,k)}e.fill()}if(A){var $=s??{},D=$.index,Y=D===void 0?null:D;if(Y==null&&i!=null&&l!=null&&(Y=ne.getRowSeparatorIndex(i,l,a,n)),Y!=null){e.strokeStyle=A;var q=m(g,Y),_=m(y,Y),G=u+q+_+.5,te=S.indexOf(Y),ie=te<S.length-1?S[te+1]:null,le=ie!=null?y.get(ie):null,re=_===0,oe=le!=null&&le===0;re?(e.strokeStyle=O,e.fillStyle=O,e.fillRect(K,G,B,k*.5)):oe&&(e.fillStyle=A,e.fillRect(K,G-k*.5,B,k*.5)),e.beginPath(),e.moveTo(j+.5,G),e.lineTo(j+v+.5,G),e.stroke()}}e.beginPath(),e.rect(j,u,v,f),e.clip(),e.fillStyle=T,e.textAlign="left";for(var J=j+p,Q=0;Q<S.length;Q+=1){var ue=S[Q],se=m(y,ue);if(se>0){var he=m(g,ue)+u,de=m(c,ue),ae=he+se*.5;e.fillText(o.textForRowFooter(de),J,ae)}}e.restore()}}drawSelectedRanges(e,r){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:{},l=r.draggingRow,a=r.draggingColumn,o=r.editingCell,n=r.metrics,s=r.model,u=r.selection,d=r.theme,h=u.cursorColumn,c=u.cursorRow,v=n.allColumnWidths,f=n.allColumnXs,C=n.allRowHeights,S=n.allRowYs,y=n.width,g=n.height,P=i.left,p=P===void 0?n.left:P,M=i.top,T=M===void 0?n.top:M,k=i.right,O=k===void 0?n.right:k,W=i.bottom,A=W===void 0?n.bottom:W,B=i.minY,K=B===void 0?-10:B,j=i.maxY,L=j===void 0?g+10:j,F=i.minX,z=F===void 0?-10:F,N=i.maxX,X=N===void 0?y+10:N;if(!u.isEmpty()){var U=rt(s)&&s.isEditable&&o==null&&l==null&&a==null&&h!=null&&c!=null&&f.has(h)&&S.has(c);if(U){var x=m(f,h),V=m(S,c),b=m(v,h),w=m(C,c);e.save(),e.beginPath(),e.rect(0,0,y,g),e.rect(x,V,b,w),e.clip("evenodd")}var H=f.has(p)?Math.max(Math.round(m(f,p))+.5,z):X,R=f.has(O)&&v.has(O)?Math.min(Math.round(m(f,O)+m(v,O))-.5,X):z;e.beginPath();for(var $=R>H?[{x:H,endX:R}]:[],D=null,Y=0,q=[],_=(re,oe)=>{if(re===oe)return!0;if(re.length!==oe.length)return!1;for(var J=0;J<re.length;J+=1)if(re[J].x!==oe[J].x||re[J].endX!==oe[J].endX)return!1;return!0},G=()=>{if(D!=null)for(var re=0;re<q.length;re+=1){var oe=q[re],J=oe.x,Q=oe.endX;e.rect(J,D,Q-J,Y-D)}D=null,q=[]},te=function(){var oe=S.get(le),J=C.get(le);if(oe==null||J==null)return G(),0;var Q=Math.max(Math.round(oe)+.5,.5),ue=Math.round(oe+J)-.5;if(ue<K||Q>L)return G(),0;var se;if(u.isRowSelected(le))se=$;else{for(var he=[],de=(ye,fe)=>{var ve=Math.max(Math.round(m(f,ye))+.5,z),pe=Math.min(Math.round(m(f,fe)+m(v,fe))-.5,X);pe>ve&&he.push({x:ve,endX:pe})},ae=null,Ce=p;Ce<=O;Ce+=1)u.isCellSelected(Ce,le)?ae===null&&(ae=Ce):ae!==null&&(de(ae,Ce-1),ae=null);ae!==null&&de(ae,O),se=he}se.length===0?G():(D!=null&&_(se,q)||(G(),q=se,D=Q),Y=ue)},ie,le=T;le<=A;le+=1)ie=te();G(),e.fillStyle=d.selectionColor,e.fill(),e.save(),e.clip(),e.strokeStyle=d.selectionOutlineCasingColor,e.lineWidth=3,e.stroke(),e.restore(),e.strokeStyle=d.selectionOutlineColor,e.lineWidth=1,e.stroke(),U&&h!=null&&c!=null&&(e.restore(),this.drawActiveCell(e,r,h,c))}}drawActiveCell(e,r,i,l){var a=r.metrics,o=r.theme,n=a.scrollX,s=a.scrollY,u=a.allColumnWidths,d=a.allColumnXs,h=a.allRowHeights,c=a.allRowYs,v=o.activeCellSelectionBorderWidth,f=m(d,i),C=m(c,l),S=m(u,i),y=m(h,l),g=f-v*.5,P=C-v*.5,p=S+v,M=y+v;g<=0&&n<=0&&(p-=v-g,g=v*.5),P<=0&&s<=0&&(M-=v-P,P=v*.5);var T=e.lineWidth;e.beginPath(),e.lineWidth=v,e.strokeStyle=o.selectionOutlineColor,this.drawRoundedRect(e,g,P,p,M),e.stroke(),e.lineWidth=T}drawGestureDragOutline(e,r){var i=r.gestureMode,l=r.selection,a=r.metrics,o=r.theme;if(!(i!=="add"&&i!=="maximize")){var n=l.cursorRow,s=l.cursorColumn,u=l.selectionEndRow,d=l.selectionEndColumn;if(!(n==null||s==null||u==null||d==null)){var h=a.allColumnXs,c=a.allColumnWidths,v=a.allRowYs,f=a.allRowHeights,C=a.maxX,S=a.maxY,y=o.autoSelectRow,g=y===void 0?!1:y,P=o.autoSelectColumn,p=P===void 0?!1:P,M=Math.min(n,u),T=Math.max(n,u),k=Math.min(s,d),O=Math.max(s,d),W=v.get(M),A=v.get(T),B=f.get(T),K=h.get(k),j=h.get(O),L=c.get(O);if(!(W==null||A==null||B==null||K==null||j==null||L==null)){var F=Math.round(W)+.5,z=Math.round(A+B)-.5,N=g?0:Math.round(K)+.5,X=g?C:Math.round(j+L)-.5;if(e.save(),e.beginPath(),e.strokeStyle=o.selectionOutlineColor,e.lineWidth=1,p||(e.moveTo(N,F),e.lineTo(X,F),e.moveTo(N,z),e.lineTo(X,z)),!g){var U=p?0:F,x=p?S:z;e.moveTo(N,U),e.lineTo(N,x),e.moveTo(X,U),e.lineTo(X,x)}e.stroke(),e.restore()}}}}drawRoundedRect(e,r,i,l,a){var o=arguments.length>5&&arguments[5]!==void 0?arguments[5]:ge.DEFAULT_EDGE_RADIUS;e.beginPath(),e.moveTo(r+o,i),e.lineTo(r+l-o,i),e.quadraticCurveTo(r+l,i,r+l,i+o),e.lineTo(r+l,i+a-o),e.quadraticCurveTo(r+l,i+a,r+l-o,i+a),e.lineTo(r+o,i+a),e.quadraticCurveTo(r,i+a,r,i+a-o),e.lineTo(r,i+o),e.quadraticCurveTo(r,i,r+o,i),e.closePath()}drawDraggingColumn(e,r){var i,l=r.draggingColumn,a=r.metrics,o=r.mouseX,n=r.theme,s=r.model;if(!(l==null||o==null)){var u=l.range,d=l.depth,h=a.gridX,c=a.gridY,v=a.allColumnXs,f=a.allColumnWidths,C=a.height,S=a.width,y=a.columnHeaderMaxDepth,g=a.columnHeaderHeight,P=a.movedColumns,p=a.modelColumns,M=a.floatingLeftWidth,T=(i=p.get(u[0]))!==null&&i!==void 0?i:ne.getModelIndex(u[0],P),k=s.getColumnHeaderGroup(T,d);if(!(d>0&&!k)){var O=Xr(u,2),W=O[0],A=O[1],B=m(v,W),K=m(v,A)+m(f,A),j=K-B,L=l.left,F=n.backgroundColor,z=n.font,N=n.headerFont,X=n.reorderOffset,U=n.shadowBlur,x=n.shadowColor,V=(y-d-1)*g;e.save(),e.translate(h,0),e.save(),e.beginPath(),e.rect(M,0,S,C),e.clip(),e.fillStyle=F,e.fillRect(B,V,j,C),e.restore(),e.translate(0,X),e.save(),e.shadowColor=x,e.shadowBlur=U,e.fillStyle=F,e.fillRect(l.left,V+X,l.width,C),e.restore(),e.beginPath(),e.rect(l.left,V,l.width+1,C),e.clip(),e.translate(L-B-h,0),e.font=N;for(var b=[],w=l.range[0];w<=l.range[1];w+=1)b.push(w);this.drawColumnHeaders(e,r),this.drawColumnHeadersForRange(e,r,[b[0],b[b.length-1]],{minX:B,maxX:S}),e.translate(h,c),e.font=z,this.drawGridBackground(e,r);for(var H=W;H<=A;H+=1)this.drawColumnCellContents(e,r,H);e.restore()}}}drawDraggingRow(e,r){var i=r.draggingRow,l=r.draggingRowOffset,a=r.metrics,o=r.mouseY,n=r.theme;if(!(i==null||o==null)){var s=a.gridX,u=a.gridY,d=a.allRowYs,h=a.allRowHeights,c=a.width,v=m(d,i),f=m(h,i)+1,C=n.backgroundColor,S=n.font,y=n.headerFont,g=n.reorderOffset,P=n.shadowBlur,p=n.shadowColor;e.save(),e.translate(0,u),e.fillStyle=C,e.fillRect(0,v,c,f),e.translate(s+g,o-v-u-(l??0)),e.save(),e.shadowColor=p,e.shadowBlur=P,e.fillStyle=C,e.fillRect(-s,v,c,f),e.restore(),e.beginPath(),e.rect(-s,v,c,f),e.clip(),e.font=S,this.drawGridBackground(e,r),this.drawCellContents(e,r),e.translate(-s,-u),e.font=y,this.drawRowHeaders(e,r),e.restore()}}drawScrollBars(e,r){var i=r.isDraggingHorizontalScrollBar,l=r.isDraggingVerticalScrollBar,a=r.isDragging,o=r.metrics,n=r.mouseX,s=r.mouseY,u=r.theme;if(!(u.scrollBarSize<=0)){var d=o.width,h=o.height,c=o.handleHeight,v=o.handleWidth,f=o.scrollX,C=o.scrollY,S=o.hasHorizontalBar,y=o.hasVerticalBar,g=o.barWidth,P=o.barHeight,p=o.barLeft,M=o.barTop,T=u.scrollBarBackgroundColor,k=u.scrollBarHoverBackgroundColor,O=u.scrollBarCasingColor,W=u.scrollBarCornerColor,A=u.scrollBarColor,B=u.scrollBarHoverColor,K=u.scrollBarActiveColor,j=u.scrollBarSize,L=u.scrollBarHoverSize,F=u.scrollBarCasingWidth,z=u.scrollBarSelectionTick,N=u.scrollBarSelectionTickColor,X=u.scrollBarActiveSelectionTickColor,U=u.autoSelectRow,x=u.autoSelectColumn,V=n!=null&&s!=null&&n<=d&&s<=h,b=l||y&&!i&&!a&&n!=null&&s!=null&&n>=d-L&&s>=M&&V,w=i||S&&!l&&!a&&!b&&n!=null&&s!=null&&s>=h-L&&n>=p&&V,H=w?L:j,R=b?L:j;if(e.translate(p,M),S&&y&&(e.fillStyle=O,e.fillRect(d-p-j,h-M-j,j,j),e.fillStyle=W,e.fillRect(d-p-j+F,h-M-j+F,j-F,j-F)),S){var $=f,D=h-M-H;if(e.fillStyle=O,e.fillRect(0,D,g,H-F),e.fillStyle=w?k:T,e.fillRect(0,D+F,g,H-F),i?e.fillStyle=K:w?e.fillStyle=B:e.fillStyle=A,e.fillRect($,D+F,v,H-F),!U&&z&&N!=null&&X!=null){e.fillStyle=N;for(var Y=r.selection.cursorColumn,q=o.lastLeft,_=o.columnCount,G=Zt(r.selection)?r.selection.getColumnTickRanges():[],te=ee=>ee<=q?ee/q*(g-v):g-v+(ee-q)/(_-q)*v,ie=0;ie<G.length;ie+=1){var le=G[ie],re=le[0],oe=le[1];if(re!=null&&oe!=null&&(re!==Y||oe!==Y)){var J=te(re),Q=Math.max(1,Math.round(te(oe+1)-J)),ue=H-F;e.fillRect(J,D+F+Math.round(ue/3),Q,Math.round(ue/3))}}if(Y!=null){var se=te(Y),he=2,de=H-F;e.fillStyle=X,e.fillRect(se,D+F,he,de)}}}if(y){var ae=d-p-R,Ce=C;if(e.fillStyle=O,e.fillRect(ae,0,R-F,P),e.fillStyle=b?k:T,e.fillRect(ae+F,0,R-F,P),l?e.fillStyle=K:b?e.fillStyle=B:e.fillStyle=A,e.fillRect(ae+F,Ce,R-F,c),!x&&z&&N!=null&&X!=null){var ye=r.selection.cursorRow,fe=o.lastTop,ve=o.rowCount,pe=ee=>ee<=fe?ee/fe*(P-c):P-c+(ee-fe)/(ve-fe)*c;e.fillStyle=N;for(var Pe=Zt(r.selection)?r.selection.getRowTickRanges():[],He=0;He<Pe.length;He+=1){var Te=Pe[He],We=Te[0],$e=Te[1];if(We!=null&&$e!=null&&(We!==ye||$e!==ye)){var Ve=pe(We),Ye=R-F,ke=Math.max(1,Math.round(pe($e+1)-Ve));e.fillRect(ae+F+Math.round(Ye/3),Ve,Math.round(Ye/3),ke)}}if(ye!=null){var Be=Math.round(pe(ye)),xe=R-F,nr=2;e.fillStyle=X,e.fillRect(ae+F,Be,xe,nr)}}}e.translate(-p,-M)}}}tr(ge,"DEFAULT_EDGE_RADIUS",2);tr(ge,"getCachedBackgroundColors",De((t,e)=>t.split(" ").map(r=>{for(var i=[],l=0;l<e;l+=1)i.push(er.darkenForDepth(r,l,e));return i}),{max:1e3}));tr(ge,"getCachedColorWithAlpha",De(er.colorWithAlpha,{max:1e3}));tr(ge,"getCachedColorIsDark",De(Qi.isDark,{max:1e3}));class Br extends tt{static isInTreeBox(e,r){var i=e.column,l=e.row,a=e.x,o=e.y,n=r.metrics;if(!n)throw new Error("metrics not set");var s=n.gridX,u=n.gridY,d=n.firstColumn,h=n.allColumnXs,c=n.allColumnWidths,v=n.allRowHeights,f=n.allRowYs,C=n.visibleRowTreeBoxes;if(i===d&&l!=null&&C.get(l)!=null&&a>s&&o>u){var S=m(h,i),y=m(c,i),g=m(f,l),P=m(v,l);if(a>=s+S&&a<=s+S+y&&o>=u+g&&o<=u+g+P)return!0}return!1}onDown(e,r){return Br.isInTreeBox(e,r)}onClick(e,r,i){if(Br.isInTreeBox(e,r)){var l=e.row;if(l!==null)return r.toggleRowExpanded(l,ne.isModifierKeyDown(i)),!0}return!1}onDoubleClick(e,r){return Br.isInTreeBox(e,r)}}function vn(t){return(t==null?void 0:t.getTokenBoxesForVisibleCell)!==void 0}function mr(t,e,r){return(e=cn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function cn(t){var e=fn(t,"string");return typeof e=="symbol"?e:e+""}function fn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class at extends tt{constructor(){super(...arguments),mr(this,"timeoutId",void 0),mr(this,"isHold",!1),mr(this,"isDown",!1),mr(this,"currentLinkBox",void 0)}isHoveringLink(e,r){var i=e.column,l=e.row,a=e.x,o=e.y,n=r.renderer,s=r.metrics,u=r.props,d=u.model;if(i==null||l==null||s==null)return this.currentLinkBox=void 0,!1;var h=s.modelRows,c=s.modelColumns,v=m(h,l),f=m(c,i),C=d.renderTypeForCell(f,v),S=n.getCellRenderer(C);if(!vn(S))return!1;if(this.currentLinkBox!=null){var y=this.currentLinkBox,g=y.x1,P=y.y1,p=y.x2,M=y.y2;if(a>=g&&a<=p&&o>=P&&o<=M)return!0}for(var T=r.updateRenderState(),k=S.getTokenBoxesForVisibleCell(i,l,T),O=0;O<k.length;O+=1)if(ea(k[O].token)){var W=ne.translateTokenBox(k[O],s),A=W.x1,B=W.x2,K=W.y1,j=W.y2;if(a>=A&&a<=B&&o>=K&&o<=j)return this.currentLinkBox=W,!0}return this.currentLinkBox=void 0,!1}setCursor(e,r){return this.isHoveringLink(e,r)?this.cursor="pointer":this.cursor=null,!1}onMove(e,r){return this.setCursor(e,r)}onDown(e,r,i){var l=this.isHoveringLink(e,r);return ne.isModifierKeyDown(i)||i.shiftKey||!l?!1:(this.isDown=!0,this.timeoutId!=null&&clearTimeout(this.timeoutId),this.isHold=!1,this.timeoutId=setTimeout(()=>{this.isHold=!0;var a=e.column,o=e.row,n=r.props.model;r.clearSelectedRanges(),r.focus(),r.handleKeySelectAt({column:a,row:o},"replace"),rt(n)&&a!=null&&o!=null&&n.isEditableRange(ra.makeCell(a,o))&&r.startEditing(a,o)},at.HOLD_LENGTH),!0)}onClick(e,r){var i=this.isHoveringLink(e,r);if(!i||!this.isDown||this.currentLinkBox==null)return this.isDown=!1,this.isHold=!1,!1;if(!this.isHold){var l;this.timeoutId!=null&&clearTimeout(this.timeoutId),this.timeoutId=void 0,r.props.onTokenClicked((l=this.currentLinkBox)===null||l===void 0?void 0:l.token)}return this.isHold=!1,this.isDown=!1,!0}}mr(at,"HOLD_LENGTH",1e3);function Qt(t,e,r){return(e=mn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function mn(t){var e=gn(t,"string");return typeof e=="symbol"?e:e+""}function gn(t,e){if(typeof t!="object"||!t)return t;var r=t[Symbol.toPrimitive];if(r!==void 0){var i=r.call(t,e);if(typeof i!="object")return i;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(t)}class pn{constructor(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:5e3;Qt(this,"order",void 0),Qt(this,"cursor",null),this.order=e}onDown(e,r){return!1}onUp(e,r){return!1}}function bn(t){for(var e=[],r=t.querySelectorAll("tr"),i=0;i<r.length;i+=1){for(var l=r[i],a=l.querySelectorAll("td"),o=[],n=0;n<a.length;n+=1){var s,u,d=a[n];o.push((s=(u=d.textContent)===null||u===void 0?void 0:u.trim())!==null&&s!==void 0?s:"")}e.push(o)}return e}function Cn(t){var e=[];return t.forEach(r=>{var i,l=(i=r.textContent)!==null&&i!==void 0?i:"";l.length>0&&e.push(l.split(/\t|\u00a0\u00a0\u00a0 /))}),e}function wn(t){var e=t.replace(/\r\n?/g,`
12
+ `).trim().split(`
13
+ `).map(r=>r.split(" "));return e.length===1&&e[0].length===1?e[0][0]:e}function yn(t){var e,r,i=t.querySelector("table");if(i!=null)return bn(i);var l=(e=(r=t.textContent)===null||r===void 0?void 0:r.trim())!==null&&e!==void 0?e:"";if(l.length>0){var a=t.childNodes,o=l.includes(" "),n=l.includes("    ");return o&&a.length!==0&&(a.length===1||a.length>1&&(a[0].textContent==null||!a[0].textContent.includes(" ")))?l.split(`
14
+ `).map(s=>s.split(" ")):a.length>1||n?Cn(t.childNodes):l}return null}class Fn extends pn{onDown(e,r){switch(e.key){case"v":if(ne.isModifierKeyDown(e)){var i=document.createElement("div");document.body.appendChild(i),i.setAttribute("contenteditable","true"),i.setAttribute("style",'clip-path: "inset(50%)"; height: 1px; width: 1px; margin: -1px; overflow: hidden; padding 0; position: absolute;');var l=()=>{i.removeEventListener("paste",o),i.removeEventListener("input",n),i.remove(),r.focus()},a="",o=s=>{var u,d,h=s;a=(u=(d=h.clipboardData)===null||d===void 0?void 0:d.getData("text/plain"))!==null&&u!==void 0?u:""},n=()=>{var s;l();var u=(s=a.length>0?wn(a):null)!==null&&s!==void 0?s:yn(i);u!=null&&r.pasteValue(u)};return i.addEventListener("paste",o),i.addEventListener("input",n),i.focus(),{preventDefault:!1,stopPropagation:!0}}break}return!1}}export{sa as A,Fn as B,_a as C,El as D,it as E,Bn as F,tt as G,pn as K,ua as L,Dl as M,kn as O,Mn as P,Co as S,ln as T,Sa as a,to as b,ze as c,da as d,Xl as e,jn as f,lo as g,Wn as h,$n as i,Ll as j,ja as k,ma as l,An as m,Vl as n,ge as o,rt as p,wn as q,Br as r,at as s,It as t,fa as u,pr as v,_e as w,Fr as x,Ro as y,xo as z};
15
+ //# sourceMappingURL=PasteKeyHandler-C2c93kPX.js.map