@microsoft/sp-http-msgraph 1.16.0-beta.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md ADDED
@@ -0,0 +1,9 @@
1
+ # sp-http-msgraph
2
+
3
+ This package defines the communication layer for the SharePoint Framework to communicate with Microsoft Graph.
4
+
5
+ *This package is part of the [SharePoint Framework](http://aka.ms/spfx),
6
+ which is a collection of NPM packages that empower developers to create client-side experiences
7
+ for [Microsoft SharePoint](https://products.office.com/en-us/sharepoint/collaboration).
8
+ For more information, including complete API documentation and code samples, please visit
9
+ the [SharePoint Framework](http://aka.ms/spfx) web site.*
@@ -0,0 +1,109 @@
1
+ {
2
+ "manifestVersion": 2,
3
+ "id": "aec2bbfd-a968-4d5b-a279-12e570f378e6",
4
+ "alias": "@microsoft/sp-http-msgraph",
5
+ "componentType": "Library",
6
+ "version": "1.16.0",
7
+ "loaderConfig": {
8
+ "internalModuleBaseUrls": [
9
+ "https://localhost:4321/dist/"
10
+ ],
11
+ "entryModuleId": "sp-http-msgraph",
12
+ "scriptResources": {
13
+ "sp-http-msgraph": {
14
+ "type": "localizedPath",
15
+ "paths": {
16
+ "default": "sp-http-msgraph_default_0a87d76b1ae84c3f49ae.js",
17
+ "en-US": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
18
+ "qps-ploca": "sp-http-msgraph_qps-ploca_0a87d76b1ae84c3f49ae.js",
19
+ "qps-ploc": "sp-http-msgraph_qps-ploc_0a87d76b1ae84c3f49ae.js",
20
+ "en-GB": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
21
+ "en-NZ": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
22
+ "en-IE": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
23
+ "en-AU": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
24
+ "bn": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
25
+ "chr": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
26
+ "dv": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
27
+ "div": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
28
+ "en": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
29
+ "fil": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
30
+ "haw": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
31
+ "iu": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
32
+ "lo": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
33
+ "moh": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
34
+ "sq": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
35
+ "am": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
36
+ "hy": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
37
+ "mk": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
38
+ "bs": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
39
+ "my": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
40
+ "dz": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
41
+ "en-CY": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
42
+ "en-EG": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
43
+ "en-IL": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
44
+ "en-IS": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
45
+ "en-JO": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
46
+ "en-KE": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
47
+ "en-KW": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
48
+ "en-MK": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
49
+ "en-MT": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
50
+ "en-PK": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
51
+ "en-QA": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
52
+ "en-SA": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
53
+ "en-LK": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
54
+ "en-AE": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
55
+ "en-VN": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
56
+ "is": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
57
+ "km": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
58
+ "kh": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
59
+ "mt": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
60
+ "fa": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
61
+ "gd": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
62
+ "sr-Cyrl-BA": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
63
+ "sr-Latn-BA": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
64
+ "sd": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
65
+ "si": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
66
+ "so": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
67
+ "ti-ET": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
68
+ "uz": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
69
+ "en-SG": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
70
+ "en-HK": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
71
+ "en-MY": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
72
+ "en-PH": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
73
+ "en-TT": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
74
+ "en-AZ": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
75
+ "en-BH": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
76
+ "en-BN": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
77
+ "en-ID": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js",
78
+ "mi": "sp-http-msgraph_en-us_0a87d76b1ae84c3f49ae.js"
79
+ },
80
+ "defaultPath": "sp-http-msgraph_default_0a87d76b1ae84c3f49ae.js"
81
+ },
82
+ "tslib": {
83
+ "type": "component",
84
+ "id": "01c4df03-e775-48cb-aa14-171ee5199a15",
85
+ "version": "2.3.1"
86
+ },
87
+ "@microsoft/sp-http-base": {
88
+ "type": "component",
89
+ "id": "8496636c-2300-4915-abef-20de64c98d8b",
90
+ "version": "1.16.0"
91
+ },
92
+ "@microsoft/sp-loader": {
93
+ "type": "component",
94
+ "id": "1c6c9123-7aac-41f3-a376-3caea41ed83f",
95
+ "version": "1.16.0"
96
+ },
97
+ "@microsoft/sp-core-library": {
98
+ "type": "component",
99
+ "id": "7263c7d0-1d6a-45ec-8d85-d4d1d234171b",
100
+ "version": "1.16.0"
101
+ },
102
+ "@microsoft/sp-diagnostics": {
103
+ "type": "component",
104
+ "id": "78359e4b-07c2-43c6-8d0b-d060b4d577e8",
105
+ "version": "1.16.0"
106
+ }
107
+ }
108
+ }
109
+ }
@@ -0,0 +1 @@
1
+ (window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_16_0=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_16_0||[]).push([[1],{"l/HE":function(e,t,n){"use strict";n.r(t);var a=n("17wl"),i=n("UWqr"),r=n("ut3N"),o=n("obDv"),s=n("2SXB"),c=function(){function e(t,n,a){var i=this;t.whenFinished(function(){e._graphBaseUrl=t.consume(s._GraphHttpClientContext.serviceKey).getGraphEndpointUrl(),e._instance||(e._instance=void 0!==a?i._createGraphClientInstanceWithMiddleware(s._AadTokenProviders.configurable,a):i._createGraphClientInstance(s._AadTokenProviders.configurable,n))})}return e.prototype.api=function(t){return i.Validate.isNonemptyString(t,"path"),e._instance.api(t)},Object.defineProperty(e.prototype,"client",{get:function(){return e._instance},enumerable:!1,configurable:!0}),e.prototype._createGraphClientInstance=function(t,n){var i=this,s=new r._QosMonitor("MSGraphClientV3.CreateGraphClientInstance");return o.Client.init(Object(a.__assign)({authProvider:function(e){i._getOAuthToken(t).then(function(t){e(void 0,t),s.writeSuccess()}).catch(function(t){e(t,""),s.writeExpectedFailure(t.message)})},baseUrl:e._graphBaseUrl},n))},e.prototype._createGraphClientInstanceWithMiddleware=function(t,n){var i=this,s=new r._QosMonitor("MSGraphClientV3.CreateGraphClientInstanceWithMiddleware");try{var c=o.Client.initWithMiddleware(Object(a.__assign)({authProvider:{getAccessToken:function(e){return i._getOAuthToken(t)}},baseUrl:e._graphBaseUrl},n));return s.writeSuccess(),c}catch(e){throw s.writeUnexpectedFailure("CreateGraphClientInstanceWithMiddleware",e),e}},e.prototype._getOAuthToken=function(t){var n=new r._QosMonitor("MSGraphClient.FetchGraphToken");return t.getToken(e._graphBaseUrl).then(function(e){return n.writeSuccess(),e}).catch(function(e){throw n.writeUnexpectedFailure("FetchGraphToken",e),e})},e}();t.default=c}}]);
@@ -0,0 +1 @@
1
+ (window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_16_0=window.webpackJsonpaec2bbfd_a968_4d5b_a279_12e570f378e6_1_16_0||[]).push([[2],{"9EC8":function(e,t,n){(function(e){var t,a,i;!function e(t,n,a){function i(o,s){if(!n[o]){if(!t[o]){if(r)return r(o,!0);var c=new Error("Cannot find module '"+o+"'");throw c.code="MODULE_NOT_FOUND",c}var d=n[o]={exports:{}};t[o][0].call(d.exports,function(e){return i(t[o][1][e]||e)},d,d.exports,e,t,n,a)}return n[o].exports}for(var r=!1,o=0;o<a.length;o++)i(a[o]);return i}({1:[function(e,t,n){e("./lib/src/PolyFill")},{"./lib/src/PolyFill":14}],2:[function(e,t,n){window.MicrosoftGraph=e("./lib/src/browser/index.js")},{"./lib/src/browser/index.js":20}],3:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("./Constants"),i=e("./CustomAuthenticationProvider"),r=e("./GraphRequest"),o=e("./HTTPClient"),s=e("./HTTPClientFactory"),c=e("./ValidatePolyFilling"),d=function(){function e(e){this.config={baseUrl:a.GRAPH_BASE_URL,debugLogging:!1,defaultVersion:a.GRAPH_API_VERSION};try{c.validatePolyFilling()}catch(i){throw i}for(var t in e)e.hasOwnProperty(t)&&(this.config[t]=e[t]);var n;if(void 0!==e.authProvider&&void 0!==e.middleware)throw(i=new Error).name="AmbiguityInInitialization",i.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain not both",i;if(void 0!==e.authProvider)n=s.HTTPClientFactory.createWithAuthenticationProvider(e.authProvider);else{var i;if(void 0===e.middleware)throw(i=new Error).name="InvalidMiddlewareChain",i.message="Unable to Create Client, Please provide either authentication provider for default middleware chain or custom middleware chain",i;n=new o.HTTPClient(e.middleware)}this.httpClient=n}return e.init=function(t){var n={};for(var a in t)t.hasOwnProperty(a)&&(n[a]="authProvider"===a?new i.CustomAuthenticationProvider(t[a]):t[a]);return e.initWithMiddleware(n)},e.initWithMiddleware=function(t){try{return new e(t)}catch(e){throw e}},e.prototype.api=function(e){return new r.GraphRequest(this.httpClient,this.config,e)},e}();n.Client=d},{"./Constants":4,"./CustomAuthenticationProvider":5,"./GraphRequest":8,"./HTTPClient":11,"./HTTPClientFactory":12,"./ValidatePolyFilling":18}],4:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GRAPH_API_VERSION="v1.0",n.GRAPH_BASE_URL="https://graph.microsoft.com/",n.PACKAGE_VERSION="1.7.2-spfx"},{}],5:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=function(){function e(e){this.provider=e}return e.prototype.getAccessToken=function(){return a.__awaiter(this,void 0,void 0,function(){var e=this;return a.__generator(this,function(t){return[2,new Promise(function(t,n){e.provider(function(e,a){a?t(a):n(e)})})]})})},e}();n.CustomAuthenticationProvider=i},{tslib:44}],6:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.GraphError=function(e){void 0===e&&(e=-1),this.statusCode=e,this.code=null,this.message=null,this.requestId=null,this.date=new Date,this.body=null}},{}],7:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("./GraphError"),r=function(){function e(){}return e.constructError=function(e,t){var n=new i.GraphError(t);return void 0!==e.name&&(n.code=e.name),n.body=e.toString(),n.message=e.message,n.date=new Date,n},e.constructErrorFromResponse=function(e,t){e=e.error;var n=new i.GraphError(t);n.code=e.code,n.message=e.message,void 0!==e.innerError&&(n.requestId=e.innerError["request-id"],n.date=new Date(e.innerError.date));try{n.body=JSON.stringify(e)}catch(e){}return n},e.getError=function(t,n,r){return void 0===t&&(t=null),void 0===n&&(n=-1),a.__awaiter(this,void 0,void 0,function(){var o;return a.__generator(this,function(a){return o=t&&t.error?e.constructErrorFromResponse(t,n):t&&"Error"===t.constructor.name?e.constructError(t,n):new i.GraphError(n),"function"!=typeof r?[2,o]:(r(o,null),[2])})})},e}();n.GraphErrorHandler=r},{"./GraphError":6,tslib:44}],8:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("./GraphErrorHandler"),r=e("./GraphRequestUtil"),o=e("./GraphResponseHandler"),s=e("./middleware/MiddlewareControl"),c=e("./RequestMethod"),d=e("./ResponseType"),l=function(){function e(e,t,n){var a=this;this.parsePath=function(e){if(-1!==e.indexOf("https://")){var t=(e=e.replace("https://","")).indexOf("/");-1!==t&&(a.urlComponents.host="https://"+e.substring(0,t),e=e.substring(t+1,e.length));var n=e.indexOf("/");-1!==n&&(a.urlComponents.version=e.substring(0,n),e=e.substring(n+1,e.length))}"/"===e.charAt(0)&&(e=e.substr(1));var i=e.indexOf("?");if(-1===i)a.urlComponents.path=e;else{a.urlComponents.path=e.substr(0,i);for(var o=0,s=e.substring(i+1,e.length).split("&");o<s.length;o++){var c=s[o].split("="),d=c[0],l=c[1];-1!==r.oDataQueryNames.indexOf(d)?a.urlComponents.oDataQueryParams[d]=l:a.urlComponents.otherURLQueryParams[d]=l}}},this.httpClient=e,this.config=t,this.urlComponents={host:this.config.baseUrl,version:this.config.defaultVersion,oDataQueryParams:{},otherURLQueryParams:{}},this._headers={},this._options={},this._middlewareOptions=[],this.parsePath(n)}return e.prototype.addCsvQueryParameter=function(e,t,n){this.urlComponents.oDataQueryParams[e]=this.urlComponents.oDataQueryParams[e]?this.urlComponents.oDataQueryParams[e]+",":"";var a=[];n.length>1&&"string"==typeof t?a=Array.prototype.slice.call(n):"string"==typeof t?a.push(t):a=a.concat(t),this.urlComponents.oDataQueryParams[e]+=a.join(",")},e.prototype.buildFullUrl=function(){var e=r.urlJoin([this.urlComponents.host,this.urlComponents.version,this.urlComponents.path])+this.createQueryString();return this.config.debugLogging&&console.log(e),e},e.prototype.createQueryString=function(){var e=this.urlComponents,t=[];if(0!==Object.keys(e.oDataQueryParams).length)for(var n in e.oDataQueryParams)e.oDataQueryParams.hasOwnProperty(n)&&t.push(n+"="+e.oDataQueryParams[n]);if(0!==Object.keys(e.otherURLQueryParams).length)for(var n in e.otherURLQueryParams)e.otherURLQueryParams.hasOwnProperty(n)&&t.push(n+"="+e.otherURLQueryParams[n]);return t.length>0?"?"+t.join("&"):""},e.prototype.updateRequestOptions=function(e){var t=a.__assign({},e.headers);if(void 0!==this.config.fetchOptions){var n=a.__assign({},this.config.fetchOptions);Object.assign(e,n),void 0!==typeof this.config.fetchOptions.headers&&(e.headers=a.__assign({},this.config.fetchOptions.headers))}Object.assign(e,this._options),void 0!==e.headers&&Object.assign(t,e.headers),Object.assign(t,this._headers),e.headers=t},e.prototype.send=function(e,t,n){return a.__awaiter(this,void 0,void 0,function(){var r,c,d,l,u;return a.__generator(this,function(a){switch(a.label){case 0:c=new s.MiddlewareControl(this._middlewareOptions),this.updateRequestOptions(t),a.label=1;case 1:return a.trys.push([1,4,,6]),[4,this.httpClient.sendRequest({request:e,options:t,middlewareControl:c})];case 2:return d=a.sent(),r=d.response,[4,o.GraphResponseHandler.getResponse(r,this._responseType,n)];case 3:return[2,a.sent()];case 4:return l=a.sent(),u=void 0,void 0!==r&&(u=r.status),[4,i.GraphErrorHandler.getError(l,u,n)];case 5:throw a.sent();case 6:return[2]}})})},e.prototype.header=function(e,t){return this._headers[e]=t,this},e.prototype.headers=function(e){for(var t in e)e.hasOwnProperty(t)&&(this._headers[t]=e[t]);return this},e.prototype.option=function(e,t){return this._options[e]=t,this},e.prototype.options=function(e){for(var t in e)e.hasOwnProperty(t)&&(this._options[t]=e[t]);return this},e.prototype.middlewareOptions=function(e){return this._middlewareOptions=e,this},e.prototype.version=function(e){return this.urlComponents.version=e,this},e.prototype.responseType=function(e){return this._responseType=e,this},e.prototype.select=function(e){return this.addCsvQueryParameter("$select",e,arguments),this},e.prototype.expand=function(e){return this.addCsvQueryParameter("$expand",e,arguments),this},e.prototype.orderby=function(e){return this.addCsvQueryParameter("$orderby",e,arguments),this},e.prototype.filter=function(e){return this.urlComponents.oDataQueryParams.$filter=e,this},e.prototype.search=function(e){return this.urlComponents.oDataQueryParams.$search=e,this},e.prototype.top=function(e){return this.urlComponents.oDataQueryParams.$top=e,this},e.prototype.skip=function(e){return this.urlComponents.oDataQueryParams.$skip=e,this},e.prototype.skipToken=function(e){return this.urlComponents.oDataQueryParams.$skipToken=e,this},e.prototype.count=function(e){return this.urlComponents.oDataQueryParams.$count=e.toString(),this},e.prototype.query=function(e){var t=this.urlComponents.otherURLQueryParams;if("string"==typeof e){var n=e.split("="),a=n[0],i=n[1];t[a]=i}else for(var r in e)e.hasOwnProperty(r)&&(t[r]=e[r]);return this},e.prototype.get=function(e){return a.__awaiter(this,void 0,void 0,function(){var t,n;return a.__generator(this,function(a){switch(a.label){case 0:t=this.buildFullUrl(),n={method:c.RequestMethod.GET},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(t,n,e)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.post=function(e,t){return a.__awaiter(this,void 0,void 0,function(){var n,i;return a.__generator(this,function(a){switch(a.label){case 0:n=this.buildFullUrl(),i={method:c.RequestMethod.POST,body:r.serializeContent(e),headers:void 0!==e.constructor&&"FormData"===e.constructor.name?{}:{"Content-Type":"application/json"}},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(n,i,t)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.create=function(e,t){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.post(e,t)];case 1:return[2,n.sent()];case 2:throw n.sent();case 3:return[2]}})})},e.prototype.put=function(e,t){return a.__awaiter(this,void 0,void 0,function(){var n,i;return a.__generator(this,function(a){switch(a.label){case 0:n=this.buildFullUrl(),i={method:c.RequestMethod.PUT,body:r.serializeContent(e),headers:{"Content-Type":"application/octet-stream"}},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(n,i,t)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.patch=function(e,t){return a.__awaiter(this,void 0,void 0,function(){var n,i;return a.__generator(this,function(a){switch(a.label){case 0:n=this.buildFullUrl(),i={method:c.RequestMethod.PATCH,body:r.serializeContent(e),headers:{"Content-Type":"application/json"}},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(n,i,t)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.update=function(e,t){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),[4,this.patch(e,t)];case 1:return[2,n.sent()];case 2:throw n.sent();case 3:return[2]}})})},e.prototype.delete=function(e){return a.__awaiter(this,void 0,void 0,function(){var t,n;return a.__generator(this,function(a){switch(a.label){case 0:t=this.buildFullUrl(),n={method:c.RequestMethod.DELETE},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(t,n,e)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.del=function(e){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.delete(e)];case 1:return[2,t.sent()];case 2:throw t.sent();case 3:return[2]}})})},e.prototype.getStream=function(e){return a.__awaiter(this,void 0,void 0,function(){var t,n;return a.__generator(this,function(a){switch(a.label){case 0:t=this.buildFullUrl(),n={method:c.RequestMethod.GET},this.responseType(d.ResponseType.STREAM),a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(t,n,e)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.putStream=function(e,t){return a.__awaiter(this,void 0,void 0,function(){var n,i;return a.__generator(this,function(a){switch(a.label){case 0:n=this.buildFullUrl(),i={method:c.RequestMethod.PUT,headers:{"Content-Type":"application/octet-stream"},body:e},a.label=1;case 1:return a.trys.push([1,3,,4]),[4,this.send(n,i,t)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e}();n.GraphRequest=l},{"./GraphErrorHandler":7,"./GraphRequestUtil":9,"./GraphResponseHandler":10,"./RequestMethod":16,"./ResponseType":17,"./middleware/MiddlewareControl":25,tslib:44}],9:[function(e,t,n){(function(e){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.oDataQueryNames=["$select","$expand","$orderby","$filter","$top","$skip","$skipToken","$count"],n.urlJoin=function(e){var t=function(e){return e.replace(/^\/+/,"")};return Array.prototype.slice.call(e).reduce(function(e,n){return[(a=e,a.replace(/\/+$/,"")),t(n)].join("/");var a})},n.serializeContent=function(t){var n=t.constructor.name;if("Buffer"===n||"Blob"===n||"File"===n||"FormData"===n||"string"==typeof t)return t;if("ArrayBuffer"===n)t=e.from(t);else if("Int8Array"===n||"Int16Array"===n||"Int32Array"===n||"Uint8Array"===n||"Uint16Array"===n||"Uint32Array"===n||"Uint8ClampedArray"===n||"Float32Array"===n||"Float64Array"===n||"DataView"===n)t=e.from(t.buffer);else try{t=JSON.stringify(t)}catch(e){throw new Error("Unable to stringify the content")}return t}}).call(this,e("buffer").Buffer)},{buffer:39}],10:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a,i,r,o=e("tslib"),s=e("./ResponseType");!function(e){e.TEXT_HTML="text/html",e.TEXT_XML="text/xml",e.APPLICATION_XML="application/xml",e.APPLICATION_XHTML="application/xhtml+xml"}(a=n.DocumentType||(n.DocumentType={})),function(e){e.TEXT_PLAIN="text/plain",e.APPLICATION_JSON="application/json"}(i||(i={})),function(e){e.DOCUMENT="^(text\\/(html|xml))|(application\\/(xml|xhtml\\+xml))$",e.IMAGE="^image\\/.+"}(r||(r={}));var c=function(){function e(){}return e.parseDocumentResponse=function(e,t){try{return"undefined"!=typeof DOMParser?new Promise(function(n,a){e.text().then(function(e){try{var i=(new DOMParser).parseFromString(e,t);n(i)}catch(e){a(e)}})}):Promise.resolve(e.body)}catch(e){throw e}},e.convertResponse=function(t,n){return o.__awaiter(this,void 0,void 0,function(){var c,d,l,u;return o.__generator(this,function(o){switch(o.label){case 0:if(204===(c=t.clone()).status)return[2,Promise.resolve()];o.label=1;case 1:switch(o.trys.push([1,26,,27]),n){case s.ResponseType.ARRAYBUFFER:return[3,2];case s.ResponseType.BLOB:return[3,4];case s.ResponseType.DOCUMENT:return[3,6];case s.ResponseType.JSON:return[3,8];case s.ResponseType.STREAM:return[3,10];case s.ResponseType.TEXT:return[3,12]}return[3,14];case 2:return[4,c.arrayBuffer()];case 3:return d=o.sent(),[3,25];case 4:return[4,c.blob()];case 5:return d=o.sent(),[3,25];case 6:return[4,e.parseDocumentResponse(c,a.TEXT_XML)];case 7:return d=o.sent(),[3,25];case 8:return[4,c.json()];case 9:return d=o.sent(),[3,25];case 10:return[4,Promise.resolve(c.body)];case 11:return d=o.sent(),[3,25];case 12:return[4,c.text()];case 13:return d=o.sent(),[3,25];case 14:return null===(l=c.headers.get("Content-type"))?[3,23]:(u=l.split(";")[0],new RegExp(r.DOCUMENT).test(u)?[4,e.parseDocumentResponse(c,u)]:[3,16]);case 15:return d=o.sent(),[3,22];case 16:return new RegExp(r.IMAGE).test(u)?(d=c.blob(),[3,22]):[3,17];case 17:return u!==i.TEXT_PLAIN?[3,19]:[4,c.text()];case 18:return d=o.sent(),[3,22];case 19:return u!==i.APPLICATION_JSON?[3,21]:[4,c.json()];case 20:return d=o.sent(),[3,22];case 21:d=Promise.resolve(c.body),o.label=22;case 22:return[3,24];case 23:d=Promise.resolve(c.body),o.label=24;case 24:return[3,25];case 25:return[3,27];case 26:throw o.sent();case 27:return[2,d]}})})},e.getResponse=function(t,n,a){return o.__awaiter(this,void 0,void 0,function(){var i;return o.__generator(this,function(r){switch(r.label){case 0:return r.trys.push([0,4,,5]),n!==s.ResponseType.RAW?[3,1]:[2,Promise.resolve(t)];case 1:return[4,e.convertResponse(t,n)];case 2:if(i=r.sent(),!t.ok)throw i;if("function"!=typeof a)return[2,i];a(null,i,t),r.label=3;case 3:return[3,5];case 4:throw r.sent();case 5:return[2]}})})},e}();n.GraphResponseHandler=c},{"./ResponseType":17,tslib:44}],11:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=function(){function e(e){this.middleware=e}return e.prototype.sendRequest=function(e){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(n){switch(n.label){case 0:if(n.trys.push([0,2,,3]),!(e.request instanceof Request)&&void 0===e.options)throw(t=new Error).name="InvalidRequestOptions",t.message="Unable to execute the middleware, Please provide valid options for a request",t;return[4,this.middleware.execute(e)];case 1:return n.sent(),[2,e];case 2:throw n.sent();case 3:return[2]}})})},e}();n.HTTPClient=i},{tslib:44}],12:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("./HTTPClient"),i=e("./middleware/AuthenticationHandler"),r=e("./middleware/HTTPMessageHandler"),o=e("./middleware/options/RedirectHandlerOptions"),s=e("./middleware/options/RetryHandlerOptions"),c=e("./middleware/RedirectHandler"),d=e("./middleware/RetryHandler"),l=e("./middleware/TelemetryHandler"),u=function(){function e(){}return e.createWithAuthenticationProvider=function(t){var n=new i.AuthenticationHandler(t),a=new d.RetryHandler(new s.RetryHandlerOptions),u=new l.TelemetryHandler,f=new r.HTTPMessageHandler;if(n.setNext(a),new Function("try {return this === global;}catch(e){return false;}")()){var p=new c.RedirectHandler(new o.RedirectHandlerOptions);a.setNext(p),p.setNext(u)}else a.setNext(u);return u.setNext(f),e.createWithMiddleware(n)},e.createWithMiddleware=function(e){return new a.HTTPClient(e)},e}();n.HTTPClientFactory=u},{"./HTTPClient":11,"./middleware/AuthenticationHandler":23,"./middleware/HTTPMessageHandler":24,"./middleware/RedirectHandler":27,"./middleware/RetryHandler":28,"./middleware/TelemetryHandler":29,"./middleware/options/RedirectHandlerOptions":31,"./middleware/options/RetryHandlerOptions":32}],13:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.MSALAuthenticationProviderOptions=function(e){this.scopes=e}},{}],14:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("es6-promise");e("isomorphic-fetch"),a.polyfill()},{"es6-promise":40,"isomorphic-fetch":42}],15:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.Range=function(e,t){void 0===e&&(e=-1),void 0===t&&(t=-1),this.minValue=e,this.maxValue=t}},{}],16:[function(e,t,n){"use strict";var a;Object.defineProperty(n,"__esModule",{value:!0}),(a=n.RequestMethod||(n.RequestMethod={})).GET="GET",a.PATCH="PATCH",a.POST="POST",a.PUT="PUT",a.DELETE="DELETE"},{}],17:[function(e,t,n){"use strict";var a;Object.defineProperty(n,"__esModule",{value:!0}),(a=n.ResponseType||(n.ResponseType={})).ARRAYBUFFER="arraybuffer",a.BLOB="blob",a.DOCUMENT="document",a.JSON="json",a.RAW="raw",a.STREAM="stream",a.TEXT="text"},{}],18:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.validatePolyFilling=function(){var e;if("undefined"==typeof Promise&&"undefined"==typeof fetch)throw(e=new Error("Library cannot function without Promise and fetch. So, please provide polyfill for them.")).name="PolyFillNotAvailable",e;if("undefined"==typeof Promise)throw(e=new Error("Library cannot function without Promise. So, please provide polyfill for it.")).name="PolyFillNotAvailable",e;if("undefined"==typeof fetch)throw(e=new Error("Library cannot function without fetch. So, please provide polyfill for it.")).name="PolyFillNotAvailable",e;return!0}},{}],19:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=function(){function e(e,t,n){this.scopes=t,this.userAgentApplication="string"==typeof e?new Msal.UserAgentApplication(e,void 0,function(e,t,n,a){},n):e}return e.prototype.getAccessToken=function(e){return a.__awaiter(this,void 0,void 0,function(){var t,n,i,r;return a.__generator(this,function(a){switch(a.label){case 0:if(void 0!==(t=e)&&(n=t.scopes),void 0!==n&&0!==n.length||(n=this.scopes),0===n.length)throw(i=new Error).name="EmptyScopes",i.message="Scopes cannot be empty, Please provide a scope",i;a.label=1;case 1:return a.trys.push([1,3,,13]),[4,this.userAgentApplication.acquireTokenSilent(n)];case 2:return[2,a.sent()];case 3:a.sent(),a.label=4;case 4:return a.trys.push([4,11,,12]),[4,this.userAgentApplication.loginPopup(n)];case 5:a.sent(),a.label=6;case 6:return a.trys.push([6,8,,10]),[4,this.userAgentApplication.acquireTokenSilent(n)];case 7:return[2,a.sent()];case 8:return a.sent(),[4,this.userAgentApplication.acquireTokenPopup(n)];case 9:return[2,a.sent()];case 10:return[3,12];case 11:throw r=a.sent(),new Error(r);case 12:return[3,13];case 13:return[2]}})})},e.prototype.addScopes=function(e){if(0===e.length){var t=new Error;throw t.name="EmptyScopes",t.message="Scopes array cannot be empty",t}this.scopes=Array.from(new Set(this.scopes.concat(e)))},e.prototype.clearScopes=function(){this.scopes=[]},e}();n.MSALAuthenticationProvider=i},{tslib:44}],20:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib");a.__exportStar(e("../content/BatchRequestContent"),n),a.__exportStar(e("../content/BatchResponseContent"),n),a.__exportStar(e("../middleware/AuthenticationHandler"),n),a.__exportStar(e("../middleware/HTTPMessageHandler"),n),a.__exportStar(e("../middleware/RetryHandler"),n),a.__exportStar(e("../middleware/TelemetryHandler"),n),a.__exportStar(e("../middleware/options/AuthenticationHandlerOptions"),n),a.__exportStar(e("../middleware/options/RetryHandlerOptions"),n),a.__exportStar(e("../middleware/options/TelemetryHandlerOptions"),n),a.__exportStar(e("../tasks/LargeFileUploadTask"),n),a.__exportStar(e("../tasks/OneDriveLargeFileUploadTask"),n),a.__exportStar(e("../tasks/PageIterator"),n),a.__exportStar(e("../Client"),n),a.__exportStar(e("../GraphError"),n),a.__exportStar(e("../GraphRequest"),n),a.__exportStar(e("./MSALAuthenticationProvider"),n),a.__exportStar(e("../MSALAuthenticationProviderOptions"),n),a.__exportStar(e("../ResponseType"),n)},{"../Client":3,"../GraphError":6,"../GraphRequest":8,"../MSALAuthenticationProviderOptions":13,"../ResponseType":17,"../content/BatchRequestContent":21,"../content/BatchResponseContent":22,"../middleware/AuthenticationHandler":23,"../middleware/HTTPMessageHandler":24,"../middleware/RetryHandler":28,"../middleware/TelemetryHandler":29,"../middleware/options/AuthenticationHandlerOptions":30,"../middleware/options/RetryHandlerOptions":32,"../middleware/options/TelemetryHandlerOptions":33,"../tasks/LargeFileUploadTask":34,"../tasks/OneDriveLargeFileUploadTask":35,"../tasks/PageIterator":37,"./MSALAuthenticationProvider":19,tslib:44}],21:[function(e,t,n){(function(t){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("../RequestMethod"),r=function(){function e(t){if(this.requests=new Map,void 0!==t){var n=e.requestLimit;if(t.length>n){var a=new Error("Maximum requests limit exceeded, Max allowed number of requests are "+n);throw a.name="Limit Exceeded Error",a}for(var i=0,r=t;i<r.length;i++){var o=r[i];this.addRequest(o)}}}return e.validateDependencies=function(e){if(0===e.size){var t=new Error("Empty requests map, Please provide at least one request.");throw t.name="Empty Requests Error",t}return function(e){for(var t=e.entries(),n=t.next();!n.done;){var a=n.value[1];if(void 0!==a.dependsOn&&a.dependsOn.length>0)return!1;n=t.next()}return!0}(e)||function(e){var t=e.entries(),n=t.next(),a=n.value[1];if(void 0!==a.dependsOn&&a.dependsOn.length>0)return!1;var i=n;for(n=t.next();!n.done;){var r=n.value[1];if(void 0===r.dependsOn||1!==r.dependsOn.length||r.dependsOn[0]!==i.value[1].id)return!1;i=n,n=t.next()}return!0}(e)||function(e){var t,n=e.entries(),a=n.next(),i=a.value[1];if(void 0===i.dependsOn||0===i.dependsOn.length)t=i.id;else{if(1!==i.dependsOn.length)return!1;var r=i.dependsOn[0];if(r===i.id||!e.has(r))return!1;t=r}for(a=n.next();!a.done;){var o=a.value[1];if((void 0===o.dependsOn||0===o.dependsOn.length)&&t!==o.id)return!1;if(void 0!==o.dependsOn&&0!==o.dependsOn.length){if(1===o.dependsOn.length&&(o.id===t||o.dependsOn[0]!==t))return!1;if(o.dependsOn.length>1)return!1}a=n.next()}return!0}(e)},e.getRequestData=function(t){return a.__awaiter(this,void 0,void 0,function(){var n,r,o,s;return a.__generator(this,function(a){switch(a.label){case 0:return n={url:""},r=new RegExp("^https?://"),n.url=r.test(t.url)?"/"+t.url.split(/.*?\/\/.*?\//)[1]:t.url,n.method=t.method,o={},t.headers.forEach(function(e,t){o[t]=e}),Object.keys(o).length&&(n.headers=o),t.method!==i.RequestMethod.PATCH&&t.method!==i.RequestMethod.POST&&t.method!==i.RequestMethod.PUT?[3,2]:(s=n,[4,e.getRequestBody(t)]);case 1:s.body=a.sent(),a.label=2;case 2:return[2,n]}})})},e.getRequestBody=function(e){return a.__awaiter(this,void 0,void 0,function(){var n,i,r,o,s;return a.__generator(this,function(a){switch(a.label){case 0:n=!1,a.label=1;case 1:return a.trys.push([1,3,,4]),[4,e.clone().json()];case 2:return i=a.sent(),n=!0,[3,4];case 3:return a.sent(),[3,4];case 4:if(n)return[3,12];a.label=5;case 5:return a.trys.push([5,11,,12]),"undefined"==typeof Blob?[3,8]:[4,e.blob()];case 6:return r=a.sent(),o=new FileReader,[4,new Promise(function(e){o.addEventListener("load",function(){var t=o.result,n=new RegExp("^s*data:(.+?/.+?(;.+?=.+?)*)?(;base64)?,(.*)s*$").exec(t);e(n[4])},!1),o.readAsDataURL(r)})];case 7:return i=a.sent(),[3,10];case 8:return void 0===t?[3,10]:[4,e.buffer()];case 9:s=a.sent(),i=s.toString("base64"),a.label=10;case 10:return n=!0,[3,12];case 11:return a.sent(),[3,12];case 12:return[2,i]}})})},e.prototype.addRequest=function(t){var n,a=e.requestLimit;if(""===t.id)throw(n=new Error("Id for a request is empty, Please provide an unique id")).name="Empty Id For Request",n;if(this.requests.size===a)throw(n=new Error("Maximum requests limit exceeded, Max allowed number of requests are "+a)).name="Limit Exceeded Error",n;if(this.requests.has(t.id))throw(n=new Error("Adding request with duplicate id "+t.id+", Make the id of the requests unique")).name="Duplicate RequestId Error",n;return this.requests.set(t.id,t),t.id},e.prototype.removeRequest=function(e){for(var t=this.requests.delete(e),n=this.requests.entries(),a=n.next();!a.done;){var i=a.value[1].dependsOn;if(void 0!==i){var r=i.indexOf(e);-1!==r&&i.splice(r,1),0===i.length&&delete a.value[1].dependsOn}a=n.next()}return t},e.prototype.getContent=function(){return a.__awaiter(this,void 0,void 0,function(){var t,n,i,r,o,s,c;return a.__generator(this,function(a){switch(a.label){case 0:if(n={requests:t=[]},i=this.requests.entries(),(r=i.next()).done)throw(c=new Error("No requests added yet, Please add at least one request.")).name="Empty Payload",c;if(!e.validateDependencies(this.requests))throw(c=new Error("Invalid dependency found, Dependency should be:\n1. Parallel - no individual request states a dependency in the dependsOn property.\n2. Serial - all individual requests depend on the previous individual request.\n3. Same - all individual requests that state a dependency in the dependsOn property, state the same dependency.")).name="Invalid Dependency",c;a.label=1;case 1:return r.done?[3,3]:(o=r.value[1],[4,e.getRequestData(o.request)]);case 2:if(void 0!==(s=a.sent()).body&&(void 0===s.headers||void 0===s.headers["content-type"]))throw(c=new Error("Content-type header is not mentioned for request #"+o.id+", For request having body, Content-type header should be mentioned")).name="Invalid Content-type header",c;return s.id=o.id,void 0!==o.dependsOn&&o.dependsOn.length>0&&(s.dependsOn=o.dependsOn),t.push(s),r=i.next(),[3,1];case 3:return n.requests=t,[2,n]}})})},e.prototype.addDependency=function(e,t){if(!this.requests.has(e))throw(o=new Error("Dependent "+e+" does not exists, Please check the id")).name="Invalid Dependent",o;if(void 0!==t&&!this.requests.has(t))throw(o=new Error("Dependency "+t+" does not exists, Please check the id")).name="Invalid Dependency",o;if(void 0!==t){var n=this.requests.get(e);if(void 0===n.dependsOn&&(n.dependsOn=[]),-1!==n.dependsOn.indexOf(t))throw(o=new Error("Dependency "+t+" is already added for the request "+e)).name="Duplicate Dependency",o;n.dependsOn.push(t)}else{for(var a=this.requests.entries(),i=void 0,r=a.next();!r.done&&r.value[1].id!==e;)i=r,r=a.next();if(void 0===i)throw(o=new Error("Can't add dependency "+t+", There is only a dependent request in the batch")).name="Invalid Dependency Addition",o;var o,s=i.value[0];if(void 0===r.value[1].dependsOn&&(r.value[1].dependsOn=[]),-1!==r.value[1].dependsOn.indexOf(s))throw(o=new Error("Dependency "+s+" is already added for the request "+e)).name="Duplicate Dependency",o;r.value[1].dependsOn.push(s)}},e.prototype.removeDependency=function(e,t){var n=this.requests.get(e);if(void 0===n||void 0===n.dependsOn||0===n.dependsOn.length)return!1;if(void 0!==t){var a=n.dependsOn.indexOf(t);return-1!==a&&(n.dependsOn.splice(a,1),!0)}return delete n.dependsOn,!0},e.requestLimit=20,e}();n.BatchRequestContent=r}).call(this,e("buffer").Buffer)},{"../RequestMethod":16,buffer:39,tslib:44}],22:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=function(){function e(e){this.responses=new Map,this.update(e)}return e.prototype.createResponseObject=function(e){var t=e.body,n={};return n.status=e.status,void 0!==e.statusText&&(n.statusText=e.statusText),n.headers=e.headers,new Response(t,n)},e.prototype.update=function(e){this.nextLink=e["@nextLink"];for(var t=e.responses,n=0,a=t.length;n<a;n++)this.responses.set(t[n].id,this.createResponseObject(t[n]))},e.prototype.getResponseById=function(e){return this.responses.get(e)},e.prototype.getResponses=function(){return this.responses},e.prototype.getResponsesIterator=function(){var e,t;return a.__generator(this,function(n){switch(n.label){case 0:e=this.responses.entries(),t=e.next(),n.label=1;case 1:return t.done?[3,3]:[4,t.value];case 2:return n.sent(),t=e.next(),[3,1];case 3:return[2]}})},e}();n.BatchResponseContent=i},{tslib:44}],23:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("./MiddlewareControl"),r=e("./MiddlewareUtil"),o=e("./options/AuthenticationHandlerOptions"),s=e("./options/TelemetryHandlerOptions"),c=function(){function e(e){this.authenticationProvider=e}return e.prototype.execute=function(t){return a.__awaiter(this,void 0,void 0,function(){var n,c,d,l,u;return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,3,,4]),n=void 0,t.middlewareControl instanceof i.MiddlewareControl&&(n=t.middlewareControl.getMiddlewareOptions(o.AuthenticationHandlerOptions.name)),c=void 0,d=void 0,void 0!==n&&(c=n.authenticationProvider,d=n.authenticationProviderOptions),void 0===c&&(c=this.authenticationProvider),[4,c.getAccessToken(d)];case 1:return l=a.sent(),u="Bearer "+l,r.setRequestHeader(t.request,t.options,e.AUTHORIZATION_HEADER,u),s.TelemetryHandlerOptions.updateFeatureUsageFlag(t,s.FeatureUsageFlag.AUTHENTICATION_HANDLER_ENABLED),[4,this.nextMiddleware.execute(t)];case 2:return[2,a.sent()];case 3:throw a.sent();case 4:return[2]}})})},e.prototype.setNext=function(e){this.nextMiddleware=e},e.AUTHORIZATION_HEADER="Authorization",e}();n.AuthenticationHandler=c},{"./MiddlewareControl":25,"./MiddlewareUtil":26,"./options/AuthenticationHandlerOptions":30,"./options/TelemetryHandlerOptions":33,tslib:44}],24:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=function(){function e(){}return e.prototype.execute=function(e){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=e,[4,fetch(e.request,e.options)];case 1:return t.response=n.sent(),[2];case 2:throw n.sent();case 3:return[2]}})})},e}();n.HTTPMessageHandler=i},{tslib:44}],25:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(e){void 0===e&&(e=[]),this.middlewareOptions=new Map;for(var t=0,n=e;t<n.length;t++){var a=n[t],i=a.constructor.name;this.middlewareOptions.set(i,a)}}return e.prototype.getMiddlewareOptions=function(e){return this.middlewareOptions.get(e)},e.prototype.setMiddlewareOptions=function(e,t){this.middlewareOptions.set(e,t)},e}();n.MiddlewareControl=a},{}],26:[function(e,t,n){"use strict";var a=this;Object.defineProperty(n,"__esModule",{value:!0});var i=e("tslib");n.generateUUID=function(){for(var e="",t=0;t<32;t++)8!==t&&12!==t&&16!==t&&20!==t||(e+="-"),e+=Math.floor(16*Math.random()).toString(16);return e},n.getRequestHeader=function(e,t,n){var a=null;if(e instanceof Request)a=e.headers.get(n);else if(void 0!==t&&void 0!==t.headers)if(t.headers instanceof Headers)a=t.headers.get(n);else if(t.headers instanceof Array){for(var i=t.headers,r=0,o=i.length;r<o;r++)if(i[r][0]===n){a=i[r][1];break}}else void 0!==t.headers[n]&&(a=t.headers[n]);return a},n.setRequestHeader=function(e,t,n,a){var i,r;e instanceof Request?e.headers.set(n,a):void 0!==t&&(void 0===t.headers?t.headers=((i={})[n]=a,i):t.headers instanceof Headers?t.headers.set(n,a):t.headers instanceof Array?t.headers.push([n,a]):Object.assign(t.headers,((r={})[n]=a,r)))},n.cloneRequestWithNewUrl=function(e,t){return i.__awaiter(a,void 0,void 0,function(){var n,a,r,o,s,c,d,l,u,f,p,m,_;return i.__generator(this,function(i){switch(i.label){case 0:return t.headers.get("Content-Type")?[4,t.blob()]:[3,2];case 1:return a=i.sent(),[3,4];case 2:return[4,Promise.resolve(void 0)];case 3:a=i.sent(),i.label=4;case 4:return n=a,r=t.method,o=t.headers,s=t.referrer,c=t.referrerPolicy,d=t.mode,l=t.credentials,u=t.cache,f=t.redirect,p=t.integrity,m=t.keepalive,_=t.signal,[2,new Request(e,{method:r,headers:o,body:n,referrer:s,referrerPolicy:c,mode:d,credentials:l,cache:u,redirect:f,integrity:p,keepalive:m,signal:_})]}})})}},{tslib:44}],27:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("../RequestMethod"),r=e("./MiddlewareControl"),o=e("./MiddlewareUtil"),s=e("./options/RedirectHandlerOptions"),c=e("./options/TelemetryHandlerOptions"),d=function(){function e(e){void 0===e&&(e=new s.RedirectHandlerOptions),this.options=e}return e.prototype.isRedirect=function(t){return-1!==e.REDIRECT_STATUS_CODES.indexOf(t.status)},e.prototype.hasLocationHeader=function(t){return t.headers.has(e.LOCATION_HEADER)},e.prototype.getLocationHeader=function(t){return t.headers.get(e.LOCATION_HEADER)},e.prototype.isRelativeURL=function(e){return-1===e.indexOf("://")},e.prototype.shouldDropAuthorizationHeader=function(e,t){var n,a,i=/^[A-Za-z].+?:\/\/.+?(?=\/|$)/,r=i.exec(e);null!==r&&(n=r[0]);var o=i.exec(t);return null!==o&&(a=o[0]),void 0!==n&&void 0!==a&&n!==a},e.prototype.updateRequestUrl=function(e,t){return a.__awaiter(this,void 0,void 0,function(){var n,i;return a.__generator(this,function(a){switch(a.label){case 0:return n=t,t.request instanceof Request?[4,o.cloneRequestWithNewUrl(e,t.request)]:[3,2];case 1:return i=a.sent(),[3,3];case 2:i=e,a.label=3;case 3:return n.request=i,[2]}})})},e.prototype.getOptions=function(e){var t;return e.middlewareControl instanceof r.MiddlewareControl&&(t=e.middlewareControl.getMiddlewareOptions(this.options.constructor.name)),void 0===t&&(t=Object.assign(new s.RedirectHandlerOptions,this.options)),t},e.prototype.executeWithRedirect=function(t,n,r){return a.__awaiter(this,void 0,void 0,function(){var s,c;return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,8,,9]),[4,this.nextMiddleware.execute(t)];case 1:return a.sent(),s=t.response,n<r.maxRedirects&&this.isRedirect(s)&&this.hasLocationHeader(s)&&r.shouldRedirect(s)?(++n,s.status!==e.STATUS_CODE_SEE_OTHER?[3,2]:(t.options.method=i.RequestMethod.GET,delete t.options.body,[3,4])):[3,6];case 2:return c=this.getLocationHeader(s),!this.isRelativeURL(c)&&this.shouldDropAuthorizationHeader(s.url,c)&&o.setRequestHeader(t.request,t.options,e.AUTHORIZATION_HEADER,void 0),[4,this.updateRequestUrl(c,t)];case 3:a.sent(),a.label=4;case 4:return[4,this.executeWithRedirect(t,n,r)];case 5:return a.sent(),[3,7];case 6:return[2];case 7:return[3,9];case 8:throw a.sent();case 9:return[2]}})})},e.prototype.execute=function(t){return a.__awaiter(this,void 0,void 0,function(){var n;return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),n=this.getOptions(t),t.options.redirect=e.MANUAL_REDIRECT,c.TelemetryHandlerOptions.updateFeatureUsageFlag(t,c.FeatureUsageFlag.REDIRECT_HANDLER_ENABLED),[4,this.executeWithRedirect(t,0,n)];case 1:return[2,a.sent()];case 2:throw a.sent();case 3:return[2]}})})},e.prototype.setNext=function(e){this.nextMiddleware=e},e.REDIRECT_STATUS_CODES=[301,302,303,307,308],e.STATUS_CODE_SEE_OTHER=303,e.LOCATION_HEADER="Location",e.AUTHORIZATION_HEADER="Authorization",e.MANUAL_REDIRECT="manual",e}();n.RedirectHandler=d},{"../RequestMethod":16,"./MiddlewareControl":25,"./MiddlewareUtil":26,"./options/RedirectHandlerOptions":31,"./options/TelemetryHandlerOptions":33,tslib:44}],28:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("../RequestMethod"),r=e("./MiddlewareControl"),o=e("./MiddlewareUtil"),s=e("./options/RetryHandlerOptions"),c=e("./options/TelemetryHandlerOptions"),d=function(){function e(e){void 0===e&&(e=new s.RetryHandlerOptions),this.options=e}return e.prototype.isRetry=function(t){return-1!==e.RETRY_STATUS_CODES.indexOf(t.status)},e.prototype.isBuffered=function(e,t){var n=e instanceof Request?e.method:t.method;return n!==i.RequestMethod.PUT&&n!==i.RequestMethod.PATCH&&n!==i.RequestMethod.POST||"application/octet-stream"!==o.getRequestHeader(e,t,"Content-Type")},e.prototype.getDelay=function(t,n,a){var i,r=function(){return Number(Math.random().toFixed(3))},o=void 0!==t.headers?t.headers.get(e.RETRY_AFTER_HEADER):null;return i=null!==o?Number.isNaN(Number(o))?Math.round((new Date(o).getTime()-Date.now())/1e3):Number(o):n>=2?this.getExponentialBackOffTime(n)+a+r():a+r(),Math.min(i,this.options.getMaxDelay()+r())},e.prototype.getExponentialBackOffTime=function(e){return Math.round(.5*(Math.pow(2,e)-1))},e.prototype.sleep=function(e){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(n){return t=1e3*e,[2,new Promise(function(e){return setTimeout(e,t)})]})})},e.prototype.getOptions=function(e){var t;return e.middlewareControl instanceof r.MiddlewareControl&&(t=e.middlewareControl.getMiddlewareOptions(this.options.constructor.name)),void 0===t&&(t=Object.assign(new s.RetryHandlerOptions,this.options)),t},e.prototype.executeWithRetry=function(t,n,i){return a.__awaiter(this,void 0,void 0,function(){var r;return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,6,,7]),[4,this.nextMiddleware.execute(t)];case 1:return a.sent(),n<i.maxRetries&&this.isRetry(t.response)&&this.isBuffered(t.request,t.options)&&i.shouldRetry(i.delay,n,t.request,t.options,t.response)?(++n,o.setRequestHeader(t.request,t.options,e.RETRY_ATTEMPT_HEADER,n.toString()),r=this.getDelay(t.response,n,i.delay),[4,this.sleep(r)]):[3,4];case 2:return a.sent(),[4,this.executeWithRetry(t,n,i)];case 3:return[2,a.sent()];case 4:case 7:return[2];case 5:return[3,7];case 6:throw a.sent()}})})},e.prototype.execute=function(e){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t=this.getOptions(e),c.TelemetryHandlerOptions.updateFeatureUsageFlag(e,c.FeatureUsageFlag.RETRY_HANDLER_ENABLED),[4,this.executeWithRetry(e,0,t)];case 1:return[2,n.sent()];case 2:throw n.sent();case 3:return[2]}})})},e.prototype.setNext=function(e){this.nextMiddleware=e},e.RETRY_STATUS_CODES=[429,503,504],e.RETRY_ATTEMPT_HEADER="Retry-Attempt",e.RETRY_AFTER_HEADER="Retry-After",e}();n.RetryHandler=d},{"../RequestMethod":16,"./MiddlewareControl":25,"./MiddlewareUtil":26,"./options/RetryHandlerOptions":32,"./options/TelemetryHandlerOptions":33,tslib:44}],29:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("../Constants"),r=e("./MiddlewareControl"),o=e("./MiddlewareUtil"),s=e("./options/TelemetryHandlerOptions"),c=function(){function e(){}return e.prototype.execute=function(t){return a.__awaiter(this,void 0,void 0,function(){var n,c,d,l;return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),null===(n=o.getRequestHeader(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER))&&(n=o.generateUUID(),o.setRequestHeader(t.request,t.options,e.CLIENT_REQUEST_ID_HEADER,n)),c=e.PRODUCT_NAME+"/"+i.PACKAGE_VERSION,d=void 0,t.middlewareControl instanceof r.MiddlewareControl&&(d=t.middlewareControl.getMiddlewareOptions(s.TelemetryHandlerOptions.name)),void 0!==d&&(l=d.getFeatureUsage(),c+=" ("+e.FEATURE_USAGE_STRING+"="+l+")"),o.setRequestHeader(t.request,t.options,e.SDK_VERSION_HEADER,c),[4,this.nextMiddleware.execute(t)];case 1:return[2,a.sent()];case 2:throw a.sent();case 3:return[2]}})})},e.prototype.setNext=function(e){this.nextMiddleware=e},e.CLIENT_REQUEST_ID_HEADER="client-request-id",e.SDK_VERSION_HEADER="SdkVersion",e.PRODUCT_NAME="graph-js",e.FEATURE_USAGE_STRING="featureUsage",e}();n.TelemetryHandler=c},{"../Constants":4,"./MiddlewareControl":25,"./MiddlewareUtil":26,"./options/TelemetryHandlerOptions":33,tslib:44}],30:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.AuthenticationHandlerOptions=function(e,t){this.authenticationProvider=e,this.authenticationProviderOptions=t}},{}],31:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(t,n){if(void 0===t&&(t=e.DEFAULT_MAX_REDIRECTS),void 0===n&&(n=e.DEFAULT_SHOULD_RETRY),t>e.MAX_MAX_REDIRECTS){var a=new Error("MaxRedirects should not be more than "+e.MAX_MAX_REDIRECTS);throw a.name="MaxLimitExceeded",a}this.maxRedirects=t,this.shouldRedirect=n}return e.DEFAULT_MAX_REDIRECTS=5,e.MAX_MAX_REDIRECTS=20,e.DEFAULT_SHOULD_RETRY=function(){return!0},e}();n.RedirectHandlerOptions=a},{}],32:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=function(){function e(t,n,a){var i;if(void 0===t&&(t=e.DEFAULT_DELAY),void 0===n&&(n=e.DEFAULT_MAX_RETRIES),void 0===a&&(a=e.DEFAULT_SHOULD_RETRY),t>e.MAX_DELAY&&n>e.MAX_MAX_RETRIES)throw(i=new Error("Delay and MaxRetries should not be more than "+e.MAX_DELAY+" and "+e.MAX_MAX_RETRIES)).name="MaxLimitExceeded",i;if(t>e.MAX_DELAY)throw(i=new Error("Delay should not be more than "+e.MAX_DELAY)).name="MaxLimitExceeded",i;if(n>e.MAX_MAX_RETRIES)throw(i=new Error("MaxRetries should not be more than "+e.MAX_MAX_RETRIES)).name="MaxLimitExceeded",i;this.delay=Math.min(t,e.MAX_DELAY),this.maxRetries=Math.min(n,e.MAX_MAX_RETRIES),this.shouldRetry=a}return e.prototype.getMaxDelay=function(){return e.MAX_DELAY},e.DEFAULT_DELAY=3,e.DEFAULT_MAX_RETRIES=3,e.MAX_DELAY=180,e.MAX_MAX_RETRIES=10,e.DEFAULT_SHOULD_RETRY=function(){return!0},e}();n.RetryHandlerOptions=a},{}],33:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a,i=e("../MiddlewareControl");!function(e){e[e.NONE=0]="NONE",e[e.REDIRECT_HANDLER_ENABLED=1]="REDIRECT_HANDLER_ENABLED",e[e.RETRY_HANDLER_ENABLED=2]="RETRY_HANDLER_ENABLED",e[e.AUTHENTICATION_HANDLER_ENABLED=4]="AUTHENTICATION_HANDLER_ENABLED"}(a=n.FeatureUsageFlag||(n.FeatureUsageFlag={}));var r=function(){function e(){this.featureUsage=a.NONE}return e.updateFeatureUsageFlag=function(t,n){var a;t.middlewareControl instanceof i.MiddlewareControl?a=t.middlewareControl.getMiddlewareOptions(e.name):t.middlewareControl=new i.MiddlewareControl,void 0===a&&(a=new e,t.middlewareControl.setMiddlewareOptions(e.name,a)),a.setFeatureUsage(n)},e.prototype.setFeatureUsage=function(e){this.featureUsage=this.featureUsage|e},e.prototype.getFeatureUsage=function(){return this.featureUsage.toString(16)},e}();n.TelemetryHandlerOptions=r},{"../MiddlewareControl":25}],34:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("../Range"),r=function(){function e(e,t,n,a){void 0===a&&(a={}),this.DEFAULT_FILE_SIZE=5242880,this.client=e,this.file=t,void 0===a.rangeSize&&(a.rangeSize=this.DEFAULT_FILE_SIZE),this.options=a,this.uploadSession=n,this.nextRange=new i.Range(0,this.options.rangeSize-1)}return e.createUploadSession=function(e,t,n,i){return void 0===i&&(i={}),a.__awaiter(this,void 0,void 0,function(){var r;return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,e.api(t).headers(i).post(n)];case 1:return[2,{url:(r=a.sent()).uploadUrl,expiry:new Date(r.expirationDateTime)}];case 2:throw a.sent();case 3:return[2]}})})},e.prototype.parseRange=function(e){var t=e[0];if(void 0===t||""===t)return new i.Range;var n=t.split("-"),a=parseInt(n[0],10),r=parseInt(n[1],10);return Number.isNaN(r)&&(r=this.file.size-1),new i.Range(a,r)},e.prototype.updateTaskStatus=function(e){this.uploadSession.expiry=new Date(e.expirationDateTime),this.nextRange=this.parseRange(e.nextExpectedRanges)},e.prototype.getNextRange=function(){if(-1===this.nextRange.minValue)return this.nextRange;var e=this.nextRange.minValue,t=e+this.options.rangeSize-1;return t>=this.file.size&&(t=this.file.size-1),new i.Range(e,t)},e.prototype.sliceFile=function(e){return this.file.content.slice(e.minValue,e.maxValue+1)},e.prototype.upload=function(){return a.__awaiter(this,void 0,void 0,function(){var e,t,n,i;return a.__generator(this,function(a){switch(a.label){case 0:a.trys.push([0,4,,5]),a.label=1;case 1:if(-1===(e=this.getNextRange()).maxValue)throw(t=new Error("Task with which you are trying to upload is already completed, Please check for your uploaded file")).name="Invalid Session",t;return n=this.sliceFile(e),[4,this.uploadSlice(n,e,this.file.size)];case 2:return void 0!==(i=a.sent()).id?[2,i]:(this.updateTaskStatus(i),[3,1]);case 3:return[3,5];case 4:throw a.sent();case 5:return[2]}})})},e.prototype.uploadSlice=function(e,t,n){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(a){switch(a.label){case 0:return a.trys.push([0,2,,3]),[4,this.client.api(this.uploadSession.url).headers({"Content-Length":""+(t.maxValue-t.minValue+1),"Content-Range":"bytes "+t.minValue+"-"+t.maxValue+"/"+n}).put(e)];case 1:return[2,a.sent()];case 2:throw a.sent();case 3:return[2]}})})},e.prototype.cancel=function(){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,2,,3]),[4,this.client.api(this.uploadSession.url).delete()];case 1:return[2,e.sent()];case 2:throw e.sent();case 3:return[2]}})})},e.prototype.getStatus=function(){return a.__awaiter(this,void 0,void 0,function(){var e;return a.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.client.api(this.uploadSession.url).get()];case 1:return e=t.sent(),this.updateTaskStatus(e),[2,e];case 2:throw t.sent();case 3:return[2]}})})},e.prototype.resume=function(){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(e){switch(e.label){case 0:return e.trys.push([0,3,,4]),[4,this.getStatus()];case 1:return e.sent(),[4,this.upload()];case 2:return[2,e.sent()];case 3:throw e.sent();case 4:return[2]}})})},e}();n.LargeFileUploadTask=r},{"../Range":15,tslib:44}],35:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=e("./LargeFileUploadTask"),r=e("./OneDriveLargeFileUploadTaskUtil"),o=function(e){function t(t,n,a,i){return e.call(this,t,n,a,i)||this}return a.__extends(t,e),t.constructCreateSessionUrl=function(e,n){return void 0===n&&(n=t.DEFAULT_UPLOAD_PATH),e=e.trim(),""===(n=n.trim())&&(n="/"),"/"!==n[0]&&(n="/"+n),"/"!==n[n.length-1]&&(n+="/"),encodeURI("/me/drive/root:"+n+e+":/createUploadSession")},t.create=function(e,n,i){return a.__awaiter(this,void 0,void 0,function(){var o,s,c,d,l,u,f;return a.__generator(this,function(a){switch(a.label){case 0:switch(o=i.fileName,n.constructor.name){case"Blob":s=new File([n],o),c=s.size;break;case"File":c=(s=n).size;break;case"Uint8Array":c=(d=n).byteLength-d.byteOffset,s=d.buffer.slice(d.byteOffset,d.byteOffset+d.byteLength)}a.label=1;case 1:return a.trys.push([1,3,,4]),l=t.constructCreateSessionUrl(i.fileName,i.path),[4,t.createUploadSession(e,l,i.fileName)];case 2:return u=a.sent(),f=r.getValidRangeSize(i.rangeSize),[2,new t(e,{name:o,content:s,size:c},u,{rangeSize:f})];case 3:throw a.sent();case 4:return[2]}})})},t.createUploadSession=function(t,n,i){return a.__awaiter(this,void 0,void 0,function(){var r;return a.__generator(this,function(a){r={item:{"@microsoft.graph.conflictBehavior":"rename",name:i}};try{return[2,e.createUploadSession.call(this,t,n,r)]}catch(e){throw e}return[2]})})},t.prototype.commit=function(e){return a.__awaiter(this,void 0,void 0,function(){var t;return a.__generator(this,function(n){switch(n.label){case 0:return n.trys.push([0,2,,3]),t={name:this.file.name,"@microsoft.graph.conflictBehavior":"rename","@microsoft.graph.sourceUrl":this.uploadSession.url},[4,this.client.api(e).put(t)];case 1:return[2,n.sent()];case 2:throw n.sent();case 3:return[2]}})})},t.DEFAULT_UPLOAD_PATH="/",t}(i.LargeFileUploadTask);n.OneDriveLargeFileUploadTask=o},{"./LargeFileUploadTask":34,"./OneDriveLargeFileUploadTaskUtil":36,tslib:44}],36:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0}),n.getValidRangeSize=function(e){void 0===e&&(e=5242880);var t,n=62914560;return e>n&&(e=n),(t=e)>327680&&(t=320*Math.floor(t/327680)*1024),t}},{}],37:[function(e,t,n){"use strict";Object.defineProperty(n,"__esModule",{value:!0});var a=e("tslib"),i=function(){function e(e,t,n){this.client=e,this.collection=t.value,this.nextLink=t["@odata.nextLink"],this.deltaLink=t["@odata.deltaLink"],this.callback=n,this.complete=!1}return e.prototype.iterationHelper=function(){if(void 0===this.collection)return!1;for(var e=!0;e&&0!==this.collection.length;){var t=this.collection.shift();e=this.callback(t)}return e},e.prototype.fetchAndUpdateNextPageData=function(){return a.__awaiter(this,void 0,void 0,function(){var e;return a.__generator(this,function(t){switch(t.label){case 0:return t.trys.push([0,2,,3]),[4,this.client.api(this.nextLink).get()];case 1:return e=t.sent(),this.collection=e.value,this.nextLink=e["@odata.nextLink"],this.deltaLink=e["@odata.deltaLink"],[3,3];case 2:throw t.sent();case 3:return[2]}})})},e.prototype.getDeltaLink=function(){return this.deltaLink},e.prototype.iterate=function(){return a.__awaiter(this,void 0,void 0,function(){var e;return a.__generator(this,function(t){switch(t.label){case 0:t.trys.push([0,6,,7]),e=this.iterationHelper(),t.label=1;case 1:return e?void 0===this.nextLink?[3,3]:[4,this.fetchAndUpdateNextPageData()]:[3,5];case 2:return t.sent(),e=this.iterationHelper(),[3,4];case 3:e=!1,t.label=4;case 4:return[3,1];case 5:return void 0===this.nextLink&&0===this.collection.length&&(this.complete=!0),[3,7];case 6:throw t.sent();case 7:return[2]}})})},e.prototype.resume=function(){return a.__awaiter(this,void 0,void 0,function(){return a.__generator(this,function(e){try{return[2,this.iterate()]}catch(e){throw e}return[2]})})},e.prototype.isComplete=function(){return this.complete},e}();n.PageIterator=i},{tslib:44}],38:[function(e,t,n){"use strict";n.byteLength=function(e){var t=d(e),n=t[0],a=t[1];return 3*(n+a)/4-a},n.toByteArray=function(e){var t,n,a=d(e),o=a[0],s=a[1],c=new r(function(e,t,n){return 3*(t+n)/4-n}(0,o,s)),l=0,u=s>0?o-4:o;for(n=0;n<u;n+=4)t=i[e.charCodeAt(n)]<<18|i[e.charCodeAt(n+1)]<<12|i[e.charCodeAt(n+2)]<<6|i[e.charCodeAt(n+3)],c[l++]=t>>16&255,c[l++]=t>>8&255,c[l++]=255&t;return 2===s&&(t=i[e.charCodeAt(n)]<<2|i[e.charCodeAt(n+1)]>>4,c[l++]=255&t),1===s&&(t=i[e.charCodeAt(n)]<<10|i[e.charCodeAt(n+1)]<<4|i[e.charCodeAt(n+2)]>>2,c[l++]=t>>8&255,c[l++]=255&t),c},n.fromByteArray=function(e){for(var t,n=e.length,i=n%3,r=[],o=16383,s=0,c=n-i;s<c;s+=o)r.push(l(e,s,s+o>c?c:s+o));return 1===i?(t=e[n-1],r.push(a[t>>2]+a[t<<4&63]+"==")):2===i&&(t=(e[n-2]<<8)+e[n-1],r.push(a[t>>10]+a[t>>4&63]+a[t<<2&63]+"=")),r.join("")};for(var a=[],i=[],r="undefined"!=typeof Uint8Array?Uint8Array:Array,o="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",s=0,c=o.length;s<c;++s)a[s]=o[s],i[o.charCodeAt(s)]=s;function d(e){var t=e.length;if(t%4>0)throw new Error("Invalid string. Length must be a multiple of 4");var n=e.indexOf("=");return-1===n&&(n=t),[n,n===t?0:4-n%4]}function l(e,t,n){for(var i,r,o=[],s=t;s<n;s+=3)i=(e[s]<<16&16711680)+(e[s+1]<<8&65280)+(255&e[s+2]),o.push(a[(r=i)>>18&63]+a[r>>12&63]+a[r>>6&63]+a[63&r]);return o.join("")}i["-".charCodeAt(0)]=62,i["_".charCodeAt(0)]=63},{}],39:[function(e,t,n){(function(t){"use strict";var a=e("base64-js"),i=e("ieee754"),r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("nodejs.util.inspect.custom"):null;n.Buffer=t,n.SlowBuffer=function(e){return+e!=e&&(e=0),t.alloc(+e)},n.INSPECT_MAX_BYTES=50;var o=2147483647;function s(e){if(e>o)throw new RangeError('The value "'+e+'" is invalid for option "size"');var n=new Uint8Array(e);return Object.setPrototypeOf(n,t.prototype),n}function t(e,t,n){if("number"==typeof e){if("string"==typeof t)throw new TypeError('The "string" argument must be of type string. Received type number');return l(e)}return c(e,t,n)}function c(e,n,a){if("string"==typeof e)return function(e,n){if("string"==typeof n&&""!==n||(n="utf8"),!t.isEncoding(n))throw new TypeError("Unknown encoding: "+n);var a=0|m(e,n),i=s(a),r=i.write(e,n);return r!==a&&(i=i.slice(0,r)),i}(e,n);if(ArrayBuffer.isView(e))return function(e){if(B(e,Uint8Array)){var t=new Uint8Array(e);return f(t.buffer,t.byteOffset,t.byteLength)}return u(e)}(e);if(null==e)throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e);if(B(e,ArrayBuffer)||e&&B(e.buffer,ArrayBuffer))return f(e,n,a);if("undefined"!=typeof SharedArrayBuffer&&(B(e,SharedArrayBuffer)||e&&B(e.buffer,SharedArrayBuffer)))return f(e,n,a);if("number"==typeof e)throw new TypeError('The "value" argument must not be of type number. Received type number');var i=e.valueOf&&e.valueOf();if(null!=i&&i!==e)return t.from(i,n,a);var r=function(e){if(t.isBuffer(e)){var n=0|p(e.length),a=s(n);return 0===a.length||e.copy(a,0,0,n),a}return void 0!==e.length?"number"!=typeof e.length||j(e.length)?s(0):u(e):"Buffer"===e.type&&Array.isArray(e.data)?u(e.data):void 0}(e);if(r)return r;if("undefined"!=typeof Symbol&&null!=Symbol.toPrimitive&&"function"==typeof e[Symbol.toPrimitive])return t.from(e[Symbol.toPrimitive]("string"),n,a);throw new TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type "+typeof e)}function d(e){if("number"!=typeof e)throw new TypeError('"size" argument must be of type number');if(e<0)throw new RangeError('The value "'+e+'" is invalid for option "size"')}function l(e){return d(e),s(e<0?0:0|p(e))}function u(e){for(var t=e.length<0?0:0|p(e.length),n=s(t),a=0;a<t;a+=1)n[a]=255&e[a];return n}function f(e,n,a){if(n<0||e.byteLength<n)throw new RangeError('"offset" is outside of buffer bounds');if(e.byteLength<n+(a||0))throw new RangeError('"length" is outside of buffer bounds');var i;return i=void 0===n&&void 0===a?new Uint8Array(e):void 0===a?new Uint8Array(e,n):new Uint8Array(e,n,a),Object.setPrototypeOf(i,t.prototype),i}function p(e){if(e>=o)throw new RangeError("Attempt to allocate Buffer larger than maximum size: 0x"+o.toString(16)+" bytes");return 0|e}function m(e,n){if(t.isBuffer(e))return e.length;if(ArrayBuffer.isView(e)||B(e,ArrayBuffer))return e.byteLength;if("string"!=typeof e)throw new TypeError('The "string" argument must be one of type string, Buffer, or ArrayBuffer. Received type '+typeof e);var a=e.length,i=arguments.length>2&&!0===arguments[2];if(!i&&0===a)return 0;for(var r=!1;;)switch(n){case"ascii":case"latin1":case"binary":return a;case"utf8":case"utf-8":return H(e).length;case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return 2*a;case"hex":return a>>>1;case"base64":return R(e).length;default:if(r)return i?-1:H(e).length;n=(""+n).toLowerCase(),r=!0}}function _(e,t,n){var a=!1;if((void 0===t||t<0)&&(t=0),t>this.length)return"";if((void 0===n||n>this.length)&&(n=this.length),n<=0)return"";if((n>>>=0)<=(t>>>=0))return"";for(e||(e="utf8");;)switch(e){case"hex":return A(this,t,n);case"utf8":case"utf-8":return C(this,t,n);case"ascii":return w(this,t,n);case"latin1":case"binary":return E(this,t,n);case"base64":return x(this,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return L(this,t,n);default:if(a)throw new TypeError("Unknown encoding: "+e);e=(e+"").toLowerCase(),a=!0}}function h(e,t,n){var a=e[t];e[t]=e[n],e[n]=a}function b(e,n,a,i,r){if(0===e.length)return-1;if("string"==typeof a?(i=a,a=0):a>2147483647?a=2147483647:a<-2147483648&&(a=-2147483648),j(a=+a)&&(a=r?0:e.length-1),a<0&&(a=e.length+a),a>=e.length){if(r)return-1;a=e.length-1}else if(a<0){if(!r)return-1;a=0}if("string"==typeof n&&(n=t.from(n,i)),t.isBuffer(n))return 0===n.length?-1:g(e,n,a,i,r);if("number"==typeof n)return n&=255,"function"==typeof Uint8Array.prototype.indexOf?r?Uint8Array.prototype.indexOf.call(e,n,a):Uint8Array.prototype.lastIndexOf.call(e,n,a):g(e,[n],a,i,r);throw new TypeError("val must be string, number or Buffer")}function g(e,t,n,a,i){var r,o=1,s=e.length,c=t.length;if(void 0!==a&&("ucs2"===(a=String(a).toLowerCase())||"ucs-2"===a||"utf16le"===a||"utf-16le"===a)){if(e.length<2||t.length<2)return-1;o=2,s/=2,c/=2,n/=2}function d(e,t){return 1===o?e[t]:e.readUInt16BE(t*o)}if(i){var l=-1;for(r=n;r<s;r++)if(d(e,r)===d(t,-1===l?0:r-l)){if(-1===l&&(l=r),r-l+1===c)return l*o}else-1!==l&&(r-=r-l),l=-1}else for(n+c>s&&(n=s-c),r=n;r>=0;r--){for(var u=!0,f=0;f<c;f++)if(d(e,r+f)!==d(t,f)){u=!1;break}if(u)return r}return-1}function v(e,t,n,a){n=Number(n)||0;var i=e.length-n;a?(a=Number(a))>i&&(a=i):a=i;var r=t.length;a>r/2&&(a=r/2);for(var o=0;o<a;++o){var s=parseInt(t.substr(2*o,2),16);if(j(s))return o;e[n+o]=s}return o}function y(e,t,n,a){return N(H(t,e.length-n),e,n,a)}function S(e,t,n,a){return N(function(e){for(var t=[],n=0;n<e.length;++n)t.push(255&e.charCodeAt(n));return t}(t),e,n,a)}function D(e,t,n,a){return N(R(t),e,n,a)}function I(e,t,n,a){return N(function(e,t){for(var n,a,i,r=[],o=0;o<e.length&&!((t-=2)<0);++o)a=(n=e.charCodeAt(o))>>8,i=n%256,r.push(i),r.push(a);return r}(t,e.length-n),e,n,a)}function x(e,t,n){return 0===t&&n===e.length?a.fromByteArray(e):a.fromByteArray(e.slice(t,n))}function C(e,t,n){n=Math.min(e.length,n);for(var a=[],i=t;i<n;){var r,o,s,c,d=e[i],l=null,u=d>239?4:d>223?3:d>191?2:1;if(i+u<=n)switch(u){case 1:d<128&&(l=d);break;case 2:128==(192&(r=e[i+1]))&&(c=(31&d)<<6|63&r)>127&&(l=c);break;case 3:r=e[i+1],o=e[i+2],128==(192&r)&&128==(192&o)&&(c=(15&d)<<12|(63&r)<<6|63&o)>2047&&(c<55296||c>57343)&&(l=c);break;case 4:r=e[i+1],o=e[i+2],s=e[i+3],128==(192&r)&&128==(192&o)&&128==(192&s)&&(c=(15&d)<<18|(63&r)<<12|(63&o)<<6|63&s)>65535&&c<1114112&&(l=c)}null===l?(l=65533,u=1):l>65535&&(l-=65536,a.push(l>>>10&1023|55296),l=56320|1023&l),a.push(l),i+=u}return function(e){var t=e.length;if(t<=O)return String.fromCharCode.apply(String,e);for(var n="",a=0;a<t;)n+=String.fromCharCode.apply(String,e.slice(a,a+=O));return n}(a)}n.kMaxLength=o,t.TYPED_ARRAY_SUPPORT=function(){try{var e=new Uint8Array(1),t={foo:function(){return 42}};return Object.setPrototypeOf(t,Uint8Array.prototype),Object.setPrototypeOf(e,t),42===e.foo()}catch(e){return!1}}(),t.TYPED_ARRAY_SUPPORT||"undefined"==typeof console||"function"!=typeof console.error||console.error("This browser lacks typed array (Uint8Array) support which is required by `buffer` v5.x. Use `buffer` v4.x if you require old browser support."),Object.defineProperty(t.prototype,"parent",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.buffer}}),Object.defineProperty(t.prototype,"offset",{enumerable:!0,get:function(){if(t.isBuffer(this))return this.byteOffset}}),t.poolSize=8192,t.from=function(e,t,n){return c(e,t,n)},Object.setPrototypeOf(t.prototype,Uint8Array.prototype),Object.setPrototypeOf(t,Uint8Array),t.alloc=function(e,t,n){return function(e,t,n){return d(e),e<=0?s(e):void 0!==t?"string"==typeof n?s(e).fill(t,n):s(e).fill(t):s(e)}(e,t,n)},t.allocUnsafe=function(e){return l(e)},t.allocUnsafeSlow=function(e){return l(e)},t.isBuffer=function(e){return null!=e&&!0===e._isBuffer&&e!==t.prototype},t.compare=function(e,n){if(B(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),B(n,Uint8Array)&&(n=t.from(n,n.offset,n.byteLength)),!t.isBuffer(e)||!t.isBuffer(n))throw new TypeError('The "buf1", "buf2" arguments must be one of type Buffer or Uint8Array');if(e===n)return 0;for(var a=e.length,i=n.length,r=0,o=Math.min(a,i);r<o;++r)if(e[r]!==n[r]){a=e[r],i=n[r];break}return a<i?-1:i<a?1:0},t.isEncoding=function(e){switch(String(e).toLowerCase()){case"hex":case"utf8":case"utf-8":case"ascii":case"latin1":case"binary":case"base64":case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return!0;default:return!1}},t.concat=function(e,n){if(!Array.isArray(e))throw new TypeError('"list" argument must be an Array of Buffers');if(0===e.length)return t.alloc(0);var a;if(void 0===n)for(n=0,a=0;a<e.length;++a)n+=e[a].length;var i=t.allocUnsafe(n),r=0;for(a=0;a<e.length;++a){var o=e[a];if(B(o,Uint8Array))r+o.length>i.length?t.from(o).copy(i,r):Uint8Array.prototype.set.call(i,o,r);else{if(!t.isBuffer(o))throw new TypeError('"list" argument must be an Array of Buffers');o.copy(i,r)}r+=o.length}return i},t.byteLength=m,t.prototype._isBuffer=!0,t.prototype.swap16=function(){var e=this.length;if(e%2!=0)throw new RangeError("Buffer size must be a multiple of 16-bits");for(var t=0;t<e;t+=2)h(this,t,t+1);return this},t.prototype.swap32=function(){var e=this.length;if(e%4!=0)throw new RangeError("Buffer size must be a multiple of 32-bits");for(var t=0;t<e;t+=4)h(this,t,t+3),h(this,t+1,t+2);return this},t.prototype.swap64=function(){var e=this.length;if(e%8!=0)throw new RangeError("Buffer size must be a multiple of 64-bits");for(var t=0;t<e;t+=8)h(this,t,t+7),h(this,t+1,t+6),h(this,t+2,t+5),h(this,t+3,t+4);return this},t.prototype.toString=function(){var e=this.length;return 0===e?"":0===arguments.length?C(this,0,e):_.apply(this,arguments)},t.prototype.toLocaleString=t.prototype.toString,t.prototype.equals=function(e){if(!t.isBuffer(e))throw new TypeError("Argument must be a Buffer");return this===e||0===t.compare(this,e)},t.prototype.inspect=function(){var e="",t=n.INSPECT_MAX_BYTES;return e=this.toString("hex",0,t).replace(/(.{2})/g,"$1 ").trim(),this.length>t&&(e+=" ... "),"<Buffer "+e+">"},r&&(t.prototype[r]=t.prototype.inspect),t.prototype.compare=function(e,n,a,i,r){if(B(e,Uint8Array)&&(e=t.from(e,e.offset,e.byteLength)),!t.isBuffer(e))throw new TypeError('The "target" argument must be one of type Buffer or Uint8Array. Received type '+typeof e);if(void 0===n&&(n=0),void 0===a&&(a=e?e.length:0),void 0===i&&(i=0),void 0===r&&(r=this.length),n<0||a>e.length||i<0||r>this.length)throw new RangeError("out of range index");if(i>=r&&n>=a)return 0;if(i>=r)return-1;if(n>=a)return 1;if(this===e)return 0;for(var o=(r>>>=0)-(i>>>=0),s=(a>>>=0)-(n>>>=0),c=Math.min(o,s),d=this.slice(i,r),l=e.slice(n,a),u=0;u<c;++u)if(d[u]!==l[u]){o=d[u],s=l[u];break}return o<s?-1:s<o?1:0},t.prototype.includes=function(e,t,n){return-1!==this.indexOf(e,t,n)},t.prototype.indexOf=function(e,t,n){return b(this,e,t,n,!0)},t.prototype.lastIndexOf=function(e,t,n){return b(this,e,t,n,!1)},t.prototype.write=function(e,t,n,a){if(void 0===t)a="utf8",n=this.length,t=0;else if(void 0===n&&"string"==typeof t)a=t,n=this.length,t=0;else{if(!isFinite(t))throw new Error("Buffer.write(string, encoding, offset[, length]) is no longer supported");t>>>=0,isFinite(n)?(n>>>=0,void 0===a&&(a="utf8")):(a=n,n=void 0)}var i=this.length-t;if((void 0===n||n>i)&&(n=i),e.length>0&&(n<0||t<0)||t>this.length)throw new RangeError("Attempt to write outside buffer bounds");a||(a="utf8");for(var r=!1;;)switch(a){case"hex":return v(this,e,t,n);case"utf8":case"utf-8":return y(this,e,t,n);case"ascii":case"latin1":case"binary":return S(this,e,t,n);case"base64":return D(this,e,t,n);case"ucs2":case"ucs-2":case"utf16le":case"utf-16le":return I(this,e,t,n);default:if(r)throw new TypeError("Unknown encoding: "+a);a=(""+a).toLowerCase(),r=!0}},t.prototype.toJSON=function(){return{type:"Buffer",data:Array.prototype.slice.call(this._arr||this,0)}};var O=4096;function w(e,t,n){var a="";n=Math.min(e.length,n);for(var i=t;i<n;++i)a+=String.fromCharCode(127&e[i]);return a}function E(e,t,n){var a="";n=Math.min(e.length,n);for(var i=t;i<n;++i)a+=String.fromCharCode(e[i]);return a}function A(e,t,n){var a=e.length;(!t||t<0)&&(t=0),(!n||n<0||n>a)&&(n=a);for(var i="",r=t;r<n;++r)i+=V[e[r]];return i}function L(e,t,n){for(var a=e.slice(t,n),i="",r=0;r<a.length-1;r+=2)i+=String.fromCharCode(a[r]+256*a[r+1]);return i}function k(e,t,n){if(e%1!=0||e<0)throw new RangeError("offset is not uint");if(e+t>n)throw new RangeError("Trying to access beyond buffer length")}function M(e,n,a,i,r,o){if(!t.isBuffer(e))throw new TypeError('"buffer" argument must be a Buffer instance');if(n>r||n<o)throw new RangeError('"value" argument is out of bounds');if(a+i>e.length)throw new RangeError("Index out of range")}function P(e,t,n,a,i,r){if(n+a>e.length)throw new RangeError("Index out of range");if(n<0)throw new RangeError("Index out of range")}function T(e,t,n,a,r){return t=+t,n>>>=0,r||P(e,0,n,4),i.write(e,t,n,a,23,4),n+4}function U(e,t,n,a,r){return t=+t,n>>>=0,r||P(e,0,n,8),i.write(e,t,n,a,52,8),n+8}t.prototype.slice=function(e,n){var a=this.length;(e=~~e)<0?(e+=a)<0&&(e=0):e>a&&(e=a),(n=void 0===n?a:~~n)<0?(n+=a)<0&&(n=0):n>a&&(n=a),n<e&&(n=e);var i=this.subarray(e,n);return Object.setPrototypeOf(i,t.prototype),i},t.prototype.readUintLE=t.prototype.readUIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var a=this[e],i=1,r=0;++r<t&&(i*=256);)a+=this[e+r]*i;return a},t.prototype.readUintBE=t.prototype.readUIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var a=this[e+--t],i=1;t>0&&(i*=256);)a+=this[e+--t]*i;return a},t.prototype.readUint8=t.prototype.readUInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),this[e]},t.prototype.readUint16LE=t.prototype.readUInt16LE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]|this[e+1]<<8},t.prototype.readUint16BE=t.prototype.readUInt16BE=function(e,t){return e>>>=0,t||k(e,2,this.length),this[e]<<8|this[e+1]},t.prototype.readUint32LE=t.prototype.readUInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),(this[e]|this[e+1]<<8|this[e+2]<<16)+16777216*this[e+3]},t.prototype.readUint32BE=t.prototype.readUInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),16777216*this[e]+(this[e+1]<<16|this[e+2]<<8|this[e+3])},t.prototype.readIntLE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var a=this[e],i=1,r=0;++r<t&&(i*=256);)a+=this[e+r]*i;return a>=(i*=128)&&(a-=Math.pow(2,8*t)),a},t.prototype.readIntBE=function(e,t,n){e>>>=0,t>>>=0,n||k(e,t,this.length);for(var a=t,i=1,r=this[e+--a];a>0&&(i*=256);)r+=this[e+--a]*i;return r>=(i*=128)&&(r-=Math.pow(2,8*t)),r},t.prototype.readInt8=function(e,t){return e>>>=0,t||k(e,1,this.length),128&this[e]?-1*(255-this[e]+1):this[e]},t.prototype.readInt16LE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e]|this[e+1]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt16BE=function(e,t){e>>>=0,t||k(e,2,this.length);var n=this[e+1]|this[e]<<8;return 32768&n?4294901760|n:n},t.prototype.readInt32LE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]|this[e+1]<<8|this[e+2]<<16|this[e+3]<<24},t.prototype.readInt32BE=function(e,t){return e>>>=0,t||k(e,4,this.length),this[e]<<24|this[e+1]<<16|this[e+2]<<8|this[e+3]},t.prototype.readFloatLE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!0,23,4)},t.prototype.readFloatBE=function(e,t){return e>>>=0,t||k(e,4,this.length),i.read(this,e,!1,23,4)},t.prototype.readDoubleLE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!0,52,8)},t.prototype.readDoubleBE=function(e,t){return e>>>=0,t||k(e,8,this.length),i.read(this,e,!1,52,8)},t.prototype.writeUintLE=t.prototype.writeUIntLE=function(e,t,n,a){e=+e,t>>>=0,n>>>=0,a||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=1,r=0;for(this[t]=255&e;++r<n&&(i*=256);)this[t+r]=e/i&255;return t+n},t.prototype.writeUintBE=t.prototype.writeUIntBE=function(e,t,n,a){e=+e,t>>>=0,n>>>=0,a||M(this,e,t,n,Math.pow(2,8*n)-1,0);var i=n-1,r=1;for(this[t+i]=255&e;--i>=0&&(r*=256);)this[t+i]=e/r&255;return t+n},t.prototype.writeUint8=t.prototype.writeUInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,255,0),this[t]=255&e,t+1},t.prototype.writeUint16LE=t.prototype.writeUInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeUint16BE=t.prototype.writeUInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,65535,0),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeUint32LE=t.prototype.writeUInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t+3]=e>>>24,this[t+2]=e>>>16,this[t+1]=e>>>8,this[t]=255&e,t+4},t.prototype.writeUint32BE=t.prototype.writeUInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,4294967295,0),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeIntLE=function(e,t,n,a){if(e=+e,t>>>=0,!a){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var r=0,o=1,s=0;for(this[t]=255&e;++r<n&&(o*=256);)e<0&&0===s&&0!==this[t+r-1]&&(s=1),this[t+r]=(e/o>>0)-s&255;return t+n},t.prototype.writeIntBE=function(e,t,n,a){if(e=+e,t>>>=0,!a){var i=Math.pow(2,8*n-1);M(this,e,t,n,i-1,-i)}var r=n-1,o=1,s=0;for(this[t+r]=255&e;--r>=0&&(o*=256);)e<0&&0===s&&0!==this[t+r+1]&&(s=1),this[t+r]=(e/o>>0)-s&255;return t+n},t.prototype.writeInt8=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,1,127,-128),e<0&&(e=255+e+1),this[t]=255&e,t+1},t.prototype.writeInt16LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=255&e,this[t+1]=e>>>8,t+2},t.prototype.writeInt16BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,2,32767,-32768),this[t]=e>>>8,this[t+1]=255&e,t+2},t.prototype.writeInt32LE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),this[t]=255&e,this[t+1]=e>>>8,this[t+2]=e>>>16,this[t+3]=e>>>24,t+4},t.prototype.writeInt32BE=function(e,t,n){return e=+e,t>>>=0,n||M(this,e,t,4,2147483647,-2147483648),e<0&&(e=4294967295+e+1),this[t]=e>>>24,this[t+1]=e>>>16,this[t+2]=e>>>8,this[t+3]=255&e,t+4},t.prototype.writeFloatLE=function(e,t,n){return T(this,e,t,!0,n)},t.prototype.writeFloatBE=function(e,t,n){return T(this,e,t,!1,n)},t.prototype.writeDoubleLE=function(e,t,n){return U(this,e,t,!0,n)},t.prototype.writeDoubleBE=function(e,t,n){return U(this,e,t,!1,n)},t.prototype.copy=function(e,n,a,i){if(!t.isBuffer(e))throw new TypeError("argument should be a Buffer");if(a||(a=0),i||0===i||(i=this.length),n>=e.length&&(n=e.length),n||(n=0),i>0&&i<a&&(i=a),i===a)return 0;if(0===e.length||0===this.length)return 0;if(n<0)throw new RangeError("targetStart out of bounds");if(a<0||a>=this.length)throw new RangeError("Index out of range");if(i<0)throw new RangeError("sourceEnd out of bounds");i>this.length&&(i=this.length),e.length-n<i-a&&(i=e.length-n+a);var r=i-a;return this===e&&"function"==typeof Uint8Array.prototype.copyWithin?this.copyWithin(n,a,i):Uint8Array.prototype.set.call(e,this.subarray(a,i),n),r},t.prototype.fill=function(e,n,a,i){if("string"==typeof e){if("string"==typeof n?(i=n,n=0,a=this.length):"string"==typeof a&&(i=a,a=this.length),void 0!==i&&"string"!=typeof i)throw new TypeError("encoding must be a string");if("string"==typeof i&&!t.isEncoding(i))throw new TypeError("Unknown encoding: "+i);if(1===e.length){var r=e.charCodeAt(0);("utf8"===i&&r<128||"latin1"===i)&&(e=r)}}else"number"==typeof e?e&=255:"boolean"==typeof e&&(e=Number(e));if(n<0||this.length<n||this.length<a)throw new RangeError("Out of range index");if(a<=n)return this;var o;if(n>>>=0,a=void 0===a?this.length:a>>>0,e||(e=0),"number"==typeof e)for(o=n;o<a;++o)this[o]=e;else{var s=t.isBuffer(e)?e:t.from(e,i),c=s.length;if(0===c)throw new TypeError('The value "'+e+'" is invalid for argument "value"');for(o=0;o<a-n;++o)this[o+n]=s[o%c]}return this};var F=/[^+/0-9A-Za-z-_]/g;function H(e,t){var n;t=t||1/0;for(var a=e.length,i=null,r=[],o=0;o<a;++o){if((n=e.charCodeAt(o))>55295&&n<57344){if(!i){if(n>56319){(t-=3)>-1&&r.push(239,191,189);continue}if(o+1===a){(t-=3)>-1&&r.push(239,191,189);continue}i=n;continue}if(n<56320){(t-=3)>-1&&r.push(239,191,189),i=n;continue}n=65536+(i-55296<<10|n-56320)}else i&&(t-=3)>-1&&r.push(239,191,189);if(i=null,n<128){if((t-=1)<0)break;r.push(n)}else if(n<2048){if((t-=2)<0)break;r.push(n>>6|192,63&n|128)}else if(n<65536){if((t-=3)<0)break;r.push(n>>12|224,n>>6&63|128,63&n|128)}else{if(!(n<1114112))throw new Error("Invalid code point");if((t-=4)<0)break;r.push(n>>18|240,n>>12&63|128,n>>6&63|128,63&n|128)}}return r}function R(e){return a.toByteArray(function(e){if((e=(e=e.split("=")[0]).trim().replace(F,"")).length<2)return"";for(;e.length%4!=0;)e+="=";return e}(e))}function N(e,t,n,a){for(var i=0;i<a&&!(i+n>=t.length||i>=e.length);++i)t[i+n]=e[i];return i}function B(e,t){return e instanceof t||null!=e&&null!=e.constructor&&null!=e.constructor.name&&e.constructor.name===t.name}function j(e){return e!=e}var V=function(){for(var e="0123456789abcdef",t=new Array(256),n=0;n<16;++n)for(var a=16*n,i=0;i<16;++i)t[a+i]=e[n]+e[i];return t}()}).call(this,e("buffer").Buffer)},{"base64-js":38,buffer:39,ieee754:41}],40:[function(a,r,o){(function(e,s){var c;c=function(){"use strict";function t(e){return"function"==typeof e}var n=Array.isArray?Array.isArray:function(e){return"[object Array]"===Object.prototype.toString.call(e)},i=0,r=void 0,o=void 0,c=function(e,t){_[i]=e,_[i+1]=t,2===(i+=2)&&(o?o(h):S())},d="undefined"!=typeof window?window:void 0,l=d||{},u=l.MutationObserver||l.WebKitMutationObserver,f="undefined"==typeof self&&void 0!==e&&"[object process]"==={}.toString.call(e),p="undefined"!=typeof Uint8ClampedArray&&"undefined"!=typeof importScripts&&"undefined"!=typeof MessageChannel;function m(){var e=setTimeout;return function(){return e(h,1)}}var _=new Array(1e3);function h(){for(var e=0;e<i;e+=2)(0,_[e])(_[e+1]),_[e]=void 0,_[e+1]=void 0;i=0}var b,g,v,y,S=void 0;function D(e,t){var n=this,a=new this.constructor(C);void 0===a[x]&&R(a);var i=n._state;if(i){var r=arguments[i-1];c(function(){return F(i,a,r,n._result)})}else T(n,a,e,t);return a}function I(e){if(e&&"object"==typeof e&&e.constructor===this)return e;var t=new this(C);return L(t,e),t}f?S=function(){return e.nextTick(h)}:u?(g=0,v=new u(h),y=document.createTextNode(""),v.observe(y,{characterData:!0}),S=function(){y.data=g=++g%2}):p?((b=new MessageChannel).port1.onmessage=h,S=function(){return b.port2.postMessage(0)}):S=void 0===d&&"function"==typeof a?function(){try{var e=Function("return this")().require("vertx");return void 0!==(r=e.runOnLoop||e.runOnContext)?function(){r(h)}:m()}catch(e){return m()}}():m();var x=Math.random().toString(36).substring(2);function C(){}var O=void 0,w={error:null};function E(e){try{return e.then}catch(e){return w.error=e,w}}function A(e,n,a){n.constructor===e.constructor&&a===D&&n.constructor.resolve===I?function(e,t){1===t._state?M(e,t._result):2===t._state?P(e,t._result):T(t,void 0,function(t){return L(e,t)},function(t){return P(e,t)})}(e,n):a===w?(P(e,w.error),w.error=null):void 0===a?M(e,n):t(a)?function(e,t,n){c(function(e){var a=!1,i=function(n,i,r,o){try{n.call(i,function(n){a||(a=!0,t!==n?L(e,n):M(e,n))},function(t){a||(a=!0,P(e,t))})}catch(e){return e}}(n,t,0,0,e._label);!a&&i&&(a=!0,P(e,i))},e)}(e,n,a):M(e,n)}function L(e,t){var n,a;e===t?P(e,new TypeError("You cannot resolve a promise with itself")):(a=typeof(n=t),null===n||"object"!==a&&"function"!==a?M(e,t):A(e,t,E(t)))}function k(e){e._onerror&&e._onerror(e._result),U(e)}function M(e,t){e._state===O&&(e._result=t,e._state=1,0!==e._subscribers.length&&c(U,e))}function P(e,t){e._state===O&&(e._state=2,e._result=t,c(k,e))}function T(e,t,n,a){var i=e._subscribers,r=i.length;e._onerror=null,i[r]=t,i[r+1]=n,i[r+2]=a,0===r&&e._state&&c(U,e)}function U(e){var t=e._subscribers,n=e._state;if(0!==t.length){for(var a=void 0,i=void 0,r=e._result,o=0;o<t.length;o+=3)a=t[o],i=t[o+n],a?F(n,a,i,r):i(r);e._subscribers.length=0}}function F(e,n,a,i){var r=t(a),o=void 0,s=void 0,c=void 0,d=void 0;if(r){if(o=function(e,t){try{return e(t)}catch(e){return w.error=e,w}}(a,i),o===w?(d=!0,s=o.error,o.error=null):c=!0,n===o)return void P(n,new TypeError("A promises callback cannot return that same promise."))}else o=i,c=!0;n._state!==O||(r&&c?L(n,o):d?P(n,s):1===e?M(n,o):2===e&&P(n,o))}var H=0;function R(e){e[x]=H++,e._state=void 0,e._result=void 0,e._subscribers=[]}var N=function(){function e(e,t){this._instanceConstructor=e,this.promise=new e(C),this.promise[x]||R(this.promise),n(t)?(this.length=t.length,this._remaining=t.length,this._result=new Array(this.length),0===this.length?M(this.promise,this._result):(this.length=this.length||0,this._enumerate(t),0===this._remaining&&M(this.promise,this._result))):P(this.promise,new Error("Array Methods must be provided an Array"))}return e.prototype._enumerate=function(e){for(var t=0;this._state===O&&t<e.length;t++)this._eachEntry(e[t],t)},e.prototype._eachEntry=function(e,t){var n=this._instanceConstructor,a=n.resolve;if(a===I){var i=E(e);if(i===D&&e._state!==O)this._settledAt(e._state,t,e._result);else if("function"!=typeof i)this._remaining--,this._result[t]=e;else if(n===B){var r=new n(C);A(r,e,i),this._willSettleAt(r,t)}else this._willSettleAt(new n(function(t){return t(e)}),t)}else this._willSettleAt(a(e),t)},e.prototype._settledAt=function(e,t,n){var a=this.promise;a._state===O&&(this._remaining--,2===e?P(a,n):this._result[t]=n),0===this._remaining&&M(a,this._result)},e.prototype._willSettleAt=function(e,t){var n=this;T(e,void 0,function(e){return n._settledAt(1,t,e)},function(e){return n._settledAt(2,t,e)})},e}(),B=function(){function e(t){this[x]=H++,this._result=this._state=void 0,this._subscribers=[],C!==t&&("function"!=typeof t&&function(){throw new TypeError("You must pass a resolver function as the first argument to the promise constructor")}(),this instanceof e?function(e,t){try{t(function(t){L(e,t)},function(t){P(e,t)})}catch(t){P(e,t)}}(this,t):function(){throw new TypeError("Failed to construct 'Promise': Please use the 'new' operator, this object constructor cannot be called as a function.")}())}return e.prototype.catch=function(e){return this.then(null,e)},e.prototype.finally=function(e){var n=this,a=n.constructor;return t(e)?n.then(function(t){return a.resolve(e()).then(function(){return t})},function(t){return a.resolve(e()).then(function(){throw t})}):n.then(e,e)},e}();return B.prototype.then=D,B.all=function(e){return new N(this,e).promise},B.race=function(e){var t=this;return n(e)?new t(function(n,a){for(var i=e.length,r=0;r<i;r++)t.resolve(e[r]).then(n,a)}):new t(function(e,t){return t(new TypeError("You must pass an array to race."))})},B.resolve=I,B.reject=function(e){var t=new this(C);return P(t,e),t},B._setScheduler=function(e){o=e},B._setAsap=function(e){c=e},B._asap=c,B.polyfill=function(){var e=void 0;if(void 0!==s)e=s;else if("undefined"!=typeof self)e=self;else try{e=Function("return this")()}catch(e){throw new Error("polyfill failed because global object is unavailable in this environment")}var t=e.Promise;if(t){var n=null;try{n=Object.prototype.toString.call(t.resolve())}catch(e){}if("[object Promise]"===n&&!t.cast)return}e.Promise=B},B.Promise=B,B},"object"==typeof o&&void 0!==r?r.exports=c():void 0===(i="function"==typeof(t=c)?t.call(o,n,o,r):t)||(r.exports=i)}).call(this,a("_process"),void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{_process:43}],41:[function(e,t,n){n.read=function(e,t,n,a,i){var r,o,s=8*i-a-1,c=(1<<s)-1,d=c>>1,l=-7,u=n?i-1:0,f=n?-1:1,p=e[t+u];for(u+=f,r=p&(1<<-l)-1,p>>=-l,l+=s;l>0;r=256*r+e[t+u],u+=f,l-=8);for(o=r&(1<<-l)-1,r>>=-l,l+=a;l>0;o=256*o+e[t+u],u+=f,l-=8);if(0===r)r=1-d;else{if(r===c)return o?NaN:1/0*(p?-1:1);o+=Math.pow(2,a),r-=d}return(p?-1:1)*o*Math.pow(2,r-a)},n.write=function(e,t,n,a,i,r){var o,s,c,d=8*r-i-1,l=(1<<d)-1,u=l>>1,f=23===i?Math.pow(2,-24)-Math.pow(2,-77):0,p=a?0:r-1,m=a?1:-1,_=t<0||0===t&&1/t<0?1:0;for(t=Math.abs(t),isNaN(t)||t===1/0?(s=isNaN(t)?1:0,o=l):(o=Math.floor(Math.log(t)/Math.LN2),t*(c=Math.pow(2,-o))<1&&(o--,c*=2),(t+=o+u>=1?f/c:f*Math.pow(2,1-u))*c>=2&&(o++,c/=2),o+u>=l?(s=0,o=l):o+u>=1?(s=(t*c-1)*Math.pow(2,i),o+=u):(s=t*Math.pow(2,u-1)*Math.pow(2,i),o=0));i>=8;e[n+p]=255&s,p+=m,s/=256,i-=8);for(o=o<<i|s,d+=i;d>0;e[n+p]=255&o,p+=m,o/=256,d-=8);e[n+p-m]|=128*_}},{}],42:[function(e,t,n){e("whatwg-fetch"),t.exports=self.fetch.bind(self)},{"whatwg-fetch":45}],43:[function(e,t,n){var a,i,r=t.exports={};function o(){throw new Error("setTimeout has not been defined")}function s(){throw new Error("clearTimeout has not been defined")}function c(e){if(a===setTimeout)return setTimeout(e,0);if((a===o||!a)&&setTimeout)return a=setTimeout,setTimeout(e,0);try{return a(e,0)}catch(t){try{return a.call(null,e,0)}catch(t){return a.call(this,e,0)}}}!function(){try{a="function"==typeof setTimeout?setTimeout:o}catch(e){a=o}try{i="function"==typeof clearTimeout?clearTimeout:s}catch(e){i=s}}();var d,l=[],u=!1,f=-1;function p(){u&&d&&(u=!1,d.length?l=d.concat(l):f=-1,l.length&&m())}function m(){if(!u){var e=c(p);u=!0;for(var t=l.length;t;){for(d=l,l=[];++f<t;)d&&d[f].run();f=-1,t=l.length}d=null,u=!1,function(e){if(i===clearTimeout)return clearTimeout(e);if((i===s||!i)&&clearTimeout)return i=clearTimeout,clearTimeout(e);try{i(e)}catch(t){try{return i.call(null,e)}catch(t){return i.call(this,e)}}}(e)}}function _(e,t){this.fun=e,this.array=t}function h(){}r.nextTick=function(e){var t=new Array(arguments.length-1);if(arguments.length>1)for(var n=1;n<arguments.length;n++)t[n-1]=arguments[n];l.push(new _(e,t)),1!==l.length||u||c(m)},_.prototype.run=function(){this.fun.apply(null,this.array)},r.title="browser",r.browser=!0,r.env={},r.argv=[],r.version="",r.versions={},r.on=h,r.addListener=h,r.once=h,r.off=h,r.removeListener=h,r.removeAllListeners=h,r.emit=h,r.prependListener=h,r.prependOnceListener=h,r.listeners=function(e){return[]},r.binding=function(e){throw new Error("process.binding is not supported")},r.cwd=function(){return"/"},r.chdir=function(e){throw new Error("process.chdir is not supported")},r.umask=function(){return 0}},{}],44:[function(t,n,r){(function(e){var t,o,s,c,d,l,u,f,p,m,_,h,b,g,v,y,S,D,I;!function(x){var C="object"==typeof e?e:"object"==typeof self?self:"object"==typeof this?this:{};function O(e,t){return e!==C&&("function"==typeof Object.create?Object.defineProperty(e,"__esModule",{value:!0}):e.__esModule=!0),function(n,a){return e[n]=t?t(n,a):a}}i=function(e){var n,a;n=O(C,O(e)),a=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var n in t)t.hasOwnProperty(n)&&(e[n]=t[n])},t=function(e,t){function n(){this.constructor=e}a(e,t),e.prototype=null===t?Object.create(t):(n.prototype=t.prototype,new n)},o=Object.assign||function(e){for(var t,n=1,a=arguments.length;n<a;n++)for(var i in t=arguments[n])Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i]);return e},s=function(e,t){var n={};for(var a in e)Object.prototype.hasOwnProperty.call(e,a)&&t.indexOf(a)<0&&(n[a]=e[a]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(a=Object.getOwnPropertySymbols(e);i<a.length;i++)t.indexOf(a[i])<0&&(n[a[i]]=e[a[i]])}return n},c=function(e,t,n,a){var i,r=arguments.length,o=r<3?t:null===a?a=Object.getOwnPropertyDescriptor(t,n):a;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)o=Reflect.decorate(e,t,n,a);else for(var s=e.length-1;s>=0;s--)(i=e[s])&&(o=(r<3?i(o):r>3?i(t,n,o):i(t,n))||o);return r>3&&o&&Object.defineProperty(t,n,o),o},d=function(e,t){return function(n,a){t(n,a,e)}},l=function(e,t){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(e,t)},u=function(e,t,n,a){return new(n||(n=Promise))(function(i,r){function o(e){try{c(a.next(e))}catch(e){r(e)}}function s(e){try{c(a.throw(e))}catch(e){r(e)}}function c(e){e.done?i(e.value):new n(function(t){t(e.value)}).then(o,s)}c((a=a.apply(e,t||[])).next())})},f=function(e,t){var n,a,i,r,o={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return r={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function s(r){return function(s){return function(r){if(n)throw new TypeError("Generator is already executing.");for(;o;)try{if(n=1,a&&(i=2&r[0]?a.return:r[0]?a.throw||((i=a.return)&&i.call(a),0):a.next)&&!(i=i.call(a,r[1])).done)return i;switch(a=0,i&&(r=[2&r[0],i.value]),r[0]){case 0:case 1:i=r;break;case 4:return o.label++,{value:r[1],done:!1};case 5:o.label++,a=r[1],r=[0];continue;case 7:r=o.ops.pop(),o.trys.pop();continue;default:if(!((i=(i=o.trys).length>0&&i[i.length-1])||6!==r[0]&&2!==r[0])){o=0;continue}if(3===r[0]&&(!i||r[1]>i[0]&&r[1]<i[3])){o.label=r[1];break}if(6===r[0]&&o.label<i[1]){o.label=i[1],i=r;break}if(i&&o.label<i[2]){o.label=i[2],o.ops.push(r);break}i[2]&&o.ops.pop(),o.trys.pop();continue}r=t.call(e,o)}catch(e){r=[6,e],a=0}finally{n=i=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,s])}}},p=function(e,t){for(var n in e)t.hasOwnProperty(n)||(t[n]=e[n])},m=function(e){var t="function"==typeof Symbol&&e[Symbol.iterator],n=0;return t?t.call(e):{next:function(){return e&&n>=e.length&&(e=void 0),{value:e&&e[n++],done:!e}}}},_=function(e,t){var n="function"==typeof Symbol&&e[Symbol.iterator];if(!n)return e;var a,i,r=n.call(e),o=[];try{for(;(void 0===t||t-- >0)&&!(a=r.next()).done;)o.push(a.value)}catch(e){i={error:e}}finally{try{a&&!a.done&&(n=r.return)&&n.call(r)}finally{if(i)throw i.error}}return o},h=function(){for(var e=[],t=0;t<arguments.length;t++)e=e.concat(_(arguments[t]));return e},b=function(e){return this instanceof b?(this.v=e,this):new b(e)},g=function(e,t,n){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var a,i=n.apply(e,t||[]),r=[];return a={},o("next"),o("throw"),o("return"),a[Symbol.asyncIterator]=function(){return this},a;function o(e){i[e]&&(a[e]=function(t){return new Promise(function(n,a){r.push([e,t,n,a])>1||s(e,t)})})}function s(e,t){try{(n=i[e](t)).value instanceof b?Promise.resolve(n.value.v).then(c,d):l(r[0][2],n)}catch(e){l(r[0][3],e)}var n}function c(e){s("next",e)}function d(e){s("throw",e)}function l(e,t){e(t),r.shift(),r.length&&s(r[0][0],r[0][1])}},v=function(e){var t,n;return t={},a("next"),a("throw",function(e){throw e}),a("return"),t[Symbol.iterator]=function(){return this},t;function a(a,i){t[a]=e[a]?function(t){return(n=!n)?{value:b(e[a](t)),done:"return"===a}:i?i(t):t}:i}},y=function(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,n=e[Symbol.asyncIterator];return n?n.call(e):(e=m(e),t={},a("next"),a("throw"),a("return"),t[Symbol.asyncIterator]=function(){return this},t);function a(n){t[n]=e[n]&&function(t){return new Promise(function(a,i){!function(e,t,n,a){Promise.resolve(a).then(function(t){e({value:t,done:n})},t)}(a,i,(t=e[n](t)).done,t.value)})}}},S=function(e,t){return Object.defineProperty?Object.defineProperty(e,"raw",{value:t}):e.raw=t,e},D=function(e){if(e&&e.__esModule)return e;var t={};if(null!=e)for(var n in e)Object.hasOwnProperty.call(e,n)&&(t[n]=e[n]);return t.default=e,t},I=function(e){return e&&e.__esModule?e:{default:e}},n("__extends",t),n("__assign",o),n("__rest",s),n("__decorate",c),n("__param",d),n("__metadata",l),n("__awaiter",u),n("__generator",f),n("__exportStar",p),n("__values",m),n("__read",_),n("__spread",h),n("__await",b),n("__asyncGenerator",g),n("__asyncDelegator",v),n("__asyncValues",y),n("__makeTemplateObject",S),n("__importStar",D),n("__importDefault",I)}.apply(r,a=[r]),void 0===i||(n.exports=i)}()}).call(this,void 0!==e?e:"undefined"!=typeof self?self:"undefined"!=typeof window?window:{})},{}],45:[function(e,n,r){var o;o=function(e){"use strict";var t="undefined"!=typeof globalThis&&globalThis||"undefined"!=typeof self&&self||void 0!==t&&t,n="URLSearchParams"in t,a="Symbol"in t&&"iterator"in Symbol,i="FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(e){return!1}}(),r="FormData"in t,o="ArrayBuffer"in t;if(o)var s=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],c=ArrayBuffer.isView||function(e){return e&&s.indexOf(Object.prototype.toString.call(e))>-1};function d(e){if("string"!=typeof e&&(e=String(e)),/[^a-z0-9\-#$%&'*+.^_`|~!]/i.test(e)||""===e)throw new TypeError('Invalid character in header field name: "'+e+'"');return e.toLowerCase()}function l(e){return"string"!=typeof e&&(e=String(e)),e}function u(e){var t={next:function(){var t=e.shift();return{done:void 0===t,value:t}}};return a&&(t[Symbol.iterator]=function(){return t}),t}function f(e){this.map={},e instanceof f?e.forEach(function(e,t){this.append(t,e)},this):Array.isArray(e)?e.forEach(function(e){this.append(e[0],e[1])},this):e&&Object.getOwnPropertyNames(e).forEach(function(t){this.append(t,e[t])},this)}function p(e){if(e.bodyUsed)return Promise.reject(new TypeError("Already read"));e.bodyUsed=!0}function m(e){return new Promise(function(t,n){e.onload=function(){t(e.result)},e.onerror=function(){n(e.error)}})}function _(e){var t=new FileReader,n=m(t);return t.readAsArrayBuffer(e),n}function h(e){if(e.slice)return e.slice(0);var t=new Uint8Array(e.byteLength);return t.set(new Uint8Array(e)),t.buffer}function b(){return this.bodyUsed=!1,this._initBody=function(e){var t;this.bodyUsed=this.bodyUsed,this._bodyInit=e,e?"string"==typeof e?this._bodyText=e:i&&Blob.prototype.isPrototypeOf(e)?this._bodyBlob=e:r&&FormData.prototype.isPrototypeOf(e)?this._bodyFormData=e:n&&URLSearchParams.prototype.isPrototypeOf(e)?this._bodyText=e.toString():o&&i&&(t=e)&&DataView.prototype.isPrototypeOf(t)?(this._bodyArrayBuffer=h(e.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer])):o&&(ArrayBuffer.prototype.isPrototypeOf(e)||c(e))?this._bodyArrayBuffer=h(e):this._bodyText=e=Object.prototype.toString.call(e):this._bodyText="",this.headers.get("content-type")||("string"==typeof e?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):n&&URLSearchParams.prototype.isPrototypeOf(e)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},i&&(this.blob=function(){var e=p(this);if(e)return e;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?p(this)||(ArrayBuffer.isView(this._bodyArrayBuffer)?Promise.resolve(this._bodyArrayBuffer.buffer.slice(this._bodyArrayBuffer.byteOffset,this._bodyArrayBuffer.byteOffset+this._bodyArrayBuffer.byteLength)):Promise.resolve(this._bodyArrayBuffer)):this.blob().then(_)}),this.text=function(){var e,t,n,a=p(this);if(a)return a;if(this._bodyBlob)return e=this._bodyBlob,n=m(t=new FileReader),t.readAsText(e),n;if(this._bodyArrayBuffer)return Promise.resolve(function(e){for(var t=new Uint8Array(e),n=new Array(t.length),a=0;a<t.length;a++)n[a]=String.fromCharCode(t[a]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},r&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}f.prototype.append=function(e,t){e=d(e),t=l(t);var n=this.map[e];this.map[e]=n?n+", "+t:t},f.prototype.delete=function(e){delete this.map[d(e)]},f.prototype.get=function(e){return e=d(e),this.has(e)?this.map[e]:null},f.prototype.has=function(e){return this.map.hasOwnProperty(d(e))},f.prototype.set=function(e,t){this.map[d(e)]=l(t)},f.prototype.forEach=function(e,t){for(var n in this.map)this.map.hasOwnProperty(n)&&e.call(t,this.map[n],n,this)},f.prototype.keys=function(){var e=[];return this.forEach(function(t,n){e.push(n)}),u(e)},f.prototype.values=function(){var e=[];return this.forEach(function(t){e.push(t)}),u(e)},f.prototype.entries=function(){var e=[];return this.forEach(function(t,n){e.push([n,t])}),u(e)},a&&(f.prototype[Symbol.iterator]=f.prototype.entries);var g=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];function v(e,t){if(!(this instanceof v))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');var n,a,i=(t=t||{}).body;if(e instanceof v){if(e.bodyUsed)throw new TypeError("Already read");this.url=e.url,this.credentials=e.credentials,t.headers||(this.headers=new f(e.headers)),this.method=e.method,this.mode=e.mode,this.signal=e.signal,i||null==e._bodyInit||(i=e._bodyInit,e.bodyUsed=!0)}else this.url=String(e);if(this.credentials=t.credentials||this.credentials||"same-origin",!t.headers&&this.headers||(this.headers=new f(t.headers)),this.method=(a=(n=t.method||this.method||"GET").toUpperCase(),g.indexOf(a)>-1?a:n),this.mode=t.mode||this.mode||null,this.signal=t.signal||this.signal,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&i)throw new TypeError("Body not allowed for GET or HEAD requests");if(this._initBody(i),!("GET"!==this.method&&"HEAD"!==this.method||"no-store"!==t.cache&&"no-cache"!==t.cache)){var r=/([?&])_=[^&]*/;r.test(this.url)?this.url=this.url.replace(r,"$1_="+(new Date).getTime()):this.url+=(/\?/.test(this.url)?"&":"?")+"_="+(new Date).getTime()}}function y(e){var t=new FormData;return e.trim().split("&").forEach(function(e){if(e){var n=e.split("="),a=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");t.append(decodeURIComponent(a),decodeURIComponent(i))}}),t}function S(e,t){if(!(this instanceof S))throw new TypeError('Please use the "new" operator, this DOM object constructor cannot be called as a function.');t||(t={}),this.type="default",this.status=void 0===t.status?200:t.status,this.ok=this.status>=200&&this.status<300,this.statusText=void 0===t.statusText?"":""+t.statusText,this.headers=new f(t.headers),this.url=t.url||"",this._initBody(e)}v.prototype.clone=function(){return new v(this,{body:this._bodyInit})},b.call(v.prototype),b.call(S.prototype),S.prototype.clone=function(){return new S(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new f(this.headers),url:this.url})},S.error=function(){var e=new S(null,{status:0,statusText:""});return e.type="error",e};var D=[301,302,303,307,308];S.redirect=function(e,t){if(-1===D.indexOf(t))throw new RangeError("Invalid status code");return new S(null,{status:t,headers:{location:e}})},e.DOMException=t.DOMException;try{new e.DOMException}catch(t){e.DOMException=function(e,t){this.message=e,this.name=t;var n=Error(e);this.stack=n.stack},e.DOMException.prototype=Object.create(Error.prototype),e.DOMException.prototype.constructor=e.DOMException}function I(n,a){return new Promise(function(r,s){var c=new v(n,a);if(c.signal&&c.signal.aborted)return s(new e.DOMException("Aborted","AbortError"));var d=new XMLHttpRequest;function u(){d.abort()}d.onload=function(){var e,t,n={status:d.status,statusText:d.statusText,headers:(e=d.getAllResponseHeaders()||"",t=new f,e.replace(/\r?\n[\t ]+/g," ").split("\r").map(function(e){return 0===e.indexOf("\n")?e.substr(1,e.length):e}).forEach(function(e){var n=e.split(":"),a=n.shift().trim();if(a){var i=n.join(":").trim();t.append(a,i)}}),t)};n.url="responseURL"in d?d.responseURL:n.headers.get("X-Request-URL");var a="response"in d?d.response:d.responseText;setTimeout(function(){r(new S(a,n))},0)},d.onerror=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},d.ontimeout=function(){setTimeout(function(){s(new TypeError("Network request failed"))},0)},d.onabort=function(){setTimeout(function(){s(new e.DOMException("Aborted","AbortError"))},0)},d.open(c.method,function(e){try{return""===e&&t.location.href?t.location.href:e}catch(t){return e}}(c.url),!0),"include"===c.credentials?d.withCredentials=!0:"omit"===c.credentials&&(d.withCredentials=!1),"responseType"in d&&(i?d.responseType="blob":o&&c.headers.get("Content-Type")&&-1!==c.headers.get("Content-Type").indexOf("application/octet-stream")&&(d.responseType="arraybuffer")),!a||"object"!=typeof a.headers||a.headers instanceof f?c.headers.forEach(function(e,t){d.setRequestHeader(t,e)}):Object.getOwnPropertyNames(a.headers).forEach(function(e){d.setRequestHeader(e,l(a.headers[e]))}),c.signal&&(c.signal.addEventListener("abort",u),d.onreadystatechange=function(){4===d.readyState&&c.signal.removeEventListener("abort",u)}),d.send(void 0===c._bodyInit?null:c._bodyInit)})}I.polyfill=!0,t.fetch||(t.fetch=I,t.Headers=f,t.Request=v,t.Response=S),e.Headers=f,e.Request=v,e.Response=S,e.fetch=I,Object.defineProperty(e,"__esModule",{value:!0})},"object"==typeof r&&void 0!==n?o(r):(a=[r],void 0===(i="function"==typeof(t=o)?t.apply(r,a):t)||(n.exports=i))},{}]},{},[2,1])}).call(this,n("gKUM"))},gKUM:function(e,t){var n;n=function(){return this}();try{n=n||new Function("return this")()}catch(e){"object"==typeof window&&(n=window)}e.exports=n}}]);
@@ -0,0 +1,185 @@
1
+ /**
2
+ * Microsoft Graph communication layer for the SharePoint Framework
3
+ *
4
+ * @remarks
5
+ * This package defines the base communication layer between Microsoft Graph and
6
+ * the SharePoint Framework.
7
+ *
8
+ * @packagedocumentation
9
+ */
10
+
11
+ import { Client } from '@ms/ms-graph-v3-bundle';
12
+ import type { ClientOptions } from '@ms/ms-graph-v3-bundle';
13
+ import type { GraphRequest as GraphRequest_2 } from '@ms/ms-graph-v3-bundle';
14
+ import type { GraphRequestCallback } from '@microsoft/microsoft-graph-clientv1';
15
+ import type { Options } from '@microsoft/microsoft-graph-clientv1';
16
+ import type { Options as Options_2 } from '@ms/ms-graph-v3-bundle';
17
+ import { ServiceKey } from '@microsoft/sp-core-library';
18
+ import { ServiceScope } from '@microsoft/sp-core-library';
19
+ import type { URLComponents } from '@microsoft/microsoft-graph-clientv1';
20
+
21
+ /**
22
+ * Typings for the GraphRequest Object
23
+ * For more information: {@link https://github.com/microsoftgraph/msgraph-sdk-javascript}
24
+ *
25
+ * @privateRemarks
26
+ * The original typings include references to polyfills.
27
+ * Exporting the microsoft-graph-client defined class may add unnecessary code to the build.
28
+ * Thefore, we export this interface as `GraphRequest` with the desired API described.
29
+ *
30
+ * @public
31
+ */
32
+ export declare interface GraphRequest {
33
+ config: Options;
34
+ urlComponents: URLComponents;
35
+ _headers: {
36
+ [key: string]: string | number;
37
+ };
38
+ _responseType: string;
39
+ constructor(config: Options, path: string): GraphRequest;
40
+ header(headerKey: string, headerValue: string): this;
41
+ headers(headers: {
42
+ [key: string]: string | number;
43
+ }): this;
44
+ parsePath(rawPath: string): void;
45
+ buildFullUrl(): string;
46
+ version(v: string): GraphRequest;
47
+ select(properties: string | string[]): GraphRequest;
48
+ expand(properties: string | string[]): GraphRequest;
49
+ orderby(properties: string | string[]): GraphRequest;
50
+ filter(filterStr: string): GraphRequest;
51
+ top(n: number): GraphRequest;
52
+ skip(n: number): GraphRequest;
53
+ skipToken(token: string): GraphRequest;
54
+ count(count: boolean): GraphRequest;
55
+ responseType(responseType: string): GraphRequest;
56
+ delete(callback?: GraphRequestCallback): Promise<any>;
57
+ patch(content: any, callback?: GraphRequestCallback): Promise<any>;
58
+ post(content: any, callback?: GraphRequestCallback): Promise<any>;
59
+ put(content: any, callback?: GraphRequestCallback): Promise<any>;
60
+ create(content: any, callback?: GraphRequestCallback): Promise<any>;
61
+ update(content: any, callback?: GraphRequestCallback): Promise<any>;
62
+ del(callback?: GraphRequestCallback): Promise<any>;
63
+ get(callback?: GraphRequestCallback): Promise<any>;
64
+ getStream(callback: GraphRequestCallback): void;
65
+ putStream(stream: any, callback: GraphRequestCallback): void;
66
+ query(queryDictionaryOrString: string | {
67
+ [key: string]: string | number;
68
+ }): GraphRequest;
69
+ }
70
+
71
+ /**
72
+ * MSGraphClient is used to perform REST calls against Microsoft Graph.
73
+ *
74
+ * @remarks The Microsoft Graph JavaScript client library is a lightweight wrapper around the
75
+ * Microsoft Graph API. This class allows developers to start making REST calls to MSGraph without
76
+ * needing to initialize the the MSGraph client library. If a custom configuration is desired,
77
+ * the MSGraphClient api function needs to be provided with that custom configuration for
78
+ * every request.
79
+ *
80
+ * For more information: {@link https://github.com/microsoftgraph/msgraph-sdk-javascript}
81
+ *
82
+ * @public
83
+ */
84
+ export declare class MSGraphClient {
85
+ private static _instance;
86
+ private static _window;
87
+ private static _originalConfig;
88
+ private static _graphBaseUrl;
89
+ /* Excluded from this release type: __constructor */
90
+ /**
91
+ * All calls to Microsoft Graph are chained together starting with the api function.
92
+ *
93
+ * @remarks Path supports the following formats:
94
+ * * me
95
+ * * /me
96
+ * * https://graph.microsoft.com/v1.0/me
97
+ * * https://graph.microsoft.com/beta/me
98
+ * * me/events?$filter=startswith(subject, 'ship')
99
+ *
100
+ * The authProvider and baseUrl option should not be used, as they have already been
101
+ * provided by the framework. See the official documentation here:
102
+ * https://github.com/microsoftgraph/msgraph-sdk-javascript
103
+ *
104
+ * @param path - The path for the request to MSGraph.
105
+ * @param config - Sets the configuration for this request.
106
+ */
107
+ api(path: string, config?: Options): GraphRequest;
108
+ private _createGraphClientInstance;
109
+ private _getOAuthToken;
110
+ }
111
+
112
+ /**
113
+ * Returns a preinitialized version of the MSGraphClient.
114
+ * For more information: {@link https://docs.microsoft.com/en-us/sharepoint/dev/spfx/use-msgraph}
115
+ *
116
+ * @public
117
+ */
118
+ export declare class MSGraphClientFactory {
119
+ /**
120
+ * The service key for MSGraphClientFactory.
121
+ */
122
+ static readonly serviceKey: ServiceKey<MSGraphClientFactory>;
123
+ private _serviceScope;
124
+ /* Excluded from this release type: __constructor */
125
+ /* Excluded from this release type: getClient */
126
+ /**
127
+ * Returns an instance of version 3 the MSGraphClient V3 that communicates with the current tenant's configurable
128
+ * Service Principal.
129
+ *
130
+ */
131
+ getClient(version: '3'): Promise<MSGraphClientV3>;
132
+ /**
133
+ * Returns an instance of the MSGraphClient that communicates with the current tenant's configurable Service Pricipal.
134
+ * Allows to specify custom middleware options.
135
+ *
136
+ * @param version - The version of the Graph API to use. 3.
137
+ * @param options - Client options for the Graph API.
138
+ */
139
+ getClientWithMiddleware(version: '3', options: ClientOptions): Promise<MSGraphClientV3>;
140
+ }
141
+
142
+ /**
143
+ * MSGraphClient is used to perform REST calls against Microsoft Graph.
144
+ *
145
+ * @remarks The Microsoft Graph JavaScript client library is a lightweight wrapper around the
146
+ * Microsoft Graph API. This class allows developers to start making REST calls to MSGraph without
147
+ * needing to initialize the the MSGraph client library. If a custom configuration is desired,
148
+ * the MSGraphClient api function needs to be provided with that custom configuration for
149
+ * every request.
150
+ *
151
+ * For more information: {@link https://github.com/microsoftgraph/msgraph-sdk-javascript}
152
+ *
153
+ * @public
154
+ */
155
+ export declare class MSGraphClientV3 {
156
+ private static _instance;
157
+ private static _graphBaseUrl;
158
+ /* Excluded from this release type: __constructor */
159
+ /**
160
+ * All calls to Microsoft Graph are chained together starting with the api function.
161
+ *
162
+ * @remarks Path supports the following formats:
163
+ * * me
164
+ * * /me
165
+ * * https://graph.microsoft.com/v1.0/me
166
+ * * https://graph.microsoft.com/beta/me
167
+ * * me/events?$filter=startswith(subject, 'ship')
168
+ *
169
+ * The authProvider and baseUrl option should not be used, as they have already been
170
+ * provided by the framework. See the official documentation here:
171
+ * https://github.com/microsoftgraph/msgraph-sdk-javascript
172
+ *
173
+ * @param path - The path for the request to MSGraph.
174
+ */
175
+ api(path: string): GraphRequest_2;
176
+ /**
177
+ * Gets the instance of the instantiated Client object from Microsoft Graph SDK.
178
+ */
179
+ get client(): Client;
180
+ private _createGraphClientInstance;
181
+ private _createGraphClientInstanceWithMiddleware;
182
+ private _getOAuthToken;
183
+ }
184
+
185
+ export { }