import{__exports as r}from"../../../_virtual/web.btoa.mjs";import{__require as t}from"../internals/export.mjs";import{__require as e}from"../internals/global-this.mjs";import{__require as n}from"../internals/get-built-in.mjs";import{__require as i}from"../internals/function-uncurry-this.mjs";import{__require as a}from"../internals/function-call.mjs";import{__require as o}from"../internals/fails.mjs";import{__require as s}from"../internals/to-string.mjs";import{__require as m}from"../internals/validate-arguments-length.mjs";import{__require as u}from"../internals/base64-map.mjs";var l;function f(){if(l)return r;l=1;var f=t(),_=e(),c=n(),p=i(),h=a(),b=o(),g=s(),j=m(),q=u().i2c,d=c("btoa"),v=p("".charAt),x=p("".charCodeAt),w=!!d&&!b(function(){return"aGk="!==d("hi")}),A=w&&!b(function(){d()}),C=w&&b(function(){return"bnVsbA=="!==d(null)}),E=w&&1!==d.length;return f({global:!0,bind:!0,enumerable:!0,forced:!w||A||C||E},{btoa:function(r){if(j(arguments.length,1),w)return h(d,_,g(r));for(var t,e,n=g(r),i="",a=0,o=q;v(n,a)||(o="=",a%1);){if((e=x(n,a+=3/4))>255)throw new(c("DOMException"))("The string contains characters outside of the Latin1 range","InvalidCharacterError");i+=v(o,63&(t=t<<8|e)>>8-a%1*8)}return i}}),r}export{f as __require};