import{__require as e}from"./global-this.mjs";import{__require as r}from"./safe-get-built-in.mjs";import{__require as t}from"./function-bind-context.mjs";import{__require as i}from"./task.mjs";import{__require as o}from"./queue.mjs";import{__require as n}from"./environment-is-ios.mjs";import{__require as s}from"./environment-is-ios-pebble.mjs";import{__require as m}from"./environment-is-webos-webkit.mjs";import{__require as a}from"./environment-is-node.mjs";var u,f;function c(){if(f)return u;f=1;var c,_,v,p,q,b=e(),d=r(),j=t(),h=i().set,l=o(),w=n(),x=s(),k=m(),g=a(),M=b.MutationObserver||b.WebKitMutationObserver,O=b.document,T=b.process,y=b.Promise,D=d("queueMicrotask");if(!D){var K=new l,N=function(){var e,r;for(g&&(e=T.domain)&&e.exit();r=K.get();)try{r()}catch(e){throw K.head&&c(),e}e&&e.enter()};w||g||k||!M||!O?!x&&y&&y.resolve?((p=y.resolve(void 0)).constructor=y,q=j(p.then,p),c=function(){q(N)}):g?c=function(){T.nextTick(N)}:(h=j(h,b),c=function(){h(N)}):(_=!0,v=O.createTextNode(""),new M(N).observe(v,{characterData:!0}),c=function(){v.data=_=!_}),D=function(e){K.head||c(),K.add(e)}}return u=D}export{c as __require};