import{__require as t}from"./function-uncurry-this.mjs";import{__require as e}from"./fails.mjs";import{__require as r}from"./string-pad.mjs";var i,n;function a(){if(n)return i;n=1;var a=t(),o=e(),s=r().start,u=RangeError,f=isFinite,g=Math.abs,l=Date.prototype,m=l.toISOString,c=a(l.getTime),T=a(l.getUTCDate),_=a(l.getUTCFullYear),p=a(l.getUTCHours),C=a(l.getUTCMilliseconds),U=a(l.getUTCMinutes),h=a(l.getUTCMonth),v=a(l.getUTCSeconds);return i=o(function(){return"0385-07-25T07:06:39.999Z"!==m.call(new Date(-50000000000001))})||!o(function(){m.call(new Date(NaN))})?function(){if(!f(c(this)))throw new u("Invalid time value");var t=this,e=_(t),r=C(t),i=e<0?"-":e>9999?"+":"";return i+s(g(e),i?6:4,0)+"-"+s(h(t)+1,2,0)+"-"+s(T(t),2,0)+"T"+s(p(t),2,0)+":"+s(U(t),2,0)+":"+s(v(t),2,0)+"."+s(r,3,0)+"Z"}:m}export{a as __require};