!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof globalThis?globalThis:"undefined"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._posthogChunkIds=e._posthogChunkIds||{},e._posthogChunkIds[n]="01a099a4-b854-70b1-9bfb-214fdfa8208c")}catch(e){}}();(globalThis.TURBOPACK||(globalThis.TURBOPACK=[])).push(["object"==typeof document?document.currentScript:void 0,525211,e=>{"use strict";var t=e.i(222666),i=e.i(452473),a=e.i(779100),l=e.i(150049),r=e.i(288027),n=e.i(442427),s=e.i(196948),o=e.i(370066),u=e.i(270401),c=e.i(853976),d=e.i(73962),m=e.i(905854),f=e.i(642887),p=e.i(537457),h=e.i(487154),y=e.i(429088),x=e.i(287172),g=e.i(616776),b=e.i(691038),v=e.i(379165),j=e.i(203599),N=e.i(440409),w=e.i(20629),A=e.i(956302);let S="transparent",k={type:"number",scale:"time",domain:["dataMin","dataMax"]},T=new Set;function M(e){return"object"==typeof e&&null!==e}function C({dataKey:e,payload:t}){let i=M(t)?t[A.RECHART_X_LABEL]:void 0;return`${String(e)}-${String(i)}`}function R(e,t){return(0,o.formatNumber)(t||0,{locale:e,preset:"compact-significant-thousands"})??"—"}e.s(["StackedLineChart",0,function({data:e,className:o,height:L=A.RECHART_DEFAULT_HEIGHT,yAxisLabel:_,yAxisLabelOffset:D=-10,yAxisWidth:E=32,yAxisClassName:$,yAxisLabelClassName:F,allowTooltipToRight:O=!1,hiddenSeries:U=T,highlight:P,isAnimationActive:H=!1,colorMapping:B,seriesStyleMap:I,seriesLabels:W,yAxisMaxOnly:X,yAxisMaxLine:K,xAxisLine:q,zeroFillMissingSeries:z=!1,connectNulls:V=!0,lineType:Y="monotone",xAxisTimeScale:Z=!1,tooltipValueFormatter:G,yAxisTickFormatter:Q,yAxisDomain:J,tooltipShowZeroValues:ee=!1,tooltipMaxItems:et,tooltipOverflowMode:ei,highlightDimOpacity:ea,onSeriesClick:el,highlightHandleRef:er}){let en=(0,g.useDisplayTimezone)(),es=(0,l.useResolvedDisplayTimeZone)(en),eo=(0,a.useLocale)(),eu=(0,b.useMediaMd)(),ec=(0,b.useMatchMedia)("(hover: hover) and (pointer: fine)"),ed=(0,u.useCallback)(e=>W?.get(e)??e,[W]),em=(0,u.useRef)(void 0),ef=(0,u.useRef)(null),ep=(0,u.useRef)(null),eh=(0,u.useRef)(null),ey=(0,u.useRef)(null),ex=(0,u.useRef)(null),{containerRef:eg,tooltipWrapperStyle:eb,tooltipContentStyle:ev,tooltipAllowEscapeViewBox:ej}=(0,j.useRightMarginTooltipPlacement)({enabled:O&&eu}),{rechartsData:eN,containsMultipleYears:ew,containsMultipleDays:eA,yKeys:eS,isHighRes:ek}=(0,u.useMemo)(()=>{let t=(0,n.unique)(e.flatMap(e=>Object.keys(e.y))),i=e.map(e=>{let i=Z?(0,v.parseDateStringAsUTC)(e.x).getTime():e.x;if(!z)return{[A.RECHART_X_LABEL]:i,...e.y};let a={[A.RECHART_X_LABEL]:i};for(let i of t)a[i]=e.y[i]??0;return a}),a=e.map(e=>e.x),l=e.map(e=>({[A.RECHART_X_LABEL]:e.x})),r=(0,A.getChartAxesDetails)(l,a),s=a.length>1?(0,v.parseDateStringAsUTC)(a.at(-1)??"").getTime()-(0,v.parseDateStringAsUTC)(a[0]??"").getTime():0,o=Z?r.isHighRes&&s<=1728e5:r.isHighRes;return{rechartsData:i,yKeys:t,...r,isHighRes:o}},[e,z,Z]),eT=(0,u.useMemo)(()=>{if(z)return new Map;let t=new Map,i=(e,i)=>{let a=t.get(e)??new Set;a.add(i),t.set(e,a)},a=new Map;for(let[t,l]of e.entries()){let r=eN[t]?.[A.RECHART_X_LABEL];if(void 0===r)continue;let n=String(r);for(let r of eS)if("number"==typeof l.y[r]){if(V){let e=a.get(r);a.set(r,{count:(e?.count??0)+1,pointKey:e?.pointKey??n});continue}[t-1,t+1].some(t=>"number"==typeof e[t]?.y[r])||i(r,n)}}for(let[e,{count:t,pointKey:l}]of a)1===t&&i(e,l);return t},[V,e,eN,eS,z]),eM=(0,u.useCallback)(({dataKey:e,payload:t})=>!!M(t)&&(eT.get(String(e))?.has(String(t[A.RECHART_X_LABEL]))??!1),[eT]),eC=(0,u.useCallback)(({dataKey:e,payload:i,cx:a,cy:l})=>{if("number"!=typeof a||"number"!=typeof l||!eM({dataKey:e,payload:i}))return(0,t.jsx)("g",{},C({dataKey:e,payload:i}));let r=String(e);return(0,t.jsx)("circle",{cx:a,cy:l,r:3,fill:(0,w.getColorForSeries)(r,B),className:"recharts-line-dot"},C({dataKey:e,payload:i}))},[B,eM]),eR=(0,u.useCallback)(e=>eM(e)&&"number"==typeof e.cx&&"number"==typeof e.cy?(0,t.jsx)("circle",{cx:e.cx,cy:e.cy,r:8,fill:"transparent",stroke:"transparent",className:"recharts-line-dot"},C(e)):(0,t.jsx)("g",{},C(e)),[eM]),eL=(0,u.useCallback)(e=>{em.current=e,ep.current&&(ep.current.style.display="none");let t=ef.current;t&&eS.forEach((i,a)=>{let l=t.querySelector(`.sl-series-${a}`);if(!l)return;let r=e===i,n=String(ea??.2);void 0===e?l.style.opacity="":l.style.opacity=r?"1":n;let s=l.querySelector("path.recharts-curve");s&&(s.style.strokeWidth=r?"3":"",s.style.strokeOpacity=r?"1":"")})},[eS,ea]),e_=(0,u.useCallback)(e=>{let t=void 0!==e&&eS.includes(e)&&!U.has(e)?e:void 0;eL(t);let i=ep.current,a=ef.current;if(!i||!a)return;if(void 0===t){i.style.display="none";return}let l=eS.indexOf(t),r=a.querySelector(`.sl-series-${l} path.recharts-curve`),n=r?.getScreenCTM();if(!r||!n){i.style.display="none";return}let s=r.getPointAtLength(r.getTotalLength()),o=new DOMPoint(s.x,s.y).matrixTransform(n),u=a.getBoundingClientRect(),c=eN.findLast(e=>"number"==typeof e[t]),d=c?.[t],m=G??R.bind(null,eo);eh.current&&(eh.current.style.backgroundColor=(0,w.getColorForSeries)(t,B)),ey.current&&(ey.current.textContent=ed(t)),ex.current&&(ex.current.textContent="number"==typeof d?m(d):""),i.style.display="flex";let f=Math.max(0,Math.min(o.x-u.left+8,a.clientWidth-i.offsetWidth)),p=Math.max(0,o.y-u.top-i.offsetHeight-6);i.style.transform=`translate(${f}px, ${p}px)`},[eo,eL,U,eS,B,eN,G,ed]);(0,u.useEffect)(()=>{if(!er)return;let e={setHighlightedSeries:e_};return er.current=e,()=>{er.current===e&&(er.current=null)}},[er,e_]);let eD=(0,u.useRef)(e_);(0,u.useEffect)(()=>{eD.current=e_},[e_]);let eE=(0,u.useMemo)(()=>eS.join("\0"),[eS]),e$=(0,u.useMemo)(()=>[...U].toSorted().join("\0"),[U]);(0,u.useEffect)(()=>{eD.current(void 0)},[eE,e$]);let eF=(0,u.useCallback)(e=>{ef.current=e,eg(e)},[eg]),eO=(0,u.useMemo)(()=>{if(!Z)return;let e=eN.map(e=>Number(e[A.RECHART_X_LABEL])).filter(e=>Number.isFinite(e));if(e.length<2)return;let t=(0,A.generateEvenTimeTicks)({minMs:Math.min(...e),maxMs:Math.max(...e),tickCount:eu?7:4,minStepMs:ek?void 0:A.DAY_MS});return t.length>=2?t:void 0},[Z,eN,eu,ek]),eU=(0,u.useMemo)(()=>(X||K)&&0!==e.length?Math.max(...e.flatMap(e=>Object.values(e.y))):0,[e,X,K]),eP=(0,u.useRef)(0),eH=(0,u.useCallback)(()=>{eP.current=Date.now(),eL(void 0),ef.current?.querySelector(".recharts-wrapper")?.dispatchEvent(new MouseEvent("mouseout",{bubbles:!0,relatedTarget:document.body}))},[eL]),eB=(0,u.useCallback)(e=>{Date.now()-eP.current<800&&e.stopPropagation()},[]);return(0,t.jsxs)("div",{ref:eF,className:(0,i.cn)("relative min-w-0 touch-pan-y touch-pinch-zoom","string"==typeof L&&"h-full",o),onTouchEnd:eH,onTouchCancel:eH,onMouseOverCapture:eB,onMouseMoveCapture:eB,children:[(0,t.jsx)(p.ResponsiveContainer,{width:"100%",height:L,className:"[&_svg]:outline-hidden",children:(0,t.jsxs)(m.LineChart,{data:eN,className:"group",syncMethod:"value",margin:{top:24,bottom:24},children:[(0,t.jsx)(y.XAxis,{dataKey:A.RECHART_X_LABEL,...Z?k:{},padding:{left:24,right:24},tickLine:!1,axisLine:!!q&&{className:"text-border"},tickMargin:8,className:"text-muted-foreground text-xs",ticks:eO,...eO?{interval:0}:{interval:"equidistantPreserveStart",minTickGap:32},tickFormatter:(e,t)=>{if(Z&&!Number.isFinite(Number(e)))return"";let i=Z?new Date(Number(e)).toISOString():String(e);return ek?(0,v.formatXAxisTickHighRes)(eo,{timeZone:es,value:i,shouldIncludeDay:eA&&0===t}):(0,v.formatXAxisTick)(eo,i,ew&&0===t)}}),(0,t.jsx)(x.YAxis,{width:E,type:"number",domain:J,tickLine:!1,axisLine:!1,ticks:X?[eU]:void 0,tickFormatter:e=>{var t,i;return Q?.(Number(e))??(t=eo,i=Number(e),(0,s.formatFixed)((0,r.bn)(i),{locale:t,fractionDigits:1})??"—")??"—"},className:(0,i.cn)("origin-left translate-x-6 text-xs",$),children:_&&(0,t.jsx)(c.Label,{value:_,angle:-90,position:"insideLeft",offset:D,style:{textAnchor:"middle"},className:(0,i.cn)("fill-muted-foreground text-xs",F)})}),K&&eU>0&&(0,t.jsx)(f.ReferenceLine,{y:eU,stroke:"currentColor",strokeDasharray:"3 3",className:"text-muted-foreground",label:{value:(0,s.formatFixed)((0,r.bn)(eU),{locale:eo,fractionDigits:1})??"—",position:"right",fontSize:12,className:"fill-muted-foreground"}}),(0,t.jsx)(h.Tooltip,{isAnimationActive:!1,cursor:{fill:"transparent"},wrapperStyle:eb,allowEscapeViewBox:ej,content:e=>{if(!e.active||!e.payload)return null;let i=function({payload:e,pointedSeries:t}){let i=e.filter(e=>e.color!==S);if(void 0===t)return i;let a=i.filter(e=>String(e.dataKey)===t);return a.length>0?a:null}({payload:e.payload,pointedSeries:em.current});return null===i?null:(0,t.jsx)(N.ChartTooltip,{...e,payload:i,label:Z&&"number"==typeof e.label&&Number.isFinite(e.label)?new Date(e.label).toISOString():e.label,shouldShowTime:ek||Z&&"number"==typeof e.label&&Number.isFinite(e.label)&&e.label%A.DAY_MS!=0,displayTimezone:en,style:ev,wrapperClassName:e.wrapperClassName,shouldShowTotal:!1,sortOrder:N.SortOrder.Descending,filterZeroValues:!ee,maxItems:et,...ei?{overflowMode:ei}:{},...G?{valueFormatter:G}:{}})}}),eS.map((e,a)=>{let l=I?.get(e),r=P===e;return(0,t.jsx)(d.Line,{connectNulls:V,hide:U.has(e),className:(0,i.cn)(`sl-series-${a}`,"transition-opacity",(void 0===ea||!P)&&"group-hover:opacity-80 group-hover:hover:opacity-100",void 0===ea&&(P&&P!==e?"opacity-20":"opacity-100")),strokeOpacity:void 0===ea||void 0===P||r?1:ea,dataKey:e,name:ed(e),type:Y,stroke:(0,w.getColorForSeries)(e,B),strokeDasharray:l?.strokeDasharray,strokeWidth:r?3:2,dot:!!eT.has(e)&&eC,isAnimationActive:H},e)}),void 0!==el&&ec&&eS.map(e=>(0,t.jsx)(d.Line,{connectNulls:V,hide:U.has(e),dataKey:e,name:e,type:Y,stroke:S,strokeWidth:12,activeDot:!1,tooltipType:"none",legendType:"none",dot:!!eT.has(e)&&eR,isAnimationActive:!1,className:"cursor-pointer",onMouseEnter:()=>{Date.now()-eP.current<800||eL(e)},onMouseLeave:()=>eL(void 0),onClick:()=>{Date.now()-eP.current<800||el(e)}},`${e}__hit`))]})}),(0,t.jsx)("div",{ref:ep,"aria-hidden":"true",className:"pointer-events-none absolute left-0 top-0 z-10 hidden w-max flex-col overflow-hidden rounded-lg border bg-popover p-1 text-overline leading-4 text-popover-foreground shadow-md",children:(0,t.jsxs)("div",{className:"flex w-full gap-1 rounded-sm p-1",children:[(0,t.jsx)("span",{ref:eh,className:"w-1 rounded-sm"}),(0,t.jsxs)("span",{className:"grid w-full grid-cols-[minmax(0,1fr)_auto] items-baseline gap-6",children:[(0,t.jsx)("span",{ref:ey,className:"min-w-0 truncate text-left"}),(0,t.jsx)("span",{ref:ex,className:"whitespace-nowrap text-right font-medium text-foreground"})]})]})})]})}],525211)},238967,e=>{"use strict";var t=e.i(222666),i=e.i(505962),a=e.i(704318),l=e.i(452473),r=e.i(712621),n=e.i(394333),s=e.i(648156),o=e.i(303312),u=e.i(536582),c=e.i(956302),d=e.i(525211),m=e.i(779100),f=e.i(61291),p=e.i(79247),h=e.i(270401),y=e.i(369677),x=e.i(616384),g=e.i(651825),b=e.i(585351),v=e.i(148572);let j=new Map([["Availability",c.Colors.MediumSeaGreen],["Availability without routing",c.Colors.Orange]]),N=new Map([["Availability","OpenRouter Availability"],["Availability without routing","Without Routing"]]);function w(e){return e.provider_name}function A(e){let a,s,c,f,p,y=(0,i.c)(48),{isLoading:x,modelUptime:b,hasModelUptimeError:w,hasMultipleProviders:A,uptime:R,availability:_}=e,D=(0,m.useLocale)(),E=(0,h.useRef)(null);if(x){let e;return y[0]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(n.Skeleton,{className:"h-[98rem]"}),y[0]=e):e=y[0],e}if(y[1]!==w||y[2]!==A||y[3]!==D||y[4]!==b?.availability||y[5]!==b?.buckets||y[6]!==b?.hourly||y[7]!==b?.recentAvailability||y[8]!==b?.recentAvailabilityWithoutRouting){let e,i,l,r=b?.buckets.map(e=>{let t={};return null!==e.availability&&(t.Availability=e.availability),A&&null!==e.availabilityWithoutRouting&&(t["Availability without routing"]=e.availabilityWithoutRouting),{x:e.timestamp,y:t}})??[],n=r.some(M);y[10]!==b?.hourly?(i=(e=b?.hourly.map(T)??[]).some(k),y[10]=b?.hourly,y[11]=e,y[12]=i):(e=y[11],i=y[12]);let s=i;y[13]!==s||y[14]!==e||y[15]!==b?.availability?(l=s?(0,t.jsx)("div",{className:"w-full rounded-lg border border-border bg-card p-3",children:(0,t.jsx)(v.UptimeTimelineBar,{points:e,metric:"availability",defaultValue:b?.availability??null,title:"Availability over the last 3 days"})}):null,y[13]=s,y[14]=e,y[15]=b?.availability,y[16]=l):l=y[16];let c=l;if(w){let e;y[17]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(u.EmptyAnalyticsData,{className:"min-h-80",message:"Uptime data could not be retrieved at this time. Please try again later.",icon:"uptime"}),y[17]=e):e=y[17],a=e}else if(n){let e,i,l,n,s,u,m,f;y[18]!==A||y[19]!==b?.recentAvailability||y[20]!==b?.recentAvailabilityWithoutRouting?(e=Array.from(j.keys()).filter(e=>"Availability"===e||A).map(e=>({name:e,value:"Availability"===e?b?.recentAvailability??null:b?.recentAvailabilityWithoutRouting??null,color:j.get(e)??""})),y[18]=A,y[19]=b?.recentAvailability,y[20]=b?.recentAvailabilityWithoutRouting,y[21]=e):e=y[21];let p=e;y[22]===Symbol.for("react.memo_cache_sentinel")?(i=(0,t.jsx)("h3",{className:"mb-3 text-sm font-medium text-foreground",children:"Availability over the last 24 hours"}),y[22]=i):i=y[22],y[23]!==D?(l=g.formatUptimePercentFloor.bind(void 0,D),y[23]=D,y[24]=l):l=y[24],y[25]!==D?(n=e=>L(D,e),y[25]=D,y[26]=n):n=y[26];let h=(0,t.jsx)(d.StackedLineChart,{data:r,colorMapping:j,xAxisTimeScale:!0,connectNulls:!1,highlightHandleRef:E,seriesLabels:N,tooltipShowZeroValues:!0,tooltipValueFormatter:l,yAxisTickFormatter:n,yAxisDomain:[0===(f=r.flatMap(e=>Object.values(e.y))).length?90:Math.min(90,5*Math.floor(Math.min(...f)/5)),100]});y[27]!==p||y[28]!==D?(s=(0,t.jsx)("div",{className:"mt-3 flex w-full flex-col gap-3",children:p.map((e,i)=>(0,t.jsx)(o.ChartLegendRow,{data:e,index:i,offset:1,isRanking:!1,showPercentage:!1,onLabel:S,valueFormatter:g.formatUptimePercentFloor.bind(void 0,D),onMouseEnter:()=>E.current?.setHighlightedSeries(e.name),onMouseLeave:()=>E.current?.setHighlightedSeries(void 0)},e.name))}),y[27]=p,y[28]=D,y[29]=s):s=y[29],y[30]!==h||y[31]!==s?(u=(0,t.jsxs)("div",{className:"w-full rounded-lg border border-border bg-card p-3",children:[i,h,s]}),y[30]=h,y[31]=s,y[32]=u):u=y[32],y[33]!==c||y[34]!==u?(m=(0,t.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[c,u]}),y[33]=c,y[34]=u,y[35]=m):m=y[35],a=m}else if(c){let e,i;y[36]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(u.EmptyAnalyticsData,{className:"min-h-80",message:"Not enough uptime data to display yet.",icon:"uptime"}),y[36]=e):e=y[36],y[37]!==c?(i=(0,t.jsxs)("div",{className:"flex w-full flex-col gap-4",children:[c,e]}),y[37]=c,y[38]=i):i=y[38],a=i}else{let e;y[39]===Symbol.for("react.memo_cache_sentinel")?(e=(0,t.jsx)(u.EmptyAnalyticsData,{className:"min-h-80",message:"Not enough uptime data to display yet.",icon:"uptime"}),y[39]=e):e=y[39],a=e}y[1]=w,y[2]=A,y[3]=D,y[4]=b?.availability,y[5]=b?.buckets,y[6]=b?.hourly,y[7]=b?.recentAvailability,y[8]=b?.recentAvailabilityWithoutRouting,y[9]=a}else a=y[9];return y[40]!==_||y[41]!==R?(s=(R||_)&&(0,t.jsxs)("div",{className:(0,l.cn)("grid w-full grid-cols-1 gap-4",R&&_&&"sm:grid-cols-2"),children:[R&&(0,t.jsx)(C,{label:"Uptime (3d)",value:R,infoTooltip:"The model was reachable. Request routed to a provider."}),_&&(0,t.jsx)(C,{label:"Availability (3d)",value:_,infoTooltip:"The model returned inference from any provider. Errors and empty responses count against it."})]}),y[40]=_,y[41]=R,y[42]=s):s=y[42],y[43]===Symbol.for("react.memo_cache_sentinel")?(c=(0,t.jsx)(r.ExternalLink,{href:"/docs/api/api-reference/endpoints/list-endpoints",children:"Endpoints API"}),y[43]=c):c=y[43],y[44]===Symbol.for("react.memo_cache_sentinel")?(f=(0,t.jsxs)("p",{className:"text-xs text-muted-foreground",children:["When an error occurs in an upstream provider, we can recover by routing to another healthy provider, if your request filters allow it. You can access per-provider uptime data programmatically through the"," ",c,". ",(0,t.jsx)(r.ExternalLink,{href:"/docs/provider-routing",children:"Learn more"})," about our load balancing and customization options."]}),y[44]=f):f=y[44],y[45]!==a||y[46]!==s?(p=(0,t.jsxs)("div",{className:"flex flex-col items-start gap-4",children:[s,a,f]}),y[45]=a,y[46]=s,y[47]=p):p=y[47],p}function S(e){let t=String(e);return N.get(t)??t}function k(e){return null!==e.uptime||null!==e.availability}function T(e){return{date:new Date(`${e.timestamp.replace(" ","T")}Z`),uptime:e.uptime,availability:e.availability}}function M(e){return Object.keys(e.y).length>0}function C(e){let r,n,o,u,c,d,m,f=(0,i.c)(17),{label:p,value:y,infoTooltip:x}=e,g=(0,h.useId)();return f[0]!==p?(n=(0,t.jsx)("span",{children:p}),f[0]=p,f[1]=n):n=f[1],f[2]!==g||f[3]!==x||f[4]!==p?(o=x&&(0,t.jsxs)(t.Fragment,{children:[(0,t.jsx)("span",{id:g,className:"sr-only",children:x}),(0,t.jsx)(s.Tooltip,{side:"right",className:"max-w-xs",content:x,children:(0,t.jsx)("button",{type:"button",className:"inline-flex shrink-0 cursor-help text-muted-foreground hover:text-foreground","aria-label":`${p} explanation`,"aria-describedby":g,children:(0,t.jsx)(a.InformationCircleIcon,{className:"size-4"})})})]}),f[2]=g,f[3]=x,f[4]=p,f[5]=o):o=f[5],f[6]!==n||f[7]!==o?(u=(0,t.jsxs)("div",{className:"flex items-center gap-1 text-2xs font-medium text-muted-foreground",children:[n,o]}),f[6]=n,f[7]=o,f[8]=u):u=f[8],f[9]!==y?(c=(0,l.cn)("text-base font-medium leading-tight mt-0.5 tabular-nums",Number.isNaN(r=Number.parseFloat(y))?"text-muted-foreground":r>=95?"text-positive-text":r>=85?"text-warning-text":"text-negative-text"),f[9]=y,f[10]=c):c=f[10],f[11]!==c||f[12]!==y?(d=(0,t.jsx)("p",{className:c,children:y}),f[11]=c,f[12]=y,f[13]=d):d=f[13],f[14]!==u||f[15]!==d?(m=(0,t.jsxs)("div",{className:"rounded-lg border border-border bg-card px-3 py-2.5",children:[u,d]}),f[14]=u,f[15]=d,f[16]=m):m=f[16],m}function R(e,t){return null===t?null:(0,g.formatUptimePercentFloor)(e,t)}function L(e,t){return(0,f.formatPercentPoints)(Math.round(t),{locale:e,preset:"fee"})??"—"}e.s(["ModelUptime",0,function(){let e,a,l,r,n,s,o,u=(0,i.c)(23),c=(0,m.useLocale)(),{model:d,staticVariant:f}=(0,y.useModelPage)();u[0]!==d||u[1]!==f?(e=(0,b.endpointStatsOptions)({permaslug:d.permaslug,variant:f,...(0,x.getProviderTablePerfSelector)(d)}),u[0]=d,u[1]=f,u[2]=e):e=u[2];let{data:h,isLoading:g}=(0,p.useQuery)(e);u[3]!==d.permaslug||u[4]!==f?(a=(0,b.modelUptimeRecentOptions)(d.permaslug,f),u[3]=d.permaslug,u[4]=f,u[5]=a):a=u[5];let{data:v,isLoading:j,error:N}=(0,p.useQuery)(a);v?.uptime;let S=v?.uptime??null;u[6]!==c||u[7]!==S?(l=R(c,S),u[6]=c,u[7]=S,u[8]=l):l=u[8];let k=l;u[9]!==c||u[10]!==v?.availability?(r=()=>R(c,v?.availability??null),u[9]=c,u[10]=v?.availability,u[11]=r):r=u[11],v?.availability,u[12]!==r?(n=r(),u[12]=r,u[13]=n):n=u[13];let T=n,M=g||j,C=v??null,L=!!N;u[14]!==h?(s=new Set(h?.map(w)),u[14]=h,u[15]=s):s=u[15];let _=s.size>1;return u[16]!==T||u[17]!==_||u[18]!==M||u[19]!==C||u[20]!==L||u[21]!==k?(o=(0,t.jsx)("div",{className:"flex w-full flex-col",children:(0,t.jsx)(A,{isLoading:M,modelUptime:C,hasModelUptimeError:L,hasMultipleProviders:_,uptime:k,availability:T})}),u[16]=T,u[17]=_,u[18]=M,u[19]=C,u[20]=L,u[21]=k,u[22]=o):o=u[22],o},"UptimeContent",0,A,"formatModelUptimeTick",0,L])},148572,e=>{"use strict";var t=e.i(222666),i=e.i(505962),a=e.i(452473),l=e.i(394333),r=e.i(980351),n=e.i(779100),s=e.i(150049),o=e.i(180711),u=e.i(230953),c=e.i(270401),d=e.i(651825);let m={good:"fill-positive",ok:"fill-warning",bad:"fill-negative",noData:"fill-muted-foreground"},f=[{key:"start",widthClassName:"w-9"},{key:"middle",widthClassName:"w-9"},{key:"yesterday",widthClassName:"w-12"},{key:"now",widthClassName:"w-6"}],p=e=>null===e?m.noData:e>=95?m.good:e>=85?m.ok:m.bad;function h(e){let{key:i,widthClassName:r}=e;return(0,t.jsx)(l.Skeleton,{className:(0,a.cn)("h-3",r),"data-uptime-skeleton":"tick-label"},i)}function y(e,i){return(0,t.jsx)(l.Skeleton,{className:"h-8 flex-1 rounded-none","data-uptime-skeleton":"bar"},`uptime-bar-${i}`)}function x(e,t){return"availability"===t&&"availability"in e?e.availability:e.uptime}function g(e,t){return null===t?"N/A":(0,d.formatUptimePercentFloor)(e,t)}function b(e,t){return new Date(e.getTime()+60*t*6e4)}function v({locale:e,timeZone:t,date:i}){return`${(0,u.formatDate)(i,{locale:e,timeZone:t,preset:"day-month"})??"—"}, ${j({locale:e,timeZone:t,date:i})}`}function j({locale:e,timeZone:t,date:i}){return(0,u.formatTime)(i,{locale:e,timeZone:t,preset:"hour-only"})??"—"}e.s(["UPTIME_COLORS",0,m,"UptimeTimelineBar",0,function(e){var l,d,f;let h,y,N,w,A,S,k,T,M,C,R,L,_,D,E,$,F,O,U,P,H,B=(0,i.c)(88),{points:I,metric:W,className:X,title:K,defaultValue:q}=e,z=void 0===W?"uptime":W,V=(0,n.useLocale)(),Y=(0,s.useResolvedDisplayTimeZone)("local"),[Z,G]=(0,c.useState)(null),[Q,J]=(0,c.useState)(null),ee=(0,r.useHydrated)();if(B[0]!==q||B[1]!==Z||B[2]!==z||B[3]!==I){let e=I.at(-1),t=void 0!==q;if(Z){let e;B[5]!==Z||B[6]!==z?(e=x(Z,z),B[5]=Z,B[6]=z,B[7]=e):e=B[7],h=e}else h=t?q??null:e?x(e,z):null;B[0]=q,B[1]=Z,B[2]=z,B[3]=I,B[4]=h}else h=B[4];let et="Last 72 hours";if(ee){let e;B[8]!==Z||B[9]!==V||B[10]!==I||B[11]!==Y?(e=Z?function({locale:e,timeZone:t,date:i}){let a=b(i,1),l=(0,o.calendarDateForInstant)(i,{timeZone:t}),r=(0,o.calendarDateForInstant)(a,{timeZone:t}),n=void 0!==l&&l===r?j({locale:e,timeZone:t,date:a}):v({locale:e,timeZone:t,date:a});return`${v({locale:e,timeZone:t,date:i})} - ${n}`}({locale:V,timeZone:Y,date:Z.date}):function({locale:e,timeZone:t,points:i}){let a=i[0]?.date,l=i.at(-1)?.date;return a&&l?`${v({locale:e,timeZone:t,date:a})} - ${v({locale:e,timeZone:t,date:b(l,1)})}`:"Last 72 hours"}({locale:V,timeZone:Y,points:I}),B[8]=Z,B[9]=V,B[10]=I,B[11]=Y,B[12]=e):e=B[12],et=e}let ei=0===I.length?0:100/I.length;if(B[13]!==X?(y=(0,a.cn)(X),B[13]=X,B[14]=y):y=B[14],B[15]!==et||B[16]!==K?(N=K?(0,t.jsxs)("div",{className:"flex min-w-0 flex-1 flex-wrap items-baseline gap-x-2 max-sm:basis-full",children:[(0,t.jsx)("h3",{className:"text-sm font-medium text-foreground",children:K}),(0,t.jsx)("span",{className:"text-xs text-muted-foreground/70",children:et})]}):(0,t.jsx)("span",{className:"min-w-0 flex-1 text-xs text-muted-foreground/70 max-sm:basis-full",children:et}),B[15]=et,B[16]=K,B[17]=N):N=B[17],B[18]!==h?(w=(0,a.cn)("shrink-0 text-right text-sm font-medium tabular-nums",null===(l=h)?"text-muted-foreground":l>=95?"text-positive":l>=85?"text-warning":"text-destructive"),B[18]=h,B[19]=w):w=B[19],B[20]!==h||B[21]!==V||B[22]!==z?(A=function(e,{metric:t,displayValue:i}){return"availability"===t?`Availability ${g(e,i)}`:g(e,i)}(V,{metric:z,displayValue:h}),B[20]=h,B[21]=V,B[22]=z,B[23]=A):A=B[23],B[24]!==w||B[25]!==A?(S=(0,t.jsx)("span",{className:w,children:A}),B[24]=w,B[25]=A,B[26]=S):S=B[26],B[27]!==N||B[28]!==S?(k=(0,t.jsxs)("div",{className:"mb-4 flex flex-wrap items-center justify-between gap-2","data-uptime-timeline-header":"true",children:[N,S]}),B[27]=N,B[28]=S,B[29]=k):k=B[29],B[30]!==z||B[31]!==I.length?(d=z,f=I.length,T=`${"availability"===d?"Availability":"Uptime"} timeline for ${f} ${1===f?"hour":"hours"}`,B[30]=z,B[31]=I.length,B[32]=T):T=B[32],B[33]!==ei||B[34]!==ee||B[35]!==V||B[36]!==z||B[37]!==I||B[38]!==Y){let e;B[40]!==ei||B[41]!==ee||B[42]!==V||B[43]!==z||B[44]!==Y?(e=(e,i)=>{let l=p(x(e,z)),r=`${i*ei}%`,n=`${ei-.2}%`,s=()=>{G(e),J(i)};return(0,t.jsx)("g",{children:(0,t.jsx)("rect",{role:"button",tabIndex:0,"aria-label":function(e,{point:t,metric:i,isHydrated:a,timeZone:l}){let r=a?(0,u.formatDateTime)(t.date,{locale:e,timeZone:l,preset:"numeric-seconds"})??"—":t.date.toISOString();return"availability"===i?`${r}: Availability ${g(e,x(t,i))}`:`${r}: ${g(e,t.uptime)}`}(V,{point:e,metric:z,isHydrated:ee,timeZone:Y}),x:r,y:"0",width:n,height:32,className:(0,a.cn)("transition-all duration-300",l),fillOpacity:l===m.noData?.2:.95,onFocus:s,onBlur:()=>{J(null),G(null)},onKeyDown:e=>{("Enter"===e.key||" "===e.key)&&(e.preventDefault(),s())},onMouseEnter:s,onMouseLeave:()=>{J(null),G(null)}})},e.date.toISOString())},B[40]=ei,B[41]=ee,B[42]=V,B[43]=z,B[44]=Y,B[45]=e):e=B[45],M=I.map(e),B[33]=ei,B[34]=ee,B[35]=V,B[36]=z,B[37]=I,B[38]=Y,B[39]=M}else M=B[39];return B[46]!==ei||B[47]!==Q||B[48]!==z||B[49]!==I?(C=null!==Q&&I[Q]&&(0,t.jsx)("circle",{cx:`${Q*ei+ei/2}%`,cy:"-6",r:"2.5",className:(0,a.cn)("animate-in fade-in duration-200",p(x(I[Q],z)))}),B[46]=ei,B[47]=Q,B[48]=z,B[49]=I,B[50]=C):C=B[50],B[51]!==C||B[52]!==T||B[53]!==M?(R=(0,t.jsxs)("svg",{width:"100%",height:32,className:"overflow-visible","aria-label":T,role:"img",children:[M,C]}),B[51]=C,B[52]=T,B[53]=M,B[54]=R):R=B[54],B[55]!==ee||B[56]!==V||B[57]!==I[0]?.date||B[58]!==Y?(L=ee?(0,u.formatDate)(I[0]?.date,{locale:V,timeZone:Y,preset:"weekday"})??"3 Days Ago":"3 Days Ago",B[55]=ee,B[56]=V,B[57]=I[0]?.date,B[58]=Y,B[59]=L):L=B[59],B[60]!==L?(_=(0,t.jsx)("span",{children:L}),B[60]=L,B[61]=_):_=B[61],B[62]!==ee||B[63]!==V||B[64]!==I[24]?.date||B[65]!==Y?(D=ee?(0,u.formatDate)(I[24]?.date,{locale:V,timeZone:Y,preset:"weekday"})??"2 Days Ago":"2 Days Ago",B[62]=ee,B[63]=V,B[64]=I[24]?.date,B[65]=Y,B[66]=D):D=B[66],B[67]!==D?(E=(0,t.jsx)("span",{children:D}),B[67]=D,B[68]=E):E=B[68],B[69]!==ee||B[70]!==V||B[71]!==I[48]?.date||B[72]!==Y?($=ee?(0,u.formatDate)(I[48]?.date,{locale:V,timeZone:Y,preset:"weekday"})??"Yesterday":"Yesterday",B[69]=ee,B[70]=V,B[71]=I[48]?.date,B[72]=Y,B[73]=$):$=B[73],B[74]!==$?(F=(0,t.jsx)("span",{children:$}),B[74]=$,B[75]=F):F=B[75],B[76]===Symbol.for("react.memo_cache_sentinel")?(O=(0,t.jsx)("span",{children:"Now"}),B[76]=O):O=B[76],B[77]!==_||B[78]!==E||B[79]!==F?(U=(0,t.jsxs)("div",{className:"absolute -bottom-6 left-0 right-0 flex justify-between text-2xs text-muted-foreground/70",children:[_,E,F,O]}),B[77]=_,B[78]=E,B[79]=F,B[80]=U):U=B[80],B[81]!==R||B[82]!==U?(P=(0,t.jsxs)("div",{className:"relative h-8 mb-6",children:[R,U]}),B[81]=R,B[82]=U,B[83]=P):P=B[83],B[84]!==y||B[85]!==P||B[86]!==k?(H=(0,t.jsxs)("div",{className:y,children:[k,P]}),B[84]=y,B[85]=P,B[86]=k,B[87]=H):H=B[87],H},"UptimeTimelineSkeleton",0,function(e){let r,n,s,o,u,c=(0,i.c)(7),{className:d}=e;return c[0]!==d?(r=(0,a.cn)(d),c[0]=d,c[1]=r):r=c[1],c[2]===Symbol.for("react.memo_cache_sentinel")?(n=(0,t.jsxs)("div",{className:"mb-4 flex items-center justify-between",children:[(0,t.jsx)(l.Skeleton,{className:"h-4 w-40","data-uptime-skeleton":"range-label"}),(0,t.jsx)(l.Skeleton,{className:"h-5 w-12","data-uptime-skeleton":"value"})]}),c[2]=n):n=c[2],c[3]===Symbol.for("react.memo_cache_sentinel")?(s=(0,t.jsx)("div",{className:"flex h-8 gap-px overflow-hidden rounded-sm","aria-hidden":"true",children:Array.from({length:72},y)}),c[3]=s):s=c[3],c[4]===Symbol.for("react.memo_cache_sentinel")?(o=(0,t.jsxs)("div",{className:"relative h-8 mb-6",children:[s,(0,t.jsx)("div",{className:"absolute -bottom-6 left-0 right-0 flex justify-between",children:f.map(h)})]}),c[4]=o):o=c[4],c[5]!==r?(u=(0,t.jsxs)("div",{className:r,role:"status","aria-label":"Loading uptime timeline",children:[n,o]}),c[5]=r,c[6]=u):u=c[6],u},"getUptimeColor",0,p])}]); //# sourceMappingURL=2r-a8p0ocm9jl.js.map //# chunkId=01a099a4-b854-70b1-9bfb-214fdfa8208c