1import{r as e}from"./rolldown-runtime-hePW80VL.js";import{i as t,t as n}from"./index-ao0YZA6W.js";import{qn as r,rn as i}from"./SideNavLayout-CqAX2xpZ.js";import{Bn as a,Ct as o,J as s,S as c,Vn as l,Y as u,Yn as d,Yt as f,bn as p,cn as m,nr as h,tr as g,tt as _,w as v,x as y,zn as b}from"./Chart-DVx_paKx.js";import{s as x,t as S}from"./dates-CdtyJ_Qv.js";import{n as C,o as w,r as T,s as E}from"./CartesianChart-B6lP43YJ.js";import{n as D}from"./getRadiusAndStrokeWidthFromDot-By74CW1M.js";var O=e(t());function k(e,t){var n=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);t&&(r=r.filter(function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})),n.push.apply(n,r)}return n}function A(e){for(var t=1;t<arguments.length;t++){var n=arguments[t]==null?{}:arguments[t];t%2?k(Object(n),!0).forEach(function(t){j(e,t,n[t])}):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(n)):k(Object(n)).forEach(function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(n,t))})}return e}function j(e,t,n){return(t=M(t))in e?Object.defineProperty(e,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):e[t]=n,e}function M(e){var t=N(e,`string`);return typeof t==`symbol`?t:t+``}function N(e,t){if(typeof e!=`object`||!e)return e;var n=e[Symbol.toPrimitive];if(n!==void 0){var r=n.call(e,t||`default`);if(typeof r!=`object`)return r;throw TypeError(`@@toPrimitive must return a primitive value.`)}return(t===`string`?String:Number)(e)}function P(){return P=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)({}).hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},P.apply(null,arguments)}var F=(e,t,n,r,i,a,o)=>{var{x1:s,x2:c,y1:l,y2:u}=o;if(i==null||a==null)return null;var d=new D({x:i,y:a}),f={x:e?i.map(s,{position:`start`})??null:i.rangeMin(),y:n?a.map(l,{position:`start`})??null:a.rangeMin()},p={x:t?i.map(c,{position:`end`})??null:i.rangeMax(),y:r?a.map(u,{position:`end`})??null:a.rangeMax()};return o.ifOverflow===`discard`&&(!d.isInRange(f)||!d.isInRange(p))?null:E(f,p)},I=(e,t)=>O.isValidElement(e)?O.cloneElement(e,t):typeof e==`function`?e(t):O.createElement(m,P({},t,{className:`recharts-reference-area-rect`}));function L(e){var t=b();return(0,O.useEffect)(()=>(t(c(e)),()=>{t(v(e))})),null}function R(e){var{x1:t,x2:n,y1:i,y2:c,className:l,shape:f,xAxisId:m,yAxisId:v}=e,b=y(),x=p(),S=a(e=>o(e,`xAxis`,m,x)),C=a(e=>o(e,`yAxis`,v,x));if(S==null||C==null)return null;var w=d(t),T=d(n),E=d(i),D=d(c);if(!w&&!T&&!E&&!D&&!f)return null;var k=F(w,T,E,D,S,C,e);if(!k&&!f)return null;var j=e.ifOverflow===`hidden`?`url(#${b})`:void 0;return O.createElement(_,{zIndex:e.zIndex},O.createElement(g,{className:r(`recharts-reference-area`,l)},I(f,A(A({clipPath:j},h(e)),k)),k!=null&&O.createElement(s,P({},k,{lowerWidth:k.width,upperWidth:k.width}),O.createElement(u,{label:e.label}),e.children)))}var z={ifOverflow:`discard`,xAxisId:0,yAxisId:0,radius:0,fill:`#ccc`,label:!1,fillOpacity:.5,stroke:`none`,strokeWidth:1,zIndex:f.area};function B(e){var t=l(e,z);return O.createElement(O.Fragment,null,O.createElement(L,{yAxisId:t.yAxisId,xAxisId:t.xAxisId,ifOverflow:t.ifOverflow,x1:t.x1,x2:t.x2,y1:t.y1,y2:t.y2}),O.createElement(R,t))}B.displayName=`ReferenceArea`;var V=n();function H(){return(0,V.jsxs)(`pattern`,{id:`noDataFill`,patternUnits:`userSpaceOnUse`,width:`20`,height:`20`,patternTransform:`rotate(45)`,children:[(0,V.jsx)(`rect`,{width:`10`,height:`20`,fill:`var(--secondary)`,fillOpacity:.25,className:`dark:hidden`}),(0,V.jsx)(`rect`,{width:`10`,height:`20`,fill:`var(--secondary)`,fillOpacity:.5,className:`not-dark:hidden`})]})}var U={dataKey:`timestamp`,tickLine:!1,axisLine:!1};function W(e){if(!e||e.length===0)return{...U,ticks:[]};let t=e.map(e=>e.timestamp),n=i(Math.min(...t)),r=i(Math.max(...t)),a=(i.toStartOf(r,`day`)-i.toStartOf(n,`day`))/i.DAY;return{...U,ticks:t.filter(G(a)),tickFormatter:K(a)}}function G(e){return t=>{let n=i(t),r=i.toDate(n);return e<=1?t%(4*i.HOUR)==0:e<=7?t%i.DAY===0:e<=30?n%i.DAY===0&&r.getDay()===1:e<=90?(t+3*i.DAY)%(21*i.DAY)==0:e<=180?n%i.DAY===0&&r.getDate()===1:e<=365?n%i.DAY===0&&r.getDate()===1&&r.getMonth()%2==0:e<=1095?n%i.DAY===0&&r.getDate()===1&&r.getMonth()%4==0:n%i.DAY===0&&r.getDate()===1&&r.getMonth()===0}}function K(e){return t=>{let{month:n,day:r,time:i,year:a}=x(t);return e<=1?i:e<=90?`${r} ${S[n]?.shortName}`:e<=1095?`${S[n]?.shortName} â${a.slice(-2)}`:a}}function q({data:e,yAxis:t,xAxis:n,isLoading:r,chartType:i=`line`,syncedUntil:a}){let{tickCount:o,yAxisId:s,...c}=t??{},l=a&&(i===`line`?e?.findLast(e=>e.timestamp<=a):e?.find(e=>e.timestamp>a))?.timestamp;return(0,V.jsxs)(V.Fragment,{children:[(0,V.jsx)(w,{vertical:!1,syncWithTicks:!r,yAxisId:s,zIndex:f.line+1}
1,`cartesian-grid`),(0,V.jsx)(C,{tickLine:!1,axisLine:!1,mirror:!0,tickCount:o??3,dy:-10,tick:{width:350},yAxisId:s,...c},`y-axis`),(0,V.jsx)(T,{...W(e),...n},`x-axis`),l&&(0,V.jsx)(B,{yAxisId:t?.yAxisId,x1:l,fill:`url(#noDataFill)`},`last-valid-timestamp`),l&&(0,V.jsx)(`defs`,{children:(0,V.jsx)(H,{})},`not-synced-defs`)]})}export{B as a,H as i,G as n,K as r,q as t};
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.