@deephaven/code-studio 0.85.21 → 0.85.22

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 (41) hide show
  1. package/build/assets/{AppRoot-ac5bb4b4.js → AppRoot-3da1828a.js} +4 -4
  2. package/build/assets/{AppRoot-ac5bb4b4.js.map → AppRoot-3da1828a.js.map} +1 -1
  3. package/build/assets/{Chart-e2ac35b6.js → Chart-93017bb0.js} +2 -2
  4. package/build/assets/{Chart-e2ac35b6.js.map → Chart-93017bb0.js.map} +1 -1
  5. package/build/assets/{ControlType-373e370f.js → ControlType-ae0db8e1.js} +5 -5
  6. package/build/assets/ControlType-ae0db8e1.js.map +1 -0
  7. package/build/assets/{FontBootstrap-a502fdaf.js → FontBootstrap-3e3a0b4f.js} +2 -2
  8. package/build/assets/{FontBootstrap-a502fdaf.js.map → FontBootstrap-3e3a0b4f.js.map} +1 -1
  9. package/build/assets/{FormatterUtils-9ce5e8da.js → FormatterUtils-75ad9efb.js} +2 -2
  10. package/build/assets/{FormatterUtils-9ce5e8da.js.map → FormatterUtils-75ad9efb.js.map} +1 -1
  11. package/build/assets/{Grid-f8093983.js → Grid-3bb94eca.js} +2 -2
  12. package/build/assets/{Grid-f8093983.js.map → Grid-3bb94eca.js.map} +1 -1
  13. package/build/assets/{IrisGrid-7d2033c7.js → IrisGrid-6dac5f07.js} +2 -2
  14. package/build/assets/{IrisGrid-7d2033c7.js.map → IrisGrid-6dac5f07.js.map} +1 -1
  15. package/build/assets/{IrisGridModel-7ad0c8cd.js → IrisGridModel-1c26dcf8.js} +2 -2
  16. package/build/assets/{IrisGridModel-7ad0c8cd.js.map → IrisGridModel-1c26dcf8.js.map} +1 -1
  17. package/build/assets/{IrisGridShortcuts-1c4f5075.js → IrisGridShortcuts-a0e50c5e.js} +2 -2
  18. package/build/assets/{IrisGridShortcuts-1c4f5075.js.map → IrisGridShortcuts-a0e50c5e.js.map} +1 -1
  19. package/build/assets/{IrisGridThemeProvider-7a4acdd4.js → IrisGridThemeProvider-31b8442c.js} +2 -2
  20. package/build/assets/{IrisGridThemeProvider-7a4acdd4.js.map → IrisGridThemeProvider-31b8442c.js.map} +1 -1
  21. package/build/assets/{LocalWorkspaceStorage-b92375d1.js → LocalWorkspaceStorage-e39208a1.js} +2 -2
  22. package/build/assets/{LocalWorkspaceStorage-b92375d1.js.map → LocalWorkspaceStorage-e39208a1.js.map} +1 -1
  23. package/build/assets/{MarkdownEditor-a12c77fa.js → MarkdownEditor-058b80a4.js} +2 -2
  24. package/build/assets/{MarkdownEditor-a12c77fa.js.map → MarkdownEditor-058b80a4.js.map} +1 -1
  25. package/build/assets/{MarkdownNotebook-e0846b6e.js → MarkdownNotebook-a7cd39f9.js} +2 -2
  26. package/build/assets/{MarkdownNotebook-e0846b6e.js.map → MarkdownNotebook-a7cd39f9.js.map} +1 -1
  27. package/build/assets/{MissingPartitionError-a44e4d99.js → MissingPartitionError-588bc1a3.js} +2 -2
  28. package/build/assets/{MissingPartitionError-a44e4d99.js.map → MissingPartitionError-588bc1a3.js.map} +1 -1
  29. package/build/assets/{StyleGuideRoot-e2ff7b05.js → StyleGuideRoot-6606e84a.js} +2 -2
  30. package/build/assets/{StyleGuideRoot-e2ff7b05.js.map → StyleGuideRoot-6606e84a.js.map} +1 -1
  31. package/build/assets/{TokenBoxCellRenderer-4e34e76b.js → TokenBoxCellRenderer-7992cbdf.js} +2 -2
  32. package/build/assets/{TokenBoxCellRenderer-4e34e76b.js.map → TokenBoxCellRenderer-7992cbdf.js.map} +1 -1
  33. package/build/assets/{index-d1c762d0.js → index-29777e6c.js} +2 -2
  34. package/build/assets/{index-d1c762d0.js.map → index-29777e6c.js.map} +1 -1
  35. package/build/assets/{index-c7d4876e.js → index-576eeba9.js} +3 -3
  36. package/build/assets/{index-c7d4876e.js.map → index-576eeba9.js.map} +1 -1
  37. package/build/assets/{index-fb0f13d9.js → index-7bcf604b.js} +2 -2
  38. package/build/assets/{index-fb0f13d9.js.map → index-7bcf604b.js.map} +1 -1
  39. package/build/index.html +2 -2
  40. package/package.json +11 -11
  41. package/build/assets/ControlType-373e370f.js.map +0 -1
@@ -1,2 +1,2 @@
1
- import{V as we,bo as Ae,J as H,M as Oe,N as oe,r as Z,bl as Ce,aq as $,bt as be,a2 as Re,H as Ie}from"./vendor-3cc10195.js";import{x as Ne,br as Pe,J as ge,L as De,e as X,b9 as W}from"./index-d1c762d0.js";import{_ as pe}from"./monaco-b5248072.js";import{a6 as Le,c as ee,af as k}from"./ControlType-373e370f.js";var ae=we.forwardRef((o,e)=>{var{children:t,className:r,disabled:n,id:a,isLinked:i,isLinkedSource:l,isInvalid:s,onClick:u,onMouseEnter:c,onMouseLeave:f,style:d,"data-testid":g}=o,{UNSAFE_className:m}=Ae({},"button");return H.jsxs("button",{ref:e,type:"button",className:Oe("btn-socketed",{"btn-socketed-linked":i!==void 0&&i||l},{"btn-socketed-linked-source":l},{"is-invalid":s},r,m),id:a,onClick:u,onMouseEnter:c,onMouseLeave:f,style:d,disabled:n,"data-testid":g,children:[t,H.jsx(oe,{icon:Ne,className:"linked btn-socketed-icon",transform:"down-1"}),H.jsx(oe,{icon:Pe,className:"is-invalid btn-socketed-icon"})]})});ae.displayName="SocketedButton";ae.defaultProps={children:void 0,className:"",disabled:!1,id:void 0,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const At=ae;function le(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function xe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?le(Object(t),!0).forEach(function(r){Me(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Me(o,e,t){return e=Fe(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Fe(o){var e=He(o,"string");return typeof e=="symbol"?e:String(e)}function He(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ke=Z.lazy(()=>pe(()=>import("./Chart-e2ac35b6.js"),["./Chart-e2ac35b6.js","./vendor-3cc10195.js","./helpers-de833af9.js","./vendor-fb3fd713.css","./index-d1c762d0.js","./monaco-b5248072.js","./monaco-f18fde03.css","./index-7d08f7c0.css","./Plotly-f610e3d1.js","./plotly-58c19e44.js","./ControlType-373e370f.js","./ControlType-fbf3b3ed.css","./DownsamplingError-8e6bdb73.js","./useMergeRef-da6b2a92.js","./FormatterUtils-9ce5e8da.js","./Chart-d34ffe5c.css"],import.meta.url));function Ot(o){return H.jsx(Z.Suspense,{fallback:H.jsx(ge,{}),children:H.jsx(ke,xe({},o))})}function ie(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function q(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ie(Object(t),!0).forEach(function(r){x(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function x(o,e,t){return e=_e(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function _e(o){var e=Be(o,"string");return typeof e=="symbol"?e:String(e)}function Be(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var z=De.module("ChartUtils"),ue="io.deephaven.time.DateTime",We=36e5,Ve=1e6;function je(o){return o.asDate!==void 0}function $e(o){return o.asNumber!==void 0}function se(o){return o.dhTimeZone!==void 0}function Xe(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function ze(){var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}var Ye=ze();class v{static getPlotlyErrorBars(e,t,r){var n=r.map((i,l)=>i-e[l]),a=t.map((i,l)=>e[l]-i);return{type:"data",symmetric:!1,array:n,arrayminus:a}}static convertNumberPrefix(e){return e.replace(/\u00A4\u00A4/g,"USD").replace(/\u00A4/g,"$")}static getPlotlyNumberFormat(e,t,r){if(r==null||r==="")return null;var n=r.split(";"),a=n[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\.?)(0*)(#*)(E?0*)(%?)(.*)/);X(a);var[,i,l,s,,u,c,f,d,g]=a,m=s.replace(",","").length,E=l.indexOf(",")>=0||s.indexOf(",")>=0,h=E?",":"",T=f!=null&&f!==""?"e":"f",O=d!==""?d:T,S=u.length+c.length,A="",w="0".concat(m).concat(h,".").concat(S).concat(A).concat(O),C=v.convertNumberPrefix(i),N=v.convertNumberPrefix(g);return{tickformat:w,tickprefix:C,ticksuffix:N,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},i=n;return r&&(i=n/Ve),t.log&&(i=Math.log(i)),a.tickmode="linear",a.dtick=i,a}return e}static getSourceForAxis(e,t){for(var r=0;r<e.series.length;r+=1)for(var n=e.series[r],a=0;a<n.sources.length;a+=1){var i=n.sources[a];if(i.axis===t)return i}return null}static getSeriesVisibility(e,t){return t!=null&&t.hiddenSeries!=null&&t.hiddenSeries.includes(e)?"legendonly":!0}static getHiddenLabels(e){return e!=null&&e.hiddenSeries?[...e.hiddenSeries]:[]}static makeSeriesData(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:v.ORIENTATION.VERTICAL;return{type:e,mode:t,name:r,orientation:a,showlegend:n??void 0}}static getMarkerSymbol(e){switch(e){case"SQUARE":return"square";case"CIRCLE":return"circle";case"DIAMOND":return"diamond";case"UP_TRIANGLE":return"triangle-up";case"DOWN_TRIANGLE":return"triangle-down";case"RIGHT_TRIANGLE":return"triangle-right";case"LEFT_TRIANGLE":return"triangle-left";case"ELLIPSE":case"HORIZONTAL_RECTANGLE":case"VERTICAL_RECTANGLE":default:throw new Error("Unrecognized shape ".concat(e))}}static getAllAxes(e){return e.charts.reduce((t,r)=>[...t,...r.axes],[])}static getAxisTypeMap(e){var t=v.getAllAxes(e);return v.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],i=0;i<a.series.length;i+=1)if(t===a.series[i])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(l=>l.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],i=e[a];Xe(i)&&(t[a]=[...i.range])}return t}static getAxisLayoutProperty(e,t){var r=t>0?"".concat(t+1):"";return"".concat(e??"","axis").concat(r)}static periodToDecimal(e){var t=e.split(":");return Number(t[0])+Number(t[1])/60}static decimalToPeriod(e){var t=Math.floor(e),r=Math.round((e-t)*60);return"".concat(t.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"))}static groupArray(e,t){return e.reduce((r,n)=>{var a,i=n[t],l=(a=r.get(i))!==null&&a!==void 0?a:[];return l.push(n),r.set(i,l),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");z.warn("Unexpected colorway format: ".concat(e))}}static titleFromSettings(e){var{series:t,xAxis:r,title:n="".concat((t??[]).join(", ")," by ").concat(r)}=e;return n}static getTimeZoneDiff(e,t){return t?(e.standardOffset-t.standardOffset)/60:0}static createClosedRangesForPartialHoliday(e,t){var r=t.map(f=>[v.periodToDecimal(f.open),v.periodToDecimal(f.close)]);r.sort((f,d)=>f[0]-d[0]),r.length===0&&r.push([0,24]);var n=e.map(f=>[v.periodToDecimal(f.open),v.periodToDecimal(f.close)]);n.sort((f,d)=>f[0]-d[0]);for(var a=[],i=0;i<r.length;i+=1){for(var l=r[i],s=l[0],u=0;u<n.length;u+=1){var c=n[u];c[1]>s&&c[0]<l[1]&&(c[0]>s&&a.push([s,c[0]]),s=c[1])}s<l[1]&&a.push([s,l[1]])}return a}constructor(e){x(this,"dh",void 0),x(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),Le(this)}getAxisFormats(e,t){for(var r=new Map,n={tickformat:null,ticksuffix:null},a=v.getAllAxes(e),i=v.groupArray(a,"type"),{charts:l}=e,s=0;s<l.length;s+=1)for(var u=l[s],c=0;c<u.series.length;c+=1)for(var f=u.series[c],{sources:d}=f,g=d.filter(P=>P.axis),m=0;m<g.length;m+=1){var E=g[m],{axis:h}=E,{type:T}=h,O=i.get(T);X(O);var S=O.indexOf(h),A=this.getAxisPropertyName(T);if(A!=null){var w=v.getAxisLayoutProperty(A,S);if(r.has(w))z.debug("".concat(w," already added."));else{z.debug("Adding ".concat(w," to axisFormats."));var C=this.getPlotlyAxisFormat(E,t);if(C===null)r.set(w,n);else{r.set(w,C);var{businessCalendar:N}=h;if(N!=null&&(C.rangebreaks=this.createRangeBreaksFromBusinessCalendar(N,t)),r.size===u.axes.length)return r}}}}return r}getPlotlyChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.SCATTER:case n.plot.SeriesPlotStyle.LINE:return!t&&Ye&&r?"scattergl":"scatter";case n.plot.SeriesPlotStyle.BAR:case n.plot.SeriesPlotStyle.STACKED_BAR:return"bar";case n.plot.SeriesPlotStyle.PIE:return"pie";case n.plot.SeriesPlotStyle.TREEMAP:return"treemap";case n.plot.SeriesPlotStyle.HISTOGRAM:return"histogram";case n.plot.SeriesPlotStyle.OHLC:return"ohlc";default:return}}getPlotlyChartMode(e,t,r){var{dh:n}=this,a=new Set;switch(e){case n.plot.SeriesPlotStyle.SCATTER:(t??!1)&&a.add(v.MODE_LINES),(r??!0)&&a.add(v.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(v.MODE_LINES),(r??!1)&&a.add(v.MODE_MARKERS);break}return a.size>0?[...a].join("+"):void 0}getPlotlyProperty(e,t){var{dh:r}=this;switch(e){case r.plot.SeriesPlotStyle.PIE:switch(t){case r.plot.SourceType.X:return"labels";case r.plot.SourceType.Y:return"values"}break;case r.plot.SeriesPlotStyle.OHLC:switch(t){case r.plot.SourceType.TIME:return"x"}break;case r.plot.SeriesPlotStyle.TREEMAP:switch(t){case r.plot.SourceType.X:return"ids";case r.plot.SourceType.Y:return"values";case r.plot.SourceType.LABEL:return"labels";case r.plot.SourceType.PARENT:return"parents";case r.plot.SourceType.COLOR:return"marker.colors"}break}switch(t){case r.plot.SourceType.X:return"x";case r.plot.SourceType.Y:return"y";case r.plot.SourceType.Z:return"z";case r.plot.SourceType.X_LOW:return"xLow";case r.plot.SourceType.X_HIGH:return"xHigh";case r.plot.SourceType.Y_LOW:return"yLow";case r.plot.SourceType.Y_HIGH:return"yHigh";case r.plot.SourceType.TIME:return"time";case r.plot.SourceType.OPEN:return"open";case r.plot.SourceType.HIGH:return"high";case r.plot.SourceType.LOW:return"low";case r.plot.SourceType.CLOSE:return"close";case r.plot.SourceType.SHAPE:return"shape";case r.plot.SourceType.SIZE:return"size";case r.plot.SourceType.LABEL:return"label";case r.plot.SourceType.COLOR:return"color";case r.plot.SourceType.PARENT:return"parent";case r.plot.SourceType.HOVER_TEXT:return"hovertext";case r.plot.SourceType.TEXT:return"text";default:throw new Error("Unrecognized source type: ".concat(t))}}getPlotlySeriesOrientation(e){var t,r,{dh:n}=this,{sources:a}=e;return a.length===2&&((t=a[0])===null||t===void 0||(r=t.axis)===null||r===void 0?void 0:r.type)===n.plot.AxisType.Y?v.ORIENTATION.HORIZONTAL:v.ORIENTATION.VERTICAL}makeSeriesDataFromSeries(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,{name:i,isLinesVisible:l,isShapesVisible:s,plotStyle:u,lineColor:c,shapeColor:f,sources:d,shape:g,shapeSize:m}=e,E=d.some(A=>{var w;return(w=A.axis)===null||w===void 0?void 0:w.businessCalendar}),h=this.getChartType(u,E,a),T=this.getPlotlyChartMode(u,l??void 0,s??void 0),O=this.getPlotlySeriesOrientation(e),S=v.makeSeriesData(h,T,i,n,O);return this.addSourcesToSeriesData(S,u,d,t),this.addStylingToSeriesData(S,u,c,f,g,m,r),S}addSourcesToSeriesData(e,t,r,n){for(var a=e,i=0;i<r.length;i+=1){var l=r[i],{axis:s,type:u}=l,c=this.getPlotlyProperty(t,u);Ce(a,c,[]);var f=s!=null?this.getAxisPropertyName(s.type):null;if(f!=null){var d=n.get(s.type);if(d){var g=d.indexOf(s),m=g>0?"".concat(g+1):"";a["".concat(f,"axis")]="".concat(f).concat(m)}}}}addStylingToSeriesData(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:s}=this,u=e;if(u.marker={line:{}},u.line={width:1},t===s.plot.SeriesPlotStyle.AREA?u.fill="tozeroy":t===s.plot.SeriesPlotStyle.STACKED_AREA?u.stackgroup="stack":t===s.plot.SeriesPlotStyle.STEP?u.line.shape="hv":t===s.plot.SeriesPlotStyle.HISTOGRAM?u.width=[]:t===s.plot.SeriesPlotStyle.PIE?u.textinfo="label+percent":t===s.plot.SeriesPlotStyle.TREEMAP&&(u.hoverinfo="text",u.textinfo="label+text",u.tiling={packing:"squarify",pad:0},u.textposition="middle center"),r!=null&&(t===s.plot.SeriesPlotStyle.BAR?u.marker.color=r:u.line.color=r),n!=null&&(u.marker.color=n),a!=null&&a.length>0)try{u.marker.symbol=v.getMarkerSymbol(a)}catch(c){z.warn("Unable to handle shape",a,":",c)}i!=null&&(u.marker.size=i*v.DEFAULT_MARKER_SIZE),l!=null&&t!==s.plot.SeriesPlotStyle.PIE&&(u.visible=l)}getChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.HISTOGRAM:return"bar";default:return this.getPlotlyChartType(e,t,r)}}getAxisPropertyName(e){var{dh:t}=this;switch(e){case t.plot.AxisType.X:return"x";case t.plot.AxisType.Y:return"y";default:return null}}getAxisSide(e){var{dh:t}=this;switch(e){case t.plot.AxisPosition.BOTTOM:return"bottom";case t.plot.AxisPosition.TOP:return"top";case t.plot.AxisPosition.LEFT:return"left";case t.plot.AxisPosition.RIGHT:return"right";default:return}}updateFigureAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=e,l=v.getAllAxes(t),s=0;s<t.charts.length;s+=1){var u=t.charts[s],c=r?.(u),f=this.getChartBounds(t,u,n,a);this.updateLayoutAxes(i,u.axes,l,n,a,f,c)}this.removeStaleAxes(i,l)}getChartBounds(e,t,r,n){var a,{dh:i}=this,{cols:l,rows:s}=e,{column:u,colspan:c,row:f,rowspan:d}=t,g=u+c,m=f+d,E=1/l,h=1/s,T=v.AXIS_SIZE_PX/r,O=v.AXIS_SIZE_PX/n,S={bottom:(s-m)*h+(m<s?O/2:0),top:(s-f)*h-(f>0?O/2:0),left:u*E+(u>0?T/2:0),right:g*E-(g<l?T/2:0)},A=v.groupArray(t.axes,"position"),w=(a=A.get(i.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return w.length>0&&(r>0?S.right-=(S.right-S.left)*Math.max(0,Math.min(v.LEGEND_WIDTH_PX/r,v.MAX_LEGEND_SIZE)):S.right-=(S.right-S.left)*v.DEFAULT_AXIS_SIZE),S}getPlotlyDateFormat(e,t,r){var{dh:n}=this,a=r?.replace("%","%%").replace(/S{9}/g,"%9f").replace(/S{8}/g,"%8f").replace(/S{7}/g,"%7f").replace(/S{6}/g,"%6f").replace(/S{5}/g,"%5f").replace(/S{4}/g,"%4f").replace(/S{3}/g,"%3f").replace(/S{2}/g,"%2f").replace(/S{1}/g,"%1f").replace(/y{4}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4}/g,"%B").replace(/M{3}/g,"%b").replace(/M{2}/g,"%m").replace(/M{1}/g,"%-m").replace(/E{4,}/g,"%A").replace(/E{1,}/g,"%a").replace(/d{2}/g,"%d").replace(/([^%]|^)d{1}/g,"$1%-d").replace(/H{2}/g,"%H").replace(/h{2}/g,"%I").replace(/h{1}/g,"%-I").replace(/m{2}/g,"%M").replace(/s{2}/g,"%S").replace("'T'","T").replace(" z",""),i,l=e?.getColumnTypeFormatter(t);return l!=null&&se(l)&&l.dhTimeZone!=null&&l.showTimeZone&&(i=n.i18n.DateTimeFormat.format(" z",new Date,l.dhTimeZone)),{tickformat:a,ticksuffix:i,automargin:!0}}getPlotlyAxisFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,{dh:r}=this,{axis:n,columnType:a}=e,{formatPattern:i}=n,l=null;return ee.isDateType(a)?(l=this.getPlotlyDateFormat(t,a,i),l=v.addTickSpacing(l,n,!0)):ee.isNumberType(a)&&(l=v.getPlotlyNumberFormat(t,a,i),l=v.addTickSpacing(l,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(l?l.type="category":l={type:"category",tickformat:void 0,ticksuffix:void 0}),l}updateLayoutAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},l=arguments.length>6?arguments[6]:void 0,{dh:s}=this,u=n>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/a,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,c=a>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/n,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,f=e,d=v.groupArray(t,"position"),g=v.groupArray(t,"type"),m=[...g.keys()],E=v.groupArray(r,"type"),h=0;h<m.length;h+=1){var T=m[h],O=this.getAxisPropertyName(T);if(O!=null){var S=g.get(T),A=E.get(T),w=T===s.plot.AxisType.Y,C=w?a:n;X(S),X(A);for(var N=0;N<S.length;N+=1){var P=S[N],M=A.indexOf(P),F=v.getAxisLayoutProperty(O,M);f[F]==null&&(f[F]={});var R=f[F];if(R!=null){this.updateLayoutAxis(R,P,N,d,u,c,i);var{range:I,autorange:L}=R;if(l!=null&&I!==void 0&&(L===void 0||L===!1)){var V=l(P),[B,j]=V(I);z.debug("Setting downsample range",C,B,j),P.range(C,B,j)}else P.range(C)}}}}}removeStaleAxes(e,t){for(var r=e,n=v.groupArray(t,"type"),a=[...n.keys()],i=0;i<a.length;i+=1){var l=a[i],s=n.get(l);X(s);var u=s.length,c=this.getAxisPropertyName(l);if(c!=null)for(var f=v.getAxisLayoutProperty(c,u);r[f]!=null;)delete r[f],u+=1,f=v.getAxisLayoutProperty(c,u)}}updateLayoutAxis(e,t,r,n,a,i,l){var s,{dh:u}=this,c=t.type===u.plot.AxisType.Y,f=c?i:a,d=e,g=(s=t.label)!==null&&s!==void 0?s:"";if(d.title!==void 0&&typeof d.title!="string"?d.title.text=g:d.title={text:g},t.log&&(d.type="log"),d.side=this.getAxisSide(t.position),r>0){var m,E;d.overlaying=(m=this.getAxisPropertyName(t.type))!==null&&m!==void 0?m:void 0;var h=(E=n.get(t.position))!==null&&E!==void 0?E:[],T=h.indexOf(t);T>0&&(d.anchor="free",t.position===u.plot.AxisPosition.RIGHT?d.position=l.right+(T-h.length+1)*f:t.position===u.plot.AxisPosition.TOP?d.position=l.top+(T-h.length+1)*f:t.position===u.plot.AxisPosition.BOTTOM?d.position=l.bottom+(h.length-T+1)*f:t.position===u.plot.AxisPosition.LEFT&&(d.position=l.left+(h.length-T+1)*f))}else if(t.type===u.plot.AxisType.X){var O=n.get(u.plot.AxisPosition.LEFT)||[],S=n.get(u.plot.AxisPosition.RIGHT)||[],A=Math.max(l.left,l.left+(O.length-1)*i),w=Math.min(l.right-(S.length-1)*i,l.right);d.domain=[A,w]}else if(t.type===u.plot.AxisType.Y){var C=n.get(u.plot.AxisPosition.BOTTOM)||[],N=n.get(u.plot.AxisPosition.TOP)||[],P=Math.max(l.bottom,l.bottom+(C.length-1)*a),M=Math.min(l.top-(N.length-1)*a,l.top);d.domain=[P,M]}}createBoundsFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e.length===0)return[];for(var r=e.map(s=>[(v.periodToDecimal(s.open)+t)%24,(v.periodToDecimal(s.close)+t)%24]).sort((s,u)=>s[0]-u[0]),n=[],a=0;a<r.length;a+=1){var i=r[a],l=r[(a+1)%r.length];n.push([i[1],l[0]])}return n}createBreaksFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.createBoundsFromPeriods(e,t);return r.map(n=>({pattern:"hour",bounds:n}))}createBoundsFromDays(e){var t=this.daysOfWeek.length;if(e.length===t)return[];for(var r=e.map(s=>this.daysOfWeek.indexOf(s)),n=new Set(r),a=new Set,i=0;i<t;i+=1)!n.has(i)&&n.has((i-1+t)%t)&&a.add(i);var l=[];return a.forEach(s=>{for(var u=0;u<t;u+=1){var c=(s+u)%t;if(n.has(c)){l.push([s,c]);return}}throw new Error("Unable to find open day for closed day ".concat(s,", businessDays: ").concat(e))}),l}createBreaksFromDays(e){var t=this.createBoundsFromDays(e);return t.map(r=>({pattern:"day of week",bounds:r}))}createRangeBreaksFromBusinessCalendar(e,t){var r=[],{businessPeriods:n,businessDays:a,holidays:i,timeZone:l}=e,s=t?.getColumnTypeFormatter(ue),u;se(s)&&(u=s.dhTimeZone);var c=v.getTimeZoneDiff(l,u);return i.length>0&&r.push(...this.createRangeBreakValuesFromHolidays(i,l,u,e)),r.push(...this.createBreaksFromPeriods(n,c)),r.push(...this.createBreaksFromDays(a)),r}createRangeBreakValuesFromHolidays(e,t,r,n){var a=[],i=[];return e.forEach(l=>{l.businessPeriods.length>0?i.push(...this.createPartialHoliday(l,t,r,n)):a.push(this.createFullHoliday(l,t,r))}),[{values:a},...i]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r,n){var a;if(e.businessPeriods.length===0)return[];var i=e.date.toString();if(n){var l=new Date(i).getDay(),s=n.businessDays.includes(this.daysOfWeek[l]);if(!s)return[]}for(var u=v.createClosedRangesForPartialHoliday(e.businessPeriods,(a=n?.businessPeriods)!==null&&a!==void 0?a:[]),c=[],f=0;f<u.length;f+=1){var[d,g]=u[f];if(d!==g){var m=[this.adjustDateForTimeZone("".concat(i," ").concat(v.decimalToPeriod(d),":00.000000"),t,r)],E=We*(g-d);c.push({values:m,dvalue:E})}}return c}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,ue,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:i}=e,l=v.titleFromSettings(e),s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},u={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.Y),position:"".concat(r.plot.AxisPosition.LEFT)};return{charts:[{chartType:"".concat(r.plot.ChartType.XY),axes:[s,u],series:(n??[]).map(c=>({plotStyle:"".concat(i),name:c,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:s,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:c,axis:u,table:t}]}))}],title:l}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(je(e))return r.i18n.DateTimeFormat.format(v.DATE_FORMAT,e,t);if($e(e))return e.asNumber()}return e}wrapValue(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:n}=this;if(ee.isDateType(t)&&typeof e=="string"){var a=e,i=v.DATE_FORMAT.substr(0,e.length),l=n.i18n.DateTimeFormat.parse(i,a);if(!r)return l;var s="".concat(i," Z"),u=n.i18n.DateTimeFormat.format("Z",l,r),c=n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(u)),f=n.i18n.DateTimeFormat.format("Z",c,r);return n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(f))}return e}makeLayoutAxis(e,t){var{dh:r}=this,n={automargin:!0,gridcolor:t.gridcolor,linecolor:t.linecolor,rangeslider:{visible:!1},showline:!0,ticks:"outside",ticklen:5,tickcolor:t.paper_bgcolor,tickfont:{color:t.zerolinecolor},title:{font:{color:t.title_color}},legend:{font:{color:t.legend_color}}};return e===r.plot.AxisType.X?Object.assign(n,{showgrid:!0}):e===r.plot.AxisType.Y&&Object.assign(n,{zerolinecolor:t.zerolinecolor,zerolinewidth:2}),n}makeDefaultTemplate(e){var{error_band_line_color:t,ohlc_increasing:r,ohlc_decreasing:n,title_color:a}=e;return{data:{bar:[{marker:{line:{color:"transparent"}}}],scatter:[{error_x:{color:t},error_y:{color:t}}],ohlc:[{increasing:{line:{color:r}},decreasing:{line:{color:n}}}],pie:[{outsidetextfont:{color:a}}],treemap:[{outsidetextfont:{color:a}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:i,land_color:l,ocean_color:s,lake_color:u,river_color:c}=e,f={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:v.normalizeColorway(e?.colorway),font:{family:"'Fira Sans', sans-serif",color:a},title:{font:{color:a},xanchor:"center",xref:"paper",yanchor:"top",pad:q({},v.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:q({},v.DEFAULT_MARGIN),xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),polar:{angularaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),radialaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),bgcolor:e.plot_bgcolor},scene:{xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),zaxis:this.makeLayoutAxis(null,e)},geo:{showcoastlines:!0,showframe:!1,showland:!0,showocean:!0,showlakes:!0,showrivers:!0,bgcolor:r,coastlinecolor:i,landcolor:l,oceancolor:s,lakecolor:u,rivercolor:c}};return f.datarevision=0,f}hydrateSettings(e){var{dh:t}=this;return q(q({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}x(v,"DEFAULT_AXIS_SIZE",.15);x(v,"MIN_AXIS_SIZE",.025);x(v,"MAX_AXIS_SIZE",.2);x(v,"AXIS_SIZE_PX",75);x(v,"LEGEND_WIDTH_PX",50);x(v,"MAX_LEGEND_SIZE",.25);x(v,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));x(v,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");x(v,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));x(v,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));x(v,"SUBTITLE_LINE_HEIGHT",25);x(v,"DEFAULT_MARKER_SIZE",6);x(v,"MODE_MARKERS","markers");x(v,"MODE_LINES","lines");const Ct=v;function D(o,e,t){return e=Ze(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ze(o){var e=Ke(o,"string");return typeof e=="symbol"?e:String(e)}function Ke(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class b{constructor(e){D(this,"dh",void 0),D(this,"listeners",void 0),D(this,"formatter",void 0),D(this,"renderOptions",void 0),D(this,"rect",void 0),D(this,"isDownsamplingDisabled",void 0),D(this,"title",void 0),this.dh=e,this.listeners=[],this.isDownsamplingDisabled=!1}getData(){return[]}getDefaultTitle(){return""}getLayout(){return{}}getFilterColumnMap(){return new Map}isFilterRequired(){return!1}setFilter(e){}close(){}setFormatter(e){this.formatter=e}setRenderOptions(e){this.renderOptions=e}setDownsamplingDisabled(e){this.isDownsamplingDisabled=e}setDimensions(e){this.rect=e}setTitle(e){this.title=e}subscribe(e){this.listeners.push(e)}unsubscribe(e){this.listeners=this.listeners.filter(t=>t!==e)}fireEvent(e){for(var t=0;t<this.listeners.length;t+=1)this.listeners[t](e)}fireUpdate(e){this.fireEvent(new CustomEvent(b.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(b.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(b.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(b.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(b.EVENT_ERROR,{detail:e}))}fireBlocker(e){this.fireEvent(new CustomEvent(b.EVENT_BLOCKER,{detail:e}))}fireBlockerClear(){this.fireEvent(new CustomEvent(b.EVENT_BLOCKER_CLEAR))}fireLayoutUpdated(e){this.fireEvent(new CustomEvent(b.EVENT_LAYOUT_UPDATED,{detail:e}))}}D(b,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");D(b,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");D(b,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");D(b,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");D(b,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");D(b,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");D(b,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");D(b,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");D(b,"EVENT_ERROR","ChartModel.EVENT_ERROR");D(b,"EVENT_BLOCKER","ChartModel.EVENT_BLOCKER");D(b,"EVENT_BLOCKER_CLEAR","ChartModel.EVENT_BLOCKER_CLEAR");D(b,"EVENT_LAYOUT_UPDATED","ChartModel.EVENT_LAYOUT_UPDATED");const bt=b;function fe(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function qe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fe(Object(t),!0).forEach(function(r){Qe(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Qe(o,e,t){return e=Je(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Je(o){var e=Ge(o,"string");return typeof e=="symbol"?e:String(e)}function Ge(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Ue=Z.lazy(()=>pe(()=>import("./IrisGrid-7d2033c7.js"),["./IrisGrid-7d2033c7.js","./vendor-3cc10195.js","./helpers-de833af9.js","./vendor-fb3fd713.css","./index-d1c762d0.js","./monaco-b5248072.js","./monaco-f18fde03.css","./index-7d08f7c0.css","./ControlType-373e370f.js","./ControlType-fbf3b3ed.css","./MissingPartitionError-a44e4d99.js","./FormatterUtils-9ce5e8da.js","./IrisGridThemeProvider-7a4acdd4.js","./IrisGridShortcuts-1c4f5075.js","./IrisGridShortcuts-7cf07b0f.css","./TokenBoxCellRenderer-4e34e76b.js","./useMergeRef-da6b2a92.js","./TokenBoxCellRenderer-d8e9a802.css","./IrisGridThemeProvider-15ce00be.css","./Grid-f8093983.js","./Grid-6b71b6c4.css","./IrisGrid-4424e8a8.css"],import.meta.url)),he=Z.forwardRef((o,e)=>H.jsx(Z.Suspense,{fallback:H.jsx(ge,{}),children:H.jsx(Ue,qe({ref:e},o))}));he.displayName="LazyIrisGrid";const Rt=he;function et(o){return o?.hasExpandableRows!==void 0}function Y(o,e,t){return e=tt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function tt(o){var e=rt(o,"string");return typeof e=="symbol"?e:String(e)}function rt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var re;(function(o){o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT"})(re||(re={}));class p{static normalize(e,t,r,n){var a=e,i=t,l=r,s=n;return a!=null&&l!=null&&l<a&&(a=l,l=e),i!=null&&s!=null&&s<i&&(i=s,s=t),[a,i,l,s]}static makeNormalized(e,t,r,n){return new p(...p.normalize(e,t,r,n))}static makeCell(e,t){return new p(e,t,e,t)}static makeColumn(e){return new p(e,null,e,null)}static makeRow(e){return new p(null,e,null,e)}static minOrNull(e,t){return e==null||t==null?null:Math.min(e,t)}static maxOrNull(e,t){return e==null||t==null?null:Math.max(e,t)}static consolidate(e){for(var t=e.slice(),r=!0;r;){r=!1;for(var n=0;n<t.length&&!r;n+=1)for(var a=t[n],i=t.length-1;i>n;i-=1){var l=t[i];if(a.contains(l))t.splice(i,1);else if(l.contains(a)){r=!0,t[n]=l,t.splice(i,1);break}else if(a.startRow===l.startRow&&a.endRow===l.endRow){if(a.touches(l)){var{startRow:s,endRow:u}=a,c=p.minOrNull(a.startColumn,l.startColumn),f=p.maxOrNull(a.endColumn,l.endColumn);r=!0,t[n]=new p(c,s,f,u),t.splice(i,1);break}}else if(a.startColumn===l.startColumn&&a.endColumn===l.endColumn&&a.touches(l)){var{startColumn:d,endColumn:g}=a,m=p.minOrNull(a.startRow,l.startRow),E=p.maxOrNull(a.endRow,l.endRow);r=!0,t[n]=new p(d,m,g,E),t.splice(i,1);break}}}return t}static isAxisRangeTouching(e,t,r,n){return e==null?t==null||r==null?!0:r<=t+1:t==null?n==null?!0:n>=e-1:r==null?n==null?!0:e<=n+1:n==null?t>=r-1:r>=e-1?r<=t+1:n>=e-1}static rangeArraysEqual(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=0;r<e.length;r+=1)if(!e[r].equals(t[r]))return!1;return!0}static intersection(e,t){var r,n,a,i,l,s;if(e.equals(t))return e;var{startColumn:u,startRow:c,endColumn:f,endRow:d}=e;return u=u!=null&&t.startColumn!=null?Math.max(u,t.startColumn):(r=u)!==null&&r!==void 0?r:t.startColumn,f=f!=null&&t.endColumn!=null?Math.min(f,t.endColumn):(n=f)!==null&&n!==void 0?n:t.endColumn,c=c!=null&&t.startRow!=null?Math.max(c,t.startRow):(a=c)!==null&&a!==void 0?a:t.startRow,d=d!=null&&t.endRow!=null?Math.min(d,t.endRow):(i=d)!==null&&i!==void 0?i:t.endRow,u!=null&&u>((l=f)!==null&&l!==void 0?l:-1)||c!=null&&c>((s=d)!==null&&s!==void 0?s:-1)?null:new p(u,c,f,d)}static subtractFromRange(e,t){var r=[],n=p.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new p(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new p(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new p(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new p(e.startColumn,n.endRow+1,e.endColumn,e.endRow)),r)}static subtractFromRanges(e,t){for(var r=[],n=0;n<e.length;n+=1)r.push(...p.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=p.subtractFromRanges(r,t[n]);return r}static isBounded(e){return e.startRow!=null&&e.startColumn!=null&&e.endRow!=null&&e.endColumn!=null}static boundedRange(e,t,r){var n,a,i,l;return p.isBounded(e)?e:new p((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(i=e.endColumn)!==null&&i!==void 0?i:t-1,(l=e.endRow)!==null&&l!==void 0?l:r-1)}static boundedRanges(e,t,r){return e.map(n=>p.boundedRange(n,t,r))}static offset(e,t,r){return new p(e.startColumn!=null?e.startColumn+t:null,e.startRow!=null?e.startRow+r:null,e.endColumn!=null?e.endColumn+t:null,e.endRow!=null?e.endRow+r:null)}static nextCell(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p.SELECTION_DIRECTION.DOWN;if(e.length===0)return null;var a=-1;if(t!=null&&r!=null&&(a=e.findIndex(d=>d.containsCell(t,r)),a>=0)){var i=e[a],l=i.nextCell(t,r,n);if(l!=null)return l}switch(n){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:{var s=a<e.length-1?a+1:0,u=e[s];return u.startCell(n)}case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:{var c=a>0?a-1:e.length-1,f=e[c];return f.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,i,l;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((i=r.endColumn)!==null&&i!==void 0?i:NaN)-((l=r.startColumn)!==null&&l!==void 0?l:NaN)+1)},0)}static rowCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1},0)}static columnCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endColumn)!==null&&n!==void 0?n:NaN)-((a=r.startColumn)!==null&&a!==void 0?a:NaN)+1},0)}static containsCell(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.containsCell(t,r))return!0}return!1}static forEachCell(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){Y(this,"startColumn",void 0),Y(this,"startRow",void 0),Y(this,"endColumn",void 0),Y(this,"endRow",void 0),this.startColumn=e,this.startRow=t,this.endColumn=r,this.endRow=n}equals(e){return this.startColumn===e.startColumn&&this.startRow===e.startRow&&this.endColumn===e.endColumn&&this.endRow===e.endRow}contains(e){return(this.startColumn==null||e.startColumn!=null&&this.startColumn<=e.startColumn)&&(this.startRow==null||e.startRow!=null&&this.startRow<=e.startRow)&&(this.endColumn==null||e.endColumn!=null&&this.endColumn>=e.endColumn)&&(this.endRow==null||e.endRow!=null&&this.endRow>=e.endRow)}containsCell(e,t){return e==null||t==null?!1:(this.startColumn==null||this.startColumn<=e)&&(this.endColumn==null||this.endColumn>=e)&&(this.startRow==null||this.startRow<=t)&&(this.endRow==null||this.endRow>=t)}touches(e){return p.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&p.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return p.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.SELECTION_DIRECTION.DOWN;if(!p.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!p.isBounded(this))throw new Error("Bounded range required");if(e==null||t==null)throw new Error("Require a non-null cursor");var{startColumn:n,endColumn:a,startRow:i,endRow:l}=this;switch(r){case p.SELECTION_DIRECTION.DOWN:if(t<l)return{column:e,row:Math.max(t+1,i)};if(e<a)return{column:Math.max(e+1,n),row:i};break;case p.SELECTION_DIRECTION.UP:if(t>i)return{column:e,row:Math.min(t-1,l)};if(e>n)return{column:Math.min(e-1,a),row:l};break;case p.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<l)return{column:n,row:Math.max(t+1,i)};break;case p.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>i)return{column:a,row:Math.min(t-1,l)};break;default:throw new Error("Invalid direction: ".concat(r))}return null}forEach(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var i;e(n,a,r),r+=1,{column:n,row:a}=(i=this.nextCell(n,a,t))!==null&&i!==void 0?i:{}}}}Y(p,"SELECTION_DIRECTION",re);function nt(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function Q(o){return nt(o)&&o[0]!=null&&o[1]!=null}function ce(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function J(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ce(Object(t),!0).forEach(function(r){Ee(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Ee(o,e,t){return e=at(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function at(o){var e=ot(o,"string");return typeof e=="symbol"?e:String(e)}function ot(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function It(o){return o?.href!==void 0}class y{static getGridPointFromXY(e,t,r){var n=y.getColumnAtX(e,r),a=y.getRowAtY(t,r),i=y.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:i}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=y.getGridPointFromXY(e,t,r),{allColumnWidths:i,allRowHeights:l,allColumnXs:s,allRowYs:u,modelColumns:c,modelRows:f}=r,d=n!==null?f.get(n):null,g=a!==null?c.get(a):null,m=a!==null?s.get(a):null,E=n!==null?u.get(n):null,h=a!==null?i.get(a):null,T=n!==null?l.get(n):null;return{row:n,column:a,modelRow:d??null,modelColumn:g??null,left:m??null,top:E??null,columnWidth:h??null,rowHeight:T??null}}static getColumnHeaderDepthAtY(e,t){var r=y.getRowAtY(e,t),{columnHeaderHeight:n,columnHeaderMaxDepth:a}=t;if(r===null&&e<=n*a)return $(a-Math.ceil(e/n),0,a-1)}static iterateFloatingStart(e,t,r){for(var n=0;n<e&&n<t;n+=1){var a=r(n);if(a!==void 0)return a}}static iterateFloatingEnd(e,t,r){for(var n=0;n<e&&t-(e-n)>=0;n+=1){var a=r(t-(e-n));if(a!==void 0)return a}}static iterateFloating(e,t,r,n){var a=y.iterateFloatingStart(e,r,n);return a!==void 0?a:y.iterateFloatingEnd(t,r,n)}static iterateAllItems(e,t,r,n,a,i){var l=Math.max(e,r),s=Math.min(t,a-n-1),u=y.iterateFloating(r,n,a,i);if(u!==void 0)return u;for(var c=l;c<=s;c+=1)if(u=i(c),u!==void 0)return u}static isInItem(e,t,r,n){var a,i,l=(a=t.get(e))!==null&&a!==void 0?a:0,s=(i=r.get(e))!==null&&i!==void 0?i:0;return l<=n&&n<=l+s}static getItemAtOffset(e,t,r,n,a,i,l){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u=s?void 0:y.iterateFloating(r,n,t,d=>{if(y.isInItem(d,i,l,e))return d});if(!s&&u!==void 0)return u;for(var c=0;c<a.length;c+=1){var f=a[c];if(y.isInItem(f,i,l,e))return f}return null}static getColumnAtX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{columnCount:n,floatingLeftColumnCount:a,floatingRightColumnCount:i,visibleColumns:l,allColumnXs:s,allColumnWidths:u,gridX:c}=t;return e<c?null:this.getItemAtOffset(e-c,n,a,i,l,s,u,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:i,allRowYs:l,allRowHeights:s,gridY:u}=t;return e<u?null:this.getItemAtOffset(e-u,a,r,n,i,l,s)}static getNextShownItem(e,t,r,n){var a=r.findIndex(s=>s===e)||0;for(a-=1;a!=null&&a>=0;){var i=r[a],l=t.get(i);if(l!=null&&n.get(l)!==0)return i;a-=1}return null}static getNextShownColumn(e,t){var{modelColumns:r,visibleColumns:n,userColumnWidths:a}=t;return y.getNextShownItem(e,r,n,a)}static getNextShownRow(e,t){var{modelRows:r,visibleRows:n,userRowHeights:a}=t;return y.getNextShownItem(e,r,n,a)}static getColumnSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:i,floatingColumns:l,floatingLeftWidth:s,visibleColumns:u,allColumnXs:c,allColumnWidths:f,columnHeaderMaxDepth:d}=r,{allowColumnResize:g,headerSeparatorHandleSize:m}=n;if(d*i<t||!g||m<=0)return null;for(var E=e-a,h=m*.5,T=!1,O=l.length-1;O>=0;O-=1){var S,A,w=l[O],C=(S=c.get(w))!==null&&S!==void 0?S:0,N=(A=f.get(w))!==null&&A!==void 0?A:0,P=N===0;if(!T||!P){var M=C+N;P?M+=h:T&&(M-=h);var F=M-h,R=M+h;if(F<=E&&E<=R)return w;T=P}}T=!1;for(var I=u.length-1;I>=0;I-=1){var L,V,B=u[I],j=(L=c.get(B))!==null&&L!==void 0?L:0,G=(V=f.get(B))!==null&&V!==void 0?V:0,U=G===0;if(j<s-G)return null;if(!T||!U){var K=j+G;U?K+=h:T&&(K-=h);var ye=K-h,Se=K+h;if(ye<=E&&E<=Se)return B;T=U}}return null}static isItemHidden(e,t){return t.get(e)===0}static isColumnHidden(e,t){var{allColumnWidths:r}=t;return y.isItemHidden(e,r)}static isFloatingRow(e,t){if(e==null)return!1;var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a}=t;return e<r||e>=a-n}static isFloatingColumn(e,t){if(e==null)return!1;var{floatingLeftColumnCount:r,floatingRightColumnCount:n,columnCount:a}=t;return e<r||e>=a-n}static getHiddenItems(e,t,r){if(!y.isItemHidden(e,t))return[];for(var n=[e],a=r.findIndex(s=>s===e),i=a-1;i>=0;i-=1){var l=r[i];if(!y.isItemHidden(l,t))break;n.push(l)}return n}static getHiddenColumns(e,t){var{visibleColumns:r,allColumnWidths:n}=t;return y.getHiddenItems(e,n,r)}static getRowSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:i,visibleRows:l,allRowYs:s,allRowHeights:u}=r,{allowRowResize:c,headerSeparatorHandleSize:f}=n;if(a<e||!c||f<=0)return null;for(var d=t-i,g=f*.5,m=!1,E=l.length-1;E>=0;E-=1){var h,T,O=l[E],S=(h=s.get(O))!==null&&h!==void 0?h:0,A=(T=u.get(O))!==null&&T!==void 0?T:0,w=A===0;if(!m||!w){var C=S+A;w?C+=g:m&&(C-=g);var N=C-g,P=C+g;if(N<=d&&d<=P)return O;m=w}}return null}static isRowHidden(e,t){var{allRowHeights:r}=t;return y.isItemHidden(e,r)}static getHiddenRows(e,t){var{visibleRows:r,allRowHeights:n}=t;return y.getHiddenItems(e,n,r)}static moveItem(e,t,r){if(e===t)return[...r];var n=[...r],a=n[n.length-1];return a!=null&&!Q(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=J(J({},a),{},{to:t}):n.push({from:e,to:t}),n}static moveRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e[0]===e[1])return y.moveItem(e[0],t,r);var a=t;if(n&&e[0]<t&&(a-=e[1]-e[0]),e[0]===a)return[...r];var i=[...r],l=i[i.length-1];l!=null&&Q(l.from)&&l.from[1]-l.from[0]===e[1]-e[0]&&l.to===e[0]?i[i.length-1]=J(J({},l),{},{to:a}):i.push({from:e,to:a});var s=i[i.length-1];return Q(s.from)&&s.from[0]===s.to&&i.pop(),i}static moveItemOrRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Array.isArray(e)?y.moveRange(e,t,r,n):y.moveItem(e,t,r)}static applyItemMoves(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=[[e,t]],i=function(){var{from:u,to:c}=r[l],f=1,d;Q(u)?(f=u[1]-u[0]+1,[d]=u):d=u;for(var g=n?c:d,m=g+f-1,E=n?d:c,h=E-g,T=[],O=function(){var w,C,N=(w=a[S][0])!==null&&w!==void 0?w:Number.NEGATIVE_INFINITY,P=(C=a[S][1])!==null&&C!==void 0?C:Number.POSITIVE_INFINITY,M,F=[[N,g-1],[g,m],[m+1,P]].map(R=>{var[I,L]=R;return[Math.max(I,N),Math.min(L,P)]}).filter(R=>{var[I,L]=R;return I<=L}).map(R=>{var[I,L]=R;return g<=I&&m>=L?(M=[I+h,L+h],M):m<I?[I-f,L-f]:R}).map(R=>{var[I,L]=R;return E>I&&E<=L?[[I,E-1],[E+f,L+f]]:R===M?[R]:E<=I?[[I+f,L+f]]:[R]}).flat();T.push(...F)},S=0;S<a.length;S+=1)O();a=T.map(A=>{var[w,C]=A;return[Number.isFinite(w)?w:null,Number.isFinite(C)?C:null]})},l=n?r.length-1:0;n?l>=0:l<r.length;n?l-=1:l+=1)i();return a}static translateRange(e,t,r,n){for(var a=y.applyItemMoves(e.startColumn,e.endColumn,t,n),i=y.applyItemMoves(e.startRow,e.endRow,r,n),l=[],s=0;s<a.length;s+=1)for(var u=a[s],c=0;c<i.length;c+=1){var f=i[c];l.push(new p(u[0],f[0],u[1],f[1]))}return l}static getModelIndex(e,t){var r=y.applyItemMoves(e,e,t,!0)[0][0];return r}static getModelIndexes(e,t){return e.map(r=>y.getModelIndex(r,t))}static getModelRangeIndexes(e,t,r){return y.applyItemMoves(e,t,r,!0)}static getModelRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return y.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,n=[],a=0;a<e.length;a+=1)n.push(...y.getModelRange(e[a],t,r));return n}static getVisibleRangeIndexes(e,t,r){return y.applyItemMoves(e,t,r,!1)}static getVisibleRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,n=[],a=0;a<e.length;a+=1)n.push(...y.getVisibleRange(e[a],t,r));return n}static getVisibleIndex(e,t){var r=y.applyItemMoves(e,e,t)[0][0];return r}static getVisibleIndexes(e,t){return e.map(r=>y.getVisibleIndex(r,t))}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return y.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=y.getModifierKey();return e[t]}static checkColumnHidden(e,t){return t.get(e)===0}static checkAllColumnsHidden(e,t){return t.size===0?!1:e.every(r=>t.get(r)===0)}static getScrollDragBounds(e,t,r){var{gridX:n,gridY:a,width:i,height:l,floatingTopRowCount:s,floatingBottomRowCount:u,floatingLeftColumnCount:c,floatingRightColumnCount:f,floatingLeftWidth:d,floatingRightWidth:g,floatingTopHeight:m,floatingBottomHeight:E,columnCount:h,rowCount:T}=e,O=n,S=a,A=i,w=l;return r!=null&&(r>c&&(O+=d),r<h-f&&(A-=g)),t!=null&&(t>s&&(S+=m),t<T-u&&(w-=E)),{x1:O,y1:S,x2:A,y2:w}}static getScrollDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1024,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:768,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:20,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:20,{deltaX:i,deltaY:l}=e;return!y.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(i=e.deltaY,l=e.deltaX),e?.deltaMode===WheelEvent.DOM_DELTA_PAGE?(i*=t,l*=r):e?.deltaMode===WheelEvent.DOM_DELTA_LINE&&(y.isMacPlatform()?(i=Math.round(i*n),l=Math.round(l*a)):(i=Math.round(i*this.PIXELS_PER_LINE),l=Math.round(l*this.PIXELS_PER_LINE))),{deltaX:i,deltaY:l}}static compareRanges(e,t){return e[0]==null||e[1]==null||t[0]==null||t[1]==null?0:e[0]!==t[0]?e[0]-t[0]:e[1]-t[1]}static mergeSortedRanges(e){for(var t=[],r=0;r<e.length;r+=1){var n=e[r],a=n[0],i=n[1];r===0?t.push([a,i]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],i):t.push([a,i])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:i}=e,{gridX:l,gridY:s,width:u,height:c,verticalBarWidth:f,horizontalBarHeight:d}=t,g=$(l+r,l,u-f),m=$(l+a,l,u-f),E=$(s+n,s,c-d),h=$(s+i,s,c-d);return{x1:g,y1:E,x2:m,y2:h,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:i}=e,{firstColumn:l,allColumnXs:s,allColumnWidths:u,allRowYs:c,allRowHeights:f,modelRows:d,modelColumns:g}=n,{cellHorizontalPadding:m,treeDepthIndent:E,treeHorizontalPadding:h}=i,T=W(d,r),O=W(g,t),S=a.textAlignForCell(O,T),A=W(s,t),w=W(c,r),C=W(u,t),N=W(f,r),P=t===l,M=0;et(a)&&a.hasExpandableRows&&P&&(M=E*(a.depthForRow(r)+1)+h);var F=C-M,R=A+m,I=w+N*.5;return S==="right"?R=A+F-m:S==="center"&&(R=A+F*.5),R+=M,{width:F-m*2,x:R,y:I}}static findTokensWithProtocolInText(e){var t=be(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}Ee(y,"PIXELS_PER_LINE",100/3);const de=y;function ve(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function me(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(r){lt(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function lt(o,e,t){return e=it(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function it(o){var e=ut(o,"string");return typeof e=="symbol"?e:String(e)}function ut(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var st=(o,e)=>{var t=!1,r=Re(o,me(me({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r};const ft=st;function ct(o,e,t){return e=dt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=vt(o,"string");return typeof e=="symbol"?e:String(e)}function vt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var te=5e3;class mt extends Ie{constructor(){super(...arguments),ct(this,"getCachedTokensInText",ft((e,t)=>{if(t>=e.length)return de.findTokensWithProtocolInText(e);var r=e.slice(t-1,te).search(/\s/),n=t+r;r===-1&&(n=Math.min(te,e.length));var a=e.substring(0,n);return de.findTokensWithProtocolInText(a)},{max:1e4}))}get floatingTopRowCount(){return 0}get floatingBottomRowCount(){return 0}get floatingLeftColumnCount(){return 0}get floatingRightColumnCount(){return 0}get columnHeaderMaxDepth(){return 1}truncationCharForCell(e,t){}textAlignForCell(e,t){return"left"}colorForCell(e,t,r){return r.textColor}backgroundColorForCell(e,t,r){return null}colorForColumnHeader(e){return null}textForRowHeader(e){return""}textForRowFooter(e){return""}isColumnMovable(e){return!0}isRowMovable(e){return!0}getColumnHeaderGroup(e,t){}getColumnHeaderParentGroup(e,t){}tokensForCell(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:te,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}const gt=mt;function ne(o,e,t){return e=pt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function pt(o){var e=ht(o,"string");return typeof e=="symbol"?e:String(e)}function ht(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var _=[],Et=new Set;class Te extends gt{constructor(e){super(),ne(this,"dh",void 0),ne(this,"listenerCount",void 0),this.dh=e,this.listenerCount=0}addEventListener(e,t,r){super.addEventListener(e,t,r),this.listenerCount+=1,this.listenerCount===1&&this.startListening()}removeEventListener(e,t,r){super.removeEventListener(e,t,r),this.listenerCount-=1,this.listenerCount===0&&this.stopListening()}startListening(){}stopListening(){}get groupedColumns(){return _}get originalColumns(){return this.columns}sourceForCell(e,t){return{column:e,row:t}}getClearFilterRange(e){return this.isFilterable(e)?[e,e]:null}get initialMovedColumns(){return _}get initialMovedRows(){return _}get initialColumnHeaderGroups(){return _}get layoutHints(){return null}get frontColumns(){return _}get backColumns(){return _}get keyColumnSet(){return Et}get frozenColumns(){return _}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){return!1}get isRollupAvailable(){return!1}get isSelectDistinctAvailable(){return!1}get isTotalsAvailable(){return!1}get isViewportPending(){return!1}isFilterable(e){return!1}close(){}isRowMovable(){return!1}get isSeekRowAvailable(){return!1}dataBarOptionsForCell(e,t,r){throw new Error("Method not implemented.")}}ne(Te,"EVENT",Object.freeze({UPDATED:"UPDATED",FORMATTER_UPDATED:"FORMATTER_UPDATED",REQUEST_FAILED:"REQUEST_FAILED",COLUMNS_CHANGED:"COLUMNS_CHANGED",TABLE_CHANGED:"TABLE_CHANGED",FILTERS_CHANGED:"FILTERS_CHANGED",SORTS_CHANGED:"SORTS_CHANGED",DISCONNECT:"DISCONNECT",RECONNECT:"RECONNECT",TOTALS_UPDATED:"TOTALS_UPDATED",PENDING_DATA_UPDATED:"PENDING_DATA_UPDATED",VIEWPORT_UPDATED:"VIEWPORT_UPDATED"}));const Nt=Te;export{bt as C,p as G,Rt as I,Ot as L,At as S,Ct as a,Nt as b,gt as c,y as d,It as e,de as f,re as g,et as i,ft as m};
2
- //# sourceMappingURL=IrisGridModel-7ad0c8cd.js.map
1
+ import{V as we,bo as Ae,J as H,M as Oe,N as oe,r as Z,bl as Ce,aq as $,bt as be,a2 as Re,H as Ie}from"./vendor-3cc10195.js";import{x as Ne,br as Pe,J as ge,L as De,e as X,b9 as W}from"./index-29777e6c.js";import{_ as pe}from"./monaco-b5248072.js";import{a6 as Le,c as ee,af as k}from"./ControlType-ae0db8e1.js";var ae=we.forwardRef((o,e)=>{var{children:t,className:r,disabled:n,id:a,isLinked:i,isLinkedSource:l,isInvalid:s,onClick:u,onMouseEnter:c,onMouseLeave:f,style:d,"data-testid":g}=o,{UNSAFE_className:m}=Ae({},"button");return H.jsxs("button",{ref:e,type:"button",className:Oe("btn-socketed",{"btn-socketed-linked":i!==void 0&&i||l},{"btn-socketed-linked-source":l},{"is-invalid":s},r,m),id:a,onClick:u,onMouseEnter:c,onMouseLeave:f,style:d,disabled:n,"data-testid":g,children:[t,H.jsx(oe,{icon:Ne,className:"linked btn-socketed-icon",transform:"down-1"}),H.jsx(oe,{icon:Pe,className:"is-invalid btn-socketed-icon"})]})});ae.displayName="SocketedButton";ae.defaultProps={children:void 0,className:"",disabled:!1,id:void 0,isLinked:!1,isLinkedSource:!1,isInvalid:!1,onClick:void 0,onMouseEnter:void 0,onMouseLeave:void 0,style:void 0,"data-testid":void 0};const At=ae;function le(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function xe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?le(Object(t),!0).forEach(function(r){Me(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):le(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Me(o,e,t){return e=Fe(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Fe(o){var e=He(o,"string");return typeof e=="symbol"?e:String(e)}function He(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var ke=Z.lazy(()=>pe(()=>import("./Chart-93017bb0.js"),["./Chart-93017bb0.js","./vendor-3cc10195.js","./helpers-de833af9.js","./vendor-fb3fd713.css","./index-29777e6c.js","./monaco-b5248072.js","./monaco-f18fde03.css","./index-7d08f7c0.css","./Plotly-f610e3d1.js","./plotly-58c19e44.js","./ControlType-ae0db8e1.js","./ControlType-fbf3b3ed.css","./DownsamplingError-8e6bdb73.js","./useMergeRef-da6b2a92.js","./FormatterUtils-75ad9efb.js","./Chart-d34ffe5c.css"],import.meta.url));function Ot(o){return H.jsx(Z.Suspense,{fallback:H.jsx(ge,{}),children:H.jsx(ke,xe({},o))})}function ie(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function q(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ie(Object(t),!0).forEach(function(r){x(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ie(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function x(o,e,t){return e=_e(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function _e(o){var e=Be(o,"string");return typeof e=="symbol"?e:String(e)}function Be(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var z=De.module("ChartUtils"),ue="io.deephaven.time.DateTime",We=36e5,Ve=1e6;function je(o){return o.asDate!==void 0}function $e(o){return o.asNumber!==void 0}function se(o){return o.dhTimeZone!==void 0}function Xe(o){return o!=null&&o.range!=null&&(o.autorange===!1||o.autorange===void 0)}function ze(){var o=document.createElement("canvas"),e=o.getContext("webgl")||o.getContext("experimental-webgl");return e!=null&&e instanceof WebGLRenderingContext}var Ye=ze();class v{static getPlotlyErrorBars(e,t,r){var n=r.map((i,l)=>i-e[l]),a=t.map((i,l)=>e[l]-i);return{type:"data",symmetric:!1,array:n,arrayminus:a}}static convertNumberPrefix(e){return e.replace(/\u00A4\u00A4/g,"USD").replace(/\u00A4/g,"$")}static getPlotlyNumberFormat(e,t,r){if(r==null||r==="")return null;var n=r.split(";"),a=n[0].match(/^([^#,0.]*)([#,]*)([0,]*)(\.?)(0*)(#*)(E?0*)(%?)(.*)/);X(a);var[,i,l,s,,u,c,f,d,g]=a,m=s.replace(",","").length,E=l.indexOf(",")>=0||s.indexOf(",")>=0,h=E?",":"",T=f!=null&&f!==""?"e":"f",O=d!==""?d:T,S=u.length+c.length,A="",w="0".concat(m).concat(h,".").concat(S).concat(A).concat(O),C=v.convertNumberPrefix(i),N=v.convertNumberPrefix(g);return{tickformat:w,tickprefix:C,ticksuffix:N,automargin:!0}}static addTickSpacing(e,t,r){var{gapBetweenMajorTicks:n}=t;if(n!=null&&n>0){var a=e||{},i=n;return r&&(i=n/Ve),t.log&&(i=Math.log(i)),a.tickmode="linear",a.dtick=i,a}return e}static getSourceForAxis(e,t){for(var r=0;r<e.series.length;r+=1)for(var n=e.series[r],a=0;a<n.sources.length;a+=1){var i=n.sources[a];if(i.axis===t)return i}return null}static getSeriesVisibility(e,t){return t!=null&&t.hiddenSeries!=null&&t.hiddenSeries.includes(e)?"legendonly":!0}static getHiddenLabels(e){return e!=null&&e.hiddenSeries?[...e.hiddenSeries]:[]}static makeSeriesData(e,t,r,n){var a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:v.ORIENTATION.VERTICAL;return{type:e,mode:t,name:r,orientation:a,showlegend:n??void 0}}static getMarkerSymbol(e){switch(e){case"SQUARE":return"square";case"CIRCLE":return"circle";case"DIAMOND":return"diamond";case"UP_TRIANGLE":return"triangle-up";case"DOWN_TRIANGLE":return"triangle-down";case"RIGHT_TRIANGLE":return"triangle-right";case"LEFT_TRIANGLE":return"triangle-left";case"ELLIPSE":case"HORIZONTAL_RECTANGLE":case"VERTICAL_RECTANGLE":default:throw new Error("Unrecognized shape ".concat(e))}}static getAllAxes(e){return e.charts.reduce((t,r)=>[...t,...r.axes],[])}static getAxisTypeMap(e){var t=v.getAllAxes(e);return v.groupArray(t,"type")}static getChartForSeries(e,t){for(var{charts:r}=e,n=0;n<r.length;n+=1)for(var a=r[n],i=0;i<a.series.length;i+=1)if(t===a.series[i])return a;return null}static getLayoutRanges(e){for(var t={},r=Object.keys(e).filter(l=>l.indexOf("axis")>=0),n=0;n<r.length;n+=1){var a=r[n],i=e[a];Xe(i)&&(t[a]=[...i.range])}return t}static getAxisLayoutProperty(e,t){var r=t>0?"".concat(t+1):"";return"".concat(e??"","axis").concat(r)}static periodToDecimal(e){var t=e.split(":");return Number(t[0])+Number(t[1])/60}static decimalToPeriod(e){var t=Math.floor(e),r=Math.round((e-t)*60);return"".concat(t.toString().padStart(2,"0"),":").concat(r.toString().padStart(2,"0"))}static groupArray(e,t){return e.reduce((r,n)=>{var a,i=n[t],l=(a=r.get(i))!==null&&a!==void 0?a:[];return l.push(n),r.set(i,l),r},new Map)}static normalizeColorway(e){if(e!=null){if(Array.isArray(e))return e;if(typeof e=="string")return e.split(" ");z.warn("Unexpected colorway format: ".concat(e))}}static titleFromSettings(e){var{series:t,xAxis:r,title:n="".concat((t??[]).join(", ")," by ").concat(r)}=e;return n}static getTimeZoneDiff(e,t){return t?(e.standardOffset-t.standardOffset)/60:0}static createClosedRangesForPartialHoliday(e,t){var r=t.map(f=>[v.periodToDecimal(f.open),v.periodToDecimal(f.close)]);r.sort((f,d)=>f[0]-d[0]),r.length===0&&r.push([0,24]);var n=e.map(f=>[v.periodToDecimal(f.open),v.periodToDecimal(f.close)]);n.sort((f,d)=>f[0]-d[0]);for(var a=[],i=0;i<r.length;i+=1){for(var l=r[i],s=l[0],u=0;u<n.length;u+=1){var c=n[u];c[1]>s&&c[0]<l[1]&&(c[0]>s&&a.push([s,c[0]]),s=c[1])}s<l[1]&&a.push([s,l[1]])}return a}constructor(e){x(this,"dh",void 0),x(this,"daysOfWeek",void 0),this.dh=e,this.daysOfWeek=Object.freeze(e.calendar.DayOfWeek.values()),Le(this)}getAxisFormats(e,t){for(var r=new Map,n={tickformat:null,ticksuffix:null},a=v.getAllAxes(e),i=v.groupArray(a,"type"),{charts:l}=e,s=0;s<l.length;s+=1)for(var u=l[s],c=0;c<u.series.length;c+=1)for(var f=u.series[c],{sources:d}=f,g=d.filter(P=>P.axis),m=0;m<g.length;m+=1){var E=g[m],{axis:h}=E,{type:T}=h,O=i.get(T);X(O);var S=O.indexOf(h),A=this.getAxisPropertyName(T);if(A!=null){var w=v.getAxisLayoutProperty(A,S);if(r.has(w))z.debug("".concat(w," already added."));else{z.debug("Adding ".concat(w," to axisFormats."));var C=this.getPlotlyAxisFormat(E,t);if(C===null)r.set(w,n);else{r.set(w,C);var{businessCalendar:N}=h;if(N!=null&&(C.rangebreaks=this.createRangeBreaksFromBusinessCalendar(N,t)),r.size===u.axes.length)return r}}}}return r}getPlotlyChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.SCATTER:case n.plot.SeriesPlotStyle.LINE:return!t&&Ye&&r?"scattergl":"scatter";case n.plot.SeriesPlotStyle.BAR:case n.plot.SeriesPlotStyle.STACKED_BAR:return"bar";case n.plot.SeriesPlotStyle.PIE:return"pie";case n.plot.SeriesPlotStyle.TREEMAP:return"treemap";case n.plot.SeriesPlotStyle.HISTOGRAM:return"histogram";case n.plot.SeriesPlotStyle.OHLC:return"ohlc";default:return}}getPlotlyChartMode(e,t,r){var{dh:n}=this,a=new Set;switch(e){case n.plot.SeriesPlotStyle.SCATTER:(t??!1)&&a.add(v.MODE_LINES),(r??!0)&&a.add(v.MODE_MARKERS);break;case n.plot.SeriesPlotStyle.LINE:(t??!0)&&a.add(v.MODE_LINES),(r??!1)&&a.add(v.MODE_MARKERS);break}return a.size>0?[...a].join("+"):void 0}getPlotlyProperty(e,t){var{dh:r}=this;switch(e){case r.plot.SeriesPlotStyle.PIE:switch(t){case r.plot.SourceType.X:return"labels";case r.plot.SourceType.Y:return"values"}break;case r.plot.SeriesPlotStyle.OHLC:switch(t){case r.plot.SourceType.TIME:return"x"}break;case r.plot.SeriesPlotStyle.TREEMAP:switch(t){case r.plot.SourceType.X:return"ids";case r.plot.SourceType.Y:return"values";case r.plot.SourceType.LABEL:return"labels";case r.plot.SourceType.PARENT:return"parents";case r.plot.SourceType.COLOR:return"marker.colors"}break}switch(t){case r.plot.SourceType.X:return"x";case r.plot.SourceType.Y:return"y";case r.plot.SourceType.Z:return"z";case r.plot.SourceType.X_LOW:return"xLow";case r.plot.SourceType.X_HIGH:return"xHigh";case r.plot.SourceType.Y_LOW:return"yLow";case r.plot.SourceType.Y_HIGH:return"yHigh";case r.plot.SourceType.TIME:return"time";case r.plot.SourceType.OPEN:return"open";case r.plot.SourceType.HIGH:return"high";case r.plot.SourceType.LOW:return"low";case r.plot.SourceType.CLOSE:return"close";case r.plot.SourceType.SHAPE:return"shape";case r.plot.SourceType.SIZE:return"size";case r.plot.SourceType.LABEL:return"label";case r.plot.SourceType.COLOR:return"color";case r.plot.SourceType.PARENT:return"parent";case r.plot.SourceType.HOVER_TEXT:return"hovertext";case r.plot.SourceType.TEXT:return"text";default:throw new Error("Unrecognized source type: ".concat(t))}}getPlotlySeriesOrientation(e){var t,r,{dh:n}=this,{sources:a}=e;return a.length===2&&((t=a[0])===null||t===void 0||(r=t.axis)===null||r===void 0?void 0:r.type)===n.plot.AxisType.Y?v.ORIENTATION.HORIZONTAL:v.ORIENTATION.VERTICAL}makeSeriesDataFromSeries(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:!0,{name:i,isLinesVisible:l,isShapesVisible:s,plotStyle:u,lineColor:c,shapeColor:f,sources:d,shape:g,shapeSize:m}=e,E=d.some(A=>{var w;return(w=A.axis)===null||w===void 0?void 0:w.businessCalendar}),h=this.getChartType(u,E,a),T=this.getPlotlyChartMode(u,l??void 0,s??void 0),O=this.getPlotlySeriesOrientation(e),S=v.makeSeriesData(h,T,i,n,O);return this.addSourcesToSeriesData(S,u,d,t),this.addStylingToSeriesData(S,u,c,f,g,m,r),S}addSourcesToSeriesData(e,t,r,n){for(var a=e,i=0;i<r.length;i+=1){var l=r[i],{axis:s,type:u}=l,c=this.getPlotlyProperty(t,u);Ce(a,c,[]);var f=s!=null?this.getAxisPropertyName(s.type):null;if(f!=null){var d=n.get(s.type);if(d){var g=d.indexOf(s),m=g>0?"".concat(g+1):"";a["".concat(f,"axis")]="".concat(f).concat(m)}}}}addStylingToSeriesData(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:null,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:null,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:null,l=arguments.length>6&&arguments[6]!==void 0?arguments[6]:null,{dh:s}=this,u=e;if(u.marker={line:{}},u.line={width:1},t===s.plot.SeriesPlotStyle.AREA?u.fill="tozeroy":t===s.plot.SeriesPlotStyle.STACKED_AREA?u.stackgroup="stack":t===s.plot.SeriesPlotStyle.STEP?u.line.shape="hv":t===s.plot.SeriesPlotStyle.HISTOGRAM?u.width=[]:t===s.plot.SeriesPlotStyle.PIE?u.textinfo="label+percent":t===s.plot.SeriesPlotStyle.TREEMAP&&(u.hoverinfo="text",u.textinfo="label+text",u.tiling={packing:"squarify",pad:0},u.textposition="middle center"),r!=null&&(t===s.plot.SeriesPlotStyle.BAR?u.marker.color=r:u.line.color=r),n!=null&&(u.marker.color=n),a!=null&&a.length>0)try{u.marker.symbol=v.getMarkerSymbol(a)}catch(c){z.warn("Unable to handle shape",a,":",c)}i!=null&&(u.marker.size=i*v.DEFAULT_MARKER_SIZE),l!=null&&t!==s.plot.SeriesPlotStyle.PIE&&(u.visible=l)}getChartType(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!0,{dh:n}=this;switch(e){case n.plot.SeriesPlotStyle.HISTOGRAM:return"bar";default:return this.getPlotlyChartType(e,t,r)}}getAxisPropertyName(e){var{dh:t}=this;switch(e){case t.plot.AxisType.X:return"x";case t.plot.AxisType.Y:return"y";default:return null}}getAxisSide(e){var{dh:t}=this;switch(e){case t.plot.AxisPosition.BOTTOM:return"bottom";case t.plot.AxisPosition.TOP:return"top";case t.plot.AxisPosition.LEFT:return"left";case t.plot.AxisPosition.RIGHT:return"right";default:return}}updateFigureAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=e,l=v.getAllAxes(t),s=0;s<t.charts.length;s+=1){var u=t.charts[s],c=r?.(u),f=this.getChartBounds(t,u,n,a);this.updateLayoutAxes(i,u.axes,l,n,a,f,c)}this.removeStaleAxes(i,l)}getChartBounds(e,t,r,n){var a,{dh:i}=this,{cols:l,rows:s}=e,{column:u,colspan:c,row:f,rowspan:d}=t,g=u+c,m=f+d,E=1/l,h=1/s,T=v.AXIS_SIZE_PX/r,O=v.AXIS_SIZE_PX/n,S={bottom:(s-m)*h+(m<s?O/2:0),top:(s-f)*h-(f>0?O/2:0),left:u*E+(u>0?T/2:0),right:g*E-(g<l?T/2:0)},A=v.groupArray(t.axes,"position"),w=(a=A.get(i.plot.AxisPosition.RIGHT))!==null&&a!==void 0?a:[];return w.length>0&&(r>0?S.right-=(S.right-S.left)*Math.max(0,Math.min(v.LEGEND_WIDTH_PX/r,v.MAX_LEGEND_SIZE)):S.right-=(S.right-S.left)*v.DEFAULT_AXIS_SIZE),S}getPlotlyDateFormat(e,t,r){var{dh:n}=this,a=r?.replace("%","%%").replace(/S{9}/g,"%9f").replace(/S{8}/g,"%8f").replace(/S{7}/g,"%7f").replace(/S{6}/g,"%6f").replace(/S{5}/g,"%5f").replace(/S{4}/g,"%4f").replace(/S{3}/g,"%3f").replace(/S{2}/g,"%2f").replace(/S{1}/g,"%1f").replace(/y{4}/g,"%Y").replace(/y{2}/g,"%y").replace(/M{4}/g,"%B").replace(/M{3}/g,"%b").replace(/M{2}/g,"%m").replace(/M{1}/g,"%-m").replace(/E{4,}/g,"%A").replace(/E{1,}/g,"%a").replace(/d{2}/g,"%d").replace(/([^%]|^)d{1}/g,"$1%-d").replace(/H{2}/g,"%H").replace(/h{2}/g,"%I").replace(/h{1}/g,"%-I").replace(/m{2}/g,"%M").replace(/s{2}/g,"%S").replace("'T'","T").replace(" z",""),i,l=e?.getColumnTypeFormatter(t);return l!=null&&se(l)&&l.dhTimeZone!=null&&l.showTimeZone&&(i=n.i18n.DateTimeFormat.format(" z",new Date,l.dhTimeZone)),{tickformat:a,ticksuffix:i,automargin:!0}}getPlotlyAxisFormat(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,{dh:r}=this,{axis:n,columnType:a}=e,{formatPattern:i}=n,l=null;return ee.isDateType(a)?(l=this.getPlotlyDateFormat(t,a,i),l=v.addTickSpacing(l,n,!0)):ee.isNumberType(a)&&(l=v.getPlotlyNumberFormat(t,a,i),l=v.addTickSpacing(l,n,!1)),n.formatType===r.plot.AxisFormatType.CATEGORY&&(l?l.type="category":l={type:"category",tickformat:void 0,ticksuffix:void 0}),l}updateLayoutAxes(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:0,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:0,i=arguments.length>5&&arguments[5]!==void 0?arguments[5]:{left:0,top:0,right:1,bottom:1},l=arguments.length>6?arguments[6]:void 0,{dh:s}=this,u=n>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/a,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,c=a>0?Math.max(v.MIN_AXIS_SIZE,Math.min(v.AXIS_SIZE_PX/n,v.MAX_AXIS_SIZE)):v.DEFAULT_AXIS_SIZE,f=e,d=v.groupArray(t,"position"),g=v.groupArray(t,"type"),m=[...g.keys()],E=v.groupArray(r,"type"),h=0;h<m.length;h+=1){var T=m[h],O=this.getAxisPropertyName(T);if(O!=null){var S=g.get(T),A=E.get(T),w=T===s.plot.AxisType.Y,C=w?a:n;X(S),X(A);for(var N=0;N<S.length;N+=1){var P=S[N],M=A.indexOf(P),F=v.getAxisLayoutProperty(O,M);f[F]==null&&(f[F]={});var R=f[F];if(R!=null){this.updateLayoutAxis(R,P,N,d,u,c,i);var{range:I,autorange:L}=R;if(l!=null&&I!==void 0&&(L===void 0||L===!1)){var V=l(P),[B,j]=V(I);z.debug("Setting downsample range",C,B,j),P.range(C,B,j)}else P.range(C)}}}}}removeStaleAxes(e,t){for(var r=e,n=v.groupArray(t,"type"),a=[...n.keys()],i=0;i<a.length;i+=1){var l=a[i],s=n.get(l);X(s);var u=s.length,c=this.getAxisPropertyName(l);if(c!=null)for(var f=v.getAxisLayoutProperty(c,u);r[f]!=null;)delete r[f],u+=1,f=v.getAxisLayoutProperty(c,u)}}updateLayoutAxis(e,t,r,n,a,i,l){var s,{dh:u}=this,c=t.type===u.plot.AxisType.Y,f=c?i:a,d=e,g=(s=t.label)!==null&&s!==void 0?s:"";if(d.title!==void 0&&typeof d.title!="string"?d.title.text=g:d.title={text:g},t.log&&(d.type="log"),d.side=this.getAxisSide(t.position),r>0){var m,E;d.overlaying=(m=this.getAxisPropertyName(t.type))!==null&&m!==void 0?m:void 0;var h=(E=n.get(t.position))!==null&&E!==void 0?E:[],T=h.indexOf(t);T>0&&(d.anchor="free",t.position===u.plot.AxisPosition.RIGHT?d.position=l.right+(T-h.length+1)*f:t.position===u.plot.AxisPosition.TOP?d.position=l.top+(T-h.length+1)*f:t.position===u.plot.AxisPosition.BOTTOM?d.position=l.bottom+(h.length-T+1)*f:t.position===u.plot.AxisPosition.LEFT&&(d.position=l.left+(h.length-T+1)*f))}else if(t.type===u.plot.AxisType.X){var O=n.get(u.plot.AxisPosition.LEFT)||[],S=n.get(u.plot.AxisPosition.RIGHT)||[],A=Math.max(l.left,l.left+(O.length-1)*i),w=Math.min(l.right-(S.length-1)*i,l.right);d.domain=[A,w]}else if(t.type===u.plot.AxisType.Y){var C=n.get(u.plot.AxisPosition.BOTTOM)||[],N=n.get(u.plot.AxisPosition.TOP)||[],P=Math.max(l.bottom,l.bottom+(C.length-1)*a),M=Math.min(l.top-(N.length-1)*a,l.top);d.domain=[P,M]}}createBoundsFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0;if(e.length===0)return[];for(var r=e.map(s=>[(v.periodToDecimal(s.open)+t)%24,(v.periodToDecimal(s.close)+t)%24]).sort((s,u)=>s[0]-u[0]),n=[],a=0;a<r.length;a+=1){var i=r[a],l=r[(a+1)%r.length];n.push([i[1],l[0]])}return n}createBreaksFromPeriods(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:0,r=this.createBoundsFromPeriods(e,t);return r.map(n=>({pattern:"hour",bounds:n}))}createBoundsFromDays(e){var t=this.daysOfWeek.length;if(e.length===t)return[];for(var r=e.map(s=>this.daysOfWeek.indexOf(s)),n=new Set(r),a=new Set,i=0;i<t;i+=1)!n.has(i)&&n.has((i-1+t)%t)&&a.add(i);var l=[];return a.forEach(s=>{for(var u=0;u<t;u+=1){var c=(s+u)%t;if(n.has(c)){l.push([s,c]);return}}throw new Error("Unable to find open day for closed day ".concat(s,", businessDays: ").concat(e))}),l}createBreaksFromDays(e){var t=this.createBoundsFromDays(e);return t.map(r=>({pattern:"day of week",bounds:r}))}createRangeBreaksFromBusinessCalendar(e,t){var r=[],{businessPeriods:n,businessDays:a,holidays:i,timeZone:l}=e,s=t?.getColumnTypeFormatter(ue),u;se(s)&&(u=s.dhTimeZone);var c=v.getTimeZoneDiff(l,u);return i.length>0&&r.push(...this.createRangeBreakValuesFromHolidays(i,l,u,e)),r.push(...this.createBreaksFromPeriods(n,c)),r.push(...this.createBreaksFromDays(a)),r}createRangeBreakValuesFromHolidays(e,t,r,n){var a=[],i=[];return e.forEach(l=>{l.businessPeriods.length>0?i.push(...this.createPartialHoliday(l,t,r,n)):a.push(this.createFullHoliday(l,t,r))}),[{values:a},...i]}createFullHoliday(e,t,r){return this.adjustDateForTimeZone("".concat(e.date.toString()," 00:00:00.000000"),t,r)}createPartialHoliday(e,t,r,n){var a;if(e.businessPeriods.length===0)return[];var i=e.date.toString();if(n){var l=new Date(i).getDay(),s=n.businessDays.includes(this.daysOfWeek[l]);if(!s)return[]}for(var u=v.createClosedRangesForPartialHoliday(e.businessPeriods,(a=n?.businessPeriods)!==null&&a!==void 0?a:[]),c=[],f=0;f<u.length;f+=1){var[d,g]=u[f];if(d!==g){var m=[this.adjustDateForTimeZone("".concat(i," ").concat(v.decimalToPeriod(d),":00.000000"),t,r)],E=We*(g-d);c.push({values:m,dvalue:E})}}return c}adjustDateForTimeZone(e,t,r){return r&&r.standardOffset!==t.standardOffset?this.unwrapValue(this.wrapValue(e,ue,t),r):e}makeFigureSettings(e,t){var{dh:r}=this,{series:n,xAxis:a,type:i}=e,l=v.titleFromSettings(e),s={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.X),position:"".concat(r.plot.AxisPosition.BOTTOM)},u={formatType:"".concat(r.plot.AxisFormatType.NUMBER),type:"".concat(r.plot.AxisType.Y),position:"".concat(r.plot.AxisPosition.LEFT)};return{charts:[{chartType:"".concat(r.plot.ChartType.XY),axes:[s,u],series:(n??[]).map(c=>({plotStyle:"".concat(i),name:c,dataSources:[{type:"".concat(r.plot.SourceType.X),columnName:a??"",axis:s,table:t},{type:"".concat(r.plot.SourceType.Y),columnName:c,axis:u,table:t}]}))}],title:l}}unwrapValue(e,t){var{dh:r}=this;if(e!=null){if(je(e))return r.i18n.DateTimeFormat.format(v.DATE_FORMAT,e,t);if($e(e))return e.asNumber()}return e}wrapValue(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,{dh:n}=this;if(ee.isDateType(t)&&typeof e=="string"){var a=e,i=v.DATE_FORMAT.substr(0,e.length),l=n.i18n.DateTimeFormat.parse(i,a);if(!r)return l;var s="".concat(i," Z"),u=n.i18n.DateTimeFormat.format("Z",l,r),c=n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(u)),f=n.i18n.DateTimeFormat.format("Z",c,r);return n.i18n.DateTimeFormat.parse(s,"".concat(a," ").concat(f))}return e}makeLayoutAxis(e,t){var{dh:r}=this,n={automargin:!0,gridcolor:t.gridcolor,linecolor:t.linecolor,rangeslider:{visible:!1},showline:!0,ticks:"outside",ticklen:5,tickcolor:t.paper_bgcolor,tickfont:{color:t.zerolinecolor},title:{font:{color:t.title_color}},legend:{font:{color:t.legend_color}}};return e===r.plot.AxisType.X?Object.assign(n,{showgrid:!0}):e===r.plot.AxisType.Y&&Object.assign(n,{zerolinecolor:t.zerolinecolor,zerolinewidth:2}),n}makeDefaultTemplate(e){var{error_band_line_color:t,ohlc_increasing:r,ohlc_decreasing:n,title_color:a}=e;return{data:{bar:[{marker:{line:{color:"transparent"}}}],scatter:[{error_x:{color:t},error_y:{color:t}}],ohlc:[{increasing:{line:{color:r}},decreasing:{line:{color:n}}}],pie:[{outsidetextfont:{color:a}}],treemap:[{outsidetextfont:{color:a}}]},layout:this.makeDefaultLayout(e)}}makeDefaultLayout(e){var{dh:t}=this,{paper_bgcolor:r,plot_bgcolor:n,title_color:a,coastline_color:i,land_color:l,ocean_color:s,lake_color:u,river_color:c}=e,f={paper_bgcolor:r,plot_bgcolor:n,autosize:!0,colorway:v.normalizeColorway(e?.colorway),font:{family:"'Fira Sans', sans-serif",color:a},title:{font:{color:a},xanchor:"center",xref:"paper",yanchor:"top",pad:q({},v.DEFAULT_TITLE_PADDING),y:1},legend:{font:{color:a}},margin:q({},v.DEFAULT_MARGIN),xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),polar:{angularaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),radialaxis:this.makeLayoutAxis(t.plot.AxisType.SHAPE,e),bgcolor:e.plot_bgcolor},scene:{xaxis:this.makeLayoutAxis(t.plot.AxisType.X,e),yaxis:this.makeLayoutAxis(t.plot.AxisType.Y,e),zaxis:this.makeLayoutAxis(null,e)},geo:{showcoastlines:!0,showframe:!1,showland:!0,showocean:!0,showlakes:!0,showrivers:!0,bgcolor:r,coastlinecolor:i,landcolor:l,oceancolor:s,lakecolor:u,rivercolor:c}};return f.datarevision=0,f}hydrateSettings(e){var{dh:t}=this;return q(q({},e),{},{type:e.type!=null?t.plot.SeriesPlotStyle[e.type]:void 0})}}x(v,"DEFAULT_AXIS_SIZE",.15);x(v,"MIN_AXIS_SIZE",.025);x(v,"MAX_AXIS_SIZE",.2);x(v,"AXIS_SIZE_PX",75);x(v,"LEGEND_WIDTH_PX",50);x(v,"MAX_LEGEND_SIZE",.25);x(v,"ORIENTATION",Object.freeze({HORIZONTAL:"h",VERTICAL:"v"}));x(v,"DATE_FORMAT","yyyy-MM-dd HH:mm:ss.SSSSSS");x(v,"DEFAULT_MARGIN",Object.freeze({l:60,r:50,t:30,b:60,pad:0}));x(v,"DEFAULT_TITLE_PADDING",Object.freeze({t:8}));x(v,"SUBTITLE_LINE_HEIGHT",25);x(v,"DEFAULT_MARKER_SIZE",6);x(v,"MODE_MARKERS","markers");x(v,"MODE_LINES","lines");const Ct=v;function D(o,e,t){return e=Ze(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Ze(o){var e=Ke(o,"string");return typeof e=="symbol"?e:String(e)}function Ke(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}class b{constructor(e){D(this,"dh",void 0),D(this,"listeners",void 0),D(this,"formatter",void 0),D(this,"renderOptions",void 0),D(this,"rect",void 0),D(this,"isDownsamplingDisabled",void 0),D(this,"title",void 0),this.dh=e,this.listeners=[],this.isDownsamplingDisabled=!1}getData(){return[]}getDefaultTitle(){return""}getLayout(){return{}}getFilterColumnMap(){return new Map}isFilterRequired(){return!1}setFilter(e){}close(){}setFormatter(e){this.formatter=e}setRenderOptions(e){this.renderOptions=e}setDownsamplingDisabled(e){this.isDownsamplingDisabled=e}setDimensions(e){this.rect=e}setTitle(e){this.title=e}subscribe(e){this.listeners.push(e)}unsubscribe(e){this.listeners=this.listeners.filter(t=>t!==e)}fireEvent(e){for(var t=0;t<this.listeners.length;t+=1)this.listeners[t](e)}fireUpdate(e){this.fireEvent(new CustomEvent(b.EVENT_UPDATED,{detail:e}))}fireDisconnect(){this.fireEvent(new CustomEvent(b.EVENT_DISCONNECT))}fireReconnect(){this.fireEvent(new CustomEvent(b.EVENT_RECONNECT))}fireDownsampleStart(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLESTARTED,{detail:e}))}fireDownsampleFinish(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLEFINISHED,{detail:e}))}fireDownsampleFail(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLEFAILED,{detail:e}))}fireDownsampleNeeded(e){this.fireEvent(new CustomEvent(b.EVENT_DOWNSAMPLENEEDED,{detail:e}))}fireLoadFinished(){this.fireEvent(new CustomEvent(b.EVENT_LOADFINISHED))}fireError(e){this.fireEvent(new CustomEvent(b.EVENT_ERROR,{detail:e}))}fireBlocker(e){this.fireEvent(new CustomEvent(b.EVENT_BLOCKER,{detail:e}))}fireBlockerClear(){this.fireEvent(new CustomEvent(b.EVENT_BLOCKER_CLEAR))}fireLayoutUpdated(e){this.fireEvent(new CustomEvent(b.EVENT_LAYOUT_UPDATED,{detail:e}))}}D(b,"EVENT_UPDATED","ChartModel.EVENT_UPDATED");D(b,"EVENT_DISCONNECT","ChartModel.EVENT_DISCONNECT");D(b,"EVENT_RECONNECT","ChartModel.EVENT_RECONNECT");D(b,"EVENT_DOWNSAMPLESTARTED","ChartModel.EVENT_DOWNSAMPLESTARTED");D(b,"EVENT_DOWNSAMPLEFINISHED","ChartModel.EVENT_DOWNSAMPLEFINISHED");D(b,"EVENT_DOWNSAMPLEFAILED","ChartModel.EVENT_DOWNSAMPLEFAILED");D(b,"EVENT_DOWNSAMPLENEEDED","ChartModel.EVENT_DOWNSAMPLENEEDED");D(b,"EVENT_LOADFINISHED","ChartModel.EVENT_LOADFINISHED");D(b,"EVENT_ERROR","ChartModel.EVENT_ERROR");D(b,"EVENT_BLOCKER","ChartModel.EVENT_BLOCKER");D(b,"EVENT_BLOCKER_CLEAR","ChartModel.EVENT_BLOCKER_CLEAR");D(b,"EVENT_LAYOUT_UPDATED","ChartModel.EVENT_LAYOUT_UPDATED");const bt=b;function fe(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function qe(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?fe(Object(t),!0).forEach(function(r){Qe(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):fe(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Qe(o,e,t){return e=Je(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function Je(o){var e=Ge(o,"string");return typeof e=="symbol"?e:String(e)}function Ge(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var Ue=Z.lazy(()=>pe(()=>import("./IrisGrid-6dac5f07.js"),["./IrisGrid-6dac5f07.js","./vendor-3cc10195.js","./helpers-de833af9.js","./vendor-fb3fd713.css","./index-29777e6c.js","./monaco-b5248072.js","./monaco-f18fde03.css","./index-7d08f7c0.css","./ControlType-ae0db8e1.js","./ControlType-fbf3b3ed.css","./MissingPartitionError-588bc1a3.js","./FormatterUtils-75ad9efb.js","./IrisGridThemeProvider-31b8442c.js","./IrisGridShortcuts-a0e50c5e.js","./IrisGridShortcuts-7cf07b0f.css","./TokenBoxCellRenderer-7992cbdf.js","./useMergeRef-da6b2a92.js","./TokenBoxCellRenderer-d8e9a802.css","./IrisGridThemeProvider-15ce00be.css","./Grid-3bb94eca.js","./Grid-6b71b6c4.css","./IrisGrid-4424e8a8.css"],import.meta.url)),he=Z.forwardRef((o,e)=>H.jsx(Z.Suspense,{fallback:H.jsx(ge,{}),children:H.jsx(Ue,qe({ref:e},o))}));he.displayName="LazyIrisGrid";const Rt=he;function et(o){return o?.hasExpandableRows!==void 0}function Y(o,e,t){return e=tt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function tt(o){var e=rt(o,"string");return typeof e=="symbol"?e:String(e)}function rt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var re;(function(o){o.DOWN="DOWN",o.UP="UP",o.LEFT="LEFT",o.RIGHT="RIGHT"})(re||(re={}));class p{static normalize(e,t,r,n){var a=e,i=t,l=r,s=n;return a!=null&&l!=null&&l<a&&(a=l,l=e),i!=null&&s!=null&&s<i&&(i=s,s=t),[a,i,l,s]}static makeNormalized(e,t,r,n){return new p(...p.normalize(e,t,r,n))}static makeCell(e,t){return new p(e,t,e,t)}static makeColumn(e){return new p(e,null,e,null)}static makeRow(e){return new p(null,e,null,e)}static minOrNull(e,t){return e==null||t==null?null:Math.min(e,t)}static maxOrNull(e,t){return e==null||t==null?null:Math.max(e,t)}static consolidate(e){for(var t=e.slice(),r=!0;r;){r=!1;for(var n=0;n<t.length&&!r;n+=1)for(var a=t[n],i=t.length-1;i>n;i-=1){var l=t[i];if(a.contains(l))t.splice(i,1);else if(l.contains(a)){r=!0,t[n]=l,t.splice(i,1);break}else if(a.startRow===l.startRow&&a.endRow===l.endRow){if(a.touches(l)){var{startRow:s,endRow:u}=a,c=p.minOrNull(a.startColumn,l.startColumn),f=p.maxOrNull(a.endColumn,l.endColumn);r=!0,t[n]=new p(c,s,f,u),t.splice(i,1);break}}else if(a.startColumn===l.startColumn&&a.endColumn===l.endColumn&&a.touches(l)){var{startColumn:d,endColumn:g}=a,m=p.minOrNull(a.startRow,l.startRow),E=p.maxOrNull(a.endRow,l.endRow);r=!0,t[n]=new p(d,m,g,E),t.splice(i,1);break}}}return t}static isAxisRangeTouching(e,t,r,n){return e==null?t==null||r==null?!0:r<=t+1:t==null?n==null?!0:n>=e-1:r==null?n==null?!0:e<=n+1:n==null?t>=r-1:r>=e-1?r<=t+1:n>=e-1}static rangeArraysEqual(e,t){if(e===t)return!0;if(e==null||t==null||e.length!==t.length)return!1;for(var r=0;r<e.length;r+=1)if(!e[r].equals(t[r]))return!1;return!0}static intersection(e,t){var r,n,a,i,l,s;if(e.equals(t))return e;var{startColumn:u,startRow:c,endColumn:f,endRow:d}=e;return u=u!=null&&t.startColumn!=null?Math.max(u,t.startColumn):(r=u)!==null&&r!==void 0?r:t.startColumn,f=f!=null&&t.endColumn!=null?Math.min(f,t.endColumn):(n=f)!==null&&n!==void 0?n:t.endColumn,c=c!=null&&t.startRow!=null?Math.max(c,t.startRow):(a=c)!==null&&a!==void 0?a:t.startRow,d=d!=null&&t.endRow!=null?Math.min(d,t.endRow):(i=d)!==null&&i!==void 0?i:t.endRow,u!=null&&u>((l=f)!==null&&l!==void 0?l:-1)||c!=null&&c>((s=d)!==null&&s!==void 0?s:-1)?null:new p(u,c,f,d)}static subtractFromRange(e,t){var r=[],n=p.intersection(e,t);return n==null?[e]:(n.startRow!=null&&(e.startRow==null||e.startRow<n.startRow)&&r.push(new p(e.startColumn,e.startRow,e.endColumn,n.startRow-1)),n.startColumn!=null&&(e.startColumn==null||e.startColumn<n.startColumn)&&r.push(new p(e.startColumn,n.startRow,n.startColumn-1,n.endRow)),n.endColumn!=null&&(e.endColumn==null||e.endColumn>n.endColumn)&&r.push(new p(n.endColumn+1,n.startRow,e.endColumn,n.endRow)),n.endRow!=null&&(e.endRow==null||e.endRow>n.endRow)&&r.push(new p(e.startColumn,n.endRow+1,e.endColumn,e.endRow)),r)}static subtractFromRanges(e,t){for(var r=[],n=0;n<e.length;n+=1)r.push(...p.subtractFromRange(e[n],t));return r}static subtractRangesFromRanges(e,t){for(var r=[...e],n=0;n<t.length;n+=1)r=p.subtractFromRanges(r,t[n]);return r}static isBounded(e){return e.startRow!=null&&e.startColumn!=null&&e.endRow!=null&&e.endColumn!=null}static boundedRange(e,t,r){var n,a,i,l;return p.isBounded(e)?e:new p((n=e.startColumn)!==null&&n!==void 0?n:0,(a=e.startRow)!==null&&a!==void 0?a:0,(i=e.endColumn)!==null&&i!==void 0?i:t-1,(l=e.endRow)!==null&&l!==void 0?l:r-1)}static boundedRanges(e,t,r){return e.map(n=>p.boundedRange(n,t,r))}static offset(e,t,r){return new p(e.startColumn!=null?e.startColumn+t:null,e.startRow!=null?e.startRow+r:null,e.endColumn!=null?e.endColumn+t:null,e.endRow!=null?e.endRow+r:null)}static nextCell(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:null,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:null,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:p.SELECTION_DIRECTION.DOWN;if(e.length===0)return null;var a=-1;if(t!=null&&r!=null&&(a=e.findIndex(d=>d.containsCell(t,r)),a>=0)){var i=e[a],l=i.nextCell(t,r,n);if(l!=null)return l}switch(n){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:{var s=a<e.length-1?a+1:0,u=e[s];return u.startCell(n)}case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:{var c=a>0?a-1:e.length-1,f=e[c];return f.startCell(n)}default:throw new Error("Invalid direction: ".concat(n))}}static cellCount(e){return e.reduce((t,r)=>{var n,a,i,l;return t+(((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1)*(((i=r.endColumn)!==null&&i!==void 0?i:NaN)-((l=r.startColumn)!==null&&l!==void 0?l:NaN)+1)},0)}static rowCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endRow)!==null&&n!==void 0?n:NaN)-((a=r.startRow)!==null&&a!==void 0?a:NaN)+1},0)}static columnCount(e){return e.reduce((t,r)=>{var n,a;return t+((n=r.endColumn)!==null&&n!==void 0?n:NaN)-((a=r.startColumn)!==null&&a!==void 0?a:NaN)+1},0)}static containsCell(e,t,r){for(var n=0;n<e.length;n+=1){var a=e[n];if(a.containsCell(t,r))return!0}return!1}static forEachCell(e,t){for(var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:p.SELECTION_DIRECTION.RIGHT,n=0;n<e.length;n+=1)e[n].forEach(t,r)}constructor(e,t,r,n){Y(this,"startColumn",void 0),Y(this,"startRow",void 0),Y(this,"endColumn",void 0),Y(this,"endRow",void 0),this.startColumn=e,this.startRow=t,this.endColumn=r,this.endRow=n}equals(e){return this.startColumn===e.startColumn&&this.startRow===e.startRow&&this.endColumn===e.endColumn&&this.endRow===e.endRow}contains(e){return(this.startColumn==null||e.startColumn!=null&&this.startColumn<=e.startColumn)&&(this.startRow==null||e.startRow!=null&&this.startRow<=e.startRow)&&(this.endColumn==null||e.endColumn!=null&&this.endColumn>=e.endColumn)&&(this.endRow==null||e.endRow!=null&&this.endRow>=e.endRow)}containsCell(e,t){return e==null||t==null?!1:(this.startColumn==null||this.startColumn<=e)&&(this.endColumn==null||this.endColumn>=e)&&(this.startRow==null||this.startRow<=t)&&(this.endRow==null||this.endRow>=t)}touches(e){return p.isAxisRangeTouching(this.startRow,this.endRow,e.startRow,e.endRow)&&p.isAxisRangeTouching(this.startColumn,this.endColumn,e.startColumn,e.endColumn)}subtract(e){return p.subtractFromRange(this,e)}startCell(){var e=arguments.length>0&&arguments[0]!==void 0?arguments[0]:p.SELECTION_DIRECTION.DOWN;if(!p.isBounded(this))throw new Error("Cannot get the startCell of an unbounded range");switch(e){case p.SELECTION_DIRECTION.DOWN:case p.SELECTION_DIRECTION.RIGHT:return{column:this.startColumn,row:this.startRow};case p.SELECTION_DIRECTION.LEFT:case p.SELECTION_DIRECTION.UP:return{column:this.endColumn,row:this.endRow};default:throw new Error("Invalid direction: ".concat(e))}}nextCell(e,t,r){if(!p.isBounded(this))throw new Error("Bounded range required");if(e==null||t==null)throw new Error("Require a non-null cursor");var{startColumn:n,endColumn:a,startRow:i,endRow:l}=this;switch(r){case p.SELECTION_DIRECTION.DOWN:if(t<l)return{column:e,row:Math.max(t+1,i)};if(e<a)return{column:Math.max(e+1,n),row:i};break;case p.SELECTION_DIRECTION.UP:if(t>i)return{column:e,row:Math.min(t-1,l)};if(e>n)return{column:Math.min(e-1,a),row:l};break;case p.SELECTION_DIRECTION.RIGHT:if(e<a)return{column:Math.max(e+1,n),row:t};if(t<l)return{column:n,row:Math.max(t+1,i)};break;case p.SELECTION_DIRECTION.LEFT:if(e>n)return{column:Math.min(e-1,a),row:t};if(t>i)return{column:a,row:Math.min(t-1,l)};break;default:throw new Error("Invalid direction: ".concat(r))}return null}forEach(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:p.SELECTION_DIRECTION.RIGHT,r=0,{column:n,row:a}=this.startCell(t);n!=null&&a!=null;){var i;e(n,a,r),r+=1,{column:n,row:a}=(i=this.nextCell(n,a,t))!==null&&i!==void 0?i:{}}}}Y(p,"SELECTION_DIRECTION",re);function nt(o){return Array.isArray(o)&&o.length===2&&(o[0]===null||typeof o[0]=="number")&&(o[1]===null||typeof o[1]=="number")}function Q(o){return nt(o)&&o[0]!=null&&o[1]!=null}function ce(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function J(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ce(Object(t),!0).forEach(function(r){Ee(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ce(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function Ee(o,e,t){return e=at(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function at(o){var e=ot(o,"string");return typeof e=="symbol"?e:String(e)}function ot(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}function It(o){return o?.href!==void 0}class y{static getGridPointFromXY(e,t,r){var n=y.getColumnAtX(e,r),a=y.getRowAtY(t,r),i=y.getColumnHeaderDepthAtY(t,r);return{x:e,y:t,row:a,column:n,columnHeaderDepth:i}}static getCellInfoFromXY(e,t,r){var{row:n,column:a}=y.getGridPointFromXY(e,t,r),{allColumnWidths:i,allRowHeights:l,allColumnXs:s,allRowYs:u,modelColumns:c,modelRows:f}=r,d=n!==null?f.get(n):null,g=a!==null?c.get(a):null,m=a!==null?s.get(a):null,E=n!==null?u.get(n):null,h=a!==null?i.get(a):null,T=n!==null?l.get(n):null;return{row:n,column:a,modelRow:d??null,modelColumn:g??null,left:m??null,top:E??null,columnWidth:h??null,rowHeight:T??null}}static getColumnHeaderDepthAtY(e,t){var r=y.getRowAtY(e,t),{columnHeaderHeight:n,columnHeaderMaxDepth:a}=t;if(r===null&&e<=n*a)return $(a-Math.ceil(e/n),0,a-1)}static iterateFloatingStart(e,t,r){for(var n=0;n<e&&n<t;n+=1){var a=r(n);if(a!==void 0)return a}}static iterateFloatingEnd(e,t,r){for(var n=0;n<e&&t-(e-n)>=0;n+=1){var a=r(t-(e-n));if(a!==void 0)return a}}static iterateFloating(e,t,r,n){var a=y.iterateFloatingStart(e,r,n);return a!==void 0?a:y.iterateFloatingEnd(t,r,n)}static iterateAllItems(e,t,r,n,a,i){var l=Math.max(e,r),s=Math.min(t,a-n-1),u=y.iterateFloating(r,n,a,i);if(u!==void 0)return u;for(var c=l;c<=s;c+=1)if(u=i(c),u!==void 0)return u}static isInItem(e,t,r,n){var a,i,l=(a=t.get(e))!==null&&a!==void 0?a:0,s=(i=r.get(e))!==null&&i!==void 0?i:0;return l<=n&&n<=l+s}static getItemAtOffset(e,t,r,n,a,i,l){var s=arguments.length>7&&arguments[7]!==void 0?arguments[7]:!1,u=s?void 0:y.iterateFloating(r,n,t,d=>{if(y.isInItem(d,i,l,e))return d});if(!s&&u!==void 0)return u;for(var c=0;c<a.length;c+=1){var f=a[c];if(y.isInItem(f,i,l,e))return f}return null}static getColumnAtX(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:!1,{columnCount:n,floatingLeftColumnCount:a,floatingRightColumnCount:i,visibleColumns:l,allColumnXs:s,allColumnWidths:u,gridX:c}=t;return e<c?null:this.getItemAtOffset(e-c,n,a,i,l,s,u,r)}static getRowAtY(e,t){var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a,visibleRows:i,allRowYs:l,allRowHeights:s,gridY:u}=t;return e<u?null:this.getItemAtOffset(e-u,a,r,n,i,l,s)}static getNextShownItem(e,t,r,n){var a=r.findIndex(s=>s===e)||0;for(a-=1;a!=null&&a>=0;){var i=r[a],l=t.get(i);if(l!=null&&n.get(l)!==0)return i;a-=1}return null}static getNextShownColumn(e,t){var{modelColumns:r,visibleColumns:n,userColumnWidths:a}=t;return y.getNextShownItem(e,r,n,a)}static getNextShownRow(e,t){var{modelRows:r,visibleRows:n,userRowHeights:a}=t;return y.getNextShownItem(e,r,n,a)}static getColumnSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:i,floatingColumns:l,floatingLeftWidth:s,visibleColumns:u,allColumnXs:c,allColumnWidths:f,columnHeaderMaxDepth:d}=r,{allowColumnResize:g,headerSeparatorHandleSize:m}=n;if(d*i<t||!g||m<=0)return null;for(var E=e-a,h=m*.5,T=!1,O=l.length-1;O>=0;O-=1){var S,A,w=l[O],C=(S=c.get(w))!==null&&S!==void 0?S:0,N=(A=f.get(w))!==null&&A!==void 0?A:0,P=N===0;if(!T||!P){var M=C+N;P?M+=h:T&&(M-=h);var F=M-h,R=M+h;if(F<=E&&E<=R)return w;T=P}}T=!1;for(var I=u.length-1;I>=0;I-=1){var L,V,B=u[I],j=(L=c.get(B))!==null&&L!==void 0?L:0,G=(V=f.get(B))!==null&&V!==void 0?V:0,U=G===0;if(j<s-G)return null;if(!T||!U){var K=j+G;U?K+=h:T&&(K-=h);var ye=K-h,Se=K+h;if(ye<=E&&E<=Se)return B;T=U}}return null}static isItemHidden(e,t){return t.get(e)===0}static isColumnHidden(e,t){var{allColumnWidths:r}=t;return y.isItemHidden(e,r)}static isFloatingRow(e,t){if(e==null)return!1;var{floatingTopRowCount:r,floatingBottomRowCount:n,rowCount:a}=t;return e<r||e>=a-n}static isFloatingColumn(e,t){if(e==null)return!1;var{floatingLeftColumnCount:r,floatingRightColumnCount:n,columnCount:a}=t;return e<r||e>=a-n}static getHiddenItems(e,t,r){if(!y.isItemHidden(e,t))return[];for(var n=[e],a=r.findIndex(s=>s===e),i=a-1;i>=0;i-=1){var l=r[i];if(!y.isItemHidden(l,t))break;n.push(l)}return n}static getHiddenColumns(e,t){var{visibleColumns:r,allColumnWidths:n}=t;return y.getHiddenItems(e,n,r)}static getRowSeparatorIndex(e,t,r,n){var{rowHeaderWidth:a,columnHeaderHeight:i,visibleRows:l,allRowYs:s,allRowHeights:u}=r,{allowRowResize:c,headerSeparatorHandleSize:f}=n;if(a<e||!c||f<=0)return null;for(var d=t-i,g=f*.5,m=!1,E=l.length-1;E>=0;E-=1){var h,T,O=l[E],S=(h=s.get(O))!==null&&h!==void 0?h:0,A=(T=u.get(O))!==null&&T!==void 0?T:0,w=A===0;if(!m||!w){var C=S+A;w?C+=g:m&&(C-=g);var N=C-g,P=C+g;if(N<=d&&d<=P)return O;m=w}}return null}static isRowHidden(e,t){var{allRowHeights:r}=t;return y.isItemHidden(e,r)}static getHiddenRows(e,t){var{visibleRows:r,allRowHeights:n}=t;return y.getHiddenItems(e,n,r)}static moveItem(e,t,r){if(e===t)return[...r];var n=[...r],a=n[n.length-1];return a!=null&&!Q(a.from)&&a.to===e?a.from===t?n.pop():n[n.length-1]=J(J({},a),{},{to:t}):n.push({from:e,to:t}),n}static moveRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;if(e[0]===e[1])return y.moveItem(e[0],t,r);var a=t;if(n&&e[0]<t&&(a-=e[1]-e[0]),e[0]===a)return[...r];var i=[...r],l=i[i.length-1];l!=null&&Q(l.from)&&l.from[1]-l.from[0]===e[1]-e[0]&&l.to===e[0]?i[i.length-1]=J(J({},l),{},{to:a}):i.push({from:e,to:a});var s=i[i.length-1];return Q(s.from)&&s.from[0]===s.to&&i.pop(),i}static moveItemOrRange(e,t,r){var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1;return Array.isArray(e)?y.moveRange(e,t,r,n):y.moveItem(e,t,r)}static applyItemMoves(e,t,r){for(var n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:!1,a=[[e,t]],i=function(){var{from:u,to:c}=r[l],f=1,d;Q(u)?(f=u[1]-u[0]+1,[d]=u):d=u;for(var g=n?c:d,m=g+f-1,E=n?d:c,h=E-g,T=[],O=function(){var w,C,N=(w=a[S][0])!==null&&w!==void 0?w:Number.NEGATIVE_INFINITY,P=(C=a[S][1])!==null&&C!==void 0?C:Number.POSITIVE_INFINITY,M,F=[[N,g-1],[g,m],[m+1,P]].map(R=>{var[I,L]=R;return[Math.max(I,N),Math.min(L,P)]}).filter(R=>{var[I,L]=R;return I<=L}).map(R=>{var[I,L]=R;return g<=I&&m>=L?(M=[I+h,L+h],M):m<I?[I-f,L-f]:R}).map(R=>{var[I,L]=R;return E>I&&E<=L?[[I,E-1],[E+f,L+f]]:R===M?[R]:E<=I?[[I+f,L+f]]:[R]}).flat();T.push(...F)},S=0;S<a.length;S+=1)O();a=T.map(A=>{var[w,C]=A;return[Number.isFinite(w)?w:null,Number.isFinite(C)?C:null]})},l=n?r.length-1:0;n?l>=0:l<r.length;n?l-=1:l+=1)i();return a}static translateRange(e,t,r,n){for(var a=y.applyItemMoves(e.startColumn,e.endColumn,t,n),i=y.applyItemMoves(e.startRow,e.endRow,r,n),l=[],s=0;s<a.length;s+=1)for(var u=a[s],c=0;c<i.length;c+=1){var f=i[c];l.push(new p(u[0],f[0],u[1],f[1]))}return l}static getModelIndex(e,t){var r=y.applyItemMoves(e,e,t,!0)[0][0];return r}static getModelIndexes(e,t){return e.map(r=>y.getModelIndex(r,t))}static getModelRangeIndexes(e,t,r){return y.applyItemMoves(e,t,r,!0)}static getModelRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return y.translateRange(e,t,r,!0)}static getModelRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,n=[],a=0;a<e.length;a+=1)n.push(...y.getModelRange(e[a],t,r));return n}static getVisibleRangeIndexes(e,t,r){return y.applyItemMoves(e,t,r,!1)}static getVisibleRange(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k;return this.translateRange(e,t,r,!1)}static getVisibleRanges(e){for(var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:k,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:k,n=[],a=0;a<e.length;a+=1)n.push(...y.getVisibleRange(e[a],t,r));return n}static getVisibleIndex(e,t){var r=y.applyItemMoves(e,e,t)[0][0];return r}static getVisibleIndexes(e,t){return e.map(r=>y.getVisibleIndex(r,t))}static isMacPlatform(){var{platform:e}=window.navigator;return e.startsWith("Mac")}static getModifierKey(){return y.isMacPlatform()?"metaKey":"ctrlKey"}static isModifierKeyDown(e){var t=y.getModifierKey();return e[t]}static checkColumnHidden(e,t){return t.get(e)===0}static checkAllColumnsHidden(e,t){return t.size===0?!1:e.every(r=>t.get(r)===0)}static getScrollDragBounds(e,t,r){var{gridX:n,gridY:a,width:i,height:l,floatingTopRowCount:s,floatingBottomRowCount:u,floatingLeftColumnCount:c,floatingRightColumnCount:f,floatingLeftWidth:d,floatingRightWidth:g,floatingTopHeight:m,floatingBottomHeight:E,columnCount:h,rowCount:T}=e,O=n,S=a,A=i,w=l;return r!=null&&(r>c&&(O+=d),r<h-f&&(A-=g)),t!=null&&(t>s&&(S+=m),t<T-u&&(w-=E)),{x1:O,y1:S,x2:A,y2:w}}static getScrollDelta(e){var t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:1024,r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:768,n=arguments.length>3&&arguments[3]!==void 0?arguments[3]:20,a=arguments.length>4&&arguments[4]!==void 0?arguments[4]:20,{deltaX:i,deltaY:l}=e;return!y.isMacPlatform()&&e.shiftKey&&e.deltaX===0&&e.deltaY!==0&&(i=e.deltaY,l=e.deltaX),e?.deltaMode===WheelEvent.DOM_DELTA_PAGE?(i*=t,l*=r):e?.deltaMode===WheelEvent.DOM_DELTA_LINE&&(y.isMacPlatform()?(i=Math.round(i*n),l=Math.round(l*a)):(i=Math.round(i*this.PIXELS_PER_LINE),l=Math.round(l*this.PIXELS_PER_LINE))),{deltaX:i,deltaY:l}}static compareRanges(e,t){return e[0]==null||e[1]==null||t[0]==null||t[1]==null?0:e[0]!==t[0]?e[0]-t[0]:e[1]-t[1]}static mergeSortedRanges(e){for(var t=[],r=0;r<e.length;r+=1){var n=e[r],a=n[0],i=n[1];r===0?t.push([a,i]):a-1<=t[t.length-1][1]?t[t.length-1][1]=Math.max(t[t.length-1][1],i):t.push([a,i])}return t}static translateTokenBox(e,t){var{x1:r,y1:n,x2:a,y2:i}=e,{gridX:l,gridY:s,width:u,height:c,verticalBarWidth:f,horizontalBarHeight:d}=t,g=$(l+r,l,u-f),m=$(l+a,l,u-f),E=$(s+n,s,c-d),h=$(s+i,s,c-d);return{x1:g,y1:E,x2:m,y2:h,token:e.token}}static getTextRenderMetrics(e,t,r){var{metrics:n,model:a,theme:i}=e,{firstColumn:l,allColumnXs:s,allColumnWidths:u,allRowYs:c,allRowHeights:f,modelRows:d,modelColumns:g}=n,{cellHorizontalPadding:m,treeDepthIndent:E,treeHorizontalPadding:h}=i,T=W(d,r),O=W(g,t),S=a.textAlignForCell(O,T),A=W(s,t),w=W(c,r),C=W(u,t),N=W(f,r),P=t===l,M=0;et(a)&&a.hasExpandableRows&&P&&(M=E*(a.depthForRow(r)+1)+h);var F=C-M,R=A+m,I=w+N*.5;return S==="right"?R=A+F-m:S==="center"&&(R=A+F*.5),R+=M,{width:F-m*2,x:R,y:I}}static findTokensWithProtocolInText(e){var t=be(e);return t.filter(r=>r.type==="url"?/^https?:\/\//.test(r.value):!0)}}Ee(y,"PIXELS_PER_LINE",100/3);const de=y;function ve(o,e){var t=Object.keys(o);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(o);e&&(r=r.filter(function(n){return Object.getOwnPropertyDescriptor(o,n).enumerable})),t.push.apply(t,r)}return t}function me(o){for(var e=1;e<arguments.length;e++){var t=arguments[e]!=null?arguments[e]:{};e%2?ve(Object(t),!0).forEach(function(r){lt(o,r,t[r])}):Object.getOwnPropertyDescriptors?Object.defineProperties(o,Object.getOwnPropertyDescriptors(t)):ve(Object(t)).forEach(function(r){Object.defineProperty(o,r,Object.getOwnPropertyDescriptor(t,r))})}return o}function lt(o,e,t){return e=it(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function it(o){var e=ut(o,"string");return typeof e=="symbol"?e:String(e)}function ut(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var st=(o,e)=>{var t=!1,r=Re(o,me(me({},e),{},{dispose:()=>{t||(t=!0,r.clear(),t=!1)}}));return r};const ft=st;function ct(o,e,t){return e=dt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function dt(o){var e=vt(o,"string");return typeof e=="symbol"?e:String(e)}function vt(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var te=5e3;class mt extends Ie{constructor(){super(...arguments),ct(this,"getCachedTokensInText",ft((e,t)=>{if(t>=e.length)return de.findTokensWithProtocolInText(e);var r=e.slice(t-1,te).search(/\s/),n=t+r;r===-1&&(n=Math.min(te,e.length));var a=e.substring(0,n);return de.findTokensWithProtocolInText(a)},{max:1e4}))}get floatingTopRowCount(){return 0}get floatingBottomRowCount(){return 0}get floatingLeftColumnCount(){return 0}get floatingRightColumnCount(){return 0}get columnHeaderMaxDepth(){return 1}truncationCharForCell(e,t){}textAlignForCell(e,t){return"left"}colorForCell(e,t,r){return r.textColor}backgroundColorForCell(e,t,r){return null}colorForColumnHeader(e){return null}textForRowHeader(e){return""}textForRowFooter(e){return""}isColumnMovable(e){return!0}isRowMovable(e){return!0}getColumnHeaderGroup(e,t){}getColumnHeaderParentGroup(e,t){}tokensForCell(e,t){var r=arguments.length>2&&arguments[2]!==void 0?arguments[2]:te,n=this.textForCell(e,t);return this.getCachedTokensInText(n,r)}renderTypeForCell(e,t){return"text"}}const gt=mt;function ne(o,e,t){return e=pt(e),e in o?Object.defineProperty(o,e,{value:t,enumerable:!0,configurable:!0,writable:!0}):o[e]=t,o}function pt(o){var e=ht(o,"string");return typeof e=="symbol"?e:String(e)}function ht(o,e){if(typeof o!="object"||o===null)return o;var t=o[Symbol.toPrimitive];if(t!==void 0){var r=t.call(o,e||"default");if(typeof r!="object")return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return(e==="string"?String:Number)(o)}var _=[],Et=new Set;class Te extends gt{constructor(e){super(),ne(this,"dh",void 0),ne(this,"listenerCount",void 0),this.dh=e,this.listenerCount=0}addEventListener(e,t,r){super.addEventListener(e,t,r),this.listenerCount+=1,this.listenerCount===1&&this.startListening()}removeEventListener(e,t,r){super.removeEventListener(e,t,r),this.listenerCount-=1,this.listenerCount===0&&this.stopListening()}startListening(){}stopListening(){}get groupedColumns(){return _}get originalColumns(){return this.columns}sourceForCell(e,t){return{column:e,row:t}}getClearFilterRange(e){return this.isFilterable(e)?[e,e]:null}get initialMovedColumns(){return _}get initialMovedRows(){return _}get initialColumnHeaderGroups(){return _}get layoutHints(){return null}get frontColumns(){return _}get backColumns(){return _}get keyColumnSet(){return Et}get frozenColumns(){return _}isColumnFrozen(e){return!1}isColumnSortable(e){return!1}get isFilterRequired(){return!1}get isReversible(){return!0}get isColumnStatisticsAvailable(){return!1}get description(){return""}get isCustomColumnsAvailable(){return!1}get isFormatColumnsAvailable(){return!1}get isExportAvailable(){return!1}get isValuesTableAvailable(){return!1}get isChartBuilderAvailable(){return!1}get isRollupAvailable(){return!1}get isSelectDistinctAvailable(){return!1}get isTotalsAvailable(){return!1}get isViewportPending(){return!1}isFilterable(e){return!1}close(){}isRowMovable(){return!1}get isSeekRowAvailable(){return!1}dataBarOptionsForCell(e,t,r){throw new Error("Method not implemented.")}}ne(Te,"EVENT",Object.freeze({UPDATED:"UPDATED",FORMATTER_UPDATED:"FORMATTER_UPDATED",REQUEST_FAILED:"REQUEST_FAILED",COLUMNS_CHANGED:"COLUMNS_CHANGED",TABLE_CHANGED:"TABLE_CHANGED",FILTERS_CHANGED:"FILTERS_CHANGED",SORTS_CHANGED:"SORTS_CHANGED",DISCONNECT:"DISCONNECT",RECONNECT:"RECONNECT",TOTALS_UPDATED:"TOTALS_UPDATED",PENDING_DATA_UPDATED:"PENDING_DATA_UPDATED",VIEWPORT_UPDATED:"VIEWPORT_UPDATED"}));const Nt=Te;export{bt as C,p as G,Rt as I,Ot as L,At as S,Ct as a,Nt as b,gt as c,y as d,It as e,de as f,re as g,et as i,ft as m};
2
+ //# sourceMappingURL=IrisGridModel-1c26dcf8.js.map