@kenyaemr/esm-lab-manifest-app 5.4.2-pre.2662 → 5.4.2-pre.2668

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 (70) hide show
  1. package/.turbo/turbo-build.log +4 -4
  2. package/dist/110.js +17 -0
  3. package/dist/110.js.map +1 -0
  4. package/dist/114.js +1 -1
  5. package/dist/150.js +1 -1
  6. package/dist/150.js.map +1 -1
  7. package/dist/191.js +1 -1
  8. package/dist/191.js.map +1 -1
  9. package/dist/220.js +1 -1
  10. package/dist/220.js.map +1 -1
  11. package/dist/224.js +1 -1
  12. package/dist/224.js.map +1 -1
  13. package/dist/{613.js → 289.js} +1 -1
  14. package/dist/{613.js.map → 289.js.map} +1 -1
  15. package/dist/{346.js → 406.js} +1 -1
  16. package/dist/{346.js.map → 406.js.map} +1 -1
  17. package/dist/430.js +1 -1
  18. package/dist/430.js.map +1 -1
  19. package/dist/49.js +1 -0
  20. package/dist/49.js.map +1 -0
  21. package/dist/511.js +1 -1
  22. package/dist/511.js.map +1 -1
  23. package/dist/558.js +1 -1
  24. package/dist/558.js.map +1 -1
  25. package/dist/569.js +1 -1
  26. package/dist/569.js.map +1 -1
  27. package/dist/588.js.map +1 -1
  28. package/dist/608.js +1 -1
  29. package/dist/611.js +1 -1
  30. package/dist/611.js.map +1 -1
  31. package/dist/675.js +1 -1
  32. package/dist/675.js.map +1 -1
  33. package/dist/69.js +1 -0
  34. package/dist/69.js.map +1 -0
  35. package/dist/7.js +66 -0
  36. package/dist/7.js.map +1 -0
  37. package/dist/706.js +27 -0
  38. package/dist/706.js.map +1 -0
  39. package/dist/729.js +1 -1
  40. package/dist/729.js.map +1 -1
  41. package/dist/798.js +1 -1
  42. package/dist/810.js +1 -1
  43. package/dist/810.js.map +1 -1
  44. package/dist/880.js +15 -0
  45. package/dist/880.js.map +1 -0
  46. package/dist/907.js +1 -0
  47. package/dist/907.js.map +1 -0
  48. package/dist/946.js.map +1 -1
  49. package/dist/947.js.map +1 -1
  50. package/dist/kenyaemr-esm-lab-manifest-app.js +2 -2
  51. package/dist/kenyaemr-esm-lab-manifest-app.js.buildmanifest.json +211 -211
  52. package/dist/kenyaemr-esm-lab-manifest-app.js.map +1 -1
  53. package/dist/main.js +2 -2
  54. package/dist/main.js.map +1 -1
  55. package/dist/routes.json +1 -1
  56. package/package.json +1 -1
  57. package/dist/152.js +0 -22
  58. package/dist/152.js.map +0 -1
  59. package/dist/478.js +0 -1
  60. package/dist/478.js.map +0 -1
  61. package/dist/532.js +0 -66
  62. package/dist/532.js.map +0 -1
  63. package/dist/889.js +0 -1
  64. package/dist/889.js.map +0 -1
  65. package/dist/911.js +0 -17
  66. package/dist/911.js.map +0 -1
  67. package/dist/924.js +0 -1
  68. package/dist/924.js.map +0 -1
  69. package/dist/989.js +0 -15
  70. package/dist/989.js.map +0 -1
package/dist/532.js DELETED
@@ -1,66 +0,0 @@
1
- (globalThis.webpackChunk_kenyaemr_esm_lab_manifest_app=globalThis.webpackChunk_kenyaemr_esm_lab_manifest_app||[]).push([["532"],{44970:function(t,e,n){"use strict";function i(t,e){var n=Object.keys(t);if(Object.getOwnPropertySymbols){var i=Object.getOwnPropertySymbols(t);e&&(i=i.filter(function(e){return Object.getOwnPropertyDescriptor(t,e).enumerable})),n.push.apply(n,i)}return n}function r(t){for(var e=1;e<arguments.length;e++){var n=null!=arguments[e]?arguments[e]:{};e%2?i(Object(n),!0).forEach(function(e){var i,r;i=e,r=n[e],(i=function(t){var e=function(t,e){if("object"!=typeof t||!t)return t;var n=t[Symbol.toPrimitive];if(void 0!==n){var i=n.call(t,e);if("object"!=typeof i)return i;throw TypeError("@@toPrimitive must return a primitive value.")}return("string"===e?String:Number)(t)}(t,"string");return"symbol"==typeof e?e:e+""}(i))in t?Object.defineProperty(t,i,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[i]=r}):Object.getOwnPropertyDescriptors?Object.defineProperties(t,Object.getOwnPropertyDescriptors(n)):i(Object(n)).forEach(function(e){Object.defineProperty(t,e,Object.getOwnPropertyDescriptor(n,e))})}return t}function o(t,e){if(null==t)return{};var n,i,r=function(t,e){if(null==t)return{};var n={};for(var i in t)if(({}).hasOwnProperty.call(t,i)){if(-1!==e.indexOf(i))continue;n[i]=t[i]}return n}(t,e);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(t);for(i=0;i<o.length;i++)n=o[i],-1===e.indexOf(n)&&({}).propertyIsEnumerable.call(t,n)&&(r[n]=t[n])}return r}n.d(e,{A:()=>f});var a=["width","height","viewBox"],s=["tabindex"],l={focusable:"false",preserveAspectRatio:"xMidYMid meet"},c=n(39067),u=n.n(c),h=n(35400),d=n.n(h);let f=d().forwardRef(function({className:t,children:e,tabIndex:n,xmlns:i="http://www.w3.org/2000/svg",preserveAspectRatio:c="xMidYMid meet",...u},h){let{tabindex:f,...p}=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.width,n=t.height,i=t.viewBox,c=void 0===i?"0 0 ".concat(e," ").concat(n):i,u=o(t,a),h=u.tabindex,d=o(u,s),f=r(r(r({},l),d),{},{width:e,height:n,viewBox:c});return f["aria-label"]||f["aria-labelledby"]||f.title?(f.role="img",null!=h&&(f.focusable="true",f.tabindex=h)):f["aria-hidden"]=!0,f}({...u,tabindex:n});return t&&(p.className=t),null!=f&&("number"==typeof f?p.tabIndex=f:p.tabIndex=Number(n)),h&&(p.ref=h),i&&(p.xmlns=i),c&&(p.preserveAspectRatio=c),d().createElement("svg",p,e)});f.displayName="Icon",f.propTypes={"aria-hidden":u().oneOfType([u().bool,u().oneOf(["true","false"])]),"aria-label":u().string,"aria-labelledby":u().string,children:u().node,className:u().string,height:u().oneOfType([u().number,u().string]),preserveAspectRatio:u().string,tabIndex:u().oneOfType([u().number,u().string]),viewBox:u().string,width:u().oneOfType([u().number,u().string]),xmlns:u().string}},36999:function(t,e,n){"use strict";var i=n(36848);function r(){}function o(){}o.resetWarningCache=r,t.exports=function(){function t(t,e,n,r,o,a){if(a!==i){var s=Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw s.name="Invariant Violation",s}}function e(){return t}t.isRequired=t;var n={array:t,bigint:t,bool:t,func:t,number:t,object:t,string:t,symbol:t,any:t,arrayOf:e,element:t,elementType:t,instanceOf:e,node:t,objectOf:e,oneOf:e,oneOfType:e,shape:e,exact:e,checkPropTypes:o,resetWarningCache:r};return n.PropTypes=n,n}},39067:function(t,e,n){t.exports=n(36999)()},36848:function(t){"use strict";t.exports="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED"},9994:function(t,e,n){"use strict";let i,r,o,a,s,l,c,u,h,d,f,p,g,m,y,v,_,b,x,E,w,T,S,O,M,A,D,k,C,L,R,I,N,P,U,B,F,H,$,z,j,G,V,W,Y,Z,X,q,K,Q,J,tt,te,tn,ti,tr,to,ta,ts,tl,tc;n.d(e,{UU:()=>mE,Wh:()=>t0});var tu,th,td,tf,tp,tg,tm,ty,tv=n(35400),t_=((i=t_||{}).RENDER_FINISHED="render-finished",i.RESIZE="chart-resize",i.MOUSEOVER="chart-mouseover",i.MOUSEOUT="chart-mouseout",i),tb=((r=tb||{}).SHOW="show-modal",r.HIDE="hide-modal",r),tx=((o=tx||{}).UPDATE="model-update",o),tE=((a=tE||{}).SHOW_OVERFLOW_MENU="show-toolbar-overflow-menu",a.HIDE_OVERFLOW_MENU="hide-toolbar-overflow-menu",a.BUTTON_CLICK="toolbar-button-click",a.SHOW_TOOLTIP="toolbar-show-tooltip",a.HIDE_TOOLTIP="toolbar-hide-tooltip",a),tw=((s=tw||{}).UPDATE="zoom-bar-update",s.SELECTION_START="zoom-bar-selection-start",s.SELECTION_IN_PROGRESS="zoom-bar-selection-in-progress",s.SELECTION_END="zoom-bar-selection-end",s),tT=((l=tT||{}).CHANGE="zoom-domain-change",l),tS=((c=tS||{}).CANVAS_ZOOM_IN="canvas-zoom-in",c.CANVAS_ZOOM_OUT="canvas-zoom-out",c),tO=((u=tO||{}).LABEL_MOUSEOVER="axis-label-mouseover",u.LABEL_MOUSEMOVE="axis-label-mousemove",u.LABEL_CLICK="axis-label-click",u.LABEL_MOUSEOUT="axis-label-mouseout",u.LABEL_FOCUS="axis-label-focus",u.LABEL_BLUR="axis-label-blur",u.RENDER_COMPLETE="axis-render-complete",u),tM=((h=tM||{}).POINT_MOUSEOVER="scatter-mouseover",h.POINT_MOUSEMOVE="scatter-mousemove",h.POINT_CLICK="scatter-click",h.POINT_MOUSEOUT="scatter-mouseout",h),tA=((d=tA||{}).WORD_MOUSEOVER="wordcloud-word-mouseover",d.WORD_MOUSEMOVE="wordcloud-word-mousemove",d.WORD_CLICK="wordcloud-word-click",d.WORD_MOUSEOUT="wordcloud-word-mouseout",d),tD=((f=tD||{}).SLICE_MOUSEOVER="pie-slice-mouseover",f.SLICE_MOUSEMOVE="pie-slice-mousemove",f.SLICE_CLICK="pie-slice-click",f.SLICE_MOUSEOUT="pie-slice-mouseout",f),tk=((p=tk||{}).ARC_MOUSEOVER="gauge-arc-mouseover",p.ARC_MOUSEMOVE="gauge-arc-mousemove",p.ARC_CLICK="gauge-arc-click",p.ARC_MOUSEOUT="gauge-arc-mouseout",p),tC=((g=tC||{}).BAR_MOUSEOVER="bar-mouseover",g.BAR_MOUSEMOVE="bar-mousemove",g.BAR_CLICK="bar-click",g.BAR_MOUSEOUT="bar-mouseout",g),tL=((m=tL||{}).BOX_MOUSEOVER="box-mouseover",m.BOX_MOUSEMOVE="box-mousemove",m.BOX_CLICK="box-click",m.BOX_MOUSEOUT="box-mouseout",m.OUTLIER_MOUSEOVER="outlier-mouseover",m.OUTLIER_MOUSEMOVE="outlier-mousemove",m.OUTLIER_CLICK="outlier-click",m.OUTLIER_MOUSEOUT="outlier-mouseout",m),tR=((y=tR||{}).SCATTER_MOUSEOVER="scatter-mouseover",y.SCATTER_MOUSEMOVE="scatter-mousemove",y.SCATTER_CLICK="scatter-click",y.SCATTER_MOUSEOUT="scatter-mouseout",y),tI=((v=tI||{}).POINT_MOUSEOVER="scatter-mouseover",v.POINT_MOUSEMOVE="scatter-mousemove",v.POINT_CLICK="scatter-click",v.POINT_MOUSEOUT="scatter-mouseout",v),tN=((_=tN||{}).X_AXIS_MOUSEOVER="radar-x-axis-mouseover",_.X_AXIS_MOUSEMOVE="radar-x-axis-mousemove",_.X_AXIS_CLICK="radar-x-axis-click",_.X_AXIS_MOUSEOUT="radar-x-axis-mouseout",_),tP=((b=tP||{}).NODE_MOUSEOVER="tree-node-mouseover",b.NODE_CLICK="tree-node-click",b.NODE_MOUSEOUT="tree-node-mouseout",b),tU=((x=tU||{}).LEAF_MOUSEOVER="leaf-mouseover",x.LEAF_MOUSEMOVE="leaf-mousemove",x.LEAF_CLICK="leaf-click",x.LEAF_MOUSEOUT="leaf-mouseout",x),tB=((E=tB||{}).SHOW="show-tooltip",E.MOVE="move-tooltip",E.HIDE="hide-tooltip",E),tF=((w=tF||{}).SHOW="show-threshold",w.HIDE="hide-threshold",w),tH=((T=tH||{}).ITEM_HOVER="legend-item-onhover",T.ITEM_CLICK="legend-item-onclick",T.ITEM_MOUSEOUT="legend-item-onmouseout",T.ITEMS_UPDATE="legend-items-update",T),t$=((S=t$||{}).CIRCLE_MOUSEOVER="circle-leaf-mouseover",S.CIRCLE_CLICK="circle-leaf-click",S.CIRCLE_MOUSEOUT="circle-leaf-mouseout",S.CIRCLE_MOUSEMOVE="circle-leaf-mousemove",S),tz=((O=tz||{}).NODE_MOUSEOVER="alluvial-node-mouseover",O.NODE_CLICK="alluvial-node-click",O.NODE_MOUSEOUT="alluvial-node-mouseout",O.NODE_MOUSEMOVE="alluvial-node-mousemove",O.LINE_MOUSEOVER="alluvial-line-mouseover",O.LINE_CLICK="alluvial-line-click",O.LINE_MOUSEOUT="alluvial-line-mouseout",O.LINE_MOUSEMOVE="alluvial-line-mousemove",O),tj=((M=tj||{}).METER_MOUSEOVER="meter-mouseover",M.METER_CLICK="meter-click",M.METER_MOUSEOUT="meter-mouseout",M.METER_MOUSEMOVE="meter-mousemove",M),tG=((A=tG||{}).HEATMAP_MOUSEOVER="heatmap-mouseover",A.HEATMAP_CLICK="heatmap-click",A.HEATMAP_MOUSEOUT="heatmap-mouseout",A.HEATMAP_MOUSEMOVE="hetmap-mousemove",A),tV=((D=tV||{}).CHOROPLETH_MOUSEOVER="choropleth-mouseover",D.CHOROPLETH_CLICK="choropleth-click",D.CHOROPLETH_MOUSEOUT="choropleth-mouseout",D.CHOROPLETH_MOUSEMOVE="choropleth-mousemove",D);let tW=Object.freeze(Object.defineProperty({__proto__:null,Alluvial:tz,Area:tM,Axis:tO,Bar:tC,Boxplot:tL,CanvasZoom:tS,Chart:t_,Choropleth:tV,CirclePack:t$,Gauge:tk,Heatmap:tG,Legend:tH,Line:tI,Meter:tj,Modal:tb,Model:tx,Pie:tD,Radar:tN,Scatter:tR,Threshold:tF,Toolbar:tE,Tooltip:tB,Tree:tP,Treemap:tU,WordCloud:tA,ZoomBar:tw,ZoomDomain:tT},Symbol.toStringTag,{value:"Module"}));var tY=((k=tY||{}).HTML="html",k.SVG="svg",k),tZ=((C=tZ||{}).WHITE="white",C.G100="g100",C.G90="g90",C.G10="g10",C),tX=((L=tX||{}).BACKGROUND="background",L.FILL="fill",L.STROKE="stroke",L.TOOLTIP="tooltip",L),tq=((R=tq||{}).LEFT="left",R.RIGHT="right",R.TOP="top",R.BOTTOM="bottom",R),tK=((I=tK||{}).GRAPH_VIEW="graph_view",I.SLIDER_VIEW="slider_view",I),tQ=((N=tQ||{}).END_LINE="end_line",N.MID_LINE="mid_line",N.FRONT_LINE="front_line",N.NONE="none",N),tJ=((P=tJ||{}).VERTICAL="vertical",P.HORIZONTAL="horizontal",P),t0=((U=t0||{}).TIME="time",U.LINEAR="linear",U.LOG="log",U.LABELS="labels",U.LABELS_RATIO="labels-ratio",U),t1=((B=t1||{}).RIGHT="right",B.LEFT="left",B.TOP="top",B.BOTTOM="bottom",B),t2=((F=t2||{}).LEFT="left",F.CENTER="center",F.RIGHT="right",F),t3=((H=t3||{}).HORIZONTAL="horizontal",H.VERTICAL="vertical",H),t5=(($=t5||{}).TREE="tree",$.DENDROGRAM="dendrogram",$),t4=((z=t4||{}).ROW="row",z.COLUMN="column",z.ROW_REVERSE="row-reverse",z.COLUMN_REVERSE="column-reverse",z),t8=((j=t8||{}).FIXED="fixed",j.PREFERRED="preferred",j.STRETCH="stretch",j),t6=((G=t6||{}).CENTER="center",G),t9=((V=t9||{}).LEFT="left",V.RIGHT="right",V),t7=((W=t7||{}).GRID="grid",W.VERT_OR_HORIZ="vertOrHoriz",W.PIE="pie",W.DONUT="donut",W),et=((Y=et||{}).START="start",Y.MIDDLE="middle",Y.END="end",Y),ee=((Z=ee||{}).BASELINE="baseline",Z.MIDDLE="middle",Z.HANGING="hanging",Z),en=((X=en||{}).SEMI="semi",X.FULL="full",X),ei=((q=ei||{}).UP="up",q.DOWN="down",q),er=((K=er||{}).SUCCESS="success",K.WARNING="warning",K.DANGER="danger",K),eo=((Q=eo||{}).ALWAYS="always",Q.AUTO="auto",Q.NEVER="never",Q),ea=((J=ea||{}).SCATTER="scatter",J.LINE="line",J.SIMPLE_BAR="simple-bar",J.STACKED_BAR="stacked-bar",J.GROUPED_BAR="grouped-bar",J.AREA="area",J.STACKED_AREA="stacked-area",J),es=((tt=es||{}).EXPORT_CSV="Export as CSV",tt.EXPORT_PNG="Export as PNG",tt.EXPORT_JPG="Export as JPG",tt.ZOOM_IN="Zoom in",tt.ZOOM_OUT="Zoom out",tt.RESET_ZOOM="Reset zoom",tt.MAKE_FULLSCREEN="Make fullscreen",tt.EXIT_FULLSCREEN="Exit fullscreen",tt.SHOW_AS_DATATABLE="Show as data-table",tt.CUSTOM="Custom",tt),el=((te=el||{}).LEFT="left",te.RIGHT="right",te),ec=((tn=ec||{}).CHECKBOX="checkbox",tn.RADIUS="radius",tn.AREA="area",tn.SIZE="size",tn.LINE="line",tn.QUARTILE="quartile",tn.ZOOM="zoom",tn),eu=((ti=eu||{}).LINEAR="linear",ti.QUANTIZE="quantize",ti),eh=((tr=eh||{}).ON="on",tr.AUTO="auto",tr.OFF="off",tr),ed=((to=ed||{}).DEFAULT="default",to.HOVERABLE="hoverable",to),ef=((ta=ef||{}).geoEqualEarth="geoEqualEarth",ta.geoAlbers="geoAlbers",ta.geoConicEqualArea="geoConicEqualArea",ta.geoConicEquidistant="geoConicEquidistant",ta.geoEquirectangular="geoEquirectangular",ta.geoMercator="geoMercator",ta.geoNaturalEarth1="geoNaturalEarth1",ta),ep=((ts=ep||{})["15seconds"]="15seconds",ts.minute="minute",ts["30minutes"]="30minutes",ts.hourly="hourly",ts.daily="daily",ts.weekly="weekly",ts.monthly="monthly",ts.quarterly="quarterly",ts.yearly="yearly",ts);function eg(t){return (e={})=>{let n=e.width?String(e.width):t.defaultWidth;return t.formats[n]||t.formats[t.defaultWidth]}}function em(t){return(e,n)=>{let i;if("formatting"===(n?.context?String(n.context):"standalone")&&t.formattingValues){let e=t.defaultFormattingWidth||t.defaultWidth,r=n?.width?String(n.width):e;i=t.formattingValues[r]||t.formattingValues[e]}else{let e=t.defaultWidth,r=n?.width?String(n.width):t.defaultWidth;i=t.values[r]||t.values[e]}return i[t.argumentCallback?t.argumentCallback(e):e]}}function ey(t){return(e,n={})=>{let i,r=n.width,o=r&&t.matchPatterns[r]||t.matchPatterns[t.defaultMatchWidth],a=e.match(o);if(!a)return null;let s=a[0],l=r&&t.parsePatterns[r]||t.parsePatterns[t.defaultParseWidth],c=Array.isArray(l)?function(t,e){for(let n=0;n<t.length;n++)if(e(t[n]))return n}(l,t=>t.test(s)):function(t,e){for(let n in t)if(Object.prototype.hasOwnProperty.call(t,n)&&e(t[n]))return n}(l,t=>t.test(s));return i=t.valueCallback?t.valueCallback(c):c,{value:i=n.valueCallback?n.valueCallback(i):i,rest:e.slice(s.length)}}}let ev=Symbol.for("constructDateFrom");function e_(t,e){return"function"==typeof t?t(e):t&&"object"==typeof t&&ev in t?t[ev](e):t instanceof Date?new t.constructor(e):new Date(e)}function eb(t,...e){let n=e_.bind(null,e.find(t=>"object"==typeof t));return e.map(n)}let ex={};function eE(t,e){return e_(e||t,t)}function ew(t,e){let n=e?.weekStartsOn??e?.locale?.options?.weekStartsOn??ex.weekStartsOn??ex.locale?.options?.weekStartsOn??0,i=eE(t,e?.in),r=i.getDay();return i.setDate(i.getDate()-(7*(r<n)+r-n)),i.setHours(0,0,0,0),i}let eT={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXWeeks:{one:"about 1 week",other:"about {{count}} weeks"},xWeeks:{one:"1 week",other:"{{count}} weeks"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}},eS={lastWeek:"'last' eeee 'at' p",yesterday:"'yesterday at' p",today:"'today at' p",tomorrow:"'tomorrow at' p",nextWeek:"eeee 'at' p",other:"P"},eO={ordinalNumber:(t,e)=>{let n=Number(t),i=n%100;if(i>20||i<10)switch(i%10){case 1:return n+"st";case 2:return n+"nd";case 3:return n+"rd"}return n+"th"},era:em({values:{narrow:["B","A"],abbreviated:["BC","AD"],wide:["Before Christ","Anno Domini"]},defaultWidth:"wide"}),quarter:em({values:{narrow:["1","2","3","4"],abbreviated:["Q1","Q2","Q3","Q4"],wide:["1st quarter","2nd quarter","3rd quarter","4th quarter"]},defaultWidth:"wide",argumentCallback:t=>t-1}),month:em({values:{narrow:["J","F","M","A","M","J","J","A","S","O","N","D"],abbreviated:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],wide:["January","February","March","April","May","June","July","August","September","October","November","December"]},defaultWidth:"wide"}),day:em({values:{narrow:["S","M","T","W","T","F","S"],short:["Su","Mo","Tu","We","Th","Fr","Sa"],abbreviated:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],wide:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"]},defaultWidth:"wide"}),dayPeriod:em({values:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"morning",afternoon:"afternoon",evening:"evening",night:"night"}},defaultWidth:"wide",formattingValues:{narrow:{am:"a",pm:"p",midnight:"mi",noon:"n",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},abbreviated:{am:"AM",pm:"PM",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"},wide:{am:"a.m.",pm:"p.m.",midnight:"midnight",noon:"noon",morning:"in the morning",afternoon:"in the afternoon",evening:"in the evening",night:"at night"}},defaultFormattingWidth:"wide"})},eM={ordinalNumber:(ae={matchPattern:/^(\d+)(th|st|nd|rd)?/i,parsePattern:/\d+/i,valueCallback:t=>parseInt(t,10)},(t,e={})=>{let n=t.match(ae.matchPattern);if(!n)return null;let i=n[0],r=t.match(ae.parsePattern);if(!r)return null;let o=ae.valueCallback?ae.valueCallback(r[0]):r[0];return{value:o=e.valueCallback?e.valueCallback(o):o,rest:t.slice(i.length)}}),era:ey({matchPatterns:{narrow:/^(b|a)/i,abbreviated:/^(b\.?\s?c\.?|b\.?\s?c\.?\s?e\.?|a\.?\s?d\.?|c\.?\s?e\.?)/i,wide:/^(before christ|before common era|anno domini|common era)/i},defaultMatchWidth:"wide",parsePatterns:{any:[/^b/i,/^(a|c)/i]},defaultParseWidth:"any"}),quarter:ey({matchPatterns:{narrow:/^[1234]/i,abbreviated:/^q[1234]/i,wide:/^[1234](th|st|nd|rd)? quarter/i},defaultMatchWidth:"wide",parsePatterns:{any:[/1/i,/2/i,/3/i,/4/i]},defaultParseWidth:"any",valueCallback:t=>t+1}),month:ey({matchPatterns:{narrow:/^[jfmasond]/i,abbreviated:/^(jan|feb|mar|apr|may|jun|jul|aug|sep|oct|nov|dec)/i,wide:/^(january|february|march|april|may|june|july|august|september|october|november|december)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^j/i,/^f/i,/^m/i,/^a/i,/^m/i,/^j/i,/^j/i,/^a/i,/^s/i,/^o/i,/^n/i,/^d/i],any:[/^ja/i,/^f/i,/^mar/i,/^ap/i,/^may/i,/^jun/i,/^jul/i,/^au/i,/^s/i,/^o/i,/^n/i,/^d/i]},defaultParseWidth:"any"}),day:ey({matchPatterns:{narrow:/^[smtwf]/i,short:/^(su|mo|tu|we|th|fr|sa)/i,abbreviated:/^(sun|mon|tue|wed|thu|fri|sat)/i,wide:/^(sunday|monday|tuesday|wednesday|thursday|friday|saturday)/i},defaultMatchWidth:"wide",parsePatterns:{narrow:[/^s/i,/^m/i,/^t/i,/^w/i,/^t/i,/^f/i,/^s/i],any:[/^su/i,/^m/i,/^tu/i,/^w/i,/^th/i,/^f/i,/^sa/i]},defaultParseWidth:"any"}),dayPeriod:ey({matchPatterns:{narrow:/^(a|p|mi|n|(in the|at) (morning|afternoon|evening|night))/i,any:/^([ap]\.?\s?m\.?|midnight|noon|(in the|at) (morning|afternoon|evening|night))/i},defaultMatchWidth:"any",parsePatterns:{any:{am:/^a/i,pm:/^p/i,midnight:/^mi/i,noon:/^no/i,morning:/morning/i,afternoon:/afternoon/i,evening:/evening/i,night:/night/i}},defaultParseWidth:"any"})},eA={code:"en-US",formatDistance:(t,e,n)=>{let i,r=eT[t];return i="string"==typeof r?r:1===e?r.one:r.other.replace("{{count}}",e.toString()),n?.addSuffix?n.comparison&&n.comparison>0?"in "+i:i+" ago":i},formatLong:{date:eg({formats:{full:"EEEE, MMMM do, y",long:"MMMM do, y",medium:"MMM d, y",short:"MM/dd/yyyy"},defaultWidth:"full"}),time:eg({formats:{full:"h:mm:ss a zzzz",long:"h:mm:ss a z",medium:"h:mm:ss a",short:"h:mm a"},defaultWidth:"full"}),dateTime:eg({formats:{full:"{{date}} 'at' {{time}}",long:"{{date}} 'at' {{time}}",medium:"{{date}}, {{time}}",short:"{{date}}, {{time}}"},defaultWidth:"full"})},formatRelative:(t,e,n,i)=>eS[t],localize:eO,match:eM,options:{weekStartsOn:0,firstWeekContainsDate:1}};var eD="object"==typeof global&&global&&global.Object===Object&&global,ek="object"==typeof self&&self&&self.Object===Object&&self,eC=eD||ek||Function("return this")(),eL=eC.Symbol,eR=Object.prototype,eI=eR.hasOwnProperty,eN=eR.toString,eP=eL?eL.toStringTag:void 0,eU=Object.prototype.toString,eB=eL?eL.toStringTag:void 0;function eF(t){return null==t?void 0===t?"[object Undefined]":"[object Null]":eB&&eB in Object(t)?function(t){var e=eI.call(t,eP),n=t[eP];try{t[eP]=void 0;var i=!0}catch{}var r=eN.call(t);return i&&(e?t[eP]=n:delete t[eP]),r}(t):eU.call(t)}function eH(t){return null!=t&&"object"==typeof t}function e$(t){return"symbol"==typeof t||eH(t)&&"[object Symbol]"==eF(t)}function ez(t,e){for(var n=-1,i=null==t?0:t.length,r=Array(i);++n<i;)r[n]=e(t[n],n,t);return r}var ej=Array.isArray,eG=eL?eL.prototype:void 0,eV=eG?eG.toString:void 0;function eW(t){var e=typeof t;return null!=t&&("object"==e||"function"==e)}function eY(t){return t}function eZ(t){if(!eW(t))return!1;var e=eF(t);return"[object Function]"==e||"[object GeneratorFunction]"==e||"[object AsyncFunction]"==e||"[object Proxy]"==e}var eX=eC["__core-js_shared__"],eq=(an=/[^.]+$/.exec(eX&&eX.keys&&eX.keys.IE_PROTO||""))?"Symbol(src)_1."+an:"",eK=Function.prototype.toString;function eQ(t){if(null!=t){try{return eK.call(t)}catch{}try{return t+""}catch{}}return""}var eJ=/^\[object .+?Constructor\]$/,e0=Object.prototype,e1=Function.prototype.toString,e2=e0.hasOwnProperty,e3=RegExp("^"+e1.call(e2).replace(/[\\^$.*+?()[\]{}|]/g,"\\$&").replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g,"$1.*?")+"$");function e5(t,e){var n=t?.[e];return eW(n)&&(!eq||!(eq in n))&&(eZ(n)?e3:eJ).test(eQ(n))?n:void 0}var e4=e5(eC,"WeakMap"),e8=Object.create,e6=function(){function t(){}return function(e){if(!eW(e))return{};if(e8)return e8(e);t.prototype=e;var n=new t;return t.prototype=void 0,n}}();function e9(t,e){var n=-1,i=t.length;for(e||(e=Array(i));++n<i;)e[n]=t[n];return e}var e7=Date.now,nt=function(){try{var t=e5(Object,"defineProperty");return t({},"",{}),t}catch{}}(),ne=(ai=nt?function(t,e){return nt(t,"toString",{configurable:!0,enumerable:!1,value:function(){return e},writable:!0})}:eY,ar=0,ao=0,function(){var t=e7(),e=16-(t-ao);if(ao=t,e>0){if(++ar>=800)return arguments[0]}else ar=0;return ai.apply(void 0,arguments)});function nn(t){return t!=t}function ni(t,e){return!!(null==t?0:t.length)&&(e==e?function(t,e,n){for(var i=-1,r=t.length;++i<r;)if(t[i]===e)return i;return -1}(t,e,0):function(t,e,n,i){for(var r=t.length,o=-1;++o<r;)if(e(t[o],o,t))return o;return -1}(t,nn,0))>-1}var nr=/^(?:0|[1-9]\d*)$/;function no(t,e){var n=typeof t;return!!(e=e??0x1fffffffffffff)&&("number"==n||"symbol"!=n&&nr.test(t))&&t>-1&&t%1==0&&t<e}function na(t,e,n){"__proto__"==e&&nt?nt(t,e,{configurable:!0,enumerable:!0,value:n,writable:!0}):t[e]=n}function ns(t,e){return t===e||t!=t&&e!=e}var nl=Object.prototype.hasOwnProperty;function nc(t,e,n){var i=t[e];nl.call(t,e)&&ns(i,n)&&(void 0!==n||e in t)||na(t,e,n)}function nu(t,e,n,i){var r=!n;n||(n={});for(var o=-1,a=e.length;++o<a;){var s=e[o],l=void 0;void 0===l&&(l=t[s]),r?na(n,s,l):nc(n,s,l)}return n}var nh=Math.max;function nd(t,e,n){return e=nh(void 0===e?t.length-1:e,0),function(){for(var i=arguments,r=-1,o=nh(i.length-e,0),a=Array(o);++r<o;)a[r]=i[e+r];r=-1;for(var s=Array(e+1);++r<e;)s[r]=i[r];return s[e]=n(a),function(t,e,n){switch(n.length){case 0:return t.call(e);case 1:return t.call(e,n[0]);case 2:return t.call(e,n[0],n[1]);case 3:return t.call(e,n[0],n[1],n[2])}return t.apply(e,n)}(t,this,s)}}function nf(t,e){return ne(nd(t,e,eY),t+"")}function np(t){return"number"==typeof t&&t>-1&&t%1==0&&t<=0x1fffffffffffff}function ng(t){return null!=t&&np(t.length)&&!eZ(t)}var nm=Object.prototype;function ny(t){var e=t&&t.constructor;return t===("function"==typeof e&&e.prototype||nm)}function nv(t){return eH(t)&&"[object Arguments]"==eF(t)}var n_=Object.prototype,nb=n_.hasOwnProperty,nx=n_.propertyIsEnumerable,nE=nv(function(){return arguments}())?nv:function(t){return eH(t)&&nb.call(t,"callee")&&!nx.call(t,"callee")},nw="object"==typeof exports&&exports&&!exports.nodeType&&exports,nT=nw&&"object"==typeof module&&module&&!module.nodeType&&module,nS=nT&&nT.exports===nw?eC.Buffer:void 0,nO=(nS?nS.isBuffer:void 0)||function(){return!1},nM={};function nA(t){return function(e){return t(e)}}nM["[object Float32Array]"]=nM["[object Float64Array]"]=nM["[object Int8Array]"]=nM["[object Int16Array]"]=nM["[object Int32Array]"]=nM["[object Uint8Array]"]=nM["[object Uint8ClampedArray]"]=nM["[object Uint16Array]"]=nM["[object Uint32Array]"]=!0,nM["[object Arguments]"]=nM["[object Array]"]=nM["[object ArrayBuffer]"]=nM["[object Boolean]"]=nM["[object DataView]"]=nM["[object Date]"]=nM["[object Error]"]=nM["[object Function]"]=nM["[object Map]"]=nM["[object Number]"]=nM["[object Object]"]=nM["[object RegExp]"]=nM["[object Set]"]=nM["[object String]"]=nM["[object WeakMap]"]=!1;var nD="object"==typeof exports&&exports&&!exports.nodeType&&exports,nk=nD&&"object"==typeof module&&module&&!module.nodeType&&module,nC=nk&&nk.exports===nD&&eD.process,nL=function(){try{return nk&&nk.require&&nk.require("util").types||nC&&nC.binding&&nC.binding("util")}catch{}}(),nR=nL&&nL.isTypedArray,nI=nR?nA(nR):function(t){return eH(t)&&np(t.length)&&!!nM[eF(t)]},nN=Object.prototype.hasOwnProperty;function nP(t,e){var n=ej(t),i=!n&&nE(t),r=!n&&!i&&nO(t),o=!n&&!i&&!r&&nI(t),a=n||i||r||o,s=a?function(t,e){for(var n=-1,i=Array(t);++n<t;)i[n]=e(n);return i}(t.length,String):[],l=s.length;for(var c in t)(e||nN.call(t,c))&&!(a&&("length"==c||r&&("offset"==c||"parent"==c)||o&&("buffer"==c||"byteLength"==c||"byteOffset"==c)||no(c,l)))&&s.push(c);return s}function nU(t,e){return function(n){return t(e(n))}}var nB=nU(Object.keys,Object),nF=Object.prototype.hasOwnProperty;function nH(t){if(!ny(t))return nB(t);var e=[];for(var n in Object(t))nF.call(t,n)&&"constructor"!=n&&e.push(n);return e}function n$(t){return ng(t)?nP(t):nH(t)}var nz=Object.prototype.hasOwnProperty;function nj(t){return ng(t)?nP(t,!0):function(t){if(!eW(t)){var e=[];if(null!=t)for(var n in Object(t))e.push(n);return e}var i=ny(t),r=[];for(var o in t)"constructor"==o&&(i||!nz.call(t,o))||r.push(o);return r}(t)}var nG=/\.|\[(?:[^[\]]*|(["'])(?:(?!\1)[^\\]|\\.)*?\1)\]/,nV=/^\w*$/;function nW(t,e){if(ej(t))return!1;var n=typeof t;return!!("number"==n||"symbol"==n||"boolean"==n||null==t||e$(t))||nV.test(t)||!nG.test(t)||null!=e&&t in Object(e)}var nY=e5(Object,"create"),nZ=Object.prototype.hasOwnProperty,nX=Object.prototype.hasOwnProperty;function nq(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function nK(t,e){for(var n=t.length;n--;)if(ns(t[n][0],e))return n;return -1}nq.prototype.clear=function(){this.__data__=nY?nY(null):{},this.size=0},nq.prototype.delete=function(t){var e=this.has(t)&&delete this.__data__[t];return this.size-=!!e,e},nq.prototype.get=function(t){var e=this.__data__;if(nY){var n=e[t];return"__lodash_hash_undefined__"===n?void 0:n}return nZ.call(e,t)?e[t]:void 0},nq.prototype.has=function(t){var e=this.__data__;return nY?void 0!==e[t]:nX.call(e,t)},nq.prototype.set=function(t,e){var n=this.__data__;return this.size+=+!this.has(t),n[t]=nY&&void 0===e?"__lodash_hash_undefined__":e,this};var nQ=Array.prototype.splice;function nJ(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}nJ.prototype.clear=function(){this.__data__=[],this.size=0},nJ.prototype.delete=function(t){var e=this.__data__,n=nK(e,t);return!(n<0)&&(n==e.length-1?e.pop():nQ.call(e,n,1),--this.size,!0)},nJ.prototype.get=function(t){var e=this.__data__,n=nK(e,t);return n<0?void 0:e[n][1]},nJ.prototype.has=function(t){return nK(this.__data__,t)>-1},nJ.prototype.set=function(t,e){var n=this.__data__,i=nK(n,t);return i<0?(++this.size,n.push([t,e])):n[i][1]=e,this};var n0=e5(eC,"Map");function n1(t,e){var n,i=t.__data__;return("string"==(n=typeof e)||"number"==n||"symbol"==n||"boolean"==n?"__proto__"!==e:null===e)?i["string"==typeof e?"string":"hash"]:i.map}function n2(t){var e=-1,n=null==t?0:t.length;for(this.clear();++e<n;){var i=t[e];this.set(i[0],i[1])}}function n3(t,e){if("function"!=typeof t||null!=e&&"function"!=typeof e)throw TypeError("Expected a function");var n=function(){var i=arguments,r=e?e.apply(this,i):i[0],o=n.cache;if(o.has(r))return o.get(r);var a=t.apply(this,i);return n.cache=o.set(r,a)||o,a};return n.cache=new(n3.Cache||n2),n}n2.prototype.clear=function(){this.size=0,this.__data__={hash:new nq,map:new(n0||nJ),string:new nq}},n2.prototype.delete=function(t){var e=n1(this,t).delete(t);return this.size-=!!e,e},n2.prototype.get=function(t){return n1(this,t).get(t)},n2.prototype.has=function(t){return n1(this,t).has(t)},n2.prototype.set=function(t,e){var n=n1(this,t),i=n.size;return n.set(t,e),this.size+=+(n.size!=i),this},n3.Cache=n2;var n5=/[^.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|$))/g,n4=/\\(\\)?/g,n8=(as=(aa=n3(function(t){var e=[];return 46===t.charCodeAt(0)&&e.push(""),t.replace(n5,function(t,n,i,r){e.push(i?r.replace(n4,"$1"):n||t)}),e},function(t){return 500===as.size&&as.clear(),t})).cache,aa);function n6(t){return null==t?"":function t(e){if("string"==typeof e)return e;if(ej(e))return ez(e,t)+"";if(e$(e))return eV?eV.call(e):"";var n=e+"";return"0"==n&&1/e==-1/0?"-0":n}(t)}function n9(t,e){return ej(t)?t:nW(t,e)?[t]:n8(n6(t))}function n7(t){if("string"==typeof t||e$(t))return t;var e=t+"";return"0"==e&&1/t==-1/0?"-0":e}function it(t,e){e=n9(e,t);for(var n=0,i=e.length;null!=t&&n<i;)t=t[n7(e[n++])];return n&&n==i?t:void 0}function ie(t,e,n){var i=null==t?void 0:it(t,e);return void 0===i?n:i}function ii(t,e){for(var n=-1,i=e.length,r=t.length;++n<i;)t[r+n]=e[n];return t}var ir=eL?eL.isConcatSpreadable:void 0;function io(t){return ej(t)||nE(t)||!!(ir&&t&&t[ir])}function ia(t,e,n,i,r){var o=-1,a=t.length;for(n||(n=io),r||(r=[]);++o<a;){var s=t[o];e>0&&n(s)?e>1?ia(s,e-1,n,i,r):ii(r,s):i||(r[r.length]=s)}return r}var is=nU(Object.getPrototypeOf,Object),il=Object.prototype,ic=Function.prototype.toString,iu=il.hasOwnProperty,ih=ic.call(Object);function id(t){if(!eH(t)||"[object Object]"!=eF(t))return!1;var e=is(t);if(null===e)return!0;var n=iu.call(e,"constructor")&&e.constructor;return"function"==typeof n&&n instanceof n&&ic.call(n)==ih}function ip(t){var e=this.__data__=new nJ(t);this.size=e.size}ip.prototype.clear=function(){this.__data__=new nJ,this.size=0},ip.prototype.delete=function(t){var e=this.__data__,n=e.delete(t);return this.size=e.size,n},ip.prototype.get=function(t){return this.__data__.get(t)},ip.prototype.has=function(t){return this.__data__.has(t)},ip.prototype.set=function(t,e){var n=this.__data__;if(n instanceof nJ){var i=n.__data__;if(!n0||i.length<199)return i.push([t,e]),this.size=++n.size,this;n=this.__data__=new n2(i)}return n.set(t,e),this.size=n.size,this};var ig="object"==typeof exports&&exports&&!exports.nodeType&&exports,im=ig&&"object"==typeof module&&module&&!module.nodeType&&module,iy=im&&im.exports===ig?eC.Buffer:void 0,iv=iy?iy.allocUnsafe:void 0;function i_(t,e){if(e)return t.slice();var n=t.length,i=iv?iv(n):new t.constructor(n);return t.copy(i),i}function ib(){return[]}var ix=Object.prototype.propertyIsEnumerable,iE=Object.getOwnPropertySymbols,iw=iE?function(t){return null==t?[]:function(t,e){for(var n=-1,i=null==t?0:t.length,r=0,o=[];++n<i;){var a=t[n];e(a,n,t)&&(o[r++]=a)}return o}(iE(t=Object(t)),function(e){return ix.call(t,e)})}:ib,iT=Object.getOwnPropertySymbols?function(t){for(var e=[];t;)ii(e,iw(t)),t=is(t);return e}:ib;function iS(t,e,n){var i=e(t);return ej(t)?i:ii(i,n(t))}function iO(t){return iS(t,n$,iw)}function iM(t){return iS(t,nj,iT)}var iA=e5(eC,"DataView"),iD=e5(eC,"Promise"),ik=e5(eC,"Set"),iC="[object Map]",iL="[object Promise]",iR="[object Set]",iI="[object WeakMap]",iN="[object DataView]",iP=eQ(iA),iU=eQ(n0),iB=eQ(iD),iF=eQ(ik),iH=eQ(e4),i$=eF;(iA&&i$(new iA(new ArrayBuffer(1)))!=iN||n0&&i$(new n0)!=iC||iD&&i$(iD.resolve())!=iL||ik&&i$(new ik)!=iR||e4&&i$(new e4)!=iI)&&(i$=function(t){var e=eF(t),n="[object Object]"==e?t.constructor:void 0,i=n?eQ(n):"";if(i)switch(i){case iP:return iN;case iU:return iC;case iB:return iL;case iF:return iR;case iH:return iI}return e});var iz=Object.prototype.hasOwnProperty,ij=eC.Uint8Array;function iG(t){var e=new t.constructor(t.byteLength);return new ij(e).set(new ij(t)),e}var iV=/\w*$/,iW=eL?eL.prototype:void 0,iY=iW?iW.valueOf:void 0;function iZ(t,e){var n=e?iG(t.buffer):t.buffer;return new t.constructor(n,t.byteOffset,t.length)}function iX(t){return"function"!=typeof t.constructor||ny(t)?{}:e6(is(t))}var iq=nL&&nL.isMap,iK=iq?nA(iq):function(t){return eH(t)&&"[object Map]"==i$(t)},iQ=nL&&nL.isSet,iJ=iQ?nA(iQ):function(t){return eH(t)&&"[object Set]"==i$(t)},i0="[object Arguments]",i1="[object Function]",i2="[object Object]",i3={};function i5(t,e,n,i,r,o){var a,s=1&e,l=2&e,c=4&e;if(n&&(a=r?n(t,i,r,o):n(t)),void 0!==a)return a;if(!eW(t))return t;var u=ej(t);if(u){if(h=t.length,d=new t.constructor(h),h&&"string"==typeof t[0]&&iz.call(t,"index")&&(d.index=t.index,d.input=t.input),a=d,!s)return e9(t,a)}else{var h,d,f,p,g,m,y=i$(t),v=y==i1||"[object GeneratorFunction]"==y;if(nO(t))return i_(t,s);if(y==i2||y==i0||v&&!r){if(a=l||v?{}:iX(t),!s)return l?(p=(f=a)&&nu(t,nj(t),f),nu(t,iT(t),p)):(m=(g=a)&&nu(t,n$(t),g),nu(t,iw(t),m))}else{if(!i3[y])return r?t:{};a=function(t,e,n){var i,r,o=t.constructor;switch(e){case"[object ArrayBuffer]":return iG(t);case"[object Boolean]":case"[object Date]":return new o(+t);case"[object DataView]":return i=n?iG(t.buffer):t.buffer,new t.constructor(i,t.byteOffset,t.byteLength);case"[object Float32Array]":case"[object Float64Array]":case"[object Int8Array]":case"[object Int16Array]":case"[object Int32Array]":case"[object Uint8Array]":case"[object Uint8ClampedArray]":case"[object Uint16Array]":case"[object Uint32Array]":return iZ(t,n);case"[object Map]":case"[object Set]":return new o;case"[object Number]":case"[object String]":return new o(t);case"[object RegExp]":return(r=new t.constructor(t.source,iV.exec(t))).lastIndex=t.lastIndex,r;case"[object Symbol]":return iY?Object(iY.call(t)):{}}}(t,y,s)}}o||(o=new ip);var _=o.get(t);if(_)return _;o.set(t,a),iJ(t)?t.forEach(function(i){a.add(i5(i,e,n,i,t,o))}):iK(t)&&t.forEach(function(i,r){a.set(r,i5(i,e,n,r,t,o))});var b=c?l?iM:iO:l?nj:n$,x=u?void 0:b(t);return function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i&&!1!==e(t[n],n,t););}(x||t,function(i,r){x&&(i=t[r=i]),nc(a,r,i5(i,e,n,r,t,o))}),a}function i4(t){var e=-1,n=null==t?0:t.length;for(this.__data__=new n2;++e<n;)this.add(t[e])}i3[i0]=i3["[object Array]"]=i3["[object ArrayBuffer]"]=i3["[object DataView]"]=i3["[object Boolean]"]=i3["[object Date]"]=i3["[object Float32Array]"]=i3["[object Float64Array]"]=i3["[object Int8Array]"]=i3["[object Int16Array]"]=i3["[object Int32Array]"]=i3["[object Map]"]=i3["[object Number]"]=i3[i2]=i3["[object RegExp]"]=i3["[object Set]"]=i3["[object String]"]=i3["[object Symbol]"]=i3["[object Uint8Array]"]=i3["[object Uint8ClampedArray]"]=i3["[object Uint16Array]"]=i3["[object Uint32Array]"]=!0,i3["[object Error]"]=i3[i1]=i3["[object WeakMap]"]=!1;function i8(t,e){return t.has(e)}function i6(t,e,n,i,r,o){var a=1&n,s=t.length,l=e.length;if(s!=l&&!(a&&l>s))return!1;var c=o.get(t),u=o.get(e);if(c&&u)return c==e&&u==t;var h=-1,d=!0,f=2&n?new i4:void 0;for(o.set(t,e),o.set(e,t);++h<s;){var p=t[h],g=e[h];if(i)var m=a?i(g,p,h,e,t,o):i(p,g,h,t,e,o);if(void 0!==m){if(m)continue;d=!1;break}if(f){if(!function(t,e){for(var n=-1,i=null==t?0:t.length;++n<i;)if(e(t[n],n,t))return!0;return!1}(e,function(t,e){if(!i8(f,e)&&(p===t||r(p,t,n,i,o)))return f.push(e)})){d=!1;break}}else if(!(p===g||r(p,g,n,i,o))){d=!1;break}}return o.delete(t),o.delete(e),d}function i9(t){var e=-1,n=Array(t.size);return t.forEach(function(t,i){n[++e]=[i,t]}),n}function i7(t){var e=-1,n=Array(t.size);return t.forEach(function(t){n[++e]=t}),n}i4.prototype.add=i4.prototype.push=function(t){return this.__data__.set(t,"__lodash_hash_undefined__"),this},i4.prototype.has=function(t){return this.__data__.has(t)};var rt=eL?eL.prototype:void 0,re=rt?rt.valueOf:void 0,rn=Object.prototype.hasOwnProperty,ri="[object Arguments]",rr="[object Array]",ro="[object Object]",ra=Object.prototype.hasOwnProperty;function rs(t,e,n,i,r){return t===e||(null!=t&&null!=e&&(eH(t)||eH(e))?function(t,e,n,i,r,o){var a=ej(t),s=ej(e),l=a?rr:i$(t),c=s?rr:i$(e);l=l==ri?ro:l,c=c==ri?ro:c;var u=l==ro,h=c==ro,d=l==c;if(d&&nO(t)){if(!nO(e))return!1;a=!0,u=!1}if(d&&!u)return o||(o=new ip),a||nI(t)?i6(t,e,n,i,r,o):function(t,e,n,i,r,o,a){switch(n){case"[object DataView]":if(t.byteLength!=e.byteLength||t.byteOffset!=e.byteOffset)break;t=t.buffer,e=e.buffer;case"[object ArrayBuffer]":return!(t.byteLength!=e.byteLength||!o(new ij(t),new ij(e)));case"[object Boolean]":case"[object Date]":case"[object Number]":return ns(+t,+e);case"[object Error]":return t.name==e.name&&t.message==e.message;case"[object RegExp]":case"[object String]":return t==e+"";case"[object Map]":var s=i9;case"[object Set]":var l=1&i;if(s||(s=i7),t.size!=e.size&&!l)break;var c=a.get(t);if(c)return c==e;i|=2,a.set(t,e);var u=i6(s(t),s(e),i,r,o,a);return a.delete(t),u;case"[object Symbol]":if(re)return re.call(t)==re.call(e)}return!1}(t,e,l,n,i,r,o);if(!(1&n)){var f=u&&ra.call(t,"__wrapped__"),p=h&&ra.call(e,"__wrapped__");if(f||p){var g=f?t.value():t,m=p?e.value():e;return o||(o=new ip),r(g,m,n,i,o)}}return!!d&&(o||(o=new ip),function(t,e,n,i,r,o){var a=1&n,s=iO(t),l=s.length;if(l!=iO(e).length&&!a)return!1;for(var c=l;c--;){var u=s[c];if(!(a?u in e:rn.call(e,u)))return!1}var h=o.get(t),d=o.get(e);if(h&&d)return h==e&&d==t;var f=!0;o.set(t,e),o.set(e,t);for(var p=a;++c<l;){var g=t[u=s[c]],m=e[u];if(i)var y=a?i(m,g,u,e,t,o):i(g,m,u,t,e,o);if(!(void 0===y?g===m||r(g,m,n,i,o):y)){f=!1;break}p||(p="constructor"==u)}if(f&&!p){var v=t.constructor,_=e.constructor;v!=_&&"constructor"in t&&"constructor"in e&&!("function"==typeof v&&v instanceof v&&"function"==typeof _&&_ instanceof _)&&(f=!1)}return o.delete(t),o.delete(e),f}(t,e,n,i,r,o))}(t,e,n,i,rs,r):t!=t&&e!=e)}function rl(t,e){return function(n){return null!=n&&n[t]===e&&(void 0!==e||t in Object(n))}}function rc(t,e){return null!=t&&e in Object(t)}function ru(t){var e,n,i,r,o;return"function"==typeof t?t:null==t?eY:"object"==typeof t?ej(t)?(e=t[0],n=t[1],nW(e)&&(i=n)==i&&!eW(i)?rl(n7(e),n):function(t){var i=ie(t,e);return void 0===i&&i===n?null!=t&&function(t,e,n){e=n9(e,t);for(var i=-1,r=e.length,o=!1;++i<r;){var a=n7(e[i]);if(!(o=null!=t&&n(t,a)))break;t=t[a]}return o||++i!=r?o:!!(r=null==t?0:t.length)&&np(r)&&no(a,r)&&(ej(t)||nE(t))}(t,e,rc):rs(n,i,3)}):1==(r=function(t){for(var e=n$(t),n=e.length;n--;){var i=e[n],r=t[i];e[n]=[i,r,r==r&&!eW(r)]}return e}(t)).length&&r[0][2]?rl(r[0][0],r[0][1]):function(e){return e===t||function(t,e,n,i){var r=n.length,o=r;if(null==t)return!o;for(t=Object(t);r--;){var a=n[r];if(a[2]?a[1]!==t[a[0]]:!(a[0]in t))return!1}for(;++r<o;){var s=(a=n[r])[0],l=t[s],c=a[1];if(a[2]){if(void 0===l&&!(s in t))return!1}else{var u,h=new ip;if(!(void 0===u?rs(c,l,3,void 0,h):u))return!1}}return!0}(e,0,r)}:nW(t)?(o=n7(t),function(t){return t?.[o]}):function(e){return it(e,t)}}var rh=function(t,e,n){for(var i=-1,r=Object(t),o=n(t),a=o.length;a--;){var s=o[++i];if(!1===e(r[s],s,r))break}return t};function rd(t,e,n){(void 0===n||ns(t[e],n))&&(void 0!==n||e in t)||na(t,e,n)}function rf(t){return eH(t)&&ng(t)}function rp(t,e){if(("constructor"!==e||"function"!=typeof t[e])&&"__proto__"!=e)return t[e]}function rg(t){var e=null==t?0:t.length;return e?t[e-1]:void 0}var rm=Object.prototype.hasOwnProperty,ry=(al=function(t,e,n){!function t(e,n,i,r,o){e!==n&&rh(n,function(a,s){if(o||(o=new ip),eW(a))!function(t,e,n,i,r,o,a){var s=rp(t,n),l=rp(e,n),c=a.get(l);if(c)return rd(t,n,c);var u=o?o(s,l,n+"",t,e,a):void 0,h=void 0===u;if(h){var d=ej(l),f=!d&&nO(l),p=!d&&!f&&nI(l);u=l,d||f||p?ej(s)?u=s:rf(s)?u=e9(s):f?(h=!1,u=i_(l,!0)):p?(h=!1,u=iZ(l,!0)):u=[]:id(l)||nE(l)?(u=s,nE(s)?u=nu(s,nj(s)):(!eW(s)||eZ(s))&&(u=iX(l))):h=!1}h&&(a.set(l,u),r(u,l,i,o,a),a.delete(l)),rd(t,n,u)}(e,n,s,i,t,r,o);else{var l=r?r(rp(e,s),a,s+"",e,n,o):void 0;void 0===l&&(l=a),rd(e,s,l)}},nj)}(t,e,n)},nf(function(t,e){var n=-1,i=e.length,r=i>1?e[i-1]:void 0,o=i>2?e[2]:void 0;for(r=al.length>3&&"function"==typeof r?(i--,r):void 0,o&&function(t,e,n){if(!eW(n))return!1;var i=typeof e;return("number"==i?!!(ng(n)&&no(e,n.length)):"string"==i&&e in n)&&ns(n[e],t)}(e[0],e[1],o)&&(r=i<3?void 0:r,i=1),t=Object(t);++n<i;){var a=e[n];a&&al(t,a,n,r)}return t})),rv=ik&&1/i7(new ik([,-0]))[1]==1/0?function(t){return new ik(t)}:function(){};function r_(t,e,n){var i=-1,r=ni,o=t.length,a=!0,s=[],l=s;if(o>=200){var c=e?null:rv(t);if(c)return i7(c);a=!1,r=i8,l=new i4}else l=e?[]:s;t:for(;++i<o;){var u=t[i],h=e?e(u):u;if(u=0!==u?u:0,a&&h==h){for(var d=l.length;d--;)if(l[d]===h)continue t;e&&l.push(h),s.push(u)}else r(l,h,n)||(l!==s&&l.push(h),s.push(u))}return s}var rb=nf(function(t){var e=rg(t);return rf(e)&&(e=void 0),r_(ia(t,1,rf,!0),ru(e))});function rx(t){return t&&t.length?r_(t):[]}function rE(t,e){return null==t||null==e?NaN:t<e?-1:t>e?1:t>=e?0:NaN}function rw(t,e){return null==t||null==e?NaN:e<t?-1:e>t?1:e>=t?0:NaN}function rT(t){let e,n,i;function r(t,i,o=0,a=t.length){if(o<a){if(0!==e(i,i))return a;do{let e=o+a>>>1;0>n(t[e],i)?o=e+1:a=e}while(o<a)}return o}return 2!==t.length?(e=rE,n=(e,n)=>rE(t(e),n),i=(e,n)=>t(e)-n):(e=t===rE||t===rw?t:rS,n=t,i=t),{left:r,center:function(t,e,n=0,o=t.length){let a=r(t,e,n,o-1);return a>n&&i(t[a-1],e)>-i(t[a],e)?a-1:a},right:function(t,i,r=0,o=t.length){if(r<o){if(0!==e(i,i))return o;do{let e=r+o>>>1;0>=n(t[e],i)?r=e+1:o=e}while(r<o)}return r}}}function rS(){return 0}let rO=rT(rE).right;function rM(t,e){let n,i;if(void 0===e)for(let e of t)null!=e&&(void 0===n?e>=e&&(n=i=e):(n>e&&(n=e),i<e&&(i=e)));else{let r=-1;for(let o of t)null!=(o=e(o,++r,t))&&(void 0===n?o>=o&&(n=i=o):(n>o&&(n=o),i<o&&(i=o)))}return[n,i]}rT(function(t){return null===t?NaN:+t}).center;let rA=class extends Map{constructor(t,e=rk){if(super(),Object.defineProperties(this,{_intern:{value:new Map},_key:{value:e}}),null!=t)for(const[e,n]of t)this.set(e,n)}get(t){return super.get(rD(this,t))}has(t){return super.has(rD(this,t))}set(t,e){return super.set(function({_intern:t,_key:e},n){let i=e(n);return t.has(i)?t.get(i):(t.set(i,n),n)}(this,t),e)}delete(t){return super.delete(function({_intern:t,_key:e},n){let i=e(n);return t.has(i)&&(n=t.get(i),t.delete(i)),n}(this,t))}};function rD({_intern:t,_key:e},n){let i=e(n);return t.has(i)?t.get(i):n}function rk(t){return null!==t&&"object"==typeof t?t.valueOf():t}let rC=Math.sqrt(50),rL=Math.sqrt(10),rR=Math.sqrt(2);function rI(t,e,n){let i,r,o,a=(e-t)/Math.max(0,n),s=Math.floor(Math.log10(a)),l=a/Math.pow(10,s),c=l>=rC?10:l>=rL?5:l>=rR?2:1;return s<0?(i=Math.round(t*(o=Math.pow(10,-s)/c)),r=Math.round(e*o),i/o<t&&++i,r/o>e&&--r,o=-o):(i=Math.round(t/(o=Math.pow(10,s)*c)),r=Math.round(e/o),i*o<t&&++i,r*o>e&&--r),r<i&&.5<=n&&n<2?rI(t,e,2*n):[i,r,o]}function rN(t,e,n){if(e*=1,t*=1,!((n*=1)>0))return[];if(t===e)return[t];let i=e<t,[r,o,a]=i?rI(e,t,n):rI(t,e,n);if(!(o>=r))return[];let s=o-r+1,l=Array(s);if(i)if(a<0)for(let t=0;t<s;++t)l[t]=-((o-t)/a);else for(let t=0;t<s;++t)l[t]=(o-t)*a;else if(a<0)for(let t=0;t<s;++t)l[t]=-((r+t)/a);else for(let t=0;t<s;++t)l[t]=(r+t)*a;return l}function rP(t,e,n){return rI(t*=1,e*=1,n*=1)[2]}function rU(t,e,n){e*=1,t*=1,n*=1;let i=e<t,r=i?rP(e,t,n):rP(t,e,n);return(i?-1:1)*(r<0?-(1/r):r)}var rB={value:()=>{}};function rF(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw Error("illegal type: "+t);i[t]=[]}return new rH(i)}function rH(t){this._=t}function r$(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=rB,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}rH.prototype=rF.prototype={constructor:rH,on:function(t,e){var n,i=this._,r=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((n=(t=r[o]).type)&&(n=function(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}(i[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=r[o]).type)i[n]=r$(i[n],t.name,e);else if(null==e)for(n in i)i[n]=r$(i[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new rH(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(i=this._[t],o=0,n=i.length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};var rz="http://www.w3.org/1999/xhtml";let rj={svg:"http://www.w3.org/2000/svg",xhtml:rz,xlink:"http://www.w3.org/1999/xlink",xml:"http://www.w3.org/XML/1998/namespace",xmlns:"http://www.w3.org/2000/xmlns/"};function rG(t){var e=t+="",n=e.indexOf(":");return n>=0&&"xmlns"!==(e=t.slice(0,n))&&(t=t.slice(n+1)),rj.hasOwnProperty(e)?{space:rj[e],local:t}:t}function rV(t){var e=rG(t);return(e.local?function(t){return function(){return this.ownerDocument.createElementNS(t.space,t.local)}}:function(t){return function(){var e=this.ownerDocument,n=this.namespaceURI;return n===rz&&e.documentElement.namespaceURI===rz?e.createElement(t):e.createElementNS(n,t)}})(e)}function rW(){}function rY(t){return null==t?rW:function(){return this.querySelector(t)}}function rZ(){return[]}function rX(t){return null==t?rZ:function(){return this.querySelectorAll(t)}}function rq(t){return function(){return this.matches(t)}}function rK(t){return function(e){return e.matches(t)}}var rQ=Array.prototype.find;function rJ(){return this.firstElementChild}var r0=Array.prototype.filter;function r1(){return Array.from(this.children)}function r2(t){return Array(t.length)}function r3(t,e){this.ownerDocument=t.ownerDocument,this.namespaceURI=t.namespaceURI,this._next=null,this._parent=t,this.__data__=e}function r5(t,e,n,i,r,o){for(var a,s=0,l=e.length,c=o.length;s<c;++s)(a=e[s])?(a.__data__=o[s],i[s]=a):n[s]=new r3(t,o[s]);for(;s<l;++s)(a=e[s])&&(r[s]=a)}function r4(t,e,n,i,r,o,a){var s,l,c,u=new Map,h=e.length,d=o.length,f=Array(h);for(s=0;s<h;++s)(l=e[s])&&(f[s]=c=a.call(l,l.__data__,s,e)+"",u.has(c)?r[s]=l:u.set(c,l));for(s=0;s<d;++s)c=a.call(t,o[s],s,o)+"",(l=u.get(c))?(i[s]=l,l.__data__=o[s],u.delete(c)):n[s]=new r3(t,o[s]);for(s=0;s<h;++s)(l=e[s])&&u.get(f[s])===l&&(r[s]=l)}function r8(t){return t.__data__}function r6(t,e){return t<e?-1:t>e?1:t>=e?0:NaN}function r9(t){return t.ownerDocument&&t.ownerDocument.defaultView||t.document&&t||t.defaultView}function r7(t,e){return t.style.getPropertyValue(e)||r9(t).getComputedStyle(t,null).getPropertyValue(e)}function ot(t){return t.trim().split(/^|\s+/)}function oe(t){return t.classList||new on(t)}function on(t){this._node=t,this._names=ot(t.getAttribute("class")||"")}function oi(t,e){for(var n=oe(t),i=-1,r=e.length;++i<r;)n.add(e[i])}function or(t,e){for(var n=oe(t),i=-1,r=e.length;++i<r;)n.remove(e[i])}function oo(){this.textContent=""}function oa(){this.innerHTML=""}function os(){this.nextSibling&&this.parentNode.appendChild(this)}function ol(){this.previousSibling&&this.parentNode.insertBefore(this,this.parentNode.firstChild)}function oc(){return null}function ou(){var t=this.parentNode;t&&t.removeChild(this)}function oh(){var t=this.cloneNode(!1),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function od(){var t=this.cloneNode(!0),e=this.parentNode;return e?e.insertBefore(t,this.nextSibling):t}function of(t){return function(){var e=this.__on;if(e){for(var n,i=0,r=-1,o=e.length;i<o;++i)n=e[i],t.type&&n.type!==t.type||n.name!==t.name?e[++r]=n:this.removeEventListener(n.type,n.listener,n.options);++r?e.length=r:delete this.__on}}}function op(t,e,n){return function(){var i,r=this.__on,o=function(t){e.call(this,t,this.__data__)};if(r){for(var a=0,s=r.length;a<s;++a)if((i=r[a]).type===t.type&&i.name===t.name){this.removeEventListener(i.type,i.listener,i.options),this.addEventListener(i.type,i.listener=o,i.options=n),i.value=e;return}}this.addEventListener(t.type,o,n),i={type:t.type,name:t.name,value:e,listener:o,options:n},r?r.push(i):this.__on=[i]}}function og(t,e,n){var i=r9(t),r=i.CustomEvent;"function"==typeof r?r=new r(e,n):(r=i.document.createEvent("Event"),n?(r.initEvent(e,n.bubbles,n.cancelable),r.detail=n.detail):r.initEvent(e,!1,!1)),t.dispatchEvent(r)}r3.prototype={constructor:r3,appendChild:function(t){return this._parent.insertBefore(t,this._next)},insertBefore:function(t,e){return this._parent.insertBefore(t,e)},querySelector:function(t){return this._parent.querySelector(t)},querySelectorAll:function(t){return this._parent.querySelectorAll(t)}},on.prototype={add:function(t){0>this._names.indexOf(t)&&(this._names.push(t),this._node.setAttribute("class",this._names.join(" ")))},remove:function(t){var e=this._names.indexOf(t);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(t){return this._names.indexOf(t)>=0}};var om=[null];function oy(t,e){this._groups=t,this._parents=e}function ov(){return new oy([[document.documentElement]],om)}function o_(t,e){if(t=function(t){let e;for(;e=t.sourceEvent;)t=e;return t}(t),void 0===e&&(e=t.currentTarget),e){var n=e.ownerSVGElement||e;if(n.createSVGPoint){var i=n.createSVGPoint();return i.x=t.clientX,i.y=t.clientY,[(i=i.matrixTransform(e.getScreenCTM().inverse())).x,i.y]}if(e.getBoundingClientRect){var r=e.getBoundingClientRect();return[t.clientX-r.left-e.clientLeft,t.clientY-r.top-e.clientTop]}}return[t.pageX,t.pageY]}function ob(t,e,n){t.prototype=e.prototype=n,n.constructor=t}function ox(t,e){var n=Object.create(t.prototype);for(var i in e)n[i]=e[i];return n}function oE(){}oy.prototype=ov.prototype={constructor:oy,select:function(t){"function"!=typeof t&&(t=rY(t));for(var e=this._groups,n=e.length,i=Array(n),r=0;r<n;++r)for(var o,a,s=e[r],l=s.length,c=i[r]=Array(l),u=0;u<l;++u)(o=s[u])&&(a=t.call(o,o.__data__,u,s))&&("__data__"in o&&(a.__data__=o.__data__),c[u]=a);return new oy(i,this._parents)},selectAll:function(t){var e;"function"==typeof t?(e=t,t=function(){var t;return t=e.apply(this,arguments),null==t?[]:Array.isArray(t)?t:Array.from(t)}):t=rX(t);for(var n=this._groups,i=n.length,r=[],o=[],a=0;a<i;++a)for(var s,l=n[a],c=l.length,u=0;u<c;++u)(s=l[u])&&(r.push(t.call(s,s.__data__,u,l)),o.push(s));return new oy(r,o)},selectChild:function(t){var e;return this.select(null==t?rJ:(e="function"==typeof t?t:rK(t),function(){return rQ.call(this.children,e)}))},selectChildren:function(t){var e;return this.selectAll(null==t?r1:(e="function"==typeof t?t:rK(t),function(){return r0.call(this.children,e)}))},filter:function(t){"function"!=typeof t&&(t=rq(t));for(var e=this._groups,n=e.length,i=Array(n),r=0;r<n;++r)for(var o,a=e[r],s=a.length,l=i[r]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new oy(i,this._parents)},data:function(t,e){if(!arguments.length)return Array.from(this,r8);var n=e?r4:r5,i=this._parents,r=this._groups;"function"!=typeof t&&(v=t,t=function(){return v});for(var o=r.length,a=Array(o),s=Array(o),l=Array(o),c=0;c<o;++c){var u=i[c],h=r[c],d=h.length,f="object"==typeof(y=t.call(u,u&&u.__data__,c,i))&&"length"in y?y:Array.from(y),p=f.length,g=s[c]=Array(p),m=a[c]=Array(p);n(u,h,g,m,l[c]=Array(d),f,e);for(var y,v,_,b,x=0,E=0;x<p;++x)if(_=g[x]){for(x>=E&&(E=x+1);!(b=m[E])&&++E<p;);_._next=b||null}}return(a=new oy(a,i))._enter=s,a._exit=l,a},enter:function(){return new oy(this._enter||this._groups.map(r2),this._parents)},exit:function(){return new oy(this._exit||this._groups.map(r2),this._parents)},join:function(t,e,n){var i=this.enter(),r=this,o=this.exit();return"function"==typeof t?(i=t(i))&&(i=i.selection()):i=i.append(t+""),null!=e&&(r=e(r))&&(r=r.selection()),null==n?o.remove():n(o),i&&r?i.merge(r).order():r},merge:function(t){for(var e=t.selection?t.selection():t,n=this._groups,i=e._groups,r=n.length,o=i.length,a=Math.min(r,o),s=Array(r),l=0;l<a;++l)for(var c,u=n[l],h=i[l],d=u.length,f=s[l]=Array(d),p=0;p<d;++p)(c=u[p]||h[p])&&(f[p]=c);for(;l<r;++l)s[l]=n[l];return new oy(s,this._parents)},selection:function(){return this},order:function(){for(var t=this._groups,e=-1,n=t.length;++e<n;)for(var i,r=t[e],o=r.length-1,a=r[o];--o>=0;)(i=r[o])&&(a&&4^i.compareDocumentPosition(a)&&a.parentNode.insertBefore(i,a),a=i);return this},sort:function(t){function e(e,n){return e&&n?t(e.__data__,n.__data__):!e-!n}t||(t=r6);for(var n=this._groups,i=n.length,r=Array(i),o=0;o<i;++o){for(var a,s=n[o],l=s.length,c=r[o]=Array(l),u=0;u<l;++u)(a=s[u])&&(c[u]=a);c.sort(e)}return new oy(r,this._parents).order()},call:function(){var t=arguments[0];return arguments[0]=this,t.apply(null,arguments),this},nodes:function(){return Array.from(this)},node:function(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i=t[e],r=0,o=i.length;r<o;++r){var a=i[r];if(a)return a}return null},size:function(){let t=0;for(let e of this)++t;return t},empty:function(){return!this.node()},each:function(t){for(var e=this._groups,n=0,i=e.length;n<i;++n)for(var r,o=e[n],a=0,s=o.length;a<s;++a)(r=o[a])&&t.call(r,r.__data__,a,o);return this},attr:function(t,e){var n=rG(t);if(arguments.length<2){var i=this.node();return n.local?i.getAttributeNS(n.space,n.local):i.getAttribute(n)}return this.each((null==e?n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}}:"function"==typeof e?n.local?function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttributeNS(t.space,t.local):this.setAttributeNS(t.space,t.local,n)}}:function(t,e){return function(){var n=e.apply(this,arguments);null==n?this.removeAttribute(t):this.setAttribute(t,n)}}:n.local?function(t,e){return function(){this.setAttributeNS(t.space,t.local,e)}}:function(t,e){return function(){this.setAttribute(t,e)}})(n,e))},style:function(t,e,n){return arguments.length>1?this.each((null==e?function(t){return function(){this.style.removeProperty(t)}}:"function"==typeof e?function(t,e,n){return function(){var i=e.apply(this,arguments);null==i?this.style.removeProperty(t):this.style.setProperty(t,i,n)}}:function(t,e,n){return function(){this.style.setProperty(t,e,n)}})(t,e,n??"")):r7(this.node(),t)},property:function(t,e){return arguments.length>1?this.each((null==e?function(t){return function(){delete this[t]}}:"function"==typeof e?function(t,e){return function(){var n=e.apply(this,arguments);null==n?delete this[t]:this[t]=n}}:function(t,e){return function(){this[t]=e}})(t,e)):this.node()[t]},classed:function(t,e){var n=ot(t+"");if(arguments.length<2){for(var i=oe(this.node()),r=-1,o=n.length;++r<o;)if(!i.contains(n[r]))return!1;return!0}return this.each(("function"==typeof e?function(t,e){return function(){(e.apply(this,arguments)?oi:or)(this,t)}}:e?function(t){return function(){oi(this,t)}}:function(t){return function(){or(this,t)}})(n,e))},text:function(t){return arguments.length?this.each(null==t?oo:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.textContent=e??""}}:function(t){return function(){this.textContent=t}})(t)):this.node().textContent},html:function(t){return arguments.length?this.each(null==t?oa:("function"==typeof t?function(t){return function(){var e=t.apply(this,arguments);this.innerHTML=e??""}}:function(t){return function(){this.innerHTML=t}})(t)):this.node().innerHTML},raise:function(){return this.each(os)},lower:function(){return this.each(ol)},append:function(t){var e="function"==typeof t?t:rV(t);return this.select(function(){return this.appendChild(e.apply(this,arguments))})},insert:function(t,e){var n="function"==typeof t?t:rV(t),i=null==e?oc:"function"==typeof e?e:rY(e);return this.select(function(){return this.insertBefore(n.apply(this,arguments),i.apply(this,arguments)||null)})},remove:function(){return this.each(ou)},clone:function(t){return this.select(t?od:oh)},datum:function(t){return arguments.length?this.property("__data__",t):this.node().__data__},on:function(t,e,n){var i,r,o=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");return n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}}),a=o.length;if(arguments.length<2){var s=this.node().__on;if(s){for(var l,c=0,u=s.length;c<u;++c)for(i=0,l=s[c];i<a;++i)if((r=o[i]).type===l.type&&r.name===l.name)return l.value}return}for(s=e?op:of,i=0;i<a;++i)this.each(s(o[i],e,n));return this},dispatch:function(t,e){return this.each(("function"==typeof e?function(t,e){return function(){return og(this,t,e.apply(this,arguments))}}:function(t,e){return function(){return og(this,t,e)}})(t,e))},[Symbol.iterator]:function*(){for(var t=this._groups,e=0,n=t.length;e<n;++e)for(var i,r=t[e],o=0,a=r.length;o<a;++o)(i=r[o])&&(yield i)}};var ow="\\s*([+-]?\\d+)\\s*",oT="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)\\s*",oS="\\s*([+-]?(?:\\d*\\.)?\\d+(?:[eE][+-]?\\d+)?)%\\s*",oO=/^#([0-9a-f]{3,8})$/,oM=RegExp(`^rgb\\(${ow},${ow},${ow}\\)$`),oA=RegExp(`^rgb\\(${oS},${oS},${oS}\\)$`),oD=RegExp(`^rgba\\(${ow},${ow},${ow},${oT}\\)$`),ok=RegExp(`^rgba\\(${oS},${oS},${oS},${oT}\\)$`),oC=RegExp(`^hsl\\(${oT},${oS},${oS}\\)$`),oL=RegExp(`^hsla\\(${oT},${oS},${oS},${oT}\\)$`),oR={aliceblue:0xf0f8ff,antiquewhite:0xfaebd7,aqua:65535,aquamarine:8388564,azure:0xf0ffff,beige:0xf5f5dc,bisque:0xffe4c4,black:0,blanchedalmond:0xffebcd,blue:255,blueviolet:9055202,brown:0xa52a2a,burlywood:0xdeb887,cadetblue:6266528,chartreuse:8388352,chocolate:0xd2691e,coral:0xff7f50,cornflowerblue:6591981,cornsilk:0xfff8dc,crimson:0xdc143c,cyan:65535,darkblue:139,darkcyan:35723,darkgoldenrod:0xb8860b,darkgray:0xa9a9a9,darkgreen:25600,darkgrey:0xa9a9a9,darkkhaki:0xbdb76b,darkmagenta:9109643,darkolivegreen:5597999,darkorange:0xff8c00,darkorchid:0x9932cc,darkred:9109504,darksalmon:0xe9967a,darkseagreen:9419919,darkslateblue:4734347,darkslategray:3100495,darkslategrey:3100495,darkturquoise:52945,darkviolet:9699539,deeppink:0xff1493,deepskyblue:49151,dimgray:6908265,dimgrey:6908265,dodgerblue:2003199,firebrick:0xb22222,floralwhite:0xfffaf0,forestgreen:2263842,fuchsia:0xff00ff,gainsboro:0xdcdcdc,ghostwhite:0xf8f8ff,gold:0xffd700,goldenrod:0xdaa520,gray:8421504,green:32768,greenyellow:0xadff2f,grey:8421504,honeydew:0xf0fff0,hotpink:0xff69b4,indianred:0xcd5c5c,indigo:4915330,ivory:0xfffff0,khaki:0xf0e68c,lavender:0xe6e6fa,lavenderblush:0xfff0f5,lawngreen:8190976,lemonchiffon:0xfffacd,lightblue:0xadd8e6,lightcoral:0xf08080,lightcyan:0xe0ffff,lightgoldenrodyellow:0xfafad2,lightgray:0xd3d3d3,lightgreen:9498256,lightgrey:0xd3d3d3,lightpink:0xffb6c1,lightsalmon:0xffa07a,lightseagreen:2142890,lightskyblue:8900346,lightslategray:7833753,lightslategrey:7833753,lightsteelblue:0xb0c4de,lightyellow:0xffffe0,lime:65280,limegreen:3329330,linen:0xfaf0e6,magenta:0xff00ff,maroon:8388608,mediumaquamarine:6737322,mediumblue:205,mediumorchid:0xba55d3,mediumpurple:9662683,mediumseagreen:3978097,mediumslateblue:8087790,mediumspringgreen:64154,mediumturquoise:4772300,mediumvioletred:0xc71585,midnightblue:1644912,mintcream:0xf5fffa,mistyrose:0xffe4e1,moccasin:0xffe4b5,navajowhite:0xffdead,navy:128,oldlace:0xfdf5e6,olive:8421376,olivedrab:7048739,orange:0xffa500,orangered:0xff4500,orchid:0xda70d6,palegoldenrod:0xeee8aa,palegreen:0x98fb98,paleturquoise:0xafeeee,palevioletred:0xdb7093,papayawhip:0xffefd5,peachpuff:0xffdab9,peru:0xcd853f,pink:0xffc0cb,plum:0xdda0dd,powderblue:0xb0e0e6,purple:8388736,rebeccapurple:6697881,red:0xff0000,rosybrown:0xbc8f8f,royalblue:4286945,saddlebrown:9127187,salmon:0xfa8072,sandybrown:0xf4a460,seagreen:3050327,seashell:0xfff5ee,sienna:0xa0522d,silver:0xc0c0c0,skyblue:8900331,slateblue:6970061,slategray:7372944,slategrey:7372944,snow:0xfffafa,springgreen:65407,steelblue:4620980,tan:0xd2b48c,teal:32896,thistle:0xd8bfd8,tomato:0xff6347,turquoise:4251856,violet:0xee82ee,wheat:0xf5deb3,white:0xffffff,whitesmoke:0xf5f5f5,yellow:0xffff00,yellowgreen:0x9acd32};function oI(){return this.rgb().formatHex()}function oN(){return this.rgb().formatRgb()}function oP(t){var e,n;return t=(t+"").trim().toLowerCase(),(e=oO.exec(t))?(n=e[1].length,e=parseInt(e[1],16),6===n?oU(e):3===n?new oH(e>>8&15|e>>4&240,e>>4&15|240&e,(15&e)<<4|15&e,1):8===n?oB(e>>24&255,e>>16&255,e>>8&255,(255&e)/255):4===n?oB(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|240&e,((15&e)<<4|15&e)/255):null):(e=oM.exec(t))?new oH(e[1],e[2],e[3],1):(e=oA.exec(t))?new oH(255*e[1]/100,255*e[2]/100,255*e[3]/100,1):(e=oD.exec(t))?oB(e[1],e[2],e[3],e[4]):(e=ok.exec(t))?oB(255*e[1]/100,255*e[2]/100,255*e[3]/100,e[4]):(e=oC.exec(t))?oW(e[1],e[2]/100,e[3]/100,1):(e=oL.exec(t))?oW(e[1],e[2]/100,e[3]/100,e[4]):oR.hasOwnProperty(t)?oU(oR[t]):"transparent"===t?new oH(NaN,NaN,NaN,0):null}function oU(t){return new oH(t>>16&255,t>>8&255,255&t,1)}function oB(t,e,n,i){return i<=0&&(t=e=n=NaN),new oH(t,e,n,i)}function oF(t,e,n,i){var r;return 1==arguments.length?((r=t)instanceof oE||(r=oP(r)),r?new oH((r=r.rgb()).r,r.g,r.b,r.opacity):new oH):new oH(t,e,n,i??1)}function oH(t,e,n,i){this.r=+t,this.g=+e,this.b=+n,this.opacity=+i}function o$(){return`#${oV(this.r)}${oV(this.g)}${oV(this.b)}`}function oz(){let t=oj(this.opacity);return`${1===t?"rgb(":"rgba("}${oG(this.r)}, ${oG(this.g)}, ${oG(this.b)}${1===t?")":`, ${t})`}`}function oj(t){return isNaN(t)?1:Math.max(0,Math.min(1,t))}function oG(t){return Math.max(0,Math.min(255,Math.round(t)||0))}function oV(t){return((t=oG(t))<16?"0":"")+t.toString(16)}function oW(t,e,n,i){return i<=0?t=e=n=NaN:n<=0||n>=1?t=e=NaN:e<=0&&(t=NaN),new oZ(t,e,n,i)}function oY(t){if(t instanceof oZ)return new oZ(t.h,t.s,t.l,t.opacity);if(t instanceof oE||(t=oP(t)),!t)return new oZ;if(t instanceof oZ)return t;var e=(t=t.rgb()).r/255,n=t.g/255,i=t.b/255,r=Math.min(e,n,i),o=Math.max(e,n,i),a=NaN,s=o-r,l=(o+r)/2;return s?(a=e===o?(n-i)/s+(n<i)*6:n===o?(i-e)/s+2:(e-n)/s+4,s/=l<.5?o+r:2-o-r,a*=60):s=l>0&&l<1?0:a,new oZ(a,s,l,t.opacity)}function oZ(t,e,n,i){this.h=+t,this.s=+e,this.l=+n,this.opacity=+i}function oX(t){return(t=(t||0)%360)<0?t+360:t}function oq(t){return Math.max(0,Math.min(1,t||0))}function oK(t,e,n){return(t<60?e+(n-e)*t/60:t<180?n:t<240?e+(n-e)*(240-t)/60:e)*255}ob(oE,oP,{copy(t){return Object.assign(new this.constructor,this,t)},displayable(){return this.rgb().displayable()},hex:oI,formatHex:oI,formatHex8:function(){return this.rgb().formatHex8()},formatHsl:function(){return oY(this).formatHsl()},formatRgb:oN,toString:oN}),ob(oH,oF,ox(oE,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new oH(this.r*t,this.g*t,this.b*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new oH(this.r*t,this.g*t,this.b*t,this.opacity)},rgb(){return this},clamp(){return new oH(oG(this.r),oG(this.g),oG(this.b),oj(this.opacity))},displayable(){return -.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:o$,formatHex:o$,formatHex8:function(){return`#${oV(this.r)}${oV(this.g)}${oV(this.b)}${oV((isNaN(this.opacity)?1:this.opacity)*255)}`},formatRgb:oz,toString:oz})),ob(oZ,function(t,e,n,i){return 1==arguments.length?oY(t):new oZ(t,e,n,i??1)},ox(oE,{brighter(t){return t=null==t?1.4285714285714286:Math.pow(1.4285714285714286,t),new oZ(this.h,this.s,this.l*t,this.opacity)},darker(t){return t=null==t?.7:Math.pow(.7,t),new oZ(this.h,this.s,this.l*t,this.opacity)},rgb(){var t=this.h%360+(this.h<0)*360,e=isNaN(t)||isNaN(this.s)?0:this.s,n=this.l,i=n+(n<.5?n:1-n)*e,r=2*n-i;return new oH(oK(t>=240?t-240:t+120,r,i),oK(t,r,i),oK(t<120?t+240:t-120,r,i),this.opacity)},clamp(){return new oZ(oX(this.h),oq(this.s),oq(this.l),oj(this.opacity))},displayable(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl(){let t=oj(this.opacity);return`${1===t?"hsl(":"hsla("}${oX(this.h)}, ${100*oq(this.s)}%, ${100*oq(this.l)}%${1===t?")":`, ${t})`}`}}));let oQ=t=>()=>t;function oJ(t,e){var n=e-t;return n?function(e){return t+e*n}:oQ(isNaN(t)?e:t)}let o0=function t(e){var n,i=1==(n=+e)?oJ:function(t,e){var i,r,o;return e-t?(i=t,r=e,i=Math.pow(i,o=n),r=Math.pow(r,o)-i,o=1/o,function(t){return Math.pow(i+t*r,o)}):oQ(isNaN(t)?e:t)};function r(t,e){var n=i((t=oF(t)).r,(e=oF(e)).r),r=i(t.g,e.g),o=i(t.b,e.b),a=oJ(t.opacity,e.opacity);return function(e){return t.r=n(e),t.g=r(e),t.b=o(e),t.opacity=a(e),t+""}}return r.gamma=t,r}(1);function o1(t,e){return t*=1,e*=1,function(n){return t*(1-n)+e*n}}var o2=/[-+]?(?:\d+\.?\d*|\.?\d+)(?:[eE][-+]?\d+)?/g,o3=RegExp(o2.source,"g");function o5(t,e){var n,i,r,o,a,s=o2.lastIndex=o3.lastIndex=0,l=-1,c=[],u=[];for(t+="",e+="";(r=o2.exec(t))&&(o=o3.exec(e));)(a=o.index)>s&&(a=e.slice(s,a),c[l]?c[l]+=a:c[++l]=a),(r=r[0])===(o=o[0])?c[l]?c[l]+=o:c[++l]=o:(c[++l]=null,u.push({i:l,x:o1(r,o)})),s=o3.lastIndex;return s<e.length&&(a=e.slice(s),c[l]?c[l]+=a:c[++l]=a),c.length<2?u[0]?(n=u[0].x,function(t){return n(t)+""}):(i=e,function(){return i}):(e=u.length,function(t){for(var n,i=0;i<e;++i)c[(n=u[i]).i]=n.x(t);return c.join("")})}function o4(t,e){var n,i,r=typeof e;return null==e||"boolean"===r?oQ(e):("number"===r?o1:"string"===r?(i=oP(e))?(e=i,o0):o5:e instanceof oP?o0:e instanceof Date?function(t,e){var n=new Date;return t*=1,e*=1,function(i){return n.setTime(t*(1-i)+e*i),n}}:!ArrayBuffer.isView(n=e)||n instanceof DataView?Array.isArray(e)?function(t,e){var n,i=e?e.length:0,r=t?Math.min(i,t.length):0,o=Array(r),a=Array(i);for(n=0;n<r;++n)o[n]=o4(t[n],e[n]);for(;n<i;++n)a[n]=e[n];return function(t){for(n=0;n<r;++n)a[n]=o[n](t);return a}}:"function"!=typeof e.valueOf&&"function"!=typeof e.toString||isNaN(e)?function(t,e){var n,i={},r={};for(n in(null===t||"object"!=typeof t)&&(t={}),(null===e||"object"!=typeof e)&&(e={}),e)n in t?i[n]=o4(t[n],e[n]):r[n]=e[n];return function(t){for(n in i)r[n]=i[n](t);return r}}:o1:function(t,e){e||(e=[]);var n,i=t?Math.min(e.length,t.length):0,r=e.slice();return function(o){for(n=0;n<i;++n)r[n]=t[n]*(1-o)+e[n]*o;return r}})(t,e)}function o8(t,e){return t*=1,e*=1,function(n){return Math.round(t*(1-n)+e*n)}}var o6=180/Math.PI,o9={translateX:0,translateY:0,rotate:0,skewX:0,scaleX:1,scaleY:1};function o7(t,e,n,i,r,o){var a,s,l;return(a=Math.sqrt(t*t+e*e))&&(t/=a,e/=a),(l=t*n+e*i)&&(n-=t*l,i-=e*l),(s=Math.sqrt(n*n+i*i))&&(n/=s,i/=s,l/=s),t*i<e*n&&(t=-t,e=-e,l=-l,a=-a),{translateX:r,translateY:o,rotate:Math.atan2(e,t)*o6,skewX:Math.atan(l)*o6,scaleX:a,scaleY:s}}function at(t,e,n,i){function r(t){return t.length?t.pop()+" ":""}return function(o,a){var s,l,c,u,h=[],d=[];return o=t(o),a=t(a),function(t,i,r,o,a,s){if(t!==r||i!==o){var l=a.push("translate(",null,e,null,n);s.push({i:l-4,x:o1(t,r)},{i:l-2,x:o1(i,o)})}else(r||o)&&a.push("translate("+r+e+o+n)}(o.translateX,o.translateY,a.translateX,a.translateY,h,d),s=o.rotate,l=a.rotate,s!==l?(s-l>180?l+=360:l-s>180&&(s+=360),d.push({i:h.push(r(h)+"rotate(",null,i)-2,x:o1(s,l)})):l&&h.push(r(h)+"rotate("+l+i),c=o.skewX,u=a.skewX,c!==u?d.push({i:h.push(r(h)+"skewX(",null,i)-2,x:o1(c,u)}):u&&h.push(r(h)+"skewX("+u+i),function(t,e,n,i,o,a){if(t!==n||e!==i){var s=o.push(r(o)+"scale(",null,",",null,")");a.push({i:s-4,x:o1(t,n)},{i:s-2,x:o1(e,i)})}else(1!==n||1!==i)&&o.push(r(o)+"scale("+n+","+i+")")}(o.scaleX,o.scaleY,a.scaleX,a.scaleY,h,d),o=a=null,function(t){for(var e,n=-1,i=d.length;++n<i;)h[(e=d[n]).i]=e.x(t);return h.join("")}}}var ae,an,ai,ar,ao,aa,as,al,ac,au,ah,ad=at(function(t){let e=new("function"==typeof DOMMatrix?DOMMatrix:WebKitCSSMatrix)(t+"");return e.isIdentity?o9:o7(e.a,e.b,e.c,e.d,e.e,e.f)},"px, ","px)","deg)"),af=at(function(t){return null!=t&&(ac||(ac=document.createElementNS("http://www.w3.org/2000/svg","g")),ac.setAttribute("transform",t),t=ac.transform.baseVal.consolidate())?o7((t=t.matrix).a,t.b,t.c,t.d,t.e,t.f):o9},", ",")",")"),ap=0,ag=0,am=0,ay=0,av=0,a_=0,ab="object"==typeof performance&&performance.now?performance:Date,ax="object"==typeof window&&window.requestAnimationFrame?window.requestAnimationFrame.bind(window):function(t){setTimeout(t,17)};function aE(){return av||(ax(aw),av=ab.now()+a_)}function aw(){av=0}function aT(){this._call=this._time=this._next=null}function aS(t,e,n){var i=new aT;return i.restart(t,e,n),i}function aO(){av=(ay=ab.now())+a_,ap=ag=0;try{aE(),++ap;for(var t,e=au;e;)(t=av-e._time)>=0&&e._call.call(void 0,t),e=e._next;--ap}finally{ap=0,function(){for(var t,e,n=au,i=1/0;n;)n._call?(i>n._time&&(i=n._time),t=n,n=n._next):(e=n._next,n._next=null,n=t?t._next=e:au=e);ah=t,aA(i)}(),av=0}}function aM(){var t=ab.now(),e=t-ay;e>1e3&&(a_-=e,ay=t)}function aA(t){!ap&&(ag&&(ag=clearTimeout(ag)),t-av>24?(t<1/0&&(ag=setTimeout(aO,t-ab.now()-a_)),am&&(am=clearInterval(am))):(am||(ay=ab.now(),am=setInterval(aM,1e3)),ap=1,ax(aO)))}function aD(t,e,n){var i=new aT;return e=null==e?0:+e,i.restart(n=>{i.stop(),t(n+e)},e,n),i}aT.prototype=aS.prototype={constructor:aT,restart:function(t,e,n){if("function"!=typeof t)throw TypeError("callback is not a function");n=(null==n?aE():+n)+(null==e?0:+e),this._next||ah===this||(ah?ah._next=this:au=this,ah=this),this._call=t,this._time=n,aA()},stop:function(){this._call&&(this._call=null,this._time=1/0,aA())}};var ak=rF("start","end","cancel","interrupt"),aC=[];function aL(t,e,n,i,r,o){var a=t.__transition;if(a){if(n in a)return}else t.__transition={};!function(t,e,n){var i,r=t.__transition;function o(l){var c,u,h,d;if(1!==n.state)return s();for(c in r)if((d=r[c]).name===n.name){if(3===d.state)return aD(o);4===d.state?(d.state=6,d.timer.stop(),d.on.call("interrupt",t,t.__data__,d.index,d.group),delete r[c]):+c<e&&(d.state=6,d.timer.stop(),d.on.call("cancel",t,t.__data__,d.index,d.group),delete r[c])}if(aD(function(){3===n.state&&(n.state=4,n.timer.restart(a,n.delay,n.time),a(l))}),n.state=2,n.on.call("start",t,t.__data__,n.index,n.group),2===n.state){for(n.state=3,i=Array(h=n.tween.length),c=0,u=-1;c<h;++c)(d=n.tween[c].value.call(t,t.__data__,n.index,n.group))&&(i[++u]=d);i.length=u+1}}function a(e){for(var r=e<n.duration?n.ease.call(null,e/n.duration):(n.timer.restart(s),n.state=5,1),o=-1,a=i.length;++o<a;)i[o].call(t,r);5===n.state&&(n.on.call("end",t,t.__data__,n.index,n.group),s())}function s(){for(var i in n.state=6,n.timer.stop(),delete r[e],r)return;delete t.__transition}r[e]=n,n.timer=aS(function(t){n.state=1,n.timer.restart(o,n.delay,n.time),n.delay<=t&&o(t-n.delay)},0,n.time)}(t,n,{name:e,index:i,group:r,on:ak,tween:aC,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:0})}function aR(t,e){var n=aN(t,e);if(n.state>0)throw Error("too late; already scheduled");return n}function aI(t,e){var n=aN(t,e);if(n.state>3)throw Error("too late; already running");return n}function aN(t,e){var n=t.__transition;if(!n||!(n=n[e]))throw Error("transition not found");return n}function aP(t,e){var n,i,r,o=t.__transition,a=!0;if(o){for(r in e=null==e?null:e+"",o){if((n=o[r]).name!==e){a=!1;continue}i=n.state>2&&n.state<5,n.state=6,n.timer.stop(),n.on.call(i?"interrupt":"cancel",t,t.__data__,n.index,n.group),delete o[r]}a&&delete t.__transition}}function aU(t,e,n){var i=t._id;return t.each(function(){var t=aI(this,i);(t.value||(t.value={}))[e]=n.apply(this,arguments)}),function(t){return aN(t,i).value[e]}}function aB(t,e){var n;return("number"==typeof e?o1:e instanceof oP?o0:(n=oP(e))?(e=n,o0):o5)(t,e)}var aF=ov.prototype.constructor;function aH(t){return function(){this.style.removeProperty(t)}}var a$=0;function az(t,e,n,i){this._groups=t,this._parents=e,this._name=n,this._id=i}var aj=ov.prototype;function aG(t){return((t*=2)<=1?t*t*t:(t-=2)*t*t+2)/2}az.prototype={constructor:az,select:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=rY(t));for(var i=this._groups,r=i.length,o=Array(r),a=0;a<r;++a)for(var s,l,c=i[a],u=c.length,h=o[a]=Array(u),d=0;d<u;++d)(s=c[d])&&(l=t.call(s,s.__data__,d,c))&&("__data__"in s&&(l.__data__=s.__data__),h[d]=l,aL(h[d],e,n,d,h,aN(s,n)));return new az(o,this._parents,e,n)},selectAll:function(t){var e=this._name,n=this._id;"function"!=typeof t&&(t=rX(t));for(var i=this._groups,r=i.length,o=[],a=[],s=0;s<r;++s)for(var l,c=i[s],u=c.length,h=0;h<u;++h)if(l=c[h]){for(var d,f=t.call(l,l.__data__,h,c),p=aN(l,n),g=0,m=f.length;g<m;++g)(d=f[g])&&aL(d,e,n,g,f,p);o.push(f),a.push(l)}return new az(o,a,e,n)},selectChild:aj.selectChild,selectChildren:aj.selectChildren,filter:function(t){"function"!=typeof t&&(t=rq(t));for(var e=this._groups,n=e.length,i=Array(n),r=0;r<n;++r)for(var o,a=e[r],s=a.length,l=i[r]=[],c=0;c<s;++c)(o=a[c])&&t.call(o,o.__data__,c,a)&&l.push(o);return new az(i,this._parents,this._name,this._id)},merge:function(t){if(t._id!==this._id)throw Error();for(var e=this._groups,n=t._groups,i=e.length,r=n.length,o=Math.min(i,r),a=Array(i),s=0;s<o;++s)for(var l,c=e[s],u=n[s],h=c.length,d=a[s]=Array(h),f=0;f<h;++f)(l=c[f]||u[f])&&(d[f]=l);for(;s<i;++s)a[s]=e[s];return new az(a,this._parents,this._name,this._id)},selection:function(){return new aF(this._groups,this._parents)},transition:function(){for(var t=this._name,e=this._id,n=++a$,i=this._groups,r=i.length,o=0;o<r;++o)for(var a,s=i[o],l=s.length,c=0;c<l;++c)if(a=s[c]){var u=aN(a,e);aL(a,t,n,c,s,{time:u.time+u.delay+u.duration,delay:0,duration:u.duration,ease:u.ease})}return new az(i,this._parents,t,n)},call:aj.call,nodes:aj.nodes,node:aj.node,size:aj.size,empty:aj.empty,each:aj.each,on:function(t,e){var n,i,r,o,a,s,l=this._id;return arguments.length<2?aN(this.node(),l).on.on(t):this.each((n=l,i=t,r=e,s=(i+"").trim().split(/^|\s+/).every(function(t){var e=t.indexOf(".");return e>=0&&(t=t.slice(0,e)),!t||"start"===t})?aR:aI,function(){var t=s(this,n),e=t.on;e!==o&&(a=(o=e).copy()).on(i,r),t.on=a}))},attr:function(t,e){var n=rG(t),i="transform"===n?af:aB;return this.attrTween(t,"function"==typeof e?(n.local?function(t,e,n){var i,r,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttributeNS(t.space,t.local):(a=this.getAttributeNS(t.space,t.local))===(s=l+"")?null:a===i&&s===r?o:(r=s,o=e(i=a,l))}}:function(t,e,n){var i,r,o;return function(){var a,s,l=n(this);return null==l?void this.removeAttribute(t):(a=this.getAttribute(t))===(s=l+"")?null:a===i&&s===r?o:(r=s,o=e(i=a,l))}})(n,i,aU(this,"attr."+t,e)):null==e?(n.local?function(t){return function(){this.removeAttributeNS(t.space,t.local)}}:function(t){return function(){this.removeAttribute(t)}})(n):(n.local?function(t,e,n){var i,r,o=n+"";return function(){var a=this.getAttributeNS(t.space,t.local);return a===o?null:a===i?r:r=e(i=a,n)}}:function(t,e,n){var i,r,o=n+"";return function(){var a=this.getAttribute(t);return a===o?null:a===i?r:r=e(i=a,n)}})(n,i,e))},attrTween:function(t,e){var n="attr."+t;if(arguments.length<2)return(n=this.tween(n))&&n._value;if(null==e)return this.tween(n,null);if("function"!=typeof e)throw Error();var i=rG(t);return this.tween(n,(i.local?function(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(e){this.setAttributeNS(t.space,t.local,r.call(this,e))}),n}return r._value=e,r}:function(t,e){var n,i;function r(){var r=e.apply(this,arguments);return r!==i&&(n=(i=r)&&function(e){this.setAttribute(t,r.call(this,e))}),n}return r._value=e,r})(i,e))},style:function(t,e,n){var i,r,o,a,s,l,c,u,h,d,f,p,g,m,y,v,_,b,x,E,w,T="transform"==(t+="")?ad:aB;return null==e?this.styleTween(t,(i=t,function(){var t=r7(this,i),e=(this.style.removeProperty(i),r7(this,i));return t===e?null:t===r&&e===o?a:a=T(r=t,o=e)})).on("end.style."+t,aH(t)):"function"==typeof e?this.styleTween(t,(s=t,l=aU(this,"style."+t,e),function(){var t=r7(this,s),e=l(this),n=e+"";return null==e&&(this.style.removeProperty(s),n=e=r7(this,s)),t===n?null:t===c&&n===u?h:(u=n,h=T(c=t,e))})).each((d=this._id,_="end."+(v="style."+(f=t)),function(){var t=aI(this,d),e=t.on,n=null==t.value[v]?y||(y=aH(f)):void 0;(e!==p||m!==n)&&(g=(p=e).copy()).on(_,m=n),t.on=g})):this.styleTween(t,(b=t,w=e+"",function(){var t=r7(this,b);return t===w?null:t===x?E:E=T(x=t,e)}),n).on("end.style."+t,null)},styleTween:function(t,e,n){var i="style."+(t+="");if(arguments.length<2)return(i=this.tween(i))&&i._value;if(null==e)return this.tween(i,null);if("function"!=typeof e)throw Error();return this.tween(i,function(t,e,n){var i,r;function o(){var o=e.apply(this,arguments);return o!==r&&(i=(r=o)&&function(e){this.style.setProperty(t,o.call(this,e),n)}),i}return o._value=e,o}(t,e,n??""))},text:function(t){var e,n;return this.tween("text","function"==typeof t?(e=aU(this,"text",t),function(){var t=e(this);this.textContent=t??""}):(n=null==t?"":t+"",function(){this.textContent=n}))},textTween:function(t){var e="text";if(arguments.length<1)return(e=this.tween(e))&&e._value;if(null==t)return this.tween(e,null);if("function"!=typeof t)throw Error();return this.tween(e,function(t){var e,n;function i(){var i=t.apply(this,arguments);return i!==n&&(e=(n=i)&&function(t){this.textContent=i.call(this,t)}),e}return i._value=t,i}(t))},remove:function(){var t;return this.on("end.remove",(t=this._id,function(){var e=this.parentNode;for(var n in this.__transition)if(+n!==t)return;e&&e.removeChild(this)}))},tween:function(t,e){var n=this._id;if(t+="",arguments.length<2){for(var i,r=aN(this.node(),n).tween,o=0,a=r.length;o<a;++o)if((i=r[o]).name===t)return i.value;return null}return this.each((null==e?function(t,e){var n,i;return function(){var r=aI(this,t),o=r.tween;if(o!==n){i=n=o;for(var a=0,s=i.length;a<s;++a)if(i[a].name===e){(i=i.slice()).splice(a,1);break}}r.tween=i}}:function(t,e,n){var i,r;if("function"!=typeof n)throw Error();return function(){var o=aI(this,t),a=o.tween;if(a!==i){r=(i=a).slice();for(var s={name:e,value:n},l=0,c=r.length;l<c;++l)if(r[l].name===e){r[l]=s;break}l===c&&r.push(s)}o.tween=r}})(n,t,e))},delay:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){aR(this,t).delay=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){aR(this,t).delay=e}})(e,t)):aN(this.node(),e).delay},duration:function(t){var e=this._id;return arguments.length?this.each(("function"==typeof t?function(t,e){return function(){aI(this,t).duration=+e.apply(this,arguments)}}:function(t,e){return e*=1,function(){aI(this,t).duration=e}})(e,t)):aN(this.node(),e).duration},ease:function(t){var e=this._id;return arguments.length?this.each(function(t,e){if("function"!=typeof e)throw Error();return function(){aI(this,t).ease=e}}(e,t)):aN(this.node(),e).ease},easeVarying:function(t){var e;if("function"!=typeof t)throw Error();return this.each((e=this._id,function(){var n=t.apply(this,arguments);if("function"!=typeof n)throw Error();aI(this,e).ease=n}))},end:function(){var t,e,n=this,i=n._id,r=n.size();return new Promise(function(o,a){var s={value:a},l={value:function(){0==--r&&o()}};n.each(function(){var n=aI(this,i),r=n.on;r!==t&&((e=(t=r).copy())._.cancel.push(s),e._.interrupt.push(s),e._.end.push(l)),n.on=e}),0===r&&o()})},[Symbol.iterator]:aj[Symbol.iterator]};var aV={time:null,delay:0,duration:250,ease:aG};function aW(t,e){if((n=(t=e?t.toExponential(e-1):t.toExponential()).indexOf("e"))<0)return null;var n,i=t.slice(0,n);return[i.length>1?i[0]+i.slice(2):i,+t.slice(n+1)]}function aY(t){return(t=aW(Math.abs(t)))?t[1]:NaN}ov.prototype.interrupt=function(t){return this.each(function(){aP(this,t)})},ov.prototype.transition=function(t){t instanceof az?(r=t._id,t=t._name):(r=++a$,(o=aV).time=aE(),t=null==t?null:t+"");for(var e=this._groups,n=e.length,i=0;i<n;++i)for(var r,o,a,s=e[i],l=s.length,c=0;c<l;++c)(a=s[c])&&aL(a,t,r,c,s,o||function(t,e){for(var n;!(n=t.__transition)||!(n=n[e]);)if(!(t=t.parentNode))throw Error(`transition ${e} not found`);return n}(a,r));return new az(e,this._parents,t,r)};var aZ=/^(?:(.)?([<>=^]))?([+\-( ])?([$#])?(0)?(\d+)?(,)?(\.\d+)?(~)?([a-z%])?$/i;function aX(t){var e;if(!(e=aZ.exec(t)))throw Error("invalid format: "+t);return new aq({fill:e[1],align:e[2],sign:e[3],symbol:e[4],zero:e[5],width:e[6],comma:e[7],precision:e[8]&&e[8].slice(1),trim:e[9],type:e[10]})}function aq(t){this.fill=void 0===t.fill?" ":t.fill+"",this.align=void 0===t.align?">":t.align+"",this.sign=void 0===t.sign?"-":t.sign+"",this.symbol=void 0===t.symbol?"":t.symbol+"",this.zero=!!t.zero,this.width=void 0===t.width?void 0:+t.width,this.comma=!!t.comma,this.precision=void 0===t.precision?void 0:+t.precision,this.trim=!!t.trim,this.type=void 0===t.type?"":t.type+""}function aK(t,e){var n=aW(t,e);if(!n)return t+"";var i=n[0],r=n[1];return r<0?"0."+Array(-r).join("0")+i:i.length>r+1?i.slice(0,r+1)+"."+i.slice(r+1):i+Array(r-i.length+2).join("0")}aX.prototype=aq.prototype,aq.prototype.toString=function(){return this.fill+this.align+this.sign+this.symbol+(this.zero?"0":"")+(void 0===this.width?"":Math.max(1,0|this.width))+(this.comma?",":"")+(void 0===this.precision?"":"."+Math.max(0,0|this.precision))+(this.trim?"~":"")+this.type};let aQ={"%":(t,e)=>(100*t).toFixed(e),b:t=>Math.round(t).toString(2),c:t=>t+"",d:function(t){return Math.abs(t=Math.round(t))>=1e21?t.toLocaleString("en").replace(/,/g,""):t.toString(10)},e:(t,e)=>t.toExponential(e),f:(t,e)=>t.toFixed(e),g:(t,e)=>t.toPrecision(e),o:t=>Math.round(t).toString(8),p:(t,e)=>aK(100*t,e),r:aK,s:function(t,e){var n=aW(t,e);if(!n)return t+"";var i=n[0],r=n[1],o=r-(dF=3*Math.max(-8,Math.min(8,Math.floor(r/3))))+1,a=i.length;return o===a?i:o>a?i+Array(o-a+1).join("0"):o>0?i.slice(0,o)+"."+i.slice(o):"0."+Array(1-o).join("0")+aW(t,Math.max(0,e+o-1))[0]},X:t=>Math.round(t).toString(16).toUpperCase(),x:t=>Math.round(t).toString(16)};function aJ(t){return t}var a0=Array.prototype.map,a1=["y","z","a","f","p","n","\xb5","m","","k","M","G","T","P","E","Z","Y"];function a2(t,e){switch(arguments.length){case 0:break;case 1:this.range(t);break;default:this.range(e).domain(t)}return this}d$=(dH=function(t){var e,n,i,r=void 0===t.grouping||void 0===t.thousands?aJ:(e=a0.call(t.grouping,Number),n=t.thousands+"",function(t,i){for(var r=t.length,o=[],a=0,s=e[0],l=0;r>0&&s>0&&(l+s+1>i&&(s=Math.max(1,i-l)),o.push(t.substring(r-=s,r+s)),!((l+=s+1)>i));)s=e[a=(a+1)%e.length];return o.reverse().join(n)}),o=void 0===t.currency?"":t.currency[0]+"",a=void 0===t.currency?"":t.currency[1]+"",s=void 0===t.decimal?".":t.decimal+"",l=void 0===t.numerals?aJ:(i=a0.call(t.numerals,String),function(t){return t.replace(/[0-9]/g,function(t){return i[+t]})}),c=void 0===t.percent?"%":t.percent+"",u=void 0===t.minus?"−":t.minus+"",h=void 0===t.nan?"NaN":t.nan+"";function d(t){var e=(t=aX(t)).fill,n=t.align,i=t.sign,d=t.symbol,f=t.zero,p=t.width,g=t.comma,m=t.precision,y=t.trim,v=t.type;"n"===v?(g=!0,v="g"):aQ[v]||(void 0===m&&(m=12),y=!0,v="g"),(f||"0"===e&&"="===n)&&(f=!0,e="0",n="=");var _="$"===d?o:"#"===d&&/[boxX]/.test(v)?"0"+v.toLowerCase():"",b="$"===d?a:/[%p]/.test(v)?c:"",x=aQ[v],E=/[defgprs%]/.test(v);function w(t){var o,a,c,d=_,w=b;if("c"===v)w=x(t)+w,t="";else{var T=(t*=1)<0||1/t<0;if(t=isNaN(t)?h:x(Math.abs(t),m),y&&(t=function(t){t:for(var e,n=t.length,i=1,r=-1;i<n;++i)switch(t[i]){case".":r=e=i;break;case"0":0===r&&(r=i),e=i;break;default:if(!+t[i])break t;r>0&&(r=0)}return r>0?t.slice(0,r)+t.slice(e+1):t}(t)),T&&0==+t&&"+"!==i&&(T=!1),d=(T?"("===i?i:u:"-"===i||"("===i?"":i)+d,w=("s"===v?a1[8+dF/3]:"")+w+(T&&"("===i?")":""),E){for(o=-1,a=t.length;++o<a;)if(48>(c=t.charCodeAt(o))||c>57){w=(46===c?s+t.slice(o+1):t.slice(o))+w,t=t.slice(0,o);break}}}g&&!f&&(t=r(t,1/0));var S=d.length+t.length+w.length,O=S<p?Array(p-S+1).join(e):"";switch(g&&f&&(t=r(O+t,O.length?p-w.length:1/0),O=""),n){case"<":t=d+t+w+O;break;case"=":t=d+O+t+w;break;case"^":t=O.slice(0,S=O.length>>1)+d+t+w+O.slice(S);break;default:t=O+d+t+w}return l(t)}return m=void 0===m?6:/[gprs]/.test(v)?Math.max(1,Math.min(21,m)):Math.max(0,Math.min(20,m)),w.toString=function(){return t+""},w}return{format:d,formatPrefix:function(t,e){var n=d(((t=aX(t)).type="f",t)),i=3*Math.max(-8,Math.min(8,Math.floor(aY(e)/3))),r=Math.pow(10,-i),o=a1[8+i/3];return function(t){return n(r*t)+o}}}}({thousands:",",grouping:[3],currency:["$",""]})).format,dz=dH.formatPrefix;let a3=Symbol("implicit");function a5(){var t=new rA,e=[],n=[],i=a3;function r(r){let o=t.get(r);if(void 0===o){if(i!==a3)return i;t.set(r,o=e.push(r)-1)}return n[o%n.length]}return r.domain=function(n){if(!arguments.length)return e.slice();for(let i of(e=[],t=new rA,n))t.has(i)||t.set(i,e.push(i)-1);return r},r.range=function(t){return arguments.length?(n=Array.from(t),r):n.slice()},r.unknown=function(t){return arguments.length?(i=t,r):i},r.copy=function(){return a5(e,n).unknown(i)},a2.apply(r,arguments),r}function a4(t){return+t}var a8=[0,1];function a6(t){return t}function a9(t,e){var n;return(e-=t*=1)?function(n){return(n-t)/e}:(n=isNaN(e)?NaN:.5,function(){return n})}function a7(t,e,n){var i=t[0],r=t[1],o=e[0],a=e[1];return r<i?(i=a9(r,i),o=n(a,o)):(i=a9(i,r),o=n(o,a)),function(t){return o(i(t))}}function st(t,e,n){var i=Math.min(t.length,e.length)-1,r=Array(i),o=Array(i),a=-1;for(t[i]<t[0]&&(t=t.slice().reverse(),e=e.slice().reverse());++a<i;)r[a]=a9(t[a],t[a+1]),o[a]=n(e[a],e[a+1]);return function(e){var n=rO(t,e,1,i)-1;return o[n](r[n](e))}}function se(t,e){return e.domain(t.domain()).range(t.range()).interpolate(t.interpolate()).clamp(t.clamp()).unknown(t.unknown())}function sn(){var t,e,n,i,r,o,a=a8,s=a8,l=o4,c=a6;function u(){var t,e,n,l=Math.min(a.length,s.length);return c!==a6&&(t=a[0],e=a[l-1],t>e&&(n=t,t=e,e=n),c=function(n){return Math.max(t,Math.min(e,n))}),i=l>2?st:a7,r=o=null,h}function h(e){return null==e||isNaN(e*=1)?n:(r||(r=i(a.map(t),s,l)))(t(c(e)))}return h.invert=function(n){return c(e((o||(o=i(s,a.map(t),o1)))(n)))},h.domain=function(t){return arguments.length?(a=Array.from(t,a4),u()):a.slice()},h.range=function(t){return arguments.length?(s=Array.from(t),u()):s.slice()},h.rangeRound=function(t){return s=Array.from(t),l=o8,u()},h.clamp=function(t){return arguments.length?(c=!!t||a6,u()):c!==a6},h.interpolate=function(t){return arguments.length?(l=t,u()):l},h.unknown=function(t){return arguments.length?(n=t,h):n},function(n,i){return t=n,e=i,u()}}function si(){var t,e=sn()(a6,a6);return e.copy=function(){return se(e,si())},a2.apply(e,arguments),t=e.domain,e.ticks=function(e){var n=t();return rN(n[0],n[n.length-1],e??10)},e.tickFormat=function(e,n){var i=t();return function(t,e,n,i){var r,o,a=rU(t,e,n);switch((i=aX(i??",f")).type){case"s":var s=Math.max(Math.abs(t),Math.abs(e));return null!=i.precision||isNaN(o=Math.max(0,3*Math.max(-8,Math.min(8,Math.floor(aY(s)/3)))-aY(Math.abs(a))))||(i.precision=o),dz(i,s);case"":case"e":case"g":case"p":case"r":null!=i.precision||isNaN(o=Math.max(0,aY(Math.abs(Math.max(Math.abs(t),Math.abs(e)))-(r=Math.abs(r=a)))-aY(r))+1)||(i.precision=o-("e"===i.type));break;case"f":case"%":null!=i.precision||isNaN(o=Math.max(0,-aY(Math.abs(a))))||(i.precision=o-("%"===i.type)*2)}return d$(i)}(i[0],i[i.length-1],e??10,n)},e.nice=function(n){null==n&&(n=10);var i,r,o=t(),a=0,s=o.length-1,l=o[a],c=o[s],u=10;for(c<l&&(r=l,l=c,c=r,r=a,a=s,s=r);u-- >0;){if((r=rP(l,c,n))===i)return o[a]=l,o[s]=c,t(o);if(r>0)l=Math.floor(l/r)*r,c=Math.ceil(c/r)*r;else if(r<0)l=Math.ceil(l*r)/r,c=Math.floor(c*r)/r;else break;i=r}return e},e}function sr(t,e,n){this.k=t,this.x=e,this.y=n}sr.prototype={constructor:sr,scale:function(t){return 1===t?this:new sr(this.k*t,this.x,this.y)},translate:function(t,e){return 0===t&0===e?this:new sr(this.k,this.x+this.k*t,this.y+this.k*e)},apply:function(t){return[t[0]*this.k+this.x,t[1]*this.k+this.y]},applyX:function(t){return t*this.k+this.x},applyY:function(t){return t*this.k+this.y},invert:function(t){return[(t[0]-this.x)/this.k,(t[1]-this.y)/this.k]},invertX:function(t){return(t-this.x)/this.k},invertY:function(t){return(t-this.y)/this.k},rescaleX:function(t){return t.copy().domain(t.range().map(this.invertX,this).map(t.invert,t))},rescaleY:function(t){return t.copy().domain(t.range().map(this.invertY,this).map(t.invert,t))},toString:function(){return"translate("+this.x+","+this.y+") scale("+this.k+")"}},sr.prototype;let so=7,sa=2.5,ss=3.5,sl={reference:"value",compareTo:"marker"},sc=4,su={duration:1e3,ease:aG,zoomLevel:3},sh={"1-color":4,"2-color":5,"3-color":5,"4-color":3,"5-color":2,"14-color":1},sd={items:{status:{ACTIVE:1,DISABLED:0},horizontalSpace:12,verticalSpace:24,textYOffset:8,spaceAfter:4},checkbox:{radius:6.5},radius:{iconData:[{cx:7,cy:7,r:6.5},{cx:7,cy:10,r:3.5}],fill:null,stroke:"#8c8c8c"},line:{yPosition:6,width:24,strokeWidth:1.4,fill:null,stroke:"#999999"},area:{width:24,height:14,fill:"#6f6f6f",stroke:null},size:{iconData:[{width:23,height:12},{width:13,height:6}],fill:null,stroke:"#8D8D8D"},quartile:{iconData:[{x:0,y:0,width:24,height:13},{x:11,y:4,width:1,height:4}]},zoom:{iconData:[{x:0,y:0,width:12,height:12}],color:"#8D8D8D"},color:{barWidth:300,barHeight:8,axisYTranslation:10}},sf=24,sp={defaultOffset:4,horizontalOffset:10},sg={default:{duration:300},pie_slice_mouseover:{duration:100},pie_slice_mouseout:{duration:100},pie_chart_titles:{duration:375},graph_element_mouseover_fill_update:{duration:100},graph_element_mouseout_fill_update:{duration:100}},sm={[tK.GRAPH_VIEW]:32,[tK.SLIDER_VIEW]:10},sy=[{type:ec.RADIUS,name:"Radius"},{type:ec.AREA,name:"Poor area"},{type:ec.AREA,name:"Satisfactory area"},{type:ec.AREA,name:"Great area"},{type:ec.QUARTILE,name:"Quartiles"}],sv={type:tQ.END_LINE,threshold:16,numCharacter:14},s_={code:"u">typeof navigator&&navigator?.language||"en-US",number:(t,e=navigator?.language||"en-US")=>t?.toLocaleString?.(e),date:(t,e=navigator?.language||"en-US",n={},i=null)=>i||t.toLocaleDateString(e,n),time:(t,e=navigator?.language||"en-US",n={},i=null)=>i||t.toLocaleTimeString(e,n),optionsObject:{"15seconds":{primary:{"MMM d, pp":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"MMM d, h:mm:ss.SSS a":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},secondary:{pp:{hour:"numeric",minute:"2-digit",second:"2-digit",hourCycle:"h12"},"h:mm:ss.SSS a":{hour:"numeric",minute:"2-digit",fractionalSecondDigits:3,hourCycle:"h12"}},type:"time"},minute:{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},"30minutes":{primary:{"MMM d, p":{month:"short",day:"numeric",hour:"numeric",minute:"2-digit",hourCycle:"h12"}},secondary:{p:{hour:"numeric",minute:"2-digit",hourCycle:"h12"}},type:"time"},hourly:{primary:{"MMM d, hh a":{month:"short",day:"numeric",hour:"2-digit",hourCycle:"h12"}},secondary:{"hh a":{hour:"2-digit",hourCycle:"h12"}},type:"time"},daily:{primary:{"MMM d":{month:"short",day:"numeric"}},secondary:{d:{day:"numeric"}},type:"date"},weekly:{primary:{"eee, MMM d":{weekday:"short",month:"short",day:"numeric"}},secondary:{eee:{weekday:"short"}},type:"date"},monthly:{primary:{"MMM yyyy":{month:"short",year:"numeric"}},secondary:{MMM:{month:"short"}},type:"date"},quarterly:{primary:{},secondary:{},type:"date"},yearly:{primary:{yyyy:{year:"numeric"}},secondary:{yyyy:{year:"numeric"}},type:"date"}},translations:{group:"Group",total:"Total",meter:{title:""},tabularRep:{title:"Tabular representation",downloadAsCSV:"Download as CSV"},toolbar:{exportAsCSV:"Export to CSV",exportAsJPG:"Export to JPG",exportAsPNG:"Export to PNG",zoomIn:"Zoom in",zoomOut:"Zoom out",resetZoom:"Reset zoom",moreOptions:"More options",makeFullScreen:"Make fullscreen",exitFullScreen:"Exit fullscreen",showAsTable:"Show as table"}}},sb={enabled:!0,position:t1.BOTTOM,clickable:!0,truncation:sv,alignment:t2.LEFT,order:null,additionalItems:[]},sx={enabled:!0,showTotal:!0,truncation:sv,groupLabel:"Group"},sE={top:{visible:!0,includeZero:!0,truncation:sv},bottom:{visible:!0,includeZero:!0,truncation:sv},left:{visible:!0,includeZero:!0,truncation:sv},right:{visible:!0,includeZero:!0,truncation:sv}},sw={addSpaceOnEdges:1,showDayName:!1,localeObject:eA,timeIntervalFormats:{"15seconds":{primary:"MMM d, pp",secondary:"pp"},minute:{primary:"MMM d, p",secondary:"p"},"30minutes":{primary:"MMM d, p",secondary:"p"},hourly:{primary:"MMM d, hh a",secondary:"hh a"},daily:{primary:"MMM d",secondary:"d"},weekly:{primary:"eee, MMM d",secondary:"eee"},monthly:{primary:"MMM yyyy",secondary:"MMM"},quarterly:{primary:"QQQ ''yy",secondary:"QQQ"},yearly:{primary:"yyyy",secondary:"yyyy"}}},sT=!1;try{sT="u">typeof document&&(document.fullscreenEnabled||document.webkitFullscreenEnabled||document.mozFullScreenEnabled||document.msFullscreenEnabled)}catch(t){console.warn("Fullscreen capabilities check failed: ",t.message)}let sS={width:null,height:null,resizable:!0,theme:tZ.WHITE,tooltip:sx,legend:sb,locale:s_,style:{prefix:"cc"},data:{groupMapsTo:"group",loading:!1,selectedGroups:[]},color:{scale:null,pairing:{numberOfVariants:null,option:1},gradient:{enabled:!1}},toolbar:{enabled:!0,numberOfIcons:3,controls:[{type:es.SHOW_AS_DATATABLE},...sT?[{type:es.MAKE_FULLSCREEN}]:[],{type:es.EXPORT_CSV},{type:es.EXPORT_PNG},{type:es.EXPORT_JPG}]}},sO=ry({},sS,{thematic:{projection:ef.geoNaturalEarth1}}),sM=ry({},sS,{axes:sE,timeScale:sw,grid:{x:{enabled:!0,numberOfTicks:15,alignWithAxisTicks:!1},y:{enabled:!0,numberOfTicks:5,alignWithAxisTicks:!1}},ruler:{enabled:!0},zoomBar:{zoomRatio:.4,minZoomRatio:.01,top:{enabled:!1,type:tK.GRAPH_VIEW}}}),sA=ry({},sM,{bars:{maxWidth:16,spacingFactor:.25},timeScale:ry(sw,{addSpaceOnEdges:1})}),sD=(ry({},sA,{}),ry({},sA,{})),sk=(ry({},sA,{bars:ry({},sA.bars,{dividerSize:1.5})}),ry({},sA,{}),ry({},sM,{points:{radius:4,fillOpacity:.3,filled:!0,enabled:!0}})),sC=ry({},sk,{points:{radius:3,filled:!1,enabled:!0}}),sL=(ry({},sC,{timeScale:ry(sw,{addSpaceOnEdges:0})}),ry({},sM,{bubble:{radiusMapsTo:"radius",radiusLabel:"Radius",radiusRange:t=>{let e=Math.min(t.width,t.height);return[3*e/400,25*e/400]},fillOpacity:.2,enabled:!0},points:{filled:!0},legend:{additionalItems:[{type:ec.RADIUS,name:"Radius"}]}}),ry({},sM,{bullet:{performanceAreaTitles:["Poor","Satisfactory","Great"]},grid:{x:{enabled:!1},y:{enabled:!1}},legend:{additionalItems:[{type:ec.AREA,name:"Poor area"},{type:ec.AREA,name:"Satisfactory area"},{type:ec.AREA,name:"Great area"},{type:ec.QUARTILE,name:"Quartiles"}]}}),ry({},sA,{bars:{dividerSize:1.5},timeScale:ry(sw,{addSpaceOnEdges:0})}),ry({},sS,{tooltip:ry({},sx,{wordLabel:"Word",valueLabel:"Value"}),wordCloud:{fontSizeMapsTo:"value",fontSizeRange:t=>{let e=Math.min(t.width,t.height);return[20*e/400,75*e/400]},wordMapsTo:"word"}}),ry({},sS,{pie:{labels:{formatter:null,enabled:!0},alignment:t2.LEFT,sortFunction:null,valueMapsTo:"value"}})),sR=(ry({},sS,{legend:{enabled:!1},gauge:{type:en.SEMI,arcWidth:16,deltaArrow:{size:t=>t/8,enabled:!0},showPercentageSymbol:!0,status:null,numberSpacing:10,deltaFontSize:t=>t/8,valueFontSize:t=>t/2.5,alignment:t2.LEFT}}),ry({},sL,{donut:{center:{numberFontSize:t=>`${Math.min(t/100*24,24)}px`,titleFontSize:t=>`${Math.min(t/100*15,15)}px`,titleYPosition:t=>Math.min(t/80*20,20)},alignment:t2.LEFT}}),ry({},sS,{legend:{enabled:!1,clickable:!1},meter:{showLabels:!0,proportional:null,statusBar:{percentageIndicator:{enabled:!0}}}}));function sI(t){if(!t)return;let e=t.getAttribute("transform").match(/translate\([0-9]+\.?[0-9]*,[0-9]+\.?[0-9]*\)/);if(!e)return null;if(e[0]){let t=e[0].replace(/translate\(/,"").replace(/\)/,"").split(",");return{tx:t[0],ty:t[1]}}return null}function sN(t,e,n){return n>t.length?t:e===tQ.MID_LINE?t.substr(0,n/2)+"..."+t.substr(-n/2):e===tQ.FRONT_LINE?"..."+t.substr(-n):e===tQ.END_LINE?t.substr(0,n)+"...":void 0}function sP(t,e){let n=sU(t,"legend","additionalItems"),i=sU(e,"legend","additionalItems");if(n&&i){let r=i.map(t=>t.type),o=n.map(t=>t.type),a=sy.filter(t=>o.includes(t.type)&&!r.includes(t.type));t.legend.additionalItems=a,e.legend.additionalItems=rb(a,i,"name")}}ry({},sR,{legend:{enabled:!0}}),ry({},sS,{radar:{axes:{angle:"key",value:"value"},alignment:t2.LEFT},tooltip:{gridline:{enabled:!0}}}),ry({},sA,{comboChartTypes:[]}),ry({tree:{type:t5.TREE}},sS,{}),ry({},sS,{data:ry(sS.data,{groupMapsTo:"name"})}),ry({},sS,{circles:{fillOpacity:.3,hover:{stroke:"#FFF"}},padding:{mainGroup:4,children:2},depth:2},{data:ry(sS.data,{groupMapsTo:"name"})}),ry({},sS,{alluvial:{data:ry(sS.data,{groupMapsTo:"source"}),nodeAlignment:t2.CENTER,nodePadding:24,monochrome:!1,nodes:[]}}),ry({},sS,{axes:sE,heatmap:{divider:{state:eh.AUTO},colorLegend:{type:"linear"}}}),ry({},sO,{choropleth:{colorLegend:{type:"linear"}}});let sU=(t,...e)=>{let n=t;if(n){for(let t of e)if(null===n[t]||void 0===n[t])return null;else n=n[t];return n}return null},sB=(t,e)=>e===tJ.HORIZONTAL?{y0:t.x0,y1:t.x1,x0:t.y0,x1:t.y1}:t;function sF(t,e,n){return n===tJ.VERTICAL?[t,e]:[e,t]}function sH(t){let e=eE(t),n=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate(),e.getHours(),e.getMinutes(),e.getSeconds(),e.getMilliseconds()));return n.setUTCFullYear(e.getFullYear()),t-n}function s$(t,e){let n=eE(t,e?.in);return n.setHours(0,0,0,0),n}function sz(t,e,n){let[i,r]=eb(n?.in,t,e),o=s$(i),a=s$(r);return Math.round((o-sH(o)-(a-sH(a)))/864e5)}function sj(t,e){return ew(t,{...e,weekStartsOn:1})}function sG(t,e){let n=eE(t,e?.in),i=n.getFullYear(),r=e_(n,0);r.setFullYear(i+1,0,4),r.setHours(0,0,0,0);let o=sj(r),a=e_(n,0);a.setFullYear(i,0,4),a.setHours(0,0,0,0);let s=sj(a);return n.getTime()>=o.getTime()?i+1:n.getTime()>=s.getTime()?i:i-1}function sV(t,e){let n=eE(t,e?.in),i=n.getFullYear(),r=e?.firstWeekContainsDate??e?.locale?.options?.firstWeekContainsDate??ex.firstWeekContainsDate??ex.locale?.options?.firstWeekContainsDate??1,o=e_(e?.in||t,0);o.setFullYear(i+1,0,r),o.setHours(0,0,0,0);let a=ew(o,e),s=e_(e?.in||t,0);s.setFullYear(i,0,r),s.setHours(0,0,0,0);let l=ew(s,e);return+n>=+a?i+1:+n>=+l?i:i-1}function sW(t,e){let n=Math.abs(t).toString().padStart(e,"0");return(t<0?"-":"")+n}let sY={y(t,e){let n=t.getFullYear(),i=n>0?n:1-n;return sW("yy"===e?i%100:i,e.length)},M(t,e){let n=t.getMonth();return"M"===e?String(n+1):sW(n+1,2)},d:(t,e)=>sW(t.getDate(),e.length),a(t,e){let n=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.toUpperCase();case"aaa":return n;case"aaaaa":return n[0];default:return"am"===n?"a.m.":"p.m."}},h:(t,e)=>sW(t.getHours()%12||12,e.length),H:(t,e)=>sW(t.getHours(),e.length),m:(t,e)=>sW(t.getMinutes(),e.length),s:(t,e)=>sW(t.getSeconds(),e.length),S(t,e){let n=e.length;return sW(Math.trunc(t.getMilliseconds()*Math.pow(10,n-3)),e.length)}},sZ={G:function(t,e,n){let i=+(t.getFullYear()>0);switch(e){case"G":case"GG":case"GGG":return n.era(i,{width:"abbreviated"});case"GGGGG":return n.era(i,{width:"narrow"});default:return n.era(i,{width:"wide"})}},y:function(t,e,n){if("yo"===e){let e=t.getFullYear();return n.ordinalNumber(e>0?e:1-e,{unit:"year"})}return sY.y(t,e)},Y:function(t,e,n,i){let r=sV(t,i),o=r>0?r:1-r;return"YY"===e?sW(o%100,2):"Yo"===e?n.ordinalNumber(o,{unit:"year"}):sW(o,e.length)},R:function(t,e){return sW(sG(t),e.length)},u:function(t,e){return sW(t.getFullYear(),e.length)},Q:function(t,e,n){let i=Math.ceil((t.getMonth()+1)/3);switch(e){case"Q":return String(i);case"QQ":return sW(i,2);case"Qo":return n.ordinalNumber(i,{unit:"quarter"});case"QQQ":return n.quarter(i,{width:"abbreviated",context:"formatting"});case"QQQQQ":return n.quarter(i,{width:"narrow",context:"formatting"});default:return n.quarter(i,{width:"wide",context:"formatting"})}},q:function(t,e,n){let i=Math.ceil((t.getMonth()+1)/3);switch(e){case"q":return String(i);case"qq":return sW(i,2);case"qo":return n.ordinalNumber(i,{unit:"quarter"});case"qqq":return n.quarter(i,{width:"abbreviated",context:"standalone"});case"qqqqq":return n.quarter(i,{width:"narrow",context:"standalone"});default:return n.quarter(i,{width:"wide",context:"standalone"})}},M:function(t,e,n){let i=t.getMonth();switch(e){case"M":case"MM":return sY.M(t,e);case"Mo":return n.ordinalNumber(i+1,{unit:"month"});case"MMM":return n.month(i,{width:"abbreviated",context:"formatting"});case"MMMMM":return n.month(i,{width:"narrow",context:"formatting"});default:return n.month(i,{width:"wide",context:"formatting"})}},L:function(t,e,n){let i=t.getMonth();switch(e){case"L":return String(i+1);case"LL":return sW(i+1,2);case"Lo":return n.ordinalNumber(i+1,{unit:"month"});case"LLL":return n.month(i,{width:"abbreviated",context:"standalone"});case"LLLLL":return n.month(i,{width:"narrow",context:"standalone"});default:return n.month(i,{width:"wide",context:"standalone"})}},w:function(t,e,n,i){let r,o,a,s,l=Math.round((ew(s=eE(t,i?.in),i)-(r=i?.firstWeekContainsDate??i?.locale?.options?.firstWeekContainsDate??ex.firstWeekContainsDate??ex.locale?.options?.firstWeekContainsDate??1,o=sV(s,i),(a=e_(i?.in||s,0)).setFullYear(o,0,r),a.setHours(0,0,0,0),ew(a,i)))/6048e5)+1;return"wo"===e?n.ordinalNumber(l,{unit:"week"}):sW(l,e.length)},I:function(t,e,n){let i,r,o,a=Math.round((sj(o=eE(t,void 0))-(i=sG(o,void 0),(r=e_(o,0)).setFullYear(i,0,4),r.setHours(0,0,0,0),sj(r)))/6048e5)+1;return"Io"===e?n.ordinalNumber(a,{unit:"week"}):sW(a,e.length)},d:function(t,e,n){return"do"===e?n.ordinalNumber(t.getDate(),{unit:"date"}):sY.d(t,e)},D:function(t,e,n){let i,r,o=sz(i=eE(t,void 0),((r=eE(i,void 0)).setFullYear(r.getFullYear(),0,1),r.setHours(0,0,0,0),r))+1;return"Do"===e?n.ordinalNumber(o,{unit:"dayOfYear"}):sW(o,e.length)},E:function(t,e,n){let i=t.getDay();switch(e){case"E":case"EE":case"EEE":return n.day(i,{width:"abbreviated",context:"formatting"});case"EEEEE":return n.day(i,{width:"narrow",context:"formatting"});case"EEEEEE":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},e:function(t,e,n,i){let r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"e":return String(o);case"ee":return sW(o,2);case"eo":return n.ordinalNumber(o,{unit:"day"});case"eee":return n.day(r,{width:"abbreviated",context:"formatting"});case"eeeee":return n.day(r,{width:"narrow",context:"formatting"});case"eeeeee":return n.day(r,{width:"short",context:"formatting"});default:return n.day(r,{width:"wide",context:"formatting"})}},c:function(t,e,n,i){let r=t.getDay(),o=(r-i.weekStartsOn+8)%7||7;switch(e){case"c":return String(o);case"cc":return sW(o,e.length);case"co":return n.ordinalNumber(o,{unit:"day"});case"ccc":return n.day(r,{width:"abbreviated",context:"standalone"});case"ccccc":return n.day(r,{width:"narrow",context:"standalone"});case"cccccc":return n.day(r,{width:"short",context:"standalone"});default:return n.day(r,{width:"wide",context:"standalone"})}},i:function(t,e,n){let i=t.getDay(),r=0===i?7:i;switch(e){case"i":return String(r);case"ii":return sW(r,e.length);case"io":return n.ordinalNumber(r,{unit:"day"});case"iii":return n.day(i,{width:"abbreviated",context:"formatting"});case"iiiii":return n.day(i,{width:"narrow",context:"formatting"});case"iiiiii":return n.day(i,{width:"short",context:"formatting"});default:return n.day(i,{width:"wide",context:"formatting"})}},a:function(t,e,n){let i=t.getHours()/12>=1?"pm":"am";switch(e){case"a":case"aa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"aaa":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"aaaaa":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},b:function(t,e,n){let i,r=t.getHours();switch(i=12===r?"noon":0===r?"midnight":r/12>=1?"pm":"am",e){case"b":case"bb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"bbb":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"}).toLowerCase();case"bbbbb":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},B:function(t,e,n){let i,r=t.getHours();switch(i=r>=17?"evening":r>=12?"afternoon":r>=4?"morning":"night",e){case"B":case"BB":case"BBB":return n.dayPeriod(i,{width:"abbreviated",context:"formatting"});case"BBBBB":return n.dayPeriod(i,{width:"narrow",context:"formatting"});default:return n.dayPeriod(i,{width:"wide",context:"formatting"})}},h:function(t,e,n){if("ho"===e){let e=t.getHours()%12;return 0===e&&(e=12),n.ordinalNumber(e,{unit:"hour"})}return sY.h(t,e)},H:function(t,e,n){return"Ho"===e?n.ordinalNumber(t.getHours(),{unit:"hour"}):sY.H(t,e)},K:function(t,e,n){let i=t.getHours()%12;return"Ko"===e?n.ordinalNumber(i,{unit:"hour"}):sW(i,e.length)},k:function(t,e,n){let i=t.getHours();return 0===i&&(i=24),"ko"===e?n.ordinalNumber(i,{unit:"hour"}):sW(i,e.length)},m:function(t,e,n){return"mo"===e?n.ordinalNumber(t.getMinutes(),{unit:"minute"}):sY.m(t,e)},s:function(t,e,n){return"so"===e?n.ordinalNumber(t.getSeconds(),{unit:"second"}):sY.s(t,e)},S:function(t,e){return sY.S(t,e)},X:function(t,e,n){let i=t.getTimezoneOffset();if(0===i)return"Z";switch(e){case"X":return sq(i);case"XXXX":case"XX":return sK(i);default:return sK(i,":")}},x:function(t,e,n){let i=t.getTimezoneOffset();switch(e){case"x":return sq(i);case"xxxx":case"xx":return sK(i);default:return sK(i,":")}},O:function(t,e,n){let i=t.getTimezoneOffset();switch(e){case"O":case"OO":case"OOO":return"GMT"+sX(i,":");default:return"GMT"+sK(i,":")}},z:function(t,e,n){let i=t.getTimezoneOffset();switch(e){case"z":case"zz":case"zzz":return"GMT"+sX(i,":");default:return"GMT"+sK(i,":")}},t:function(t,e,n){return sW(Math.trunc(t/1e3),e.length)},T:function(t,e,n){return sW(+t,e.length)}};function sX(t,e=""){let n=t>0?"-":"+",i=Math.abs(t),r=Math.trunc(i/60),o=i%60;return 0===o?n+String(r):n+String(r)+e+sW(o,2)}function sq(t,e){return t%60==0?(t>0?"-":"+")+sW(Math.abs(t)/60,2):sK(t,e)}function sK(t,e=""){let n=Math.abs(t);return(t>0?"-":"+")+sW(Math.trunc(n/60),2)+e+sW(n%60,2)}let sQ=(t,e)=>{switch(t){case"P":return e.date({width:"short"});case"PP":return e.date({width:"medium"});case"PPP":return e.date({width:"long"});default:return e.date({width:"full"})}},sJ=(t,e)=>{switch(t){case"p":return e.time({width:"short"});case"pp":return e.time({width:"medium"});case"ppp":return e.time({width:"long"});default:return e.time({width:"full"})}},s0={p:sJ,P:(t,e)=>{let n,i=t.match(/(P+)(p+)?/)||[],r=i[1],o=i[2];if(!o)return sQ(t,e);switch(r){case"P":n=e.dateTime({width:"short"});break;case"PP":n=e.dateTime({width:"medium"});break;case"PPP":n=e.dateTime({width:"long"});break;default:n=e.dateTime({width:"full"})}return n.replace("{{date}}",sQ(r,e)).replace("{{time}}",sJ(o,e))}},s1=/^D+$/,s2=/^Y+$/,s3=["D","DD","YY","YYYY"],s5=/[yYQqMLwIdDecihHKkms]o|(\w)\1*|''|'(''|[^'])+('|$)|./g,s4=/P+p+|P+|p+|''|'(''|[^'])+('|$)|./g,s8=/^'([^]*?)'?$/,s6=/''/g,s9=/[a-zA-Z]/;function s7(t,e,n){let i=n?.locale??ex.locale??eA,r=n?.firstWeekContainsDate??n?.locale?.options?.firstWeekContainsDate??ex.firstWeekContainsDate??ex.locale?.options?.firstWeekContainsDate??1,o=n?.weekStartsOn??n?.locale?.options?.weekStartsOn??ex.weekStartsOn??ex.locale?.options?.weekStartsOn??0,a=eE(t,n?.in);if(!(a instanceof Date||"object"==typeof a&&"[object Date]"===Object.prototype.toString.call(a))&&"number"!=typeof a||isNaN(+eE(a)))throw RangeError("Invalid time value");let s=e.match(s4).map(t=>{let e=t[0];return"p"===e||"P"===e?(0,s0[e])(t,i.formatLong):t}).join("").match(s5).map(t=>{if("''"===t)return{isToken:!1,value:"'"};let e=t[0];if("'"===e){var n;let e;return{isToken:!1,value:(e=(n=t).match(s8))?e[1].replace(s6,"'"):n}}if(sZ[e])return{isToken:!0,value:t};if(e.match(s9))throw RangeError("Format string contains an unescaped latin alphabet character `"+e+"`");return{isToken:!1,value:t}});i.localize.preprocessor&&(s=i.localize.preprocessor(a,s));let l={firstWeekContainsDate:r,weekStartsOn:o,locale:i};return s.map(r=>{if(!r.isToken)return r.value;let o=r.value;return(!n?.useAdditionalWeekYearTokens&&s2.test(o)||!n?.useAdditionalDayOfYearTokens&&s1.test(o))&&function(t,e,n){var i,r,o;let a,s=(i=t,r=e,o=n,a="Y"===i[0]?"years":"days of the month",`Use \`${i.toLowerCase()}\` instead of \`${i}\` (in \`${r}\`) for formatting ${a} to the input \`${o}\`; see: https://github.com/date-fns/date-fns/blob/master/docs/unicodeTokens.md`);if(console.warn(s),s3.includes(t))throw RangeError(s)}(o,e,String(t)),(0,sZ[o[0]])(a,o,i.localize,l)}).join("")}let lt=[["15seconds",15e3],["minute",6e4],["30minutes",18e5],["hourly",36e5],["daily",864e5],["monthly",2592e6],["quarterly",7776e6],["yearly",31104e6]];function le(t,e,n,i,r){let o=0===e,a=2===Number(s7(new Date(t),"c")),s=1===Number(s7(new Date(t),"q")),l=0!==e?n[e-1]:null;switch(i){case"15seconds":case"minute":case"30minutes":case"hourly":return o||function(t){let{s:e,m:n,H:i}=li(t);return 0===i&&0===n&&0===e}(t)||lo(t,l)||la(t);case"daily":return r?o||a||la(t):o||lo(t,l)||la(t);case"weekly":return o||a||la(t);case"monthly":return o||la(t);case"quarterly":return o||s;case"yearly":return!1;default:throw Error(`${i} is not a valid time interval.`)}}function ln(t,e,n,i,r,o){let a=r.showDayName,s="daily"===i&&a?"weekly":i,l=new Date(t),c=sU(r,"timeIntervalFormats")[s],u=sU(c,"primary"),h=sU(c,"secondary"),d=le(t,e,n,i,a),f=d?u:h;"15seconds"===i&&0!==l.getMilliseconds()&&(f=f.replace("pp","h:mm:ss.SSS a"));let p=r.localeObject,{code:g,optionsObject:m}=o,y=m[i].type,v=m[i][d?"primary":"secondary"][f];if("quarterly"!==i&&v)return o[y](l,g,v);{let t=s7(l,f,{locale:p}).split("").map(t=>{let e=Number(t);return" "===t||Number.isNaN(e)?t:e?.toLocaleString?.(g)});return o[y](l,g,{},t.join(""))}}function li(t){let e=new Date(t);return{M:e.getMonth()+1,d:e.getDate(),H:e.getHours(),m:e.getMinutes(),s:e.getSeconds()}}function lr(t,e){var n;let i;return ep[e]?e:1===t.length?"15seconds":(n=function(t,e){let n;for(let e of t)null!=e&&(n>e||void 0===n&&e>=e)&&(n=e);return n}(function(t){if(t)return t.slice(1).map((e,n)=>e-t[n])}(t)),i=lt.reduce((t,[,e],i)=>Math.abs(lt[t][1]-n)<Math.abs(e-n)?t:i,0),lt[i][0])}function lo(t,e){return li(t).M!==li(e).M}function la(t){let{M:e,d:n,s:i,m:r,H:o}=li(t);return 1===e&&1===n&&0===o&&0===r&&0===i}function ls(t){return void 0===t?"":t.toISOString()}var ll=((tl=ll||{}).GRAPHICS_DOCUMENT="graphics-document",tl.GRAPHICS_OBJECT="graphics-object",tl.GRAPHICS_SYMBOL="graphics-symbol",tl.GROUP="group",tl.DOCUMENT="document",tl.CHECKBOX="checkbox",tl.BUTTON="button",tl.MENU="menu",tl.MENU_ITEM="menuitem",tl.IMG="img",tl),lc=(dP=function(t,e){return t&&rh(t,e,n$)},function(t,e){if(null==t)return t;if(!ng(t))return dP(t,e);for(var n=t.length,i=-1,r=Object(t);++i<n&&!1!==e(r[i],i,r););return t});function lu(t){return function(){return t}}function lh(t){return"object"==typeof t&&"length"in t?t:Array.from(t)}Array.prototype.slice;var ld=Object.prototype.hasOwnProperty,lf=(dU=function(t,e,n){ld.call(t,n)?t[n].push(e):na(t,n,[e])},function(t,e){return(ej(t)?function(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;){var a=t[r];e(i,a,n(a),t)}return i}:function(t,e,n,i){return lc(t,function(t,r,o){e(i,t,n(t),o)}),i})(t,dU,ru(e),{})});function lp(t){return t}var lg=Array.prototype.slice;function lm(t){return Math.max(1,Math.ceil(Math.log(function(t,e){let n=0;for(let e of t)null!=e&&(e*=1)>=e&&++n;return n}(t))/Math.LN2)+1)}function ly(t,e){if((r=t.length)>1)for(var n,i,r,o=1,a=t[e[0]],s=a.length;o<r;++o)for(i=a,a=t[e[o]],n=0;n<s;++n)a[n][1]+=a[n][0]=isNaN(i[n][1])?i[n][0]:i[n][1]}function lv(t){for(var e=t.length,n=Array(e);--e>=0;)n[e]=e;return n}function l_(t,e){return t[e]}function lb(t){let e=[];return e.key=t,e}function lx(){var t=lu([]),e=lv,n=ly,i=l_;function r(r){var o,a,s=Array.from(t.apply(this,arguments),lb),l=s.length,c=-1;for(let t of r)for(o=0,++c;o<l;++o)(s[o][c]=[0,+i(t,s[o].key,c,r)]).data=t;for(o=0,a=lh(e(s));o<l;++o)s[a[o]].index=o;return n(s,a),s}return r.keys=function(e){return arguments.length?(t="function"==typeof e?e:lu(Array.from(e)),r):t},r.value=function(t){return arguments.length?(i="function"==typeof t?t:lu(+t),r):i},r.order=function(t){return arguments.length?(e=null==t?lv:"function"==typeof t?t:lu(Array.from(t)),r):e},r.offset=function(t){return arguments.length?(n=t??ly,r):n},r}function lE(t,e){if((s=t.length)>0)for(var n,i,r,o,a,s,l=0,c=t[e[0]].length;l<c;++l)for(o=a=0,n=0;n<s;++n)(r=(i=t[e[n]][l])[1]-i[0])>0?(i[0]=o,i[1]=o+=r):r<0?(i[1]=a,i[0]=a+=r):(i[0]=0,i[1]=r)}class lw{constructor(t){this.state={options:{}},this.colorScale={},this.colorClassNames={},this.services=t}formatTable({headers:t,cells:e}){let n,i=this.getOptions(),{code:r,date:o,number:a}=sU(i,"locale"),s=sU(i,"tabularRepModal","tableHeadingFormatter"),l=sU(i,"tabularRepModal","tableCellFormatter"),{cartesianScales:c}=this.services;return c?.getDomainAxisScaleType()===t0.TIME&&(n=t=>o(t,r,{month:"short",day:"numeric",year:"numeric"})),["function"==typeof s?s(t):t,..."function"==typeof l?l(e):e.map(t=>{for(let e in n&&(t[1]=n(t[1])),t){let n=t[e];"number"==typeof n&&(t[e]=a(n,r))}return t})]}getAllDataFromDomain(t){if(!this.getData())return null;let e=this.getOptions(),n=this.getData(),i=this.getDataGroups(),{groupMapsTo:r}=sU(e,"data"),o=sU(e,"axes");return t&&(n=n.filter(e=>t.includes(e[r]))),o&&Object.keys(o).forEach(t=>{let e=o[t].mapsTo,i=o[t].scaleType;if((i===t0.LINEAR||i===t0.LOG)&&(n=n.map(t=>({...t,[e]:null===t[e]?t[e]:Number(t[e])}))),e&&o[t].domain)if(i===t0.LABELS)n=n.filter(n=>o[t].domain.includes(n[e]));else{let[i,r]=o[t].domain;n=n.filter(t=>!(e in t)||t[e]>=i&&t[e]<=r)}}),n.filter(t=>i.find(e=>e.name===t[r]))}getDisplayData(t){if(!this.get("data"))return null;let{ACTIVE:e}=sd.items.status,n=this.getDataGroups(t),{groupMapsTo:i}=this.getOptions().data;return this.getAllDataFromDomain(t).filter(t=>n.find(n=>n.name===t[i]&&n.status===e))}getData(){return this.get("data")}isDataEmpty(){return!this.getData().length}setData(t){let e=this.sanitize(i5(t,5)),n=this.generateDataGroups(e);return this.set({data:e,dataGroups:n}),e}getDataGroups(t){return sU(this.getOptions(),"data","loading")?[]:t?this.get("dataGroups").filter(e=>t.includes(e.name)):this.get("dataGroups")}getActiveDataGroups(t){let{ACTIVE:e}=sd.items.status;return this.getDataGroups(t).filter(t=>t.status===e)}getDataGroupNames(t){return this.getDataGroups(t).map(t=>t.name)}getActiveDataGroupNames(t){return this.getActiveDataGroups(t).map(t=>t.name)}aggregateBinDataByGroup(t){return lf(t,"group")}getBinConfigurations(){let t=this.getDisplayData(),e=this.getOptions(),n=this.services.cartesianScales.getMainXAxisPosition(),i=this.services.cartesianScales.getDomainIdentifier(),r=e.axes[n],{groupMapsTo:o}=e.data,{bins:a=10}=r,s=Array.isArray(a),l=(function(){var t=lp,e=rM,n=lm;function i(i){Array.isArray(i)||(i=Array.from(i));var r,o,a,s=i.length,l=Array(s);for(r=0;r<s;++r)l[r]=t(i[r],r,i);var c=e(l),u=c[0],h=c[1],d=n(l,u,h);if(!Array.isArray(d)){let t=h,n=+d;if(e===rM&&([u,h]=function(t,e,n){let i;for(;;){let r=rP(t,e,n);if(r===i||0===r||!isFinite(r))return[t,e];r>0?(t=Math.floor(t/r)*r,e=Math.ceil(e/r)*r):r<0&&(t=Math.ceil(t*r)/r,e=Math.floor(e*r)/r),i=r}}(u,h,n)),(d=rN(u,h,n))[0]<=u&&(a=rP(u,h,n)),d[d.length-1]>=h)if(t>=h&&e===rM){let t=rP(u,h,n);isFinite(t)&&(t>0?h=(Math.floor(h/t)+1)*t:t<0&&(h=-((Math.ceil(-(h*t))+1)/t)))}else d.pop()}for(var f=d.length,p=0,g=f;d[p]<=u;)++p;for(;d[g-1]>h;)--g;(p||g<f)&&(d=d.slice(p,g),f=g-p);var m,y=Array(f+1);for(r=0;r<=f;++r)(m=y[r]=[]).x0=r>0?d[r-1]:u,m.x1=r<f?d[r]:h;if(isFinite(a)){if(a>0)for(r=0;r<s;++r)null!=(o=l[r])&&u<=o&&o<=h&&y[Math.min(f,Math.floor((o-u)/a))].push(i[r]);else if(a<0){for(r=0;r<s;++r)if(null!=(o=l[r])&&u<=o&&o<=h){let t=Math.floor((u-o)*a);y[Math.min(f,t+(d[t]<=o))].push(i[r])}}}else for(r=0;r<s;++r)null!=(o=l[r])&&u<=o&&o<=h&&y[rO(d,o,0,f)].push(i[r]);return y}return i.value=function(e){return arguments.length?(t="function"==typeof e?e:()=>e,i):t},i.domain=function(t){var n;return arguments.length?(e="function"==typeof t?t:(n=[t[0],t[1]],()=>n),i):e},i.thresholds=function(t){var e;return arguments.length?(n="function"==typeof t?t:(e=Array.isArray(t)?lg.call(t):t,()=>e),i):n},i})().value(t=>t[i]).thresholds(a)(t);if(s)l[l.length-1].x1=a[a.length-1];else{let t=l[0].x1-l[0].x0;l[l.length-1].x1=+l[l.length-1].x0+t}let c=s?[a[0],a[a.length-1]]:[l[0].x0,l[l.length-1].x1],u=Array.from(new Set(t.map(t=>t[o]))),h=[];return l.forEach(t=>{let e=`${t.x0}-${t.x1}`,n=this.aggregateBinDataByGroup(t);u.forEach(i=>{h.push({group:i,key:e,value:n[i]||0,bin:t.x0})})}),{bins:l,binsDomain:c}}getBinnedStackedData(){let{groupMapsTo:t}=this.getOptions().data,e=this.getActiveDataGroupNames(),{bins:n}=this.getBinConfigurations(),i=this.getDataValuesGroupedByKeys({bins:n});return lx().keys(e)(i).map((n,i)=>Object.keys(n).filter(t=>!isNaN(t)).map(r=>{let o=n[r];return o[t]=e[i],o}))}getGroupedData(t){let e=this.getDisplayData(t),n={},{groupMapsTo:i}=this.getOptions().data;return e.map(t=>{let e=t[i];null!==n[e]&&void 0!==n[e]?n[e].push(t):n[e]=[t]}),Object.keys(n).map(t=>({name:t,data:n[t]}))}getStackKeys({bins:t=null,groups:e=null}={bins:null,groups:null}){let n,i=this.getOptions(),r=this.getDisplayData(e);n=t?t.map(t=>`${t.x0}:${t.x1}`):rx(r.map(t=>{let e=this.services.cartesianScales.getDomainIdentifier(t);return t[e]instanceof Date?ls(t[e]):t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]}));let o=this.services.cartesianScales.domainAxisPosition,a=i.axes[o].scaleType;return a===t0.TIME?n.sort((t,e)=>new Date(t)-new Date(e)):(a===t0.LOG||a===t0.LINEAR)&&n.sort((t,e)=>t-e),n}getDataValuesGroupedByKeys({bins:t=null,groups:e=null}){let{groupMapsTo:n}=this.getOptions().data,i=this.getDisplayData(e),r=this.getDataGroupNames(),o=this.getStackKeys({bins:t,groups:e});return t?o.map(e=>{let[i,o]=e.split(":"),a={x0:i,x1:o},s=t.find(t=>t.x0.toString()===i.toString());return r.forEach(t=>{a[t]=s.filter(e=>e[n]===t).length}),a}):o.map(t=>{let e={sharedStackKey:t};return r.forEach(r=>{let o=i.find(e=>{let i=this.services.cartesianScales.getDomainIdentifier(e);return e[n]===r&&Object.prototype.hasOwnProperty.call(e,i)&&(e[i]instanceof Date?ls(e[i])===t:e[i].toString()===t)}),a=this.services.cartesianScales.getRangeIdentifier(e);e[r]=o?o[a]:null}),e})}getStackedData({percentage:t=!1,groups:e=null,divergent:n=!1}){let{groupMapsTo:i}=this.getOptions().data,r=this.getActiveDataGroupNames(e),o=this.getDataValuesGroupedByKeys({groups:e});if(t){let t=function(t){for(var e=-1,n=null==t?0:t.length,i={};++e<n;){var r=t[e];i[r[0]]=r[1]}return i}(o.map(t=>[t.sharedStackKey,0]));o.forEach(e=>{r.forEach(n=>{t[e.sharedStackKey]+=e[n]})}),o.forEach(e=>{r.forEach(n=>{let i=t[e.sharedStackKey];t[e.sharedStackKey]?e[n]=e[n]/i*100:e[n]=0})})}return(n?lx().offset(lE):lx()).keys(r)(o).map((t,e)=>Object.keys(t).filter(t=>!isNaN(t)).map(n=>{let o=t[n];return o[i]=r[e],o}))}getOptions(){return this.state.options}set(t,e){this.state=Object.assign({},this.state,t);let n=Object.assign({skipUpdate:!1,animate:!0},e);n.skipUpdate||this.update(n.animate)}get(t){return t?this.state[t]:this.state}setOptions(t){let e=this.getOptions();sP(e,t),this.set({options:ry(e,t)})}update(t=!0){this.getDisplayData()&&(this.updateAllDataGroups(),this.setCustomColorScale(),this.setColorClassNames(),this.services.events.dispatchEvent(tW.Model.UPDATE,{animate:t}))}toggleDataLabel(t){let{ACTIVE:e,DISABLED:n}=sd.items.status,i=this.getDataGroups(),r=i.some(t=>t.status===n),o=i.filter(t=>t.status===e);if(r)if(1===o.length&&o[0].name===t)i.forEach((t,n)=>{i[n].status=e});else{let r=i.findIndex(e=>e.name===t);i[r].status=i[r].status===n?e:n}else i.forEach((r,o)=>{i[o].status=r.name===t?e:n});let a=i.filter(t=>t.status===e),s=this.getOptions();i.some(t=>t.status===n)?s.data.selectedGroups=a.map(t=>t.name):s.data.selectedGroups=[],this.services.events.dispatchEvent(tW.Legend.ITEMS_UPDATE,{dataGroups:i}),this.set({dataGroups:i})}getIsFilled(t,e,n,i){let r=this.getOptions();return r.getIsFilled?r.getIsFilled(t,e,n,i):i}getFillColor(t,e,n){let i=this.getOptions(),r=sU(this.colorScale,t);return i.getFillColor?i.getFillColor(t,e,n,r):r}getStrokeColor(t,e,n){let i=this.getOptions(),r=sU(this.colorScale,t);return i.getStrokeColor?i.getStrokeColor(t,e,n,r):r}isUserProvidedColorScaleValid(){let t=sU(this.getOptions(),"color","scale"),e=this.getDataGroups();return null!=t&&0!=Object.keys(t).length&&e.some(e=>Object.keys(t).includes(e.name))}getColorClassName(t){let e=this.colorClassNames(t.dataGroupName),n=t.originalClassName;return t.classNameTypes.forEach(i=>n=t.originalClassName?`${n} ${i}-${e}`:`${i}-${e}`),n||""}getStatus(){return null}getAllDataGroupsNames(){return this.allDataGroups}transformToTabularData(t){console.warn("We've updated the charting data format to be tabular by default. The current format you're using is deprecated and will be removed in v1.0, read more here https://charts.carbondesignsystem.com/");let e=[],{datasets:n,labels:i}=t;return n.forEach(t=>{t.data.forEach((n,r)=>{let o,a=sU(t,"label");if(null===a){let t=sU(i,r);o=t||"Ungrouped"}else o=a;let s={group:o,key:i[r]};isNaN(n)?(s.value=n.value,s.date=n.date):s.value=n,e.push(s)})}),e}getTabularDataArray(){return[]}exportToCSV(){let t=this.getTabularDataArray().map(t=>t.map(t=>`"${("&ndash;"===t?"–":t).split(/[,;'"`]/).map(t=>{let e;return["=","+","-","@"," ","\r"].includes((e=t.trim()).charAt(0))?`\xa0${e}`:/[,\"\n]/.test(e)?`"${e}"`:e}).join("")}"`)).map(t=>t.join(",")).join(`
2
- `),e=this.getOptions(),n="myChart",i=sU(e,"fileDownload","fileName");"function"==typeof i?n=i("csv"):"string"==typeof i&&(n=i),this.services.files.downloadCSV(t,`${n}.csv`)}getTabularData(t){return Array.isArray(t)?t:this.transformToTabularData(t)}sanitize(t){return t=this.getTabularData(t)}updateAllDataGroups(){this.allDataGroups?this.getDataGroupNames().forEach(t=>{-1===this.allDataGroups.indexOf(t)&&this.allDataGroups.push(t)}):this.allDataGroups=this.getDataGroupNames()}generateDataGroups(t){let{groupMapsTo:e}=this.getOptions().data,{ACTIVE:n,DISABLED:i}=sd.items.status,r=this.getOptions(),o=rx(t.map(t=>t[e]));return r.data.selectedGroups.length&&(r.data.selectedGroups.every(t=>o.includes(t))||(r.data.selectedGroups=[])),o.map(t=>({name:t,status:!r.data.selectedGroups.length||r.data.selectedGroups.includes(t)?n:i}))}setCustomColorScale(){if(!this.isUserProvidedColorScaleValid())return;let t=sU(this.getOptions(),"color","scale");Object.keys(t).forEach(t=>{this.allDataGroups.includes(t)||console.warn(`"${t}" does not exist in data groups.`)}),this.allDataGroups.filter(e=>t[e]).forEach(e=>this.colorScale[e]=t[e])}setColorClassNames(){let t=sU(this.getOptions(),"color","pairing"),e=sU(t,"numberOfVariants");(!e||e<this.allDataGroups.length)&&(e=this.allDataGroups.length);let n=sU(t,"option"),i=e>5?14:e,r=`${i}-color`;n=n<=sh[r]?n:1;let o=this.allDataGroups.map((t,e)=>`${i}-${n}-${e%14+1}`);this.colorClassNames=a5().range(o).domain(this.allDataGroups)}}class lT extends lw{constructor(t){super(t),this.axisFlavor=ed.DEFAULT}assignRangeAndDomains(){let{cartesianScales:t}=this.services,e=this.getOptions(),n=t.isDualAxes(),i={primaryDomain:t.domainAxisPosition,primaryRange:t.rangeAxisPosition,secondaryDomain:null,secondaryRange:null};return n&&(i.secondaryDomain=t.secondaryDomainAxisPosition,i.secondaryRange=t.secondaryRangeAxisPosition),Object.keys(i).forEach(n=>{let r=i[n];t.scales[r]?i[n]={position:r,label:t.getScaleLabel(r),identifier:sU(e,"axes",r,"mapsTo")}:i[n]=null}),i}getTabularDataArray(){let t=this.getDisplayData(),{groupMapsTo:e}=this.getOptions().data,{primaryDomain:n,primaryRange:i,secondaryDomain:r,secondaryRange:o}=this.assignRangeAndDomains(),{number:a,code:s}=sU(this.getOptions(),"locale"),l=["Group",n.label,i.label,...r?[r.label]:[],...o?[o.label]:[]],c=t.map(t=>[t[e],null===t[n.identifier]?"&ndash;":t[n.identifier],null===t[i.identifier]||isNaN(t[i.identifier])?"&ndash;":a(t[i.identifier],s),...r?[null===t[r.identifier]?"&ndash;":t[r.identifier]]:[],...o?[null===t[o.identifier]||isNaN(t[o.identifier])?"&ndash;":t[o.identifier]]:[]]);return super.formatTable({headers:l,cells:c})}setData(t){let e;if(t&&(e=super.setData(t),sU(this.getOptions(),"zoomBar",tq.TOP,"enabled"))){let t=sU(this.getOptions(),"zoomBar",tq.TOP,"data");this.setZoomBarData(t)}return e}setZoomBarData(t){let e=t?this.sanitize(i5(t,5)):this.getDisplayData(),n=e,{cartesianScales:i}=this.services;if(e&&i.domainAxisPosition&&i.rangeAxisPosition){let t=i.getDomainIdentifier(),r=i.getRangeIdentifier(),o=e.map(e=>e[t].getTime());n=(o=rx(o).sort()).map(n=>{let i=0,o={};return e.forEach(e=>{e[t].getTime()===n&&(i+=e[r])}),o[t]=new Date(n),o[r]=i,o})}this.set({zoomBarData:n})}getZoomBarData(){return this.get("zoomBarData")}sanitizeDateValues(t){let e=this.getOptions();if(!e.axes)return t;let n=[];return Object.keys(tq).forEach(t=>{let i=tq[t],r=e.axes[i];if(r&&r.scaleType===t0.TIME){let t=r.mapsTo;(null!==t||void 0!==t)&&n.push(t)}}),n.length>0&&t.forEach(t=>{n.forEach(e=>{null===sU(t,e,"getTime")&&(t[e]=new Date(t[e]))})}),t}sanitize(t){return t=super.sanitize(t),t=this.sanitizeDateValues(t)}}var lS=/\s/,lO=/^\s+/,lM=NaN,lA=/^[-+]0x[0-9a-f]+$/i,lD=/^0b[01]+$/i,lk=/^0o[0-7]+$/i,lC=parseInt;function lL(t){if("number"==typeof t)return t;if(e$(t))return lM;if(eW(t)){var e,n="function"==typeof t.valueOf?t.valueOf():t;t=eW(n)?n+"":n}if("string"!=typeof t)return 0===t?t:+t;t=(e=t)&&e.slice(0,function(t){for(var e=t.length;e--&&lS.test(t.charAt(e)););return e}(e)+1).replace(lO,"");var i=lD.test(t);return i||lk.test(t)?lC(t.slice(2),i?2:8):lA.test(t)?lM:+t}var lR=function(){return eC.Date.now()},lI=Math.max,lN=Math.min;function lP(t){return"string"==typeof t?new oy([[document.querySelector(t)]],[document.documentElement]):new oy([[t]],om)}function lU(){var t,e,n=a5().unknown(void 0),i=n.domain,r=n.range,o=0,a=1,s=!1,l=0,c=0,u=.5;function h(){var n=i().length,h=a<o,d=h?a:o,f=h?o:a;t=(f-d)/Math.max(1,n-l+2*c),s&&(t=Math.floor(t)),d+=(f-d-t*(n-l))*u,e=t*(1-l),s&&(d=Math.round(d),e=Math.round(e));var p=(function(t,e,n){t*=1,e*=1,n=(r=arguments.length)<2?(e=t,t=0,1):r<3?1:+n;for(var i=-1,r=0|Math.max(0,Math.ceil((e-t)/n)),o=Array(r);++i<r;)o[i]=t+i*n;return o})(n).map(function(e){return d+t*e});return r(h?p.reverse():p)}return delete n.unknown,n.domain=function(t){return arguments.length?(i(t),h()):i()},n.range=function(t){return arguments.length?([o,a]=t,o*=1,a*=1,h()):[o,a]},n.rangeRound=function(t){return[o,a]=t,o*=1,a*=1,s=!0,h()},n.bandwidth=function(){return e},n.step=function(){return t},n.round=function(t){return arguments.length?(s=!!t,h()):s},n.padding=function(t){return arguments.length?(l=Math.min(1,c=+t),h()):l},n.paddingInner=function(t){return arguments.length?(l=Math.min(1,t),h()):l},n.paddingOuter=function(t){return arguments.length?(c=+t,h()):c},n.align=function(t){return arguments.length?(u=Math.max(0,Math.min(1,t)),h()):u},n.copy=function(){return lU(i(),[o,a]).round(s).paddingInner(l).paddingOuter(c).align(u)},a2.apply(h(),arguments)}function lB(t,e){t=t.slice();var n,i=0,r=t.length-1,o=t[i],a=t[r];return a<o&&(n=i,i=r,r=n,n=o,o=a,a=n),t[i]=e.floor(o),t[r]=e.ceil(a),t}let lF=new Date,lH=new Date;function l$(t,e,n,i){function r(e){return t(e=0==arguments.length?new Date:new Date(+e)),e}return r.floor=e=>(t(e=new Date(+e)),e),r.ceil=n=>(t(n=new Date(n-1)),e(n,1),t(n),n),r.round=t=>{let e=r(t),n=r.ceil(t);return t-e<n-t?e:n},r.offset=(t,n)=>(e(t=new Date(+t),null==n?1:Math.floor(n)),t),r.range=(n,i,o)=>{let a,s=[];if(n=r.ceil(n),o=null==o?1:Math.floor(o),!(n<i)||!(o>0))return s;do s.push(a=new Date(+n)),e(n,o),t(n);while(a<n&&n<i);return s},r.filter=n=>l$(e=>{if(e>=e)for(;t(e),!n(e);)e.setTime(e-1)},(t,i)=>{if(t>=t)if(i<0)for(;++i<=0;)for(;e(t,-1),!n(t););else for(;--i>=0;)for(;e(t,1),!n(t););}),n&&(r.count=(e,i)=>(lF.setTime(+e),lH.setTime(+i),t(lF),t(lH),Math.floor(n(lF,lH))),r.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?r.filter(i?e=>i(e)%t==0:e=>r.count(0,e)%t==0):r:null),r}let lz=l$(()=>{},(t,e)=>{t.setTime(+t+e)},(t,e)=>e-t);lz.every=t=>isFinite(t=Math.floor(t))&&t>0?t>1?l$(e=>{e.setTime(Math.floor(e/t)*t)},(e,n)=>{e.setTime(+e+n*t)},(e,n)=>(n-e)/t):lz:null,lz.range;let lj=l$(t=>{t.setTime(t-t.getMilliseconds())},(t,e)=>{t.setTime(+t+1e3*e)},(t,e)=>(e-t)/1e3,t=>t.getUTCSeconds());lj.range;let lG=l$(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds())},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getMinutes());lG.range,l$(t=>{t.setUTCSeconds(0,0)},(t,e)=>{t.setTime(+t+6e4*e)},(t,e)=>(e-t)/6e4,t=>t.getUTCMinutes()).range;let lV=l$(t=>{t.setTime(t-t.getMilliseconds()-1e3*t.getSeconds()-6e4*t.getMinutes())},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getHours());lV.range,l$(t=>{t.setUTCMinutes(0,0,0)},(t,e)=>{t.setTime(+t+36e5*e)},(t,e)=>(e-t)/36e5,t=>t.getUTCHours()).range;let lW=l$(t=>t.setHours(0,0,0,0),(t,e)=>t.setDate(t.getDate()+e),(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/864e5,t=>t.getDate()-1);lW.range;let lY=l$(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>t.getUTCDate()-1);function lZ(t){return l$(e=>{e.setDate(e.getDate()-(e.getDay()+7-t)%7),e.setHours(0,0,0,0)},(t,e)=>{t.setDate(t.getDate()+7*e)},(t,e)=>(e-t-(e.getTimezoneOffset()-t.getTimezoneOffset())*6e4)/6048e5)}lY.range,l$(t=>{t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+e)},(t,e)=>(e-t)/864e5,t=>Math.floor(t/864e5)).range;let lX=lZ(0),lq=lZ(1),lK=lZ(2),lQ=lZ(3),lJ=lZ(4),l0=lZ(5),l1=lZ(6);function l2(t){return l$(e=>{e.setUTCDate(e.getUTCDate()-(e.getUTCDay()+7-t)%7),e.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCDate(t.getUTCDate()+7*e)},(t,e)=>(e-t)/6048e5)}lX.range,lq.range,lK.range,lQ.range,lJ.range,l0.range,l1.range;let l3=l2(0),l5=l2(1),l4=l2(2),l8=l2(3),l6=l2(4),l9=l2(5),l7=l2(6);l3.range,l5.range,l4.range,l8.range,l6.range,l9.range,l7.range;let ct=l$(t=>{t.setDate(1),t.setHours(0,0,0,0)},(t,e)=>{t.setMonth(t.getMonth()+e)},(t,e)=>e.getMonth()-t.getMonth()+(e.getFullYear()-t.getFullYear())*12,t=>t.getMonth());ct.range,l$(t=>{t.setUTCDate(1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCMonth(t.getUTCMonth()+e)},(t,e)=>e.getUTCMonth()-t.getUTCMonth()+(e.getUTCFullYear()-t.getUTCFullYear())*12,t=>t.getUTCMonth()).range;let ce=l$(t=>{t.setMonth(0,1),t.setHours(0,0,0,0)},(t,e)=>{t.setFullYear(t.getFullYear()+e)},(t,e)=>e.getFullYear()-t.getFullYear(),t=>t.getFullYear());ce.every=t=>isFinite(t=Math.floor(t))&&t>0?l$(e=>{e.setFullYear(Math.floor(e.getFullYear()/t)*t),e.setMonth(0,1),e.setHours(0,0,0,0)},(e,n)=>{e.setFullYear(e.getFullYear()+n*t)}):null,ce.range;let cn=l$(t=>{t.setUTCMonth(0,1),t.setUTCHours(0,0,0,0)},(t,e)=>{t.setUTCFullYear(t.getUTCFullYear()+e)},(t,e)=>e.getUTCFullYear()-t.getUTCFullYear(),t=>t.getUTCFullYear());cn.every=t=>isFinite(t=Math.floor(t))&&t>0?l$(e=>{e.setUTCFullYear(Math.floor(e.getUTCFullYear()/t)*t),e.setUTCMonth(0,1),e.setUTCHours(0,0,0,0)},(e,n)=>{e.setUTCFullYear(e.getUTCFullYear()+n*t)}):null,cn.range;let[ci,cr]=function(t,e,n,i,r,o){let a=[[lj,1,1e3],[lj,5,5e3],[lj,15,15e3],[lj,30,3e4],[o,1,6e4],[o,5,3e5],[o,15,9e5],[o,30,18e5],[r,1,36e5],[r,3,108e5],[r,6,216e5],[r,12,432e5],[i,1,864e5],[i,2,1728e5],[n,1,6048e5],[e,1,2592e6],[e,3,7776e6],[t,1,31536e6]];function s(e,n,i){let r=Math.abs(n-e)/i,o=rT(([,,t])=>t).right(a,r);if(o===a.length)return t.every(rU(e/31536e6,n/31536e6,i));if(0===o)return lz.every(Math.max(rU(e,n,i),1));let[s,l]=a[r/a[o-1][2]<a[o][2]/r?o-1:o];return s.every(l)}return[function(t,e,n){let i=e<t;i&&([t,e]=[e,t]);let r=n&&"function"==typeof n.range?n:s(t,e,n),o=r?r.range(t,+e+1):[];return i?o.reverse():o},s]}(ce,ct,lX,lW,lV,lG);function co(t){if(0<=t.y&&t.y<100){var e=new Date(-1,t.m,t.d,t.H,t.M,t.S,t.L);return e.setFullYear(t.y),e}return new Date(t.y,t.m,t.d,t.H,t.M,t.S,t.L)}function ca(t){if(0<=t.y&&t.y<100){var e=new Date(Date.UTC(-1,t.m,t.d,t.H,t.M,t.S,t.L));return e.setUTCFullYear(t.y),e}return new Date(Date.UTC(t.y,t.m,t.d,t.H,t.M,t.S,t.L))}function cs(t,e,n){return{y:t,m:e,d:n,H:0,M:0,S:0,L:0}}var cl={"-":"",_:" ",0:"0"},cc=/^\s*\d+/,cu=/^%/,ch=/[\\^$*+?|[\]().{}]/g;function cd(t,e,n){var i=t<0?"-":"",r=(i?-t:t)+"",o=r.length;return i+(o<n?Array(n-o+1).join(e)+r:r)}function cf(t){return t.replace(ch,"\\$&")}function cp(t){return RegExp("^(?:"+t.map(cf).join("|")+")","i")}function cg(t){return new Map(t.map((t,e)=>[t.toLowerCase(),e]))}function cm(t,e,n){var i=cc.exec(e.slice(n,n+1));return i?(t.w=+i[0],n+i[0].length):-1}function cy(t,e,n){var i=cc.exec(e.slice(n,n+1));return i?(t.u=+i[0],n+i[0].length):-1}function cv(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.U=+i[0],n+i[0].length):-1}function c_(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.V=+i[0],n+i[0].length):-1}function cb(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.W=+i[0],n+i[0].length):-1}function cx(t,e,n){var i=cc.exec(e.slice(n,n+4));return i?(t.y=+i[0],n+i[0].length):-1}function cE(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.y=+i[0]+(+i[0]>68?1900:2e3),n+i[0].length):-1}function cw(t,e,n){var i=/^(Z)|([+-]\d\d)(?::?(\d\d))?/.exec(e.slice(n,n+6));return i?(t.Z=i[1]?0:-(i[2]+(i[3]||"00")),n+i[0].length):-1}function cT(t,e,n){var i=cc.exec(e.slice(n,n+1));return i?(t.q=3*i[0]-3,n+i[0].length):-1}function cS(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.m=i[0]-1,n+i[0].length):-1}function cO(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.d=+i[0],n+i[0].length):-1}function cM(t,e,n){var i=cc.exec(e.slice(n,n+3));return i?(t.m=0,t.d=+i[0],n+i[0].length):-1}function cA(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.H=+i[0],n+i[0].length):-1}function cD(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.M=+i[0],n+i[0].length):-1}function ck(t,e,n){var i=cc.exec(e.slice(n,n+2));return i?(t.S=+i[0],n+i[0].length):-1}function cC(t,e,n){var i=cc.exec(e.slice(n,n+3));return i?(t.L=+i[0],n+i[0].length):-1}function cL(t,e,n){var i=cc.exec(e.slice(n,n+6));return i?(t.L=Math.floor(i[0]/1e3),n+i[0].length):-1}function cR(t,e,n){var i=cu.exec(e.slice(n,n+1));return i?n+i[0].length:-1}function cI(t,e,n){var i=cc.exec(e.slice(n));return i?(t.Q=+i[0],n+i[0].length):-1}function cN(t,e,n){var i=cc.exec(e.slice(n));return i?(t.s=+i[0],n+i[0].length):-1}function cP(t,e){return cd(t.getDate(),e,2)}function cU(t,e){return cd(t.getHours(),e,2)}function cB(t,e){return cd(t.getHours()%12||12,e,2)}function cF(t,e){return cd(1+lW.count(ce(t),t),e,3)}function cH(t,e){return cd(t.getMilliseconds(),e,3)}function c$(t,e){return cH(t,e)+"000"}function cz(t,e){return cd(t.getMonth()+1,e,2)}function cj(t,e){return cd(t.getMinutes(),e,2)}function cG(t,e){return cd(t.getSeconds(),e,2)}function cV(t){var e=t.getDay();return 0===e?7:e}function cW(t,e){return cd(lX.count(ce(t)-1,t),e,2)}function cY(t){var e=t.getDay();return e>=4||0===e?lJ(t):lJ.ceil(t)}function cZ(t,e){return t=cY(t),cd(lJ.count(ce(t),t)+(4===ce(t).getDay()),e,2)}function cX(t){return t.getDay()}function cq(t,e){return cd(lq.count(ce(t)-1,t),e,2)}function cK(t,e){return cd(t.getFullYear()%100,e,2)}function cQ(t,e){return cd((t=cY(t)).getFullYear()%100,e,2)}function cJ(t,e){return cd(t.getFullYear()%1e4,e,4)}function c0(t,e){var n=t.getDay();return cd((t=n>=4||0===n?lJ(t):lJ.ceil(t)).getFullYear()%1e4,e,4)}function c1(t){var e=t.getTimezoneOffset();return(e>0?"-":(e*=-1,"+"))+cd(e/60|0,"0",2)+cd(e%60,"0",2)}function c2(t,e){return cd(t.getUTCDate(),e,2)}function c3(t,e){return cd(t.getUTCHours(),e,2)}function c5(t,e){return cd(t.getUTCHours()%12||12,e,2)}function c4(t,e){return cd(1+lY.count(cn(t),t),e,3)}function c8(t,e){return cd(t.getUTCMilliseconds(),e,3)}function c6(t,e){return c8(t,e)+"000"}function c9(t,e){return cd(t.getUTCMonth()+1,e,2)}function c7(t,e){return cd(t.getUTCMinutes(),e,2)}function ut(t,e){return cd(t.getUTCSeconds(),e,2)}function ue(t){var e=t.getUTCDay();return 0===e?7:e}function un(t,e){return cd(l3.count(cn(t)-1,t),e,2)}function ui(t){var e=t.getUTCDay();return e>=4||0===e?l6(t):l6.ceil(t)}function ur(t,e){return t=ui(t),cd(l6.count(cn(t),t)+(4===cn(t).getUTCDay()),e,2)}function uo(t){return t.getUTCDay()}function ua(t,e){return cd(l5.count(cn(t)-1,t),e,2)}function us(t,e){return cd(t.getUTCFullYear()%100,e,2)}function ul(t,e){return cd((t=ui(t)).getUTCFullYear()%100,e,2)}function uc(t,e){return cd(t.getUTCFullYear()%1e4,e,4)}function uu(t,e){var n=t.getUTCDay();return cd((t=n>=4||0===n?l6(t):l6.ceil(t)).getUTCFullYear()%1e4,e,4)}function uh(){return"+0000"}function ud(){return"%"}function uf(t){return+t}function up(t){return Math.floor(t/1e3)}function ug(t){return new Date(t)}function um(t){return t instanceof Date?+t:+new Date(+t)}function uy(){return a2.apply((function t(e,n,i,r,o,a,s,l,c,u){var h=sn()(a6,a6),d=h.invert,f=h.domain,p=u(".%L"),g=u(":%S"),m=u("%I:%M"),y=u("%I %p"),v=u("%a %d"),_=u("%b %d"),b=u("%B"),x=u("%Y");function E(t){return(c(t)<t?p:l(t)<t?g:s(t)<t?m:a(t)<t?y:r(t)<t?o(t)<t?v:_:i(t)<t?b:x)(t)}return h.invert=function(t){return new Date(d(t))},h.domain=function(t){return arguments.length?f(Array.from(t,um)):f().map(ug)},h.ticks=function(t){var n=f();return e(n[0],n[n.length-1],t??10)},h.tickFormat=function(t,e){return null==e?E:u(e)},h.nice=function(t){var e=f();return t&&"function"==typeof t.range||(t=n(e[0],e[e.length-1],t??10)),t?f(lB(e,t)):h},h.copy=function(){return se(h,t(e,n,i,r,o,a,s,l,c,u))},h})(ci,cr,ce,ct,lX,lW,lV,lG,lj,dG).domain([new Date(2e3,0,1),new Date(2e3,0,2)]),arguments)}dG=(dj=function(t){var e=t.dateTime,n=t.date,i=t.time,r=t.periods,o=t.days,a=t.shortDays,s=t.months,l=t.shortMonths,c=cp(r),u=cg(r),h=cp(o),d=cg(o),f=cp(a),p=cg(a),g=cp(s),m=cg(s),y=cp(l),v=cg(l),_={a:function(t){return a[t.getDay()]},A:function(t){return o[t.getDay()]},b:function(t){return l[t.getMonth()]},B:function(t){return s[t.getMonth()]},c:null,d:cP,e:cP,f:c$,g:cQ,G:c0,H:cU,I:cB,j:cF,L:cH,m:cz,M:cj,p:function(t){return r[+(t.getHours()>=12)]},q:function(t){return 1+~~(t.getMonth()/3)},Q:uf,s:up,S:cG,u:cV,U:cW,V:cZ,w:cX,W:cq,x:null,X:null,y:cK,Y:cJ,Z:c1,"%":ud},b={a:function(t){return a[t.getUTCDay()]},A:function(t){return o[t.getUTCDay()]},b:function(t){return l[t.getUTCMonth()]},B:function(t){return s[t.getUTCMonth()]},c:null,d:c2,e:c2,f:c6,g:ul,G:uu,H:c3,I:c5,j:c4,L:c8,m:c9,M:c7,p:function(t){return r[+(t.getUTCHours()>=12)]},q:function(t){return 1+~~(t.getUTCMonth()/3)},Q:uf,s:up,S:ut,u:ue,U:un,V:ur,w:uo,W:ua,x:null,X:null,y:us,Y:uc,Z:uh,"%":ud},x={a:function(t,e,n){var i=f.exec(e.slice(n));return i?(t.w=p.get(i[0].toLowerCase()),n+i[0].length):-1},A:function(t,e,n){var i=h.exec(e.slice(n));return i?(t.w=d.get(i[0].toLowerCase()),n+i[0].length):-1},b:function(t,e,n){var i=y.exec(e.slice(n));return i?(t.m=v.get(i[0].toLowerCase()),n+i[0].length):-1},B:function(t,e,n){var i=g.exec(e.slice(n));return i?(t.m=m.get(i[0].toLowerCase()),n+i[0].length):-1},c:function(t,n,i){return T(t,e,n,i)},d:cO,e:cO,f:cL,g:cE,G:cx,H:cA,I:cA,j:cM,L:cC,m:cS,M:cD,p:function(t,e,n){var i=c.exec(e.slice(n));return i?(t.p=u.get(i[0].toLowerCase()),n+i[0].length):-1},q:cT,Q:cI,s:cN,S:ck,u:cy,U:cv,V:c_,w:cm,W:cb,x:function(t,e,i){return T(t,n,e,i)},X:function(t,e,n){return T(t,i,e,n)},y:cE,Y:cx,Z:cw,"%":cR};function E(t,e){return function(n){var i,r,o,a=[],s=-1,l=0,c=t.length;for(n instanceof Date||(n=new Date(+n));++s<c;)37===t.charCodeAt(s)&&(a.push(t.slice(l,s)),null!=(r=cl[i=t.charAt(++s)])?i=t.charAt(++s):r="e"===i?" ":"0",(o=e[i])&&(i=o(n,r)),a.push(i),l=s+1);return a.push(t.slice(l,s)),a.join("")}}function w(t,e){return function(n){var i,r,o=cs(1900,void 0,1);if(T(o,t,n+="",0)!=n.length)return null;if("Q"in o)return new Date(o.Q);if("s"in o)return new Date(1e3*o.s+("L"in o?o.L:0));if(!e||"Z"in o||(o.Z=0),"p"in o&&(o.H=o.H%12+12*o.p),void 0===o.m&&(o.m="q"in o?o.q:0),"V"in o){if(o.V<1||o.V>53)return null;"w"in o||(o.w=1),"Z"in o?(i=(r=(i=ca(cs(o.y,0,1))).getUTCDay())>4||0===r?l5.ceil(i):l5(i),i=lY.offset(i,(o.V-1)*7),o.y=i.getUTCFullYear(),o.m=i.getUTCMonth(),o.d=i.getUTCDate()+(o.w+6)%7):(i=(r=(i=co(cs(o.y,0,1))).getDay())>4||0===r?lq.ceil(i):lq(i),i=lW.offset(i,(o.V-1)*7),o.y=i.getFullYear(),o.m=i.getMonth(),o.d=i.getDate()+(o.w+6)%7)}else("W"in o||"U"in o)&&("w"in o||(o.w="u"in o?o.u%7:+("W"in o)),r="Z"in o?ca(cs(o.y,0,1)).getUTCDay():co(cs(o.y,0,1)).getDay(),o.m=0,o.d="W"in o?(o.w+6)%7+7*o.W-(r+5)%7:o.w+7*o.U-(r+6)%7);return"Z"in o?(o.H+=o.Z/100|0,o.M+=o.Z%100,ca(o)):co(o)}}function T(t,e,n,i){for(var r,o,a=0,s=e.length,l=n.length;a<s;){if(i>=l)return -1;if(37===(r=e.charCodeAt(a++))){if(!(o=x[(r=e.charAt(a++))in cl?e.charAt(a++):r])||(i=o(t,n,i))<0)return -1}else if(r!=n.charCodeAt(i++))return -1}return i}return _.x=E(n,_),_.X=E(i,_),_.c=E(e,_),b.x=E(n,b),b.X=E(i,b),b.c=E(e,b),{format:function(t){var e=E(t+="",_);return e.toString=function(){return t},e},parse:function(t){var e=w(t+="",!1);return e.toString=function(){return t},e},utcFormat:function(t){var e=E(t+="",b);return e.toString=function(){return t},e},utcParse:function(t){var e=w(t+="",!0);return e.toString=function(){return t},e}}}({dateTime:"%x, %X",date:"%-m/%-d/%Y",time:"%-I:%M:%S %p",periods:["AM","PM"],days:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],shortDays:["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],months:["January","February","March","April","May","June","July","August","September","October","November","December"],shortMonths:["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"]})).format,dj.parse,dj.utcFormat,dj.utcParse;let uv=Math.abs,u_=Math.atan2,ub=Math.cos,ux=Math.max,uE=Math.min,uw=Math.sin,uT=Math.sqrt,uS=Math.PI,uO=uS/2,uM=2*uS;function uA(t){return t>=1?uO:t<=-1?-uO:Math.asin(t)}function uD(t){this._context=t}function uk(t){return new uD(t)}function uC(){}function uL(t){this._context=t}function uR(t){return new uL(t)}uD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._point=0},lineEnd:function(){(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:this._context.lineTo(t,e)}}},uL.prototype={areaStart:uC,areaEnd:uC,lineStart:function(){this._point=0},lineEnd:function(){this._point&&this._context.closePath()},point:function(t,e){t*=1,e*=1,this._point?this._context.lineTo(t,e):(this._point=1,this._context.moveTo(t,e))}};let uI=(tc=0,()=>(tc+=1,`u${`0000${(1679616*Math.random()|0).toString(36)}`.slice(-4)}${tc}`));function uN(t){let e=[];for(let n=0,i=t.length;n<i;n++)e.push(t[n]);return e}function uP(t,e){let n=(t.ownerDocument.defaultView||window).getComputedStyle(t).getPropertyValue(e);return n?parseFloat(n.replace("px","")):0}function uU(t,e={}){let n,i,r,o;return{width:e.width||(n=uP(t,"border-left-width"),i=uP(t,"border-right-width"),t.clientWidth+n+i),height:e.height||(r=uP(t,"border-top-width"),o=uP(t,"border-bottom-width"),t.clientHeight+r+o)}}function uB(t){return new Promise((e,n)=>{let i=new Image;i.decode=()=>e(i),i.onload=()=>e(i),i.onerror=n,i.crossOrigin="anonymous",i.decoding="async",i.src=t})}async function uF(t){return Promise.resolve().then(()=>new XMLSerializer().serializeToString(t)).then(encodeURIComponent).then(t=>`data:image/svg+xml;charset=utf-8,${t}`)}async function uH(t,e,n){let i="http://www.w3.org/2000/svg",r=document.createElementNS(i,"svg"),o=document.createElementNS(i,"foreignObject");return r.setAttribute("width",`${e}`),r.setAttribute("height",`${n}`),r.setAttribute("viewBox",`0 0 ${e} ${n}`),o.setAttribute("width","100%"),o.setAttribute("height","100%"),o.setAttribute("x","0"),o.setAttribute("y","0"),o.setAttribute("externalResourcesRequired","true"),r.appendChild(o),o.appendChild(t),uF(r)}let u$=(t,e)=>{if(t instanceof e)return!0;let n=Object.getPrototypeOf(t);return null!==n&&(n.constructor.name===e.name||u$(n,e))};function uz(t,e,n){let i,r,o,a=window.getComputedStyle(t,n),s=a.getPropertyValue("content");if(""===s||"none"===s)return;let l=uI();try{e.className=`${e.className} ${l}`}catch{return}let c=document.createElement("style");c.appendChild((r=`.${l}:${n}`,o=a.cssText?(i=a.getPropertyValue("content"),`${a.cssText} content: '${i.replace(/'|"/g,"")}';`):uN(a).map(t=>{let e=a.getPropertyValue(t),n=a.getPropertyPriority(t);return`${t}: ${e}${n?" !important":""};`}).join(" "),document.createTextNode(`${r}{${o}}`))),e.appendChild(c)}let uj="application/font-woff",uG="image/jpeg",uV={woff:uj,woff2:uj,ttf:"application/font-truetype",eot:"application/vnd.ms-fontobject",png:"image/png",jpg:uG,jpeg:uG,gif:"image/gif",tiff:"image/tiff",svg:"image/svg+xml",webp:"image/webp"};function uW(t){let e;return uV[((e=/\.([^./]*?)$/g.exec(t))?e[1]:"").toLowerCase()]||""}function uY(t){return -1!==t.search(/^(data:)/)}async function uZ(t,e,n){let i=await fetch(t,e);if(404===i.status)throw Error(`Resource "${i.url}" not found`);let r=await i.blob();return new Promise((t,e)=>{let o=new FileReader;o.onerror=e,o.onloadend=()=>{try{t(n({res:i,result:o.result}))}catch(t){e(t)}},o.readAsDataURL(r)})}let uX={};async function uq(t,e,n){var i,r,o,a,s;let l,c,u=(i=t,r=e,o=n.includeQueryParams,c=i.replace(/\?.*/,""),o&&(c=i),/ttf|otf|eot|woff2?/i.test(c)&&(c=c.replace(/.*\//,"")),r?`[${r}]${c}`:c);if(null!=uX[u])return uX[u];n.cacheBust&&(t+=(/\?/.test(t)?"&":"?")+new Date().getTime());try{a=await uZ(t,n.fetchRequestInit,({res:t,result:n})=>(e||(e=t.headers.get("Content-Type")||""),n.split(/,/)[1])),s=e,l=`data:${s};base64,${a}`}catch(i){l=n.imagePlaceholder||"";let e=`Failed to fetch resource: ${t}`;i&&(e="string"==typeof i?i:i.message),e&&console.warn(e)}return uX[u]=l,l}async function uK(t){let e=t.toDataURL();return"data:,"===e?t.cloneNode(!1):uB(e)}async function uQ(t,e){if(t.currentSrc){let e=document.createElement("canvas"),n=e.getContext("2d");return e.width=t.clientWidth,e.height=t.clientHeight,n?.drawImage(t,0,0,e.width,e.height),uB(e.toDataURL())}let n=t.poster,i=uW(n);return uB(await uq(n,i,e))}async function uJ(t){var e;try{if(null!=(e=t?.contentDocument)&&e.body)return await u3(t.contentDocument.body,{},!0)}catch{}return t.cloneNode(!1)}async function u0(t,e){return u$(t,HTMLCanvasElement)?uK(t):u$(t,HTMLVideoElement)?uQ(t,e):u$(t,HTMLIFrameElement)?uJ(t):t.cloneNode(!1)}async function u1(t,e,n){var i,r;let o=[];return 0===(o=null!=t.tagName&&"SLOT"===t.tagName.toUpperCase()&&t.assignedNodes?uN(t.assignedNodes()):u$(t,HTMLIFrameElement)&&null!=(i=t.contentDocument)&&i.body?uN(t.contentDocument.body.childNodes):uN((null!=(r=t.shadowRoot)?r:t).childNodes)).length||u$(t,HTMLVideoElement)||await o.reduce((t,i)=>t.then(()=>u3(i,n)).then(t=>{t&&e.appendChild(t)}),Promise.resolve()),e}async function u2(t,e){let n=t.querySelectorAll?t.querySelectorAll("use"):[];if(0===n.length)return t;let i={};for(let r=0;r<n.length;r++){let o=n[r].getAttribute("xlink:href");if(o){let n=t.querySelector(o),r=document.querySelector(o);n||!r||i[o]||(i[o]=await u3(r,e,!0))}}let r=Object.values(i);if(r.length){let e="http://www.w3.org/1999/xhtml",n=document.createElementNS(e,"svg");n.setAttribute("xmlns",e),n.style.position="absolute",n.style.width="0",n.style.height="0",n.style.overflow="hidden",n.style.display="none";let i=document.createElementNS(e,"defs");n.appendChild(i);for(let t=0;t<r.length;t++)i.appendChild(r[t]);t.appendChild(n)}return t}async function u3(t,e,n){return n||!e.filter||e.filter(t)?Promise.resolve(t).then(t=>u0(t,e)).then(n=>u1(t,n,e)).then(e=>(u$(e,Element)&&(function(t,e){let n=e.style;if(!n)return;let i=window.getComputedStyle(t);i.cssText?(n.cssText=i.cssText,n.transformOrigin=i.transformOrigin):uN(i).forEach(r=>{let o=i.getPropertyValue(r);"font-size"===r&&o.endsWith("px")&&(o=`${Math.floor(parseFloat(o.substring(0,o.length-2)))-.1}px`),u$(t,HTMLIFrameElement)&&"display"===r&&"inline"===o&&(o="block"),"d"===r&&e.getAttribute("d")&&(o=`path(${e.getAttribute("d")})`),n.setProperty(r,o,i.getPropertyPriority(r))})}(t,e),uz(t,e,":before"),uz(t,e,":after"),u$(t,HTMLTextAreaElement)&&(e.innerHTML=t.value),u$(t,HTMLInputElement)&&e.setAttribute("value",t.value),function(t,e){if(u$(t,HTMLSelectElement)){let n=Array.from(e.children).find(e=>t.value===e.getAttribute("value"));n&&n.setAttribute("selected","")}}(t,e)),e)).then(t=>u2(t,e)):null}let u5=/url\((['"]?)([^'"]+?)\1\)/g,u4=/url\([^)]+\)\s*format\((["']?)([^"']+)\1\)/g,u8=/src:\s*(?:url\([^)]+\)\s*format\([^)]+\)[,;]\s*)+/g;async function u6(t,e,n,i,r){try{let o,a,s=n?function(t,e){if(t.match(/^[a-z]+:\/\//i))return t;if(t.match(/^\/\//))return window.location.protocol+t;if(t.match(/^[a-z]+:/i))return t;let n=document.implementation.createHTMLDocument(),i=n.createElement("base"),r=n.createElement("a");return n.head.appendChild(i),n.body.appendChild(r),e&&(i.href=e),r.href=t,r.href}(e,n):e,l=uW(e);return r||(o=await uq(s,l,i)),t.replace((a=e.replace(/([.*+?^${}()|\[\]\/\\])/g,"\\$1"),RegExp(`(url\\(['"]?)(${a})(['"]?\\))`,"g")),`$1${o}$3`)}catch{}return t}function u9(t){return -1!==t.search(u5)}async function u7(t,e,n){let i;if(!u9(t))return t;let r=function(t,{preferredFontFormat:e}){return e?t.replace(u8,t=>{for(;;){let[n,,i]=u4.exec(t)||[];if(!i)return"";if(i===e)return`src: ${n};`}}):t}(t,n);return(i=[],r.replace(u5,(t,e,n)=>(i.push(n),t)),i.filter(t=>!uY(t))).reduce((t,i)=>t.then(t=>u6(t,i,e,n)),Promise.resolve(r))}async function ht(t,e,n){var i;let r=null==(i=e.style)?void 0:i.getPropertyValue(t);if(r){let i=await u7(r,null,n);return e.style.setProperty(t,i,e.style.getPropertyPriority(t)),!0}return!1}async function he(t,e){await ht("background",t,e)||await ht("background-image",t,e),await ht("mask",t,e)||await ht("mask-image",t,e)}async function hn(t,e){let n=u$(t,HTMLImageElement);if(!(n&&!uY(t.src))&&!(u$(t,SVGImageElement)&&!uY(t.href.baseVal)))return;let i=n?t.src:t.href.baseVal,r=await uq(i,uW(i),e);await new Promise((e,i)=>{t.onload=e,t.onerror=i,t.decode&&(t.decode=e),"lazy"===t.loading&&(t.loading="eager"),n?(t.srcset="",t.src=r):t.href.baseVal=r})}async function hi(t,e){let n=uN(t.childNodes).map(t=>hr(t,e));await Promise.all(n).then(()=>t)}async function hr(t,e){u$(t,Element)&&(await he(t,e),await hn(t,e),await hi(t,e))}let ho={};async function ha(t){let e=ho[t];if(null!=e)return e;let n=await (await fetch(t)).text();return e={url:t,cssText:n},ho[t]=e,e}async function hs(t,e){let n=t.cssText,i=/url\(["']?([^"')]+)["']?\)/g;return Promise.all((n.match(/url\([^)]+\)/g)||[]).map(async r=>{let o=r.replace(i,"$1");return o.startsWith("https://")||(o=new URL(o,t.url).href),uZ(o,e.fetchRequestInit,({result:t})=>(n=n.replace(r,`url(${t})`),[r,t]))})).then(()=>n)}function hl(t){if(null==t)return[];let e=[],n=t.replace(/(\/\*[\s\S]*?\*\/)/gi,""),i=RegExp("((@.*?keyframes [\\s\\S]*?){([\\s\\S]*?}\\s*?)})","gi");for(;;){let t=i.exec(n);if(null===t)break;e.push(t[0])}n=n.replace(i,"");let r=/@import[\s\S]*?url\([^)]*\)[\s\S]*?;/gi,o=RegExp("((\\s*?(?:\\/\\*[\\s\\S]*?\\*\\/)?\\s*?@media[\\s\\S]*?){([\\s\\S]*?)}\\s*?})|(([\\s\\S]*?){([\\s\\S]*?)})","gi");for(;;){let t=r.exec(n);if(null===t){if(null===(t=o.exec(n)))break;r.lastIndex=o.lastIndex}else o.lastIndex=r.lastIndex;e.push(t[0])}return e}async function hc(t,e){let n=[],i=[];return t.forEach(n=>{if("cssRules"in n)try{uN(n.cssRules||[]).forEach((t,r)=>{if(t.type===CSSRule.IMPORT_RULE){let o=r+1,a=t.href,s=ha(a).then(t=>hs(t,e)).then(t=>hl(t).forEach(t=>{try{n.insertRule(t,t.startsWith("@import")?o+=1:n.cssRules.length)}catch(e){console.error("Error inserting rule from remote css",{rule:t,error:e})}})).catch(t=>{console.error("Error loading remote css",t.toString())});i.push(s)}})}catch(o){let r=t.find(t=>null==t.href)||document.styleSheets[0];null!=n.href&&i.push(ha(n.href).then(t=>hs(t,e)).then(t=>hl(t).forEach(t=>{r.insertRule(t,n.cssRules.length)})).catch(t=>{console.error("Error loading remote stylesheet",t)})),console.error("Error inlining remote css file",o)}}),Promise.all(i).then(()=>(t.forEach(t=>{if("cssRules"in t)try{uN(t.cssRules||[]).forEach(t=>{n.push(t)})}catch(e){console.error(`Error while reading CSS rules from ${t.href}`,e)}}),n))}async function hu(t,e){if(null==t.ownerDocument)throw Error("Provided element is not within a Document");let n=uN(t.ownerDocument.styleSheets);return(await hc(n,e)).filter(t=>t.type===CSSRule.FONT_FACE_RULE).filter(t=>u9(t.style.getPropertyValue("src")))}async function hh(t,e){let n=await hu(t,e);return(await Promise.all(n.map(t=>{let n=t.parentStyleSheet?t.parentStyleSheet.href:null;return u7(t.cssText,n,e)}))).join(`
3
- `)}async function hd(t,e){let n=null!=e.fontEmbedCSS?e.fontEmbedCSS:e.skipFonts?null:await hh(t,e);if(n){let e=document.createElement("style"),i=document.createTextNode(n);e.appendChild(i),t.firstChild?t.insertBefore(e,t.firstChild):t.appendChild(e)}}async function hf(t,e={}){let{width:n,height:i}=uU(t,e),r=await u3(t,e,!0);return await hd(r,e),await hr(r,e),function(t,e){let{style:n}=t;e.backgroundColor&&(n.backgroundColor=e.backgroundColor),e.width&&(n.width=`${e.width}px`),e.height&&(n.height=`${e.height}px`);let i=e.style;null!=i&&Object.keys(i).forEach(t=>{n[t]=i[t]})}(r,e),await uH(r,n,i)}async function hp(t,e={}){let{width:n,height:i}=uU(t,e),r=await hf(t,e),o=await uB(r),a=document.createElement("canvas"),s=a.getContext("2d"),l=e.pixelRatio||function(){let t,e;try{e=process}catch{}let n=e&&e.env?e.env.devicePixelRatio:null;return n&&Number.isNaN(t=parseInt(n,10))&&(t=1),t||window.devicePixelRatio||1}(),c=e.canvasWidth||n,u=e.canvasHeight||i;return a.width=c*l,a.height=u*l,e.skipAutoScale||(a.width>16384||a.height>16384)&&(a.width>16384&&a.height>16384?a.width>a.height?(a.height*=16384/a.width,a.width=16384):(a.width*=16384/a.height,a.height=16384):a.width>16384?(a.height*=16384/a.width,a.width=16384):(a.width*=16384/a.height,a.height=16384)),a.style.width=`${c}`,a.style.height=`${u}`,e.backgroundColor&&(s.fillStyle=e.backgroundColor,s.fillRect(0,0,a.width,a.height)),s.drawImage(o,0,0,a.width,a.height),a}async function hg(t,e={}){return(await hp(t,e)).toDataURL()}async function hm(t,e={}){return(await hp(t,e)).toDataURL("image/jpeg",e.quality||1)}let hy=class{constructor(t,e){this.model=t,this.services=e,this.init()}init(){}update(){}setModel(t){this.model=t}setServices(t){this.services=t}},hv=class t extends hy{constructor(t,e){super(t,e)}static getHTMLElementSize(t){return{width:t.clientWidth,height:t.clientHeight}}static getSVGElementSize(t,e={useAttrs:!1,useClientDimensions:!1,useBBox:!1,useBoundingRect:!1}){let n,i,r,o,a;t.attr||(t=lP(t));let s={width:0,height:0},l=t=>{t&&Object.keys(s).forEach(e=>{if(t[e]){let n=t[e],i=parseFloat(n);n&&i>s[e]&&-1===(""+n).indexOf("%")&&(s[e]=i)}})},c={width:t.attr("width"),height:t.attr("height")},u=t.node();try{"function"==typeof u.getBBox&&(i={width:(n=u.getBBox()).width,height:n.height})}catch(t){console.error(t)}try{"function"==typeof u?.getBoundingClientRect&&(o={width:(r=u.getBoundingClientRect()).width,height:r.height})}catch(t){console.error(t)}if(u instanceof SVGSVGElement&&(a={width:u.clientWidth,height:u.clientHeight}),e){if(e.useAttrs&&(l(c),s.width>0&&s.height>0))return s;if(e.useClientDimensions&&(l(a),s.width>0&&s.height>0))return a;if(e.useBBox&&(l(i),s.width>0&&s.height>0))return i;if(e.useBoundingRect&&(l(o),s.width>0&&s.height>0))return o}try{let e={width:sU(t.node(),"width","baseVal","value"),height:sU(t.node(),"height","baseVal","value")};l(e)}catch{l(a),l(i),l(c)}return s}static appendOrSelect(t,e){let n=t.select(`${e}`);if(n.empty()){let n=e.split("#"),i,r;return 2===n.length?(i=n[0],r=(n=n[1].split("."))[0]):i=(n=e.split("."))[0],t.append(i).attr("id",r).attr("class",n.slice(1).join(" "))}return n}init(){this.initializeID(),this.styleHolderElement(),this.addMainContainer(),this.model.getOptions().resizable&&this.addResizeListener(),this.addHolderListeners(),this.handleFullscreenChange()}getChartID(){return this.chartID}getElementOffset(t,e=!1){let n={left:0,top:0},i=t.getBoundingClientRect(),r=e?{left:0,top:0}:this.getHolder().getBoundingClientRect();try{n.left=i.left-r.left,n.top=i.top-r.top}catch(t){console.error(t)}return n}generateElementIDString(t){return`chart-${this.chartID}-${t}`}initializeID(){this.chartID=Math.floor((1+Math.random())*0x1000000000000).toString(16)}addMainContainer(){let t=sU(this.model.getOptions(),"style","prefix"),e=lP(this.getHolder()).append("div").classed(`cds--${t}--chart-wrapper`,!0).attr("id",`chart-${this.getChartID()}`).style("height","100%").style("width","100%");e.append("g").attr("class","DONT_STYLE_ME_css_styles_verifier"),this.mainContainer=e.node()}update(){this.styleHolderElement()}styleHolderElement(){let t=this.getHolder(),{width:e,height:n,theme:i}=this.model.getOptions();e!==this.width&&(t.style.width=e,this.width=e),n!==this.height&&(t.style.height=n,this.height=n),lP(this.getHolder()).classed("cds--chart-holder",!0).attr("data-carbon-theme",i)}getHolder(){return this.model.get("holder")}exportToJPG(){let t=this,e=this.model.getOptions(),n=lP(this.getHolder());n.classed("filled",!0),hm(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then(function(i){let r="myChart",o=sU(e,"fileDownload","fileName");"function"==typeof o?r=o("jpg"):"string"==typeof o&&(r=o),t.services.files?.downloadImage(i,`${r}.jpg`),n.classed("filled",!1)})}exportToPNG(){let t=this,e=this.model.getOptions(),n=lP(this.getHolder());n.classed("filled",!0),hg(this.getMainContainer(),{quality:1,filter:t=>!(t.classList&&t.classList.contains("cds--cc--toolbar"))}).then(function(i){let r="myChart",o=sU(e,"fileDownload","fileName");"function"==typeof o?r=o("png"):"string"==typeof o&&(r=o),t.services.files?.downloadImage(i,`${r}.png`),n.classed("filled",!1)}).catch(function(t){console.error("oops, something went wrong!",t)})}isFullScreenMode(){return lP(this.getHolder()).classed("fullscreen")}toggleFullscreen(){let t=this.getHolder();lP(t).classed("fullscreen")&&(document.fullscreenElement||document.webkitFullscreenElement||document.mozFullScreenElement||document.msFullscreenElement)?document.exitFullscreen?document.exitFullscreen():document.webkitExitFullscreen?document.webkitExitFullscreen():document.mozCancelFullScreen?document.mozCancelFullScreen():document.msExitFullscreen&&document.msExitFullscreen():t.requestFullscreen?t.requestFullscreen():t.webkitRequestFullscreen?t.webkitRequestFullscreen():t.mozRequestFullScreen?t.mozRequestFullScreen():t.msRequestFullscreen&&t.msRequestFullscreen()}handleFullscreenChange(){document.addEventListener("fullscreenchange",()=>{let t=lP(this.getHolder()),e=t.classed("fullscreen");t.classed("fullscreen",!e)})}setSVGMaxHeight(){if(!this.model.getOptions().height){let{height:e}=t.getSVGElementSize(lP(this.mainContainer),{useBBox:!0}),n=lP(this.mainContainer).attr("class"),i=lP(this.mainContainer).selectAll(`.${n} > svg`),r=0;i.nodes().forEach(function(e){r+=Number(t.getSVGElementSize(lP(e),{useBBox:!0}).height)}),r<=e?lP(this.mainContainer).attr("height",r):lP(this.mainContainer).attr("height","100%")}}getMainContainer(){return this.mainContainer}addHolderListeners(){let t=this.getHolder();t&&lP(t).on("mouseover",()=>{this.services.events?.dispatchEvent(tW.Chart.MOUSEOVER)}).on("mouseout",()=>{this.services.events?.dispatchEvent(tW.Chart.MOUSEOUT)})}addResizeListener(){let t=this.getHolder();if(!t)return;let e=t.clientWidth,n=t.clientHeight;new ResizeObserver(function(t,e,n){var i,r,o,a,s,l,c=0,u=!1,h=!1,d=!0;if("function"!=typeof t)throw TypeError("Expected a function");function f(e){var n=i,o=r;return i=r=void 0,c=e,a=t.apply(o,n)}function p(t){var n=t-l,i=t-c;return void 0===l||n>=e||n<0||h&&i>=o}function g(){var t,n,i,r=lR();if(p(r))return m(r);s=setTimeout(g,(t=r-l,n=r-c,i=e-t,h?lN(i,o-n):i))}function m(t){return s=void 0,d&&i?f(t):(i=r=void 0,a)}function y(){var t,n=lR(),o=p(n);if(i=arguments,r=this,l=n,o){if(void 0===s)return c=t=l,s=setTimeout(g,e),u?f(t):a;if(h)return clearTimeout(s),s=setTimeout(g,e),f(l)}return void 0===s&&(s=setTimeout(g,e)),a}return e=lL(e)||0,eW(n)&&(u=!!n.leading,o=(h="maxWait"in n)?lI(lL(n.maxWait)||0,e):o,d="trailing"in n?!!n.trailing:d),y.cancel=function(){void 0!==s&&clearTimeout(s),c=0,i=l=r=s=void 0},y.flush=function(){return void 0===s?a:m(lR())},y}(()=>{t&&(Math.abs(e-t.clientWidth)>1||Math.abs(n-t.clientHeight)>1)&&(e=t.clientWidth,n=t.clientHeight,this.services.events?.dispatchEvent(tW.Chart.RESIZE))},12.5)).observe(t)}},h_=class t extends hy{static appendOrUpdateLinearGradient(t){let e=t.svg.select(`defs linearGradient#${t.id}`);e.empty()&&(e=t.svg.append("defs").append("linearGradient").attr("id",t.id).attr("x1",t.x1).attr("x2",t.x2).attr("y1",t.y1).attr("y2",t.y2)),e.selectAll("stop").remove(),e.selectAll("stop").data(t.stops).enter().append("stop").attr("offset",t=>t.offset).style("stop-color",t=>t.color).style("stop-opacity",t=>t.opacity)}static getOffsetRatio(t){return(100*Math.abs(t[1])/Math.abs(t[0]-t[1])).toFixed(2)+"%"}static getStops(e,n){let i=e[0]<0&&e[1]>0,r=[{offset:"0%",color:n,opacity:"0.6"},{offset:"80%",color:n,opacity:"0"}];return i&&(r=[{offset:"0%",color:n,opacity:"0.6"},{offset:t.getOffsetRatio(e),color:n,opacity:"0"},{offset:"100%",color:n,opacity:"0.6"}]),r}};var hb=(dB={À:"A",Á:"A",Â:"A",Ã:"A",Ä:"A",Å:"A",à:"a",á:"a",â:"a",ã:"a",ä:"a",å:"a",Ç:"C",ç:"c",Ð:"D",ð:"d",È:"E",É:"E",Ê:"E",Ë:"E",è:"e",é:"e",ê:"e",ë:"e",Ì:"I",Í:"I",Î:"I",Ï:"I",ì:"i",í:"i",î:"i",ï:"i",Ñ:"N",ñ:"n",Ò:"O",Ó:"O",Ô:"O",Õ:"O",Ö:"O",Ø:"O",ò:"o",ó:"o",ô:"o",õ:"o",ö:"o",ø:"o",Ù:"U",Ú:"U",Û:"U",Ü:"U",ù:"u",ú:"u",û:"u",ü:"u",Ý:"Y",ý:"y",ÿ:"y",Æ:"Ae",æ:"ae",Þ:"Th",þ:"th",ß:"ss",Ā:"A",Ă:"A",Ą:"A",ā:"a",ă:"a",ą:"a",Ć:"C",Ĉ:"C",Ċ:"C",Č:"C",ć:"c",ĉ:"c",ċ:"c",č:"c",Ď:"D",Đ:"D",ď:"d",đ:"d",Ē:"E",Ĕ:"E",Ė:"E",Ę:"E",Ě:"E",ē:"e",ĕ:"e",ė:"e",ę:"e",ě:"e",Ĝ:"G",Ğ:"G",Ġ:"G",Ģ:"G",ĝ:"g",ğ:"g",ġ:"g",ģ:"g",Ĥ:"H",Ħ:"H",ĥ:"h",ħ:"h",Ĩ:"I",Ī:"I",Ĭ:"I",Į:"I",İ:"I",ĩ:"i",ī:"i",ĭ:"i",į:"i",ı:"i",Ĵ:"J",ĵ:"j",Ķ:"K",ķ:"k",ĸ:"k",Ĺ:"L",Ļ:"L",Ľ:"L",Ŀ:"L",Ł:"L",ĺ:"l",ļ:"l",ľ:"l",ŀ:"l",ł:"l",Ń:"N",Ņ:"N",Ň:"N",Ŋ:"N",ń:"n",ņ:"n",ň:"n",ŋ:"n",Ō:"O",Ŏ:"O",Ő:"O",ō:"o",ŏ:"o",ő:"o",Ŕ:"R",Ŗ:"R",Ř:"R",ŕ:"r",ŗ:"r",ř:"r",Ś:"S",Ŝ:"S",Ş:"S",Š:"S",ś:"s",ŝ:"s",ş:"s",š:"s",Ţ:"T",Ť:"T",Ŧ:"T",ţ:"t",ť:"t",ŧ:"t",Ũ:"U",Ū:"U",Ŭ:"U",Ů:"U",Ű:"U",Ų:"U",ũ:"u",ū:"u",ŭ:"u",ů:"u",ű:"u",ų:"u",Ŵ:"W",ŵ:"w",Ŷ:"Y",ŷ:"y",Ÿ:"Y",Ź:"Z",Ż:"Z",Ž:"Z",ź:"z",ż:"z",ž:"z",IJ:"IJ",ij:"ij",Œ:"Oe",œ:"oe",ʼn:"'n",ſ:"s"},function(t){return dB?.[t]}),hx=/[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g,hE=RegExp("[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]","g"),hw=/[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g,hT=/[a-z][A-Z]|[A-Z]{2}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/,hS="\ud800-\udfff",hO="\\u2700-\\u27bf",hM="a-z\\xdf-\\xf6\\xf8-\\xff",hA="A-Z\\xc0-\\xd6\\xd8-\\xde",hD="\\xac\\xb1\\xd7\\xf7\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf\\u2000-\\u206f \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000",hk="['’]",hC="["+hD+"]",hL="["+hM+"]",hR="[^"+hS+hD+"\\d+"+hO+hM+hA+"]",hI="(?:\ud83c[\udde6-\uddff]){2}",hN="[\ud800-\udbff][\udc00-\udfff]",hP="["+hA+"]",hU="(?:"+hL+"|"+hR+")",hB="(?:"+hP+"|"+hR+")",hF="(?:"+hk+"(?:d|ll|m|re|s|t|ve))?",hH="(?:"+hk+"(?:D|LL|M|RE|S|T|VE))?",h$="(?:[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]|\ud83c[\udffb-\udfff])?",hz="[\\ufe0e\\ufe0f]?",hj="(?:\\u200d(?:"+["[^"+hS+"]",hI,hN].join("|")+")"+hz+h$+")*",hG="(?:"+["["+hO+"]",hI,hN].join("|")+")"+(hz+h$+hj),hV=RegExp([hP+"?"+hL+"+"+hF+"(?="+[hC,hP,"$"].join("|")+")",hB+"+"+hH+"(?="+[hC,hP+hU,"$"].join("|")+")",hP+"?"+hU+"+"+hF,hP+"+"+hH,"\\d*(?:1ST|2ND|3RD|(?![123])\\dTH)(?=\\b|[a-z_])|\\d*(?:1st|2nd|3rd|(?![123])\\dth)(?=\\b|[A-Z_])|\\d+",hG].join("|"),"g"),hW=RegExp("['’]","g");function hY(t){return function(e){var n,i,r;return function(t,e,n,i){for(var r=-1,o=null==t?0:t.length;++r<o;)n=e(n,t[r],r,t);return n}((i=((n=n6(n=e))&&n.replace(hx,hb).replace(hE,"")).replace(hW,""),(r=i=n6(i),hT.test(r))?i.match(hV)||[]:i.match(hw)||[]),t,"")}}nf(function(t,e,n){var i=lL(e)||0;if("function"!=typeof t)throw TypeError("Expected a function");return setTimeout(function(){t.apply(void 0,n)},i)});hY(function(t,e,n){return t+(n?"-":"")+e.toLowerCase()});class hZ{constructor(){this._partials=new Float64Array(32),this._n=0}add(t){let e=this._partials,n=0;for(let i=0;i<this._n&&i<32;i++){let r=e[i],o=t+r,a=Math.abs(t)<Math.abs(r)?t-(o-r):r-(o-t);a&&(e[n++]=a),t=o}return e[n]=t,this._n=n+1,this}valueOf(){let t=this._partials,e=this._n,n,i,r,o=0;if(e>0){for(o=t[--e];e>0&&(o=(n=o)+(i=t[--e]),!(r=i-(o-n))););e>0&&(r<0&&t[e-1]<0||r>0&&t[e-1]>0)&&(n=o+(i=2*r),i==n-o&&(o=n))}return o}}function hX(t){return t}function hq(t){return"translate("+t+",0)"}function hK(t){return"translate(0,"+t+")"}function hQ(){return!this.__axis}function hJ(t,e){var n=[],i=null,r=null,o=6,a=6,s=3,l="u">typeof window&&window.devicePixelRatio>1?0:.5,c=1===t||4===t?-1:1,u=4===t||2===t?"x":"y",h=1===t||3===t?hq:hK;function d(d){var f=i??(e.ticks?e.ticks.apply(e,n):e.domain()),p=r??(e.tickFormat?e.tickFormat.apply(e,n):hX),g=Math.max(o,0)+s,m=e.range(),y=+m[0]+l,v=+m[m.length-1]+l,_=(e.bandwidth?function(t,e){return e=Math.max(0,t.bandwidth()-2*e)/2,t.round()&&(e=Math.round(e)),n=>+t(n)+e}:function(t){return e=>+t(e)})(e.copy(),l),b=d.selection?d.selection():d,x=b.selectAll(".domain").data([null]),E=b.selectAll(".tick").data(f,e).order(),w=E.exit(),T=E.enter().append("g").attr("class","tick"),S=E.select("line"),O=E.select("text");x=x.merge(x.enter().insert("path",".tick").attr("class","domain").attr("stroke","currentColor")),E=E.merge(T),S=S.merge(T.append("line").attr("stroke","currentColor").attr(u+"2",c*o)),O=O.merge(T.append("text").attr("fill","currentColor").attr(u,c*g).attr("dy",1===t?"0em":3===t?"0.71em":"0.32em")),d!==b&&(x=x.transition(d),E=E.transition(d),S=S.transition(d),O=O.transition(d),w=w.transition(d).attr("opacity",1e-6).attr("transform",function(t){return isFinite(t=_(t))?h(t+l):this.getAttribute("transform")}),T.attr("opacity",1e-6).attr("transform",function(t){var e=this.parentNode.__axis;return h((e&&isFinite(e=e(t))?e:_(t))+l)})),w.remove(),x.attr("d",4===t||2===t?a?"M"+c*a+","+y+"H"+l+"V"+v+"H"+c*a:"M"+l+","+y+"V"+v:a?"M"+y+","+c*a+"V"+l+"H"+v+"V"+c*a:"M"+y+","+l+"H"+v),E.attr("opacity",1).attr("transform",function(t){return h(_(t)+l)}),S.attr(u+"2",c*o),O.attr(u,c*g).text(p),b.filter(hQ).attr("fill","none").attr("font-size",10).attr("font-family","sans-serif").attr("text-anchor",2===t?"start":4===t?"end":"middle"),b.each(function(){this.__axis=_})}return d.scale=function(t){return arguments.length?(e=t,d):e},d.ticks=function(){return n=Array.from(arguments),d},d.tickArguments=function(t){return arguments.length?(n=null==t?[]:Array.from(t),d):n.slice()},d.tickValues=function(t){return arguments.length?(i=null==t?null:Array.from(t),d):i&&i.slice()},d.tickFormat=function(t){return arguments.length?(r=t,d):r},d.tickSize=function(t){return arguments.length?(o=a=+t,d):o},d.tickSizeInner=function(t){return arguments.length?(o=+t,d):o},d.tickSizeOuter=function(t){return arguments.length?(a=+t,d):a},d.tickPadding=function(t){return arguments.length?(s=+t,d):s},d.offset=function(t){return arguments.length?(l=+t,d):l},d}function h0(t){return hJ(1,t)}function h1(t){return hJ(2,t)}function h2(t){return hJ(3,t)}function h3(t){return hJ(4,t)}let h5={capture:!0,passive:!1};function h4(t){t.preventDefault(),t.stopImmediatePropagation()}let h8=t=>+t,h6=t=>()=>t;function h9(t,{sourceEvent:e,target:n,selection:i,mode:r,dispatch:o}){Object.defineProperties(this,{type:{value:t,enumerable:!0,configurable:!0},sourceEvent:{value:e,enumerable:!0,configurable:!0},target:{value:n,enumerable:!0,configurable:!0},selection:{value:i,enumerable:!0,configurable:!0},mode:{value:r,enumerable:!0,configurable:!0},_:{value:o}})}function h7(t){t.preventDefault(),t.stopImmediatePropagation()}var dt={name:"drag"},de={name:"space"},dn={name:"handle"},di={name:"center"};let{abs:dr,max:da,min:ds}=Math;function dl(t){return[+t[0],+t[1]]}function dc(t){return[dl(t[0]),dl(t[1])]}var du={name:"x",handles:["w","e"].map(dy),input:function(t,e){return null==t?null:[[+t[0],e[0][1]],[+t[1],e[1][1]]]},output:function(t){return t&&[t[0][0],t[1][0]]}},dh={},dd={overlay:"crosshair",selection:"move",n:"ns-resize",e:"ew-resize",s:"ns-resize",w:"ew-resize",nw:"nwse-resize",ne:"nesw-resize",se:"nwse-resize",sw:"nesw-resize"},df={e:"w",w:"e",nw:"ne",ne:"nw",se:"sw",sw:"se"},dp={n:"s",s:"n",nw:"sw",ne:"se",se:"ne",sw:"nw"},dg={overlay:1,selection:1,n:null,e:1,s:null,w:-1,nw:-1,ne:1,se:1,sw:-1},dm={overlay:1,selection:1,n:-1,e:null,s:1,w:null,nw:-1,ne:-1,se:1,sw:1};function dy(t){return{type:t}}function dv(t){return!t.ctrlKey&&!t.button}function d_(){var t=this.ownerSVGElement||this;return t.hasAttribute("viewBox")?[[(t=t.viewBox.baseVal).x,t.y],[t.x+t.width,t.y+t.height]]:[[0,0],[t.width.baseVal.value,t.height.baseVal.value]]}function db(){return navigator.maxTouchPoints||"ontouchstart"in this}function dx(t){for(;!t.__brush;)if(!(t=t.parentNode))return;return t.__brush}function dE(t){var e,n=d_,i=dv,r=db,o=!0,a=rF("start","brush","end"),s=6;function l(e){var n=e.property("__brush",g).selectAll(".overlay").data([dy("overlay")]);n.enter().append("rect").attr("class","overlay").attr("pointer-events","all").attr("cursor",dd.overlay).merge(n).each(function(){var t=dx(this).extent;lP(this).attr("x",t[0][0]).attr("y",t[0][1]).attr("width",t[1][0]-t[0][0]).attr("height",t[1][1]-t[0][1])}),e.selectAll(".selection").data([dy("selection")]).enter().append("rect").attr("class","selection").attr("cursor",dd.selection).attr("fill","#777").attr("fill-opacity",.3).attr("stroke","#fff").attr("shape-rendering","crispEdges");var i=e.selectAll(".handle").data(t.handles,function(t){return t.type});i.exit().remove(),i.enter().append("rect").attr("class",function(t){return"handle handle--"+t.type}).attr("cursor",function(t){return dd[t.type]}),e.each(c).attr("fill","none").attr("pointer-events","all").on("mousedown.brush",d).filter(r).on("touchstart.brush",d).on("touchmove.brush",f).on("touchend.brush touchcancel.brush",p).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}function c(){var t=lP(this),e=dx(this).selection;e?(t.selectAll(".selection").style("display",null).attr("x",e[0][0]).attr("y",e[0][1]).attr("width",e[1][0]-e[0][0]).attr("height",e[1][1]-e[0][1]),t.selectAll(".handle").style("display",null).attr("x",function(t){return"e"===t.type[t.type.length-1]?e[1][0]-s/2:e[0][0]-s/2}).attr("y",function(t){return"s"===t.type[0]?e[1][1]-s/2:e[0][1]-s/2}).attr("width",function(t){return"n"===t.type||"s"===t.type?e[1][0]-e[0][0]+s:s}).attr("height",function(t){return"e"===t.type||"w"===t.type?e[1][1]-e[0][1]+s:s})):t.selectAll(".selection,.handle").style("display","none").attr("x",null).attr("y",null).attr("width",null).attr("height",null)}function u(t,e,n){var i=t.__brush.emitter;return!i||n&&i.clean?new h(t,e,n):i}function h(t,e,n){this.that=t,this.args=e,this.state=t.__brush,this.active=0,this.clean=n}function d(n){if((!e||n.touches)&&i.apply(this,arguments)){var r,a,s,l,h,d,f,p,g,m,y,v=this,_=n.target.__data__.type,b=(o&&n.metaKey?_="overlay":_)==="selection"?dt:o&&n.altKey?di:dn,x=t===dh?null:dg[_],E=t===du?null:dm[_],w=dx(v),T=w.extent,S=w.selection,O=T[0][0],M=T[0][1],A=T[1][0],D=T[1][1],k=0,C=0,L=x&&E&&o&&n.shiftKey,R=Array.from(n.touches||[n],t=>{let e=t.identifier;return(t=o_(t,v)).point0=t.slice(),t.identifier=e,t});aP(v);var I=u(v,arguments,!0).beforestart();if("overlay"===_){S&&(g=!0);let e=[R[0],R[1]||R[0]];w.selection=S=[[r=t===dh?O:ds(e[0][0],e[1][0]),s=t===du?M:ds(e[0][1],e[1][1])],[h=t===dh?A:da(e[0][0],e[1][0]),f=t===du?D:da(e[0][1],e[1][1])]],R.length>1&&z(n)}else r=S[0][0],s=S[0][1],h=S[1][0],f=S[1][1];a=r,l=s,d=h,p=f;var N=lP(v).attr("pointer-events","none"),P=N.selectAll(".overlay").attr("cursor",dd[_]);if(n.touches)I.moved=$,I.ended=j;else{var U,B,F,H=lP(n.view).on("mousemove.brush",$,!0).on("mouseup.brush",j,!0);o&&H.on("keydown.brush",function(t){switch(t.keyCode){case 16:L=x&&E;break;case 18:b===dn&&(x&&(h=d-k*x,r=a+k*x),E&&(f=p-C*E,s=l+C*E),b=di,z(t));break;case 32:(b===dn||b===di)&&(x<0?h=d-k:x>0&&(r=a-k),E<0?f=p-C:E>0&&(s=l-C),b=de,P.attr("cursor",dd.selection),z(t));break;default:return}h7(t)},!0).on("keyup.brush",function(t){switch(t.keyCode){case 16:L&&(m=y=L=!1,z(t));break;case 18:b===di&&(x<0?h=d:x>0&&(r=a),E<0?f=p:E>0&&(s=l),b=dn,z(t));break;case 32:b===de&&(t.altKey?(x&&(h=d-k*x,r=a+k*x),E&&(f=p-C*E,s=l+C*E),b=di):(x<0?h=d:x>0&&(r=a),E<0?f=p:E>0&&(s=l),b=dn),P.attr("cursor",dd[_]),z(t));break;default:return}h7(t)},!0),B=(U=n.view).document.documentElement,F=lP(U).on("dragstart.drag",h4,h5),"onselectstart"in B?F.on("selectstart.drag",h4,h5):(B.__noselect=B.style.MozUserSelect,B.style.MozUserSelect="none")}c.call(v),I.start(n,b.name)}function $(t){for(let e of t.changedTouches||[t])for(let t of R)t.identifier===e.identifier&&(t.cur=o_(e,v));if(L&&!m&&!y&&1===R.length){let t=R[0];dr(t.cur[0]-t[0])>dr(t.cur[1]-t[1])?y=!0:m=!0}for(let t of R)t.cur&&(t[0]=t.cur[0],t[1]=t.cur[1]);g=!0,h7(t),z(t)}function z(t){var e;let n=R[0],i=n.point0;switch(k=n[0]-i[0],C=n[1]-i[1],b){case de:case dt:x&&(k=da(O-r,ds(A-h,k)),a=r+k,d=h+k),E&&(C=da(M-s,ds(D-f,C)),l=s+C,p=f+C);break;case dn:R[1]?(x&&(a=da(O,ds(A,R[0][0])),d=da(O,ds(A,R[1][0])),x=1),E&&(l=da(M,ds(D,R[0][1])),p=da(M,ds(D,R[1][1])),E=1)):(x<0?(k=da(O-r,ds(A-r,k)),a=r+k,d=h):x>0&&(k=da(O-h,ds(A-h,k)),a=r,d=h+k),E<0?(C=da(M-s,ds(D-s,C)),l=s+C,p=f):E>0&&(C=da(M-f,ds(D-f,C)),l=s,p=f+C));break;case di:x&&(a=da(O,ds(A,r-k*x)),d=da(O,ds(A,h+k*x))),E&&(l=da(M,ds(D,s-C*E)),p=da(M,ds(D,f+C*E)))}d<a&&(x*=-1,e=r,r=h,h=e,e=a,a=d,d=e,_ in df&&P.attr("cursor",dd[_=df[_]])),p<l&&(E*=-1,e=s,s=f,f=e,e=l,l=p,p=e,_ in dp&&P.attr("cursor",dd[_=dp[_]])),w.selection&&(S=w.selection),m&&(a=S[0][0],d=S[1][0]),y&&(l=S[0][1],p=S[1][1]),(S[0][0]!==a||S[0][1]!==l||S[1][0]!==d||S[1][1]!==p)&&(w.selection=[[a,l],[d,p]],c.call(v),I.brush(t,b.name))}function j(t){var n,i,r,o,a;if(t.stopImmediatePropagation(),t.touches){if(t.touches.length)return;e&&clearTimeout(e),e=setTimeout(function(){e=null},500)}else n=t.view,i=g,r=n.document.documentElement,o=lP(n).on("dragstart.drag",null),i&&(o.on("click.drag",h4,h5),setTimeout(function(){o.on("click.drag",null)},0)),"onselectstart"in r?o.on("selectstart.drag",null):(r.style.MozUserSelect=r.__noselect,delete r.__noselect),H.on("keydown.brush keyup.brush mousemove.brush mouseup.brush",null);N.attr("pointer-events","all"),P.attr("cursor",dd.overlay),w.selection&&(S=w.selection),((a=S)[0][0]===a[1][0]||a[0][1]===a[1][1])&&(w.selection=null,c.call(v)),I.end(t,b.name)}}function f(t){u(this,arguments).moved(t)}function p(t){u(this,arguments).ended(t)}function g(){var e=this.__brush||{selection:null};return e.extent=dc(n.apply(this,arguments)),e.dim=t,e}return l.move=function(e,n,i){e.tween?e.on("start.brush",function(t){u(this,arguments).beforestart().start(t)}).on("interrupt.brush end.brush",function(t){u(this,arguments).end(t)}).tween("brush",function(){var e=this,i=e.__brush,r=u(e,arguments),o=i.selection,a=t.input("function"==typeof n?n.apply(this,arguments):n,i.extent),s=o4(o,a);function l(t){i.selection=1===t&&null===a?null:s(t),c.call(e),r.brush()}return null!==o&&null!==a?l:l(1)}):e.each(function(){var e=arguments,r=this.__brush,o=t.input("function"==typeof n?n.apply(this,e):n,r.extent),a=u(this,e).beforestart();aP(this),r.selection=null===o?null:o,c.call(this),a.start(i).brush(i).end(i)})},l.clear=function(t,e){l.move(t,null,e)},h.prototype={beforestart:function(){return 1==++this.active&&(this.state.emitter=this,this.starting=!0),this},start:function(t,e){return this.starting?(this.starting=!1,this.emit("start",t,e)):this.emit("brush",t),this},brush:function(t,e){return this.emit("brush",t,e),this},end:function(t,e){return 0==--this.active&&(delete this.state.emitter,this.emit("end",t,e)),this},emit:function(e,n,i){var r=lP(this.that).datum();a.call(e,this.that,new h9(e,{sourceEvent:n,target:l,selection:t.output(this.state.selection),mode:i,dispatch:a}),r)}},l.extent=function(t){return arguments.length?(n="function"==typeof t?t:h6(dc(t)),l):n},l.filter=function(t){return arguments.length?(i="function"==typeof t?t:h6(!!t),l):i},l.touchable=function(t){return arguments.length?(r="function"==typeof t?t:h6(!!t),l):r},l.handleSize=function(t){return arguments.length?(s=+t,l):s},l.keyModifiers=function(t){return arguments.length?(o=!!t,l):o},l.on=function(){var t=a.on.apply(a,arguments);return t===a?l:t},l}let dw=Math.PI,dT=2*dw,dS=dT-1e-6;function dO(t){this._+=t[0];for(let e=1,n=t.length;e<n;++e)this._+=arguments[e]+t[e]}let dM=class{constructor(t){this._x0=this._y0=this._x1=this._y1=null,this._="",this._append=null==t?dO:function(t){let e=Math.floor(t);if(!(e>=0))throw Error(`invalid digits: ${t}`);if(e>15)return dO;let n=10**e;return function(t){this._+=t[0];for(let e=1,i=t.length;e<i;++e)this._+=Math.round(arguments[e]*n)/n+t[e]}}(t)}moveTo(t,e){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}`}closePath(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._append`Z`)}lineTo(t,e){this._append`L${this._x1=+t},${this._y1=+e}`}quadraticCurveTo(t,e,n,i){this._append`Q${+t},${+e},${this._x1=+n},${this._y1=+i}`}bezierCurveTo(t,e,n,i,r,o){this._append`C${+t},${+e},${+n},${+i},${this._x1=+r},${this._y1=+o}`}arcTo(t,e,n,i,r){if(t*=1,e*=1,n*=1,i*=1,(r*=1)<0)throw Error(`negative radius: ${r}`);let o=this._x1,a=this._y1,s=n-t,l=i-e,c=o-t,u=a-e,h=c*c+u*u;if(null===this._x1)this._append`M${this._x1=t},${this._y1=e}`;else if(h>1e-6)if(Math.abs(u*s-l*c)>1e-6&&r){let d=n-o,f=i-a,p=s*s+l*l,g=Math.sqrt(p),m=Math.sqrt(h),y=r*Math.tan((dw-Math.acos((p+h-(d*d+f*f))/(2*g*m)))/2),v=y/m,_=y/g;Math.abs(v-1)>1e-6&&this._append`L${t+v*c},${e+v*u}`,this._append`A${r},${r},0,0,${+(u*d>c*f)},${this._x1=t+_*s},${this._y1=e+_*l}`}else this._append`L${this._x1=t},${this._y1=e}`}arc(t,e,n,i,r,o){if(t*=1,e*=1,n*=1,o=!!o,n<0)throw Error(`negative radius: ${n}`);let a=n*Math.cos(i),s=n*Math.sin(i),l=t+a,c=e+s,u=1^o,h=o?i-r:r-i;null===this._x1?this._append`M${l},${c}`:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&this._append`L${l},${c}`,n&&(h<0&&(h=h%dT+dT),h>dS?this._append`A${n},${n},0,1,${u},${t-a},${e-s}A${n},${n},0,1,${u},${this._x1=l},${this._y1=c}`:h>1e-6&&this._append`A${n},${n},0,${+(h>=dw)},${u},${this._x1=t+n*Math.cos(r)},${this._y1=e+n*Math.sin(r)}`)}rect(t,e,n,i){this._append`M${this._x0=this._x1=+t},${this._y0=this._y1=+e}h${n*=1}v${+i}h${-n}Z`}toString(){return this._}};dM.prototype;var dA=Math.PI,dD=2*dA,dk=dA/180,dC=Math.abs,dL=Math.cos,dR=Math.sqrt;function dI(){}function dN(t,e){return dC(t)>dA&&(t-=Math.round(t/dD)*dD),[t,e]}dN.invert=dN;var dP,dU,dB,dF,dH,d$,dz,dj,dG,dV,dW,dY,dZ,dX=new hZ,dq=new hZ,dK={point:dI,lineStart:dI,lineEnd:dI,polygonStart:function(){dK.lineStart=dQ,dK.lineEnd=d1},polygonEnd:function(){dK.lineStart=dK.lineEnd=dK.point=dI,dX.add(dC(dq)),dq=new hZ},result:function(){var t=dX/2;return dX=new hZ,t}};function dQ(){dK.point=dJ}function dJ(t,e){dK.point=d0,dV=dY=t,dW=dZ=e}function d0(t,e){dq.add(dZ*t-dY*e),dY=t,dZ=e}function d1(){d0(dV,dW)}var d2,d3,d5,d4,d8=0,d6=0,d9=0,d7=0,ft=0,fe=0,fn=0,fi=0,fr=0,fo={point:fa,lineStart:fs,lineEnd:fu,polygonStart:function(){fo.lineStart=fh,fo.lineEnd=fd},polygonEnd:function(){fo.point=fa,fo.lineStart=fs,fo.lineEnd=fu},result:function(){var t=fr?[fn/fr,fi/fr]:fe?[d7/fe,ft/fe]:d9?[d8/d9,d6/d9]:[NaN,NaN];return d8=d6=d9=d7=ft=fe=fn=fi=fr=0,t}};function fa(t,e){d8+=t,d6+=e,++d9}function fs(){fo.point=fl}function fl(t,e){fo.point=fc,fa(d5=t,d4=e)}function fc(t,e){var n=t-d5,i=e-d4,r=dR(n*n+i*i);d7+=r*(d5+t)/2,ft+=r*(d4+e)/2,fe+=r,fa(d5=t,d4=e)}function fu(){fo.point=fa}function fh(){fo.point=ff}function fd(){fp(d2,d3)}function ff(t,e){fo.point=fp,fa(d2=d5=t,d3=d4=e)}function fp(t,e){var n=t-d5,i=e-d4,r=dR(n*n+i*i);d7+=r*(d5+t)/2,ft+=r*(d4+e)/2,fe+=r,fn+=(r=d4*t-d5*e)*(d5+t),fi+=r*(d4+e),fr+=3*r,fa(d5=t,d4=e)}var fg,fm,fy,fv,f_,fb=new hZ,fx={point:dI,lineStart:function(){fx.point=fE},lineEnd:function(){fg&&fw(fm,fy),fx.point=dI},polygonStart:function(){fg=!0},polygonEnd:function(){fg=null},result:function(){var t=+fb;return fb=new hZ,t}};function fE(t,e){fx.point=fw,fm=fv=t,fy=f_=e}function fw(t,e){fv-=t,f_-=e,fb.add(dR(fv*fv+f_*f_)),fv=t,f_=e}function fT(){}function fS(t,e){return[t,e]}function fO(t){var e=0,n=t.children,i=n&&n.length;if(i)for(;--i>=0;)e+=n[i].value;else e=1;t.value=e}function fM(t,e){t instanceof Map?(t=[void 0,t],void 0===e&&(e=fD)):void 0===e&&(e=fA);for(var n,i,r,o,a,s=new fL(t),l=[s];n=l.pop();)if((r=e(n.data))&&(a=(r=Array.from(r)).length))for(n.children=r,o=a-1;o>=0;--o)l.push(i=r[o]=new fL(r[o])),i.parent=n,i.depth=n.depth+1;return s.eachBefore(fC)}function fA(t){return t.children}function fD(t){return Array.isArray(t)?t[1]:null}function fk(t){void 0!==t.data.value&&(t.value=t.data.value),t.data=t.data.data}function fC(t){var e=0;do t.height=e;while((t=t.parent)&&t.height<++e)}function fL(t){this.data=t,this.depth=this.height=0,this.parent=null}function fR(t){let e=3;return t.digits=function(n){if(!arguments.length)return e;if(null==n)e=null;else{let t=Math.floor(n);if(!(t>=0))throw RangeError(`invalid digits: ${n}`);e=t}return t},()=>new dM(e)}function fI(t){return t.innerRadius}function fN(t){return t.outerRadius}function fP(t){return t.startAngle}function fU(t){return t.endAngle}function fB(t){return t&&t.padAngle}function fF(t,e,n,i,r,o,a){var s=t-n,l=e-i,c=(a?o:-o)/uT(s*s+l*l),u=c*l,h=-c*s,d=t+u,f=e+h,p=n+u,g=i+h,m=(d+p)/2,y=(f+g)/2,v=p-d,_=g-f,b=v*v+_*_,x=r-o,E=d*g-p*f,w=(_<0?-1:1)*uT(ux(0,x*x*b-E*E)),T=(E*_-v*w)/b,S=(-E*v-_*w)/b,O=(E*_+v*w)/b,M=(-E*v+_*w)/b,A=T-m,D=S-y,k=O-m,C=M-y;return A*A+D*D>k*k+C*C&&(T=O,S=M),{cx:T,cy:S,x01:-u,y01:-h,x11:T*(r/x-1),y11:S*(r/x-1)}}function fH(t){return t[0]}function f$(t){return t[1]}function fz(t,e){var n=lu(!0),i=null,r=uk,o=null,a=fR(s);function s(s){var l,c,u,h=(s=lh(s)).length,d=!1;for(null==i&&(o=r(u=a())),l=0;l<=h;++l)!(l<h&&n(c=s[l],l,s))===d&&((d=!d)?o.lineStart():o.lineEnd()),d&&o.point(+t(c,l,s),+e(c,l,s));if(u)return o=null,u+""||null}return t="function"==typeof t?t:void 0===t?fH:lu(t),e="function"==typeof e?e:void 0===e?f$:lu(e),s.x=function(e){return arguments.length?(t="function"==typeof e?e:lu(+e),s):t},s.y=function(t){return arguments.length?(e="function"==typeof t?t:lu(+t),s):e},s.defined=function(t){return arguments.length?(n="function"==typeof t?t:lu(!!t),s):n},s.curve=function(t){return arguments.length?(r=t,null!=i&&(o=r(i)),s):r},s.context=function(t){return arguments.length?(null==t?i=o=null:o=r(i=t),s):i},s}fT.prototype={constructor:fT,point:function(t,e){this.stream.point(t,e)},sphere:function(){this.stream.sphere()},lineStart:function(){this.stream.lineStart()},lineEnd:function(){this.stream.lineEnd()},polygonStart:function(){this.stream.polygonStart()},polygonEnd:function(){this.stream.polygonEnd()}},dL(30*dk),fS.invert=fS,dR(3),fL.prototype=fM.prototype={constructor:fL,count:function(){return this.eachAfter(fO)},each:function(t,e){let n=-1;for(let i of this)t.call(e,i,++n,this);return this},eachAfter:function(t,e){for(var n,i,r,o=this,a=[o],s=[],l=-1;o=a.pop();)if(s.push(o),n=o.children)for(i=0,r=n.length;i<r;++i)a.push(n[i]);for(;o=s.pop();)t.call(e,o,++l,this);return this},eachBefore:function(t,e){for(var n,i,r=this,o=[r],a=-1;r=o.pop();)if(t.call(e,r,++a,this),n=r.children)for(i=n.length-1;i>=0;--i)o.push(n[i]);return this},find:function(t,e){let n=-1;for(let i of this)if(t.call(e,i,++n,this))return i},sum:function(t){return this.eachAfter(function(e){for(var n=+t(e.data)||0,i=e.children,r=i&&i.length;--r>=0;)n+=i[r].value;e.value=n})},sort:function(t){return this.eachBefore(function(e){e.children&&e.children.sort(t)})},path:function(t){for(var e=this,n=function(t,e){if(t===e)return t;var n=t.ancestors(),i=e.ancestors(),r=null;for(t=n.pop(),e=i.pop();t===e;)r=t,t=n.pop(),e=i.pop();return r}(e,t),i=[e];e!==n;)i.push(e=e.parent);for(var r=i.length;t!==n;)i.splice(r,0,t),t=t.parent;return i},ancestors:function(){for(var t=this,e=[t];t=t.parent;)e.push(t);return e},descendants:function(){return Array.from(this)},leaves:function(){var t=[];return this.eachBefore(function(e){e.children||t.push(e)}),t},links:function(){var t=this,e=[];return t.each(function(n){n!==t&&e.push({source:n.parent,target:n})}),e},copy:function(){return fM(this).eachBefore(fk)},[Symbol.iterator]:function*(){var t,e,n,i,r=this,o=[r];do for(t=o.reverse(),o=[];r=t.pop();)if(yield r,e=r.children)for(n=0,i=e.length;n<i;++n)o.push(e[n]);while(o.length)}},Object.create(fL.prototype),!function t(e){function n(t,n,i,r,o){!function(t,e,n,i,r,o){for(var a,s,l,c,u,h,d,f,p,g,m,y=[],v=e.children,_=0,b=0,x=v.length,E=e.value;_<x;){l=r-n,c=o-i;do u=v[b++].value;while(!u&&b<x);for(h=d=u,p=Math.max(d/(m=u*u*(g=Math.max(c/l,l/c)/(E*t))),m/h);b<x;++b){if(u+=s=v[b].value,s<h&&(h=s),s>d&&(d=s),(f=Math.max(d/(m=u*u*g),m/h))>p){u-=s;break}p=f}y.push(a={value:u,dice:l<c,children:v.slice(_,b)}),a.dice?function(t,e,n,i,r){for(var o,a=t.children,s=-1,l=a.length,c=t.value&&(i-e)/t.value;++s<l;)(o=a[s]).y0=n,o.y1=r,o.x0=e,o.x1=e+=o.value*c}(a,n,i,r,E?i+=c*u/E:o):function(t,e,n,i,r){for(var o,a=t.children,s=-1,l=a.length,c=t.value&&(r-n)/t.value;++s<l;)(o=a[s]).x0=e,o.x1=i,o.y0=n,o.y1=n+=o.value*c}(a,n,i,E?n+=l*u/E:r,o),E-=u,_=b}}(e,t,n,i,r,o)}return n.ratio=function(e){return t((e*=1)>1?e:1)},n}((1+Math.sqrt(5))/2);function fj(t){this._curve=t}tu=uk,fj.prototype={areaStart:function(){this._curve.areaStart()},areaEnd:function(){this._curve.areaEnd()},lineStart:function(){this._curve.lineStart()},lineEnd:function(){this._curve.lineEnd()},point:function(t,e){this._curve.point(e*Math.sin(t),-(e*Math.cos(t)))}};let fG=class{constructor(t,e,n){if(this.type="",this.renderType=tY.HTML,this.id="",this.parent=void 0,this.configs={},this.model=t,this.services=e,n&&(this.configs=n,this.configs.id)){const t=sU(this.model.getOptions(),"style","prefix");this.id=`${t}--${this.configs.id}`}this.parent||this.setParent(lP(this.services.domUtils.getMainContainer()))}init(){}render(t=!0){console.error("Error: Component did not provide the required render function.")}destroy(){}setModel(t){this.model=t}setServices(t){this.services=t}setParent(t){let e=this.parent;if(this.parent=t,!(e&&e.node()===t.node())&&this.type){let t=sU(this.model.getOptions(),"style","prefix");this.parent?.classed(`cds--${t}--${this.type}`,!0),e&&e.classed(`cds--${t}--${this.type}`,!1)}}getParent(){return this.parent}getComponentContainer(t={ariaLabel:null,isPresentational:!1,withinChartClip:!1}){if(this.type){let e=sU(this.model.getOptions(),"style","prefix"),n=this.id?`#${this.id}`:"",i=hv.appendOrSelect(this.parent,`${this.renderType===tY.SVG?"svg":"div"}${n}.cds--${e}--${this.type}`);if(t.ariaLabel&&i.attr("aria-label",t.ariaLabel),t.isPresentational&&i.attr("role","presentation"),t.withinChartClip){let t=this.model.get("chartClipId");if(t){let e=lP(`#${t}`).select("rect");if(0!==e.size()){let n=parseFloat(e.attr("height")),r=parseFloat(e.attr("width"));!isNaN(n)&&!isNaN(r)&&n>0&&r>0&&i.attr("clip-path",`url(#${t})`)}}}return i.attr("width","100%").attr("height","100%")}return this.parent}getOptions(){return this.configs.options?ry({},this.model.getOptions(),this.configs.options):this.model.getOptions()}},{entries:fV,setPrototypeOf:fW,isFrozen:fY,getPrototypeOf:fZ,getOwnPropertyDescriptor:fX}=Object,{freeze:fq,seal:fK,create:fQ}=Object,{apply:fJ,construct:f0}="u">typeof Reflect&&Reflect;fq||(fq=function(t){return t}),fK||(fK=function(t){return t}),fJ||(fJ=function(t,e,n){return t.apply(e,n)}),f0||(f0=function(t,e){return new t(...e)});let f1=po(Array.prototype.forEach),f2=po(Array.prototype.lastIndexOf),f3=po(Array.prototype.pop),f5=po(Array.prototype.push),f4=po(Array.prototype.splice),f8=po(String.prototype.toLowerCase),f6=po(String.prototype.toString),f9=po(String.prototype.match),f7=po(String.prototype.replace),pt=po(String.prototype.indexOf),pe=po(String.prototype.trim),pn=po(Object.prototype.hasOwnProperty),pi=po(RegExp.prototype.test),pr=(th=TypeError,function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return f0(th,e)});function po(t){return function(e){e instanceof RegExp&&(e.lastIndex=0);for(var n=arguments.length,i=Array(n>1?n-1:0),r=1;r<n;r++)i[r-1]=arguments[r];return fJ(t,e,i)}}function pa(t,e){let n=arguments.length>2&&void 0!==arguments[2]?arguments[2]:f8;fW&&fW(t,null);let i=e.length;for(;i--;){let r=e[i];if("string"==typeof r){let t=n(r);t!==r&&(fY(e)||(e[i]=t),r=t)}t[r]=!0}return t}function ps(t){let e=fQ(null);for(let[n,i]of fV(t))pn(t,n)&&(Array.isArray(i)?e[n]=function(t){for(let e=0;e<t.length;e++)pn(t,e)||(t[e]=null);return t}(i):i&&"object"==typeof i&&i.constructor===Object?e[n]=ps(i):e[n]=i);return e}function pl(t,e){for(;null!==t;){let n=fX(t,e);if(n){if(n.get)return po(n.get);if("function"==typeof n.value)return po(n.value)}t=fZ(t)}return function(){return null}}let pc=fq(["a","abbr","acronym","address","area","article","aside","audio","b","bdi","bdo","big","blink","blockquote","body","br","button","canvas","caption","center","cite","code","col","colgroup","content","data","datalist","dd","decorator","del","details","dfn","dialog","dir","div","dl","dt","element","em","fieldset","figcaption","figure","font","footer","form","h1","h2","h3","h4","h5","h6","head","header","hgroup","hr","html","i","img","input","ins","kbd","label","legend","li","main","map","mark","marquee","menu","menuitem","meter","nav","nobr","ol","optgroup","option","output","p","picture","pre","progress","q","rp","rt","ruby","s","samp","section","select","shadow","small","source","spacer","span","strike","strong","style","sub","summary","sup","table","tbody","td","template","textarea","tfoot","th","thead","time","tr","track","tt","u","ul","var","video","wbr"]),pu=fq(["svg","a","altglyph","altglyphdef","altglyphitem","animatecolor","animatemotion","animatetransform","circle","clippath","defs","desc","ellipse","filter","font","g","glyph","glyphref","hkern","image","line","lineargradient","marker","mask","metadata","mpath","path","pattern","polygon","polyline","radialgradient","rect","stop","style","switch","symbol","text","textpath","title","tref","tspan","view","vkern"]),ph=fq(["feBlend","feColorMatrix","feComponentTransfer","feComposite","feConvolveMatrix","feDiffuseLighting","feDisplacementMap","feDistantLight","feDropShadow","feFlood","feFuncA","feFuncB","feFuncG","feFuncR","feGaussianBlur","feImage","feMerge","feMergeNode","feMorphology","feOffset","fePointLight","feSpecularLighting","feSpotLight","feTile","feTurbulence"]),pd=fq(["animate","color-profile","cursor","discard","font-face","font-face-format","font-face-name","font-face-src","font-face-uri","foreignobject","hatch","hatchpath","mesh","meshgradient","meshpatch","meshrow","missing-glyph","script","set","solidcolor","unknown","use"]),pf=fq(["math","menclose","merror","mfenced","mfrac","mglyph","mi","mlabeledtr","mmultiscripts","mn","mo","mover","mpadded","mphantom","mroot","mrow","ms","mspace","msqrt","mstyle","msub","msup","msubsup","mtable","mtd","mtext","mtr","munder","munderover","mprescripts"]),pp=fq(["maction","maligngroup","malignmark","mlongdiv","mscarries","mscarry","msgroup","mstack","msline","msrow","semantics","annotation","annotation-xml","mprescripts","none"]),pg=fq(["#text"]),pm=fq(["accept","action","align","alt","autocapitalize","autocomplete","autopictureinpicture","autoplay","background","bgcolor","border","capture","cellpadding","cellspacing","checked","cite","class","clear","color","cols","colspan","controls","controlslist","coords","crossorigin","datetime","decoding","default","dir","disabled","disablepictureinpicture","disableremoteplayback","download","draggable","enctype","enterkeyhint","face","for","headers","height","hidden","high","href","hreflang","id","inputmode","integrity","ismap","kind","label","lang","list","loading","loop","low","max","maxlength","media","method","min","minlength","multiple","muted","name","nonce","noshade","novalidate","nowrap","open","optimum","pattern","placeholder","playsinline","popover","popovertarget","popovertargetaction","poster","preload","pubdate","radiogroup","readonly","rel","required","rev","reversed","role","rows","rowspan","spellcheck","scope","selected","shape","size","sizes","span","srclang","start","src","srcset","step","style","summary","tabindex","title","translate","type","usemap","valign","value","width","wrap","xmlns","slot"]),py=fq(["accent-height","accumulate","additive","alignment-baseline","amplitude","ascent","attributename","attributetype","azimuth","basefrequency","baseline-shift","begin","bias","by","class","clip","clippathunits","clip-path","clip-rule","color","color-interpolation","color-interpolation-filters","color-profile","color-rendering","cx","cy","d","dx","dy","diffuseconstant","direction","display","divisor","dur","edgemode","elevation","end","exponent","fill","fill-opacity","fill-rule","filter","filterunits","flood-color","flood-opacity","font-family","font-size","font-size-adjust","font-stretch","font-style","font-variant","font-weight","fx","fy","g1","g2","glyph-name","glyphref","gradientunits","gradienttransform","height","href","id","image-rendering","in","in2","intercept","k","k1","k2","k3","k4","kerning","keypoints","keysplines","keytimes","lang","lengthadjust","letter-spacing","kernelmatrix","kernelunitlength","lighting-color","local","marker-end","marker-mid","marker-start","markerheight","markerunits","markerwidth","maskcontentunits","maskunits","max","mask","media","method","mode","min","name","numoctaves","offset","operator","opacity","order","orient","orientation","origin","overflow","paint-order","path","pathlength","patterncontentunits","patterntransform","patternunits","points","preservealpha","preserveaspectratio","primitiveunits","r","rx","ry","radius","refx","refy","repeatcount","repeatdur","restart","result","rotate","scale","seed","shape-rendering","slope","specularconstant","specularexponent","spreadmethod","startoffset","stddeviation","stitchtiles","stop-color","stop-opacity","stroke-dasharray","stroke-dashoffset","stroke-linecap","stroke-linejoin","stroke-miterlimit","stroke-opacity","stroke","stroke-width","style","surfacescale","systemlanguage","tabindex","tablevalues","targetx","targety","transform","transform-origin","text-anchor","text-decoration","text-rendering","textlength","type","u1","u2","unicode","values","viewbox","visibility","version","vert-adv-y","vert-origin-x","vert-origin-y","width","word-spacing","wrap","writing-mode","xchannelselector","ychannelselector","x","x1","x2","xmlns","y","y1","y2","z","zoomandpan"]),pv=fq(["accent","accentunder","align","bevelled","close","columnsalign","columnlines","columnspan","denomalign","depth","dir","display","displaystyle","encoding","fence","frame","height","href","id","largeop","length","linethickness","lspace","lquote","mathbackground","mathcolor","mathsize","mathvariant","maxsize","minsize","movablelimits","notation","numalign","open","rowalign","rowlines","rowspacing","rowspan","rspace","rquote","scriptlevel","scriptminsize","scriptsizemultiplier","selection","separator","separators","stretchy","subscriptshift","supscriptshift","symmetric","voffset","width","xmlns"]),p_=fq(["xlink:href","xml:id","xlink:title","xml:space","xmlns:xlink"]),pb=fK(/\{\{[\w\W]*|[\w\W]*\}\}/gm),px=fK(/<%[\w\W]*|[\w\W]*%>/gm),pE=fK(/\$\{[\w\W]*/gm),pw=fK(/^data-[\-\w.\u00B7-\uFFFF]+$/),pT=fK(/^aria-[\-\w]+$/),pS=fK(/^(?:(?:(?:f|ht)tps?|mailto|tel|callto|sms|cid|xmpp|matrix):|[^a-z]|[a-z+.\-]+(?:[^a-z+.\-:]|$))/i),pO=fK(/^(?:\w+script|data):/i),pM=fK(/[\u0000-\u0020\u00A0\u1680\u180E\u2000-\u2029\u205F\u3000]/g),pA=fK(/^html$/i);var pD=Object.freeze({__proto__:null,ARIA_ATTR:pT,ATTR_WHITESPACE:pM,CUSTOM_ELEMENT:fK(/^[a-z][.\w]*(-[.\w]+)+$/i),DATA_ATTR:pw,DOCTYPE_NAME:pA,ERB_EXPR:px,IS_ALLOWED_URI:pS,IS_SCRIPT_OR_DATA:pO,MUSTACHE_EXPR:pb,TMPLIT_EXPR:pE});let pk=function(t,e){if("object"!=typeof t||"function"!=typeof t.createPolicy)return null;let n=null,i="data-tt-policy-suffix";e&&e.hasAttribute(i)&&(n=e.getAttribute(i));let r="dompurify"+(n?"#"+n:"");try{return t.createPolicy(r,{createHTML:t=>t,createScriptURL:t=>t})}catch{return console.warn("TrustedTypes policy "+r+" could not be created."),null}},pC=function(){return{afterSanitizeAttributes:[],afterSanitizeElements:[],afterSanitizeShadowDOM:[],beforeSanitizeAttributes:[],beforeSanitizeElements:[],beforeSanitizeShadowDOM:[],uponSanitizeAttribute:[],uponSanitizeElement:[],uponSanitizeShadowNode:[]}};var pL=function t(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:typeof window>"u"?null:window,n=e=>t(e);if(n.version="3.2.6",n.removed=[],!e||!e.document||9!==e.document.nodeType||!e.Element)return n.isSupported=!1,n;let{document:i}=e,r=i,o=r.currentScript,{DocumentFragment:a,HTMLTemplateElement:s,Node:l,Element:c,NodeFilter:u,NamedNodeMap:h=e.NamedNodeMap||e.MozNamedAttrMap,HTMLFormElement:d,DOMParser:f,trustedTypes:p}=e,g=c.prototype,m=pl(g,"cloneNode"),y=pl(g,"remove"),v=pl(g,"nextSibling"),_=pl(g,"childNodes"),b=pl(g,"parentNode");if("function"==typeof s){let t=i.createElement("template");t.content&&t.content.ownerDocument&&(i=t.content.ownerDocument)}let x,E="",{implementation:w,createNodeIterator:T,createDocumentFragment:S,getElementsByTagName:O}=i,{importNode:M}=r,A=pC();n.isSupported="function"==typeof fV&&"function"==typeof b&&w&&void 0!==w.createHTMLDocument;let{MUSTACHE_EXPR:D,ERB_EXPR:k,TMPLIT_EXPR:C,DATA_ATTR:L,ARIA_ATTR:R,IS_SCRIPT_OR_DATA:I,ATTR_WHITESPACE:N,CUSTOM_ELEMENT:P}=pD,{IS_ALLOWED_URI:U}=pD,B=null,F=pa({},[...pc,...pu,...ph,...pf,...pg]),H=null,$=pa({},[...pm,...py,...pv,...p_]),z=Object.seal(fQ(null,{tagNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},attributeNameCheck:{writable:!0,configurable:!1,enumerable:!0,value:null},allowCustomizedBuiltInElements:{writable:!0,configurable:!1,enumerable:!0,value:!1}})),j=null,G=null,V=!0,W=!0,Y=!1,Z=!0,X=!1,q=!0,K=!1,Q=!1,J=!1,tt=!1,te=!1,tn=!1,ti=!0,tr=!1,to=!0,ta=!1,ts={},tl=null,tc=pa({},["annotation-xml","audio","colgroup","desc","foreignobject","head","iframe","math","mi","mn","mo","ms","mtext","noembed","noframes","noscript","plaintext","script","style","svg","template","thead","title","video","xmp"]),tu=null,th=pa({},["audio","video","img","source","image","track"]),td=null,tf=pa({},["alt","class","for","id","label","name","pattern","placeholder","role","summary","title","value","style","xmlns"]),tp="http://www.w3.org/1998/Math/MathML",tg="http://www.w3.org/2000/svg",tm="http://www.w3.org/1999/xhtml",ty=tm,tv=!1,t_=null,tb=pa({},[tp,tg,tm],f6),tx=pa({},["mi","mo","mn","ms","mtext"]),tE=pa({},["annotation-xml"]),tw=pa({},["title","style","font","a","script"]),tT=null,tS=["application/xhtml+xml","text/html"],tO=null,tM=null,tA=i.createElement("form"),tD=function(t){return t instanceof RegExp||t instanceof Function},tk=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(!(tM&&tM===t)){if(t&&"object"==typeof t||(t={}),t=ps(t),tO="application/xhtml+xml"===(tT=-1===tS.indexOf(t.PARSER_MEDIA_TYPE)?"text/html":t.PARSER_MEDIA_TYPE)?f6:f8,B=pn(t,"ALLOWED_TAGS")?pa({},t.ALLOWED_TAGS,tO):F,H=pn(t,"ALLOWED_ATTR")?pa({},t.ALLOWED_ATTR,tO):$,t_=pn(t,"ALLOWED_NAMESPACES")?pa({},t.ALLOWED_NAMESPACES,f6):tb,td=pn(t,"ADD_URI_SAFE_ATTR")?pa(ps(tf),t.ADD_URI_SAFE_ATTR,tO):tf,tu=pn(t,"ADD_DATA_URI_TAGS")?pa(ps(th),t.ADD_DATA_URI_TAGS,tO):th,tl=pn(t,"FORBID_CONTENTS")?pa({},t.FORBID_CONTENTS,tO):tc,j=pn(t,"FORBID_TAGS")?pa({},t.FORBID_TAGS,tO):ps({}),G=pn(t,"FORBID_ATTR")?pa({},t.FORBID_ATTR,tO):ps({}),ts=!!pn(t,"USE_PROFILES")&&t.USE_PROFILES,V=!1!==t.ALLOW_ARIA_ATTR,W=!1!==t.ALLOW_DATA_ATTR,Y=t.ALLOW_UNKNOWN_PROTOCOLS||!1,Z=!1!==t.ALLOW_SELF_CLOSE_IN_ATTR,X=t.SAFE_FOR_TEMPLATES||!1,q=!1!==t.SAFE_FOR_XML,K=t.WHOLE_DOCUMENT||!1,tt=t.RETURN_DOM||!1,te=t.RETURN_DOM_FRAGMENT||!1,tn=t.RETURN_TRUSTED_TYPE||!1,J=t.FORCE_BODY||!1,ti=!1!==t.SANITIZE_DOM,tr=t.SANITIZE_NAMED_PROPS||!1,to=!1!==t.KEEP_CONTENT,ta=t.IN_PLACE||!1,U=t.ALLOWED_URI_REGEXP||pS,ty=t.NAMESPACE||tm,tx=t.MATHML_TEXT_INTEGRATION_POINTS||tx,tE=t.HTML_INTEGRATION_POINTS||tE,z=t.CUSTOM_ELEMENT_HANDLING||{},t.CUSTOM_ELEMENT_HANDLING&&tD(t.CUSTOM_ELEMENT_HANDLING.tagNameCheck)&&(z.tagNameCheck=t.CUSTOM_ELEMENT_HANDLING.tagNameCheck),t.CUSTOM_ELEMENT_HANDLING&&tD(t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck)&&(z.attributeNameCheck=t.CUSTOM_ELEMENT_HANDLING.attributeNameCheck),t.CUSTOM_ELEMENT_HANDLING&&"boolean"==typeof t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements&&(z.allowCustomizedBuiltInElements=t.CUSTOM_ELEMENT_HANDLING.allowCustomizedBuiltInElements),X&&(W=!1),te&&(tt=!0),ts&&(B=pa({},pg),H=[],!0===ts.html&&(pa(B,pc),pa(H,pm)),!0===ts.svg&&(pa(B,pu),pa(H,py),pa(H,p_)),!0===ts.svgFilters&&(pa(B,ph),pa(H,py),pa(H,p_)),!0===ts.mathMl&&(pa(B,pf),pa(H,pv),pa(H,p_))),t.ADD_TAGS&&(B===F&&(B=ps(B)),pa(B,t.ADD_TAGS,tO)),t.ADD_ATTR&&(H===$&&(H=ps(H)),pa(H,t.ADD_ATTR,tO)),t.ADD_URI_SAFE_ATTR&&pa(td,t.ADD_URI_SAFE_ATTR,tO),t.FORBID_CONTENTS&&(tl===tc&&(tl=ps(tl)),pa(tl,t.FORBID_CONTENTS,tO)),to&&(B["#text"]=!0),K&&pa(B,["html","head","body"]),B.table&&(pa(B,["tbody"]),delete j.tbody),t.TRUSTED_TYPES_POLICY){if("function"!=typeof t.TRUSTED_TYPES_POLICY.createHTML)throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createHTML" hook.');if("function"!=typeof t.TRUSTED_TYPES_POLICY.createScriptURL)throw pr('TRUSTED_TYPES_POLICY configuration option must provide a "createScriptURL" hook.');E=(x=t.TRUSTED_TYPES_POLICY).createHTML("")}else void 0===x&&(x=pk(p,o)),null!==x&&"string"==typeof E&&(E=x.createHTML(""));fq&&fq(t),tM=t}},tC=pa({},[...pu,...ph,...pd]),tL=pa({},[...pf,...pp]),tR=function(t){let e=b(t);e&&e.tagName||(e={namespaceURI:ty,tagName:"template"});let n=f8(t.tagName),i=f8(e.tagName);return!!t_[t.namespaceURI]&&(t.namespaceURI===tg?e.namespaceURI===tm?"svg"===n:e.namespaceURI===tp?"svg"===n&&("annotation-xml"===i||tx[i]):!!tC[n]:t.namespaceURI===tp?e.namespaceURI===tm?"math"===n:e.namespaceURI===tg?"math"===n&&tE[i]:!!tL[n]:t.namespaceURI===tm?(e.namespaceURI!==tg||!!tE[i])&&(e.namespaceURI!==tp||!!tx[i])&&!tL[n]&&(tw[n]||!tC[n]):!!("application/xhtml+xml"===tT&&t_[t.namespaceURI]))},tI=function(t){f5(n.removed,{element:t});try{b(t).removeChild(t)}catch{y(t)}},tN=function(t,e){try{f5(n.removed,{attribute:e.getAttributeNode(t),from:e})}catch{f5(n.removed,{attribute:null,from:e})}if(e.removeAttribute(t),"is"===t)if(tt||te)try{tI(e)}catch{}else try{e.setAttribute(t,"")}catch{}},tP=function(t){let e=null,n=null;if(J)t="<remove></remove>"+t;else{let e=f9(t,/^[\r\n\t ]+/);n=e&&e[0]}"application/xhtml+xml"===tT&&ty===tm&&(t='<html xmlns="http://www.w3.org/1999/xhtml"><head></head><body>'+t+"</body></html>");let r=x?x.createHTML(t):t;if(ty===tm)try{e=new f().parseFromString(r,tT)}catch{}if(!e||!e.documentElement){e=w.createDocument(ty,"template",null);try{e.documentElement.innerHTML=tv?E:r}catch{}}let o=e.body||e.documentElement;return t&&n&&o.insertBefore(i.createTextNode(n),o.childNodes[0]||null),ty===tm?O.call(e,K?"html":"body")[0]:K?e.documentElement:o},tU=function(t){return T.call(t.ownerDocument||t,t,u.SHOW_ELEMENT|u.SHOW_COMMENT|u.SHOW_TEXT|u.SHOW_PROCESSING_INSTRUCTION|u.SHOW_CDATA_SECTION,null)},tB=function(t){return t instanceof d&&("string"!=typeof t.nodeName||"string"!=typeof t.textContent||"function"!=typeof t.removeChild||!(t.attributes instanceof h)||"function"!=typeof t.removeAttribute||"function"!=typeof t.setAttribute||"string"!=typeof t.namespaceURI||"function"!=typeof t.insertBefore||"function"!=typeof t.hasChildNodes)},tF=function(t){return"function"==typeof l&&t instanceof l};function tH(t,e,i){f1(t,t=>{t.call(n,e,i,tM)})}let t$=function(t){let e=null;if(tH(A.beforeSanitizeElements,t,null),tB(t))return tI(t),!0;let i=tO(t.nodeName);if(tH(A.uponSanitizeElement,t,{tagName:i,allowedTags:B}),q&&t.hasChildNodes()&&!tF(t.firstElementChild)&&pi(/<[/\w!]/g,t.innerHTML)&&pi(/<[/\w!]/g,t.textContent)||7===t.nodeType||q&&8===t.nodeType&&pi(/<[/\w]/g,t.data))return tI(t),!0;if(!B[i]||j[i]){if(!j[i]&&tj(i)&&(z.tagNameCheck instanceof RegExp&&pi(z.tagNameCheck,i)||z.tagNameCheck instanceof Function&&z.tagNameCheck(i)))return!1;if(to&&!tl[i]){let e=b(t)||t.parentNode,n=_(t)||t.childNodes;if(n&&e){let i=n.length;for(let r=i-1;r>=0;--r){let i=m(n[r],!0);i.__removalCount=(t.__removalCount||0)+1,e.insertBefore(i,v(t))}}}return tI(t),!0}return t instanceof c&&!tR(t)||("noscript"===i||"noembed"===i||"noframes"===i)&&pi(/<\/no(script|embed|frames)/i,t.innerHTML)?(tI(t),!0):(X&&3===t.nodeType&&(e=t.textContent,f1([D,k,C],t=>{e=f7(e,t," ")}),t.textContent!==e&&(f5(n.removed,{element:t.cloneNode()}),t.textContent=e)),tH(A.afterSanitizeElements,t,null),!1)},tz=function(t,e,n){if(ti&&("id"===e||"name"===e)&&(n in i||n in tA))return!1;if(!(W&&!G[e]&&pi(L,e))&&!(V&&pi(R,e))){if(!H[e]||G[e]){if(!(tj(t)&&(z.tagNameCheck instanceof RegExp&&pi(z.tagNameCheck,t)||z.tagNameCheck instanceof Function&&z.tagNameCheck(t))&&(z.attributeNameCheck instanceof RegExp&&pi(z.attributeNameCheck,e)||z.attributeNameCheck instanceof Function&&z.attributeNameCheck(e))||"is"===e&&z.allowCustomizedBuiltInElements&&(z.tagNameCheck instanceof RegExp&&pi(z.tagNameCheck,n)||z.tagNameCheck instanceof Function&&z.tagNameCheck(n))))return!1}else if(!td[e]&&!pi(U,f7(n,N,""))&&!(("src"===e||"xlink:href"===e||"href"===e)&&"script"!==t&&0===pt(n,"data:")&&tu[t])&&!(Y&&!pi(I,f7(n,N,"")))&&n)return!1}return!0},tj=function(t){return"annotation-xml"!==t&&f9(t,P)},tG=function(t){tH(A.beforeSanitizeAttributes,t,null);let{attributes:e}=t;if(!e||tB(t))return;let i={attrName:"",attrValue:"",keepAttr:!0,allowedAttributes:H,forceKeepAttr:void 0},r=e.length;for(;r--;){let{name:o,namespaceURI:a,value:s}=e[r],l=tO(o),c="value"===o?s:pe(s);if(i.attrName=l,i.attrValue=c,i.keepAttr=!0,i.forceKeepAttr=void 0,tH(A.uponSanitizeAttribute,t,i),c=i.attrValue,tr&&("id"===l||"name"===l)&&(tN(o,t),c="user-content-"+c),q&&pi(/((--!?|])>)|<\/(style|title)/i,c)){tN(o,t);continue}if(i.forceKeepAttr)continue;if(!i.keepAttr||!Z&&pi(/\/>/i,c)){tN(o,t);continue}X&&f1([D,k,C],t=>{c=f7(c,t," ")});let u=tO(t.nodeName);if(!tz(u,l,c)){tN(o,t);continue}if(x&&"object"==typeof p&&"function"==typeof p.getAttributeType&&!a)switch(p.getAttributeType(u,l)){case"TrustedHTML":c=x.createHTML(c);break;case"TrustedScriptURL":c=x.createScriptURL(c)}if(c!==s)try{a?t.setAttributeNS(a,o,c):t.setAttribute(o,c),tB(t)?tI(t):f3(n.removed)}catch{tN(o,t)}}tH(A.afterSanitizeAttributes,t,null)},tV=function t(e){let n=null,i=tU(e);for(tH(A.beforeSanitizeShadowDOM,e,null);n=i.nextNode();)tH(A.uponSanitizeShadowNode,n,null),t$(n),tG(n),n.content instanceof a&&t(n.content);tH(A.afterSanitizeShadowDOM,e,null)};return n.sanitize=function(t){let e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},i=null,o=null,s=null,c=null;if((tv=!t)&&(t="\x3c!--\x3e"),"string"!=typeof t&&!tF(t))if("function"==typeof t.toString){if("string"!=typeof(t=t.toString()))throw pr("dirty is not a string, aborting")}else throw pr("toString is not a function");if(!n.isSupported)return t;if(Q||tk(e),n.removed=[],"string"==typeof t&&(ta=!1),ta){if(t.nodeName){let e=tO(t.nodeName);if(!B[e]||j[e])throw pr("root node is forbidden and cannot be sanitized in-place")}}else if(t instanceof l)1===(o=(i=tP("\x3c!----\x3e")).ownerDocument.importNode(t,!0)).nodeType&&"BODY"===o.nodeName||"HTML"===o.nodeName?i=o:i.appendChild(o);else{if(!tt&&!X&&!K&&-1===t.indexOf("<"))return x&&tn?x.createHTML(t):t;if(!(i=tP(t)))return tt?null:tn?E:""}i&&J&&tI(i.firstChild);let u=tU(ta?t:i);for(;s=u.nextNode();)t$(s),tG(s),s.content instanceof a&&tV(s.content);if(ta)return t;if(tt){if(te)for(c=S.call(i.ownerDocument);i.firstChild;)c.appendChild(i.firstChild);else c=i;return(H.shadowroot||H.shadowrootmode)&&(c=M.call(r,c,!0)),c}let h=K?i.outerHTML:i.innerHTML;return K&&B["!doctype"]&&i.ownerDocument&&i.ownerDocument.doctype&&i.ownerDocument.doctype.name&&pi(pA,i.ownerDocument.doctype.name)&&(h="<!DOCTYPE "+i.ownerDocument.doctype.name+`>
4
- `+h),X&&f1([D,k,C],t=>{h=f7(h,t," ")}),x&&tn?x.createHTML(h):h},n.setConfig=function(){let t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};tk(t),Q=!0},n.clearConfig=function(){tM=null,Q=!1},n.isValidAttribute=function(t,e,n){return tM||tk({}),tz(tO(t),tO(e),n)},n.addHook=function(t,e){"function"==typeof e&&f5(A[t],e)},n.removeHook=function(t,e){if(void 0!==e){let n=f2(A[t],e);return -1===n?void 0:f4(A[t],n,1)[0]}return f3(A[t])},n.removeHooks=function(t){A[t]=[]},n.removeAllHooks=function(){A=pC()},n}();let pR=t=>pL.sanitize(t,{USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}}),pI=t=>pL.sanitize(t,{ALLOWED_TAGS:[]}),pN=class t extends fG{constructor(){super(...arguments),this.type="toolbar",this.renderType=tY.HTML}init(){let t=()=>this.updateOverflowMenu(!1);this.services.events.addEventListener(tW.Toolbar.SHOW_OVERFLOW_MENU,()=>{this.renderOverflowMenu(),document.body.addEventListener("click",t)}),this.services.events.addEventListener(tW.Toolbar.HIDE_OVERFLOW_MENU,()=>{document.body.removeEventListener("click",t)})}render(t=!0){let e=this.getComponentContainer({ariaLabel:"toolbar"}).attr("role","group");if(sU(this.getOptions(),"data","loading"))e.html(""),this.overflowMenu=null;else{this.overflowMenu||(this.overflowMenu=e.append("div").attr("class","cds--overflow-menu-options cds--overflow-menu--flip cds--overflow-menu-options cds--overflow-menu--flip").attr("tabindex",-1).html("<ul role='menu'></ul>"));let{buttonList:t,overflowMenuItemList:n}=this.getControlConfigs();n&&t.push(this.getOverflowButtonConfig());let i=e.selectAll("div.toolbar-control").data(t,t=>t.id);i.exit().remove();let r=i.enter().append("div").attr("class","toolbar-control cds--overflow-menu cds--overflow-menu"),o=this;r.merge(i).classed("disabled",t=>t.shouldBeDisabled()).attr("role","button").attr("aria-disabled",t=>t.shouldBeDisabled()).attr("aria-label",t=>t.title).html(t=>{let e;return`
5
- <button
6
- type="button"
7
- class="cds--overflow-menu__trigger cds--overflow-menu__trigger"
8
- aria-haspopup="true" aria-expanded="false" id="${this.services.domUtils.generateElementIDString(`control-${pI(t.id)}`)}" aria-label="${pI(t.title)}">
9
- <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" class="cds--overflow-menu__icon cds--overflow-menu__icon" viewBox="0 0 32 32" aria-hidden="true">
10
- ${e=t.iconSVG.content,pL.sanitize(e,{NAMESPACE:"http://www.w3.org/2000/svg",USE_PROFILES:{html:!0,svg:!0,svgFilters:!0}})}
11
- </svg>
12
- </button>`}).each(function(t,e){lP(this).select("svg").style("pointer-events","none").style("will-change","transform").style("width",void 0!==t.iconSVG.width?t.iconSVG.width:"20px").style("height",void 0!==t.iconSVG.height?t.iconSVG.height:"20px"),lP(this).select("button").on("mouseover focus",function(e){let n=lP(this);n.classed("hovered",!0),o.services.events.dispatchEvent(tW.Toolbar.SHOW_TOOLTIP,{event:e,hoveredElement:n,content:t.title,noWrap:!0,placements:["top","bottom"]})}).on("mouseout blur",function(){o.services.events.dispatchEvent(tW.Toolbar.HIDE_TOOLTIP)}).on("click",e=>{t.shouldBeDisabled()||o.triggerFunctionAndEvent(t,e,this)}).on("keydown",n=>{n.key&&"Enter"===n.key||" "===n.key?(n.preventDefault(),o.triggerFunctionAndEvent(t,n,this)):n.key&&"ArrowLeft"===n.key?o.focusOnPreviousEnabledToolbarItem(e):n.key&&"ArrowRight"===n.key&&o.focusOnNextEnabledToolbarItem(e)})}),this.overflowButton=this.getComponentContainer().select(`button.cds--overflow-menu__trigger#${this.services.domUtils.generateElementIDString("control-toolbar-overflow-menu")}`)}}renderOverflowMenu(){let{overflowMenuItemList:t}=this.getControlConfigs(),e=this.overflowMenu.select("ul").selectAll("li.cds--overflow-menu-options__option").data(t,t=>sU(t,"id"));e.exit().remove();let n=e.enter().append("li").attr("id",t=>this.services.domUtils.generateElementIDString(`control-${t.id}`)).attr("class","cds--overflow-menu-options__option cds--overflow-menu-options__option").attr("role","menuitem").attr("tabindex",1);n.append("button").attr("type","button").attr("class","cds--overflow-menu-options__btn cds--overflow-menu-options__btn"),n.merge(e).classed("cds--overflow-menu-options__option--disabled",t=>t.shouldBeDisabled()).classed("cds--overflow-menu-options__option--disabled",t=>t.shouldBeDisabled()).attr("aria-disabled",t=>t.shouldBeDisabled()).selectAll("button").text(t=>t.title)}isOverflowMenuOpen(){return this.overflowMenu.classed("is-open")}updateOverflowMenu(t){this.overflowMenu&&(this.overflowMenu.classed("is-open",t),this.overflowButton&&(this.overflowButton.attr("aria-expanded",t),lP(this.overflowButton.node().parentNode).classed("cds--overflow-menu--open",t).classed("cds--overflow-menu--open",t)),t?this.services.events.dispatchEvent(tW.Toolbar.SHOW_OVERFLOW_MENU):this.services.events.dispatchEvent(tW.Toolbar.HIDE_OVERFLOW_MENU))}focusOnPreviousEnabledToolbarItem(t){let e=this.getToolbarButtonItems(),n=e.length;for(let i=t-1;i>=0;i--)if(!e[i].shouldBeDisabled()){n=i;break}if(n<e.length){let t=lP(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnNextEnabledToolbarItem(t){let e=this.getToolbarButtonItems(),n=-1;for(let i=t+1;i<e.length;i++)if(!e[i].shouldBeDisabled()){n=i;break}if(n>-1){let t=lP(`button#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)}`).node();"focus"in t&&t.focus()}}focusOnPreviousEnabledMenuItem(t){let e=this.getOverflowMenuItems(),n=e.length;for(let i=t-1;i>=0;i--)if(!e[i].shouldBeDisabled()){n=i;break}if(n<e.length){let t=lP(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}focusOnNextEnabledMenuItem(t){let e=this.getOverflowMenuItems(),n=-1;for(let i=t+1;i<e.length;i++)if(!e[i].shouldBeDisabled()){n=i;break}if(n>-1){let t=lP(`#${this.services.domUtils.generateElementIDString(`control-${e[n].id}`)} button`).node();"focus"in t&&t.focus()}}toggleOverflowMenu(t){if(this.isOverflowMenuOpen())this.updateOverflowMenu(!1);else{this.updateOverflowMenu(!0);let e=this;this.getOverflowMenuItems().forEach((n,i)=>{let r=lP(`#${this.services.domUtils.generateElementIDString(`control-${n.id}`)}`);null!==r&&(r.on("click",()=>{e.triggerFunctionAndEvent(n,t,r.node()),e.updateOverflowMenu(!1)}),r.on("keydown",o=>{o&&"Enter"===o.key?e.triggerFunctionAndEvent(n,t,r.node()):o&&"ArrowUp"===o.key?e.focusOnPreviousEnabledMenuItem(i):o&&"ArrowDown"===o.key?e.focusOnNextEnabledMenuItem(i):o&&"Escape"===o.key&&e.updateOverflowMenu(!1),o.preventDefault()}))}),e.focusOnNextEnabledMenuItem(-1)}t&&t.stopImmediatePropagation()}triggerFunctionAndEvent(t,e,n){"function"==typeof t.shouldBeDisabled&&t.shouldBeDisabled()||("function"==typeof t.clickFunction&&t.clickFunction(e),this.services.events.dispatchEvent(tW.Toolbar.BUTTON_CLICK,{control:t,event:e,element:n}))}getControlConfigs(){let e=sU(this.getOptions(),"toolbar","numberOfIcons")-1,n=sU(this.getOptions(),"toolbar","controls"),i=[],r=[],o=[];return n.forEach(n=>{let a=null;if(n.type===es.CUSTOM)null===sU(n,"id")&&(n.id=`toolbar-button-${t.buttonID++}`),null===sU(n,"shouldBeDisabled")&&(n.shouldBeDisabled=()=>!1),a=n;else{let t=this.services.domUtils.isFullScreenMode();n.type===es.MAKE_FULLSCREEN&&t?n.type=es.EXIT_FULLSCREEN:n.type!==es.EXIT_FULLSCREEN||t||(n.type=es.MAKE_FULLSCREEN),a=this.getControlConfigByType(n.type)}a&&(a.text=n.text?n.text:n.type,-1!==a.id.indexOf("toolbar-export")?i.push(a):r.length<e?null===sU(a,"iconSVG","content")?o.push(a):r.push(a):o.push(a))}),o.push(...i),o.length?{buttonList:r,overflowMenuItemList:o}:{buttonList:r}}getToolbarButtonItems(){let{buttonList:t,overflowMenuItemList:e}=this.getControlConfigs();return e&&t.push(this.getOverflowButtonConfig()),t||[]}getOverflowMenuItems(){let{overflowMenuItemList:t}=this.getControlConfigs();return t||[]}getOverflowButtonConfig(){let{moreOptions:t}=sU(this.model.getOptions(),"locale","translations","toolbar");return{id:"toolbar-overflow-menu",title:t,shouldBeDisabled:()=>!1,iconSVG:{content:`<circle cx="16" cy="8" r="2"></circle>
13
- <circle cx="16" cy="16" r="2"></circle>
14
- <circle cx="16" cy="24" r="2"></circle>`},clickFunction:t=>this.toggleOverflowMenu(t)}}getControlConfigByType(t){let e,n=this.services.zoom&&this.services.zoom.isZoomBarEnabled()&&!this.services.zoom.isEmptyState(),i=this.model.getDisplayData(),{exportAsCSV:r,exportAsJPG:o,exportAsPNG:a,zoomIn:s,zoomOut:l,resetZoom:c,makeFullScreen:u,exitFullScreen:h,showAsTable:d}=sU(this.model.getOptions(),"locale","translations","toolbar");switch(t){case es.ZOOM_IN:n&&(e={id:"toolbar-zoomIn",title:s,shouldBeDisabled:()=>this.services.zoom.isMinZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomIn()});break;case es.ZOOM_OUT:n&&(e={id:"toolbar-zoomOut",title:l,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.zoomOut()});break;case es.RESET_ZOOM:n&&(e={id:"toolbar-resetZoom",title:c,shouldBeDisabled:()=>this.services.zoom.isMaxZoomDomain(),iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.zoom.resetZoomDomain()});break;case es.MAKE_FULLSCREEN:e={id:"toolbar-makefullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:u,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case es.EXIT_FULLSCREEN:e={id:"toolbar-exitfullscreen",iconSVG:{content:this.getControlIconByType(t),width:"15px",height:"15px"},title:h,shouldBeDisabled:()=>!1,clickFunction:()=>{this.services.domUtils.toggleFullscreen()}};break;case es.SHOW_AS_DATATABLE:e={id:"toolbar-showasdatatable",iconSVG:{content:this.getControlIconByType(t)},title:d,shouldBeDisabled:()=>0===i.length,clickFunction:()=>this.services.events.dispatchEvent(tW.Modal.SHOW)};break;case es.EXPORT_CSV:e={id:"toolbar-export-CSV",title:r,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.model.exportToCSV()};break;case es.EXPORT_PNG:e={id:"toolbar-export-PNG",title:a,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToPNG()};break;case es.EXPORT_JPG:e={id:"toolbar-export-JPG",title:o,shouldBeDisabled:()=>!1,iconSVG:{content:this.getControlIconByType(t)},clickFunction:()=>this.services.domUtils.exportToJPG()};break;default:throw Error("Not supported toolbar control type: "+t)}return e}getControlIconByType(t){switch(t){case es.ZOOM_IN:return`<polygon points="19 13 15 13 15 9 13 9 13 13 9 13 9 15 13 15 13 19 15 19 15 15 19 15 19 13"/>
15
- <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case es.ZOOM_OUT:return`<rect x="9" y="13" width="10" height="2"/>
16
- <path d="M22.45,21A10.87,10.87,0,0,0,25,14,11,11,0,1,0,14,25a10.87,10.87,0,0,0,7-2.55L28.59,30,30,28.59ZM14,23a9,9,0,1,1,9-9A9,9,0,0,1,14,23Z"/>`;case es.RESET_ZOOM:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';case es.MAKE_FULLSCREEN:return'<polygon points="21 2 21 4 26.59 4 17 13.58 18.41 15 28 5.41 28 11 30 11 30 2 21 2"/><polygon points="15 18.42 13.59 17 4 26.59 4 21 2 21 2 30 11 30 11 28 5.41 28 15 18.42"/>';case es.EXIT_FULLSCREEN:return'<polygon points="4 18 4 20 10.586 20 2 28.582 3.414 30 12 21.414 12 28 14 28 14 18 4 18"/><polygon points="30 3.416 28.592 2 20 10.586 20 4 18 4 18 14 28 14 28 12 21.414 12 30 3.416"/>';case es.SHOW_AS_DATATABLE:return'<rect x="4" y="6" width="18" height="2"/><rect x="4" y="12" width="18" height="2"/><rect x="4" y="18" width="18" height="2"/><rect x="4" y="24" width="18" height="2"/><rect x="26" y="6" width="2" height="2"/><rect x="26" y="12" width="2" height="2"/><rect x="26" y="18" width="2" height="2"/><rect x="26" y="24" width="2" height="2"/>';case es.EXPORT_CSV:case es.EXPORT_JPG:case es.EXPORT_PNG:return'<path d="M22.4478,21A10.855,10.855,0,0,0,25,14,10.99,10.99,0,0,0,6,6.4658V2H4v8h8V8H7.332a8.9768,8.9768,0,1,1-2.1,8H3.1912A11.0118,11.0118,0,0,0,14,25a10.855,10.855,0,0,0,7-2.5522L28.5859,30,30,28.5859Z"/>';default:throw Error("Not supported toolbar control type: "+t)}}};pN.buttonID=0;let pP=class t extends fG{constructor(e,n,i,r){super(e,n,r),this.type="layout",this.configs=r,this.children=i,this._instanceID=t.instanceID++,this.init()}init(){this.children.forEach(t=>{t.components.forEach(t=>{t.init()})})}getPreferedAndFixedSizeSum(){let t=this.parent,e=0;return t.selectAll(`div.layout-child-${this._instanceID}`).filter(t=>{let e=sU(t,"growth");return e===t8.PREFERRED||e===t8.FIXED}).each(function(t){e+=t.size}),e}getNumOfStretchChildren(){return this.parent.selectAll(`div.layout-child-${this._instanceID}`).filter(t=>sU(t,"growth")===t8.STRETCH).size()}render(t=!0){let e=this.model.getOptions(),n=this.parent,{width:i,height:r}=hv.getHTMLElementSize(n.node()),o=this.configs.direction===t4.ROW||this.configs.direction===t4.ROW_REVERSE,a=sU(this.model.getOptions(),"style","prefix"),s=n.classed(`cds--${a}--layout-row`,this.configs.direction===t4.ROW).classed(`cds--${a}--layout-row-reverse`,this.configs.direction===t4.ROW_REVERSE).classed(`cds--${a}--layout-column`,this.configs.direction===t4.COLUMN).classed(`cds--${a}--layout-column-reverse`,this.configs.direction===t4.COLUMN_REVERSE).classed(`cds--${a}--layout-alignitems-center`,this.configs.alignItems===t6.CENTER).selectAll(`div.layout-child-${this._instanceID}`).data(this.children,t=>t.id);s.enter().append("div").merge(n.selectAll(`div.layout-child-${this._instanceID}`)).attr("class",t=>`layout-child layout-child-${this._instanceID} ${t.id}`).each(function(n){n.components.forEach(i=>{let r=lP(this),o=sU(n,"renderType")===tY.SVG;i.setParent(o?hv.appendOrSelect(r,"svg.layout-svg-wrapper").attr("width","100%").attr("height","100%"):r),o&&!r.select("svg.layout-svg-wrapper").attr("aria-label")&&r.select("svg.layout-svg-wrapper").attr("aria-label",e?.accessibility?.svgAriaLabel||e?.title);let a=sU(n,"growth");(a===t8.PREFERRED||a===t8.FIXED)&&i.render(t)})}),n.selectAll(`div.layout-child-${this._instanceID}`).style("height",null).style("width",null).each(function(t){let e=sU(t,"growth"),n=sU(t,"renderType")===tY.SVG?hv.getSVGElementSize(lP(this).select("svg.layout-svg-wrapper"),{useBBox:!0}):hv.getHTMLElementSize(this);e===t8.PREFERRED&&(t.size=(o?n.width:n.height)/(o?i:r)*100)}),s.exit().remove(),this.children.filter(t=>sU(t,"growth")===t8.STRETCH).forEach(t=>{t.size=(100-this.getPreferedAndFixedSizeSum())/this.getNumOfStretchChildren()});let l=n.selectAll(`div.layout-child-${this._instanceID}`).data(this.children,t=>t.id);o?l.style("width",t=>`${t.size/100*i}px`).style("height","100%"):l.style("height",t=>`${t.size/100*r}px`).style("width","100%"),l.each(function(e){e.components.forEach(n=>{sU(e,"growth")===t8.STRETCH&&n.render(t)})})}setModel(t){super.setModel(t),this.children.forEach(e=>{e.components.forEach(e=>e.setModel(t))})}setServices(t){super.setServices(t),this.children.forEach(e=>{e.components.forEach(e=>e.setServices(t))})}destroy(){this.children.forEach(t=>{t.components.forEach(t=>t.destroy())})}};pP.instanceID=Math.floor(0x174876e7ff*Math.random());class pU extends fG{constructor(){super(...arguments),this.type="spacer"}render(t=!1){this.getComponentContainer({isPresentational:!0}).style("width",`${this.configs.size||sf}px`).style("height",`${this.configs.size||sf}px`).attr("opacity",0)}}class pB extends fG{constructor(t,e,n){super(t,e,n),this.type="modal",this.isEventListenerAdded=!1,this.handleShowModal=()=>{let t=this.services.domUtils.getChartID();this.modal.attr("data-modal",!0).attr("class","cds--modal").attr("role","dialog").attr("aria-modal",!0).attr("aria-labelledby",`${t}__modal-title`).attr("aria-describedby",`${t}__modal-description`).attr("tabindex",-1).style("opacity",1).style("visibility","visible"),this.modal.html(this.getModalHTML()),this.modal.select("div.cds--modal-footer button.cds--btn").on("click",()=>this.model.exportToCSV()),this.modal.on("click",this.handleHideModal),this.modal.select(".cds--modal-container").on("click",t=>{t.stopPropagation()}),this.modal.select(".cds--modal-close").on("click",this.handleHideModal),"u">typeof window&&window.addEventListener("keydown",this.handleEscapeKey)},this.handleEscapeKey=t=>{"Escape"===t.key&&this.handleHideModal()},this.handleHideModal=()=>{this.modal.attr("role",null).attr("aria-modal",null).attr("aria-labelledby",null).attr("aria-describedby",null).attr("tabindex",null).style("opacity",0).style("visibility","hidden"),this.modal.on("click",null),this.modal.select(".cds--modal-container").on("click",null),this.modal.select(".cds--modal-close").on("click",null),"u">typeof window&&window.removeEventListener("keydown",this.handleEscapeKey)},this.init()}addEventListeners(){this.services.events.addEventListener(tW.Modal.SHOW,this.handleShowModal)}removeEventListeners(){this.services.events.removeEventListener(tW.Modal.SHOW,this.handleShowModal)}getModalHTML(){let t=this.services.domUtils.getChartID(),e=this.model.getOptions(),{title:n,downloadAsCSV:i}=sU(e,"locale","translations","tabularRep"),r=sU(e,"style","prefix"),o=this.model.getTabularDataArray();return`
17
- <div class="cds--modal-container">
18
- <div class="cds--modal-header">
19
-
20
- <p class="cds--modal-header__label cds--type-delta" id="modal-title">${n}</p>
21
-
22
- <p class="cds--modal-header__heading cds--type-beta" id="${t}__modal-description">${pI(e.title)}</p>
23
-
24
- <button class="cds--modal-close" type="button" data-modal-close aria-label="close modal" data-modal-primary-focus>
25
- <svg focusable="false" preserveAspectRatio="xMidYMid meet" xmlns="http://www.w3.org/2000/svg" fill="currentColor" aria-label="Close" width="20" height="20" viewBox="0 0 32 32" role="img" class="cds--modal-close__icon">
26
- <path d="M24 9.4L22.6 8 16 14.6 9.4 8 8 9.4 14.6 16 8 22.6 9.4 24 16 17.4 22.6 24 24 22.6 17.4 16 24 9.4z"></path>
27
- </svg>
28
- </button>
29
- </div>
30
-
31
- <div class="cds--modal-content">
32
- <table class="cds--data-table cds--data-table--no-border">
33
- <thead>
34
- <tr>
35
- ${ie(o,0).map(t=>`<th scope="col">
36
- <div class="cds--table-header-label">${pI(t)}</div>
37
- </th>`).join("")}
38
- </tr>
39
- </thead>
40
-
41
- <tbody>${o.slice(1).map(t=>`
42
- <tr>
43
- ${t.map(t=>`<td>${pI(t)}</td>`).join("")}
44
- </tr>`).join("")}
45
- </tbody>
46
- </table>
47
- </div>
48
-
49
- <div class="cds--modal-footer">
50
- <div class="cds--${r}-modal-footer-spacer"></div>
51
- <button class="cds--btn cds--btn--primary" type="button" data-modal-primary-focus>${i}</button>
52
- </div>
53
- </div>`}render(t=!1){let e=this.model.getOptions();if(!this.isEventListenerAdded){let t=lP(this.services.domUtils.getHolder()),n=sU(e,"style","prefix");this.modal=hv.appendOrSelect(t,`div.cds--${n}--modal`),this.addEventListeners(),this.isEventListenerAdded=!0}}destroy(){this.removeEventListeners(),this.isEventListenerAdded=!1}}class pF extends fG{constructor(){super(...arguments),this.type="title",this.renderType=tY.HTML}render(t=!1){let e=this.getComponentContainer(),n=sU(this.getOptions(),"title"),i=e.selectAll("p.title").data([n]);if(i.enter().append("p").classed("title",!0).attr("role","heading").attr("aria-level",2).merge(i).html(t=>pI(t)),i.node()&&i.node().offsetWidth<i.node().scrollWidth){let t=this;i.on("mouseover",function(e){t.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:e,hoveredElement:i,content:i.text()})}).on("mousemove",function(e){t.services.events.dispatchEvent(tW.Tooltip.MOVE,{event:e})}).on("mouseout",function(){t.services.events.dispatchEvent(tW.Tooltip.HIDE)})}i.exit().remove()}truncateTitle(t,e){if(e<=0)return;let n=t.text();if(t.node().getComputedTextLength()>e){t.append("tspan").text("...");let i=hv.appendOrSelect(t,"tspan").node().getComputedTextLength(),r=t.text(),o=this.getSubstringIndex(t.node(),0,r.length-1,e-i);t.html(r.substring(0,o-1)).append("tspan").text("...");let a=this;t.on("mouseover",function(e){a.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:e,hoveredElement:t,content:n})}).on("mousemove",function(t){a.services.events.dispatchEvent(tW.Tooltip.MOVE,{event:t})}).on("mouseout",function(){a.services.events.dispatchEvent(tW.Tooltip.HIDE)})}}getMaxTitleWidth(){return hv.getSVGElementSize(this.parent.node(),{useAttrs:!0}).width}getSubstringIndex(t,e,n,i){let r=Math.floor((n+e)/2);return t.getSubStringLength(0,r)>i?this.getSubstringIndex(t,e,r,i):t.getSubStringLength(0,r)<i?t.getSubStringLength(0,r+1)>i?r:this.getSubstringIndex(t,r,n,i):r}}class pH extends fG{constructor(){super(...arguments),this.type="legend",this.renderType=tY.HTML}render(t=!1){let e=this.getOptions(),n=sU(e,"legend"),i=sU(n,"alignment"),r=sU(e,"legend","orientation"),o=this.model.getDataGroups(),{DISABLED:a}=sd.items.status,s=o.some(t=>t.status===a),l=sU(n,"order"),c=this.getComponentContainer().classed("center-aligned",i===t2.CENTER).classed("right-aligned",i===t2.RIGHT).classed(r||"horizontal",!0).classed("has-deactivated-items",s).attr("role",ll.GROUP).attr("aria-label","Data groups").attr("data-name","legend-items");l&&(o=this.sortDataGroups(o,l));let u=c.selectAll("div.legend-item").data(o,t=>t.name),h=u.enter().append("div").attr("class","legend-item");h.merge(c.selectAll("div.legend-item")).classed("active",function(t){return t.status===sd.items.status.ACTIVE});let d=sU(this.getOptions(),"legend","clickable");c.classed("clickable",d&&o.length>1);let f=sd.checkbox.radius,p=h.append("div").classed("checkbox",!0),g=p.merge(u.select("div.checkbox")).attr("role",ll.CHECKBOX).attr("tabindex",d?0:-1).attr("aria-labelledby",(t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${e}-title`)).attr("aria-checked",({status:t})=>t===sd.items.status.ACTIVE).attr("width",2*f).attr("height",2*f).attr("class",t=>this.model.getColorClassName({classNameTypes:[tX.BACKGROUND],dataGroupName:t.name,originalClassName:"checkbox"})).style("background",t=>t.status===sd.items.status.ACTIVE?this.model.getFillColor(t.name)||this.model.getStrokeColor(t.name):null).classed("active",function(t){return t.status===sd.items.status.ACTIVE});p.append("svg").attr("focusable",!1).attr("preserveAspectRatio","xMidYMid meet").attr("xmlns","http://www.w3.org/2000/svg").attr("width","11").attr("height","11").attr("viewBox","0 0 31 28").attr("aria-hidden",!0).style("will-change","transform").append("path").attr("d","M13 21.2l-7.1-7.1-1.4 1.4 7.1 7.1L13 24 27.1 9.9l-1.4-1.5z"),h.append("p").merge(u.select("p"));let m=sU(e,"legend","additionalItems");if(m&&o.length){let t=this,e=c.selectAll("div.additional-item").data(m);e.exit().remove();let n=e.enter().append("div").merge(e).classed("legend-item",!0).classed("additional",!0).attr("role","img").attr("aria-labelledby",(t,e)=>this.services.domUtils.generateElementIDString(`legend-datagroup-${g.size()+e}-title`));n.selectAll("*").remove();let i,r=1;n.append("svg").classed("icon",!0).each(function(e){let n=lP(this);i&&i==e.type?r++:(i=e.type,r=1),t.addAdditionalItem(n,e,r)}),n.append("p").merge(n.select("p")),this.truncateLegendText()}u.exit().on("mouseover",null).on("click",null).on("mouseout",null).remove(),d&&h.size()>1&&this.addEventListeners()}sortDataGroups(t,e){if(t.sort((t,n)=>e.indexOf(t.name)-e.indexOf(n.name)),e.length<t.length){let n=t.length-e.length;return t.slice(n).concat(t.slice(0,n))}return t}addAdditionalItem(t,e,n){let{width:i,height:r}=sd.area;if(e.type===ec.RADIUS?t.style("width",`${r}px`).style("height",`${r}px`):t.style("width",`${i}px`).style("height",`${r}px`),e.type===ec.RADIUS){let{iconData:n,fill:i,stroke:r}=sd.radius;t.attr("fill","none").selectAll("circle").data(n).enter().append("circle").classed("radius",!0).attr("role",ll.IMG).attr("aria-label","radius").attr("cx",t=>t.cx).attr("cy",t=>t.cy).attr("r",t=>t.r).style("fill",e.fill?e.fill:i).style("stroke",e.stroke?e.stroke:r)}else if(e.type===ec.LINE){let r=sd.line;t.select("line.line").empty()&&t.append("line").classed(`line-${n}`,!0).attr("role",ll.IMG).attr("aria-label","line").attr("x1",0).attr("y1",r.yPosition).attr("x2",i).attr("y2",r.yPosition).style("stroke",e.stroke?e.stroke:r.stroke).style("stroke-width",r.strokeWidth)}else if(e.type===ec.AREA)t.select("rect.area").empty()&&t.append("rect").classed(`area-${n}`,!0).attr("role",ll.IMG).attr("aria-label","area").attr("width",i).attr("height",r).style("fill",n>3&&!e.fill?sd.area.fill:e.fill).style("stroke",e.stroke);else if(e.type===ec.SIZE){let{iconData:n,fill:i,stroke:r}=sd.size;t.attr("fill","none").attr("role",ll.IMG).attr("aria-label","size").selectAll("rect").data(n).enter().append("rect").classed("size",!0).attr("width",t=>t.width).attr("height",t=>t.height).attr("y",()=>0).style("fill",e.fill?e.fill:i).style("stroke",e.stroke?e.stroke:r).style("stroke-width",1)}else if(e.type===ec.QUARTILE){let{iconData:e}=sd.quartile;t.selectAll("rect").attr("role",ll.IMG).attr("aria-label","quartile").data(e).enter().append("rect").attr("class",(t,e)=>`quartile-${0===e?"wrapper":"line"}`).attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height)}else if(e.type===ec.ZOOM){let{iconData:n,color:i}=sU(sd,"zoom"),r=t.attr("role",ll.IMG).attr("aria-label","zoom").selectAll("g.icon").data(n).enter();r.append("g").attr("x",t=>t.x).attr("y",t=>t.y).attr("width",t=>t.width).attr("height",t=>t.height).append("polygon").attr("points","7.7 4.82 5.78 4.82 5.78 2.89 4.82 2.89 4.82 4.82 2.89 4.82 2.89 5.78 4.82 5.78 4.82 7.7 5.78 7.7 5.78 5.78 7.7 5.78 7.7 4.82").attr("fill",()=>e.color?e.color:i),r.append("path").attr("d","M9.36,8.67A5.22,5.22,0,0,0,10.59,5.3,5.3,5.3,0,1,0,5.3,10.59,5.22,5.22,0,0,0,8.67,9.36L12.32,13l.68-.68Zm-4.06,1A4.34,4.34,0,1,1,9.63,5.3,4.33,4.33,0,0,1,5.3,9.63Z").attr("fill",()=>e.color?e.color:i)}}truncateLegendText(){let t=this.getComponentContainer(),e=sU(this.getOptions(),"legend","truncation"),n=sU(e,"type"),i=sU(e,"threshold"),r=sU(e,"numCharacter"),o=t.selectAll("div.legend-item p");o.attr("id",function(){return(this.parentNode.querySelector("div.checkbox")||this.parentNode).getAttribute("aria-labelledby")}),n!==tQ.NONE?o.html(function(t){let e=pI(t.name);return e.length>i&&e.length!==r?sN(e,n,r):e}):o.html(t=>pI(t.name))}addEventListeners(){let t=this,e=this.getComponentContainer(),n=sU(this.getOptions(),"legend"),i=sU(n,"truncation");e.selectAll("div.legend-item").on("mouseover",function(e){t.services.events.dispatchEvent(tW.Legend.ITEM_HOVER,{hoveredElement:lP(this)});let n=lP(this);n.select("div.checkbox").classed("hovered",!0);let r=n.datum();r.name.length>i.threshold&&i.numCharacter<r.name.length&&i.type!==tQ.NONE&&t.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})}).on("mousemove",function(e){lP(this).datum().name.length>i.threshold&&i.type!==tQ.NONE&&t.services.events.dispatchEvent(tW.Tooltip.MOVE,{event:e})}).on("click",function(){t.services.events.dispatchEvent(tW.Legend.ITEM_CLICK,{clickedElement:lP(this)});let e=lP(this).datum();t.model.toggleDataLabel(e.name)}).on("mouseout",function(){let e=lP(this);e.select("div.checkbox").classed("hovered",!1),e.datum().name.length>i.threshold&&i.type!==tQ.NONE&&t.services.events.dispatchEvent(tW.Tooltip.HIDE),t.services.events.dispatchEvent(tW.Legend.ITEM_MOUSEOUT,{hoveredElement:e})}),e.selectAll("div.legend-item div.checkbox").on("keyup",function(e){e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(tW.Legend.ITEM_HOVER,{hoveredElement:lP(this)})}),e.selectAll("div.legend-item div.checkbox").on("keydown",function(e,n){e.key&&" "===e.key?(e.preventDefault(),t.model.toggleDataLabel(n.name)):e.key&&"Tab"===e.key&&t.services.events.dispatchEvent(tW.Legend.ITEM_MOUSEOUT,{hoveredElement:lP(this)})}),e.selectAll("g.additional-item").on("mouseover",function(e){let n=lP(this),r=n.datum();r.name.length>i.threshold&&t.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:e,hoveredElement:n,content:r.name})})}}class p$ extends fG{constructor(t,e,n){super(t,e,n),this.type="chart-clip",this.renderType=tY.SVG,this.chartClipId="chart-clip-id-"+Math.floor(0x174876e7ff*Math.random()),this.init()}init(){this.model.set({chartClipId:this.chartClipId},{skipUpdate:!0})}render(t=!0){this.createClipPath()}createClipPath(){let t=this.parent,{cartesianScales:e}=this.services;if(!e)throw Error("Service cartesianScales was undefined");let n=e.getMainXScale(),i=e.getMainYScale(),[r,o]=n.range(),[a,s]=i.range();if(!t)throw Error("svg is undefined");this.chartClipPath=hv.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);let l=hv.appendOrSelect(this.chartClipPath,`rect.${this.type}`);o-r>0&&l.attr("x",r).attr("y",s).attr("width",o-r).attr("height",a-s),this.chartClipPath.merge(l).lower()}}class pz extends p${constructor(){super(...arguments),this.type="canvas-chart-clip",this.chartClipId="canvas-chart-clip-id-"+Math.floor(0x174876e7ff*Math.random())}createClipPath(){let t=this.parent,{width:e,height:n}=hv.getSVGElementSize(this.parent,{useAttrs:!0});this.chartClipPath=hv.appendOrSelect(t,`clipPath.${this.type}`).attr("id",this.chartClipId);let i=hv.appendOrSelect(this.chartClipPath,`rect.${this.type}`);i.attr("x",0).attr("y",0).attr("width",e).attr("height",n),this.chartClipPath.merge(i).lower()}}(td=tg||(tg={})).LEFT="left",td.RIGHT="right",td.TOP="top",td.BOTTOM="bottom";var pj=((tp={})[tg.LEFT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left-e.offsetWidth)}},tp[tg.RIGHT]=function(t,e,n){return{top:t.top-Math.round(e.offsetHeight/2)+Math.round(n.height/2),left:Math.round(t.left+n.width)}},tp[tg.TOP]=function(t,e,n){return{top:Math.round(t.top-e.offsetHeight),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},tp[tg.BOTTOM]=function(t,e,n){return{top:Math.round(t.top+n.height),left:t.left-Math.round(e.offsetWidth/2)+Math.round(n.width/2)}},tp),pG="u">typeof window?window:{innerHeight:0,innerWidth:0},pV=function(){function t(t){void 0===t&&(t={}),this.positions=pj,this.positions=Object.assign({},pj,t)}return t.prototype.getRelativeOffset=function(t){for(var e={left:t.offsetLeft,top:t.offsetTop};t.offsetParent&&"static"===getComputedStyle(t.offsetParent).position;)e.left+=t.offsetLeft,e.top+=t.offsetTop,t=t.offsetParent;return e},t.prototype.getAbsoluteOffset=function(t){for(var e=t,n={top:0,left:0};e.offsetParent;){var i=getComputedStyle(e.offsetParent);"static"===i.position&&i.marginLeft&&i.marginTop&&(parseInt(i.marginTop,10)&&(n.top+=parseInt(i.marginTop,10)),parseInt(i.marginLeft,10)&&(n.left+=parseInt(i.marginLeft,10))),e=e.offsetParent}var r=t.getBoundingClientRect(),o=document.body.getBoundingClientRect();return{top:r.top-o.top+n.top,left:r.left-o.left+n.left}},t.prototype.findRelative=function(t,e,n){var i=this.getRelativeOffset(t),r=t.getBoundingClientRect();return this.calculatePosition(i,r,e,n)},t.prototype.findAbsolute=function(t,e,n){var i=this.getAbsoluteOffset(t),r=t.getBoundingClientRect();return this.calculatePosition(i,r,e,n)},t.prototype.findPosition=function(t,e,n,i){void 0===i&&(i=this.getAbsoluteOffset.bind(this));var r=i(t),o=t.getBoundingClientRect();return this.calculatePosition(r,o,e,n)},t.prototype.findPositionAt=function(t,e,n){return this.calculatePosition(t,{top:0,left:0,height:0,width:0},e,n)},t.prototype.getPlacementBox=function(t,e){var n=t.offsetHeight+e.top,i=t.offsetWidth+e.left;return{top:e.top,bottom:n,left:e.left,right:i}},t.prototype.addOffset=function(t,e,n){return void 0===e&&(e=0),void 0===n&&(n=0),Object.assign({},t,{top:t.top+e,left:t.left+n})},t.prototype.setElement=function(t,e){t.style.top=e.top+"px",t.style.left=e.left+"px"},t.prototype.findBestPlacement=function(t,e,n,i,r){var o=this;void 0===i&&(i=this.defaultContainerFunction.bind(this)),void 0===r&&(r=this.findPosition.bind(this));var a=n.map(function(n){var a=r(t,e,n),s=o.getPlacementBox(e,a),l=0,c=0,u=i();s.top<u.top?l=u.top-s.top:s.bottom>u.height&&(l=s.bottom-u.height),s.left<u.left?c=u.left-s.left:s.right>u.width&&(c=s.right-u.width),l&&!c?c=1:c&&!l&&(l=1);var h=e.offsetHeight*e.offsetWidth;return{placement:n,weight:(h-l*c)/h}});return a.sort(function(t,e){return e.weight-t.weight}),a[0].placement},t.prototype.findBestPlacementAt=function(t,e,n,i){var r=this;return void 0===i&&(i=this.defaultContainerFunction.bind(this)),this.findBestPlacement(null,e,n,i,function(e,n,i){return r.findPositionAt(t,n,i)})},t.prototype.defaultContainerFunction=function(){return{top:0,left:0,height:pG.innerHeight,width:pG.innerWidth}},t.prototype.calculatePosition=function(t,e,n,i){return this.positions[i]?this.positions[i](t,n,e):(console.error("No function found for placement, defaulting to 0,0"),{left:0,top:0})},t}();new pV;class pW extends fG{constructor(t,e,n){super(t,e,n),this.type="tooltip",this.renderType=tY.HTML,this.isEventListenerAdded=!1,this.lastTriggeredEventType="",this.positionService=new pV,this.handleShowTooltip=t=>{let e,n=t.detail.data||t.detail.items,i=lP(t.detail.event.target).datum(),r=this.formatItems(this.getItems(t));e=t.detail.content?`<div class="title-tooltip"><p>${pR(t.detail.content)}</p></div>`:pR(this.getTooltipHTML(r));let o=hv.appendOrSelect(this.tooltip,"div.content-box");if(sU(this.getOptions(),"tooltip","customHTML"))if(t.detail.content){let e=`<div class="title-tooltip"><p>${pR(t.detail.content)}</p></div>`;o.html(e)}else o.html(`<div class="title-tooltip"><p>${pR(this.model.getOptions().tooltip.customHTML(n,e,i))}</p></div>`);else o.html(e);o.selectAll(".datapoint-tooltip").each(function(t,e){let n=r[e];r[e]&&r[e].color&&lP(this).select(".tooltip-color").attr("class","tooltip-color").style("background-color",n.color)}),this.positionTooltip(t),this.tooltip.classed("hidden",!1).attr("aria-hidden",!1),this.lastTriggeredEventType=t.type},this.handleHideTooltip=()=>{this.tooltip.classed("hidden",!0).attr("aria-hidden",!0)},this.init()}addTooltipEventListener(){this.services.events.addEventListener(tW.Tooltip.MOVE,t=>{this.lastTriggeredEventType!==tW.Toolbar.SHOW_TOOLTIP&&!1===this.tooltip.classed("hidden")&&this.positionTooltip(t)}),this.services.events.addEventListener(tW.Tooltip.SHOW,this.handleShowTooltip),this.services.events.addEventListener(tW.Tooltip.HIDE,this.handleHideTooltip),this.services.events.addEventListener(tW.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.addEventListener(tW.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.addEventListener(tW.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}removeTooltipEventListener(){this.services.events.removeEventListener(tW.Tooltip.MOVE,null),this.services.events.removeEventListener(tW.Tooltip.SHOW,this.handleShowTooltip),this.services.events.removeEventListener(tW.Tooltip.HIDE,this.handleHideTooltip),this.services.events.removeEventListener(tW.Chart.MOUSEOUT,this.handleHideTooltip),this.services.events.removeEventListener(tW.Toolbar.SHOW_TOOLTIP,this.handleShowTooltip),this.services.events.removeEventListener(tW.Toolbar.HIDE_TOOLTIP,this.handleHideTooltip)}getItems(t){return t.detail.items?t.detail.items:[]}formatItems(t){let e=this.getOptions(),n=sU(e,"tooltip","truncation","type"),i=sU(e,"tooltip","truncation","threshold"),r=sU(e,"tooltip","truncation","numCharacter");return n!==tQ.NONE?t.map(t=>{let e=12*!!t.labelIcon;return t.value=this.valueFormatter(t.value,t.label),t.label&&t.label.length+e>i&&(t.label=sN(t.label,n,r)),t.value&&t.value.length>i&&(t.value=sN(t.value,n,r)),t}):t.map(t=>(t.value=this.valueFormatter(t.value,t.label),t))}getTooltipHTML(t){return'<ul class="multi-tooltip">'+t.map(t=>`<li>
54
- <div class="datapoint-tooltip${t.bold?" bold":""}">
55
- ${t.class||t.color?`<div class="tooltip-color ${t.class}"></div>`:""}
56
- <div class="label">
57
- <p>${t.label||""}</p>
58
- ${t.labelIcon?`<span class="label-icon"/>${t.labelIcon}</span>`:""}
59
- </div>
60
- ${void 0===t.value||null===t.value?"":`<p class="value"/>${t.value}</p>`}
61
- </div>
62
- </li>`).join("")+"</ul>"}isDate(t){return t instanceof Date}valueFormatter(t,e){let n=this.getOptions(),i=sU(n,"tooltip","valueFormatter"),{code:r,number:o,date:a}=sU(n,"locale");if(i)return i(t,e);if(this.isDate(t))return a(t,r,{month:"short",day:"numeric",year:"numeric"});try{if("string"==typeof t&&/\d{4}-\d{2}-\d{2}T\d{2}:\d{2}:\d{2}.\d{3}Z/.test(t)){let e=new Date(t);return a(e,r,{month:"short",day:"numeric",year:"numeric"})}}catch{}return o(t,r)}render(t=!1){let e=this.getOptions(),n=sU(e,"tooltip","enabled");if(n){let t=lP(this.services.domUtils.getHolder()),n=sU(e,"style","prefix");this.tooltip=hv.appendOrSelect(t,`div.cds--${n}--tooltip`),this.tooltip.style("max-width",null).attr("role","tooltip"),this.isEventListenerAdded||(this.addTooltipEventListener(),this.isEventListenerAdded=!0),this.tooltip.classed("hidden",!0)}else!n&&this.isEventListenerAdded&&(this.removeTooltipEventListener(),this.isEventListenerAdded=!1)}addOffsetByPlacement(t,e,n){let i=Object.assign({},t);return e==tg.LEFT?i.left-=n:e==tg.RIGHT?i.left+=n:e==tg.TOP?i.top-=n:e==tg.BOTTOM&&(i.top+=n),i}positionTooltip(t){let e=this.services.domUtils.getHolder(),n=e.offsetWidth,i=e.offsetHeight,r=this.tooltip.node(),o=this.getOptions(),a=sU(o,"zoomBar","top","enabled"),s=!!sU(t,"detail","noWrap"),l=Array.isArray(sU(t,"detail","placements")),c=l?sU(t,"detail","placements"):[tg.RIGHT,tg.LEFT,tg.TOP,tg.BOTTOM],u,{horizontalOffset:h}=sp,{defaultOffset:d}=sp;if(this.tooltip.select("div.title-tooltip").classed("title-tooltip-nowrap",s),l){let e=sU(t,"detail","event","target"),o=this.services.domUtils.getElementOffset(e,!0);u=this.positionService.findBestPlacementAt(o,r,c,()=>({top:0,left:0,width:n,height:i}));let a=this.positionService.findPosition(e,r,u,()=>this.services.domUtils.getElementOffset(e));a=this.addOffsetByPlacement(a,u,d),this.positionService.setElement(r,a);return}let f=sU(t,"detail","mousePosition");if(f){let t=sm[sU(o,"zoomBar","top","type")];a&&(f[1]+=t+8)}else f=o_(sU(t,"detail","event"),e);(u=f[0]/n>.9?tg.LEFT:f[0]/n<.1?tg.RIGHT:this.positionService.findBestPlacementAt({left:f[0],top:f[1]},r,c,()=>({top:void 0,left:void 0,width:n,height:i})))===tg.LEFT&&(h*=-1);let p=this.positionService.findPositionAt({left:f[0]+h,top:f[1]},r,u);this.positionService.setElement(r,p)}}let pY=class t extends fG{constructor(){super(...arguments),this.type="grid-brush",this.renderType=tY.SVG,this.selectionSelector="rect.selection",this.frontSelectionSelector="rect.frontSelection"}render(e=!0){let n=this.parent,i=this.getComponentContainer({isPresentational:!0});if(!n)throw Error("SVG was not defined");let r=hv.appendOrSelect(n,"svg.chart-grid-backdrop"),o=hv.appendOrSelect(r,`g.${this.type}`),a=hv.appendOrSelect(o,this.selectionSelector),{width:s,height:l}=hv.getSVGElementSize(r,{useAttrs:!0}),{cartesianScales:c}=this.services,u=c.getMainXScaleType(),h=c.getMainXScale(),[d]=h.range();i.attr("transform",`translate(${d},0)`);let f=hv.appendOrSelect(i,this.frontSelectionSelector);if(h&&u===t0.TIME){let e,n=this.model.get("zoomDomain");void 0===n&&(n=this.services.zoom.getDefaultZoomBarDomain())&&this.model.set({zoomDomain:n},{animate:!1});let i=(t,e)=>{let i=uy().range([0,s]).domain(n),r=[i.invert(t),i.invert(e)];r[0].valueOf()===r[1].valueOf()&&(r=this.services.zoom.getDefaultZoomBarDomain()),(n[0].valueOf()!==r[0].valueOf()||n[1].valueOf()!==r[1].valueOf())&&this.services.zoom.handleDomainChange(r)};0!=l&&0!=s&&(e=dE(du).extent([[0,0],[s-1,l]]).on("start brush end",e=>{let n=e.selection;null===n||n[0]===n[1]||(f.attr("x",parseFloat(a.attr("x"))+parseFloat(r.attr("x"))).attr("y",a.attr("y")).attr("width",a.attr("width")).attr("height",a.attr("height")).style("cursor","pointer").style("display",null),(e=>{let n=e[1]-e[0],i="0,"+n.toString(),r=Math.floor(l/t.DASH_LENGTH),o=r*t.DASH_LENGTH;for(let e=0;e<r;e++)i+=","+t.DASH_LENGTH;i+=","+(l-o),r%2==1&&(i+=",0"),i+=","+n.toString()+","+l.toString(),f.attr("stroke-dasharray",i)})(n))}).on("end.brushed",t=>{let n=t.selection;null!==n&&(i(n[0],n[1]),o.call(e.move,null),f.style("display","none"))}),o.call(e));let c=this.services.zoom.getZoomRatio();r.on("click",function(t){if(t.shiftKey){let t=this.services.domUtils.getHolder(),e=o_(o.node(),t)[0],n=e-s*c/2;n<0&&(n=0);let r=e+s*c/2;r>s&&(r=s),i(n,r)}})}}};pY.DASH_LENGTH=4;class pZ extends fG{constructor(){super(...arguments),this.type="zoom-bar",this.renderType=tY.SVG,this.MIN_SELECTION_DIFF=9e-10,this.brushSelector="g.zoom-bar-brush",this.clipId="zoomBarClip-"+Math.floor(0x174876e7ff*Math.random()),this.brush=dE(du),this.highlightStrokeWidth=1}init(){this.services.events.addEventListener(tW.ZoomBar.UPDATE,this.render.bind(this));let t=sU(this.getOptions(),"zoomBar",tq.TOP,"data");this.model.setZoomBarData(t)}render(t=!0){let e=this.getComponentContainer({ariaLabel:"zoom bar"}),n=this.services.zoom.isZoomBarLoading(tq.TOP),i=this.services.zoom.isZoomBarLocked(tq.TOP),r=sU(this.getOptions(),"zoomBar",tq.TOP,"type"),o=sU(this.getOptions(),"axes",tq.BOTTOM,"highlights"),a=sm[r],{width:s}=hv.getSVGElementSize(this.parent,{useAttrs:!0});if(0===s)return;let l=0,c=this.model.get("axesMargins");c&&c.left&&(l=c.left);let u=hv.appendOrSelect(e,"svg.zoom-container").attr("width","100%").attr("height",a).attr("opacity",1).attr("role","presentation");if(hv.appendOrSelect(e,"rect.zoom-spacer").attr("x",0).attr("y",a).attr("width","100%").attr("height",8).attr("opacity",1).attr("fill","none"),r===tK.GRAPH_VIEW?hv.appendOrSelect(u,"rect.zoom-bg").attr("x",l).attr("y",0).attr("width",s-l).attr("height","100%").classed("zoom-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null):r===tK.SLIDER_VIEW&&hv.appendOrSelect(u,"rect.zoom-slider-bg").attr("x",l).attr("y",a/2-1).attr("width",s-l).attr("height",2).classed("zoom-slider-bg-skeleton",n).style("stroke",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null),n)return void this.renderSkeleton(u,l,s);let{cartesianScales:h}=this.services,d=h.getMainXScale(),f=h.getMainYScale(),p=h.getMainXScaleType();if(d&&p===t0.TIME){let t=this.services.zoom.getZoomBarData();if(function(t){if(null==t)return!0;if(ng(t)&&(ej(t)||"string"==typeof t||"function"==typeof t.splice||nO(t)||nI(t)||nE(t)))return!t.length;var e=i$(t);if("[object Map]"==e||"[object Set]"==e)return!t.size;if(ny(t))return!nH(t).length;for(var n in t)if(rm.call(t,n))return!1;return!0}(t)||1===t.length)return;this.xScale=d.copy(),this.yScale=f.copy();let n=this.services.zoom.getDefaultZoomBarDomain(t);t=this.compensateDataForDefaultDomain(t,n);let c=this.model.get("initialZoomDomain"),h=sU(this.getOptions(),"zoomBar",tq.TOP,"initialZoomDomain");h&&h[0]&&h[1]&&(h[0]=new Date(h[0]),h[1]=new Date(h[1])),h&&!(c&&c[0].valueOf()===h[0].valueOf()&&c[1].valueOf()===h[1].valueOf())?this.model.set({initialZoomDomain:ry([],h),zoomDomain:h?ry([],h):n},{skipUpdate:!0}):null===h&&null!==c&&this.model.set({initialZoomDomain:null,zoomDomain:ry([],n)},{skipUpdate:!0}),this.xScale.range([l,s]).domain(n),this.maxSelectionRange=this.xScale.range(),this.yScale.range([0,a-6]).domain(rM(t,t=>t.value));let p=this.model.get("zoomDomain");if(r===tK.GRAPH_VIEW&&(this.renderZoomBarArea(u,"path.zoom-graph-area-unselected",t,null),this.updateClipPath(e,this.clipId,0,0,0,0),this.renderZoomBarArea(u,"path.zoom-graph-area",t,this.clipId),this.renderZoomBarBaseline(u,l,s),o)){let t=o.highlightStartMapsTo,e=o.highlightEndMapsTo,n=o.color,i=o.labelMapsTo;o.data.forEach((r,o)=>{hv.appendOrSelect(u,`rect.highlight-${o}`).attr("height",a-2*this.highlightStrokeWidth).attr("y",this.highlightStrokeWidth).attr("x",this.xScale(r[t])).attr("width",this.xScale(r[e])-this.xScale(r[t])).style("fill",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("fill-opacity",.1).style("stroke",n&&n.scale[r[i]]?n.scale[r[i]]:null).style("stroke-dasharray","2, 2").attr("stroke-width","1px")})}this.addBrushEventListener(p,l,s);let g=hv.appendOrSelect(e,this.brushSelector).call(this.brush);if(void 0!==p)if(p[0].valueOf()===p[1].valueOf())g.call(this.brush.move,this.xScale.range()),this.updateBrushHandle(this.getComponentContainer(),this.xScale.range());else{let t=p.map(t=>this.xScale(t));t[1]-t[0]<this.MIN_SELECTION_DIFF||(g.call(this.brush.move,t),this.updateBrushHandle(this.getComponentContainer(),t))}i&&(this.brush.filter(()=>!1),g.selectAll("rect").attr("cursor","auto"))}}addBrushEventListener(t,e,n){let i=e=>{let n=e.selection;null===n?this.handleBrushedEvent(e,t,this.xScale,this.xScale.range()):n[0]===n[1]||this.handleBrushedEvent(e,t,this.xScale,n)},r=sm[sU(this.getOptions(),"zoomBar",tq.TOP,"type")];this.brush.extent([[e,0],[n,r]]).on("start brush end",null).on("start brush end",i)}handleBrushedEvent(t,e,n,i){let r=[n.invert(i[0]),n.invert(i[1])];if(this.updateBrushHandle(this.getComponentContainer(),i),null!=t.sourceEvent&&("mousemove"===t.sourceEvent.type||"mouseup"===t.sourceEvent.type||"mousedown"===t.sourceEvent.type||"touchstart"===t.sourceEvent.type||"touchmove"===t.sourceEvent.type||"touchend"===t.sourceEvent.type)){let n;(void 0===e||e[0]!==r[0]||e[1]!==r[1])&&this.services.zoom.handleDomainChange(r,{dispatchEvent:!1}),"start"===t.type?n=tW.ZoomBar.SELECTION_START:"brush"===t.type?n=tW.ZoomBar.SELECTION_IN_PROGRESS:"end"===t.type&&(n=tW.ZoomBar.SELECTION_END,this.services.events.dispatchEvent(tW.ZoomDomain.CHANGE,{newDomain:r})),this.services.events.dispatchEvent(n,{selection:i,newDomain:r})}}updateBrushHandle(t,e){let n=this,i=sU(this.getOptions(),"zoomBar",tq.TOP,"type"),r=sm[i],o=-2.5,a=i===tK.GRAPH_VIEW?12:6,s=-.5,l=(r-a)/2;t.select(this.brushSelector).selectAll("rect.handle").data([{type:"w"},{type:"e"}]).attr("x",function(t){return"w"===t.type?Math.max(e[0]+o,n.maxSelectionRange[0]):"e"===t.type?Math.min(e[1]+o,n.maxSelectionRange[1]-5):void 0}).attr("y",0).attr("width",5).attr("height",r).attr("cursor","ew-resize").style("display",null);let c=t.select(this.brushSelector).selectAll("rect.handle-bar").data([{type:"w"},{type:"e"}]);c.enter().append("rect").attr("class",function(t){return"handle-bar handle-bar--"+t.type}),c.attr("x",function(t){return"w"===t.type?Math.max(e[0]+s,n.maxSelectionRange[0]-o+s):"e"===t.type?Math.min(e[1]+s,n.maxSelectionRange[1]+o+s):void 0}).attr("y",l).attr("width",1).attr("height",a).attr("cursor","ew-resize"),i===tK.SLIDER_VIEW&&this.updateSliderSelectedArea(e),this.updateClipPath(t,this.clipId,e[0],0,e[1]-e[0],r)}updateSliderSelectedArea(t){let e=sm[sU(this.getOptions(),"zoomBar",tq.TOP,"type")],n=this.getComponentContainer().select("svg.zoom-container");hv.appendOrSelect(n,"rect.zoom-slider-selected-area").attr("x",t[0]).attr("y",e/2-1).attr("width",t[1]-t[0]).attr("height",2)}renderZoomBarArea(t,e,n,i){let{cartesianScales:r}=this.services,o=r.getMainXAxisPosition(),a=r.getMainYAxisPosition(),s=r.getMainXScaleType(),l=r.getMainYScaleType(),c=(t,e,n)=>i=>r.getValueFromScale(t,e,n,i),u=c(this.xScale,s,o),h=c(this.yScale,l,a),d=sm[sU(this.getOptions(),"zoomBar",tq.TOP,"type")],f=(function(t,e,n){var i=null,r=lu(!0),o=null,a=uk,s=null,l=fR(c);function c(c){var u,h,d,f,p,g=(c=lh(c)).length,m=!1,y=Array(g),v=Array(g);for(null==o&&(s=a(p=l())),u=0;u<=g;++u){if(!(u<g&&r(f=c[u],u,c))===m)if(m=!m)h=u,s.areaStart(),s.lineStart();else{for(s.lineEnd(),s.lineStart(),d=u-1;d>=h;--d)s.point(y[d],v[d]);s.lineEnd(),s.areaEnd()}m&&(y[u]=+t(f,u,c),v[u]=+e(f,u,c),s.point(i?+i(f,u,c):y[u],n?+n(f,u,c):v[u]))}if(p)return s=null,p+""||null}function u(){return fz().defined(r).curve(a).context(o)}return t="function"==typeof t?t:void 0===t?fH:lu(+t),e="function"==typeof e?e:lu(void 0===e?0:+e),n="function"==typeof n?n:void 0===n?f$:lu(+n),c.x=function(e){return arguments.length?(t="function"==typeof e?e:lu(+e),i=null,c):t},c.x0=function(e){return arguments.length?(t="function"==typeof e?e:lu(+e),c):t},c.x1=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:lu(+t),c):i},c.y=function(t){return arguments.length?(e="function"==typeof t?t:lu(+t),n=null,c):e},c.y0=function(t){return arguments.length?(e="function"==typeof t?t:lu(+t),c):e},c.y1=function(t){return arguments.length?(n=null==t?null:"function"==typeof t?t:lu(+t),c):n},c.lineX0=c.lineY0=function(){return u().x(t).y(e)},c.lineY1=function(){return u().x(t).y(n)},c.lineX1=function(){return u().x(i).y(e)},c.defined=function(t){return arguments.length?(r="function"==typeof t?t:lu(!!t),c):r},c.curve=function(t){return arguments.length?(a=t,null!=o&&(s=a(o)),c):a},c.context=function(t){return arguments.length?(null==t?o=s=null:s=a(o=t),c):o},c})().x(t=>u(t)).y0(d).y1(t=>d-h(t)),p=hv.appendOrSelect(t,e).datum(n).attr("d",f);i&&p.attr("clip-path",`url(#${i})`)}updateClipPath(t,e,n,i,r,o){let a=hv.appendOrSelect(t,"clipPath").attr("id",e);hv.appendOrSelect(a,"rect").attr("x",n).attr("y",i).attr("width",r).attr("height",o)}compensateDataForDefaultDomain(t,e){if(!t||t.length<2)return;let n=i5(t,5),i=this.services.cartesianScales.getDomainIdentifier(),r=this.services.cartesianScales.getRangeIdentifier();if(Number(e[0])<Number(n[0][i])){let t={};t[i]=e[0],t[r]=0,n.unshift(t)}if(Number(e[1])>Number(n[n.length-1][i])){let t={};t[i]=e[1],t[r]=0,n.push(t)}return n}renderZoomBarBaseline(t,e,n,i=!1){let r=sm[sU(this.model.getOptions(),"zoomBar",tq.TOP,"type")],o=fz()([[e,r],[n,r]]);hv.appendOrSelect(t,"path.zoom-bg-baseline").attr("d",o).classed("zoom-bg-baseline-skeleton",i).style("stroke",i?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}renderSkeleton(t,e,n){this.renderZoomBarArea(t,"path.zoom-graph-area-unselected",[],null),this.renderZoomBarArea(t,"path.zoom-graph-area",[],this.clipId),this.brush.on("start brush end",null),hv.appendOrSelect(this.getComponentContainer(),this.brushSelector).html(null),sU(this.getOptions(),"zoomBar",tq.TOP,"type")===tK.GRAPH_VIEW&&this.renderZoomBarBaseline(t,e,n,!0)}destroy(){this.brush.on("start brush end",null),this.services.events.removeEventListener(tW.ZoomBar.UPDATE,this.render.bind(this))}}class pX extends fG{constructor(t,e){super(t,e),this.type="threshold",this.renderType=tY.SVG,this.positionService=new pV}render(t=!1){let e=sU(this.getOptions(),"axes"),n=[];Object.keys(e).forEach(t=>{if(Object.values(tq).includes(t)){let i=e[t];i.thresholds&&i.thresholds.length>0&&n.push({axisPosition:t,thresholds:i.thresholds,correspondingDatasets:i?.correspondingDatasets,mapsTo:i?.mapsTo})}});let i=this.getComponentContainer({ariaLabel:"threshold lines",withinChartClip:!0}).selectAll("g.axis-thresholds").data(n,t=>t.axisPosition);i.exit().attr("opacity",0).remove();let r=i.enter().append("g").merge(i);r.attr("class",t=>`axis-thresholds ${t.axisPosition}`);let o=r.selectAll("g.threshold-group").data(t=>t.thresholds.map(e=>(e.axisPosition=t.axisPosition,e.datum=this.constructDatumObj(t,e),e)));o.exit().attr("opacity",0).remove();let a=o.enter().append("g");a.append("line").attr("class","threshold-line"),a.append("rect").attr("class","threshold-hoverable-area"),a.merge(o).attr("class","threshold-group");let s=this;r.each(function({axisPosition:e}){let n=s.services.cartesianScales.getScaleByPosition(e),i=s.services.cartesianScales.getScaleTypeByPosition(e),r=null,o=null;e===tq.LEFT||e===tq.RIGHT?(o=n,r=s.services.cartesianScales.getMainXScale()):(r=n,o=s.services.cartesianScales.getMainYScale());let a=i===t0.LABELS,[l,c]=r.range(),[u,h]=o.range(),{cartesianScales:d}=s.services,[f,p]=sF(t=>d.getDomainValue(t),t=>d.getRangeValue(t),d.getOrientation()),g=lP(this);e===tq.TOP||e===tq.BOTTOM?(g.selectAll("line.threshold-line").transition().call(e=>s.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})).attr("y1",h).attr("y2",u).attr("x1",({datum:t})=>f(t)+(a?n.step()/2:0)).attr("x2",({datum:t})=>f(t)+(a?n.step()/2:0)).style("stroke",({fillColor:t})=>t),g.selectAll("rect.threshold-hoverable-area").attr("x",0).attr("y",({datum:t})=>-f(t)).attr("width",Math.abs(u-h)).classed("rotate",!0)):(g.selectAll("line.threshold-line").transition().call(e=>s.services.transitions.setupTransition({transition:e,name:"threshold-line-update",animate:t})).attr("x1",l).attr("x2",c).attr("y1",({datum:t})=>p(t)+(a?n.step()/2:0)).attr("y2",({datum:t})=>p(t)+(a?n.step()/2:0)).style("stroke",({fillColor:t})=>t),g.selectAll("rect.threshold-hoverable-area").attr("x",l).attr("y",({datum:t})=>p(t)).attr("width",Math.abs(c-l)).classed("rotate",!1))}),this.services.events.addEventListener(tW.Threshold.SHOW,t=>{this.setThresholdLabelPosition(t.detail),this.label.classed("hidden",!1)}),this.services.events.addEventListener(tW.Threshold.HIDE,()=>{this.label.classed("hidden",!0)}),this.appendThresholdLabel(),this.addEventListeners()}getFormattedValue(t){let{value:e,axisPosition:n}=t,i=this.getOptions(),r=this.services.cartesianScales.getScaleTypeByPosition(n),{code:o,number:a}=sU(i,"locale");if(r===t0.TIME){let t=[tq.LEFT,tq.RIGHT].includes(n),r=this.services.cartesianScales.getMainXScale(),o=this.services.cartesianScales.getMainYScale(),a=t?o:r,s=sU(i,"timeScale"),l=lr(a.ticks(),sU(s,"timeInterval"));return ln(e,0,a.ticks(),l,s,i.locale)}return a(e,o)}appendThresholdLabel(){let t=lP(this.services.domUtils.getHolder()),e=sU(this.getOptions(),"style","prefix");this.label=hv.appendOrSelect(t,`div.cds--${e}--threshold--label`).classed("hidden",!0)}setThresholdLabelPosition({event:t,datum:e}){let n=this.services.domUtils.getHolder(),i=o_(t,n),r=e.valueFormatter?e.valueFormatter(e.value):this.getFormattedValue(e);this.label.html(pI(`${e.label||"Threshold"}: ${r}`)).style("background-color",e.fillColor);let o=this.label.node(),a=this.positionService.findBestPlacementAt({left:i[0],top:i[1]},o,[tg.RIGHT,tg.LEFT,tg.TOP,tg.BOTTOM],()=>({top:void 0,left:void 0,width:n.offsetWidth,height:n.offsetHeight})),s=this.positionService.findPositionAt({left:i[0],top:i[1]},o,a);this.positionService.setElement(o,s)}constructDatumObj(t,e){let n={};return t.correspondingDatasets&&(n.group=sU(t,"correspondingDatasets",0)),n[t.mapsTo]=e.value,n}addEventListeners(){let t=this;this.getComponentContainer({withinChartClip:!0}).selectAll("rect.threshold-hoverable-area").on("mouseover mousemove",function(e){lP(this.parentNode).select("line.threshold-line").classed("active",!0),t.services.events.dispatchEvent(tW.Threshold.SHOW,{event:e,hoveredElement:lP(this),datum:lP(this).datum()})}).on("mouseout",function(e){lP(this.parentNode).select("line.threshold-line").classed("active",!1),t.services.events.dispatchEvent(tW.Threshold.HIDE,{event:e,hoveredElement:lP(this),datum:lP(this).datum()})})}}class pq extends fG{constructor(t,e){super(t,e),this.type="highlight",this.renderType=tY.SVG,this.positionService=new pV,this.highlightStrokeWidth=1}render(t=!1){let e=sU(this.getOptions(),"axes"),n=[];Object.keys(e).forEach(t=>{if(Object.values(tq).includes(t)){let i=e[t];i.highlights&&i.highlights.data.length>0&&n.push({axisPosition:t,highlightStartMapsTo:i.highlights.highlightStartMapsTo,highlightEndMapsTo:i.highlights.highlightEndMapsTo,labelMapsTo:i.highlights.labelMapsTo,highlight:i.highlights.data,color:i.highlights.color})}});let i=this.getComponentContainer({ariaLabel:"highlight areas",withinChartClip:!0}).selectAll("g.axis-highlight").data(n,t=>t.axisPosition);i.exit().attr("opacity",0).remove();let r=i.enter().append("g").merge(i);r.attr("class",t=>`axis-highlight ${t.axisPosition}`);let o=r.selectAll("g.highlight-group").data(t=>t.highlight.map(e=>(e.axisPosition=t.axisPosition,e.highlightStartMapsTo=t.highlightStartMapsTo,e.labelMapsTo=t.labelMapsTo,e.color=t.color,e.highlightEndMapsTo=t.highlightEndMapsTo,e)));o.exit().attr("opacity",0).remove();let a=o.enter().append("g");a.append("rect").attr("class","highlight-bar"),a.append("line").attr("class","highlight-line"),a.merge(o).attr("class","highlight-group");let s=this;r.each(function({axisPosition:e}){let n=s.services.cartesianScales.getMainXScale(),i=s.services.cartesianScales.getMainYScale(),[r,o]=n.range(),[a,l]=i.range(),{cartesianScales:c}=s.services,[u,h]=sF(t=>c.getDomainValue(t),t=>c.getRangeValue(t),c.getOrientation()),d=lP(this);e===tq.TOP||e===tq.BOTTOM?d.selectAll("rect.highlight-bar").transition().call(e=>s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})).attr("y",Math.max(l+s.highlightStrokeWidth,0)).attr("height",Math.max(a-2*s.highlightStrokeWidth,0)).attr("x",({highlightStartMapsTo:t,...e})=>u(e[t])).attr("width",({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(u(n[e])-u(n[t]),0)).style("stroke",({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null):d.selectAll("rect.highlight-bar").transition().call(e=>s.services.transitions.setupTransition({transition:e,name:"highlight-bar-update",animate:t})).attr("x",r).attr("width",Math.max(o-r,0)).attr("y",({highlightEndMapsTo:t,...e})=>h(e[t])).attr("height",({highlightStartMapsTo:t,highlightEndMapsTo:e,...n})=>Math.max(h(n[t])-h(n[e]),0)).style("stroke",({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null).style("stroke-dasharray","2, 2").attr("stroke-width",s.highlightStrokeWidth+"px").style("fill-opacity",.1).style("fill",({color:t,labelMapsTo:e,...n})=>t&&t.scale[n[e]]?t.scale[n[e]]:null)})}}class pK extends pW{getItems(t){let e;if(t.detail.items)return t.detail.items;let{data:n}=t.detail;if(!n||!n.length||!n[0])return[];let i=this.getOptions(),{cartesianScales:r}=this.services,o=r.getDomainIdentifier(),a=r.isDualAxes(),{groupMapsTo:s}=i.data,l=r.getDomainLabel(),c=r.getRangeLabel(),u=n[0][o];if(1===n.length){let o=n[0],h=r.getRangeIdentifier(o);if(a){let t=r.getRangeAxisPosition({datum:o,groups:[o[s]]});c=r.getScaleLabel(t)}let d=o[h];e=[{label:l,value:u},...Array.isArray(d)&&2===d.length?[{label:"Start",value:d[0]},{label:"End",value:d[1]}]:[{label:c,value:o[h]}]],t.detail.additionalItems&&t.detail.additionalItems.forEach(t=>e.push({label:t.label,value:t.value})),e.push({label:ie(i,"locale.translations.group")||ie(i,"tooltip.groupLabel"),value:o[s],color:this.model.getFillColor(o[s]),class:this.model.getColorClassName({classNameTypes:[tX.TOOLTIP],dataGroupName:o[s]})})}else if(n.length>1&&(e=(e=[{label:l,value:u}]).concat(n.map(t=>{let e=t[r.getRangeIdentifier(t)];return{label:t[s],value:Array.isArray(e)&&2===e.length?`${e[0]} - ${e[1]}`:e,color:this.model.getFillColor(t[s]),class:this.model.getColorClassName({classNameTypes:[tX.TOOLTIP],dataGroupName:t[s]})}}).sort((t,e)=>e.value-t.value)),!a&&!0===sU(i,"tooltip","showTotal"))){let t=r.getRangeIdentifier();e.push({label:ie(i,"locale.translations.total")||ie(i,"tooltip.totalLabel")||"Total",value:n.reduce((e,n)=>e+n[t],0),bold:!0})}return e}}var pQ=Math.PI,pJ=2*pQ,p0=pJ-1e-6;function p1(){this._x0=this._y0=this._x1=this._y1=null,this._=""}p1.prototype=(function(){return new p1}).prototype={constructor:p1,moveTo:function(t,e){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)},closePath:function(){null!==this._x1&&(this._x1=this._x0,this._y1=this._y0,this._+="Z")},lineTo:function(t,e){this._+="L"+(this._x1=+t)+","+(this._y1=+e)},quadraticCurveTo:function(t,e,n,i){this._+="Q"+ +t+","+ +e+","+(this._x1=+n)+","+(this._y1=+i)},bezierCurveTo:function(t,e,n,i,r,o){this._+="C"+ +t+","+ +e+","+ +n+","+ +i+","+(this._x1=+r)+","+(this._y1=+o)},arcTo:function(t,e,n,i,r){t*=1,e*=1,n*=1,i*=1,r*=1;var o=this._x1,a=this._y1,s=n-t,l=i-e,c=o-t,u=a-e,h=c*c+u*u;if(r<0)throw Error("negative radius: "+r);if(null===this._x1)this._+="M"+(this._x1=t)+","+(this._y1=e);else if(h>1e-6)if(Math.abs(u*s-l*c)>1e-6&&r){var d=n-o,f=i-a,p=s*s+l*l,g=Math.sqrt(p),m=Math.sqrt(h),y=r*Math.tan((pQ-Math.acos((p+h-(d*d+f*f))/(2*g*m)))/2),v=y/m,_=y/g;Math.abs(v-1)>1e-6&&(this._+="L"+(t+v*c)+","+(e+v*u)),this._+="A"+r+","+r+",0,0,"+ +(u*d>c*f)+","+(this._x1=t+_*s)+","+(this._y1=e+_*l)}else this._+="L"+(this._x1=t)+","+(this._y1=e)},arc:function(t,e,n,i,r,o){t*=1,e*=1,n*=1,o=!!o;var a=n*Math.cos(i),s=n*Math.sin(i),l=t+a,c=e+s,u=1^o,h=o?i-r:r-i;if(n<0)throw Error("negative radius: "+n);null===this._x1?this._+="M"+l+","+c:(Math.abs(this._x1-l)>1e-6||Math.abs(this._y1-c)>1e-6)&&(this._+="L"+l+","+c),n&&(h<0&&(h=h%pJ+pJ),h>p0?this._+="A"+n+","+n+",0,1,"+u+","+(t-a)+","+(e-s)+"A"+n+","+n+",0,1,"+u+","+(this._x1=l)+","+(this._y1=c):h>1e-6&&(this._+="A"+n+","+n+",0,"+ +(h>=pQ)+","+u+","+(this._x1=t+n*Math.cos(r))+","+(this._y1=e+n*Math.sin(r))))},rect:function(t,e,n,i){this._+="M"+(this._x0=this._x1=+t)+","+(this._y0=this._y1=+e)+"h"+ +n+"v"+ +i+"h"+-n+"Z"},toString:function(){return this._}},Array.prototype.slice;class p2 extends fG{constructor(){super(...arguments),this.type="grid",this.renderType=tY.SVG}render(t=!0){let e=sU(this.getOptions(),"grid","x","enabled"),n=sU(this.getOptions(),"grid","y","enabled");this.drawBackdrop(e,n),!(!e&&!n)&&(e&&(hv.appendOrSelect(this.backdrop,"g.x.grid"),this.drawXGrid(t)),n&&(hv.appendOrSelect(this.backdrop,"g.y.grid"),this.drawYGrid(t)))}drawXGrid(t){let e=this.parent,n=this.backdrop.attr("height"),i=h2(this.services.cartesianScales.getMainXScale()).tickSizeInner(-n).tickSizeOuter(0);if(sU(this.getOptions(),"grid","x","alignWithAxisTicks")){let t=this.services.cartesianScales.getDomainAxisPosition(),e=sU(this.getOptions(),"axes",t,"ticks","values");e&&i.tickValues(e)}else{let t=sU(this.getOptions(),"grid","x","numberOfTicks");i.ticks(t)}let r=e.select(".x.grid").attr("transform",`translate(${-this.backdrop.attr("x")}, ${n})`);t?r.transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t})).call(i):r.call(i),this.cleanGrid(r)}drawYGrid(t){let e=this.parent,n=this.backdrop.attr("width"),i=h3(this.services.cartesianScales.getMainYScale()).tickSizeInner(-n).tickSizeOuter(0);if(sU(this.getOptions(),"grid","y","alignWithAxisTicks")){let t=this.services.cartesianScales.getRangeAxisPosition(),e=sU(this.getOptions(),"axes",t,"ticks","values");e&&i.tickValues(e)}else{let t=sU(this.getOptions(),"grid","y","numberOfTicks");i.ticks(t)}let r=e.select(".y.grid").attr("transform",`translate(0, ${-this.backdrop.attr("y")})`);t?r.transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"grid-update",animate:t})).call(i):r.call(i),this.cleanGrid(r)}getGridlineThreshold(t){let e,n=this.parent,i=n.selectAll(".x.grid .tick").nodes().sort((t,e)=>Number(sI(t).tx)-Number(sI(e).tx)),r=-1;if(!i.length)return;i.forEach(e=>{t[0]>=+sI(e).tx&&r++});let o=r+1<i.length?r+1:i.length,a=i[r],s=i[o];if(a)if(s)e=sI(s).tx-sI(a).tx;else{let t=n.select("rect.chart-grid-backdrop").node();e=hv.getSVGElementSize(t).width-sI(a).tx}else e=+sI(s).tx;let{threshold:l}=this.getOptions().tooltip.gridline;return e*l}getActiveGridline(t){let e=sU(this.getOptions,"tooltip","gridline","threshold")||this.getGridlineThreshold(t);return this.parent.selectAll(".x.grid .tick").filter(function(){let n=sI(this),i={min:Number(n.tx)-e,max:Number(n.tx)+e};return i.min<=t[0]&&t[0]<=i.max})}drawBackdrop(t,e){let n=this.parent,i=this.services.cartesianScales.getMainXScale(),r=this.services.cartesianScales.getMainYScale(),[o,a]=i.range(),[s,l]=r.range();this.backdrop=hv.appendOrSelect(n,"svg.chart-grid-backdrop").attr("role","presentation");let c=hv.appendOrSelect(this.backdrop,t||e?"rect.chart-grid-backdrop.stroked":"rect.chart-grid-backdrop");this.backdrop.merge(c).attr("x",o).attr("y",l).attr("width",Math.abs(a-o)).attr("height",Math.abs(s-l)).lower(),c.attr("width","100%").attr("height","100%")}cleanGrid(t){t.selectAll("text").remove(),t.select(".domain").remove()}}class p3 extends fG{constructor(t,e,n){super(t,e,n),this.type="axes",this.renderType=tY.SVG,this.truncation={[tq.LEFT]:!1,[tq.RIGHT]:!1,[tq.TOP]:!1,[tq.BOTTOM]:!1},n&&(this.configs=n),this.margins=this.configs.margins}render(t=!0){let e,n,i,r,o,{position:a}=this.configs,s=this.getOptions(),l=sU(s,"axes",a,"visible"),c=this.getComponentContainer({ariaLabel:"axes"}),{width:u,height:h}=hv.getSVGElementSize(c,{useAttrs:!0}),d=hv.appendOrSelect(c,`g.axis.${a}`);if(a===tq.BOTTOM||a===tq.TOP?(e=this.configs.axes[tq.LEFT]?this.margins.left:0,n=this.configs.axes[tq.RIGHT]?u-this.margins.right:u):(e=h-this.margins.bottom,n=this.margins.top),!this.services.cartesianScales)throw Error("Services cartesianScales undefined");let f=this.services.cartesianScales.getScaleByPosition(a);switch(this.scaleType===t0.LABELS||this.scaleType===t0.LABELS_RATIO?f.rangeRound([e,n]):f.range([e,n]),a){case tq.LEFT:i=h3;break;case tq.BOTTOM:i=h2;break;case tq.RIGHT:i=h1;break;case tq.TOP:i=h0}d.attr("aria-label",`${a} axis`);let p=!d.select("g.ticks").empty(),g=hv.appendOrSelect(d,"g.ticks");p||(g.attr("role",`${ll.GRAPHICS_OBJECT} ${ll.GROUP}`),g.attr("aria-label",`${a} ticks`));let m=hv.appendOrSelect(d,"g.ticks.invisible").style("opacity","0").style("pointer-events","none").attr("aria-hidden",!0).attr("aria-label",`invisible ${a} ticks`),y=sU(s,"axes",a),v=this.scaleType===t0.TIME||y.scaleType===t0.TIME,_=a===tq.LEFT||a===tq.RIGHT,b=this.model.get("zoomDomain");if(b&&v&&!_&&f.domain(b),!l)return void g.attr("aria-hidden",!0);let x=sU(y,"scaleType"),E=sU(s,"data","loading"),w=sU(y,"ticks","number"),T=sU(y,"ticks","values"),S=sU(y,"truncation","type"),O=sU(y,"truncation","threshold"),M=sU(y,"truncation","numCharacter"),A=null!==w,D=sU(s,"timeScale"),k=hv.appendOrSelect(m,"g.tick"),C=hv.appendOrSelect(k,"text").text("0"),L=hv.getSVGElementSize(C.node(),{useBBox:!0}).height;k.remove();let R=this.scaleType||y.scaleType||t0.LINEAR,I=i(f).tickSizeOuter(0);if(f.ticks){let t;if(A?t=w:(t=so,_&&(t=this.getNumberOfFittingTicks(h,L,sa))),1===f.ticks().length&&0===f.ticks()[0]&&(t=0),I.ticks(t),v)if(f.ticks(t).length){let e=sU(s,"timeScale","addSpaceOnEdges"),n=sU(s,"axes",a,"domain"),i=f.copy();e&&!n&&i.nice(t);let r=i.ticks(t);e&&r.length>2&&!n&&(r.splice(r.length-1,1),r.splice(0,1)),I.tickValues(r)}else I.tickValues([])}let N=sU(y,"ticks","formatter"),{code:P,number:U}=sU(s,"locale");if(v){let t=lr(I.tickValues(),sU(s,"timeScale","timeInterval"));r=null===N?(e,n)=>ln(e,n,I.tickValues(),t,D,s.locale):(e,n)=>{let i=ln(e,n,I.tickValues(),t,D,s.locale);return N(e,n,i)}}else null===N?R===t0.LINEAR&&(r=t=>U(t,P)):r=N;I.tickFormat(r);let[B,F]=this.services.cartesianScales.getScaleByPosition(a).domain();if(T){if(v)T.forEach((t,e)=>{void 0===t.getTime&&(T[e]=new Date(t))}),o=T.filter(t=>{let e=t.getTime();return e>=new Date(B).getTime()&&e<=new Date(F).getTime()});else if(x===t0.LABELS){let t=this.services.cartesianScales.getScaleByPosition(a).domain();o=T.filter(e=>t.includes(e))}else o=T.filter(t=>t>=B&&t<=F);I.tickValues(o)}switch(a){case tq.LEFT:g.attr("transform",`translate(${this.margins.left}, 0)`);break;case tq.BOTTOM:g.attr("transform",`translate(0, ${h-this.margins.bottom})`);break;case tq.RIGHT:g.attr("transform",`translate(${u-this.margins.right}, 0)`);break;case tq.TOP:g.attr("transform",`translate(0, ${this.margins.top})`)}let H=this.model.isDataEmpty();if(y.title){let t,e=hv.appendOrSelect(d,"text.axis-title").html(H||E?"":pI(y.title)),n=sU(y,"titleOrientation");switch(a){case tq.LEFT:n===el.RIGHT?e.attr("transform","rotate(90)").attr("y",0).attr("x",f.range()[0]/2).attr("dy","-0.5em").style("text-anchor","middle"):e.attr("transform","rotate(-90)").attr("y",0).attr("x",-(f.range()[0]/2)).attr("dy","0.75em").style("text-anchor","middle");break;case tq.BOTTOM:e.attr("transform",`translate(${this.margins.left/2+f.range()[1]/2}, ${h+4})`).style("text-anchor","middle");break;case tq.RIGHT:n===el.LEFT?e.attr("transform","rotate(-90)").attr("y",u).attr("x",-(f.range()[0]/2)).style("text-anchor","middle"):e.attr("transform","rotate(90)").attr("y",-u).attr("x",f.range()[0]/2).attr("dy","0.75em").style("text-anchor","middle");break;case tq.TOP:t=hv.getSVGElementSize(e,{useBBox:!0}).height,e.attr("transform",`translate(${this.margins.left/2+f.range()[1]/2}, ${t/2})`).style("text-anchor","middle")}}if(v){let e=lr(I.tickValues(),sU(s,"timeScale","timeInterval")),n=D.showDayName,i=g;t&&(g=g.transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t}))),g=g.call(I),i.selectAll(".tick").data(I.tickValues(),f).order().select("text").attr("class",(t,i)=>le(t,i,I.tickValues(),e,n)?"tick-label--primary":"tick-label")}else g=t&&p?g.transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"axis-update",animate:t})).call(I):g.call(I);if(m.call(I),a===tq.BOTTOM||a===tq.TOP){let t=!1,e=sU(y,"ticks","rotation");if(e===eo.ALWAYS)t=!0;else if(e===eo.NEVER)t=!1;else if(!e||e===eo.AUTO)if(f.step)t=m.selectAll("g.tick text").nodes().some(t=>hv.getSVGElementSize(t,{useBBox:!0}).width>=f.step());else{let e;t=!1;let n=m.append("text").text("A"),i=hv.getSVGElementSize(n.node(),{useBBox:!0}).width;m.selectAll("g.tick").each(function(){let n=lP(this),r=parseFloat(sU(sI(this),"tx"));null!==r&&e+n.text().length*i*.8>=r&&(t=!0),e=r}),n.remove()}t?(A||(I.ticks(this.getNumberOfFittingTicks(u,L,ss)),m.call(I),g.call(I)),d.selectAll("g.ticks g.tick text").attr("transform","rotate(-45)").attr("text-anchor",a===tq.TOP?"start":"end")):d.selectAll("g.ticks g.tick text").attr("transform",null).attr("text-anchor",null)}if(E?d.attr("opacity",0):d.attr("opacity",1),g.selectAll("g.tick").attr("aria-label",t=>t),m.selectAll("g.tick").attr("aria-label",t=>t),S!==tQ.NONE&&x===t0.LABELS&&!T){let t=this.services.cartesianScales.getScaleDomain(a);if(t.length>0){let e=c.select(`g.axis.${a} g.ticks g.tick`).html();d.selectAll("g.ticks g.tick").html(e);let n=this;d.selectAll("g.tick text").data(t).text(function(t){return t.length>O?(n.truncation[a]=!0,sN(t,S,M)):t}),this.getInvisibleAxisRef().selectAll("g.tick text").data(t).text(function(t){return t.length>O?sN(t,S,M):t}),d.selectAll("g.ticks").html(this.getInvisibleAxisRef().html()),d.selectAll("g.tick text").data(t)}}this.addEventListeners()}addEventListeners(){let t=this.getComponentContainer(),{position:e}=this.configs,n=hv.appendOrSelect(t,`g.axis.${e}`),i=sU(this.getOptions(),"axes",e),r=sU(i,"scaleType"),o=sU(i,"truncation","threshold"),a=this;n.selectAll("g.tick text").on("mouseover",function(t,e){a.services.events.dispatchEvent(tW.Axis.LABEL_MOUSEOVER,{event:t,element:lP(this),datum:e}),r===t0.LABELS&&e.length>o&&a.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:t,hoveredElement:lP(this),content:e})}).on("mousemove",function(t,e){a.services.events.dispatchEvent(tW.Axis.LABEL_MOUSEMOVE,{event:t,element:lP(this),datum:e}),r===t0.LABELS&&e.length>o&&a.services.events.dispatchEvent(tW.Tooltip.MOVE,{event:t})}).on("click",function(t,e){a.services.events.dispatchEvent(tW.Axis.LABEL_CLICK,{event:t,element:lP(this),datum:e})}).on("mouseout",function(t,e){a.services.events.dispatchEvent(tW.Axis.LABEL_MOUSEOUT,{event:t,element:lP(this),datum:e}),r===t0.LABELS&&a.services.events.dispatchEvent(tW.Tooltip.HIDE)})}getInvisibleAxisRef(){let{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} g.ticks.invisible`)}getTitleRef(){let{position:t}=this.configs;return this.getComponentContainer().select(`g.axis.${t} text.axis-title`)}getNumberOfFittingTicks(t,e,n){var i,r,o,a,s,l;return i=Math.floor(t/(e*n)),r=2,void 0===(o=so)&&(o=r,r=void 0),void 0!==o&&(o=(o=lL(o))==o?o:0),void 0!==r&&(r=(r=lL(r))==r?r:0),a=lL(i),s=r,l=o,a==a&&(void 0!==l&&(a=a<=l?a:l),void 0!==s&&(a=a>=s?a:s)),a}destroy(){let t=this.getComponentContainer(),{position:e}=this.configs;hv.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick text").on("mouseover",null).on("mousemove",null).on("mouseout",null)}}class p5 extends p3{constructor(t,e,n){super(t,e,n)}render(t=!0){super.render(t),super.destroy();let e=this.configs.position,n=this.getComponentContainer({ariaLabel:"axes"}),i=hv.appendOrSelect(n,`g.axis.${e}`),r=this;i.selectAll("g.tick").each(function(t,n){let i=lP(this);i.classed("tick-hover",!0).attr("tabindex",0===n?0:-1);let o=i.select("text"),{width:a,height:s}=hv.getSVGElementSize(o,{useBBox:!0}),l=hv.appendOrSelect(i,"rect.axis-holder"),c=0,u=0;switch(e){case tq.LEFT:c=-a+Number(o.attr("x")),u=-(s/2);break;case tq.RIGHT:c=Math.abs(Number(o.attr("x"))),u=-(s/2);break;case tq.TOP:c=-(a/2),u=-s+Number(o.attr("y"))/2,r.truncation[e]&&(c=0,l.attr("transform","rotate(-45)"));break;case tq.BOTTOM:c=-(a/2),u=s/2-2,r.truncation[e]&&(c=-a,l.attr("transform","rotate(-45)"))}l.attr("x",c-sc).attr("y",u).attr("width",a+2*sc).attr("height",s).lower()}),this.addEventListeners()}addEventListeners(){let t=this.getComponentContainer(),{position:e}=this.configs,n=hv.appendOrSelect(t,`g.axis.${e}`),i=sU(this.getOptions(),"axes",e),r=sU(i,"scaleType"),o=sU(i,"truncation","threshold"),a=this;n.selectAll("g.tick.tick-hover").on("mouseover",function(t){let e=lP(this).select("text"),n=e.datum();a.services.events.dispatchEvent(tW.Axis.LABEL_MOUSEOVER,{event:t,element:e,datum:n}),r===t0.LABELS&&n.length>o&&a.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:t,element:e,datum:n})}).on("mousemove",function(t){let e=lP(this).select("text"),n=e.datum();a.services.events.dispatchEvent(tW.Axis.LABEL_MOUSEMOVE,{event:t,element:e,datum:n}),a.services.events.dispatchEvent(tW.Tooltip.MOVE,{event:t})}).on("click",function(t){a.services.events.dispatchEvent(tW.Axis.LABEL_CLICK,{event:t,element:lP(this).select("text"),datum:lP(this).select("text").datum()})}).on("mouseout",function(t){a.services.events.dispatchEvent(tW.Axis.LABEL_MOUSEOUT,{event:t,element:lP(this).select("text"),datum:lP(this).select("text").datum()}),r===t0.LABELS&&a.services.events.dispatchEvent(tW.Tooltip.HIDE)}).on("focus",function(t){let e={clientX:0,clientY:0};if(t.target){t.target.focus();let n=t.target.getBoundingClientRect();e.clientX=n.x,e.clientY=n.y}a.services.events.dispatchEvent(tW.Axis.LABEL_FOCUS,{event:{...t,...e},element:lP(this),datum:lP(this).select("text").datum()})}).on("blur",function(t){a.services.events.dispatchEvent(tW.Axis.LABEL_BLUR,{event:t,element:lP(this),datum:lP(this).select("text").datum()})}).on("keydown",function(t){t.key&&"Escape"===t.key&&(a.services.events.dispatchEvent(tW.Tooltip.HIDE),a.services.events.dispatchEvent(tW.Axis.LABEL_BLUR,{event:t,element:lP(this),datum:lP(this).select("text").datum()})),e===tq.LEFT||e===tq.RIGHT?t.key&&"ArrowUp"===t.key?a.goNext(this,t):t.key&&"ArrowDown"===t.key&&a.goPrevious(this,t):t.key&&"ArrowLeft"===t.key?a.goPrevious(this,t):t.key&&"ArrowRight"===t.key&&a.goNext(this,t)})}goNext(t,e){t.nextElementSibling&&"path"!==t.nextElementSibling.tagName&&t.nextElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}goPrevious(t,e){t.previousElementSibling&&"path"!==t.previousElementSibling.tagName&&t.previousElementSibling.dispatchEvent(new Event("focus")),e.preventDefault()}destroy(){let t=this.getComponentContainer(),{position:e}=this.configs;hv.appendOrSelect(t,`g.axis.${e}`).selectAll("g.tick.tick-hover").on("mouseover",null).on("mousemove",null).on("mouseout",null).on("focus",null).on("blur",null)}}class p4 extends fG{constructor(){super(...arguments),this.type="2D-axes",this.renderType=tY.SVG,this.children={},this.thresholds=[],this.margins={top:0,right:0,bottom:0,left:0}}render(t=!1){let e={},n=Object.keys(tq),i=sU(this.getOptions(),"axes");n.forEach(t=>{i[tq[t]]&&(e[tq[t]]=!0)}),this.configs.axes=e,n.forEach(t=>{let e=tq[t];if(this.configs.axes[e]&&!this.children[e]){let t={position:e,axes:this.configs.axes,margins:this.margins},n=this.model.axisFlavor===ed.DEFAULT?new p3(this.model,this.services,t):new p5(this.model,this.services,t);n.setModel(this.model),n.setServices(this.services),n.setParent(this.parent),this.children[e]=n}}),Object.keys(this.children).forEach(e=>{this.children[e].render(t)});let r={};Object.keys(this.children).forEach(t=>{let e,n=this.children[t],i=n.configs.position,o=n.getInvisibleAxisRef(),{width:a,height:s}=hv.getSVGElementSize(o,{useBBox:!0});switch(n.getTitleRef().empty()?e=0:(e=hv.getSVGElementSize(n.getTitleRef(),{useBBox:!0}).height,(i===tq.LEFT||i===tq.RIGHT)&&(e+=5)),i){case tq.TOP:r.top=s+e;break;case tq.BOTTOM:r.bottom=s+e;break;case tq.LEFT:r.left=a+e;break;case tq.RIGHT:r.right=a+e}}),this.services.events.dispatchEvent(tW.Axis.RENDER_COMPLETE),Object.keys(r).some(t=>this.margins[t]!==r[t])&&(this.margins=Object.assign(this.margins,r),this.model.set({axesMargins:this.margins},{skipUpdate:!0}),this.services.events.dispatchEvent(tW.ZoomBar.UPDATE),Object.keys(this.children).forEach(t=>{this.children[t].margins=this.margins}),this.render(!0))}}class p8 extends fG{constructor(){super(...arguments),this.type="skeleton"}render(t=!0){let e=sU(this.getOptions(),"data","loading");e?this.renderSkeleton(e):this.removeSkeleton()}renderSkeleton(t){if(this.configs.skeleton===t7.GRID)this.renderGridSkeleton(t);else if(this.configs.skeleton===t7.VERT_OR_HORIZ)this.renderVertOrHorizSkeleton(t);else if(this.configs.skeleton===t7.PIE)this.renderPieSkeleton(t);else if(this.configs.skeleton===t7.DONUT)this.renderDonutSkeleton(t);else throw Error(`"${this.configs.skeleton}" is not a valid Skeleton type.`)}renderGridSkeleton(t){this.setScales(),this.drawBackdrop(t),this.drawXGrid(t),this.drawYGrid(t),t&&this.setShimmerEffect("shimmer-lines")}renderVertOrHorizSkeleton(t){let e=this.services.cartesianScales.getOrientation();this.setScales(),this.drawBackdrop(t),e===tJ.VERTICAL&&this.drawYGrid(t),e===tJ.HORIZONTAL&&this.drawXGrid(t),this.setShimmerEffect("shimmer-lines")}renderPieSkeleton(t){let e=this.computeOuterRadius();this.drawRing(e,0,t),t&&this.setShimmerEffect("shimmer-areas")}renderDonutSkeleton(t){let e=this.computeOuterRadius(),n=this.computeInnerRadius();this.drawRing(e,n,t),t&&this.setShimmerEffect("shimmer-areas")}setScales(){let t=this.services.cartesianScales.getMainXScale().range(),e=this.services.cartesianScales.getMainYScale().range();this.xScale=si().domain([0,1]).range(t),this.yScale=si().domain([0,1]).range(e)}drawBackdrop(t){let e=this.parent,{width:n,height:i}=hv.getSVGElementSize(e,{useAttrs:!0});this.backdrop=hv.appendOrSelect(e,"svg.chart-skeleton.DAII").attr("role","presentation").attr("width",n).attr("height",i);let r=hv.appendOrSelect(this.backdrop,"rect.chart-skeleton-backdrop");r.attr("width","100%").attr("height","100%");let[o]=this.xScale.range(),[,a]=this.yScale.range();this.backdrop.merge(r).attr("x",o).attr("y",a),r.classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawXGrid(t){let e=+this.backdrop.attr("width"),n=sU(this.getOptions(),"grid","x","numberOfTicks"),i=this.xScale.ticks(n).map(t=>t*e),r=hv.appendOrSelect(this.backdrop,"g.x.skeleton"),o=r.selectAll("line").data(i);o.enter().append("line").merge(o).attr("x1",t=>t).attr("x2",t=>t).attr("y1",0).attr("y2","100%"),r.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawYGrid(t){let e=+this.backdrop.attr("height"),n=this.backdrop.attr("width"),i=sU(this.getOptions(),"grid","y","numberOfTicks"),r=this.xScale.ticks(i).map(t=>t*e),o=hv.appendOrSelect(this.backdrop,"g.y.skeleton"),a=o.selectAll("line").data(r);a.enter().append("line").merge(a).attr("x1",0).attr("x2",n).attr("y1",t=>t).attr("y2",t=>t),o.selectAll("line").classed("shimmer-effect-lines",t).classed("empty-state-lines",!t).style("stroke",t?`url(#${this.services.domUtils.generateElementIDString("shimmer-lines")})`:null)}drawRing(t,e,n=!0){let i=this.parent,{width:r,height:o}=hv.getSVGElementSize(i,{useAttrs:!0}),a=hv.appendOrSelect(i,"svg.chart-skeleton").attr("width",r).attr("height",o).attr("role","presentation"),s=sU(this.getOptions(),0===e?"pie":"donut","alignment");hv.appendOrSelect(a,"rect.chart-skeleton-area-container").attr("width",r).attr("height",o).attr("fill","none");let l=(function(){var t=fI,e=fN,n=lu(0),i=null,r=fP,o=fU,a=fB,s=null,l=fR(c);function c(){var c,u,h=+t.apply(this,arguments),d=+e.apply(this,arguments),f=r.apply(this,arguments)-uO,p=o.apply(this,arguments)-uO,g=uv(p-f),m=p>f;if(s||(s=c=l()),d<h&&(u=d,d=h,h=u),d>1e-12)if(g>uM-1e-12)s.moveTo(d*ub(f),d*uw(f)),s.arc(0,0,d,f,p,!m),h>1e-12&&(s.moveTo(h*ub(p),h*uw(p)),s.arc(0,0,h,p,f,m));else{var y,v,_=f,b=p,x=f,E=p,w=g,T=g,S=a.apply(this,arguments)/2,O=S>1e-12&&(i?+i.apply(this,arguments):uT(h*h+d*d)),M=uE(uv(d-h)/2,+n.apply(this,arguments)),A=M,D=M;if(O>1e-12){var k=uA(O/h*uw(S)),C=uA(O/d*uw(S));(w-=2*k)>1e-12?(k*=m?1:-1,x+=k,E-=k):(w=0,x=E=(f+p)/2),(T-=2*C)>1e-12?(C*=m?1:-1,_+=C,b-=C):(T=0,_=b=(f+p)/2)}var L=d*ub(_),R=d*uw(_),I=h*ub(E),N=h*uw(E);if(M>1e-12){var P,U=d*ub(b),B=d*uw(b),F=h*ub(x),H=h*uw(x);if(g<uS)if(P=function(t,e,n,i,r,o,a,s){var l=n-t,c=i-e,u=a-r,h=s-o,d=h*l-u*c;if(!(d*d<1e-12))return d=(u*(e-o)-h*(t-r))/d,[t+d*l,e+d*c]}(L,R,F,H,U,B,I,N)){var $,z=L-P[0],j=R-P[1],G=U-P[0],V=B-P[1],W=1/uw((($=(z*G+j*V)/(uT(z*z+j*j)*uT(G*G+V*V)))>1?0:$<-1?uS:Math.acos($))/2),Y=uT(P[0]*P[0]+P[1]*P[1]);A=uE(M,(h-Y)/(W-1)),D=uE(M,(d-Y)/(W+1))}else A=D=0}T>1e-12?D>1e-12?(y=fF(F,H,L,R,d,D,m),v=fF(U,B,I,N,d,D,m),s.moveTo(y.cx+y.x01,y.cy+y.y01),D<M?s.arc(y.cx,y.cy,D,u_(y.y01,y.x01),u_(v.y01,v.x01),!m):(s.arc(y.cx,y.cy,D,u_(y.y01,y.x01),u_(y.y11,y.x11),!m),s.arc(0,0,d,u_(y.cy+y.y11,y.cx+y.x11),u_(v.cy+v.y11,v.cx+v.x11),!m),s.arc(v.cx,v.cy,D,u_(v.y11,v.x11),u_(v.y01,v.x01),!m))):(s.moveTo(L,R),s.arc(0,0,d,_,b,!m)):s.moveTo(L,R),h>1e-12&&w>1e-12?A>1e-12?(y=fF(I,N,U,B,h,-A,m),v=fF(L,R,F,H,h,-A,m),s.lineTo(y.cx+y.x01,y.cy+y.y01),A<M?s.arc(y.cx,y.cy,A,u_(y.y01,y.x01),u_(v.y01,v.x01),!m):(s.arc(y.cx,y.cy,A,u_(y.y01,y.x01),u_(y.y11,y.x11),!m),s.arc(0,0,h,u_(y.cy+y.y11,y.cx+y.x11),u_(v.cy+v.y11,v.cx+v.x11),m),s.arc(v.cx,v.cy,A,u_(v.y11,v.x11),u_(v.y01,v.x01),!m))):s.arc(0,0,h,E,x,m):s.lineTo(I,N)}else s.moveTo(0,0);if(s.closePath(),c)return s=null,c+""||null}return c.centroid=function(){var n=(+t.apply(this,arguments)+ +e.apply(this,arguments))/2,i=(+r.apply(this,arguments)+ +o.apply(this,arguments))/2-uS/2;return[ub(i)*n,uw(i)*n]},c.innerRadius=function(e){return arguments.length?(t="function"==typeof e?e:lu(+e),c):t},c.outerRadius=function(t){return arguments.length?(e="function"==typeof t?t:lu(+t),c):e},c.cornerRadius=function(t){return arguments.length?(n="function"==typeof t?t:lu(+t),c):n},c.padRadius=function(t){return arguments.length?(i=null==t?null:"function"==typeof t?t:lu(+t),c):i},c.startAngle=function(t){return arguments.length?(r="function"==typeof t?t:lu(+t),c):r},c.endAngle=function(t){return arguments.length?(o="function"==typeof t?t:lu(+t),c):o},c.padAngle=function(t){return arguments.length?(a="function"==typeof t?t:lu(+t),c):a},c.context=function(t){return arguments.length?(s=t??null,c):s},c})().innerRadius(e).outerRadius(t).startAngle(0).endAngle(2*Math.PI),c=t+Math.abs(-15),u=t+(Math.min(r,o)-2*t)/2,h=hv.appendOrSelect(a,"path").attr("class","skeleton-area-shape").attr("transform",`translate(${c}, ${u})`).attr("d",l).classed("shimmer-effect-areas",n).classed("empty-state-areas",!n).style("fill",n?`url(#${this.services.domUtils.generateElementIDString("shimmer-areas")})`:null),d=t+30;s===t2.CENTER?d=r/2:s===t2.RIGHT&&(d=r-t-30);let f=t+20;h.attr("transform",`translate(${d}, ${f})`)}computeOuterRadius(){let{width:t,height:e}=hv.getSVGElementSize(this.parent,{useAttrs:!0});return Math.min(t,e)/2+-15}computeInnerRadius(){return this.computeOuterRadius()*(3/4)}setShimmerEffect(t){let e="stop-bg-shimmer",n=this.parent.select(".chart-skeleton"),{width:i}=hv.getSVGElementSize(this.parent,{useAttrs:!0}),r=hv.appendOrSelect(n,"defs").lower(),o=hv.appendOrSelect(r,"linearGradient").attr("id",this.services.domUtils.generateElementIDString(t)).attr("class",t).attr("x1",0-3*.2*i).attr("x2",i).attr("y1",0).attr("y2",0).attr("gradientUnits","userSpaceOnUse").attr("gradientTransform","translate(0, 0)"),a=`
63
- <stop class="${e}" offset="0"></stop>
64
- <stop class="stop-shimmer" offset="0.2"></stop>
65
- <stop class="${e}" offset="0.4"></stop>
66
- `;o.html(a),function t(){o.attr("gradientTransform",`translate(${0-3*.2*i}, 0)`).transition().duration(2e3).delay(1e3).ease(h8).attr("gradientTransform",`translate(${i+3*.2*i}, 0)`).on("end",t)}()}removeSkeleton(){this.parent.select(".chart-skeleton").remove()}}class p6 extends fG{constructor(){super(...arguments),this.type="zero-line",this.renderType=tY.SVG}render(t){let e=this.services.cartesianScales.getRangeAxisPosition({groups:this.configs.groups}),n=this.services.cartesianScales.getScaleByPosition(e),[i,r]=n.domain(),o=this.getComponentContainer({isPresentational:!0});if(!(i>0&&r<0||i<0&&r>0))return void o.selectAll("line.domain").remove();let[a,s]=this.services.cartesianScales.getDomainScale().range(),l=+n(0)+.5;l||(l=n.range()[0]);let c=sB({x0:a,x1:s,y0:l,y1:l},this.services.cartesianScales.getOrientation());hv.appendOrSelect(o,"line.domain").transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"zero-line-update",animate:t})).attr("y1",c.y0).attr("y2",c.y1).attr("x1",c.x0).attr("x2",c.x1)}}class p9 extends fG{getBarWidth(){let t=this.getOptions();if(t.bars.width)return t.bars.width;let e=this.model.getDisplayData().length,n=this.services.cartesianScales.getMainXScale(),i=hv.getSVGElementSize(this.parent,{useAttrs:!0}).width;if(!n.step){let n=sU(t,"bars","spacingFactor");return Math.min(t.bars.maxWidth,i*n/e)}return Math.min(t.bars.maxWidth,n.step()/2)}isOutsideZoomedDomain(t,e){if(this.model.getDisplayData().length<=1)return!1;let n=this.model.get("zoomDomain");if(void 0!==n){let i=this.services.cartesianScales.getDomainScale();return t<i(n[0])||e>i(n[1])}return!1}}class p7 extends p9{constructor(){super(...arguments),this.type="grouped-bar",this.renderType=tY.SVG,this.padding=5,this.defaultStepFactor=70,this.handleLegendOnHover=t=>{let{hoveredElement:e}=t.detail,{groupMapsTo:n}=this.getOptions().data;this.parent.selectAll("path.bar").transition("legend-hover-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-hover-bar"})).attr("opacity",t=>t[n]!==e.datum().name?.3:1)},this.handleLegendMouseOut=()=>{this.parent.selectAll("path.bar").transition("legend-mouseout-bar").call(t=>this.services.transitions.setupTransition({transition:t,name:"legend-mouseout-bar"})).attr("opacity",1)}}init(){let t=this.services.events;t.addEventListener(tW.Legend.ITEM_HOVER,this.handleLegendOnHover),t.addEventListener(tW.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}render(t){let e=this.model.getDisplayData(this.configs.groups),{groupMapsTo:n}=this.getOptions().data;this.setGroupScale();let i=this.getComponentContainer({ariaLabel:"grouped bar graphs",withinChartClip:!0}),r=rx(e.map(t=>{let e=this.services.cartesianScales.getDomainIdentifier(t);return t[e]&&"function"==typeof t[e].toString?t[e].toString():t[e]})),o=i.selectAll("g.bars").data(r,t=>t);o.exit().attr("opacity",0).remove();let a=o.enter().append("g").classed("bars",!0).attr("role",ll.GROUP).attr("data-name","bars").merge(o);a.transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"bar-group-update-enter",animate:t})).attr("transform",t=>{let e=this.services.cartesianScales.getDomainValue(t)-this.getGroupWidth()/2;return this.services.cartesianScales.getOrientation()===tJ.VERTICAL?`translate(${e}, 0)`:`translate(0, ${e})`});let s=a.selectAll("path.bar").data(t=>this.getDataCorrespondingToLabel(t),t=>t[n]);s.exit().attr("opacity",0).remove(),s.enter().append("path").attr("opacity",0).merge(s).classed("bar",!0).transition().call(e=>this.services.transitions.setupTransition({transition:e,name:"bar-update-enter",animate:t})).attr("class",t=>this.model.getColorClassName({classNameTypes:[tX.FILL],dataGroupName:t[n],originalClassName:"bar"})).style("fill",t=>{let e=this.services.cartesianScales.getDomainIdentifier(t);return this.model.getFillColor(t[n],t[e],t)}).attr("d",t=>{let e=this.groupScale(t[n]),i=this.getBarWidth(),r=this.services.cartesianScales.getRangeAxisPosition({datum:t}),o=this.services.cartesianScales.getDomainLowerBound(r),a=this.services.cartesianScales.getValueThroughAxisPosition(r,o),s=this.services.cartesianScales.getRangeValue(t),l=this.services.cartesianScales.getDomainValue(t)-i/2;if(!this.isOutsideZoomedDomain(l,l+i))return((t,e)=>{let{x0:n,x1:i,y0:r,y1:o}=sB(t,e);return`M${n},${r}L${n},${o}L${i},${o}L${i},${r}L${n},${r}`})({x0:e,x1:e+i,y0:a,y1:s},this.services.cartesianScales.getOrientation())}).attr("opacity",1).attr("role",ll.GRAPHICS_SYMBOL).attr("aria-roledescription","bar").attr("aria-label",t=>t.value),this.addEventListeners()}addEventListeners(){let t=this;this.parent.selectAll("path.bar").on("mouseover",function(e,n){let i=lP(this);i.classed("hovered",!0),t.services.events.dispatchEvent(tW.Bar.BAR_MOUSEOVER,{event:e,element:i,datum:n}),t.services.events.dispatchEvent(tW.Tooltip.SHOW,{event:e,hoveredElement:i,data:[n]})}).on("mousemove",function(e,n){let i=lP(this);t.services.events.dispatchEvent(tW.Bar.BAR_MOUSEMOVE,{event:e,element:i,datum:n}),t.services.events.dispatchEvent(tW.Tooltip.MOVE,{event:e})}).on("click",function(e,n){t.services.events.dispatchEvent(tW.Bar.BAR_CLICK,{event:e,element:lP(this),datum:n})}).on("mouseout",function(e,n){let i=lP(this);i.classed("hovered",!1),t.services.events.dispatchEvent(tW.Bar.BAR_MOUSEOUT,{event:e,element:i,datum:n}),t.services.events.dispatchEvent(tW.Tooltip.HIDE,{hoveredElement:i})})}destroy(){this.parent.selectAll("path.bar").on("mouseover",null).on("mousemove",null).on("mouseout",null);let t=this.services.events;t.removeEventListener(tW.Legend.ITEM_HOVER,this.handleLegendOnHover),t.removeEventListener(tW.Legend.ITEM_MOUSEOUT,this.handleLegendMouseOut)}getDataCorrespondingToLabel(t){return this.model.getDisplayData(this.configs.groups).filter(e=>{let n=this.services.cartesianScales.getDomainIdentifier(e);return e[n].toString()===t})}getGroupWidth(){let t=this.model.getGroupedData(this.configs.groups),e=this.getTotalGroupPadding();return this.getBarWidth()*t.length+e}getDomainScaleStep(){let t=this.services.cartesianScales.getDomainScale(),e=this.model.getGroupedData(this.configs.groups),n=this.defaultStepFactor;if("function"==typeof t.step)n=t.step();else if(e.length>0){let i=e.find(t=>t.data?.length>1);if(i){let e=this.services.cartesianScales.getDomainIdentifier(i.data[0]);n=Math.abs(t(i.data[1][e])-t(i.data[0][e]))}}return n}getTotalGroupPadding(){let t=this.model.getGroupedData(this.configs.groups);return 1===t.length?0:Math.min(5,5*(this.getDomainScaleStep()/this.defaultStepFactor))*(t.length-1)}getBarWidth(){let t=this.getOptions(),e=sU(t,"bars","width"),n=sU(t,"bars","maxWidth");if(null!==e&&(null===n||e<=n))return e;let i=this.model.getGroupedData(this.configs.groups).length,r=this.getTotalGroupPadding();return Math.min(n,(this.getDomainScaleStep()-r)/i)}setGroupScale(){let t=this.model.getActiveDataGroupNames(this.configs.groups);this.groupScale=lU().domain(t).rangeRound([0,this.getGroupWidth()])}}var gt={value:function(){}};function ge(){for(var t,e=0,n=arguments.length,i={};e<n;++e){if(!(t=arguments[e]+"")||t in i||/[\s.]/.test(t))throw Error("illegal type: "+t);i[t]=[]}return new gn(i)}function gn(t){this._=t}function gi(t,e,n){for(var i=0,r=t.length;i<r;++i)if(t[i].name===e){t[i]=gt,t=t.slice(0,i).concat(t.slice(i+1));break}return null!=n&&t.push({name:e,value:n}),t}gn.prototype=ge.prototype={constructor:gn,on:function(t,e){var n,i=this._,r=(t+"").trim().split(/^|\s+/).map(function(t){var e="",n=t.indexOf(".");if(n>=0&&(e=t.slice(n+1),t=t.slice(0,n)),t&&!i.hasOwnProperty(t))throw Error("unknown type: "+t);return{type:t,name:e}}),o=-1,a=r.length;if(arguments.length<2){for(;++o<a;)if((n=(t=r[o]).type)&&(n=function(t,e){for(var n,i=0,r=t.length;i<r;++i)if((n=t[i]).name===e)return n.value}(i[n],t.name)))return n;return}if(null!=e&&"function"!=typeof e)throw Error("invalid callback: "+e);for(;++o<a;)if(n=(t=r[o]).type)i[n]=gi(i[n],t.name,e);else if(null==e)for(n in i)i[n]=gi(i[n],t.name,null);return this},copy:function(){var t={},e=this._;for(var n in e)t[n]=e[n].slice();return new gn(t)},call:function(t,e){if((n=arguments.length-2)>0)for(var n,i,r=Array(n),o=0;o<n;++o)r[o]=arguments[o+2];if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(i=this._[t],o=0,n=i.length;o<n;++o)i[o].value.apply(e,r)},apply:function(t,e,n){if(!this._.hasOwnProperty(t))throw Error("unknown type: "+t);for(var i=this._[t],r=0,o=i.length;r<o;++r)i[r].value.apply(e,n)}};let gr=function(t){if(Object.prototype.hasOwnProperty.call(t,"__esModule"))return t;var e=t.default;if("function"==typeof e){var n=function t(){var n=!1;try{n=this instanceof t}catch{}return n?Reflect.construct(e,arguments,this.constructor):e.apply(this,arguments)};n.prototype=e.prototype}else n={};return Object.defineProperty(n,"__esModule",{value:!0}),Object.keys(t).forEach(function(e){var i=Object.getOwnPropertyDescriptor(t,e);Object.defineProperty(n,e,i.get?i:{enumerable:!0,get:function(){return t[e]}})}),n}(Object.freeze(Object.defineProperty({__proto__:null,dispatch:ge},Symbol.toStringTag,{value:"Module"})));function go(t){return(null==t?0:t.length)?ia(t,1):[]}function ga(t,e,n){var i=-1,r=t.length;e<0&&(e=-e>r?0:r+e),(n=n>r?r:n)<0&&(n+=r),r=e>n?0:n-e>>>0,e>>>=0;for(var o=Array(r);++i<r;)o[i]=t[i+e];return o}function gs(t){return id(t)?void 0:t}!function(){if(!tm){tm=1;gr.dispatch}}();var gl=ne(nd(tf=function(t,e){var n={};if(null==t)return n;var i=!1;e=ez(e,function(e){return e=n9(e,t),i||(i=e.length>1),e}),nu(t,iM(t),n),i&&(n=i5(n,7,gs));for(var r=e.length;r--;)!function(t,e){var n,i;e=n9(e,t),n=t,null==(t=(i=e).length<2?n:it(n,ga(i,0,-1)))||delete t[n7(rg(e))]}(n,e[r]);return n},void 0,go),tf+"");function gc(t){return Math.log(t)}function gu(t){return Math.exp(t)}function gh(t){return-Math.log(-t)}function gd(t){return-Math.exp(-t)}function gf(t){return isFinite(t)?+("1e"+t):t<0?0:t}function gp(t){return(e,n)=>-t(-e,n)}function gg(t,e,n){t._context.bezierCurveTo((2*t._x0+t._x1)/3,(2*t._y0+t._y1)/3,(t._x0+2*t._x1)/3,(t._y0+2*t._y1)/3,(t._x0+4*t._x1+e)/6,(t._y0+4*t._y1+n)/6)}function gm(t){this._context=t}function gy(t){return new gm(t)}function gv(t){this._context=t}function g_(t){return new gv(t)}function gb(t){this._context=t}function gx(t){return new gb(t)}function gE(t,e){this._basis=new gm(t),this._beta=e}gm.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){switch(this._point){case 3:gg(this,this._x1,this._y1);case 2:this._context.lineTo(this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,this._context.lineTo((5*this._x0+this._x1)/6,(5*this._y0+this._y1)/6);default:gg(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gv.prototype={areaStart:uC,areaEnd:uC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._y0=this._y1=this._y2=this._y3=this._y4=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x2,this._y2),this._context.closePath();break;case 2:this._context.moveTo((this._x2+2*this._x3)/3,(this._y2+2*this._y3)/3),this._context.lineTo((this._x3+2*this._x2)/3,(this._y3+2*this._y2)/3),this._context.closePath();break;case 3:this.point(this._x2,this._y2),this.point(this._x3,this._y3),this.point(this._x4,this._y4)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x2=t,this._y2=e;break;case 1:this._point=2,this._x3=t,this._y3=e;break;case 2:this._point=3,this._x4=t,this._y4=e,this._context.moveTo((this._x0+4*this._x1+t)/6,(this._y0+4*this._y1+e)/6);break;default:gg(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gb.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3;var n=(this._x0+4*this._x1+t)/6,i=(this._y0+4*this._y1+e)/6;this._line?this._context.lineTo(n,i):this._context.moveTo(n,i);break;case 3:this._point=4;default:gg(this,t,e)}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e}},gE.prototype={lineStart:function(){this._x=[],this._y=[],this._basis.lineStart()},lineEnd:function(){var t=this._x,e=this._y,n=t.length-1;if(n>0)for(var i,r=t[0],o=e[0],a=t[n]-r,s=e[n]-o,l=-1;++l<=n;)i=l/n,this._basis.point(this._beta*t[l]+(1-this._beta)*(r+i*a),this._beta*e[l]+(1-this._beta)*(o+i*s));this._x=this._y=null,this._basis.lineEnd()},point:function(t,e){this._x.push(+t),this._y.push(+e)}};let gw=function t(e){function n(t){return 1===e?new gm(t):new gE(t,e)}return n.beta=function(e){return t(+e)},n}(.85);function gT(t,e,n){t._context.bezierCurveTo(t._x1+t._k*(t._x2-t._x0),t._y1+t._k*(t._y2-t._y0),t._x2+t._k*(t._x1-e),t._y2+t._k*(t._y1-n),t._x2,t._y2)}function gS(t,e){this._context=t,this._k=(1-e)/6}gS.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:gT(this,this._x1,this._y1)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2,this._x1=t,this._y1=e;break;case 2:this._point=3;default:gT(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let gO=function t(e){function n(t){return new gS(t,e)}return n.tension=function(e){return t(+e)},n}(0);function gM(t,e){this._context=t,this._k=(1-e)/6}gM.prototype={areaStart:uC,areaEnd:uC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gT(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let gA=function t(e){function n(t){return new gM(t,e)}return n.tension=function(e){return t(+e)},n}(0);function gD(t,e){this._context=t,this._k=(1-e)/6}gD.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gT(this,t,e)}this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let gk=function t(e){function n(t){return new gD(t,e)}return n.tension=function(e){return t(+e)},n}(0);function gC(t,e,n){var i=t._x1,r=t._y1,o=t._x2,a=t._y2;if(t._l01_a>1e-12){var s=2*t._l01_2a+3*t._l01_a*t._l12_a+t._l12_2a,l=3*t._l01_a*(t._l01_a+t._l12_a);i=(i*s-t._x0*t._l12_2a+t._x2*t._l01_2a)/l,r=(r*s-t._y0*t._l12_2a+t._y2*t._l01_2a)/l}if(t._l23_a>1e-12){var c=2*t._l23_2a+3*t._l23_a*t._l12_a+t._l12_2a,u=3*t._l23_a*(t._l23_a+t._l12_a);o=(o*c+t._x1*t._l23_2a-e*t._l12_2a)/u,a=(a*c+t._y1*t._l23_2a-n*t._l12_2a)/u}t._context.bezierCurveTo(i,r,o,a,t._x2,t._y2)}function gL(t,e){this._context=t,this._alpha=e}gL.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x2,this._y2);break;case 3:this.point(this._x2,this._y2)}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3;default:gC(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let gR=function t(e){function n(t){return e?new gL(t,e):new gS(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gI(t,e){this._context=t,this._alpha=e}gI.prototype={areaStart:uC,areaEnd:uC,lineStart:function(){this._x0=this._x1=this._x2=this._x3=this._x4=this._x5=this._y0=this._y1=this._y2=this._y3=this._y4=this._y5=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){switch(this._point){case 1:this._context.moveTo(this._x3,this._y3),this._context.closePath();break;case 2:this._context.lineTo(this._x3,this._y3),this._context.closePath();break;case 3:this.point(this._x3,this._y3),this.point(this._x4,this._y4),this.point(this._x5,this._y5)}},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1,this._x3=t,this._y3=e;break;case 1:this._point=2,this._context.moveTo(this._x4=t,this._y4=e);break;case 2:this._point=3,this._x5=t,this._y5=e;break;default:gC(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let gN=function t(e){function n(t){return e?new gI(t,e):new gM(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gP(t,e){this._context=t,this._alpha=e}gP.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._x2=this._y0=this._y1=this._y2=NaN,this._l01_a=this._l12_a=this._l23_a=this._l01_2a=this._l12_2a=this._l23_2a=this._point=0},lineEnd:function(){(this._line||0!==this._line&&3===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){if(t*=1,e*=1,this._point){var n=this._x2-t,i=this._y2-e;this._l23_a=Math.sqrt(this._l23_2a=Math.pow(n*n+i*i,this._alpha))}switch(this._point){case 0:this._point=1;break;case 1:this._point=2;break;case 2:this._point=3,this._line?this._context.lineTo(this._x2,this._y2):this._context.moveTo(this._x2,this._y2);break;case 3:this._point=4;default:gC(this,t,e)}this._l01_a=this._l12_a,this._l12_a=this._l23_a,this._l01_2a=this._l12_2a,this._l12_2a=this._l23_2a,this._x0=this._x1,this._x1=this._x2,this._x2=t,this._y0=this._y1,this._y1=this._y2,this._y2=e}};let gU=function t(e){function n(t){return e?new gP(t,e):new gD(t,0)}return n.alpha=function(e){return t(+e)},n}(.5);function gB(t,e,n){var i=t._x1-t._x0,r=e-t._x1,o=(t._y1-t._y0)/(i||r<0&&-0),a=(n-t._y1)/(r||i<0&&-0);return((o<0?-1:1)+(a<0?-1:1))*Math.min(Math.abs(o),Math.abs(a),.5*Math.abs((o*r+a*i)/(i+r)))||0}function gF(t,e){var n=t._x1-t._x0;return n?(3*(t._y1-t._y0)/n-e)/2:e}function gH(t,e,n){var i=t._x0,r=t._y0,o=t._x1,a=t._y1,s=(o-i)/3;t._context.bezierCurveTo(i+s,r+s*e,o-s,a-s*n,o,a)}function g$(t){this._context=t}function gz(t){this._context=new gj(t)}function gj(t){this._context=t}function gG(t){return new g$(t)}function gV(t){return new gz(t)}function gW(t){this._context=t}function gY(t){var e,n,i=t.length-1,r=Array(i),o=Array(i),a=Array(i);for(r[0]=0,o[0]=2,a[0]=t[0]+2*t[1],e=1;e<i-1;++e)r[e]=1,o[e]=4,a[e]=4*t[e]+2*t[e+1];for(r[i-1]=2,o[i-1]=7,a[i-1]=8*t[i-1]+t[i],e=1;e<i;++e)n=r[e]/o[e-1],o[e]-=n,a[e]-=n*a[e-1];for(r[i-1]=a[i-1]/o[i-1],e=i-2;e>=0;--e)r[e]=(a[e]-r[e+1])/o[e];for(o[i-1]=(t[i]+r[i-1])/2,e=0;e<i-1;++e)o[e]=2*t[e+1]-r[e+1];return[r,o]}function gZ(t){return new gW(t)}function gX(t,e){this._context=t,this._t=e}function gq(t){return new gX(t,.5)}function gK(t){return new gX(t,0)}function gQ(t){return new gX(t,1)}g$.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x0=this._x1=this._y0=this._y1=this._t0=NaN,this._point=0},lineEnd:function(){switch(this._point){case 2:this._context.lineTo(this._x1,this._y1);break;case 3:gH(this,this._t0,gF(this,this._t0))}(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line=1-this._line},point:function(t,e){var n=NaN;if(e*=1,(t*=1)!==this._x1||e!==this._y1){switch(this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;break;case 2:this._point=3,gH(this,gF(this,n=gB(this,t,e)),n);break;default:gH(this,this._t0,n=gB(this,t,e))}this._x0=this._x1,this._x1=t,this._y0=this._y1,this._y1=e,this._t0=n}}},(gz.prototype=Object.create(g$.prototype)).point=function(t,e){g$.prototype.point.call(this,e,t)},gj.prototype={moveTo:function(t,e){this._context.moveTo(e,t)},closePath:function(){this._context.closePath()},lineTo:function(t,e){this._context.lineTo(e,t)},bezierCurveTo:function(t,e,n,i,r,o){this._context.bezierCurveTo(e,t,i,n,o,r)}},gW.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=[],this._y=[]},lineEnd:function(){var t=this._x,e=this._y,n=t.length;if(n)if(this._line?this._context.lineTo(t[0],e[0]):this._context.moveTo(t[0],e[0]),2===n)this._context.lineTo(t[1],e[1]);else for(var i=gY(t),r=gY(e),o=0,a=1;a<n;++o,++a)this._context.bezierCurveTo(i[0][o],r[0][o],i[1][o],r[1][o],t[a],e[a]);(this._line||0!==this._line&&1===n)&&this._context.closePath(),this._line=1-this._line,this._x=this._y=null},point:function(t,e){this._x.push(+t),this._y.push(+e)}},gX.prototype={areaStart:function(){this._line=0},areaEnd:function(){this._line=NaN},lineStart:function(){this._x=this._y=NaN,this._point=0},lineEnd:function(){0<this._t&&this._t<1&&2===this._point&&this._context.lineTo(this._x,this._y),(this._line||0!==this._line&&1===this._point)&&this._context.closePath(),this._line>=0&&(this._t=1-this._t,this._line=1-this._line)},point:function(t,e){switch(t*=1,e*=1,this._point){case 0:this._point=1,this._line?this._context.lineTo(t,e):this._context.moveTo(t,e);break;case 1:this._point=2;default:if(this._t<=0)this._context.lineTo(this._x,e),this._context.lineTo(t,e);else{var n=this._x*(1-this._t)+t*this._t;this._context.lineTo(n,this._y),this._context.lineTo(n,e)}}this._x=t,this._y=e}};class gJ extends hy{zoomIn(t,e,n){let i,r,o,a=n||su;t&&(i=t.x,r=t.y,o=2);let{width:s,height:l}=hv.getSVGElementSize(this.services.domUtils.getHolder(),{useClientDimensions:!0});e.transition().duration(a.duration).ease(a.ease).attr("transform",`translate(${s/2}, ${l/2}) scale(${o}) translate(${-i},${-r})`),this.services.events.dispatchEvent(tW.CanvasZoom.CANVAS_ZOOM_IN,{element:lP(t)})}zoomOut(t,e){let n=e||su;t.transition().duration(n.duration).ease(n.ease).attr("transform",""),this.services.events.dispatchEvent(tW.CanvasZoom.CANVAS_ZOOM_OUT)}}class g0 extends hy{init(){this.documentFragment=document.createDocumentFragment()}addEventListener(t,e){this.documentFragment.addEventListener(t,e)}removeEventListener(t,e){this.documentFragment.removeEventListener(t,e)}dispatchEvent(t,e){let n;e?n=new CustomEvent(t,{detail:e}):(n=document.createEvent("Event")).initEvent(t,!1,!0),this.documentFragment.dispatchEvent(n)}}class g1 extends hy{constructor(t,e){super(t,e)}downloadCSV(t,e){let n=document.createElement("a"),i="text/csv;encoding:utf-8";if(navigator.msSaveBlob)navigator.msSaveBlob(new Blob([t],{type:i}),e);else if(URL&&"download"in n){let r=URL.createObjectURL(new Blob([t],{type:i}));n.href=r,n.setAttribute("download",e),document.body.appendChild(n),n.click(),document.body.removeChild(n),URL.revokeObjectURL(r)}else location.href=`data:application/octet-stream,${encodeURIComponent(t)}`}downloadImage(t,e){let n=document.createElement("a");n.download=e,n.href=t,document.body.appendChild(n),n.click(),document.body.removeChild(n)}}class g2 extends hy{constructor(){super(...arguments),this.pendingTransitions={}}init(){this.services.events?.addEventListener(tW.Model.UPDATE,()=>{this.pendingTransitions={}})}setupTransition({transition:t,name:e,animate:n}){return this.pendingTransitions[t._id]=t,t.on("end interrupt cancel",()=>{delete this.pendingTransitions[t._id]}),!1===this.model.getOptions().animations||!1===n?t.duration(0):t.duration(sU(sg,e,"duration")||sg.default.duration)}getPendingTransitions(){return this.pendingTransitions}}function g3(t,e){let n=eE(t)-eE(e);return n<0?-1:n>0?1:n}function g5(t,e,n){let i=eE(t,n?.in);if(isNaN(e))return e_(t,NaN);if(!e)return i;let r=i.getDate(),o=e_(t,i.getTime());return o.setMonth(i.getMonth()+e+1,0),r>=o.getDate()?o:(i.setFullYear(o.getFullYear(),o.getMonth(),r),i)}function g4(t,e){let n=t.getFullYear()-e.getFullYear()||t.getMonth()-e.getMonth()||t.getDate()-e.getDate()||t.getHours()-e.getHours()||t.getMinutes()-e.getMinutes()||t.getSeconds()-e.getSeconds()||t.getMilliseconds()-e.getMilliseconds();return n<0?-1:n>0?1:n}function g8(t,e,n){let i=eE(t,n?.in);return isNaN(e)?e_(t,NaN):(e&&i.setDate(i.getDate()+e),i)}function g6(t){return t=>{let e=(0,Math.trunc)(t);return 0===e?0:e}}function g9(t,e,n){var i;return i=36e5*e,e_(t,+eE(t)+i)}function g7(t,e,n){let i=(eE(t)-eE(e))/6e4;return g6()(i)}function mt(t,e,n){let i=eE(t,n?.in);return i.setTime(i.getTime()+6e4*e),i}function me(t,e,n){let i=(eE(t)-eE(e))/1e3;return g6()(i)}function mn(t,e,n){var i;return i=1e3*e,e_(t,+eE(t)+i)}class mi extends hy{constructor(){super(...arguments),this.scaleTypes={top:null,right:null,bottom:null,left:null},this.scales={top:null,right:null,bottom:null,left:null}}getDomainAxisPosition({datum:t=null}={}){if(this.dualAxes&&t){let e=this.model.getOptions(),{groupMapsTo:n}=e.data,i=sU(e,"axes",this.secondaryDomainAxisPosition),r=t[n];if(i?.correspondingDatasets&&i.correspondingDatasets.includes(r))return this.secondaryDomainAxisPosition}return this.domainAxisPosition}getRangeAxisPosition({datum:t=null,groups:e=null}={}){if(this.dualAxes){let n,i=this.model.getOptions(),{groupMapsTo:r}=i.data,o=sU(i,"axes",this.secondaryRangeAxisPosition);if(null!==t?n=t[r]:e&&e.length>0&&(n=e[0]),o?.correspondingDatasets&&o.correspondingDatasets.includes(n))return this.secondaryRangeAxisPosition}return this.rangeAxisPosition}getAxisOptions(t){return sU(this.model.getOptions(),"axes",t)}getDomainAxisOptions(){let t=this.getDomainAxisPosition();return this.getAxisOptions(t)}getRangeAxisOptions(){let t=this.getRangeAxisPosition();return this.getAxisOptions(t)}getScaleLabel(t){return this.getAxisOptions(t).title||(t===tq.BOTTOM||t===tq.TOP?"x-value":"y-value")}getDomainLabel(){return this.getScaleLabel(this.getDomainAxisPosition())}getRangeLabel(){return this.getScaleLabel(this.getRangeAxisPosition())}update(){this.determineAxisDuality(),this.findDomainAndRangeAxes(),this.determineOrientation(),Object.keys(tq).map(t=>tq[t]).forEach(t=>{this.scales[t]=this.createScale(t)})}findDomainAndRangeAxes(){let t=this.findVerticalAxesPositions(),e=this.findHorizontalAxesPositions(),n=this.findDomainAndRangeAxesPositions(t,e);this.domainAxisPosition=n.primaryDomainAxisPosition,this.rangeAxisPosition=n.primaryRangeAxisPosition,this.isDualAxes()&&(this.secondaryDomainAxisPosition=n.secondaryDomainAxisPosition,this.secondaryRangeAxisPosition=n.secondaryRangeAxisPosition)}determineOrientation(){(this.rangeAxisPosition===tq.LEFT||this.rangeAxisPosition===tq.RIGHT)&&(this.domainAxisPosition===tq.BOTTOM||this.domainAxisPosition===tq.TOP)?this.orientation=tJ.VERTICAL:this.orientation=tJ.HORIZONTAL}isDualAxes(){return this.dualAxes}determineAxisDuality(){let t=sU(this.model.getOptions(),"axes");(t[tq.LEFT]?.correspondingDatasets&&t[tq.RIGHT]||t[tq.RIGHT]?.correspondingDatasets&&t[tq.LEFT]||t[tq.TOP]?.correspondingDatasets&&t[tq.BOTTOM]||t[tq.BOTTOM]?.correspondingDatasets&&t[tq.TOP])&&(this.dualAxes=!0)}getCustomDomainValuesByposition(t){let e=sU(this.model.getOptions(),"axes",t,"domain");if(e&&!Array.isArray(e))throw Error(`Domain in ${t} axis is not a valid array`);if(Array.isArray(e)&&(this.scaleTypes[t]===t0.LINEAR||this.scaleTypes[t]===t0.TIME)&&2!==e.length)throw Error(`There can only be 2 elements in domain for scale type: ${this.scaleTypes[t]}`);return e}getOrientation(){return this.orientation}getScaleByPosition(t){return this.scales[t]}getScaleTypeByPosition(t){return this.scaleTypes[t]}getDomainAxisScaleType(){let t=this.getDomainAxisPosition();return this.getScaleTypeByPosition(t)}getRangeAxisScaleType(){let t=this.getRangeAxisPosition();return this.getScaleTypeByPosition(t)}getDomainScale(){return this.scales[this.domainAxisPosition]}getRangeScale(){return this.scales[this.rangeAxisPosition]}getMainXAxisPosition(){let t=[tq.BOTTOM,tq.TOP];return[this.domainAxisPosition,this.rangeAxisPosition].find(e=>t.indexOf(e)>-1)}getMainYAxisPosition(){let t=[tq.LEFT,tq.RIGHT];return[this.domainAxisPosition,this.rangeAxisPosition].find(e=>t.indexOf(e)>-1)}getMainXScale(){return this.scales[this.getMainXAxisPosition()]}getMainYScale(){return this.scales[this.getMainYAxisPosition()]}getValueFromScale(t,e,n,i){let r,{mapsTo:o}=sU(this.model.getOptions(),"axes")[n],a=null!==sU(i,o)?i[o]:i;switch(e){case t0.LABELS:r=t(a)+t.step()/2;break;case t0.TIME:r=t(new Date(a));break;default:r=t(a)}return r}getBoundedScaledValues(t){let{bounds:e}=this.model.getOptions(),n=this.getRangeAxisPosition({datum:t}),i=this.scales[n],{mapsTo:r}=sU(this.model.getOptions(),"axes")[n],o=void 0!==t[r]?t[r]:t;return[i(null!==sU(t,e.upperBoundMapsTo)?t[e.upperBoundMapsTo]:o),i(null!==sU(t,e.lowerBoundMapsTo)?t[e.lowerBoundMapsTo]:o)]}getValueThroughAxisPosition(t,e){let n=this.scaleTypes[t],i=this.scales[t];return this.getValueFromScale(i,n,t,e)}getDomainValue(t){let e=this.getDomainAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getRangeValue(t){let e=this.getRangeAxisPosition({datum:t});return this.getValueThroughAxisPosition(e,t)}getMainXScaleType(){return this.getScaleTypeByPosition(this.getMainXAxisPosition())}getMainYScaleType(){return this.getScaleTypeByPosition(this.getMainYAxisPosition())}getDomainIdentifier(t){return sU(this.model.getOptions(),"axes",this.getDomainAxisPosition({datum:t}),"mapsTo")}getRangeIdentifier(t){return sU(this.model.getOptions(),"axes",this.getRangeAxisPosition({datum:t}),"mapsTo")}extendsDomain(t,e){var n,i;let r,o,a=this.model.getOptions(),s=sU(a,"axes",t);return s.scaleType===t0.TIME?(n=e,i=sU(a,"timeScale","addSpaceOnEdges"),r=new Date(n[0]),function(t,e,n){let[i,r]=eb(void 0,t,e),o=g3(i,r),a=Math.abs(function(t,e,n){let[i,r]=eb(void 0,t,e);return i.getFullYear()-r.getFullYear()}(i,r));i.setFullYear(1584),r.setFullYear(1584);let s=g3(i,r)===-o,l=o*(a-s);return 0===l?0:l}(o=new Date(n[1]),r)>1?[g5(r,-(12*i),void 0),g5(o,12*i,void 0)]:function(t,e,n){var i;let r,o,a,s,[l,c,u]=eb(void 0,t,t,e),h=g3(c,u),d=Math.abs(function(t,e,n){let[i,r]=eb(void 0,t,e);return 12*(i.getFullYear()-r.getFullYear())+(i.getMonth()-r.getMonth())}(c,u));if(d<1)return 0;1===c.getMonth()&&c.getDate()>27&&c.setDate(30),c.setMonth(c.getMonth()-h*d);let f=g3(c,u)===-h;+(r=eE(l,void 0),(o=eE(r,i?.in)).setHours(23,59,59,999),o)==+(s=(a=eE(r,i?.in)).getMonth(),a.setFullYear(a.getFullYear(),s+1,0),a.setHours(23,59,59,999),a)&&1===d&&1===g3(l,u)&&(f=!1);let p=h*(d-f);return 0===p?0:p}(o,r)>1?[g5(r,-i,void 0),g5(o,i)]:function(t,e,n){let[i,r]=eb(void 0,t,e),o=g4(i,r),a=Math.abs(sz(i,r));i.setDate(i.getDate()-o*a);let s=+(g4(i,r)===-o),l=o*(a-s);return 0===l?0:l}(o,r)>1?[g8(r,-i,void 0),g8(o,i)]:function(t,e,n){let[i,r]=eb(void 0,t,e);return g6()((i-r)/36e5)}(o,r)>1?[g9(r,-i),g9(o,i)]:g7(o,r)>30?[mt(r,-(30*i),void 0),mt(o,30*i)]:g7(o,r)>1?[mt(r,-i,void 0),mt(o,i)]:me(o,r)>15?[mn(r,-(15*i)),mn(o,15*i)]:me(o,r)>1?[mn(r,-i),mn(o,i)]:[r,o]):function([t,e],n,i){let r=(e-t)*.1,o=t>=0&&t-r<0?0:t-r;if(i===t0.LOG&&o<=0){if(t<=0)throw Error("Data must have values greater than 0 if log scale type is used.");o=t}return[o,e<=0&&e+r>0?0:e+r]}(e,.1,s.scaleType)}findVerticalAxesPositions(){let t=sU(this.model.getOptions(),"axes"),e=this.isDualAxes();return null===sU(t,tq.LEFT)&&null!==sU(t,tq.RIGHT)||!0===sU(t,tq.RIGHT,"main")||e&&sU(t,tq.LEFT,"correspondingDatasets")?{primary:tq.RIGHT,secondary:tq.LEFT}:{primary:tq.LEFT,secondary:tq.RIGHT}}findHorizontalAxesPositions(){let t=sU(this.model.getOptions(),"axes"),e=this.isDualAxes();return null===sU(t,tq.BOTTOM)&&null!==sU(t,tq.TOP)||!0===sU(t,tq.TOP,"main")||e&&sU(t,tq.BOTTOM,"correspondingDatasets")?{primary:tq.TOP,secondary:tq.BOTTOM}:{primary:tq.BOTTOM,secondary:tq.TOP}}findDomainAndRangeAxesPositions(t,e){let n=this.model.getOptions(),i=sU(n,"axes",t.primary),r=sU(n,"axes",e.primary),o=i.scaleType||t0.LINEAR,a=r.scaleType||t0.LINEAR,s={primaryDomainAxisPosition:null,secondaryDomainAxisPosition:null,primaryRangeAxisPosition:null,secondaryRangeAxisPosition:null};return s.primaryDomainAxisPosition=e.primary,s.primaryRangeAxisPosition=t.primary,s.secondaryDomainAxisPosition=e.secondary,s.secondaryRangeAxisPosition=t.secondary,(a!==t0.LABELS&&a!==t0.TIME&&o===t0.LABELS||o===t0.TIME)&&(s.primaryDomainAxisPosition=t.primary,s.primaryRangeAxisPosition=e.primary,s.secondaryDomainAxisPosition=t.secondary,s.secondaryRangeAxisPosition=e.secondary),s}getScaleDomain(t){let e,n,i=this.model.getOptions(),r=sU(i,"axes",t),o=sU(i,"bounds"),{includeZero:a}=r,s=sU(r,"scaleType")||t0.LINEAR;if(this.model.isDataEmpty())return[];if(r.binned){let{bins:t}=this.model.getBinConfigurations();return[0,function(t,e){let n;if(void 0===e)for(let e of t)null!=e&&(n<e||void 0===n&&e>=e)&&(n=e);else{let i=-1;for(let r of t)null!=(r=e(r,++i,t))&&(n<r||void 0===n&&r>=r)&&(n=r)}return n}(t,t=>t.length)]}if(r.limitDomainToBins){let{bins:t}=this.model.getBinConfigurations(),e=this.model.getStackKeys({bins:t});return[e[0].split(":")[0],e[e.length-1].split(":")[1]]}let l=this.model.getDisplayData(),{extendLinearDomainBy:c,mapsTo:u,percentage:h,thresholds:d}=r,{reference:f,compareTo:p}=sl;if(r.domain)return s===t0.LABELS?r.domain:(s===t0.TIME&&(r.domain=r.domain.map(t=>void 0===t.getTime?new Date(t):t)),this.extendsDomain(t,r.domain));if(h)return[0,100];if(r&&s===t0.LABELS)return rx(l.map(t=>t[u]));let g=this.model.getDataGroupNames();if(s===t0.LABELS_RATIO)return l.map(t=>`${t[f]}/${t[p]}`);if(s===t0.TIME)n=l.map(t=>+new Date(t[u]));else if(o&&i.axes)n=[],l.forEach(t=>{n.push(t[u]),t[o.upperBoundMapsTo]&&n.push(t[o.upperBoundMapsTo]),t[o.lowerBoundMapsTo]&&n.push(t[o.lowerBoundMapsTo])});else if(!0===r.stacked&&g&&t===this.getRangeAxisPosition()){let{groupMapsTo:t}=i.data,e=this.model.getDataValuesGroupedByKeys({groups:g}),r=l.filter(e=>!g.includes(e[t])),o=[];e.forEach(t=>{let{...e}=t,n=0,i=0;Object.values(gl(e,"sharedStackKey")).forEach(t=>{isNaN(t)||(t<0?i+=t:n+=t)}),o.push([i,n])}),n=[...go(o),...r.map(t=>t[u])]}else n=[],l.forEach(t=>{let e=t[u];Array.isArray(e)&&2===e.length?(n.push(e[0]),n.push(e[1])):(c&&n.push(Math.max(t[u],t[c])),n.push(e))});return s!==t0.TIME&&s!==t0.LOG&&a&&n.push(0),d&&d.length>0&&d.forEach(t=>{let e=sU(t,"value");null!==e&&n.push(e)}),e=rM(n),e=this.extendsDomain(t,e)}createScale(t){let e,n=sU(this.model.getOptions(),"axes",t);if(!n)return null;let i=sU(n,"scaleType")||t0.LINEAR;return this.scaleTypes[t]=i,(e=i===t0.TIME?uy():i===t0.LOG?(function t(){let e=(function(t){let e=t(gc,gu),n=e.domain,i=10,r,o;function a(){var a,s;return r=(a=i)===Math.E?Math.log:10===a&&Math.log10||2===a&&Math.log2||(a=Math.log(a),t=>Math.log(t)/a),o=10===(s=i)?gf:s===Math.E?Math.exp:t=>Math.pow(s,t),n()[0]<0?(r=gp(r),o=gp(o),t(gh,gd)):t(gc,gu),e}return e.base=function(t){return arguments.length?(i=+t,a()):i},e.domain=function(t){return arguments.length?(n(t),a()):n()},e.ticks=t=>{let e=n(),a=e[0],s=e[e.length-1],l=s<a;l&&([a,s]=[s,a]);let c=r(a),u=r(s),h,d,f=null==t?10:+t,p=[];if(!(i%1)&&u-c<f){if(c=Math.floor(c),u=Math.ceil(u),a>0){for(;c<=u;++c)for(h=1;h<i;++h)if(!((d=c<0?h/o(-c):h*o(c))<a)){if(d>s)break;p.push(d)}}else for(;c<=u;++c)for(h=i-1;h>=1;--h)if(!((d=c>0?h/o(-c):h*o(c))<a)){if(d>s)break;p.push(d)}2*p.length<f&&(p=rN(a,s,f))}else p=rN(c,u,Math.min(u-c,f)).map(o);return l?p.reverse():p},e.tickFormat=(t,n)=>{if(null==t&&(t=10),null==n&&(n=10===i?"s":","),"function"!=typeof n&&(i%1||null!=(n=aX(n)).precision||(n.trim=!0),n=d$(n)),t===1/0)return n;let a=Math.max(1,i*t/e.ticks().length);return t=>{let e=t/o(Math.round(r(t)));return e*i<i-.5&&(e*=i),e<=a?n(t):""}},e.nice=()=>n(lB(n(),{floor:t=>o(Math.floor(r(t))),ceil:t=>o(Math.ceil(r(t)))})),e})(sn()).domain([1,10]);return e.copy=()=>se(e,t()).base(e.base()),a2.apply(e,arguments),e})().base(n.base||10):i===t0.LABELS||i===t0.LABELS_RATIO?lU():si()).domain(this.getScaleDomain(t)),e}getDomainLowerBound(t){let e,n=0;return e=this.getOrientation()===tJ.VERTICAL?this.getMainYScale().domain():this.getMainXScale().domain(),!1===sU(this.model.getOptions(),"axes",t,"includeZero")&&e[0]>0&&e[1]>0&&(n=e[0]),n}getHighestDomainThreshold(){let t=sU(this.model.getOptions(),"axes"),e=this.getDomainAxisPosition(),{thresholds:n}=t[e];if(!Array.isArray(n)||Array.isArray(n)&&!n.length)return null;let i=this.getDomainScale(),r=n.sort((t,e)=>e.value-t.value)[0];return this.getScaleTypeByPosition(e)===t0.TIME&&("string"==typeof r.value||void 0===r.value.getTime)&&(r.value=new Date(r.value)),{threshold:r,scaleValue:i(r.value)}}getHighestRangeThreshold(){let{thresholds:t}=sU(this.model.getOptions(),"axes")[this.getRangeAxisPosition()];if(!Array.isArray(t)||Array.isArray(t)&&!t.length)return null;let e=this.getRangeScale(),n=t.sort((t,e)=>e.value-t.value)[0];return{threshold:n,scaleValue:e(n.value)}}}class mr extends hy{constructor(){super(...arguments),this.curveTypes={curveLinear:uk,curveLinearClosed:uR,curveBasis:gy,curveBasisClosed:g_,curveBasisOpen:gx,curveBundle:gw,curveCardinal:gO,curveCardinalClosed:gA,curveCardinalOpen:gk,curveCatmullRom:gR,curveCatmullRomClosed:gN,curveCatmullRomOpen:gU,curveMonotoneX:gG,curveMonotoneY:gV,curveNatural:gZ,curveStep:gq,curveStepAfter:gQ,curveStepBefore:gK}}getD3Curve(){let t="curveLinear",e=this.model.getOptions().curve;if(e&&(t="string"==typeof e?e:e.name),this.curveTypes[t]){let n=this.curveTypes[t];return e&&Object.keys(e).forEach(t=>{n[t]&&(n=n[t](e[t]))}),n}return console.warn(`The curve type '${t}' is invalid, using 'curveLinear' instead`),this.curveTypes.curveLinear}}class mo extends hy{isZoomBarEnabled(){if(!this.services.cartesianScales||!sU(this.model.getOptions(),"zoomBar","top","enabled"))return!1;this.services.cartesianScales.findDomainAndRangeAxes();let t=this.services.cartesianScales.getMainXAxisPosition(),e=sU(this.model.getOptions(),"axes",t,"scaleType");return t===tq.BOTTOM&&e===t0.TIME}getZoomBarData(){let t=this.model.getZoomBarData();return t&&t.length>1?t:this.model.getDisplayData()}getDefaultZoomBarDomain(t){if(!this.services.zoom)throw Error("Services zoom not defined");let e=t||this.services.zoom.getZoomBarData(),{cartesianScales:n}=this.services;if(!n)throw Error("Services cartesianScales undefined");let i=n.getMainXAxisPosition(),r=n.getDomainIdentifier(),o=sU(this.model.getOptions(),"axes",i,"domain");if(Array.isArray(o)&&2===o.length)return o;if(!i)throw Error("Not defined: mainXAxisPosition");return n.extendsDomain(i,rM(e,t=>t[r]))}handleDomainChange(t,e={dispatchEvent:!0}){this.model.set({zoomDomain:t},{animate:!1}),e.dispatchEvent&&this.services.events?.dispatchEvent(tW.ZoomDomain.CHANGE,{newDomain:t})}getZoomRatio(){return sU(this.model.getOptions(),"zoomBar","zoomRatio")}filterDataForRangeAxis(t,e){let n=this.model.get("zoomDomain"),i=Object.assign({stacked:!1},e),r=sU(this.model.getOptions(),"zoomBar","updateRangeAxis");if(this.isZoomBarEnabled()&&r&&n){let e=i.stacked?"sharedStackKey":this.services.cartesianScales?.getDomainIdentifier(),r=t.filter(t=>new Date(t[e])>=n[0]&&new Date(t[e])<=n[1]);if(r.length>0)return r}return t}zoomIn(t=this.getZoomRatio()){let e=this.model.get("zoomDomain"),n=this.services.cartesianScales?.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());let i=n(e[0]),r=n(e[1]);if(r-i<6)return;let o=n.range(),a=r-i,s=Math.min((o[1]-o[0])/2*(t/2),a/2),l=i+s,c=r-s;l>=c&&(l=i+a/2-2.5,c=r-a/2+2.5);let u=[n.invert(l),n.invert(c)];(e[0].valueOf()!==u[0].valueOf()||e[1].valueOf()!==u[1].valueOf())&&this.handleDomainChange(u)}zoomOut(t=this.getZoomRatio()){let e=this.model.get("zoomDomain");if(!this.services.cartesianScales)throw Error("Services cartesianScales undefined");let n=this.services.cartesianScales.getMainXScale().copy();n.domain(this.getDefaultZoomBarDomain());let i=n(e[0]),r=n(e[1]),o=n.range(),a=(o[1]-o[0])/2*(t/2),s=Math.max(i-a,o[0]),l=Math.min(r+a,o[1]),c=[n.invert(s),n.invert(l)];(e[0].valueOf()!==c[0].valueOf()||e[1].valueOf()!==c[1].valueOf())&&this.handleDomainChange(c)}resetZoomDomain(){let t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();(t[0].valueOf()!==e[0].valueOf()||t[1].valueOf()!==e[1].valueOf())&&this.handleDomainChange(e)}isMinZoomDomain(){let t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!!t&&!!e&&(t[1].valueOf()-t[0].valueOf())/(e[1].valueOf()-e[0].valueOf())<sU(this.model.getOptions(),"zoomBar","minZoomRatio")}isMaxZoomDomain(){let t=this.model.get("zoomDomain"),e=this.getDefaultZoomBarDomain();return!!(t&&e&&t[0].valueOf()===e[0].valueOf()&&t[1].valueOf()===e[1].valueOf())}isEmptyState(){return 0===this.getZoomBarData().length}isZoomBarLoading(t){return sU(this.model.getOptions(),"zoomBar",t,"loading")}isZoomBarLocked(t){return sU(this.model.getOptions(),"zoomBar",t,"locked")}}var ma=RegExp("[\\u200d\ud800-\udfff\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff\\ufe0e\\ufe0f]"),ms="\ud800-\udfff",ml="[\\u0300-\\u036f\\ufe20-\\ufe2f\\u20d0-\\u20ff]",mc="\ud83c[\udffb-\udfff]",mu="[^"+ms+"]",mh="(?:\ud83c[\udde6-\uddff]){2}",md="[\ud800-\udbff][\udc00-\udfff]",mf="(?:"+ml+"|"+mc+")?",mp="[\\ufe0e\\ufe0f]?",mg="(?:\\u200d(?:"+[mu,mh,md].join("|")+")"+mp+mf+")*",mm=RegExp(mc+"(?="+mc+")|"+("(?:"+[mu+ml+"?",ml,mh,md,"["+ms+"]"].join("|"))+")"+(mp+mf+mg),"g"),my=function(t){var e,n,i,r=(e=t=n6(t),ma.test(e))?function(t){return ma.test(t)?t.match(mm)||[]:t.split("")}(t):void 0,o=r?r[0]:t.charAt(0),a=r?(i=r.length,ga(r,1,n=void 0===n?i:n)).join(""):t.slice(1);return o.toUpperCase()+a};hY(function(t,e,n){return e=e.toLowerCase(),t+(n?my(n6(e).toLowerCase()):e)});class mv{constructor(t,e){this.components=[],this.services={canvasZoom:gJ,domUtils:hv,events:g0,files:g1,gradientUtils:h_,transitions:g2},this.model=new lw(this.services)}init(t,e){this.model.set({holder:t},{skipUpdate:!0}),Object.keys(this.services).forEach(t=>{let e=this.services[t];this.services[t]=new e(this.model,this.services)}),this.services.events.addEventListener(tW.Model.UPDATE,t=>{let e=!!sU(t,"detail","animate");this.update(e)}),this.model.setData(e.data),this.services.events.addEventListener(tW.Chart.RESIZE,()=>{this.update(!1)}),this.components=this.getComponents(),this.update()}getComponents(){return console.error("getComponents() method is not implemented"),[]}update(t=!0){if(!this.components)return;Object.keys(this.services).forEach(t=>{this.services[t].update()}),this.components.forEach(e=>e.render(t));let e=this.services.transitions.getPendingTransitions();Promise.all(Object.keys(e).map(t=>e[t].end().catch(t=>t))).then(()=>this.services.events.dispatchEvent(tW.Chart.RENDER_FINISHED))}destroy(){this.components.forEach(t=>t.destroy()),this.services.domUtils.getHolder().remove(),this.model.set({destroyed:!0},{skipUpdate:!0})}getChartComponents(t,e){let n=this.model.getOptions(),i=sU(n,"toolbar","enabled"),r={id:"legend",components:[new pH(this.model,this.services)],growth:t8.PREFERRED},o=sU(n,"canvasZoom","enabled");o&&!0===o&&t.push(new pz(this.model,this.services));let a=!!this.model.getOptions().title,s={id:"title",components:[new pF(this.model,this.services)],growth:t8.STRETCH},l={id:"toolbar",components:[new pN(this.model,this.services)],growth:t8.PREFERRED},c={id:"header",components:[new pP(this.model,this.services,[s,...i?[l]:[]],{direction:t4.ROW,alignItems:t6.CENTER})],growth:t8.PREFERRED},u={id:"graph-frame",components:t,growth:t8.STRETCH,renderType:sU(e,"graphFrameRenderType")||tY.SVG},h=!0!==sU(e,"excludeLegend")&&!1!==n.legend.enabled,d=t4.COLUMN;if(h){let t=sU(n,"legend","position");"left"===t?(d=t4.ROW,n.legend.orientation||(n.legend.orientation=t3.VERTICAL)):"right"===t?(d=t4.ROW_REVERSE,n.legend.orientation||(n.legend.orientation=t3.VERTICAL)):"bottom"===t&&(d=t4.COLUMN_REVERSE)}let f={id:"spacer",components:[new pU(this.model,this.services)],growth:t8.PREFERRED},p={id:"full-frame",components:[new pP(this.model,this.services,[...h?[r]:[],...h?[f]:[],u],{direction:d})],growth:t8.STRETCH},g=[];if(a||i){g.push(c);let t={id:"spacer",components:[new pU(this.model,this.services,i?{size:15}:void 0)],growth:t8.PREFERRED};g.push(t)}return g.push(p),[new pW(this.model,this.services),new pB(this.model,this.services),new pP(this.model,this.services,g,{direction:t4.COLUMN})]}}class m_ extends mv{constructor(t,e){super(t,e),this.services=Object.assign(this.services,{cartesianScales:mi,curves:mr,zoom:mo}),this.model=new lT(this.services)}getAxisChartComponents(t,e){let n=this.model.getOptions(),i=sU(n,"zoomBar",tq.TOP,"enabled"),r=sU(n,"toolbar","enabled");this.services.cartesianScales.determineAxisDuality(),this.services.cartesianScales.findDomainAndRangeAxes(),this.services.cartesianScales.determineOrientation();let o=this.services.cartesianScales.getMainXAxisPosition(),a=sU(n,"axes",o,"scaleType"),s=i&&o===tq.BOTTOM&&a===t0.TIME,l=this.services.zoom.isZoomBarLocked(tq.TOP),c=!!this.model.getOptions().title,u={id:"title",components:[new pF(this.model,this.services)],growth:t8.STRETCH},h={id:"toolbar",components:[new pN(this.model,this.services)],growth:t8.PREFERRED},d={id:"header",components:[new pP(this.model,this.services,[u,...r?[h]:[]],{direction:t4.ROW,alignItems:t6.CENTER})],growth:t8.PREFERRED},f={id:"legend",components:[new pH(this.model,this.services)],growth:t8.PREFERRED};s&&!l&&t.push(new p$(this.model,this.services),new pY(this.model,this.services)),t.push(new pX(this.model,this.services)),t.push(new pq(this.model,this.services));let p={id:"graph-frame",components:t,growth:t8.STRETCH,renderType:tY.SVG},g=!1!==sU(e,"legend","enabled")&&!1!==this.model.getOptions().legend.enabled,m=t4.COLUMN;if(g){let t=sU(this.model.getOptions(),"legend","position");t===t1.LEFT?(m=t4.ROW,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=t3.VERTICAL)):t===t1.RIGHT?(m=t4.ROW_REVERSE,this.model.getOptions().legend.orientation||(this.model.getOptions().legend.orientation=t3.VERTICAL)):t===t1.BOTTOM&&(m=t4.COLUMN_REVERSE)}let y={id:"spacer",components:[new pU(this.model,this.services)],growth:t8.PREFERRED},v={id:"full-frame",components:[new pP(this.model,this.services,[...g?[f]:[],...g?[y]:[],p],{direction:m})],growth:t8.STRETCH},_={id:"zoom-bar",components:[new pZ(this.model,this.services)],growth:t8.PREFERRED,renderType:tY.SVG},b=[];if(c||r){b.push(d);let t={id:"spacer",components:[new pU(this.model,this.services,r?{size:15}:void 0)],growth:t8.PREFERRED};b.push(t)}return s&&b.push(_),b.push(v),[new pK(this.model,this.services),new pB(this.model,this.services),new pP(this.model,this.services,b,{direction:t4.COLUMN})]}}ea.LINE,ea.SCATTER,ea.AREA,ea.STACKED_AREA,ea.SIMPLE_BAR,ea.GROUPED_BAR,ea.STACKED_BAR;class mb extends m_{constructor(t,e){super(t,e),this.model.setOptions(function(t,e){let n=i5(t,5),i=Object.keys(e.axes||{});for(let t in e?.toolbar?.controls&&delete n.toolbar.controls,0===i.length&&delete n.axes,n.axes)if(i.includes(t)){let n=e.axes[t];if((n.primary||n.secondary)&&console.warn("`primary` & `secondary` are no longer needed for axis configurations. Read more here https://charts.carbondesignsystem.com/"),null==n.mapsTo){let t=n.scaleType;null==t?n.mapsTo="value":t===t0.TIME?n.mapsTo="date":t===t0.LABELS&&(n.mapsTo="key")}}else delete n.axes[t];return sP(n,e),ry(n,e)}(sD,e.options)),this.init(t,e)}getComponents(){let t=[new p4(this.model,this.services),new p2(this.model,this.services),new p7(this.model,this.services),new p6(this.model,this.services),new p8(this.model,this.services,{skeleton:t7.VERT_OR_HORIZ})];return this.getAxisChartComponents(t)}}class mx extends tv.PureComponent{chart;chartRef=tv.createRef();createChart(t,e,n){throw Error("Method not implemented.")}componentDidMount(){this.chartRef.current&&!this.chart&&(this.chart=this.createChart(this.chartRef.current,this.props.data,this.props.options))}componentDidUpdate(t){this.props.data!==t.data&&this.chart?.model.setData(this.props.data),this.props.options!==t.options&&this.chart?.model.setOptions(this.props.options)}render(){return tv.createElement("div",{ref:this.chartRef,className:"chart-holder"})}}class mE extends mx{createChart(t,e,n){return new mb(t,{data:e,options:n})}}var mw={exports:{}};ty||(ty=1,function(t){var e={}.hasOwnProperty;function n(){for(var t="",r=0;r<arguments.length;r++){var o=arguments[r];o&&(t=i(t,function(t){if("string"==typeof t||"number"==typeof t)return t;if("object"!=typeof t)return"";if(Array.isArray(t))return n.apply(null,t);if(t.toString!==Object.prototype.toString&&!t.toString.toString().includes("[native code]"))return t.toString();var r="";for(var o in t)e.call(t,o)&&t[o]&&(r=i(r,o));return r}(o)))}return t}function i(t,e){return e?t?t+" "+e:t+e:t}t.exports?(n.default=n,t.exports=n):window.classNames=n}(mw)),mw.exports}}]);