/*
All material copyright ESRI, All Rights Reserved, unless otherwise specified.
See https://js.arcgis.com/4.24/esri/copyright.txt for details.
*/
define(["require","exports","./chunks/_rollupPluginBabelHelpers","./core/has","./core/urlUtils","./support/revision"],(function(e,t,r,n,a,s){"use strict";const o=e=>Object.freeze(Object.defineProperty({__proto__:null,default:e},Symbol.toStringTag,{value:"Module"})),i="4.24",d={request:(t,n)=>r._asyncToGenerator((function*(){var r;const{default:s}=yield new Promise(((t,r)=>e(["./request"],(e=>t(o(e))),r))),i=t.options,d=i.responseType;i.signal=null==n?void 0:n.signal,i.responseType="native"===d||"native-request-init"===d?"native-request-init":["blob","json","text"].includes(d)&&null!=(r=a.getInterceptor(t.url))&&r.after?d:"array-buffer";const l=yield s(t.url,i),u={data:l.data,ssl:l.ssl};switch(l.requestOptions.responseType){case"native-request-init":return delete u.data.signal,u;case"blob":u.data=yield u.data.arrayBuffer();break;case"json":u.data=(new TextEncoder).encode(JSON.stringify(u.data)).buffer;break;case"text":u.data=(new TextEncoder).encode(u.data).buffer}return{result:u,transferList:[u.data]}}))()};function l(e){t.id=e}function u(e){const r=t.id&&t.id.findCredential(e);return r&&r.token?a.addQueryParameter(e,"token",r.token):e}t.id=void 0,n("host-webworker")||(n("edge")||n("trident"))&&console.warn("Deprecated browser - see http://esriurl.com/oldbrowser"),t.buildDate=s.buildDate,t.revision=s.commitHash,t.addTokenParameter=u,t.setId=l,t.version=i,t.workerMessages=d,Object.defineProperties(t,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})}));
