try{let e=typeof window<`u`?window:typeof global<`u`?global:typeof globalThis<`u`?globalThis:typeof self<`u`?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]=`b100d7f1-4daa-4a88-8a92-1bc98b7973ef`,e._sentryDebugIdIdentifier=`sentry-dbid-b100d7f1-4daa-4a88-8a92-1bc98b7973ef`)}catch{}import{o as e}from"./rolldown-runtime-eb2nym32.js";import{Fg as t,Ig as n,ag as r,cg as i,lg as a,lh as o,og as s,ug as c}from"./entry.client-dr7r6s9a.js";import"./workspace-leaf-files-mc5sghv7.js";var l=e(n(),1),u=t(),d=s,f=(e,t,n)=>{let o=n-t,l=Math.abs(o);if(e===`minute`)return o<0?l%i+10:(Math.floor(l/i)+1)*i+10-l;if(e===`hour`)return o<0?l%s+10:(Math.floor(l/s)+1)*s+10-l;if(e===`day`)return o<0?l%r+10:(Math.floor(l/r)+1)*r+10-l;if(e===`month`)return o<0?l%(r*30)+10:(Math.floor(l/(r*30))+1)*(r*30)+10-l;if(e===`year`)return o<0?l%c+10:(Math.floor(l/c)+1)*c+10-l;let u=Math.floor(l/a);if(u<45)return o<0?u*a+10:(45-u)*a+10;let d=Math.floor(l/i);if(d<45)return o<0?d===0?l-45*a+10:l%i+10:(d+1)*i+10-l;let f=Math.floor(l/s);if(f<22)return o<0?f===0?l-45*i+10:l%s+10:(f+1)*s+10-l;let p=Math.floor(l/r);if(p<26)return o<0?p===0?l-22*s+10:l%r+10:(p+1)*r+10-l;let m=Math.floor(p/30);if(p<320)return o<0?m===0?l-26*r+10:l%(r*30)+10:(m+1)*(r*30)+10-l;let h=Math.floor(l/c);return o<0?h===0?l-320*r+10:l%c+10:(h+1)*c+10-l},p=(e,t)=>{let n=(0,u.c)(9),r;n[0]===Symbol.for(`react.memo_cache_sentinel`)?(r=Date.now(),n[0]=r):r=n[0];let[i,a]=(0,l.useState)(r),o,s;n[1]!==t||n[2]!==e||n[3]!==i?(o=()=>{if(!t)return;let n=f(e,t,i),r=setTimeout(()=>a(Date.now()),Math.min(n,d));return()=>{clearTimeout(r)}},s=[t,i,e],n[1]=t,n[2]=e,n[3]=i,n[4]=o,n[5]=s):(o=n[4],s=n[5]),(0,l.useEffect)(o,s);let c;return n[6]!==t||n[7]!==i?(c=t?{referenceTime:i,direction:t>i?`future`:`past`}:null,n[6]=t,n[7]=i,n[8]=c):c=n[8],c};function m(e,t){return e<90?1:t===1?2:t}function h(e,t){return e<90?1:t===1?2:t}function g(e,t){return e<36?1:t===1?2:t}function _(e,t){return e<46?1:t===1?2:t}function v(e,t){return e<548?1:t===1?2:t}var y=(e,t,n)=>{let l=(0,u.c)(25),d=t===void 0?Date.now():t,f=n===void 0?!1:n,{t:p}=o(`DateTimeUtils`);if(!e)return null;let y=d-e;if(y<0)return null;let b=Math.floor(y/a),x=Math.floor(y/i);if(x<45){let e;if(l[0]!==b||l[1]!==x||l[2]!==f||l[3]!==p){e=Symbol.for(`react.early_return_sentinel`);bb0:{let t=m(b,x);if(f){e=p(`{displayedMinutes, plural, one{#m} other{#m}}`,{values:{displayedMinutes:t},shortKey:`short_minutes`});break bb0}else{e=p(`{displayedMinutes, plural, one{# minute} other{# minutes}}`,{values:{displayedMinutes:t},shortKey:`long_minutes`});break bb0}}l[0]=b,l[1]=x,l[2]=f,l[3]=p,l[4]=e}else e=l[4];if(e!==Symbol.for(`react.early_return_sentinel`))return e}let S=Math.floor(y/s);if(S<22){let e;if(l[5]!==x||l[6]!==S||l[7]!==f||l[8]!==p){e=Symbol.for(`react.early_return_sentinel`);bb1:{let t=h(x,S);if(f){e=p(`{displayedHours, plural, one{#h} other{#h}}`,{values:{displayedHours:t},shortKey:`short_hours`});break bb1}else{e=p(`{displayedHours, plural, one{# hour} other{# hours}}`,{values:{displayedHours:t},shortKey:`long_hours`});break bb1}}l[5]=x,l[6]=S,l[7]=f,l[8]=p,l[9]=e}else e=l[9];if(e!==Symbol.for(`react.early_return_sentinel`))return e}let C=Math.floor(y/r);if(C<26){let e;if(l[10]!==S||l[11]!==C||l[12]!==f||l[13]!==p){e=Symbol.for(`react.early_return_sentinel`);bb2:{let t=g(S,C);if(f){e=p(`{displayedDays, plural, one{#d} other{#d}}`,{values:{displayedDays:t},shortKey:`short_days`});break bb2}else{e=p(`{displayedDays, plural, one{# day} other{# days}}`,{values:{displayedDays:t},shortKey:`long_days`});break bb2}}l[10]=S,l[11]=C,l[12]=f,l[13]=p,l[14]=e}else e=l[14];if(e!==Symbol.for(`react.early_return_sentinel`))return e}if(C<320){let e=Math.floor(C/30),t;if(l[15]!==C||l[16]!==e||l[17]!==f||l[18]!==p){t=Symbol.for(`react.early_return_sentinel`);bb3:{let n=_(C,e);if(f){t=p(`{displayedMonths, plural, one{#mo} other{#mo}}`,{values:{displayedMonths:n},shortKey:`short_months`});break bb3}else{t=p(`{displayedMonths, plural, one{# month} other{# months}}`,{values:{displayedMonths:n},shortKey:`long_months`});break bb3}}l[15]=C,l[16]=e,l[17]=f,l[18]=p,l[19]=t}else t=l[19];if(t!==Symbol.for(`react.early_return_sentinel`))return t}let w=Math.floor(y/c),T;if(l[20]!==C||l[21]!==w||l[22]!==f||l[23]!==p){T=Symbol.for(`react.early_return_sentinel`);bb4:{let e=v(C,w);if(f){T=p(`{displayedYears, plural, one{#yr} other{#yr}}`,{values:{displayedYears:e},shortKey:`short_years`});break bb4}else{T=p(`{displayedYears, plural, one{# year} other{# years}}`,{values:{displayedYears:e},shortKey:`long_years`});break bb4}}l[20]=C,l[21]=w,l[22]=f,l[23]=p,l[24]=T}else T=l[24];if(T!==Symbol.for(`react.early_return_sentinel`))return T};export{p as n,y as t};