import{__require as e}from"./global-this.mjs";import{__require as r}from"./function-apply.mjs";import{__require as t}from"./function-bind-context.mjs";import{__require as i}from"./is-callable.mjs";import{__require as o}from"./has-own-property.mjs";import{__require as n}from"./fails.mjs";import{__require as s}from"./html.mjs";import{__require as a}from"./array-slice.mjs";import{__require as m}from"./document-create-element.mjs";import{__require as u}from"./validate-arguments-length.mjs";import{__require as c}from"./environment-is-ios.mjs";import{__require as f}from"./environment-is-node.mjs";var p,_;function l(){if(_)return p;_=1;var l,d,q,g,h=e(),j=r(),v=t(),w=i(),y=o(),M=n(),b=s(),x=a(),C=m(),E=u(),I=c(),L=f(),S=h.setImmediate,T=h.clearImmediate,k=h.process,D=h.Dispatch,F=h.Function,z=h.MessageChannel,A=h.String,B=0,G={},H="onreadystatechange";M(function(){l=h.location});var J=function(e){if(y(G,e)){var r=G[e];delete G[e],r()}},K=function(e){return function(){J(e)}},N=function(e){J(e.data)},O=function(e){h.postMessage(A(e),l.protocol+"//"+l.host)};return S&&T||(S=function(e){E(arguments.length,1);var r=w(e)?e:F(e),t=x(arguments,1);return G[++B]=function(){j(r,void 0,t)},d(B),B},T=function(e){delete G[e]},L?d=function(e){k.nextTick(K(e))}:D&&D.now?d=function(e){D.now(K(e))}:z&&!I?(g=(q=new z).port2,q.port1.onmessage=N,d=v(g.postMessage,g)):h.addEventListener&&w(h.postMessage)&&!h.importScripts&&l&&"file:"!==l.protocol&&!M(O)?(d=O,h.addEventListener("message",N,!1)):d=H in C("script")?function(e){b.appendChild(C("script"))[H]=function(){b.removeChild(this),J(e)}}:function(e){setTimeout(K(e),0)}),p={set:S,clear:T}}export{l as __require};