import{__exports as r}from"../../../_virtual/es.number.to-fixed.mjs";import{__require as e}from"../internals/export.mjs";import{__require as t}from"../internals/function-uncurry-this.mjs";import{__require as i}from"../internals/to-integer-or-infinity.mjs";import{__require as n}from"../internals/this-number-value.mjs";import{__require as o}from"../internals/string-repeat.mjs";import{__require as f}from"../internals/fails.mjs";var u;function a(){if(u)return r;u=1;var a=e(),s=t(),m=i(),_=n(),c=o(),l=f(),p=RangeError,v=String,g=Math.floor,h=s(c),j=s("".slice),q=s(1.1.toFixed),x=function(r,e,t){return 0===e?t:e%2==1?x(r,e-1,t*r):x(r*r,e/2,t)},d=function(r,e,t){for(var i=-1,n=t;++i<6;)n+=e*r[i],r[i]=n%1e7,n=g(n/1e7)},b=function(r,e){for(var t=6,i=0;--t>=0;)i+=r[t],r[t]=g(i/e),i=i%e*1e7},N=function(r){for(var e=6,t="";--e>=0;)if(""!==t||0===e||0!==r[e]){var i=v(r[e]);t=""===t?i:t+h("0",7-i.length)+i}return t};return a({target:"Number",proto:!0,forced:l(function(){return"0.000"!==q(8e-5,3)||"1"!==q(.9,0)||"1.25"!==q(1.255,2)||"1000000000000000128"!==q(0xde0b6b3a7640080,0)})||!l(function(){q({})})},{toFixed:function(r){var e,t,i,n,o=_(this),f=m(r),u=[0,0,0,0,0,0],a="",s="0";if(f<0||f>20)throw new p("Incorrect fraction digits");if(o!=o)return"NaN";if(o<=-1e21||o>=1e21)return v(o);if(o<0&&(a="-",o=-o),o>1e-21)if(t=(e=function(r){for(var e=0,t=r;t>=4096;)e+=12,t/=4096;for(;t>=2;)e+=1,t/=2;return e}(o*x(2,69,1))-69)<0?o*x(2,-e,1):o/x(2,e,1),t*=4503599627370496,(e=52-e)>0){for(d(u,0,t),i=f;i>=7;)d(u,1e7,0),i-=7;for(d(u,x(10,i,1),0),i=e-1;i>=23;)b(u,1<<23),i-=23;b(u,1<<i),d(u,1,1),b(u,2),s=N(u)}else d(u,0,t),d(u,1<<-e,0),s=N(u)+h("0",f);return s=f>0?a+((n=s.length)<=f?"0."+h("0",f-n)+s:j(s,0,n-f)+"."+j(s,n-f)):a+s}}),r}export{a as __require};