Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@globus/sdk

Package Overview
Dependencies
Maintainers
7
Versions
118
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@globus/sdk - npm Package Compare versions

Comparing version 0.1.4-alpha.0 to 0.1.5-alpha

@types/globus/auth/index.d.ts

2

dist/browser.cjs.js

@@ -1,1 +0,1 @@

"use strict";var xe=Object.create;var T=Object.defineProperty,_e=Object.defineProperties,Ie=Object.getOwnPropertyDescriptor,De=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertyNames,ee=Object.getOwnPropertySymbols,we=Object.getPrototypeOf,oe=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var te=(t,e,o)=>e in t?T(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,s=(t,e)=>{for(var o in e||={})oe.call(e,o)&&te(t,o,e[o]);if(ee)for(var o of ee(e))Ne.call(e,o)&&te(t,o,e[o]);return t},re=(t,e)=>_e(t,De(e));var u=(t,e)=>{for(var o in e)T(t,o,{get:e[o],enumerable:!0})},ne=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ae(e))!oe.call(t,n)&&n!==o&&T(t,n,{get:()=>e[n],enumerable:!(r=Ie(e,n))||r.enumerable});return t};var se=(t,e,o)=>(o=t!=null?xe(we(t)):{},ne(e||!t||!t.__esModule?T(o,"default",{value:t,enumerable:!0}):o,t)),Ce=t=>ne(T({},"__esModule",{value:!0}),t);var V=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var p=(t,e,o)=>(V(t,e,"read from private field"),o?o.call(t):e.get(t)),f=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},h=(t,e,o,r)=>(V(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var Y=(t,e,o)=>(V(t,e,"access private method"),o);var ie=(t,e,o)=>new Promise((r,n)=>{var Ee=g=>{try{q(o.next(g))}catch(B){n(B)}},Re=g=>{try{q(o.throw(g))}catch(B){n(B)}},q=g=>g.done?r(g.value):Promise.resolve(g.value).then(Ee,Re);q((o=o.apply(t,e)).next())});var rt={};u(rt,{auth:()=>w,authorization:()=>k,sdk:()=>He,search:()=>W,transfer:()=>M});module.exports=Ce(rt);function He(){return"@globus/sdk"}var k={};u(k,{PKCEAuthorization:()=>E,incremental:()=>qe,pkce:()=>We});var Se=se(require("js-pkce"));var w={};u(w,{CONFIG:()=>Ge,getAuthorizationEndpoint:()=>X,getTokenEndpoint:()=>Z});var x={};u(x,{HOSTS:()=>$,ID:()=>m});var m="AUTH",$={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var _={};u(_,{HOSTS:()=>J,ID:()=>i});var i="TRANSFER",J={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var I="FLOWS",ae={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var D={};u(D,{HOSTS:()=>z,ID:()=>l,SCOPES:()=>j});var l="SEARCH",z={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},j={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var A=class extends Error{constructor(o,r){super();this.name="EnvironmentConfigurationError";this.message=`Invalid configuration value provided for ${o} (${r}).`}};function Oe(){return typeof window!="undefined"?window:process}function Ue(t){return typeof window==typeof t}function ue(t,e=void 0){let o=Oe(),r;return Ue(o)?r=o:r=o.env,t in r?r[t]:e}var ce={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function Q(){let t=ue("GLOBUS_SDK_ENVIRONMENT",ce.PRODUCTION);if(!t||!Object.values(ce).includes(t))throw new A("GLOBUS_SDK_ENVIRONMENT",t);return t}var ct={[m]:m,[i]:i,[I]:I,[l]:l},ke={[m]:$,[i]:J,[I]:ae,[l]:z};function Le(t,e){return ke[t][e]}function pe(t,e=Q()){let o=Le(t,e);return ue(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function Fe(t,e="",o=Q()){let r=pe(t,o);return new URL(e,r)}function a(t,e,o){let r=Fe(t,e);if(o&&o.search){let n=new URLSearchParams(o.search);r.search=n.toString()}return r.toString()}var Ge=x;function X(){return a(m,"/v2/oauth2/authorize")}function Z(){return a(m,"/v2/oauth2/token")}var S,N=class{constructor(){f(this,S,{})}get(e){return p(this,S)[e]}set(e,o){p(this,S)[e]=o}remove(e){delete p(this,S)[e]}clear(){h(this,S,{})}};S=new WeakMap;var C=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var v;function fe(t="memory"){if(!v){let e;t==="localStorage"?e=C:t==="memory"?e=N:e=t,v=new e}return v}function H(){if(!v)throw Error("You must create a storage system.");return v}function Me(t){let e=t;return!!(e.token_type&&e.access_token)}function me(t){t.scope.split(" ").forEach(e=>{H().set(e,t)})}function ge(t){me(t),"other_tokens"in t&&t.other_tokens.forEach(me)}function P(t){let e=H().get(t);return!e||!Me(e)?null:`${e.token_type} ${e.access_token}`}function le(){H().clear()}var Ke,b,y,R,O,de,U,he,E=class{constructor(e){f(this,O);f(this,U);f(this,b,void 0);f(this,y,void 0);f(this,R,void 0);if(Ke=fe("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");h(this,y,s({client_id:e.client_id,authorization_endpoint:X(),token_endpoint:Z()},e)),h(this,b,Y(this,O,de).call(this))}reset(){Y(this,U,he).call(this),le()}redirect(){this.reset(),window.location.replace(p(this,b).authorizeUrl())}handleCodeRedirect(){return ie(this,arguments,function*(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let n=yield p(this,b).exchangeForAccessToken(o.toString());h(this,R,n),ge(p(this,R)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))})}hasToken(){return p(this,y).requested_scopes.split(" ").every(e=>!!P(e))}revoke(){this.reset()}};b=new WeakMap,y=new WeakMap,R=new WeakMap,O=new WeakSet,de=function(){return new Se.default(p(this,y))},U=new WeakSet,he=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function We(t){return new E(t)}function qe(t){return new E(t)}var M={};u(M,{CONFIG:()=>Ze,endpoint:()=>G,endpointSearch:()=>et,fileOperations:()=>L,taskSubmission:()=>F});var be=se(require("cross-fetch")),ye=be.default;function c(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let n=P(t);n&&(r.Authorization=n)}return ye(e,re(s({},o),{headers:r}))}var Be=function(t,e){var o;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/endpoint_search",{search:t!=null?t:{}}),(o=e==null?void 0:e.fetch)==null?void 0:o.options)},Te=Be;var L={};u(L,{ls:()=>Ve,mkdir:()=>Ye,rename:()=>$e,symlink:()=>Je});function d(t){return t==="get"?{}:{"Content-Type":"application/json"}}var Ve=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},Ye=function(t,e,o){var n;let r=s({DATA_TYPE:"mkdir"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/mkdir`),s({method:"post",body:JSON.stringify(r),headers:d("post")},(n=o==null?void 0:o.fetch)==null?void 0:n.options))},$e=function(t,e,o){var n;let r=s({DATA_TYPE:"rename"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/rename`),s({method:"post",body:JSON.stringify(r),headers:d("post")},(n=o==null?void 0:o.fetch)==null?void 0:n.options))},Je=function(t,e,o){var n;let r=s({DATA_TYPE:"symlink"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/symlink`),s({method:"post",body:JSON.stringify(r),headers:d("post")},(n=o==null?void 0:o.fetch)==null?void 0:n.options))};var F={};u(F,{submissionId:()=>Qe,submitDelete:()=>ze,submitTransfer:()=>je});var ze=function(t,e){var r;let o=s({DATA_TYPE:"delete"},t==null?void 0:t.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/delete"),s({method:"post",body:JSON.stringify(o),headers:d("post")},(r=e==null?void 0:e.fetch)==null?void 0:r.options))},je=function(t,e){var o;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/transfer"),s({method:"post",body:JSON.stringify(s({DATA_TYPE:"transfer"},t==null?void 0:t.payload)),headers:d("post")},(o=e==null?void 0:e.fetch)==null?void 0:o.options))};function Qe(t){var e;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/submission_id"),s({},(e=t==null?void 0:t.fetch)==null?void 0:e.options))}var G={};u(G,{get:()=>Xe});var Xe=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/endpoint/${t}`),s({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var Ze=_,et=Te;var W={};u(W,{CONFIG:()=>ot,query:()=>K});var K={};u(K,{get:()=>tt});var tt=function(t,e,o){var r;return c(j.SEARCH,a(l,`/v1/index/${t}/search`,{search:e}),s({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var ot=D;
"use strict";var xe=Object.create;var v=Object.defineProperty,_e=Object.defineProperties,Ie=Object.getOwnPropertyDescriptor,De=Object.getOwnPropertyDescriptors,Ae=Object.getOwnPropertyNames,te=Object.getOwnPropertySymbols,we=Object.getPrototypeOf,re=Object.prototype.hasOwnProperty,Ne=Object.prototype.propertyIsEnumerable;var oe=(t,e,o)=>e in t?v(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,s=(t,e)=>{for(var o in e||={})re.call(e,o)&&oe(t,o,e[o]);if(te)for(var o of te(e))Ne.call(e,o)&&oe(t,o,e[o]);return t},ne=(t,e)=>_e(t,De(e));var p=(t,e)=>{for(var o in e)v(t,o,{get:e[o],enumerable:!0})},se=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Ae(e))!re.call(t,n)&&n!==o&&v(t,n,{get:()=>e[n],enumerable:!(r=Ie(e,n))||r.enumerable});return t};var ie=(t,e,o)=>(o=t!=null?xe(we(t)):{},se(e||!t||!t.__esModule?v(o,"default",{value:t,enumerable:!0}):o,t)),Ce=t=>se(v({},"__esModule",{value:!0}),t);var Y=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var u=(t,e,o)=>(Y(t,e,"read from private field"),o?o.call(t):e.get(t)),g=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},b=(t,e,o,r)=>(Y(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var $=(t,e,o)=>(Y(t,e,"access private method"),o);var ae=(t,e,o)=>new Promise((r,n)=>{var f=l=>{try{B(o.next(l))}catch(V){n(V)}},Re=l=>{try{B(o.throw(l))}catch(V){n(V)}},B=l=>l.done?r(l.value):Promise.resolve(l.value).then(f,Re);B((o=o.apply(t,e)).next())});var rt={};p(rt,{auth:()=>N,authorization:()=>L,sdk:()=>He,search:()=>q,transfer:()=>K});module.exports=Ce(rt);function He(){return"@globus/sdk"}var L={};p(L,{PKCEAuthorization:()=>R,incremental:()=>qe,pkce:()=>We});var de=ie(require("js-pkce"));var N={};p(N,{CONFIG:()=>Ge,getAuthorizationEndpoint:()=>Z,getTokenEndpoint:()=>ee});var _={};p(_,{HOSTS:()=>J,ID:()=>m});var m="AUTH",J={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var I={};p(I,{HOSTS:()=>z,ID:()=>i});var i="TRANSFER",z={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var D="FLOWS",ce={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var A={};p(A,{HOSTS:()=>j,ID:()=>S,SCOPES:()=>Q});var S="SEARCH",j={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},Q={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var w=class extends Error{constructor(o,r){super();this.name="EnvironmentConfigurationError";this.message=`Invalid configuration value provided for ${o} (${r}).`}};function Pe(){return typeof window!="undefined"?window:process}function ke(t){return typeof window==typeof t}function ue(t,e=void 0){let o=Pe(),r;return ke(o)?r=o:r=o.env,t in r?r[t]:e}var pe={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function X(){let t=ue("GLOBUS_SDK_ENVIRONMENT",pe.PRODUCTION);if(!t||!Object.values(pe).includes(t))throw new w("GLOBUS_SDK_ENVIRONMENT",t);return t}var ct={[m]:m,[i]:i,[D]:D,[S]:S},Ue={[m]:J,[i]:z,[D]:ce,[S]:j};function Le(t,e){return Ue[t][e]}function fe(t,e=X()){let o=Le(t,e);return ue(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function Fe(t,e="",o=X()){let r=fe(t,o);return new URL(e,r)}function a(t,e,o){let r=Fe(t,e);if(o&&o.search){let n=new URLSearchParams(o.search);r.search=n.toString()}return r.toString()}var Ge=_;function Z(){return a(m,"/v2/oauth2/authorize")}function ee(){return a(m,"/v2/oauth2/token")}var d,C=class{constructor(){g(this,d,{})}get(e){return u(this,d)[e]}set(e,o){u(this,d)[e]=o}remove(e){delete u(this,d)[e]}clear(){b(this,d,{})}};d=new WeakMap;var H=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var E;function ge(t="memory"){if(!E){let e;t==="localStorage"?e=H:t==="memory"?e=C:e=t,E=new e}return E}function O(){if(!E)throw Error("You must create a storage system.");return E}function Me(t){let e=t;return!!(e.token_type&&e.access_token)}function me(t){t.scope.split(" ").forEach(e=>{O().set(e,t)})}function le(t){me(t),"other_tokens"in t&&t.other_tokens.forEach(me)}function P(t){let e=O().get(t);return!e||!Me(e)?null:`${e.token_type} ${e.access_token}`}function Se(){O().clear()}var Ke,y,T,x,k,he,U,be,R=class{constructor(e){g(this,k);g(this,U);g(this,y,void 0);g(this,T,void 0);g(this,x,void 0);if(Ke=ge("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");b(this,T,s({client_id:e.client_id,authorization_endpoint:Z(),token_endpoint:ee()},e)),b(this,y,$(this,k,he).call(this))}reset(){$(this,U,be).call(this),Se()}redirect(){this.reset(),window.location.replace(u(this,y).authorizeUrl())}handleCodeRedirect(){return ae(this,arguments,function*(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let n=yield u(this,y).exchangeForAccessToken(o.toString());b(this,x,n),le(u(this,x)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))})}hasToken(){return u(this,T).requested_scopes.split(" ").every(e=>!!P(e))}revoke(){this.reset()}};y=new WeakMap,T=new WeakMap,x=new WeakMap,k=new WeakSet,he=function(){return new de.default(u(this,T))},U=new WeakSet,be=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function We(t){return new R(t)}function qe(t){return new R(t)}var K={};p(K,{CONFIG:()=>Ze,endpoint:()=>M,endpointSearch:()=>et,fileOperations:()=>F,taskSubmission:()=>G});var ye=ie(require("cross-fetch")),Te=ye.default;function c(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let n=P(t);n&&(r.Authorization=n)}return Te(e,ne(s({},o),{headers:r}))}var Be=function(t,e){var r;let o={};if(t)for(let[n,f]of Object.entries(t))f&&(f!=null&&f.toString)&&typeof f.toString=="function"&&(o[n]=f.toString());return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/endpoint_search",{search:o}),(r=e==null?void 0:e.fetch)==null?void 0:r.options)},ve=Be;var F={};p(F,{ls:()=>Ve,mkdir:()=>Ye,rename:()=>$e,symlink:()=>Je});function h(t){return t==="get"?{}:{"Content-Type":"application/json"}}var Ve=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},Ye=function(t,e,o){var n;let r=s({DATA_TYPE:"mkdir"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/mkdir`),s({method:"post",body:JSON.stringify(r),headers:h("post")},(n=o==null?void 0:o.fetch)==null?void 0:n.options))},$e=function(t,e,o){var n;let r=s({DATA_TYPE:"rename"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/rename`),s({method:"post",body:JSON.stringify(r),headers:h("post")},(n=o==null?void 0:o.fetch)==null?void 0:n.options))},Je=function(t,e,o){var n;let r=s({DATA_TYPE:"symlink"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/symlink`),s({method:"post",body:JSON.stringify(r),headers:h("post")},(n=o==null?void 0:o.fetch)==null?void 0:n.options))};var G={};p(G,{submissionId:()=>Qe,submitDelete:()=>ze,submitTransfer:()=>je});var ze=function(t,e){var r;let o=s({DATA_TYPE:"delete"},t==null?void 0:t.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/delete"),s({method:"post",body:JSON.stringify(o),headers:h("post")},(r=e==null?void 0:e.fetch)==null?void 0:r.options))},je=function(t,e){var o;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/transfer"),s({method:"post",body:JSON.stringify(s({DATA_TYPE:"transfer"},t==null?void 0:t.payload)),headers:h("post")},(o=e==null?void 0:e.fetch)==null?void 0:o.options))};function Qe(t){var e;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/submission_id"),s({},(e=t==null?void 0:t.fetch)==null?void 0:e.options))}var M={};p(M,{get:()=>Xe});var Xe=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/endpoint/${t}`),s({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var Ze=I,et=ve;var q={};p(q,{CONFIG:()=>ot,query:()=>W});var W={};p(W,{get:()=>tt});var tt=function(t,e,o){var r;return c(Q.SEARCH,a(S,`/v1/index/${t}/search`,{search:e}),s({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var ot=A;

@@ -1,1 +0,1 @@

var te=Object.defineProperty,ye=Object.defineProperties;var Te=Object.getOwnPropertyDescriptors;var Z=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var ee=(t,e,o)=>e in t?te(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,n=(t,e)=>{for(var o in e||={})ve.call(e,o)&&ee(t,o,e[o]);if(Z)for(var o of Z(e))Ee.call(e,o)&&ee(t,o,e[o]);return t},oe=(t,e)=>ye(t,Te(e));var u=(t,e)=>{for(var o in e)te(t,o,{get:e[o],enumerable:!0})};var M=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var p=(t,e,o)=>(M(t,e,"read from private field"),o?o.call(t):e.get(t)),f=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},h=(t,e,o,r)=>(M(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var K=(t,e,o)=>(M(t,e,"access private method"),o);var re=(t,e,o)=>new Promise((r,s)=>{var he=g=>{try{F(o.next(g))}catch(G){s(G)}},be=g=>{try{F(o.throw(g))}catch(G){s(G)}},F=g=>g.done?r(g.value):Promise.resolve(g.value).then(he,be);F((o=o.apply(t,e)).next())});function je(){return"@globus/sdk"}var j={};u(j,{PKCEAuthorization:()=>v,incremental:()=>Oe,pkce:()=>Pe});import Ce from"js-pkce";var z={};u(z,{CONFIG:()=>we,getAuthorizationEndpoint:()=>$,getTokenEndpoint:()=>J});var R={};u(R,{HOSTS:()=>W,ID:()=>m});var m="AUTH",W={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var x={};u(x,{HOSTS:()=>q,ID:()=>i});var i="TRANSFER",q={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var _="FLOWS",ne={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var I={};u(I,{HOSTS:()=>B,ID:()=>l,SCOPES:()=>V});var l="SEARCH",B={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},V={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var D=class extends Error{constructor(o,r){super();this.name="EnvironmentConfigurationError";this.message=`Invalid configuration value provided for ${o} (${r}).`}};function xe(){return typeof window!="undefined"?window:process}function _e(t){return typeof window==typeof t}function ie(t,e=void 0){let o=xe(),r;return _e(o)?r=o:r=o.env,t in r?r[t]:e}var se={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function Y(){let t=ie("GLOBUS_SDK_ENVIRONMENT",se.PRODUCTION);if(!t||!Object.values(se).includes(t))throw new D("GLOBUS_SDK_ENVIRONMENT",t);return t}var et={[m]:m,[i]:i,[_]:_,[l]:l},Ie={[m]:W,[i]:q,[_]:ne,[l]:B};function De(t,e){return Ie[t][e]}function ae(t,e=Y()){let o=De(t,e);return ie(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function Ae(t,e="",o=Y()){let r=ae(t,o);return new URL(e,r)}function a(t,e,o){let r=Ae(t,e);if(o&&o.search){let s=new URLSearchParams(o.search);r.search=s.toString()}return r.toString()}var we=R;function $(){return a(m,"/v2/oauth2/authorize")}function J(){return a(m,"/v2/oauth2/token")}var S,A=class{constructor(){f(this,S,{})}get(e){return p(this,S)[e]}set(e,o){p(this,S)[e]=o}remove(e){delete p(this,S)[e]}clear(){h(this,S,{})}};S=new WeakMap;var w=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var T;function ce(t="memory"){if(!T){let e;t==="localStorage"?e=w:t==="memory"?e=A:e=t,T=new e}return T}function N(){if(!T)throw Error("You must create a storage system.");return T}function Ne(t){let e=t;return!!(e.token_type&&e.access_token)}function ue(t){t.scope.split(" ").forEach(e=>{N().set(e,t)})}function pe(t){ue(t),"other_tokens"in t&&t.other_tokens.forEach(ue)}function C(t){let e=N().get(t);return!e||!Ne(e)?null:`${e.token_type} ${e.access_token}`}function fe(){N().clear()}var He,b,y,E,H,me,P,ge,v=class{constructor(e){f(this,H);f(this,P);f(this,b,void 0);f(this,y,void 0);f(this,E,void 0);if(He=ce("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");h(this,y,n({client_id:e.client_id,authorization_endpoint:$(),token_endpoint:J()},e)),h(this,b,K(this,H,me).call(this))}reset(){K(this,P,ge).call(this),fe()}redirect(){this.reset(),window.location.replace(p(this,b).authorizeUrl())}handleCodeRedirect(){return re(this,arguments,function*(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let s=yield p(this,b).exchangeForAccessToken(o.toString());h(this,E,s),pe(p(this,E)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))})}hasToken(){return p(this,y).requested_scopes.split(" ").every(e=>!!C(e))}revoke(){this.reset()}};b=new WeakMap,y=new WeakMap,E=new WeakMap,H=new WeakSet,me=function(){return new Ce(p(this,y))},P=new WeakSet,ge=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function Pe(t){return new v(t)}function Oe(t){return new v(t)}var Q={};u(Q,{CONFIG:()=>Ve,endpoint:()=>k,endpointSearch:()=>Ye,fileOperations:()=>O,taskSubmission:()=>U});import Ue from"cross-fetch";var le=Ue;function c(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let s=C(t);s&&(r.Authorization=s)}return le(e,oe(n({},o),{headers:r}))}var ke=function(t,e){var o;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/endpoint_search",{search:t!=null?t:{}}),(o=e==null?void 0:e.fetch)==null?void 0:o.options)},Se=ke;var O={};u(O,{ls:()=>Le,mkdir:()=>Fe,rename:()=>Ge,symlink:()=>Me});function d(t){return t==="get"?{}:{"Content-Type":"application/json"}}var Le=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},Fe=function(t,e,o){var s;let r=n({DATA_TYPE:"mkdir"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/mkdir`),n({method:"post",body:JSON.stringify(r),headers:d("post")},(s=o==null?void 0:o.fetch)==null?void 0:s.options))},Ge=function(t,e,o){var s;let r=n({DATA_TYPE:"rename"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/rename`),n({method:"post",body:JSON.stringify(r),headers:d("post")},(s=o==null?void 0:o.fetch)==null?void 0:s.options))},Me=function(t,e,o){var s;let r=n({DATA_TYPE:"symlink"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/symlink`),n({method:"post",body:JSON.stringify(r),headers:d("post")},(s=o==null?void 0:o.fetch)==null?void 0:s.options))};var U={};u(U,{submissionId:()=>qe,submitDelete:()=>Ke,submitTransfer:()=>We});var Ke=function(t,e){var r;let o=n({DATA_TYPE:"delete"},t==null?void 0:t.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/delete"),n({method:"post",body:JSON.stringify(o),headers:d("post")},(r=e==null?void 0:e.fetch)==null?void 0:r.options))},We=function(t,e){var o;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/transfer"),n({method:"post",body:JSON.stringify(n({DATA_TYPE:"transfer"},t==null?void 0:t.payload)),headers:d("post")},(o=e==null?void 0:e.fetch)==null?void 0:o.options))};function qe(t){var e;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/submission_id"),n({},(e=t==null?void 0:t.fetch)==null?void 0:e.options))}var k={};u(k,{get:()=>Be});var Be=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/endpoint/${t}`),n({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var Ve=x,Ye=Se;var X={};u(X,{CONFIG:()=>Je,query:()=>L});var L={};u(L,{get:()=>$e});var $e=function(t,e,o){var r;return c(V.SEARCH,a(l,`/v1/index/${t}/search`,{search:e}),n({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var Je=I;export{z as auth,j as authorization,je as sdk,X as search,Q as transfer};
var oe=Object.defineProperty,ye=Object.defineProperties;var Te=Object.getOwnPropertyDescriptors;var ee=Object.getOwnPropertySymbols;var ve=Object.prototype.hasOwnProperty,Ee=Object.prototype.propertyIsEnumerable;var te=(t,e,o)=>e in t?oe(t,e,{enumerable:!0,configurable:!0,writable:!0,value:o}):t[e]=o,n=(t,e)=>{for(var o in e||={})ve.call(e,o)&&te(t,o,e[o]);if(ee)for(var o of ee(e))Ee.call(e,o)&&te(t,o,e[o]);return t},re=(t,e)=>ye(t,Te(e));var p=(t,e)=>{for(var o in e)oe(t,o,{get:e[o],enumerable:!0})};var K=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var u=(t,e,o)=>(K(t,e,"read from private field"),o?o.call(t):e.get(t)),g=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},b=(t,e,o,r)=>(K(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var W=(t,e,o)=>(K(t,e,"access private method"),o);var ne=(t,e,o)=>new Promise((r,s)=>{var f=l=>{try{G(o.next(l))}catch(M){s(M)}},be=l=>{try{G(o.throw(l))}catch(M){s(M)}},G=l=>l.done?r(l.value):Promise.resolve(l.value).then(f,be);G((o=o.apply(t,e)).next())});function je(){return"@globus/sdk"}var Q={};p(Q,{PKCEAuthorization:()=>E,incremental:()=>Pe,pkce:()=>Oe});import Ce from"js-pkce";var j={};p(j,{CONFIG:()=>we,getAuthorizationEndpoint:()=>J,getTokenEndpoint:()=>z});var x={};p(x,{HOSTS:()=>q,ID:()=>m});var m="AUTH",q={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var _={};p(_,{HOSTS:()=>B,ID:()=>i});var i="TRANSFER",B={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var I="FLOWS",se={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var D={};p(D,{HOSTS:()=>V,ID:()=>S,SCOPES:()=>Y});var S="SEARCH",V={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},Y={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var A=class extends Error{constructor(o,r){super();this.name="EnvironmentConfigurationError";this.message=`Invalid configuration value provided for ${o} (${r}).`}};function xe(){return typeof window!="undefined"?window:process}function _e(t){return typeof window==typeof t}function ae(t,e=void 0){let o=xe(),r;return _e(o)?r=o:r=o.env,t in r?r[t]:e}var ie={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function $(){let t=ae("GLOBUS_SDK_ENVIRONMENT",ie.PRODUCTION);if(!t||!Object.values(ie).includes(t))throw new A("GLOBUS_SDK_ENVIRONMENT",t);return t}var et={[m]:m,[i]:i,[I]:I,[S]:S},Ie={[m]:q,[i]:B,[I]:se,[S]:V};function De(t,e){return Ie[t][e]}function ce(t,e=$()){let o=De(t,e);return ae(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function Ae(t,e="",o=$()){let r=ce(t,o);return new URL(e,r)}function a(t,e,o){let r=Ae(t,e);if(o&&o.search){let s=new URLSearchParams(o.search);r.search=s.toString()}return r.toString()}var we=x;function J(){return a(m,"/v2/oauth2/authorize")}function z(){return a(m,"/v2/oauth2/token")}var d,w=class{constructor(){g(this,d,{})}get(e){return u(this,d)[e]}set(e,o){u(this,d)[e]=o}remove(e){delete u(this,d)[e]}clear(){b(this,d,{})}};d=new WeakMap;var N=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var v;function pe(t="memory"){if(!v){let e;t==="localStorage"?e=N:t==="memory"?e=w:e=t,v=new e}return v}function C(){if(!v)throw Error("You must create a storage system.");return v}function Ne(t){let e=t;return!!(e.token_type&&e.access_token)}function ue(t){t.scope.split(" ").forEach(e=>{C().set(e,t)})}function fe(t){ue(t),"other_tokens"in t&&t.other_tokens.forEach(ue)}function H(t){let e=C().get(t);return!e||!Ne(e)?null:`${e.token_type} ${e.access_token}`}function ge(){C().clear()}var He,y,T,R,O,me,P,le,E=class{constructor(e){g(this,O);g(this,P);g(this,y,void 0);g(this,T,void 0);g(this,R,void 0);if(He=pe("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");b(this,T,n({client_id:e.client_id,authorization_endpoint:J(),token_endpoint:z()},e)),b(this,y,W(this,O,me).call(this))}reset(){W(this,P,le).call(this),ge()}redirect(){this.reset(),window.location.replace(u(this,y).authorizeUrl())}handleCodeRedirect(){return ne(this,arguments,function*(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let s=yield u(this,y).exchangeForAccessToken(o.toString());b(this,R,s),fe(u(this,R)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))})}hasToken(){return u(this,T).requested_scopes.split(" ").every(e=>!!H(e))}revoke(){this.reset()}};y=new WeakMap,T=new WeakMap,R=new WeakMap,O=new WeakSet,me=function(){return new Ce(u(this,T))},P=new WeakSet,le=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function Oe(t){return new E(t)}function Pe(t){return new E(t)}var X={};p(X,{CONFIG:()=>Ve,endpoint:()=>L,endpointSearch:()=>Ye,fileOperations:()=>k,taskSubmission:()=>U});import ke from"cross-fetch";var Se=ke;function c(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let s=H(t);s&&(r.Authorization=s)}return Se(e,re(n({},o),{headers:r}))}var Ue=function(t,e){var r;let o={};if(t)for(let[s,f]of Object.entries(t))f&&(f!=null&&f.toString)&&typeof f.toString=="function"&&(o[s]=f.toString());return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/endpoint_search",{search:o}),(r=e==null?void 0:e.fetch)==null?void 0:r.options)},de=Ue;var k={};p(k,{ls:()=>Le,mkdir:()=>Fe,rename:()=>Ge,symlink:()=>Me});function h(t){return t==="get"?{}:{"Content-Type":"application/json"}}var Le=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},Fe=function(t,e,o){var s;let r=n({DATA_TYPE:"mkdir"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/mkdir`),n({method:"post",body:JSON.stringify(r),headers:h("post")},(s=o==null?void 0:o.fetch)==null?void 0:s.options))},Ge=function(t,e,o){var s;let r=n({DATA_TYPE:"rename"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/rename`),n({method:"post",body:JSON.stringify(r),headers:h("post")},(s=o==null?void 0:o.fetch)==null?void 0:s.options))},Me=function(t,e,o){var s;let r=n({DATA_TYPE:"symlink"},e==null?void 0:e.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/operation/endpoint/${t}/symlink`),n({method:"post",body:JSON.stringify(r),headers:h("post")},(s=o==null?void 0:o.fetch)==null?void 0:s.options))};var U={};p(U,{submissionId:()=>qe,submitDelete:()=>Ke,submitTransfer:()=>We});var Ke=function(t,e){var r;let o=n({DATA_TYPE:"delete"},t==null?void 0:t.payload);return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/delete"),n({method:"post",body:JSON.stringify(o),headers:h("post")},(r=e==null?void 0:e.fetch)==null?void 0:r.options))},We=function(t,e){var o;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/transfer"),n({method:"post",body:JSON.stringify(n({DATA_TYPE:"transfer"},t==null?void 0:t.payload)),headers:h("post")},(o=e==null?void 0:e.fetch)==null?void 0:o.options))};function qe(t){var e;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,"/v0.10/submission_id"),n({},(e=t==null?void 0:t.fetch)==null?void 0:e.options))}var L={};p(L,{get:()=>Be});var Be=function(t,e,o){var r;return c("urn:globus:auth:scope:transfer.api.globus.org:all",a(i,`/v0.10/endpoint/${t}`),n({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var Ve=_,Ye=de;var Z={};p(Z,{CONFIG:()=>Je,query:()=>F});var F={};p(F,{get:()=>$e});var $e=function(t,e,o){var r;return c(Y.SEARCH,a(S,`/v1/index/${t}/search`,{search:e}),n({},(r=o==null?void 0:o.fetch)==null?void 0:r.options))};var Je=D;export{j as auth,Q as authorization,je as sdk,Z as search,X as transfer};

@@ -1,1 +0,1 @@

"use strict";var ge=Object.create;var v=Object.defineProperty;var le=Object.getOwnPropertyDescriptor;var Se=Object.getOwnPropertyNames;var de=Object.getPrototypeOf,he=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)v(t,o,{get:e[o],enumerable:!0})},j=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of Se(e))!he.call(t,n)&&n!==o&&v(t,n,{get:()=>e[n],enumerable:!(r=le(e,n))||r.enumerable});return t};var Q=(t,e,o)=>(o=t!=null?ge(de(t)):{},j(e||!t||!t.__esModule?v(o,"default",{value:t,enumerable:!0}):o,t)),be=t=>j(v({},"__esModule",{value:!0}),t);var P=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var p=(t,e,o)=>(P(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},S=(t,e,o,r)=>(P(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var O=(t,e,o)=>(P(t,e,"access private method"),o);var Be={};c(Be,{auth:()=>W,authorization:()=>q,sdk:()=>ye,search:()=>z,transfer:()=>$});module.exports=be(Be);function ye(){return"@globus/sdk"}var q={};c(q,{PKCEAuthorization:()=>y,incremental:()=>Ne,pkce:()=>we});var ie=Q(require("js-pkce"));var W={};c(W,{CONFIG:()=>Ie,getAuthorizationEndpoint:()=>M,getTokenEndpoint:()=>K});var E={};c(E,{HOSTS:()=>U,ID:()=>f});var f="AUTH",U={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var R={};c(R,{HOSTS:()=>k,ID:()=>s});var s="TRANSFER",k={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var x="FLOWS",X={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var _={};c(_,{HOSTS:()=>L,ID:()=>m,SCOPES:()=>F});var m="SEARCH",L={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},F={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var I=class extends Error{name="EnvironmentConfigurationError";constructor(e,o){super(),this.message=`Invalid configuration value provided for ${e} (${o}).`}};function ve(){return typeof window<"u"?window:process}function Ee(t){return typeof window==typeof t}function ee(t,e=void 0){let o=ve(),r;return Ee(o)?r=o:r=o.env,t in r?r[t]:e}var Z={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function G(){let t=ee("GLOBUS_SDK_ENVIRONMENT",Z.PRODUCTION);if(!t||!Object.values(Z).includes(t))throw new I("GLOBUS_SDK_ENVIRONMENT",t);return t}var ze={[f]:f,[s]:s,[x]:x,[m]:m},Re={[f]:U,[s]:k,[x]:X,[m]:L};function xe(t,e){return Re[t][e]}function te(t,e=G()){let o=xe(t,e);return ee(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function _e(t,e="",o=G()){let r=te(t,o);return new URL(e,r)}function i(t,e,o){let r=_e(t,e);if(o&&o.search){let n=new URLSearchParams(o.search);r.search=n.toString()}return r.toString()}var Ie=E;function M(){return i(f,"/v2/oauth2/authorize")}function K(){return i(f,"/v2/oauth2/token")}var g,D=class{constructor(){u(this,g,{})}get(e){return p(this,g)[e]}set(e,o){p(this,g)[e]=o}remove(e){delete p(this,g)[e]}clear(){S(this,g,{})}};g=new WeakMap;var A=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var b;function oe(t="memory"){if(!b){let e;t==="localStorage"?e=A:t==="memory"?e=D:e=t,b=new e}return b}function w(){if(!b)throw Error("You must create a storage system.");return b}function De(t){let e=t;return!!(e.token_type&&e.access_token)}function re(t){t.scope.split(" ").forEach(e=>{w().set(e,t)})}function ne(t){re(t),"other_tokens"in t&&t.other_tokens.forEach(re)}function N(t){let e=w().get(t);return!e||!De(e)?null:`${e.token_type} ${e.access_token}`}function se(){w().clear()}var Ae,d,h,T,C,ae,H,ce,y=class{constructor(e){u(this,C);u(this,H);u(this,d,void 0);u(this,h,void 0);u(this,T,void 0);if(Ae=oe("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");S(this,h,{client_id:e.client_id,authorization_endpoint:M(),token_endpoint:K(),...e}),S(this,d,O(this,C,ae).call(this))}reset(){O(this,H,ce).call(this),se()}redirect(){this.reset(),window.location.replace(p(this,d).authorizeUrl())}async handleCodeRedirect(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let n=await p(this,d).exchangeForAccessToken(o.toString());S(this,T,n),ne(p(this,T)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))}hasToken(){return p(this,h).requested_scopes.split(" ").every(e=>!!N(e))}revoke(){this.reset()}};d=new WeakMap,h=new WeakMap,T=new WeakMap,C=new WeakSet,ae=function(){return new ie.default(p(this,h))},H=new WeakSet,ce=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function we(t){return new y(t)}function Ne(t){return new y(t)}var $={};c($,{CONFIG:()=>Me,endpoint:()=>Y,endpointSearch:()=>Ke,fileOperations:()=>B,taskSubmission:()=>V});var pe=Q(require("cross-fetch")),ue=pe.default;function a(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let n=N(t);n&&(r.Authorization=n)}return ue(e,{...o,headers:r})}var Ce=function(t,e){var o;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/endpoint_search",{search:t??{}}),(o=e==null?void 0:e.fetch)==null?void 0:o.options)},fe=Ce;var B={};c(B,{ls:()=>He,mkdir:()=>Pe,rename:()=>Oe,symlink:()=>Ue});function l(t){return t==="get"?{}:{"Content-Type":"application/json"}}var He=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},Pe=function(t,e,o){var n;let r={DATA_TYPE:"mkdir",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/mkdir`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(n=o==null?void 0:o.fetch)==null?void 0:n.options})},Oe=function(t,e,o){var n;let r={DATA_TYPE:"rename",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/rename`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(n=o==null?void 0:o.fetch)==null?void 0:n.options})},Ue=function(t,e,o){var n;let r={DATA_TYPE:"symlink",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/symlink`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(n=o==null?void 0:o.fetch)==null?void 0:n.options})};var V={};c(V,{submissionId:()=>Fe,submitDelete:()=>ke,submitTransfer:()=>Le});var ke=function(t,e){var r;let o={DATA_TYPE:"delete",...t==null?void 0:t.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/delete"),{method:"post",body:JSON.stringify(o),headers:l("post"),...(r=e==null?void 0:e.fetch)==null?void 0:r.options})},Le=function(t,e){var o;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/transfer"),{method:"post",body:JSON.stringify({DATA_TYPE:"transfer",...t==null?void 0:t.payload}),headers:l("post"),...(o=e==null?void 0:e.fetch)==null?void 0:o.options})};function Fe(t){var e;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/submission_id"),{...(e=t==null?void 0:t.fetch)==null?void 0:e.options})}var Y={};c(Y,{get:()=>Ge});var Ge=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/endpoint/${t}`),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var Me=R,Ke=fe;var z={};c(z,{CONFIG:()=>qe,query:()=>J});var J={};c(J,{get:()=>We});var We=function(t,e,o){var r;return a(F.SEARCH,i(m,`/v1/index/${t}/search`,{search:e}),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var qe=_;
"use strict";var le=Object.create;var E=Object.defineProperty;var Se=Object.getOwnPropertyDescriptor;var de=Object.getOwnPropertyNames;var he=Object.getPrototypeOf,be=Object.prototype.hasOwnProperty;var c=(t,e)=>{for(var o in e)E(t,o,{get:e[o],enumerable:!0})},Q=(t,e,o,r)=>{if(e&&typeof e=="object"||typeof e=="function")for(let n of de(e))!be.call(t,n)&&n!==o&&E(t,n,{get:()=>e[n],enumerable:!(r=Se(e,n))||r.enumerable});return t};var X=(t,e,o)=>(o=t!=null?le(he(t)):{},Q(e||!t||!t.__esModule?E(o,"default",{value:t,enumerable:!0}):o,t)),ye=t=>Q(E({},"__esModule",{value:!0}),t);var P=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var p=(t,e,o)=>(P(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},d=(t,e,o,r)=>(P(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var k=(t,e,o)=>(P(t,e,"access private method"),o);var Ve={};c(Ve,{auth:()=>q,authorization:()=>B,sdk:()=>Te,search:()=>j,transfer:()=>J});module.exports=ye(Ve);function Te(){return"@globus/sdk"}var B={};c(B,{PKCEAuthorization:()=>T,incremental:()=>Ce,pkce:()=>Ne});var ae=X(require("js-pkce"));var q={};c(q,{CONFIG:()=>De,getAuthorizationEndpoint:()=>K,getTokenEndpoint:()=>W});var R={};c(R,{HOSTS:()=>U,ID:()=>f});var f="AUTH",U={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var x={};c(x,{HOSTS:()=>L,ID:()=>s});var s="TRANSFER",L={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var _="FLOWS",Z={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var I={};c(I,{HOSTS:()=>F,ID:()=>g,SCOPES:()=>G});var g="SEARCH",F={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},G={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var D=class extends Error{name="EnvironmentConfigurationError";constructor(e,o){super(),this.message=`Invalid configuration value provided for ${e} (${o}).`}};function Ee(){return typeof window<"u"?window:process}function Re(t){return typeof window==typeof t}function te(t,e=void 0){let o=Ee(),r;return Re(o)?r=o:r=o.env,t in r?r[t]:e}var ee={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function M(){let t=te("GLOBUS_SDK_ENVIRONMENT",ee.PRODUCTION);if(!t||!Object.values(ee).includes(t))throw new D("GLOBUS_SDK_ENVIRONMENT",t);return t}var je={[f]:f,[s]:s,[_]:_,[g]:g},xe={[f]:U,[s]:L,[_]:Z,[g]:F};function _e(t,e){return xe[t][e]}function oe(t,e=M()){let o=_e(t,e);return te(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function Ie(t,e="",o=M()){let r=oe(t,o);return new URL(e,r)}function i(t,e,o){let r=Ie(t,e);if(o&&o.search){let n=new URLSearchParams(o.search);r.search=n.toString()}return r.toString()}var De=R;function K(){return i(f,"/v2/oauth2/authorize")}function W(){return i(f,"/v2/oauth2/token")}var m,A=class{constructor(){u(this,m,{})}get(e){return p(this,m)[e]}set(e,o){p(this,m)[e]=o}remove(e){delete p(this,m)[e]}clear(){d(this,m,{})}};m=new WeakMap;var w=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var y;function re(t="memory"){if(!y){let e;t==="localStorage"?e=w:t==="memory"?e=A:e=t,y=new e}return y}function N(){if(!y)throw Error("You must create a storage system.");return y}function Ae(t){let e=t;return!!(e.token_type&&e.access_token)}function ne(t){t.scope.split(" ").forEach(e=>{N().set(e,t)})}function se(t){ne(t),"other_tokens"in t&&t.other_tokens.forEach(ne)}function C(t){let e=N().get(t);return!e||!Ae(e)?null:`${e.token_type} ${e.access_token}`}function ie(){N().clear()}var we,h,b,v,H,ce,O,pe,T=class{constructor(e){u(this,H);u(this,O);u(this,h,void 0);u(this,b,void 0);u(this,v,void 0);if(we=re("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");d(this,b,{client_id:e.client_id,authorization_endpoint:K(),token_endpoint:W(),...e}),d(this,h,k(this,H,ce).call(this))}reset(){k(this,O,pe).call(this),ie()}redirect(){this.reset(),window.location.replace(p(this,h).authorizeUrl())}async handleCodeRedirect(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let n=await p(this,h).exchangeForAccessToken(o.toString());d(this,v,n),se(p(this,v)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))}hasToken(){return p(this,b).requested_scopes.split(" ").every(e=>!!C(e))}revoke(){this.reset()}};h=new WeakMap,b=new WeakMap,v=new WeakMap,H=new WeakSet,ce=function(){return new ae.default(p(this,b))},O=new WeakSet,pe=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function Ne(t){return new T(t)}function Ce(t){return new T(t)}var J={};c(J,{CONFIG:()=>Ke,endpoint:()=>$,endpointSearch:()=>We,fileOperations:()=>V,taskSubmission:()=>Y});var ue=X(require("cross-fetch")),fe=ue.default;function a(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let n=C(t);n&&(r.Authorization=n)}return fe(e,{...o,headers:r})}var He=function(t,e){var r;let o={};if(t)for(let[n,S]of Object.entries(t))S&&(S!=null&&S.toString)&&typeof S.toString=="function"&&(o[n]=S.toString());return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/endpoint_search",{search:o}),(r=e==null?void 0:e.fetch)==null?void 0:r.options)},ge=He;var V={};c(V,{ls:()=>Oe,mkdir:()=>Pe,rename:()=>ke,symlink:()=>Ue});function l(t){return t==="get"?{}:{"Content-Type":"application/json"}}var Oe=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},Pe=function(t,e,o){var n;let r={DATA_TYPE:"mkdir",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/mkdir`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(n=o==null?void 0:o.fetch)==null?void 0:n.options})},ke=function(t,e,o){var n;let r={DATA_TYPE:"rename",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/rename`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(n=o==null?void 0:o.fetch)==null?void 0:n.options})},Ue=function(t,e,o){var n;let r={DATA_TYPE:"symlink",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/operation/endpoint/${t}/symlink`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(n=o==null?void 0:o.fetch)==null?void 0:n.options})};var Y={};c(Y,{submissionId:()=>Ge,submitDelete:()=>Le,submitTransfer:()=>Fe});var Le=function(t,e){var r;let o={DATA_TYPE:"delete",...t==null?void 0:t.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/delete"),{method:"post",body:JSON.stringify(o),headers:l("post"),...(r=e==null?void 0:e.fetch)==null?void 0:r.options})},Fe=function(t,e){var o;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/transfer"),{method:"post",body:JSON.stringify({DATA_TYPE:"transfer",...t==null?void 0:t.payload}),headers:l("post"),...(o=e==null?void 0:e.fetch)==null?void 0:o.options})};function Ge(t){var e;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,"/v0.10/submission_id"),{...(e=t==null?void 0:t.fetch)==null?void 0:e.options})}var $={};c($,{get:()=>Me});var Me=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",i(s,`/v0.10/endpoint/${t}`),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var Ke=x,We=ge;var j={};c(j,{CONFIG:()=>Be,query:()=>z});var z={};c(z,{get:()=>qe});var qe=function(t,e,o){var r;return a(G.SEARCH,i(g,`/v1/index/${t}/search`,{search:e}),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var Be=I;

@@ -1,1 +0,1 @@

var ce=Object.defineProperty;var c=(t,e)=>{for(var o in e)ce(t,o,{get:e[o],enumerable:!0})};var H=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var p=(t,e,o)=>(H(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},S=(t,e,o,r)=>(H(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var P=(t,e,o)=>(H(t,e,"access private method"),o);function ke(){return"@globus/sdk"}var oe={};c(oe,{PKCEAuthorization:()=>y,incremental:()=>Te,pkce:()=>ye});import he from"js-pkce";var z={};c(z,{CONFIG:()=>Se,getAuthorizationEndpoint:()=>G,getTokenEndpoint:()=>M});var v={};c(v,{HOSTS:()=>O,ID:()=>f});var f="AUTH",O={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var E={};c(E,{HOSTS:()=>U,ID:()=>n});var n="TRANSFER",U={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var R="FLOWS",V={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var x={};c(x,{HOSTS:()=>k,ID:()=>m,SCOPES:()=>L});var m="SEARCH",k={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},L={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var _=class extends Error{name="EnvironmentConfigurationError";constructor(e,o){super(),this.message=`Invalid configuration value provided for ${e} (${o}).`}};function ue(){return typeof window<"u"?window:process}function fe(t){return typeof window==typeof t}function $(t,e=void 0){let o=ue(),r;return fe(o)?r=o:r=o.env,t in r?r[t]:e}var Y={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function F(){let t=$("GLOBUS_SDK_ENVIRONMENT",Y.PRODUCTION);if(!t||!Object.values(Y).includes(t))throw new _("GLOBUS_SDK_ENVIRONMENT",t);return t}var Me={[f]:f,[n]:n,[R]:R,[m]:m},me={[f]:O,[n]:U,[R]:V,[m]:k};function ge(t,e){return me[t][e]}function J(t,e=F()){let o=ge(t,e);return $(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function le(t,e="",o=F()){let r=J(t,o);return new URL(e,r)}function s(t,e,o){let r=le(t,e);if(o&&o.search){let i=new URLSearchParams(o.search);r.search=i.toString()}return r.toString()}var Se=v;function G(){return s(f,"/v2/oauth2/authorize")}function M(){return s(f,"/v2/oauth2/token")}var g,I=class{constructor(){u(this,g,{})}get(e){return p(this,g)[e]}set(e,o){p(this,g)[e]=o}remove(e){delete p(this,g)[e]}clear(){S(this,g,{})}};g=new WeakMap;var D=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var b;function j(t="memory"){if(!b){let e;t==="localStorage"?e=D:t==="memory"?e=I:e=t,b=new e}return b}function A(){if(!b)throw Error("You must create a storage system.");return b}function de(t){let e=t;return!!(e.token_type&&e.access_token)}function Q(t){t.scope.split(" ").forEach(e=>{A().set(e,t)})}function X(t){Q(t),"other_tokens"in t&&t.other_tokens.forEach(Q)}function w(t){let e=A().get(t);return!e||!de(e)?null:`${e.token_type} ${e.access_token}`}function Z(){A().clear()}var be,d,h,T,N,ee,C,te,y=class{constructor(e){u(this,N);u(this,C);u(this,d,void 0);u(this,h,void 0);u(this,T,void 0);if(be=j("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");S(this,h,{client_id:e.client_id,authorization_endpoint:G(),token_endpoint:M(),...e}),S(this,d,P(this,N,ee).call(this))}reset(){P(this,C,te).call(this),Z()}redirect(){this.reset(),window.location.replace(p(this,d).authorizeUrl())}async handleCodeRedirect(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let i=await p(this,d).exchangeForAccessToken(o.toString());S(this,T,i),X(p(this,T)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))}hasToken(){return p(this,h).requested_scopes.split(" ").every(e=>!!w(e))}revoke(){this.reset()}};d=new WeakMap,h=new WeakMap,T=new WeakMap,N=new WeakSet,ee=function(){return new he(p(this,h))},C=new WeakSet,te=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function ye(t){return new y(t)}function Te(t){return new y(t)}var ie={};c(ie,{CONFIG:()=>Ce,endpoint:()=>q,endpointSearch:()=>He,fileOperations:()=>K,taskSubmission:()=>W});import ve from"cross-fetch";var re=ve;function a(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let i=w(t);i&&(r.Authorization=i)}return re(e,{...o,headers:r})}var Ee=function(t,e){var o;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/endpoint_search",{search:t??{}}),(o=e==null?void 0:e.fetch)==null?void 0:o.options)},ne=Ee;var K={};c(K,{ls:()=>Re,mkdir:()=>xe,rename:()=>_e,symlink:()=>Ie});function l(t){return t==="get"?{}:{"Content-Type":"application/json"}}var Re=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},xe=function(t,e,o){var i;let r={DATA_TYPE:"mkdir",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/mkdir`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(i=o==null?void 0:o.fetch)==null?void 0:i.options})},_e=function(t,e,o){var i;let r={DATA_TYPE:"rename",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/rename`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(i=o==null?void 0:o.fetch)==null?void 0:i.options})},Ie=function(t,e,o){var i;let r={DATA_TYPE:"symlink",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/symlink`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(i=o==null?void 0:o.fetch)==null?void 0:i.options})};var W={};c(W,{submissionId:()=>we,submitDelete:()=>De,submitTransfer:()=>Ae});var De=function(t,e){var r;let o={DATA_TYPE:"delete",...t==null?void 0:t.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/delete"),{method:"post",body:JSON.stringify(o),headers:l("post"),...(r=e==null?void 0:e.fetch)==null?void 0:r.options})},Ae=function(t,e){var o;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/transfer"),{method:"post",body:JSON.stringify({DATA_TYPE:"transfer",...t==null?void 0:t.payload}),headers:l("post"),...(o=e==null?void 0:e.fetch)==null?void 0:o.options})};function we(t){var e;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/submission_id"),{...(e=t==null?void 0:t.fetch)==null?void 0:e.options})}var q={};c(q,{get:()=>Ne});var Ne=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/endpoint/${t}`),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var Ce=E,He=ne;var ae={};c(ae,{CONFIG:()=>Oe,query:()=>B});var B={};c(B,{get:()=>Pe});var Pe=function(t,e,o){var r;return a(L.SEARCH,s(m,`/v1/index/${t}/search`,{search:e}),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var Oe=x;export{z as auth,oe as authorization,ke as sdk,ae as search,ie as transfer};
var pe=Object.defineProperty;var c=(t,e)=>{for(var o in e)pe(t,o,{get:e[o],enumerable:!0})};var O=(t,e,o)=>{if(!e.has(t))throw TypeError("Cannot "+o)};var p=(t,e,o)=>(O(t,e,"read from private field"),o?o.call(t):e.get(t)),u=(t,e,o)=>{if(e.has(t))throw TypeError("Cannot add the same private member more than once");e instanceof WeakSet?e.add(t):e.set(t,o)},d=(t,e,o,r)=>(O(t,e,"write to private field"),r?r.call(t,o):e.set(t,o),o);var P=(t,e,o)=>(O(t,e,"access private method"),o);function Le(){return"@globus/sdk"}var re={};c(re,{PKCEAuthorization:()=>T,incremental:()=>ve,pkce:()=>Te});import be from"js-pkce";var j={};c(j,{CONFIG:()=>de,getAuthorizationEndpoint:()=>M,getTokenEndpoint:()=>K});var E={};c(E,{HOSTS:()=>k,ID:()=>f});var f="AUTH",k={integration:"auth.integration.globuscs.info",sandbox:"auth.sandbox.globuscs.info",production:"auth.globus.org",test:"auth.test.globuscs.info",staging:"auth.staging.globuscs.info",preview:"auth.preview.globus.org"};var R={};c(R,{HOSTS:()=>U,ID:()=>n});var n="TRANSFER",U={sandbox:"transfer.sandbox.globuscs.info",production:"transfer.api.globusonline.org",staging:"transfer.api.staging.globuscs.info",integration:"transfer.api.integration.globuscs.info",test:"transfer.api.test.globuscs.info",preview:"transfer.api.preview.globus.org"};var x="FLOWS",Y={sandbox:"sandbox.flows.automate.globus.org",production:"flows.globus.org",staging:"staging.flows.automate.globus.org",integration:"integration.flows.automate.globus.org",test:"test.flows.automate.globus.org",preview:"preview.flows.automate.globus.org"};var _={};c(_,{HOSTS:()=>L,ID:()=>g,SCOPES:()=>F});var g="SEARCH",L={sandbox:"search.api.sandbox.globuscs.info",production:"search.api.globus.org",staging:"search.api.staging.globuscs.info",integration:"search.api.integration.globuscs.info",test:"search.api.test.globuscs.info",preview:"search.api.preview.globus.org"},F={ALL:"urn:globus:auth:scope:search.api.globus.org:all",INGEST:"urn:globus:auth:scope:search.api.globus.org:ingest",SEARCH:"urn:globus:auth:scope:search.api.globus.org:search"};var I=class extends Error{name="EnvironmentConfigurationError";constructor(e,o){super(),this.message=`Invalid configuration value provided for ${e} (${o}).`}};function fe(){return typeof window<"u"?window:process}function ge(t){return typeof window==typeof t}function J(t,e=void 0){let o=fe(),r;return ge(o)?r=o:r=o.env,t in r?r[t]:e}var $={PRODUCTION:"production",PREVIEW:"preview",STAGING:"staging",SANDBOX:"sandbox",INTEGRATION:"integration",TEST:"test"};function G(){let t=J("GLOBUS_SDK_ENVIRONMENT",$.PRODUCTION);if(!t||!Object.values($).includes(t))throw new I("GLOBUS_SDK_ENVIRONMENT",t);return t}var Ke={[f]:f,[n]:n,[x]:x,[g]:g},me={[f]:k,[n]:U,[x]:Y,[g]:L};function le(t,e){return me[t][e]}function z(t,e=G()){let o=le(t,e);return J(`GLOBUS_SDK_SERVICE_URL_${t}`,o?`https://${o}`:void 0)}function Se(t,e="",o=G()){let r=z(t,o);return new URL(e,r)}function s(t,e,o){let r=Se(t,e);if(o&&o.search){let i=new URLSearchParams(o.search);r.search=i.toString()}return r.toString()}var de=E;function M(){return s(f,"/v2/oauth2/authorize")}function K(){return s(f,"/v2/oauth2/token")}var m,D=class{constructor(){u(this,m,{})}get(e){return p(this,m)[e]}set(e,o){p(this,m)[e]=o}remove(e){delete p(this,m)[e]}clear(){d(this,m,{})}};m=new WeakMap;var A=class{get(e){let o=localStorage.getItem(e);return o!==null?JSON.parse(o):null}set(e,o){localStorage.setItem(e,JSON.stringify(o))}remove(e){localStorage.removeItem(e)}clear(){localStorage.clear()}};var y;function Q(t="memory"){if(!y){let e;t==="localStorage"?e=A:t==="memory"?e=D:e=t,y=new e}return y}function w(){if(!y)throw Error("You must create a storage system.");return y}function he(t){let e=t;return!!(e.token_type&&e.access_token)}function X(t){t.scope.split(" ").forEach(e=>{w().set(e,t)})}function Z(t){X(t),"other_tokens"in t&&t.other_tokens.forEach(X)}function N(t){let e=w().get(t);return!e||!he(e)?null:`${e.token_type} ${e.access_token}`}function ee(){w().clear()}var ye,h,b,v,C,te,H,oe,T=class{constructor(e){u(this,C);u(this,H);u(this,h,void 0);u(this,b,void 0);u(this,v,void 0);if(ye=Q("localStorage"),!e.client_id)throw new Error("You must provide a `client_id`.");d(this,b,{client_id:e.client_id,authorization_endpoint:M(),token_endpoint:K(),...e}),d(this,h,P(this,C,te).call(this))}reset(){P(this,H,oe).call(this),ee()}redirect(){this.reset(),window.location.replace(p(this,h).authorizeUrl())}async handleCodeRedirect(e={removeStateAndReplaceLocation:!0}){let o=new URL(window.location.href),r=new URLSearchParams(o.search);if(!r.get("code"))return;let i=await p(this,h).exchangeForAccessToken(o.toString());d(this,v,i),Z(p(this,v)),e.removeStateAndReplaceLocation&&(r.delete("code"),r.delete("state"),o.search=r.toString(),window.location.replace(o))}hasToken(){return p(this,b).requested_scopes.split(" ").every(e=>!!N(e))}revoke(){this.reset()}};h=new WeakMap,b=new WeakMap,v=new WeakMap,C=new WeakSet,te=function(){return new be(p(this,b))},H=new WeakSet,oe=function(){sessionStorage.removeItem("pkce_state"),sessionStorage.removeItem("pkce_code_verifier")};function Te(t){return new T(t)}function ve(t){return new T(t)}var ae={};c(ae,{CONFIG:()=>He,endpoint:()=>B,endpointSearch:()=>Oe,fileOperations:()=>W,taskSubmission:()=>q});import Ee from"cross-fetch";var ne=Ee;function a(t,e,o={}){let r=o.headers||{};if(!(r!=null&&r.Authorization)){let i=N(t);i&&(r.Authorization=i)}return ne(e,{...o,headers:r})}var Re=function(t,e){var r;let o={};if(t)for(let[i,S]of Object.entries(t))S&&(S!=null&&S.toString)&&typeof S.toString=="function"&&(o[i]=S.toString());return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/endpoint_search",{search:o}),(r=e==null?void 0:e.fetch)==null?void 0:r.options)},se=Re;var W={};c(W,{ls:()=>xe,mkdir:()=>_e,rename:()=>Ie,symlink:()=>De});function l(t){return t==="get"?{}:{"Content-Type":"application/json"}}var xe=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/ls`,{search:e}),(r=o==null?void 0:o.fetch)==null?void 0:r.options)},_e=function(t,e,o){var i;let r={DATA_TYPE:"mkdir",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/mkdir`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(i=o==null?void 0:o.fetch)==null?void 0:i.options})},Ie=function(t,e,o){var i;let r={DATA_TYPE:"rename",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/rename`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(i=o==null?void 0:o.fetch)==null?void 0:i.options})},De=function(t,e,o){var i;let r={DATA_TYPE:"symlink",...e==null?void 0:e.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/operation/endpoint/${t}/symlink`),{method:"post",body:JSON.stringify(r),headers:l("post"),...(i=o==null?void 0:o.fetch)==null?void 0:i.options})};var q={};c(q,{submissionId:()=>Ne,submitDelete:()=>Ae,submitTransfer:()=>we});var Ae=function(t,e){var r;let o={DATA_TYPE:"delete",...t==null?void 0:t.payload};return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/delete"),{method:"post",body:JSON.stringify(o),headers:l("post"),...(r=e==null?void 0:e.fetch)==null?void 0:r.options})},we=function(t,e){var o;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/transfer"),{method:"post",body:JSON.stringify({DATA_TYPE:"transfer",...t==null?void 0:t.payload}),headers:l("post"),...(o=e==null?void 0:e.fetch)==null?void 0:o.options})};function Ne(t){var e;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,"/v0.10/submission_id"),{...(e=t==null?void 0:t.fetch)==null?void 0:e.options})}var B={};c(B,{get:()=>Ce});var Ce=function(t,e,o){var r;return a("urn:globus:auth:scope:transfer.api.globus.org:all",s(n,`/v0.10/endpoint/${t}`),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var He=R,Oe=se;var ce={};c(ce,{CONFIG:()=>ke,query:()=>V});var V={};c(V,{get:()=>Pe});var Pe=function(t,e,o){var r;return a(F.SEARCH,s(g,`/v1/index/${t}/search`,{search:e}),{...(r=o==null?void 0:o.fetch)==null?void 0:r.options})};var ke=_;export{j as auth,re as authorization,Le as sdk,ce as search,ae as transfer};
{
"name": "@globus/sdk",
"version": "0.1.4-alpha.0",
"version": "0.1.5-alpha",
"private": false,

@@ -8,3 +8,2 @@ "description": "The Globus SDK for Javascript",

"module": "dist/index.esm.js",
"types": "dist/types/src/index.d.ts",
"browser": {

@@ -18,3 +17,4 @@ "dist/index.cjs.js": "dist/browser.cjs.js",

"files": [
"dist"
"dist",
"@types"
],

@@ -24,3 +24,3 @@ "scripts": {

"coverage": "jest --coverage",
"build": "node esbuild.js",
"build": "node esbuild.js && tsc --outDir dist/@types --emitDeclarationOnly --declaration --strict --removeComments false",
"watch": "tsc --watch",

@@ -48,3 +48,3 @@ "generate:docs": "npx typedoc ./src/index.ts",

},
"gitHead": "6ed421d302f0ef2f9392208ba304a5763e4d6603"
"gitHead": "d1d48bf83d8400f370d6f192260ee7985b25b1f6"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc