@eluvio/elv-client-js 4.0.81 → 4.0.82

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.
@@ -1839,7 +1839,7 @@ exports.ContentObjectVersions = /*#__PURE__*/function () {
1839
1839
  }();
1840
1840
 
1841
1841
  /**
1842
- * Retrieve the version hash of the latest version of the specified object
1842
+ * Retrieve the version hash of the latest version of the specified object from chain
1843
1843
  *
1844
1844
  * @methodGroup Content Objects
1845
1845
  * @namedParams
@@ -1918,6 +1918,70 @@ exports.LatestVersionHash = /*#__PURE__*/function () {
1918
1918
  };
1919
1919
  }();
1920
1920
 
1921
+ /**
1922
+ * Retrieve the version hash of the latest version of the specified object via fabric API.
1923
+ * Requires authorization.
1924
+ *
1925
+ * @methodGroup Content Objects
1926
+ * @namedParams
1927
+ * @param {string=} objectId - ID of the object
1928
+ * @param {string=} versionHash - Version hash of the object
1929
+ *
1930
+ * @returns {Promise<string>} - The latest version hash of the object
1931
+ */
1932
+ exports.LatestVersionHashV2 = /*#__PURE__*/function () {
1933
+ var _ref49 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28(_ref48) {
1934
+ var objectId, versionHash, latestHash, path, q;
1935
+ return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1936
+ while (1) switch (_context28.prev = _context28.next) {
1937
+ case 0:
1938
+ objectId = _ref48.objectId, versionHash = _ref48.versionHash;
1939
+ if (versionHash) {
1940
+ objectId = this.utils.DecodeVersionHash(versionHash).objectId;
1941
+ }
1942
+ ValidateObject(objectId);
1943
+ _context28.prev = 3;
1944
+ path = UrlJoin("q", objectId);
1945
+ _context28.t0 = this.utils;
1946
+ _context28.t1 = this.HttpClient;
1947
+ _context28.next = 9;
1948
+ return this.authClient.AuthorizationHeader({
1949
+ objectId: objectId
1950
+ });
1951
+ case 9:
1952
+ _context28.t2 = _context28.sent;
1953
+ _context28.t3 = path;
1954
+ _context28.t4 = {
1955
+ headers: _context28.t2,
1956
+ method: "GET",
1957
+ path: _context28.t3
1958
+ };
1959
+ _context28.t5 = _context28.t1.Request.call(_context28.t1, _context28.t4);
1960
+ _context28.next = 15;
1961
+ return _context28.t0.ResponseToJson.call(_context28.t0, _context28.t5);
1962
+ case 15:
1963
+ q = _context28.sent;
1964
+ latestHash = q.hash;
1965
+ _context28.next = 23;
1966
+ break;
1967
+ case 19:
1968
+ _context28.prev = 19;
1969
+ _context28.t6 = _context28["catch"](3);
1970
+ console.log("ERROR", _context28.t6);
1971
+ throw Error("Unable to determine latest version hash for ".concat(versionHash || objectId));
1972
+ case 23:
1973
+ return _context28.abrupt("return", latestHash);
1974
+ case 24:
1975
+ case "end":
1976
+ return _context28.stop();
1977
+ }
1978
+ }, _callee28, this, [[3, 19]]);
1979
+ }));
1980
+ return function (_x29) {
1981
+ return _ref49.apply(this, arguments);
1982
+ };
1983
+ }();
1984
+
1921
1985
  /* URL Methods */
1922
1986
 
1923
1987
  /**
@@ -1926,17 +1990,17 @@ exports.LatestVersionHash = /*#__PURE__*/function () {
1926
1990
  * @methodGroup Media
1927
1991
  * @return {Promise<Array<string>>}
1928
1992
  */
1929
- exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee28() {
1993
+ exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29() {
1930
1994
  var availableDRMs, info, version, major, minor, _version, _major, _minor, config;
1931
- return _regeneratorRuntime.wrap(function _callee28$(_context28) {
1932
- while (1) switch (_context28.prev = _context28.next) {
1995
+ return _regeneratorRuntime.wrap(function _callee29$(_context29) {
1996
+ while (1) switch (_context29.prev = _context29.next) {
1933
1997
  case 0:
1934
1998
  availableDRMs = ["clear", "aes-128"];
1935
1999
  if (!(typeof window === "undefined")) {
1936
- _context28.next = 3;
2000
+ _context29.next = 3;
1937
2001
  break;
1938
2002
  }
1939
- return _context28.abrupt("return", availableDRMs);
2003
+ return _context29.abrupt("return", availableDRMs);
1940
2004
  case 3:
1941
2005
  // Detect iOS > 13.1 or Safari > 13.1 and replace aes-128 with sample-aes
1942
2006
  if (window.navigator && window.navigator.userAgent) {
@@ -1966,12 +2030,12 @@ exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
1966
2030
  }
1967
2031
  }
1968
2032
  if (!(typeof window !== "undefined" && typeof window.navigator.requestMediaKeySystemAccess !== "function")) {
1969
- _context28.next = 6;
2033
+ _context29.next = 6;
1970
2034
  break;
1971
2035
  }
1972
- return _context28.abrupt("return", availableDRMs);
2036
+ return _context29.abrupt("return", availableDRMs);
1973
2037
  case 6:
1974
- _context28.prev = 6;
2038
+ _context29.prev = 6;
1975
2039
  config = [{
1976
2040
  initDataTypes: ["cenc"],
1977
2041
  audioCapabilities: [{
@@ -1981,59 +2045,59 @@ exports.AvailableDRMs = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regenerato
1981
2045
  contentType: "video/mp4;codecs=\"avc1.42E01E\""
1982
2046
  }]
1983
2047
  }];
1984
- _context28.next = 10;
2048
+ _context29.next = 10;
1985
2049
  return navigator.requestMediaKeySystemAccess("com.widevine.alpha", config);
1986
2050
  case 10:
1987
2051
  availableDRMs.push("widevine");
1988
2052
  // eslint-disable-next-line no-empty
1989
- _context28.next = 15;
2053
+ _context29.next = 15;
1990
2054
  break;
1991
2055
  case 13:
1992
- _context28.prev = 13;
1993
- _context28.t0 = _context28["catch"](6);
2056
+ _context29.prev = 13;
2057
+ _context29.t0 = _context29["catch"](6);
1994
2058
  case 15:
1995
- return _context28.abrupt("return", availableDRMs);
2059
+ return _context29.abrupt("return", availableDRMs);
1996
2060
  case 16:
1997
2061
  case "end":
1998
- return _context28.stop();
2062
+ return _context29.stop();
1999
2063
  }
2000
- }, _callee28, null, [[6, 13]]);
2064
+ }, _callee29, null, [[6, 13]]);
2001
2065
  }));
2002
2066
  exports.PlayoutPathResolution = /*#__PURE__*/function () {
2003
- var _ref50 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee29(_ref49) {
2004
- var libraryId, objectId, versionHash, writeToken, linkPath, handler, _ref49$offering, offering, _ref49$signedLink, signedLink, authorizationToken, path, linkTargetLibraryId, linkTargetId, linkTargetHash, multiOfferingLink, linkInfo;
2005
- return _regeneratorRuntime.wrap(function _callee29$(_context29) {
2006
- while (1) switch (_context29.prev = _context29.next) {
2067
+ var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref51) {
2068
+ var libraryId, objectId, versionHash, writeToken, linkPath, handler, _ref51$offering, offering, _ref51$signedLink, signedLink, authorizationToken, path, linkTargetLibraryId, linkTargetId, linkTargetHash, multiOfferingLink, linkInfo;
2069
+ return _regeneratorRuntime.wrap(function _callee30$(_context30) {
2070
+ while (1) switch (_context30.prev = _context30.next) {
2007
2071
  case 0:
2008
- libraryId = _ref49.libraryId, objectId = _ref49.objectId, versionHash = _ref49.versionHash, writeToken = _ref49.writeToken, linkPath = _ref49.linkPath, handler = _ref49.handler, _ref49$offering = _ref49.offering, offering = _ref49$offering === void 0 ? "" : _ref49$offering, _ref49$signedLink = _ref49.signedLink, signedLink = _ref49$signedLink === void 0 ? false : _ref49$signedLink, authorizationToken = _ref49.authorizationToken;
2072
+ libraryId = _ref51.libraryId, objectId = _ref51.objectId, versionHash = _ref51.versionHash, writeToken = _ref51.writeToken, linkPath = _ref51.linkPath, handler = _ref51.handler, _ref51$offering = _ref51.offering, offering = _ref51$offering === void 0 ? "" : _ref51$offering, _ref51$signedLink = _ref51.signedLink, signedLink = _ref51$signedLink === void 0 ? false : _ref51$signedLink, authorizationToken = _ref51.authorizationToken;
2009
2073
  if (libraryId) {
2010
- _context29.next = 5;
2074
+ _context30.next = 5;
2011
2075
  break;
2012
2076
  }
2013
- _context29.next = 4;
2077
+ _context30.next = 4;
2014
2078
  return this.ContentObjectLibraryId({
2015
2079
  objectId: objectId
2016
2080
  });
2017
2081
  case 4:
2018
- libraryId = _context29.sent;
2082
+ libraryId = _context30.sent;
2019
2083
  case 5:
2020
2084
  if (versionHash) {
2021
- _context29.next = 9;
2085
+ _context30.next = 9;
2022
2086
  break;
2023
2087
  }
2024
- _context29.next = 8;
2088
+ _context30.next = 8;
2025
2089
  return this.LatestVersionHash({
2026
2090
  objectId: objectId
2027
2091
  });
2028
2092
  case 8:
2029
- versionHash = _context29.sent;
2093
+ versionHash = _context30.sent;
2030
2094
  case 9:
2031
2095
  path = UrlJoin("qlibs", libraryId, "q", writeToken || versionHash, "rep", handler, offering, "options.json");
2032
2096
  if (!linkPath) {
2033
- _context29.next = 26;
2097
+ _context30.next = 26;
2034
2098
  break;
2035
2099
  }
2036
- _context29.next = 13;
2100
+ _context30.next = 13;
2037
2101
  return this.ContentObjectMetadata({
2038
2102
  libraryId: libraryId,
2039
2103
  objectId: objectId,
@@ -2046,16 +2110,16 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2046
2110
  authorizationToken: authorizationToken
2047
2111
  });
2048
2112
  case 13:
2049
- linkInfo = _context29.sent;
2113
+ linkInfo = _context30.sent;
2050
2114
  multiOfferingLink = !!linkInfo && !!linkInfo["/"] && !linkInfo["/"].endsWith("options.json");
2051
2115
 
2052
2116
  // Default case: Use link path directly
2053
2117
  path = UrlJoin("qlibs", libraryId, "q", writeToken || versionHash, "meta", linkPath);
2054
2118
  if (signedLink) {
2055
- _context29.next = 25;
2119
+ _context30.next = 25;
2056
2120
  break;
2057
2121
  }
2058
- _context29.next = 19;
2122
+ _context30.next = 19;
2059
2123
  return this.LinkTarget({
2060
2124
  libraryId: libraryId,
2061
2125
  objectId: objectId,
@@ -2066,14 +2130,14 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2066
2130
  authorizationToken: authorizationToken
2067
2131
  });
2068
2132
  case 19:
2069
- linkTargetHash = _context29.sent;
2133
+ linkTargetHash = _context30.sent;
2070
2134
  linkTargetId = this.utils.DecodeVersionHash(linkTargetHash).objectId;
2071
- _context29.next = 23;
2135
+ _context30.next = 23;
2072
2136
  return this.ContentObjectLibraryId({
2073
2137
  objectId: linkTargetId
2074
2138
  });
2075
2139
  case 23:
2076
- linkTargetLibraryId = _context29.sent;
2140
+ linkTargetLibraryId = _context30.sent;
2077
2141
  if (!multiOfferingLink && !offering) {
2078
2142
  // If the offering is not specified, the intent is to get available offerings. For a single offering link, must
2079
2143
  // access available offerings on the object directly
@@ -2085,7 +2149,7 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2085
2149
  path = UrlJoin(path, offering, "options.json");
2086
2150
  }
2087
2151
  case 26:
2088
- return _context29.abrupt("return", {
2152
+ return _context30.abrupt("return", {
2089
2153
  path: path,
2090
2154
  multiOfferingLink: multiOfferingLink,
2091
2155
  linkTarget: {
@@ -2096,12 +2160,12 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2096
2160
  });
2097
2161
  case 27:
2098
2162
  case "end":
2099
- return _context29.stop();
2163
+ return _context30.stop();
2100
2164
  }
2101
- }, _callee29, this);
2165
+ }, _callee30, this);
2102
2166
  }));
2103
- return function (_x29) {
2104
- return _ref50.apply(this, arguments);
2167
+ return function (_x30) {
2168
+ return _ref52.apply(this, arguments);
2105
2169
  };
2106
2170
  }();
2107
2171
 
@@ -2121,44 +2185,44 @@ exports.PlayoutPathResolution = /*#__PURE__*/function () {
2121
2185
  * @return {Promise<Object>} - The available offerings
2122
2186
  */
2123
2187
  exports.AvailableOfferings = /*#__PURE__*/function () {
2124
- var _ref52 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee30(_ref51) {
2125
- var objectId, versionHash, writeToken, linkPath, signedLink, directLink, _ref51$handler, handler, authorizationToken, _yield$this$PlayoutPa, path, authorization;
2126
- return _regeneratorRuntime.wrap(function _callee30$(_context30) {
2127
- while (1) switch (_context30.prev = _context30.next) {
2188
+ var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31(_ref53) {
2189
+ var objectId, versionHash, writeToken, linkPath, signedLink, directLink, _ref53$handler, handler, authorizationToken, _yield$this$PlayoutPa, path, authorization;
2190
+ return _regeneratorRuntime.wrap(function _callee31$(_context31) {
2191
+ while (1) switch (_context31.prev = _context31.next) {
2128
2192
  case 0:
2129
- objectId = _ref51.objectId, versionHash = _ref51.versionHash, writeToken = _ref51.writeToken, linkPath = _ref51.linkPath, signedLink = _ref51.signedLink, directLink = _ref51.directLink, _ref51$handler = _ref51.handler, handler = _ref51$handler === void 0 ? "playout" : _ref51$handler, authorizationToken = _ref51.authorizationToken;
2193
+ objectId = _ref53.objectId, versionHash = _ref53.versionHash, writeToken = _ref53.writeToken, linkPath = _ref53.linkPath, signedLink = _ref53.signedLink, directLink = _ref53.directLink, _ref53$handler = _ref53.handler, handler = _ref53$handler === void 0 ? "playout" : _ref53$handler, authorizationToken = _ref53.authorizationToken;
2130
2194
  if (!objectId) {
2131
2195
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2132
2196
  }
2133
2197
  if (!directLink) {
2134
- _context30.next = 15;
2198
+ _context31.next = 15;
2135
2199
  break;
2136
2200
  }
2137
- _context30.t0 = this;
2138
- _context30.next = 6;
2201
+ _context31.t0 = this;
2202
+ _context31.next = 6;
2139
2203
  return this.ContentObjectLibraryId({
2140
2204
  objectId: objectId
2141
2205
  });
2142
2206
  case 6:
2143
- _context30.t1 = _context30.sent;
2144
- _context30.t2 = objectId;
2145
- _context30.t3 = versionHash;
2146
- _context30.t4 = linkPath;
2147
- _context30.t5 = authorizationToken;
2148
- _context30.t6 = {
2149
- libraryId: _context30.t1,
2150
- objectId: _context30.t2,
2151
- versionHash: _context30.t3,
2152
- metadataSubtree: _context30.t4,
2207
+ _context31.t1 = _context31.sent;
2208
+ _context31.t2 = objectId;
2209
+ _context31.t3 = versionHash;
2210
+ _context31.t4 = linkPath;
2211
+ _context31.t5 = authorizationToken;
2212
+ _context31.t6 = {
2213
+ libraryId: _context31.t1,
2214
+ objectId: _context31.t2,
2215
+ versionHash: _context31.t3,
2216
+ metadataSubtree: _context31.t4,
2153
2217
  resolveLinks: true,
2154
- authorizationToken: _context30.t5
2218
+ authorizationToken: _context31.t5
2155
2219
  };
2156
- _context30.next = 14;
2157
- return _context30.t0.ContentObjectMetadata.call(_context30.t0, _context30.t6);
2220
+ _context31.next = 14;
2221
+ return _context31.t0.ContentObjectMetadata.call(_context31.t0, _context31.t6);
2158
2222
  case 14:
2159
- return _context30.abrupt("return", _context30.sent);
2223
+ return _context31.abrupt("return", _context31.sent);
2160
2224
  case 15:
2161
- _context30.next = 17;
2225
+ _context31.next = 17;
2162
2226
  return this.PlayoutPathResolution({
2163
2227
  objectId: objectId,
2164
2228
  versionHash: versionHash,
@@ -2169,22 +2233,22 @@ exports.AvailableOfferings = /*#__PURE__*/function () {
2169
2233
  authorizationToken: authorizationToken
2170
2234
  });
2171
2235
  case 17:
2172
- _yield$this$PlayoutPa = _context30.sent;
2236
+ _yield$this$PlayoutPa = _context31.sent;
2173
2237
  path = _yield$this$PlayoutPa.path;
2174
- _context30.prev = 19;
2175
- _context30.t7 = authorizationToken;
2176
- _context30.next = 23;
2238
+ _context31.prev = 19;
2239
+ _context31.t7 = authorizationToken;
2240
+ _context31.next = 23;
2177
2241
  return this.authClient.AuthorizationToken({
2178
2242
  objectId: objectId,
2179
2243
  channelAuth: true,
2180
2244
  oauthToken: this.oauthToken
2181
2245
  });
2182
2246
  case 23:
2183
- _context30.t8 = _context30.sent;
2184
- authorization = [_context30.t7, _context30.t8].flat().filter(function (token) {
2247
+ _context31.t8 = _context31.sent;
2248
+ authorization = [_context31.t7, _context31.t8].flat().filter(function (token) {
2185
2249
  return token;
2186
2250
  });
2187
- _context30.next = 27;
2251
+ _context31.next = 27;
2188
2252
  return this.utils.ResponseToJson(this.HttpClient.Request({
2189
2253
  path: path,
2190
2254
  method: "GET",
@@ -2193,25 +2257,25 @@ exports.AvailableOfferings = /*#__PURE__*/function () {
2193
2257
  }
2194
2258
  }));
2195
2259
  case 27:
2196
- return _context30.abrupt("return", _context30.sent);
2260
+ return _context31.abrupt("return", _context31.sent);
2197
2261
  case 30:
2198
- _context30.prev = 30;
2199
- _context30.t9 = _context30["catch"](19);
2200
- if (!(_context30.t9.status && parseInt(_context30.t9.status) === 500)) {
2201
- _context30.next = 34;
2262
+ _context31.prev = 30;
2263
+ _context31.t9 = _context31["catch"](19);
2264
+ if (!(_context31.t9.status && parseInt(_context31.t9.status) === 500)) {
2265
+ _context31.next = 34;
2202
2266
  break;
2203
2267
  }
2204
- return _context30.abrupt("return", {});
2268
+ return _context31.abrupt("return", {});
2205
2269
  case 34:
2206
- throw _context30.t9;
2270
+ throw _context31.t9;
2207
2271
  case 35:
2208
2272
  case "end":
2209
- return _context30.stop();
2273
+ return _context31.stop();
2210
2274
  }
2211
- }, _callee30, this, [[19, 30]]);
2275
+ }, _callee31, this, [[19, 30]]);
2212
2276
  }));
2213
- return function (_x30) {
2214
- return _ref52.apply(this, arguments);
2277
+ return function (_x31) {
2278
+ return _ref54.apply(this, arguments);
2215
2279
  };
2216
2280
  }();
2217
2281
 
@@ -2244,15 +2308,15 @@ exports.AvailableOfferings = /*#__PURE__*/function () {
2244
2308
  * @param {Object=} options - Additional query parameters to pass when requesting available playout options, such as clipping parameters.
2245
2309
  */
2246
2310
  exports.PlayoutOptions = /*#__PURE__*/function () {
2247
- var _ref54 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(_ref53) {
2311
+ var _ref56 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref55) {
2248
2312
  var _this9 = this;
2249
- var offeringURI, objectId, versionHash, writeToken, linkPath, _ref53$signedLink, signedLink, _ref53$protocols, protocols, _ref53$handler, handler, _ref53$offering, offering, playoutType, _ref53$drms, drms, context, _ref53$hlsjsProfile, hlsjsProfile, authorizationToken, _ref53$options, options, uriInfo, libraryId, offeringPath, link, _yield$this$PlayoutPa2, path, linkTarget, audienceData, authorization, queryParams, playoutOptions, playoutMap, sessionId, multiview, i, option, protocol, drm, playoutPath, licenseServers, cert, method, certUrl, protocolMatch, drmMatch;
2250
- return _regeneratorRuntime.wrap(function _callee33$(_context33) {
2251
- while (1) switch (_context33.prev = _context33.next) {
2313
+ var offeringURI, objectId, versionHash, writeToken, linkPath, _ref55$signedLink, signedLink, _ref55$protocols, protocols, _ref55$handler, handler, _ref55$offering, offering, playoutType, _ref55$drms, drms, context, _ref55$hlsjsProfile, hlsjsProfile, authorizationToken, _ref55$options, options, uriInfo, libraryId, offeringPath, link, _yield$this$PlayoutPa2, path, linkTarget, audienceData, authorization, queryParams, playoutOptions, playoutMap, sessionId, multiview, i, option, protocol, drm, playoutPath, licenseServers, cert, method, certUrl, protocolMatch, drmMatch;
2314
+ return _regeneratorRuntime.wrap(function _callee34$(_context34) {
2315
+ while (1) switch (_context34.prev = _context34.next) {
2252
2316
  case 0:
2253
- offeringURI = _ref53.offeringURI, objectId = _ref53.objectId, versionHash = _ref53.versionHash, writeToken = _ref53.writeToken, linkPath = _ref53.linkPath, _ref53$signedLink = _ref53.signedLink, signedLink = _ref53$signedLink === void 0 ? false : _ref53$signedLink, _ref53$protocols = _ref53.protocols, protocols = _ref53$protocols === void 0 ? ["dash", "hls"] : _ref53$protocols, _ref53$handler = _ref53.handler, handler = _ref53$handler === void 0 ? "playout" : _ref53$handler, _ref53$offering = _ref53.offering, offering = _ref53$offering === void 0 ? "default" : _ref53$offering, playoutType = _ref53.playoutType, _ref53$drms = _ref53.drms, drms = _ref53$drms === void 0 ? [] : _ref53$drms, context = _ref53.context, _ref53$hlsjsProfile = _ref53.hlsjsProfile, hlsjsProfile = _ref53$hlsjsProfile === void 0 ? true : _ref53$hlsjsProfile, authorizationToken = _ref53.authorizationToken, _ref53$options = _ref53.options, options = _ref53$options === void 0 ? {} : _ref53$options;
2317
+ offeringURI = _ref55.offeringURI, objectId = _ref55.objectId, versionHash = _ref55.versionHash, writeToken = _ref55.writeToken, linkPath = _ref55.linkPath, _ref55$signedLink = _ref55.signedLink, signedLink = _ref55$signedLink === void 0 ? false : _ref55$signedLink, _ref55$protocols = _ref55.protocols, protocols = _ref55$protocols === void 0 ? ["dash", "hls"] : _ref55$protocols, _ref55$handler = _ref55.handler, handler = _ref55$handler === void 0 ? "playout" : _ref55$handler, _ref55$offering = _ref55.offering, offering = _ref55$offering === void 0 ? "default" : _ref55$offering, playoutType = _ref55.playoutType, _ref55$drms = _ref55.drms, drms = _ref55$drms === void 0 ? [] : _ref55$drms, context = _ref55.context, _ref55$hlsjsProfile = _ref55.hlsjsProfile, hlsjsProfile = _ref55$hlsjsProfile === void 0 ? true : _ref55$hlsjsProfile, authorizationToken = _ref55.authorizationToken, _ref55$options = _ref55.options, options = _ref55$options === void 0 ? {} : _ref55$options;
2254
2318
  if (!offeringURI) {
2255
- _context33.next = 8;
2319
+ _context34.next = 8;
2256
2320
  break;
2257
2321
  }
2258
2322
  uriInfo = offeringURI.match(/(hq__[^/]+)\/rep\/([^/]+)\/([^/]+)\/options.json/);
@@ -2260,7 +2324,7 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2260
2324
  handler = uriInfo[2];
2261
2325
  offering = uriInfo[3];
2262
2326
  if (!(!versionHash || !handler || !offering)) {
2263
- _context33.next = 8;
2327
+ _context34.next = 8;
2264
2328
  break;
2265
2329
  }
2266
2330
  throw Error("Invalid offering URI: ".concat(offeringURI));
@@ -2273,37 +2337,37 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2273
2337
  return d.toLowerCase();
2274
2338
  });
2275
2339
  if (objectId) {
2276
- _context33.next = 15;
2340
+ _context34.next = 15;
2277
2341
  break;
2278
2342
  }
2279
2343
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2280
- _context33.next = 19;
2344
+ _context34.next = 19;
2281
2345
  break;
2282
2346
  case 15:
2283
2347
  if (versionHash) {
2284
- _context33.next = 19;
2348
+ _context34.next = 19;
2285
2349
  break;
2286
2350
  }
2287
- _context33.next = 18;
2351
+ _context34.next = 18;
2288
2352
  return this.LatestVersionHash({
2289
2353
  objectId: objectId
2290
2354
  });
2291
2355
  case 18:
2292
- versionHash = _context33.sent;
2356
+ versionHash = _context34.sent;
2293
2357
  case 19:
2294
- _context33.next = 21;
2358
+ _context34.next = 21;
2295
2359
  return this.ContentObjectLibraryId({
2296
2360
  objectId: objectId
2297
2361
  });
2298
2362
  case 21:
2299
- libraryId = _context33.sent;
2300
- _context33.prev = 22;
2363
+ libraryId = _context34.sent;
2364
+ _context34.prev = 22;
2301
2365
  if (linkPath) {
2302
- _context33.next = 29;
2366
+ _context34.next = 29;
2303
2367
  break;
2304
2368
  }
2305
2369
  offeringPath = UrlJoin("public", "asset_metadata", "sources", offering);
2306
- _context33.next = 27;
2370
+ _context34.next = 27;
2307
2371
  return this.ContentObjectMetadata({
2308
2372
  libraryId: libraryId,
2309
2373
  objectId: objectId,
@@ -2312,18 +2376,18 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2312
2376
  authorizationToken: authorizationToken
2313
2377
  });
2314
2378
  case 27:
2315
- link = _context33.sent;
2379
+ link = _context34.sent;
2316
2380
  if (link) {
2317
2381
  linkPath = offeringPath;
2318
2382
  }
2319
2383
  case 29:
2320
- _context33.next = 33;
2384
+ _context34.next = 33;
2321
2385
  break;
2322
2386
  case 31:
2323
- _context33.prev = 31;
2324
- _context33.t0 = _context33["catch"](22);
2387
+ _context34.prev = 31;
2388
+ _context34.t0 = _context34["catch"](22);
2325
2389
  case 33:
2326
- _context33.next = 35;
2390
+ _context34.next = 35;
2327
2391
  return this.PlayoutPathResolution({
2328
2392
  libraryId: libraryId,
2329
2393
  objectId: objectId,
@@ -2336,37 +2400,37 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2336
2400
  authorizationToken: authorizationToken
2337
2401
  });
2338
2402
  case 35:
2339
- _yield$this$PlayoutPa2 = _context33.sent;
2403
+ _yield$this$PlayoutPa2 = _context34.sent;
2340
2404
  path = _yield$this$PlayoutPa2.path;
2341
2405
  linkTarget = _yield$this$PlayoutPa2.linkTarget;
2342
- _context33.t1 = this.authClient;
2343
- _context33.t2 = linkTarget.objectId || objectId;
2344
- _context33.t3 = linkTarget.versionHash || versionHash;
2345
- if (_context33.t3) {
2346
- _context33.next = 45;
2406
+ _context34.t1 = this.authClient;
2407
+ _context34.t2 = linkTarget.objectId || objectId;
2408
+ _context34.t3 = linkTarget.versionHash || versionHash;
2409
+ if (_context34.t3) {
2410
+ _context34.next = 45;
2347
2411
  break;
2348
2412
  }
2349
- _context33.next = 44;
2413
+ _context34.next = 44;
2350
2414
  return this.LatestVersionHash({
2351
2415
  objectId: objectId
2352
2416
  });
2353
2417
  case 44:
2354
- _context33.t3 = _context33.sent;
2418
+ _context34.t3 = _context34.sent;
2355
2419
  case 45:
2356
- _context33.t4 = _context33.t3;
2357
- _context33.t5 = protocols;
2358
- _context33.t6 = drms;
2359
- _context33.t7 = context;
2360
- _context33.t8 = {
2361
- objectId: _context33.t2,
2362
- versionHash: _context33.t4,
2363
- protocols: _context33.t5,
2364
- drms: _context33.t6,
2365
- context: _context33.t7
2420
+ _context34.t4 = _context34.t3;
2421
+ _context34.t5 = protocols;
2422
+ _context34.t6 = drms;
2423
+ _context34.t7 = context;
2424
+ _context34.t8 = {
2425
+ objectId: _context34.t2,
2426
+ versionHash: _context34.t4,
2427
+ protocols: _context34.t5,
2428
+ drms: _context34.t6,
2429
+ context: _context34.t7
2366
2430
  };
2367
- audienceData = _context33.t1.AudienceData.call(_context33.t1, _context33.t8);
2368
- _context33.t9 = authorizationToken;
2369
- _context33.next = 54;
2431
+ audienceData = _context34.t1.AudienceData.call(_context34.t1, _context34.t8);
2432
+ _context34.t9 = authorizationToken;
2433
+ _context34.next = 54;
2370
2434
  return this.authClient.AuthorizationToken({
2371
2435
  libraryId: libraryId,
2372
2436
  objectId: objectId,
@@ -2375,30 +2439,30 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2375
2439
  audienceData: audienceData
2376
2440
  });
2377
2441
  case 54:
2378
- _context33.t10 = _context33.sent;
2379
- authorization = [_context33.t9, _context33.t10].flat().filter(function (token) {
2442
+ _context34.t10 = _context34.sent;
2443
+ authorization = [_context34.t9, _context34.t10].flat().filter(function (token) {
2380
2444
  return token;
2381
2445
  });
2382
2446
  queryParams = _objectSpread({
2383
2447
  authorization: authorization,
2384
2448
  resolve: !!linkPath
2385
2449
  }, options);
2386
- _context33.t11 = Object;
2387
- _context33.next = 60;
2450
+ _context34.t11 = Object;
2451
+ _context34.next = 60;
2388
2452
  return this.utils.ResponseToJson(this.HttpClient.Request({
2389
2453
  path: path,
2390
2454
  method: "GET",
2391
2455
  queryParams: queryParams
2392
2456
  }));
2393
2457
  case 60:
2394
- _context33.t12 = _context33.sent;
2395
- playoutOptions = _context33.t11.values.call(_context33.t11, _context33.t12);
2458
+ _context34.t12 = _context34.sent;
2459
+ playoutOptions = _context34.t11.values.call(_context34.t11, _context34.t12);
2396
2460
  if (!(!signedLink && linkTarget.versionHash)) {
2397
- _context33.next = 68;
2461
+ _context34.next = 68;
2398
2462
  break;
2399
2463
  }
2400
- _context33.t13 = authorizationToken;
2401
- _context33.next = 66;
2464
+ _context34.t13 = authorizationToken;
2465
+ _context34.next = 66;
2402
2466
  return this.authClient.AuthorizationToken({
2403
2467
  libraryId: linkTarget.libraryId,
2404
2468
  objectId: linkTarget.objectId,
@@ -2407,8 +2471,8 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2407
2471
  audienceData: audienceData
2408
2472
  });
2409
2473
  case 66:
2410
- _context33.t14 = _context33.sent;
2411
- queryParams.authorization = [_context33.t13, _context33.t14].flat().filter(function (token) {
2474
+ _context34.t14 = _context34.sent;
2475
+ queryParams.authorization = [_context34.t13, _context34.t14].flat().filter(function (token) {
2412
2476
  return token;
2413
2477
  });
2414
2478
  case 68:
@@ -2416,7 +2480,7 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2416
2480
  i = 0;
2417
2481
  case 70:
2418
2482
  if (!(i < playoutOptions.length)) {
2419
- _context33.next = 116;
2483
+ _context34.next = 116;
2420
2484
  break;
2421
2485
  }
2422
2486
  option = playoutOptions[i];
@@ -2440,20 +2504,20 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2440
2504
  }
2441
2505
 
2442
2506
  // Create full playout URLs for this protocol / drm combo
2443
- _context33.t15 = _objectSpread;
2444
- _context33.t16 = _objectSpread({}, playoutMap[protocol] || {});
2445
- _context33.t17 = {};
2446
- _context33.t18 = _objectSpread;
2447
- _context33.t19 = _objectSpread({}, (playoutMap[protocol] || {}).playoutMethods || {});
2448
- _context33.t20 = {};
2449
- _context33.t21 = _defineProperty;
2450
- _context33.t22 = {};
2451
- _context33.t23 = drm || "clear";
2507
+ _context34.t15 = _objectSpread;
2508
+ _context34.t16 = _objectSpread({}, playoutMap[protocol] || {});
2509
+ _context34.t17 = {};
2510
+ _context34.t18 = _objectSpread;
2511
+ _context34.t19 = _objectSpread({}, (playoutMap[protocol] || {}).playoutMethods || {});
2512
+ _context34.t20 = {};
2513
+ _context34.t21 = _defineProperty;
2514
+ _context34.t22 = {};
2515
+ _context34.t23 = drm || "clear";
2452
2516
  if (!signedLink) {
2453
- _context33.next = 97;
2517
+ _context34.next = 97;
2454
2518
  break;
2455
2519
  }
2456
- _context33.next = 94;
2520
+ _context34.next = 94;
2457
2521
  return this.LinkUrl({
2458
2522
  versionHash: versionHash,
2459
2523
  linkPath: UrlJoin(linkPath, offering, playoutPath),
@@ -2461,11 +2525,11 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2461
2525
  noAuth: true
2462
2526
  });
2463
2527
  case 94:
2464
- _context33.t24 = _context33.sent;
2465
- _context33.next = 100;
2528
+ _context34.t24 = _context34.sent;
2529
+ _context34.next = 100;
2466
2530
  break;
2467
2531
  case 97:
2468
- _context33.next = 99;
2532
+ _context34.next = 99;
2469
2533
  return this.Rep({
2470
2534
  libraryId: linkTarget.libraryId || libraryId,
2471
2535
  objectId: linkTarget.objectId || objectId,
@@ -2475,23 +2539,23 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2475
2539
  queryParams: queryParams
2476
2540
  });
2477
2541
  case 99:
2478
- _context33.t24 = _context33.sent;
2542
+ _context34.t24 = _context34.sent;
2479
2543
  case 100:
2480
- _context33.t25 = _context33.t24;
2481
- _context33.t26 = drm ? _defineProperty({}, drm, {
2544
+ _context34.t25 = _context34.t24;
2545
+ _context34.t26 = drm ? _defineProperty({}, drm, {
2482
2546
  licenseServers: licenseServers,
2483
2547
  cert: cert
2484
2548
  }) : undefined;
2485
- _context33.t27 = {
2486
- playoutUrl: _context33.t25,
2487
- drms: _context33.t26
2549
+ _context34.t27 = {
2550
+ playoutUrl: _context34.t25,
2551
+ drms: _context34.t26
2488
2552
  };
2489
- _context33.t28 = (0, _context33.t21)(_context33.t22, _context33.t23, _context33.t27);
2490
- _context33.t29 = (0, _context33.t18)(_context33.t19, _context33.t20, _context33.t28);
2491
- _context33.t30 = {
2492
- playoutMethods: _context33.t29
2553
+ _context34.t28 = (0, _context34.t21)(_context34.t22, _context34.t23, _context34.t27);
2554
+ _context34.t29 = (0, _context34.t18)(_context34.t19, _context34.t20, _context34.t28);
2555
+ _context34.t30 = {
2556
+ playoutMethods: _context34.t29
2493
2557
  };
2494
- playoutMap[protocol] = (0, _context33.t15)(_context33.t16, _context33.t17, _context33.t30);
2558
+ playoutMap[protocol] = (0, _context34.t15)(_context34.t16, _context34.t17, _context34.t30);
2495
2559
  // Add .cert_url if playoutMap[protocol].playoutMethods[].drms[].cert is present
2496
2560
  // (for clients that need cert supplied as a URL reference rather than as a string literal)
2497
2561
  for (method in playoutMap[protocol].playoutMethods) {
@@ -2507,10 +2571,10 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2507
2571
  protocolMatch = protocols.includes(protocol);
2508
2572
  drmMatch = drms.includes(drm || "clear") || drms.length === 0 && !drm;
2509
2573
  if (!(!protocolMatch || !drmMatch)) {
2510
- _context33.next = 112;
2574
+ _context34.next = 112;
2511
2575
  break;
2512
2576
  }
2513
- return _context33.abrupt("continue", 113);
2577
+ return _context34.abrupt("continue", 113);
2514
2578
  case 112:
2515
2579
  // This protocol / DRM satisfies the specifications (prefer DRM over clear, if available)
2516
2580
  if (!playoutMap[protocol].playoutUrl || drm && drm !== "clear") {
@@ -2519,19 +2583,19 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2519
2583
  }
2520
2584
  case 113:
2521
2585
  i++;
2522
- _context33.next = 70;
2586
+ _context34.next = 70;
2523
2587
  break;
2524
2588
  case 116:
2525
2589
  // Callbacks for retrieving and setting multiview views
2526
2590
  if (multiview && sessionId) {
2527
2591
  playoutMap.sessionId = sessionId;
2528
2592
  playoutMap.multiview = true;
2529
- playoutMap.AvailableViews = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee31() {
2530
- return _regeneratorRuntime.wrap(function _callee31$(_context31) {
2531
- while (1) switch (_context31.prev = _context31.next) {
2593
+ playoutMap.AvailableViews = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32() {
2594
+ return _regeneratorRuntime.wrap(function _callee32$(_context32) {
2595
+ while (1) switch (_context32.prev = _context32.next) {
2532
2596
  case 0:
2533
- _context31.t0 = _this9.utils;
2534
- _context31.next = 3;
2597
+ _context32.t0 = _this9.utils;
2598
+ _context32.next = 3;
2535
2599
  return _this9.HttpClient.Request({
2536
2600
  path: UrlJoin("q", linkTarget.versionHash || versionHash, "rep", handler, offering, "views.json"),
2537
2601
  method: "GET",
@@ -2541,23 +2605,23 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2541
2605
  }
2542
2606
  });
2543
2607
  case 3:
2544
- _context31.t1 = _context31.sent;
2545
- _context31.next = 6;
2546
- return _context31.t0.ResponseToFormat.call(_context31.t0, "json", _context31.t1);
2608
+ _context32.t1 = _context32.sent;
2609
+ _context32.next = 6;
2610
+ return _context32.t0.ResponseToFormat.call(_context32.t0, "json", _context32.t1);
2547
2611
  case 6:
2548
- return _context31.abrupt("return", _context31.sent);
2612
+ return _context32.abrupt("return", _context32.sent);
2549
2613
  case 7:
2550
2614
  case "end":
2551
- return _context31.stop();
2615
+ return _context32.stop();
2552
2616
  }
2553
- }, _callee31);
2617
+ }, _callee32);
2554
2618
  }));
2555
2619
  playoutMap.SwitchView = /*#__PURE__*/function () {
2556
- var _ref57 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee32(view) {
2557
- return _regeneratorRuntime.wrap(function _callee32$(_context32) {
2558
- while (1) switch (_context32.prev = _context32.next) {
2620
+ var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee33(view) {
2621
+ return _regeneratorRuntime.wrap(function _callee33$(_context33) {
2622
+ while (1) switch (_context33.prev = _context33.next) {
2559
2623
  case 0:
2560
- _context32.next = 2;
2624
+ _context33.next = 2;
2561
2625
  return _this9.HttpClient.Request({
2562
2626
  path: UrlJoin("q", linkTarget.versionHash || versionHash, "rep", handler, offering, "select_view"),
2563
2627
  method: "POST",
@@ -2571,25 +2635,25 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2571
2635
  });
2572
2636
  case 2:
2573
2637
  case "end":
2574
- return _context32.stop();
2638
+ return _context33.stop();
2575
2639
  }
2576
- }, _callee32);
2640
+ }, _callee33);
2577
2641
  }));
2578
- return function (_x32) {
2579
- return _ref57.apply(this, arguments);
2642
+ return function (_x33) {
2643
+ return _ref59.apply(this, arguments);
2580
2644
  };
2581
2645
  }();
2582
2646
  }
2583
2647
  this.Log(playoutMap);
2584
- return _context33.abrupt("return", playoutMap);
2648
+ return _context34.abrupt("return", playoutMap);
2585
2649
  case 119:
2586
2650
  case "end":
2587
- return _context33.stop();
2651
+ return _context34.stop();
2588
2652
  }
2589
- }, _callee33, this, [[22, 31]]);
2653
+ }, _callee34, this, [[22, 31]]);
2590
2654
  }));
2591
- return function (_x31) {
2592
- return _ref54.apply(this, arguments);
2655
+ return function (_x32) {
2656
+ return _ref56.apply(this, arguments);
2593
2657
  };
2594
2658
  }();
2595
2659
 
@@ -2618,17 +2682,17 @@ exports.PlayoutOptions = /*#__PURE__*/function () {
2618
2682
  * @param {Object=} options - Additional query parameters to pass when requesting available playout options, such as clipping parameters.
2619
2683
  */
2620
2684
  exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2621
- var _ref59 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee34(_ref58) {
2622
- var objectId, versionHash, writeToken, linkPath, _ref58$signedLink, signedLink, _ref58$protocols, protocols, _ref58$drms, drms, _ref58$handler, handler, _ref58$offering, offering, playoutType, context, authorizationToken, _ref58$options, options, playoutOptions, _yield$this$PlayoutPa3, linkTarget, authorization, config;
2623
- return _regeneratorRuntime.wrap(function _callee34$(_context34) {
2624
- while (1) switch (_context34.prev = _context34.next) {
2685
+ var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref60) {
2686
+ var objectId, versionHash, writeToken, linkPath, _ref60$signedLink, signedLink, _ref60$protocols, protocols, _ref60$drms, drms, _ref60$handler, handler, _ref60$offering, offering, playoutType, context, authorizationToken, _ref60$options, options, playoutOptions, _yield$this$PlayoutPa3, linkTarget, authorization, config;
2687
+ return _regeneratorRuntime.wrap(function _callee35$(_context35) {
2688
+ while (1) switch (_context35.prev = _context35.next) {
2625
2689
  case 0:
2626
- objectId = _ref58.objectId, versionHash = _ref58.versionHash, writeToken = _ref58.writeToken, linkPath = _ref58.linkPath, _ref58$signedLink = _ref58.signedLink, signedLink = _ref58$signedLink === void 0 ? false : _ref58$signedLink, _ref58$protocols = _ref58.protocols, protocols = _ref58$protocols === void 0 ? ["dash", "hls"] : _ref58$protocols, _ref58$drms = _ref58.drms, drms = _ref58$drms === void 0 ? [] : _ref58$drms, _ref58$handler = _ref58.handler, handler = _ref58$handler === void 0 ? "playout" : _ref58$handler, _ref58$offering = _ref58.offering, offering = _ref58$offering === void 0 ? "default" : _ref58$offering, playoutType = _ref58.playoutType, context = _ref58.context, authorizationToken = _ref58.authorizationToken, _ref58$options = _ref58.options, options = _ref58$options === void 0 ? {} : _ref58$options;
2690
+ objectId = _ref60.objectId, versionHash = _ref60.versionHash, writeToken = _ref60.writeToken, linkPath = _ref60.linkPath, _ref60$signedLink = _ref60.signedLink, signedLink = _ref60$signedLink === void 0 ? false : _ref60$signedLink, _ref60$protocols = _ref60.protocols, protocols = _ref60$protocols === void 0 ? ["dash", "hls"] : _ref60$protocols, _ref60$drms = _ref60.drms, drms = _ref60$drms === void 0 ? [] : _ref60$drms, _ref60$handler = _ref60.handler, handler = _ref60$handler === void 0 ? "playout" : _ref60$handler, _ref60$offering = _ref60.offering, offering = _ref60$offering === void 0 ? "default" : _ref60$offering, playoutType = _ref60.playoutType, context = _ref60.context, authorizationToken = _ref60.authorizationToken, _ref60$options = _ref60.options, options = _ref60$options === void 0 ? {} : _ref60$options;
2627
2691
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
2628
2692
  if (!objectId) {
2629
2693
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
2630
2694
  }
2631
- _context34.next = 5;
2695
+ _context35.next = 5;
2632
2696
  return this.PlayoutOptions({
2633
2697
  objectId: objectId,
2634
2698
  versionHash: versionHash,
@@ -2646,9 +2710,9 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2646
2710
  options: options
2647
2711
  });
2648
2712
  case 5:
2649
- playoutOptions = _context34.sent;
2713
+ playoutOptions = _context35.sent;
2650
2714
  delete playoutOptions.playoutMethods;
2651
- _context34.next = 9;
2715
+ _context35.next = 9;
2652
2716
  return this.PlayoutPathResolution({
2653
2717
  objectId: objectId,
2654
2718
  versionHash: versionHash,
@@ -2660,31 +2724,31 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2660
2724
  authorizationToken: authorizationToken
2661
2725
  });
2662
2726
  case 9:
2663
- _yield$this$PlayoutPa3 = _context34.sent;
2727
+ _yield$this$PlayoutPa3 = _context35.sent;
2664
2728
  linkTarget = _yield$this$PlayoutPa3.linkTarget;
2665
2729
  authorization = [];
2666
2730
  if (authorizationToken) {
2667
2731
  authorization.push(authorizationToken);
2668
2732
  }
2669
2733
  if (!(signedLink || !linkTarget.versionHash)) {
2670
- _context34.next = 21;
2734
+ _context35.next = 21;
2671
2735
  break;
2672
2736
  }
2673
- _context34.t0 = authorization;
2674
- _context34.next = 17;
2737
+ _context35.t0 = authorization;
2738
+ _context35.next = 17;
2675
2739
  return this.authClient.AuthorizationToken({
2676
2740
  objectId: objectId,
2677
2741
  channelAuth: true,
2678
2742
  oauthToken: this.oauthToken
2679
2743
  });
2680
2744
  case 17:
2681
- _context34.t1 = _context34.sent;
2682
- _context34.t0.push.call(_context34.t0, _context34.t1);
2683
- _context34.next = 26;
2745
+ _context35.t1 = _context35.sent;
2746
+ _context35.t0.push.call(_context35.t0, _context35.t1);
2747
+ _context35.next = 26;
2684
2748
  break;
2685
2749
  case 21:
2686
- _context34.t2 = authorization;
2687
- _context34.next = 24;
2750
+ _context35.t2 = authorization;
2751
+ _context35.next = 24;
2688
2752
  return this.authClient.AuthorizationToken({
2689
2753
  libraryId: linkTarget.libraryId,
2690
2754
  objectId: linkTarget.objectId,
@@ -2692,8 +2756,8 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2692
2756
  oauthToken: this.oauthToken
2693
2757
  });
2694
2758
  case 24:
2695
- _context34.t3 = _context34.sent;
2696
- _context34.t2.push.call(_context34.t2, _context34.t3);
2759
+ _context35.t3 = _context35.sent;
2760
+ _context35.t2.push.call(_context35.t2, _context35.t3);
2697
2761
  case 26:
2698
2762
  config = {
2699
2763
  drm: {}
@@ -2734,15 +2798,15 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2734
2798
  });
2735
2799
  }
2736
2800
  });
2737
- return _context34.abrupt("return", config);
2801
+ return _context35.abrupt("return", config);
2738
2802
  case 29:
2739
2803
  case "end":
2740
- return _context34.stop();
2804
+ return _context35.stop();
2741
2805
  }
2742
- }, _callee34, this);
2806
+ }, _callee35, this);
2743
2807
  }));
2744
- return function (_x33) {
2745
- return _ref59.apply(this, arguments);
2808
+ return function (_x34) {
2809
+ return _ref61.apply(this, arguments);
2746
2810
  };
2747
2811
  }();
2748
2812
 
@@ -2766,19 +2830,19 @@ exports.BitmovinPlayoutOptions = /*#__PURE__*/function () {
2766
2830
  * @returns {Promise<format>} - The response from the call in the specified format
2767
2831
  */
2768
2832
  exports.CallBitcodeMethod = /*#__PURE__*/function () {
2769
- var _ref61 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee35(_ref60) {
2770
- var libraryId, objectId, versionHash, writeToken, method, _ref60$queryParams, queryParams, _ref60$body, body, _ref60$headers, headers, _ref60$constant, constant, _ref60$format, format, path, authHeader;
2771
- return _regeneratorRuntime.wrap(function _callee35$(_context35) {
2772
- while (1) switch (_context35.prev = _context35.next) {
2833
+ var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref62) {
2834
+ var libraryId, objectId, versionHash, writeToken, method, _ref62$queryParams, queryParams, _ref62$body, body, _ref62$headers, headers, _ref62$constant, constant, _ref62$format, format, path, authHeader;
2835
+ return _regeneratorRuntime.wrap(function _callee36$(_context36) {
2836
+ while (1) switch (_context36.prev = _context36.next) {
2773
2837
  case 0:
2774
- libraryId = _ref60.libraryId, objectId = _ref60.objectId, versionHash = _ref60.versionHash, writeToken = _ref60.writeToken, method = _ref60.method, _ref60$queryParams = _ref60.queryParams, queryParams = _ref60$queryParams === void 0 ? {} : _ref60$queryParams, _ref60$body = _ref60.body, body = _ref60$body === void 0 ? {} : _ref60$body, _ref60$headers = _ref60.headers, headers = _ref60$headers === void 0 ? {} : _ref60$headers, _ref60$constant = _ref60.constant, constant = _ref60$constant === void 0 ? true : _ref60$constant, _ref60$format = _ref60.format, format = _ref60$format === void 0 ? "json" : _ref60$format;
2838
+ libraryId = _ref62.libraryId, objectId = _ref62.objectId, versionHash = _ref62.versionHash, writeToken = _ref62.writeToken, method = _ref62.method, _ref62$queryParams = _ref62.queryParams, queryParams = _ref62$queryParams === void 0 ? {} : _ref62$queryParams, _ref62$body = _ref62.body, body = _ref62$body === void 0 ? {} : _ref62$body, _ref62$headers = _ref62.headers, headers = _ref62$headers === void 0 ? {} : _ref62$headers, _ref62$constant = _ref62.constant, constant = _ref62$constant === void 0 ? true : _ref62$constant, _ref62$format = _ref62.format, format = _ref62$format === void 0 ? "json" : _ref62$format;
2775
2839
  ValidateParameters({
2776
2840
  libraryId: libraryId,
2777
2841
  objectId: objectId,
2778
2842
  versionHash: versionHash
2779
2843
  });
2780
2844
  if (method) {
2781
- _context35.next = 4;
2845
+ _context36.next = 4;
2782
2846
  break;
2783
2847
  }
2784
2848
  throw "Bitcode method not specified";
@@ -2792,22 +2856,22 @@ exports.CallBitcodeMethod = /*#__PURE__*/function () {
2792
2856
  }
2793
2857
  authHeader = headers.authorization || headers.Authorization;
2794
2858
  if (authHeader) {
2795
- _context35.next = 12;
2859
+ _context36.next = 12;
2796
2860
  break;
2797
2861
  }
2798
- _context35.next = 11;
2862
+ _context36.next = 11;
2799
2863
  return this.authClient.AuthorizationHeader({
2800
2864
  libraryId: libraryId,
2801
2865
  objectId: objectId,
2802
2866
  update: !constant
2803
2867
  });
2804
2868
  case 11:
2805
- headers.Authorization = _context35.sent.Authorization;
2869
+ headers.Authorization = _context36.sent.Authorization;
2806
2870
  case 12:
2807
2871
  this.Log("Calling bitcode method: ".concat(libraryId || "", " ").concat(objectId || versionHash, " ").concat(writeToken || "", "\n ").concat(constant ? "GET" : "POST", " ").concat(path, "\n Query Params:\n ").concat(JSON.stringify(queryParams || ""), "\n Body:\n ").concat(JSON.stringify(body || ""), "\n Headers\n ").concat(JSON.stringify(headers || "")));
2808
- _context35.t0 = this.utils;
2809
- _context35.t1 = format;
2810
- _context35.next = 17;
2872
+ _context36.t0 = this.utils;
2873
+ _context36.t1 = format;
2874
+ _context36.next = 17;
2811
2875
  return this.HttpClient.Request({
2812
2876
  body: body,
2813
2877
  headers: headers,
@@ -2817,16 +2881,16 @@ exports.CallBitcodeMethod = /*#__PURE__*/function () {
2817
2881
  allowFailover: false
2818
2882
  });
2819
2883
  case 17:
2820
- _context35.t2 = _context35.sent;
2821
- return _context35.abrupt("return", _context35.t0.ResponseToFormat.call(_context35.t0, _context35.t1, _context35.t2));
2884
+ _context36.t2 = _context36.sent;
2885
+ return _context36.abrupt("return", _context36.t0.ResponseToFormat.call(_context36.t0, _context36.t1, _context36.t2));
2822
2886
  case 19:
2823
2887
  case "end":
2824
- return _context35.stop();
2888
+ return _context36.stop();
2825
2889
  }
2826
- }, _callee35, this);
2890
+ }, _callee36, this);
2827
2891
  }));
2828
- return function (_x34) {
2829
- return _ref61.apply(this, arguments);
2892
+ return function (_x35) {
2893
+ return _ref63.apply(this, arguments);
2830
2894
  };
2831
2895
  }();
2832
2896
 
@@ -2855,24 +2919,24 @@ exports.CallBitcodeMethod = /*#__PURE__*/function () {
2855
2919
  * @returns {Promise<string>} - URL to the specified rep endpoint with authorization token
2856
2920
  */
2857
2921
  exports.Rep = /*#__PURE__*/function () {
2858
- var _ref63 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee36(_ref62) {
2859
- var libraryId, objectId, versionHash, rep, _ref62$queryParams, queryParams, _ref62$service, service, _ref62$makeAccessRequ, makeAccessRequest, _ref62$channelAuth, channelAuth, _ref62$noAuth, noAuth, _ref62$noCache, noCache;
2860
- return _regeneratorRuntime.wrap(function _callee36$(_context36) {
2861
- while (1) switch (_context36.prev = _context36.next) {
2922
+ var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref64) {
2923
+ var libraryId, objectId, versionHash, rep, _ref64$queryParams, queryParams, _ref64$service, service, _ref64$makeAccessRequ, makeAccessRequest, _ref64$channelAuth, channelAuth, _ref64$noAuth, noAuth, _ref64$noCache, noCache;
2924
+ return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2925
+ while (1) switch (_context37.prev = _context37.next) {
2862
2926
  case 0:
2863
- libraryId = _ref62.libraryId, objectId = _ref62.objectId, versionHash = _ref62.versionHash, rep = _ref62.rep, _ref62$queryParams = _ref62.queryParams, queryParams = _ref62$queryParams === void 0 ? {} : _ref62$queryParams, _ref62$service = _ref62.service, service = _ref62$service === void 0 ? "fabric" : _ref62$service, _ref62$makeAccessRequ = _ref62.makeAccessRequest, makeAccessRequest = _ref62$makeAccessRequ === void 0 ? false : _ref62$makeAccessRequ, _ref62$channelAuth = _ref62.channelAuth, channelAuth = _ref62$channelAuth === void 0 ? false : _ref62$channelAuth, _ref62$noAuth = _ref62.noAuth, noAuth = _ref62$noAuth === void 0 ? false : _ref62$noAuth, _ref62$noCache = _ref62.noCache, noCache = _ref62$noCache === void 0 ? false : _ref62$noCache;
2927
+ libraryId = _ref64.libraryId, objectId = _ref64.objectId, versionHash = _ref64.versionHash, rep = _ref64.rep, _ref64$queryParams = _ref64.queryParams, queryParams = _ref64$queryParams === void 0 ? {} : _ref64$queryParams, _ref64$service = _ref64.service, service = _ref64$service === void 0 ? "fabric" : _ref64$service, _ref64$makeAccessRequ = _ref64.makeAccessRequest, makeAccessRequest = _ref64$makeAccessRequ === void 0 ? false : _ref64$makeAccessRequ, _ref64$channelAuth = _ref64.channelAuth, channelAuth = _ref64$channelAuth === void 0 ? false : _ref64$channelAuth, _ref64$noAuth = _ref64.noAuth, noAuth = _ref64$noAuth === void 0 ? false : _ref64$noAuth, _ref64$noCache = _ref64.noCache, noCache = _ref64$noCache === void 0 ? false : _ref64$noCache;
2864
2928
  ValidateParameters({
2865
2929
  libraryId: libraryId,
2866
2930
  objectId: objectId,
2867
2931
  versionHash: versionHash
2868
2932
  });
2869
2933
  if (rep) {
2870
- _context36.next = 4;
2934
+ _context37.next = 4;
2871
2935
  break;
2872
2936
  }
2873
2937
  throw "Rep not specified";
2874
2938
  case 4:
2875
- return _context36.abrupt("return", this.FabricUrl({
2939
+ return _context37.abrupt("return", this.FabricUrl({
2876
2940
  libraryId: libraryId,
2877
2941
  objectId: objectId,
2878
2942
  versionHash: versionHash,
@@ -2886,12 +2950,12 @@ exports.Rep = /*#__PURE__*/function () {
2886
2950
  }));
2887
2951
  case 5:
2888
2952
  case "end":
2889
- return _context36.stop();
2953
+ return _context37.stop();
2890
2954
  }
2891
- }, _callee36, this);
2955
+ }, _callee37, this);
2892
2956
  }));
2893
- return function (_x35) {
2894
- return _ref63.apply(this, arguments);
2957
+ return function (_x36) {
2958
+ return _ref65.apply(this, arguments);
2895
2959
  };
2896
2960
  }();
2897
2961
 
@@ -2913,24 +2977,24 @@ exports.Rep = /*#__PURE__*/function () {
2913
2977
  * @returns {Promise<string>} - URL to the specified rep endpoint with authorization token
2914
2978
  */
2915
2979
  exports.PublicRep = /*#__PURE__*/function () {
2916
- var _ref65 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee37(_ref64) {
2917
- var libraryId, objectId, versionHash, rep, _ref64$queryParams, queryParams, _ref64$service, service;
2918
- return _regeneratorRuntime.wrap(function _callee37$(_context37) {
2919
- while (1) switch (_context37.prev = _context37.next) {
2980
+ var _ref67 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref66) {
2981
+ var libraryId, objectId, versionHash, rep, _ref66$queryParams, queryParams, _ref66$service, service;
2982
+ return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2983
+ while (1) switch (_context38.prev = _context38.next) {
2920
2984
  case 0:
2921
- libraryId = _ref64.libraryId, objectId = _ref64.objectId, versionHash = _ref64.versionHash, rep = _ref64.rep, _ref64$queryParams = _ref64.queryParams, queryParams = _ref64$queryParams === void 0 ? {} : _ref64$queryParams, _ref64$service = _ref64.service, service = _ref64$service === void 0 ? "fabric" : _ref64$service;
2985
+ libraryId = _ref66.libraryId, objectId = _ref66.objectId, versionHash = _ref66.versionHash, rep = _ref66.rep, _ref66$queryParams = _ref66.queryParams, queryParams = _ref66$queryParams === void 0 ? {} : _ref66$queryParams, _ref66$service = _ref66.service, service = _ref66$service === void 0 ? "fabric" : _ref66$service;
2922
2986
  ValidateParameters({
2923
2987
  libraryId: libraryId,
2924
2988
  objectId: objectId,
2925
2989
  versionHash: versionHash
2926
2990
  });
2927
2991
  if (rep) {
2928
- _context37.next = 4;
2992
+ _context38.next = 4;
2929
2993
  break;
2930
2994
  }
2931
2995
  throw "Rep not specified";
2932
2996
  case 4:
2933
- return _context37.abrupt("return", this.FabricUrl({
2997
+ return _context38.abrupt("return", this.FabricUrl({
2934
2998
  libraryId: libraryId,
2935
2999
  objectId: objectId,
2936
3000
  versionHash: versionHash,
@@ -2941,12 +3005,12 @@ exports.PublicRep = /*#__PURE__*/function () {
2941
3005
  }));
2942
3006
  case 5:
2943
3007
  case "end":
2944
- return _context37.stop();
3008
+ return _context38.stop();
2945
3009
  }
2946
- }, _callee37, this);
3010
+ }, _callee38, this);
2947
3011
  }));
2948
- return function (_x36) {
2949
- return _ref65.apply(this, arguments);
3012
+ return function (_x37) {
3013
+ return _ref67.apply(this, arguments);
2950
3014
  };
2951
3015
  }();
2952
3016
 
@@ -2975,12 +3039,12 @@ exports.PublicRep = /*#__PURE__*/function () {
2975
3039
  * @returns {Promise<string>} - URL to the specified endpoint with authorization token
2976
3040
  */
2977
3041
  exports.FabricUrl = /*#__PURE__*/function () {
2978
- var _ref67 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee38(_ref66) {
2979
- var libraryId, objectId, versionHash, writeToken, partHash, rep, publicRep, call, _ref66$queryParams, queryParams, _ref66$service, service, _ref66$channelAuth, channelAuth, _ref66$makeAccessRequ, makeAccessRequest, _ref66$noAuth, noAuth, _ref66$noCache, noCache, authorization, path, httpClient;
2980
- return _regeneratorRuntime.wrap(function _callee38$(_context38) {
2981
- while (1) switch (_context38.prev = _context38.next) {
3042
+ var _ref69 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref68) {
3043
+ var libraryId, objectId, versionHash, writeToken, partHash, rep, publicRep, call, _ref68$queryParams, queryParams, _ref68$service, service, _ref68$channelAuth, channelAuth, _ref68$makeAccessRequ, makeAccessRequest, _ref68$noAuth, noAuth, _ref68$noCache, noCache, authorization, path, httpClient;
3044
+ return _regeneratorRuntime.wrap(function _callee39$(_context39) {
3045
+ while (1) switch (_context39.prev = _context39.next) {
2982
3046
  case 0:
2983
- libraryId = _ref66.libraryId, objectId = _ref66.objectId, versionHash = _ref66.versionHash, writeToken = _ref66.writeToken, partHash = _ref66.partHash, rep = _ref66.rep, publicRep = _ref66.publicRep, call = _ref66.call, _ref66$queryParams = _ref66.queryParams, queryParams = _ref66$queryParams === void 0 ? {} : _ref66$queryParams, _ref66$service = _ref66.service, service = _ref66$service === void 0 ? "fabric" : _ref66$service, _ref66$channelAuth = _ref66.channelAuth, channelAuth = _ref66$channelAuth === void 0 ? false : _ref66$channelAuth, _ref66$makeAccessRequ = _ref66.makeAccessRequest, makeAccessRequest = _ref66$makeAccessRequ === void 0 ? false : _ref66$makeAccessRequ, _ref66$noAuth = _ref66.noAuth, noAuth = _ref66$noAuth === void 0 ? false : _ref66$noAuth, _ref66$noCache = _ref66.noCache, noCache = _ref66$noCache === void 0 ? false : _ref66$noCache;
3047
+ libraryId = _ref68.libraryId, objectId = _ref68.objectId, versionHash = _ref68.versionHash, writeToken = _ref68.writeToken, partHash = _ref68.partHash, rep = _ref68.rep, publicRep = _ref68.publicRep, call = _ref68.call, _ref68$queryParams = _ref68.queryParams, queryParams = _ref68$queryParams === void 0 ? {} : _ref68$queryParams, _ref68$service = _ref68.service, service = _ref68$service === void 0 ? "fabric" : _ref68$service, _ref68$channelAuth = _ref68.channelAuth, channelAuth = _ref68$channelAuth === void 0 ? false : _ref68$channelAuth, _ref68$makeAccessRequ = _ref68.makeAccessRequest, makeAccessRequest = _ref68$makeAccessRequ === void 0 ? false : _ref68$makeAccessRequ, _ref68$noAuth = _ref68.noAuth, noAuth = _ref68$noAuth === void 0 ? false : _ref68$noAuth, _ref68$noCache = _ref68.noCache, noCache = _ref68$noCache === void 0 ? false : _ref68$noCache;
2984
3048
  if (objectId || versionHash) {
2985
3049
  ValidateParameters({
2986
3050
  libraryId: libraryId,
@@ -2997,11 +3061,11 @@ exports.FabricUrl = /*#__PURE__*/function () {
2997
3061
  authorization.push(queryParams.authorization);
2998
3062
  }
2999
3063
  if (noAuth && queryParams.authorization) {
3000
- _context38.next = 12;
3064
+ _context39.next = 12;
3001
3065
  break;
3002
3066
  }
3003
- _context38.t0 = authorization;
3004
- _context38.next = 10;
3067
+ _context39.t0 = authorization;
3068
+ _context39.next = 10;
3005
3069
  return this.authClient.AuthorizationToken({
3006
3070
  libraryId: libraryId,
3007
3071
  objectId: objectId,
@@ -3012,23 +3076,23 @@ exports.FabricUrl = /*#__PURE__*/function () {
3012
3076
  noCache: noCache
3013
3077
  });
3014
3078
  case 10:
3015
- _context38.t1 = _context38.sent;
3016
- _context38.t0.push.call(_context38.t0, _context38.t1);
3079
+ _context39.t1 = _context39.sent;
3080
+ _context39.t0.push.call(_context39.t0, _context39.t1);
3017
3081
  case 12:
3018
3082
  // Clone queryParams to avoid modification of the original
3019
3083
  queryParams = _objectSpread(_objectSpread({}, queryParams), {}, {
3020
3084
  authorization: authorization.flat()
3021
3085
  });
3022
3086
  if (!((rep || publicRep) && objectId && !versionHash)) {
3023
- _context38.next = 17;
3087
+ _context39.next = 17;
3024
3088
  break;
3025
3089
  }
3026
- _context38.next = 16;
3090
+ _context39.next = 16;
3027
3091
  return this.LatestVersionHash({
3028
3092
  objectId: objectId
3029
3093
  });
3030
3094
  case 16:
3031
- versionHash = _context38.sent;
3095
+ versionHash = _context39.sent;
3032
3096
  case 17:
3033
3097
  path = "";
3034
3098
  if (libraryId) {
@@ -3054,18 +3118,18 @@ exports.FabricUrl = /*#__PURE__*/function () {
3054
3118
  } else if (service === "auth") {
3055
3119
  httpClient = this.AuthHttpClient;
3056
3120
  }
3057
- return _context38.abrupt("return", httpClient.URL({
3121
+ return _context39.abrupt("return", httpClient.URL({
3058
3122
  path: path,
3059
3123
  queryParams: queryParams
3060
3124
  }));
3061
3125
  case 23:
3062
3126
  case "end":
3063
- return _context38.stop();
3127
+ return _context39.stop();
3064
3128
  }
3065
- }, _callee38, this);
3129
+ }, _callee39, this);
3066
3130
  }));
3067
- return function (_x37) {
3068
- return _ref67.apply(this, arguments);
3131
+ return function (_x38) {
3132
+ return _ref69.apply(this, arguments);
3069
3133
  };
3070
3134
  }();
3071
3135
 
@@ -3086,19 +3150,19 @@ exports.FabricUrl = /*#__PURE__*/function () {
3086
3150
  * @returns {Promise<string>} - URL to the specified file with authorization token
3087
3151
  */
3088
3152
  exports.FileUrl = /*#__PURE__*/function () {
3089
- var _ref69 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee39(_ref68) {
3090
- var libraryId, objectId, versionHash, writeToken, filePath, _ref68$queryParams, queryParams, _ref68$noCache, noCache, path, authorizationToken, fileInfo, encrypted;
3091
- return _regeneratorRuntime.wrap(function _callee39$(_context39) {
3092
- while (1) switch (_context39.prev = _context39.next) {
3153
+ var _ref71 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref70) {
3154
+ var libraryId, objectId, versionHash, writeToken, filePath, _ref70$queryParams, queryParams, _ref70$noCache, noCache, path, authorizationToken, fileInfo, encrypted;
3155
+ return _regeneratorRuntime.wrap(function _callee40$(_context40) {
3156
+ while (1) switch (_context40.prev = _context40.next) {
3093
3157
  case 0:
3094
- libraryId = _ref68.libraryId, objectId = _ref68.objectId, versionHash = _ref68.versionHash, writeToken = _ref68.writeToken, filePath = _ref68.filePath, _ref68$queryParams = _ref68.queryParams, queryParams = _ref68$queryParams === void 0 ? {} : _ref68$queryParams, _ref68$noCache = _ref68.noCache, noCache = _ref68$noCache === void 0 ? false : _ref68$noCache;
3158
+ libraryId = _ref70.libraryId, objectId = _ref70.objectId, versionHash = _ref70.versionHash, writeToken = _ref70.writeToken, filePath = _ref70.filePath, _ref70$queryParams = _ref70.queryParams, queryParams = _ref70$queryParams === void 0 ? {} : _ref70$queryParams, _ref70$noCache = _ref70.noCache, noCache = _ref70$noCache === void 0 ? false : _ref70$noCache;
3095
3159
  ValidateParameters({
3096
3160
  libraryId: libraryId,
3097
3161
  objectId: objectId,
3098
3162
  versionHash: versionHash
3099
3163
  });
3100
3164
  if (filePath) {
3101
- _context39.next = 4;
3165
+ _context40.next = 4;
3102
3166
  break;
3103
3167
  }
3104
3168
  throw "File path not specified";
@@ -3111,18 +3175,18 @@ exports.FileUrl = /*#__PURE__*/function () {
3111
3175
  } else {
3112
3176
  path = UrlJoin("q", versionHash);
3113
3177
  }
3114
- _context39.next = 8;
3178
+ _context40.next = 8;
3115
3179
  return this.authClient.AuthorizationToken({
3116
3180
  libraryId: libraryId,
3117
3181
  objectId: objectId,
3118
3182
  noCache: noCache
3119
3183
  });
3120
3184
  case 8:
3121
- authorizationToken = _context39.sent;
3185
+ authorizationToken = _context40.sent;
3122
3186
  queryParams = _objectSpread(_objectSpread({}, queryParams), {}, {
3123
3187
  authorization: authorizationToken
3124
3188
  });
3125
- _context39.next = 12;
3189
+ _context40.next = 12;
3126
3190
  return this.ContentObjectMetadata({
3127
3191
  libraryId: libraryId,
3128
3192
  objectId: objectId,
@@ -3131,7 +3195,7 @@ exports.FileUrl = /*#__PURE__*/function () {
3131
3195
  metadataSubtree: UrlJoin("files", filePath)
3132
3196
  });
3133
3197
  case 12:
3134
- fileInfo = _context39.sent;
3198
+ fileInfo = _context40.sent;
3135
3199
  encrypted = fileInfo && fileInfo["."].encryption && fileInfo["."].encryption.scheme === "cgck";
3136
3200
  if (encrypted) {
3137
3201
  path = UrlJoin(path, "rep", "files_download", filePath);
@@ -3139,18 +3203,18 @@ exports.FileUrl = /*#__PURE__*/function () {
3139
3203
  } else {
3140
3204
  path = UrlJoin(path, "files", filePath);
3141
3205
  }
3142
- return _context39.abrupt("return", this.HttpClient.URL({
3206
+ return _context40.abrupt("return", this.HttpClient.URL({
3143
3207
  path: path,
3144
3208
  queryParams: queryParams
3145
3209
  }));
3146
3210
  case 16:
3147
3211
  case "end":
3148
- return _context39.stop();
3212
+ return _context40.stop();
3149
3213
  }
3150
- }, _callee39, this);
3214
+ }, _callee40, this);
3151
3215
  }));
3152
- return function (_x38) {
3153
- return _ref69.apply(this, arguments);
3216
+ return function (_x39) {
3217
+ return _ref71.apply(this, arguments);
3154
3218
  };
3155
3219
  }();
3156
3220
 
@@ -3170,78 +3234,78 @@ exports.FileUrl = /*#__PURE__*/function () {
3170
3234
  * @returns {Promise<string | undefined>} - If the object has an image, will return a URL for that image.
3171
3235
  */
3172
3236
  exports.ContentObjectImageUrl = /*#__PURE__*/function () {
3173
- var _ref71 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee40(_ref70) {
3174
- var libraryId, objectId, versionHash, height, _ref70$imagePath, imagePath, imageMetadata, _queryParams;
3175
- return _regeneratorRuntime.wrap(function _callee40$(_context40) {
3176
- while (1) switch (_context40.prev = _context40.next) {
3237
+ var _ref73 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref72) {
3238
+ var libraryId, objectId, versionHash, height, _ref72$imagePath, imagePath, imageMetadata, _queryParams;
3239
+ return _regeneratorRuntime.wrap(function _callee41$(_context41) {
3240
+ while (1) switch (_context41.prev = _context41.next) {
3177
3241
  case 0:
3178
- libraryId = _ref70.libraryId, objectId = _ref70.objectId, versionHash = _ref70.versionHash, height = _ref70.height, _ref70$imagePath = _ref70.imagePath, imagePath = _ref70$imagePath === void 0 ? "public/display_image" : _ref70$imagePath;
3242
+ libraryId = _ref72.libraryId, objectId = _ref72.objectId, versionHash = _ref72.versionHash, height = _ref72.height, _ref72$imagePath = _ref72.imagePath, imagePath = _ref72$imagePath === void 0 ? "public/display_image" : _ref72$imagePath;
3179
3243
  ValidateParameters({
3180
3244
  libraryId: libraryId,
3181
3245
  objectId: objectId,
3182
3246
  versionHash: versionHash
3183
3247
  });
3184
3248
  if (versionHash) {
3185
- _context40.next = 6;
3249
+ _context41.next = 6;
3186
3250
  break;
3187
3251
  }
3188
- _context40.next = 5;
3252
+ _context41.next = 5;
3189
3253
  return this.LatestVersionHash({
3190
3254
  objectId: objectId
3191
3255
  });
3192
3256
  case 5:
3193
- versionHash = _context40.sent;
3257
+ versionHash = _context41.sent;
3194
3258
  case 6:
3195
3259
  this.Log("Retrieving content object image url: ".concat(libraryId, " ").concat(objectId, " ").concat(versionHash));
3196
3260
  if (this.objectImageUrls[versionHash]) {
3197
- _context40.next = 26;
3261
+ _context41.next = 26;
3198
3262
  break;
3199
3263
  }
3200
- _context40.prev = 8;
3201
- _context40.next = 11;
3264
+ _context41.prev = 8;
3265
+ _context41.next = 11;
3202
3266
  return this.ContentObjectMetadata({
3203
3267
  versionHash: versionHash,
3204
3268
  metadataSubtree: imagePath
3205
3269
  });
3206
3270
  case 11:
3207
- imageMetadata = _context40.sent;
3271
+ imageMetadata = _context41.sent;
3208
3272
  if (imageMetadata) {
3209
- _context40.next = 15;
3273
+ _context41.next = 15;
3210
3274
  break;
3211
3275
  }
3212
3276
  this.Log("No image url set: ".concat(libraryId, " ").concat(objectId, " ").concat(versionHash));
3213
- return _context40.abrupt("return");
3277
+ return _context41.abrupt("return");
3214
3278
  case 15:
3215
- _context40.next = 21;
3279
+ _context41.next = 21;
3216
3280
  break;
3217
3281
  case 17:
3218
- _context40.prev = 17;
3219
- _context40.t0 = _context40["catch"](8);
3282
+ _context41.prev = 17;
3283
+ _context41.t0 = _context41["catch"](8);
3220
3284
  this.Log("Unable to query for image metadata: ".concat(libraryId, " ").concat(objectId, " ").concat(versionHash), true);
3221
- this.Log(_context40.t0, true);
3285
+ this.Log(_context41.t0, true);
3222
3286
  case 21:
3223
3287
  _queryParams = {};
3224
3288
  if (height && !isNaN(parseInt(height))) {
3225
3289
  _queryParams["height"] = parseInt(height);
3226
3290
  }
3227
- _context40.next = 25;
3291
+ _context41.next = 25;
3228
3292
  return this.LinkUrl({
3229
3293
  versionHash: versionHash,
3230
3294
  linkPath: imagePath,
3231
3295
  queryParams: _queryParams
3232
3296
  });
3233
3297
  case 25:
3234
- this.objectImageUrls[versionHash] = _context40.sent;
3298
+ this.objectImageUrls[versionHash] = _context41.sent;
3235
3299
  case 26:
3236
- return _context40.abrupt("return", this.objectImageUrls[versionHash]);
3300
+ return _context41.abrupt("return", this.objectImageUrls[versionHash]);
3237
3301
  case 27:
3238
3302
  case "end":
3239
- return _context40.stop();
3303
+ return _context41.stop();
3240
3304
  }
3241
- }, _callee40, this, [[8, 17]]);
3305
+ }, _callee41, this, [[8, 17]]);
3242
3306
  }));
3243
- return function (_x39) {
3244
- return _ref71.apply(this, arguments);
3307
+ return function (_x40) {
3308
+ return _ref73.apply(this, arguments);
3245
3309
  };
3246
3310
  }();
3247
3311
  var EmbedMediaTypes = {
@@ -3298,12 +3362,12 @@ var EmbedMediaTypes = {
3298
3362
  * @returns {Promise<string>} - Will return an embed URL
3299
3363
  */
3300
3364
  exports.EmbedUrl = /*#__PURE__*/function () {
3301
- var _ref73 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee41(_ref72) {
3302
- var objectId, versionHash, _ref72$duration, duration, _ref72$mediaType, mediaType, _ref72$options, options, controlsMap, embedUrl, networkInfo, networkName, permission, data, _i, _Object$keys, option, token;
3303
- return _regeneratorRuntime.wrap(function _callee41$(_context41) {
3304
- while (1) switch (_context41.prev = _context41.next) {
3365
+ var _ref75 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(_ref74) {
3366
+ var objectId, versionHash, _ref74$duration, duration, _ref74$mediaType, mediaType, _ref74$options, options, controlsMap, embedUrl, networkInfo, networkName, permission, data, _i, _Object$keys, option, token;
3367
+ return _regeneratorRuntime.wrap(function _callee42$(_context42) {
3368
+ while (1) switch (_context42.prev = _context42.next) {
3305
3369
  case 0:
3306
- objectId = _ref72.objectId, versionHash = _ref72.versionHash, _ref72$duration = _ref72.duration, duration = _ref72$duration === void 0 ? 86400000 : _ref72$duration, _ref72$mediaType = _ref72.mediaType, mediaType = _ref72$mediaType === void 0 ? "video" : _ref72$mediaType, _ref72$options = _ref72.options, options = _ref72$options === void 0 ? {} : _ref72$options;
3370
+ objectId = _ref74.objectId, versionHash = _ref74.versionHash, _ref74$duration = _ref74.duration, duration = _ref74$duration === void 0 ? 86400000 : _ref74$duration, _ref74$mediaType = _ref74.mediaType, mediaType = _ref74$mediaType === void 0 ? "video" : _ref74$mediaType, _ref74$options = _ref74.options, options = _ref74$options === void 0 ? {} : _ref74$options;
3307
3371
  if (versionHash) {
3308
3372
  ValidateVersion(versionHash);
3309
3373
  } else if (objectId) {
@@ -3319,17 +3383,17 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3319
3383
  hideWithVolume: "hv"
3320
3384
  };
3321
3385
  embedUrl = new URL("https://embed.v3.contentfabric.io");
3322
- _context41.next = 7;
3386
+ _context42.next = 7;
3323
3387
  return this.NetworkInfo();
3324
3388
  case 7:
3325
- networkInfo = _context41.sent;
3389
+ networkInfo = _context42.sent;
3326
3390
  networkName = networkInfo.name === "demov3" ? "demo" : networkInfo.name === "test" && networkInfo.id === 955205 ? "testv4" : networkInfo.name;
3327
- _context41.next = 11;
3391
+ _context42.next = 11;
3328
3392
  return this.Permission({
3329
3393
  objectId: objectId ? objectId : this.utils.DecodeVersionHash(versionHash).objectId
3330
3394
  });
3331
3395
  case 11:
3332
- permission = _context41.sent;
3396
+ permission = _context42.sent;
3333
3397
  embedUrl.searchParams.set("p", "");
3334
3398
  embedUrl.searchParams.set("net", networkName);
3335
3399
  if (versionHash) {
@@ -3342,69 +3406,69 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3342
3406
  _i = 0, _Object$keys = Object.keys(options);
3343
3407
  case 18:
3344
3408
  if (!(_i < _Object$keys.length)) {
3345
- _context41.next = 68;
3409
+ _context42.next = 68;
3346
3410
  break;
3347
3411
  }
3348
3412
  option = _Object$keys[_i];
3349
- _context41.t0 = option;
3350
- _context41.next = _context41.t0 === "accountWatermark" ? 23 : _context41.t0 === "autoplay" ? 25 : _context41.t0 === "capLevelToPlayerSize" ? 27 : _context41.t0 === "clipEnd" ? 29 : _context41.t0 === "clipStart" ? 31 : _context41.t0 === "controls" ? 33 : _context41.t0 === "description" ? 35 : _context41.t0 === "directLink" ? 37 : _context41.t0 === "linkPath" ? 39 : _context41.t0 === "loop" ? 41 : _context41.t0 === "muted" ? 43 : _context41.t0 === "offerings" ? 45 : _context41.t0 === "posterUrl" ? 47 : _context41.t0 === "protocols" ? 49 : _context41.t0 === "showShare" ? 51 : _context41.t0 === "showTitle" ? 53 : _context41.t0 === "title" ? 55 : _context41.t0 === "viewRecordKey" ? 57 : _context41.t0 === "useTicketCodes" ? 59 : 65;
3413
+ _context42.t0 = option;
3414
+ _context42.next = _context42.t0 === "accountWatermark" ? 23 : _context42.t0 === "autoplay" ? 25 : _context42.t0 === "capLevelToPlayerSize" ? 27 : _context42.t0 === "clipEnd" ? 29 : _context42.t0 === "clipStart" ? 31 : _context42.t0 === "controls" ? 33 : _context42.t0 === "description" ? 35 : _context42.t0 === "directLink" ? 37 : _context42.t0 === "linkPath" ? 39 : _context42.t0 === "loop" ? 41 : _context42.t0 === "muted" ? 43 : _context42.t0 === "offerings" ? 45 : _context42.t0 === "posterUrl" ? 47 : _context42.t0 === "protocols" ? 49 : _context42.t0 === "showShare" ? 51 : _context42.t0 === "showTitle" ? 53 : _context42.t0 === "title" ? 55 : _context42.t0 === "viewRecordKey" ? 57 : _context42.t0 === "useTicketCodes" ? 59 : 65;
3351
3415
  break;
3352
3416
  case 23:
3353
3417
  embedUrl.searchParams.set("awm", "");
3354
- return _context41.abrupt("break", 65);
3418
+ return _context42.abrupt("break", 65);
3355
3419
  case 25:
3356
3420
  embedUrl.searchParams.set("ap", "");
3357
- return _context41.abrupt("break", 65);
3421
+ return _context42.abrupt("break", 65);
3358
3422
  case 27:
3359
3423
  embedUrl.searchParams.set("cap", "");
3360
- return _context41.abrupt("break", 65);
3424
+ return _context42.abrupt("break", 65);
3361
3425
  case 29:
3362
3426
  embedUrl.searchParams.set("end", options.clipEnd);
3363
- return _context41.abrupt("break", 65);
3427
+ return _context42.abrupt("break", 65);
3364
3428
  case 31:
3365
3429
  embedUrl.searchParams.set("start", options.clipStart);
3366
- return _context41.abrupt("break", 65);
3430
+ return _context42.abrupt("break", 65);
3367
3431
  case 33:
3368
3432
  if (options.controls !== "hide") {
3369
3433
  embedUrl.searchParams.set("ct", controlsMap[options.controls]);
3370
3434
  }
3371
- return _context41.abrupt("break", 65);
3435
+ return _context42.abrupt("break", 65);
3372
3436
  case 35:
3373
3437
  data["og:description"] = options.description;
3374
- return _context41.abrupt("break", 65);
3438
+ return _context42.abrupt("break", 65);
3375
3439
  case 37:
3376
3440
  embedUrl.searchParams.set("dr", "");
3377
- return _context41.abrupt("break", 65);
3441
+ return _context42.abrupt("break", 65);
3378
3442
  case 39:
3379
3443
  embedUrl.searchParams.set("ln", this.utils.B64(options.linkPath));
3380
- return _context41.abrupt("break", 65);
3444
+ return _context42.abrupt("break", 65);
3381
3445
  case 41:
3382
3446
  embedUrl.searchParams.set("lp", "");
3383
- return _context41.abrupt("break", 65);
3447
+ return _context42.abrupt("break", 65);
3384
3448
  case 43:
3385
3449
  embedUrl.searchParams.set("m", "");
3386
- return _context41.abrupt("break", 65);
3450
+ return _context42.abrupt("break", 65);
3387
3451
  case 45:
3388
3452
  embedUrl.searchParams.set("off", options.offerings.join(","));
3389
- return _context41.abrupt("break", 65);
3453
+ return _context42.abrupt("break", 65);
3390
3454
  case 47:
3391
3455
  embedUrl.searchParams.set("pst", options.posterUrl);
3392
- return _context41.abrupt("break", 65);
3456
+ return _context42.abrupt("break", 65);
3393
3457
  case 49:
3394
3458
  embedUrl.searchParams.set("ptc", options.protocols.join(","));
3395
- return _context41.abrupt("break", 65);
3459
+ return _context42.abrupt("break", 65);
3396
3460
  case 51:
3397
3461
  embedUrl.searchParams.set("sh", "");
3398
- return _context41.abrupt("break", 65);
3462
+ return _context42.abrupt("break", 65);
3399
3463
  case 53:
3400
3464
  embedUrl.searchParams.set("st", "");
3401
- return _context41.abrupt("break", 65);
3465
+ return _context42.abrupt("break", 65);
3402
3466
  case 55:
3403
3467
  data["og:title"] = options.title;
3404
- return _context41.abrupt("break", 65);
3468
+ return _context42.abrupt("break", 65);
3405
3469
  case 57:
3406
3470
  embedUrl.searchParams.set("vrk", options.viewRecordKey);
3407
- return _context41.abrupt("break", 65);
3471
+ return _context42.abrupt("break", 65);
3408
3472
  case 59:
3409
3473
  embedUrl.searchParams.set("ptk", "");
3410
3474
  if (options.tenantId) {
@@ -3419,10 +3483,10 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3419
3483
  if (options.ticketSubject) {
3420
3484
  embedUrl.searchParams.set("sbj", Buffer.from(options.ticketSubject).toString("base64"));
3421
3485
  }
3422
- return _context41.abrupt("break", 65);
3486
+ return _context42.abrupt("break", 65);
3423
3487
  case 65:
3424
3488
  _i++;
3425
- _context41.next = 18;
3489
+ _context42.next = 18;
3426
3490
  break;
3427
3491
  case 68:
3428
3492
  if (Object.keys(data).length > 0) {
@@ -3431,28 +3495,28 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3431
3495
  })));
3432
3496
  }
3433
3497
  if (!["owner", "editable", "viewable"].includes(permission)) {
3434
- _context41.next = 74;
3498
+ _context42.next = 74;
3435
3499
  break;
3436
3500
  }
3437
- _context41.next = 72;
3501
+ _context42.next = 72;
3438
3502
  return this.CreateSignedToken({
3439
3503
  objectId: objectId,
3440
3504
  versionHash: versionHash,
3441
3505
  duration: duration
3442
3506
  });
3443
3507
  case 72:
3444
- token = _context41.sent;
3508
+ token = _context42.sent;
3445
3509
  embedUrl.searchParams.set("ath", token);
3446
3510
  case 74:
3447
- return _context41.abrupt("return", embedUrl.toString());
3511
+ return _context42.abrupt("return", embedUrl.toString());
3448
3512
  case 75:
3449
3513
  case "end":
3450
- return _context41.stop();
3514
+ return _context42.stop();
3451
3515
  }
3452
- }, _callee41, this);
3516
+ }, _callee42, this);
3453
3517
  }));
3454
- return function (_x40) {
3455
- return _ref73.apply(this, arguments);
3518
+ return function (_x41) {
3519
+ return _ref75.apply(this, arguments);
3456
3520
  };
3457
3521
  }();
3458
3522
 
@@ -3472,13 +3536,13 @@ exports.EmbedUrl = /*#__PURE__*/function () {
3472
3536
  * @returns {Promise<Object>} - Description of created object
3473
3537
  */
3474
3538
  exports.ContentObjectGraph = /*#__PURE__*/function () {
3475
- var _ref75 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(_ref74) {
3539
+ var _ref77 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref76) {
3476
3540
  var _this10 = this;
3477
- var libraryId, objectId, versionHash, _ref74$autoUpdate, autoUpdate, select, path, errorInfo, cycles, info;
3478
- return _regeneratorRuntime.wrap(function _callee43$(_context43) {
3479
- while (1) switch (_context43.prev = _context43.next) {
3541
+ var libraryId, objectId, versionHash, _ref76$autoUpdate, autoUpdate, select, path, errorInfo, cycles, info;
3542
+ return _regeneratorRuntime.wrap(function _callee44$(_context44) {
3543
+ while (1) switch (_context44.prev = _context44.next) {
3480
3544
  case 0:
3481
- libraryId = _ref74.libraryId, objectId = _ref74.objectId, versionHash = _ref74.versionHash, _ref74$autoUpdate = _ref74.autoUpdate, autoUpdate = _ref74$autoUpdate === void 0 ? false : _ref74$autoUpdate, select = _ref74.select;
3545
+ libraryId = _ref76.libraryId, objectId = _ref76.objectId, versionHash = _ref76.versionHash, _ref76$autoUpdate = _ref76.autoUpdate, autoUpdate = _ref76$autoUpdate === void 0 ? false : _ref76$autoUpdate, select = _ref76.select;
3482
3546
  ValidateParameters({
3483
3547
  libraryId: libraryId,
3484
3548
  objectId: objectId,
@@ -3489,133 +3553,133 @@ exports.ContentObjectGraph = /*#__PURE__*/function () {
3489
3553
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
3490
3554
  }
3491
3555
  path = UrlJoin("q", versionHash || objectId, "links");
3492
- _context43.prev = 5;
3493
- _context43.t0 = this.utils;
3494
- _context43.t1 = this.HttpClient;
3495
- _context43.next = 10;
3556
+ _context44.prev = 5;
3557
+ _context44.t0 = this.utils;
3558
+ _context44.t1 = this.HttpClient;
3559
+ _context44.next = 10;
3496
3560
  return this.authClient.AuthorizationHeader({
3497
3561
  libraryId: libraryId,
3498
3562
  objectId: objectId,
3499
3563
  versionHash: versionHash
3500
3564
  });
3501
3565
  case 10:
3502
- _context43.t2 = _context43.sent;
3503
- _context43.t3 = {
3566
+ _context44.t2 = _context44.sent;
3567
+ _context44.t3 = {
3504
3568
  auto_update: autoUpdate,
3505
3569
  select: select
3506
3570
  };
3507
- _context43.t4 = path;
3508
- _context43.t5 = {
3509
- headers: _context43.t2,
3510
- queryParams: _context43.t3,
3571
+ _context44.t4 = path;
3572
+ _context44.t5 = {
3573
+ headers: _context44.t2,
3574
+ queryParams: _context44.t3,
3511
3575
  method: "GET",
3512
- path: _context43.t4
3576
+ path: _context44.t4
3513
3577
  };
3514
- _context43.t6 = _context43.t1.Request.call(_context43.t1, _context43.t5);
3515
- _context43.next = 17;
3516
- return _context43.t0.ResponseToJson.call(_context43.t0, _context43.t6);
3578
+ _context44.t6 = _context44.t1.Request.call(_context44.t1, _context44.t5);
3579
+ _context44.next = 17;
3580
+ return _context44.t0.ResponseToJson.call(_context44.t0, _context44.t6);
3517
3581
  case 17:
3518
- return _context43.abrupt("return", _context43.sent);
3582
+ return _context44.abrupt("return", _context44.sent);
3519
3583
  case 20:
3520
- _context43.prev = 20;
3521
- _context43.t7 = _context43["catch"](5);
3522
- _context43.prev = 22;
3523
- cycles = _context43.t7.body.errors[0].cause.cause.cause.cycle;
3584
+ _context44.prev = 20;
3585
+ _context44.t7 = _context44["catch"](5);
3586
+ _context44.prev = 22;
3587
+ cycles = _context44.t7.body.errors[0].cause.cause.cause.cycle;
3524
3588
  if (!(!cycles || cycles.length === 0)) {
3525
- _context43.next = 26;
3589
+ _context44.next = 26;
3526
3590
  break;
3527
3591
  }
3528
- throw _context43.t7;
3592
+ throw _context44.t7;
3529
3593
  case 26:
3530
3594
  info = {};
3531
- _context43.next = 29;
3595
+ _context44.next = 29;
3532
3596
  return Promise.all(cycles.map( /*#__PURE__*/function () {
3533
- var _ref76 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee42(cycleHash) {
3597
+ var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee43(cycleHash) {
3534
3598
  var cycleId, name;
3535
- return _regeneratorRuntime.wrap(function _callee42$(_context42) {
3536
- while (1) switch (_context42.prev = _context42.next) {
3599
+ return _regeneratorRuntime.wrap(function _callee43$(_context43) {
3600
+ while (1) switch (_context43.prev = _context43.next) {
3537
3601
  case 0:
3538
3602
  if (!info[cycleHash]) {
3539
- _context42.next = 2;
3603
+ _context43.next = 2;
3540
3604
  break;
3541
3605
  }
3542
- return _context42.abrupt("return");
3606
+ return _context43.abrupt("return");
3543
3607
  case 2:
3544
3608
  cycleId = _this10.utils.DecodeVersionHash(cycleHash).objectId;
3545
- _context42.next = 5;
3609
+ _context43.next = 5;
3546
3610
  return _this10.ContentObjectMetadata({
3547
3611
  versionHash: cycleHash,
3548
3612
  metadataSubtree: "public/asset_metadata/display_title"
3549
3613
  });
3550
3614
  case 5:
3551
- _context42.t2 = _context42.sent;
3552
- if (_context42.t2) {
3553
- _context42.next = 10;
3615
+ _context43.t2 = _context43.sent;
3616
+ if (_context43.t2) {
3617
+ _context43.next = 10;
3554
3618
  break;
3555
3619
  }
3556
- _context42.next = 9;
3620
+ _context43.next = 9;
3557
3621
  return _this10.ContentObjectMetadata({
3558
3622
  versionHash: cycleHash,
3559
3623
  metadataSubtree: "public/name"
3560
3624
  });
3561
3625
  case 9:
3562
- _context42.t2 = _context42.sent;
3626
+ _context43.t2 = _context43.sent;
3563
3627
  case 10:
3564
- _context42.t1 = _context42.t2;
3565
- if (_context42.t1) {
3566
- _context42.next = 15;
3628
+ _context43.t1 = _context43.t2;
3629
+ if (_context43.t1) {
3630
+ _context43.next = 15;
3567
3631
  break;
3568
3632
  }
3569
- _context42.next = 14;
3633
+ _context43.next = 14;
3570
3634
  return _this10.ContentObjectMetadata({
3571
3635
  versionHash: cycleHash,
3572
3636
  metadataSubtree: "name"
3573
3637
  });
3574
3638
  case 14:
3575
- _context42.t1 = _context42.sent;
3639
+ _context43.t1 = _context43.sent;
3576
3640
  case 15:
3577
- _context42.t0 = _context42.t1;
3578
- if (_context42.t0) {
3579
- _context42.next = 18;
3641
+ _context43.t0 = _context43.t1;
3642
+ if (_context43.t0) {
3643
+ _context43.next = 18;
3580
3644
  break;
3581
3645
  }
3582
- _context42.t0 = cycleId;
3646
+ _context43.t0 = cycleId;
3583
3647
  case 18:
3584
- name = _context42.t0;
3648
+ name = _context43.t0;
3585
3649
  info[cycleHash] = {
3586
3650
  name: name,
3587
3651
  objectId: cycleId
3588
3652
  };
3589
3653
  case 20:
3590
3654
  case "end":
3591
- return _context42.stop();
3655
+ return _context43.stop();
3592
3656
  }
3593
- }, _callee42);
3657
+ }, _callee43);
3594
3658
  }));
3595
- return function (_x42) {
3596
- return _ref76.apply(this, arguments);
3659
+ return function (_x43) {
3660
+ return _ref78.apply(this, arguments);
3597
3661
  };
3598
3662
  }()));
3599
3663
  case 29:
3600
3664
  errorInfo = cycles.map(function (cycleHash) {
3601
3665
  return "".concat(info[cycleHash].name, " (").concat(info[cycleHash].objectId, ")");
3602
3666
  });
3603
- _context43.next = 35;
3667
+ _context44.next = 35;
3604
3668
  break;
3605
3669
  case 32:
3606
- _context43.prev = 32;
3607
- _context43.t8 = _context43["catch"](22);
3608
- throw _context43.t7;
3670
+ _context44.prev = 32;
3671
+ _context44.t8 = _context44["catch"](22);
3672
+ throw _context44.t7;
3609
3673
  case 35:
3610
3674
  throw new Error("Cycle found in links: ".concat(errorInfo.join(" -> ")));
3611
3675
  case 36:
3612
3676
  case "end":
3613
- return _context43.stop();
3677
+ return _context44.stop();
3614
3678
  }
3615
- }, _callee43, this, [[5, 20], [22, 32]]);
3679
+ }, _callee44, this, [[5, 20], [22, 32]]);
3616
3680
  }));
3617
- return function (_x41) {
3618
- return _ref75.apply(this, arguments);
3681
+ return function (_x42) {
3682
+ return _ref77.apply(this, arguments);
3619
3683
  };
3620
3684
  }();
3621
3685
 
@@ -3635,12 +3699,12 @@ exports.ContentObjectGraph = /*#__PURE__*/function () {
3635
3699
  * @returns {Promise<string>} - Version hash of the link's target
3636
3700
  */
3637
3701
  exports.LinkTarget = /*#__PURE__*/function () {
3638
- var _ref78 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee44(_ref77) {
3702
+ var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref79) {
3639
3703
  var libraryId, objectId, versionHash, writeToken, linkPath, authorizationToken, linkInfo, targetHash, subPath;
3640
- return _regeneratorRuntime.wrap(function _callee44$(_context44) {
3641
- while (1) switch (_context44.prev = _context44.next) {
3704
+ return _regeneratorRuntime.wrap(function _callee45$(_context45) {
3705
+ while (1) switch (_context45.prev = _context45.next) {
3642
3706
  case 0:
3643
- libraryId = _ref77.libraryId, objectId = _ref77.objectId, versionHash = _ref77.versionHash, writeToken = _ref77.writeToken, linkPath = _ref77.linkPath, authorizationToken = _ref77.authorizationToken, linkInfo = _ref77.linkInfo;
3707
+ libraryId = _ref79.libraryId, objectId = _ref79.objectId, versionHash = _ref79.versionHash, writeToken = _ref79.writeToken, linkPath = _ref79.linkPath, authorizationToken = _ref79.authorizationToken, linkInfo = _ref79.linkInfo;
3644
3708
  ValidateParameters({
3645
3709
  libraryId: libraryId,
3646
3710
  objectId: objectId,
@@ -3653,21 +3717,21 @@ exports.LinkTarget = /*#__PURE__*/function () {
3653
3717
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
3654
3718
  }
3655
3719
  if (!(writeToken && !libraryId)) {
3656
- _context44.next = 8;
3720
+ _context45.next = 8;
3657
3721
  break;
3658
3722
  }
3659
- _context44.next = 7;
3723
+ _context45.next = 7;
3660
3724
  return this.ContentObjectLibraryId({
3661
3725
  objectId: objectId
3662
3726
  });
3663
3727
  case 7:
3664
- libraryId = _context44.sent;
3728
+ libraryId = _context45.sent;
3665
3729
  case 8:
3666
3730
  if (linkInfo) {
3667
- _context44.next = 12;
3731
+ _context45.next = 12;
3668
3732
  break;
3669
3733
  }
3670
- _context44.next = 11;
3734
+ _context45.next = 11;
3671
3735
  return this.ContentObjectMetadata({
3672
3736
  libraryId: libraryId,
3673
3737
  objectId: objectId,
@@ -3680,10 +3744,10 @@ exports.LinkTarget = /*#__PURE__*/function () {
3680
3744
  authorizationToken: authorizationToken
3681
3745
  });
3682
3746
  case 11:
3683
- linkInfo = _context44.sent;
3747
+ linkInfo = _context45.sent;
3684
3748
  case 12:
3685
3749
  if (!(linkInfo && linkInfo["/"])) {
3686
- _context44.next = 27;
3750
+ _context45.next = 27;
3687
3751
  break;
3688
3752
  }
3689
3753
  /* For absolute links - extract the hash from the link itself. Otherwise use "container" */
@@ -3692,32 +3756,32 @@ exports.LinkTarget = /*#__PURE__*/function () {
3692
3756
  targetHash = linkInfo["."].container;
3693
3757
  }
3694
3758
  if (!targetHash) {
3695
- _context44.next = 19;
3759
+ _context45.next = 19;
3696
3760
  break;
3697
3761
  }
3698
- return _context44.abrupt("return", targetHash);
3762
+ return _context45.abrupt("return", targetHash);
3699
3763
  case 19:
3700
3764
  if (!versionHash) {
3701
- _context44.next = 21;
3765
+ _context45.next = 21;
3702
3766
  break;
3703
3767
  }
3704
- return _context44.abrupt("return", versionHash);
3768
+ return _context45.abrupt("return", versionHash);
3705
3769
  case 21:
3706
- _context44.t0 = versionHash;
3707
- if (_context44.t0) {
3708
- _context44.next = 26;
3770
+ _context45.t0 = versionHash;
3771
+ if (_context45.t0) {
3772
+ _context45.next = 26;
3709
3773
  break;
3710
3774
  }
3711
- _context44.next = 25;
3775
+ _context45.next = 25;
3712
3776
  return this.LatestVersionHash({
3713
3777
  objectId: objectId
3714
3778
  });
3715
3779
  case 25:
3716
- _context44.t0 = _context44.sent;
3780
+ _context45.t0 = _context45.sent;
3717
3781
  case 26:
3718
- return _context44.abrupt("return", _context44.t0);
3782
+ return _context45.abrupt("return", _context45.t0);
3719
3783
  case 27:
3720
- _context44.next = 29;
3784
+ _context45.next = 29;
3721
3785
  return this.ContentObjectMetadata({
3722
3786
  libraryId: libraryId,
3723
3787
  objectId: objectId,
@@ -3728,50 +3792,50 @@ exports.LinkTarget = /*#__PURE__*/function () {
3728
3792
  authorizationToken: authorizationToken
3729
3793
  });
3730
3794
  case 29:
3731
- linkInfo = _context44.sent;
3795
+ linkInfo = _context45.sent;
3732
3796
  if (!(!linkInfo || !linkInfo["."])) {
3733
- _context44.next = 49;
3797
+ _context45.next = 49;
3734
3798
  break;
3735
3799
  }
3736
3800
  if (!(_typeof(linkInfo) === "object")) {
3737
- _context44.next = 38;
3801
+ _context45.next = 38;
3738
3802
  break;
3739
3803
  }
3740
- _context44.t1 = versionHash;
3741
- if (_context44.t1) {
3742
- _context44.next = 37;
3804
+ _context45.t1 = versionHash;
3805
+ if (_context45.t1) {
3806
+ _context45.next = 37;
3743
3807
  break;
3744
3808
  }
3745
- _context44.next = 36;
3809
+ _context45.next = 36;
3746
3810
  return this.LatestVersionHash({
3747
3811
  objectId: objectId
3748
3812
  });
3749
3813
  case 36:
3750
- _context44.t1 = _context44.sent;
3814
+ _context45.t1 = _context45.sent;
3751
3815
  case 37:
3752
- return _context44.abrupt("return", _context44.t1);
3816
+ return _context45.abrupt("return", _context45.t1);
3753
3817
  case 38:
3754
3818
  // linkPath is not a direct link, but points to a literal value - back up one path element to find the container
3755
3819
  subPath = linkPath.split("/").slice(0, -1).join("/");
3756
3820
  if (subPath) {
3757
- _context44.next = 46;
3821
+ _context45.next = 46;
3758
3822
  break;
3759
3823
  }
3760
- _context44.t2 = versionHash;
3761
- if (_context44.t2) {
3762
- _context44.next = 45;
3824
+ _context45.t2 = versionHash;
3825
+ if (_context45.t2) {
3826
+ _context45.next = 45;
3763
3827
  break;
3764
3828
  }
3765
- _context44.next = 44;
3829
+ _context45.next = 44;
3766
3830
  return this.LatestVersionHash({
3767
3831
  objectId: objectId
3768
3832
  });
3769
3833
  case 44:
3770
- _context44.t2 = _context44.sent;
3834
+ _context45.t2 = _context45.sent;
3771
3835
  case 45:
3772
- return _context44.abrupt("return", _context44.t2);
3836
+ return _context45.abrupt("return", _context45.t2);
3773
3837
  case 46:
3774
- _context44.next = 48;
3838
+ _context45.next = 48;
3775
3839
  return this.ContentObjectMetadata({
3776
3840
  libraryId: libraryId,
3777
3841
  objectId: objectId,
@@ -3782,17 +3846,17 @@ exports.LinkTarget = /*#__PURE__*/function () {
3782
3846
  authorizationToken: authorizationToken
3783
3847
  });
3784
3848
  case 48:
3785
- linkInfo = _context44.sent;
3849
+ linkInfo = _context45.sent;
3786
3850
  case 49:
3787
- return _context44.abrupt("return", linkInfo["."].source);
3851
+ return _context45.abrupt("return", linkInfo["."].source);
3788
3852
  case 50:
3789
3853
  case "end":
3790
- return _context44.stop();
3854
+ return _context45.stop();
3791
3855
  }
3792
- }, _callee44, this);
3856
+ }, _callee45, this);
3793
3857
  }));
3794
- return function (_x43) {
3795
- return _ref78.apply(this, arguments);
3858
+ return function (_x44) {
3859
+ return _ref80.apply(this, arguments);
3796
3860
  };
3797
3861
  }();
3798
3862
 
@@ -3815,12 +3879,12 @@ exports.LinkTarget = /*#__PURE__*/function () {
3815
3879
  * @returns {Promise<string>} - URL to the specified file with authorization token
3816
3880
  */
3817
3881
  exports.LinkUrl = /*#__PURE__*/function () {
3818
- var _ref80 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee45(_ref79) {
3819
- var libraryId, objectId, versionHash, writeToken, linkPath, mimeType, authorizationToken, _ref79$queryParams, queryParams, _ref79$channelAuth, channelAuth, _ref79$noAuth, noAuth, path, authorization;
3820
- return _regeneratorRuntime.wrap(function _callee45$(_context45) {
3821
- while (1) switch (_context45.prev = _context45.next) {
3882
+ var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref81) {
3883
+ var libraryId, objectId, versionHash, writeToken, linkPath, mimeType, authorizationToken, _ref81$queryParams, queryParams, _ref81$channelAuth, channelAuth, _ref81$noAuth, noAuth, path, authorization;
3884
+ return _regeneratorRuntime.wrap(function _callee46$(_context46) {
3885
+ while (1) switch (_context46.prev = _context46.next) {
3822
3886
  case 0:
3823
- libraryId = _ref79.libraryId, objectId = _ref79.objectId, versionHash = _ref79.versionHash, writeToken = _ref79.writeToken, linkPath = _ref79.linkPath, mimeType = _ref79.mimeType, authorizationToken = _ref79.authorizationToken, _ref79$queryParams = _ref79.queryParams, queryParams = _ref79$queryParams === void 0 ? {} : _ref79$queryParams, _ref79$channelAuth = _ref79.channelAuth, channelAuth = _ref79$channelAuth === void 0 ? false : _ref79$channelAuth, _ref79$noAuth = _ref79.noAuth, noAuth = _ref79$noAuth === void 0 ? false : _ref79$noAuth;
3887
+ libraryId = _ref81.libraryId, objectId = _ref81.objectId, versionHash = _ref81.versionHash, writeToken = _ref81.writeToken, linkPath = _ref81.linkPath, mimeType = _ref81.mimeType, authorizationToken = _ref81.authorizationToken, _ref81$queryParams = _ref81.queryParams, queryParams = _ref81$queryParams === void 0 ? {} : _ref81$queryParams, _ref81$channelAuth = _ref81.channelAuth, channelAuth = _ref81$channelAuth === void 0 ? false : _ref81$channelAuth, _ref81$noAuth = _ref81.noAuth, noAuth = _ref81$noAuth === void 0 ? false : _ref81$noAuth;
3824
3888
  ValidateParameters({
3825
3889
  libraryId: libraryId,
3826
3890
  objectId: objectId,
@@ -3830,7 +3894,7 @@ exports.LinkUrl = /*#__PURE__*/function () {
3830
3894
  ValidateWriteToken(writeToken);
3831
3895
  }
3832
3896
  if (linkPath) {
3833
- _context45.next = 5;
3897
+ _context46.next = 5;
3834
3898
  break;
3835
3899
  }
3836
3900
  throw Error("Link path not specified");
@@ -3844,8 +3908,8 @@ exports.LinkUrl = /*#__PURE__*/function () {
3844
3908
  path = UrlJoin("q", versionHash, "meta", linkPath);
3845
3909
  }
3846
3910
  authorization = [authorizationToken];
3847
- _context45.t0 = authorization;
3848
- _context45.next = 11;
3911
+ _context46.t0 = authorization;
3912
+ _context46.next = 11;
3849
3913
  return this.MetadataAuth({
3850
3914
  libraryId: libraryId,
3851
3915
  objectId: objectId,
@@ -3855,8 +3919,8 @@ exports.LinkUrl = /*#__PURE__*/function () {
3855
3919
  noAuth: noAuth
3856
3920
  });
3857
3921
  case 11:
3858
- _context45.t1 = _context45.sent;
3859
- _context45.t0.push.call(_context45.t0, _context45.t1);
3922
+ _context46.t1 = _context46.sent;
3923
+ _context46.t0.push.call(_context46.t0, _context46.t1);
3860
3924
  if (queryParams.authorization) {
3861
3925
  authorization.push(queryParams.authorization);
3862
3926
  }
@@ -3869,18 +3933,18 @@ exports.LinkUrl = /*#__PURE__*/function () {
3869
3933
  if (mimeType) {
3870
3934
  queryParams["header-accept"] = mimeType;
3871
3935
  }
3872
- return _context45.abrupt("return", this.HttpClient.URL({
3936
+ return _context46.abrupt("return", this.HttpClient.URL({
3873
3937
  path: path,
3874
3938
  queryParams: queryParams
3875
3939
  }));
3876
3940
  case 17:
3877
3941
  case "end":
3878
- return _context45.stop();
3942
+ return _context46.stop();
3879
3943
  }
3880
- }, _callee45, this);
3944
+ }, _callee46, this);
3881
3945
  }));
3882
- return function (_x44) {
3883
- return _ref80.apply(this, arguments);
3946
+ return function (_x45) {
3947
+ return _ref82.apply(this, arguments);
3884
3948
  };
3885
3949
  }();
3886
3950
 
@@ -3899,13 +3963,13 @@ exports.LinkUrl = /*#__PURE__*/function () {
3899
3963
  * @param {boolean=} channelAuth=false - If specified, state channel authorization will be performed instead of access request authorization
3900
3964
  */
3901
3965
  exports.LinkData = /*#__PURE__*/function () {
3902
- var _ref82 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee46(_ref81) {
3903
- var libraryId, objectId, versionHash, writeToken, linkPath, _ref81$queryParams, queryParams, _ref81$format, format, channelAuth, linkUrl;
3904
- return _regeneratorRuntime.wrap(function _callee46$(_context46) {
3905
- while (1) switch (_context46.prev = _context46.next) {
3966
+ var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref83) {
3967
+ var libraryId, objectId, versionHash, writeToken, linkPath, _ref83$queryParams, queryParams, _ref83$format, format, channelAuth, linkUrl;
3968
+ return _regeneratorRuntime.wrap(function _callee47$(_context47) {
3969
+ while (1) switch (_context47.prev = _context47.next) {
3906
3970
  case 0:
3907
- libraryId = _ref81.libraryId, objectId = _ref81.objectId, versionHash = _ref81.versionHash, writeToken = _ref81.writeToken, linkPath = _ref81.linkPath, _ref81$queryParams = _ref81.queryParams, queryParams = _ref81$queryParams === void 0 ? {} : _ref81$queryParams, _ref81$format = _ref81.format, format = _ref81$format === void 0 ? "json" : _ref81$format, channelAuth = _ref81.channelAuth;
3908
- _context46.next = 3;
3971
+ libraryId = _ref83.libraryId, objectId = _ref83.objectId, versionHash = _ref83.versionHash, writeToken = _ref83.writeToken, linkPath = _ref83.linkPath, _ref83$queryParams = _ref83.queryParams, queryParams = _ref83$queryParams === void 0 ? {} : _ref83$queryParams, _ref83$format = _ref83.format, format = _ref83$format === void 0 ? "json" : _ref83$format, channelAuth = _ref83.channelAuth;
3972
+ _context47.next = 3;
3909
3973
  return this.LinkUrl({
3910
3974
  libraryId: libraryId,
3911
3975
  objectId: objectId,
@@ -3916,39 +3980,39 @@ exports.LinkData = /*#__PURE__*/function () {
3916
3980
  channelAuth: channelAuth
3917
3981
  });
3918
3982
  case 3:
3919
- linkUrl = _context46.sent;
3920
- _context46.t0 = this.utils;
3921
- _context46.t1 = format;
3922
- _context46.next = 8;
3983
+ linkUrl = _context47.sent;
3984
+ _context47.t0 = this.utils;
3985
+ _context47.t1 = format;
3986
+ _context47.next = 8;
3923
3987
  return HttpClient.Fetch(linkUrl);
3924
3988
  case 8:
3925
- _context46.t2 = _context46.sent;
3926
- return _context46.abrupt("return", _context46.t0.ResponseToFormat.call(_context46.t0, _context46.t1, _context46.t2));
3989
+ _context47.t2 = _context47.sent;
3990
+ return _context47.abrupt("return", _context47.t0.ResponseToFormat.call(_context47.t0, _context47.t1, _context47.t2));
3927
3991
  case 10:
3928
3992
  case "end":
3929
- return _context46.stop();
3993
+ return _context47.stop();
3930
3994
  }
3931
- }, _callee46, this);
3995
+ }, _callee47, this);
3932
3996
  }));
3933
- return function (_x45) {
3934
- return _ref82.apply(this, arguments);
3997
+ return function (_x46) {
3998
+ return _ref84.apply(this, arguments);
3935
3999
  };
3936
4000
  }();
3937
4001
 
3938
4002
  /* Encryption */
3939
4003
 
3940
4004
  exports.CreateEncryptionConk = /*#__PURE__*/function () {
3941
- var _ref84 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee47(_ref83) {
3942
- var libraryId, objectId, versionHash, writeToken, _ref83$createKMSConk, createKMSConk, capKey, existingUserCap, kmsAddress, kmsPublicKey, kmsCapKey, existingKMSCap;
3943
- return _regeneratorRuntime.wrap(function _callee47$(_context47) {
3944
- while (1) switch (_context47.prev = _context47.next) {
4005
+ var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref85) {
4006
+ var libraryId, objectId, versionHash, writeToken, _ref85$createKMSConk, createKMSConk, capKey, existingUserCap, kmsAddress, kmsPublicKey, kmsCapKey, existingKMSCap;
4007
+ return _regeneratorRuntime.wrap(function _callee48$(_context48) {
4008
+ while (1) switch (_context48.prev = _context48.next) {
3945
4009
  case 0:
3946
- libraryId = _ref83.libraryId, objectId = _ref83.objectId, versionHash = _ref83.versionHash, writeToken = _ref83.writeToken, _ref83$createKMSConk = _ref83.createKMSConk, createKMSConk = _ref83$createKMSConk === void 0 ? true : _ref83$createKMSConk;
4010
+ libraryId = _ref85.libraryId, objectId = _ref85.objectId, versionHash = _ref85.versionHash, writeToken = _ref85.writeToken, _ref85$createKMSConk = _ref85.createKMSConk, createKMSConk = _ref85$createKMSConk === void 0 ? true : _ref85$createKMSConk;
3947
4011
  if (!this.signer.remoteSigner) {
3948
- _context47.next = 3;
4012
+ _context48.next = 3;
3949
4013
  break;
3950
4014
  }
3951
- return _context47.abrupt("return");
4015
+ return _context48.abrupt("return");
3952
4016
  case 3:
3953
4017
  ValidateParameters({
3954
4018
  libraryId: libraryId,
@@ -3960,18 +4024,18 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
3960
4024
  objectId = client.DecodeVersionHash(versionHash).objectId;
3961
4025
  }
3962
4026
  if (libraryId) {
3963
- _context47.next = 10;
4027
+ _context48.next = 10;
3964
4028
  break;
3965
4029
  }
3966
- _context47.next = 9;
4030
+ _context48.next = 9;
3967
4031
  return this.ContentObjectLibraryId({
3968
4032
  objectId: objectId
3969
4033
  });
3970
4034
  case 9:
3971
- libraryId = _context47.sent;
4035
+ libraryId = _context48.sent;
3972
4036
  case 10:
3973
4037
  capKey = "eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address));
3974
- _context47.next = 13;
4038
+ _context48.next = 13;
3975
4039
  return this.ContentObjectMetadata({
3976
4040
  libraryId: libraryId,
3977
4041
  objectId: objectId,
@@ -3979,63 +4043,63 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
3979
4043
  metadataSubtree: capKey
3980
4044
  });
3981
4045
  case 13:
3982
- existingUserCap = _context47.sent;
4046
+ existingUserCap = _context48.sent;
3983
4047
  if (!existingUserCap) {
3984
- _context47.next = 20;
4048
+ _context48.next = 20;
3985
4049
  break;
3986
4050
  }
3987
- _context47.next = 17;
4051
+ _context48.next = 17;
3988
4052
  return this.Crypto.DecryptCap(existingUserCap, this.signer._signingKey().privateKey);
3989
4053
  case 17:
3990
- this.encryptionConks[objectId] = _context47.sent;
3991
- _context47.next = 34;
4054
+ this.encryptionConks[objectId] = _context48.sent;
4055
+ _context48.next = 34;
3992
4056
  break;
3993
4057
  case 20:
3994
- _context47.next = 22;
4058
+ _context48.next = 22;
3995
4059
  return this.Crypto.GeneratePrimaryConk({
3996
4060
  spaceId: this.contentSpaceId,
3997
4061
  objectId: objectId
3998
4062
  });
3999
4063
  case 22:
4000
- this.encryptionConks[objectId] = _context47.sent;
4001
- _context47.t0 = this;
4002
- _context47.t1 = libraryId;
4003
- _context47.t2 = objectId;
4004
- _context47.t3 = writeToken;
4005
- _context47.t4 = capKey;
4006
- _context47.next = 30;
4064
+ this.encryptionConks[objectId] = _context48.sent;
4065
+ _context48.t0 = this;
4066
+ _context48.t1 = libraryId;
4067
+ _context48.t2 = objectId;
4068
+ _context48.t3 = writeToken;
4069
+ _context48.t4 = capKey;
4070
+ _context48.next = 30;
4007
4071
  return this.Crypto.EncryptConk(this.encryptionConks[objectId], this.signer._signingKey().publicKey);
4008
4072
  case 30:
4009
- _context47.t5 = _context47.sent;
4010
- _context47.t6 = {
4011
- libraryId: _context47.t1,
4012
- objectId: _context47.t2,
4013
- writeToken: _context47.t3,
4014
- metadataSubtree: _context47.t4,
4015
- metadata: _context47.t5
4073
+ _context48.t5 = _context48.sent;
4074
+ _context48.t6 = {
4075
+ libraryId: _context48.t1,
4076
+ objectId: _context48.t2,
4077
+ writeToken: _context48.t3,
4078
+ metadataSubtree: _context48.t4,
4079
+ metadata: _context48.t5
4016
4080
  };
4017
- _context47.next = 34;
4018
- return _context47.t0.ReplaceMetadata.call(_context47.t0, _context47.t6);
4081
+ _context48.next = 34;
4082
+ return _context48.t0.ReplaceMetadata.call(_context48.t0, _context48.t6);
4019
4083
  case 34:
4020
4084
  if (!createKMSConk) {
4021
- _context47.next = 64;
4085
+ _context48.next = 64;
4022
4086
  break;
4023
4087
  }
4024
- _context47.prev = 35;
4025
- _context47.next = 38;
4088
+ _context48.prev = 35;
4089
+ _context48.next = 38;
4026
4090
  return this.authClient.KMSAddress({
4027
4091
  objectId: objectId
4028
4092
  });
4029
4093
  case 38:
4030
- kmsAddress = _context47.sent;
4031
- _context47.next = 41;
4094
+ kmsAddress = _context48.sent;
4095
+ _context48.next = 41;
4032
4096
  return this.authClient.KMSInfo({
4033
4097
  objectId: objectId
4034
4098
  });
4035
4099
  case 41:
4036
- kmsPublicKey = _context47.sent.publicKey;
4100
+ kmsPublicKey = _context48.sent.publicKey;
4037
4101
  kmsCapKey = "eluv.caps.ikms".concat(this.utils.AddressToHash(kmsAddress));
4038
- _context47.next = 45;
4102
+ _context48.next = 45;
4039
4103
  return this.ContentObjectMetadata({
4040
4104
  libraryId: libraryId,
4041
4105
  // Cap may only exist in draft
@@ -4044,49 +4108,49 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
4044
4108
  metadataSubtree: kmsCapKey
4045
4109
  });
4046
4110
  case 45:
4047
- existingKMSCap = _context47.sent;
4111
+ existingKMSCap = _context48.sent;
4048
4112
  if (existingKMSCap) {
4049
- _context47.next = 58;
4113
+ _context48.next = 58;
4050
4114
  break;
4051
4115
  }
4052
- _context47.t7 = this;
4053
- _context47.t8 = libraryId;
4054
- _context47.t9 = objectId;
4055
- _context47.t10 = writeToken;
4056
- _context47.t11 = kmsCapKey;
4057
- _context47.next = 54;
4116
+ _context48.t7 = this;
4117
+ _context48.t8 = libraryId;
4118
+ _context48.t9 = objectId;
4119
+ _context48.t10 = writeToken;
4120
+ _context48.t11 = kmsCapKey;
4121
+ _context48.next = 54;
4058
4122
  return this.Crypto.EncryptConk(this.encryptionConks[objectId], kmsPublicKey);
4059
4123
  case 54:
4060
- _context47.t12 = _context47.sent;
4061
- _context47.t13 = {
4062
- libraryId: _context47.t8,
4063
- objectId: _context47.t9,
4064
- writeToken: _context47.t10,
4065
- metadataSubtree: _context47.t11,
4066
- metadata: _context47.t12
4124
+ _context48.t12 = _context48.sent;
4125
+ _context48.t13 = {
4126
+ libraryId: _context48.t8,
4127
+ objectId: _context48.t9,
4128
+ writeToken: _context48.t10,
4129
+ metadataSubtree: _context48.t11,
4130
+ metadata: _context48.t12
4067
4131
  };
4068
- _context47.next = 58;
4069
- return _context47.t7.ReplaceMetadata.call(_context47.t7, _context47.t13);
4132
+ _context48.next = 58;
4133
+ return _context48.t7.ReplaceMetadata.call(_context48.t7, _context48.t13);
4070
4134
  case 58:
4071
- _context47.next = 64;
4135
+ _context48.next = 64;
4072
4136
  break;
4073
4137
  case 60:
4074
- _context47.prev = 60;
4075
- _context47.t14 = _context47["catch"](35);
4138
+ _context48.prev = 60;
4139
+ _context48.t14 = _context48["catch"](35);
4076
4140
  // eslint-disable-next-line no-console
4077
4141
  console.error("Failed to create encryption cap for KMS:");
4078
4142
  // eslint-disable-next-line no-console
4079
- console.error(_context47.t14);
4143
+ console.error(_context48.t14);
4080
4144
  case 64:
4081
- return _context47.abrupt("return", this.encryptionConks[objectId]);
4145
+ return _context48.abrupt("return", this.encryptionConks[objectId]);
4082
4146
  case 65:
4083
4147
  case "end":
4084
- return _context47.stop();
4148
+ return _context48.stop();
4085
4149
  }
4086
- }, _callee47, this, [[35, 60]]);
4150
+ }, _callee48, this, [[35, 60]]);
4087
4151
  }));
4088
- return function (_x46) {
4089
- return _ref84.apply(this, arguments);
4152
+ return function (_x47) {
4153
+ return _ref86.apply(this, arguments);
4090
4154
  };
4091
4155
  }();
4092
4156
 
@@ -4108,12 +4172,12 @@ exports.CreateEncryptionConk = /*#__PURE__*/function () {
4108
4172
  * @return Promise<Object> - The encryption conk for the object
4109
4173
  */
4110
4174
  exports.EncryptionConk = /*#__PURE__*/function () {
4111
- var _ref86 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee48(_ref85) {
4112
- var libraryId, objectId, versionHash, writeToken, _ref85$download, download, owner, ownerCapKey, ownerCap, capKey, existingUserCap;
4113
- return _regeneratorRuntime.wrap(function _callee48$(_context48) {
4114
- while (1) switch (_context48.prev = _context48.next) {
4175
+ var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref87) {
4176
+ var libraryId, objectId, versionHash, writeToken, _ref87$download, download, owner, ownerCapKey, ownerCap, capKey, existingUserCap;
4177
+ return _regeneratorRuntime.wrap(function _callee49$(_context49) {
4178
+ while (1) switch (_context49.prev = _context49.next) {
4115
4179
  case 0:
4116
- libraryId = _ref85.libraryId, objectId = _ref85.objectId, versionHash = _ref85.versionHash, writeToken = _ref85.writeToken, _ref85$download = _ref85.download, download = _ref85$download === void 0 ? false : _ref85$download;
4180
+ libraryId = _ref87.libraryId, objectId = _ref87.objectId, versionHash = _ref87.versionHash, writeToken = _ref87.writeToken, _ref87$download = _ref87.download, download = _ref87$download === void 0 ? false : _ref87$download;
4117
4181
  ValidateParameters({
4118
4182
  libraryId: libraryId,
4119
4183
  objectId: objectId,
@@ -4125,14 +4189,14 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4125
4189
  if (!objectId) {
4126
4190
  objectId = client.DecodeVersionHash(versionHash).objectId;
4127
4191
  }
4128
- _context48.next = 6;
4192
+ _context49.next = 6;
4129
4193
  return this.authClient.Owner({
4130
4194
  id: objectId
4131
4195
  });
4132
4196
  case 6:
4133
- owner = _context48.sent;
4197
+ owner = _context49.sent;
4134
4198
  ownerCapKey = "eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address));
4135
- _context48.next = 10;
4199
+ _context49.next = 10;
4136
4200
  return this.ContentObjectMetadata({
4137
4201
  libraryId: libraryId,
4138
4202
  objectId: objectId,
@@ -4140,39 +4204,39 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4140
4204
  metadataSubtree: ownerCapKey
4141
4205
  });
4142
4206
  case 10:
4143
- ownerCap = _context48.sent;
4207
+ ownerCap = _context49.sent;
4144
4208
  if (!(!this.utils.EqualAddress(owner, this.signer.address) && !ownerCap)) {
4145
- _context48.next = 21;
4209
+ _context49.next = 21;
4146
4210
  break;
4147
4211
  }
4148
4212
  if (!download) {
4149
- _context48.next = 18;
4213
+ _context49.next = 18;
4150
4214
  break;
4151
4215
  }
4152
- _context48.next = 15;
4216
+ _context49.next = 15;
4153
4217
  return this.authClient.ReEncryptionConk({
4154
4218
  libraryId: libraryId,
4155
4219
  objectId: objectId,
4156
4220
  versionHash: versionHash
4157
4221
  });
4158
4222
  case 15:
4159
- return _context48.abrupt("return", _context48.sent);
4223
+ return _context49.abrupt("return", _context49.sent);
4160
4224
  case 18:
4161
- _context48.next = 20;
4225
+ _context49.next = 20;
4162
4226
  return this.authClient.EncryptionConk({
4163
4227
  libraryId: libraryId,
4164
4228
  objectId: objectId,
4165
4229
  versionHash: versionHash
4166
4230
  });
4167
4231
  case 20:
4168
- return _context48.abrupt("return", _context48.sent);
4232
+ return _context49.abrupt("return", _context49.sent);
4169
4233
  case 21:
4170
4234
  if (this.encryptionConks[objectId]) {
4171
- _context48.next = 38;
4235
+ _context49.next = 38;
4172
4236
  break;
4173
4237
  }
4174
4238
  capKey = "eluv.caps.iusr".concat(this.utils.AddressToHash(this.signer.address));
4175
- _context48.next = 25;
4239
+ _context49.next = 25;
4176
4240
  return this.ContentObjectMetadata({
4177
4241
  libraryId: libraryId,
4178
4242
  objectId: objectId,
@@ -4182,23 +4246,23 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4182
4246
  metadataSubtree: capKey
4183
4247
  });
4184
4248
  case 25:
4185
- existingUserCap = _context48.sent;
4249
+ existingUserCap = _context49.sent;
4186
4250
  if (!existingUserCap) {
4187
- _context48.next = 32;
4251
+ _context49.next = 32;
4188
4252
  break;
4189
4253
  }
4190
- _context48.next = 29;
4254
+ _context49.next = 29;
4191
4255
  return this.Crypto.DecryptCap(existingUserCap, this.signer._signingKey().privateKey);
4192
4256
  case 29:
4193
- this.encryptionConks[objectId] = _context48.sent;
4194
- _context48.next = 38;
4257
+ this.encryptionConks[objectId] = _context49.sent;
4258
+ _context49.next = 38;
4195
4259
  break;
4196
4260
  case 32:
4197
4261
  if (!writeToken) {
4198
- _context48.next = 37;
4262
+ _context49.next = 37;
4199
4263
  break;
4200
4264
  }
4201
- _context48.next = 35;
4265
+ _context49.next = 35;
4202
4266
  return this.CreateEncryptionConk({
4203
4267
  libraryId: libraryId,
4204
4268
  objectId: objectId,
@@ -4207,20 +4271,20 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4207
4271
  createKMSConk: false
4208
4272
  });
4209
4273
  case 35:
4210
- _context48.next = 38;
4274
+ _context49.next = 38;
4211
4275
  break;
4212
4276
  case 37:
4213
4277
  throw "No encryption conk present for " + objectId;
4214
4278
  case 38:
4215
- return _context48.abrupt("return", this.encryptionConks[objectId]);
4279
+ return _context49.abrupt("return", this.encryptionConks[objectId]);
4216
4280
  case 39:
4217
4281
  case "end":
4218
- return _context48.stop();
4282
+ return _context49.stop();
4219
4283
  }
4220
- }, _callee48, this);
4284
+ }, _callee49, this);
4221
4285
  }));
4222
- return function (_x47) {
4223
- return _ref86.apply(this, arguments);
4286
+ return function (_x48) {
4287
+ return _ref88.apply(this, arguments);
4224
4288
  };
4225
4289
  }();
4226
4290
 
@@ -4238,37 +4302,37 @@ exports.EncryptionConk = /*#__PURE__*/function () {
4238
4302
  * @return {Promise<ArrayBuffer>}
4239
4303
  */
4240
4304
  exports.Encrypt = /*#__PURE__*/function () {
4241
- var _ref88 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee49(_ref87) {
4305
+ var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref89) {
4242
4306
  var libraryId, objectId, writeToken, chunk, conk, data;
4243
- return _regeneratorRuntime.wrap(function _callee49$(_context49) {
4244
- while (1) switch (_context49.prev = _context49.next) {
4307
+ return _regeneratorRuntime.wrap(function _callee50$(_context50) {
4308
+ while (1) switch (_context50.prev = _context50.next) {
4245
4309
  case 0:
4246
- libraryId = _ref87.libraryId, objectId = _ref87.objectId, writeToken = _ref87.writeToken, chunk = _ref87.chunk;
4310
+ libraryId = _ref89.libraryId, objectId = _ref89.objectId, writeToken = _ref89.writeToken, chunk = _ref89.chunk;
4247
4311
  ValidateParameters({
4248
4312
  libraryId: libraryId,
4249
4313
  objectId: objectId
4250
4314
  });
4251
- _context49.next = 4;
4315
+ _context50.next = 4;
4252
4316
  return this.EncryptionConk({
4253
4317
  libraryId: libraryId,
4254
4318
  objectId: objectId,
4255
4319
  writeToken: writeToken
4256
4320
  });
4257
4321
  case 4:
4258
- conk = _context49.sent;
4259
- _context49.next = 7;
4322
+ conk = _context50.sent;
4323
+ _context50.next = 7;
4260
4324
  return this.Crypto.Encrypt(conk, chunk);
4261
4325
  case 7:
4262
- data = _context49.sent;
4263
- return _context49.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4326
+ data = _context50.sent;
4327
+ return _context50.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4264
4328
  case 9:
4265
4329
  case "end":
4266
- return _context49.stop();
4330
+ return _context50.stop();
4267
4331
  }
4268
- }, _callee49, this);
4332
+ }, _callee50, this);
4269
4333
  }));
4270
- return function (_x48) {
4271
- return _ref88.apply(this, arguments);
4334
+ return function (_x49) {
4335
+ return _ref90.apply(this, arguments);
4272
4336
  };
4273
4337
  }();
4274
4338
 
@@ -4286,17 +4350,17 @@ exports.Encrypt = /*#__PURE__*/function () {
4286
4350
  * @return {Promise<ArrayBuffer>}
4287
4351
  */
4288
4352
  exports.Decrypt = /*#__PURE__*/function () {
4289
- var _ref90 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee50(_ref89) {
4353
+ var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref91) {
4290
4354
  var libraryId, objectId, writeToken, chunk, conk, data;
4291
- return _regeneratorRuntime.wrap(function _callee50$(_context50) {
4292
- while (1) switch (_context50.prev = _context50.next) {
4355
+ return _regeneratorRuntime.wrap(function _callee51$(_context51) {
4356
+ while (1) switch (_context51.prev = _context51.next) {
4293
4357
  case 0:
4294
- libraryId = _ref89.libraryId, objectId = _ref89.objectId, writeToken = _ref89.writeToken, chunk = _ref89.chunk;
4358
+ libraryId = _ref91.libraryId, objectId = _ref91.objectId, writeToken = _ref91.writeToken, chunk = _ref91.chunk;
4295
4359
  ValidateParameters({
4296
4360
  libraryId: libraryId,
4297
4361
  objectId: objectId
4298
4362
  });
4299
- _context50.next = 4;
4363
+ _context51.next = 4;
4300
4364
  return this.EncryptionConk({
4301
4365
  libraryId: libraryId,
4302
4366
  objectId: objectId,
@@ -4304,20 +4368,20 @@ exports.Decrypt = /*#__PURE__*/function () {
4304
4368
  download: true
4305
4369
  });
4306
4370
  case 4:
4307
- conk = _context50.sent;
4308
- _context50.next = 7;
4371
+ conk = _context51.sent;
4372
+ _context51.next = 7;
4309
4373
  return this.Crypto.Decrypt(conk, chunk);
4310
4374
  case 7:
4311
- data = _context50.sent;
4312
- return _context50.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4375
+ data = _context51.sent;
4376
+ return _context51.abrupt("return", data.buffer.slice(data.byteOffset, data.byteOffset + data.byteLength));
4313
4377
  case 9:
4314
4378
  case "end":
4315
- return _context50.stop();
4379
+ return _context51.stop();
4316
4380
  }
4317
- }, _callee50, this);
4381
+ }, _callee51, this);
4318
4382
  }));
4319
- return function (_x49) {
4320
- return _ref90.apply(this, arguments);
4383
+ return function (_x50) {
4384
+ return _ref92.apply(this, arguments);
4321
4385
  };
4322
4386
  }();
4323
4387
 
@@ -4333,24 +4397,24 @@ exports.Decrypt = /*#__PURE__*/function () {
4333
4397
  * @return {Promise<string>} - Contract type of the item - "space", "library", "type", "object", "wallet", "group", or "other"
4334
4398
  */
4335
4399
  exports.AccessType = /*#__PURE__*/function () {
4336
- var _ref92 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee51(_ref91) {
4400
+ var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref93) {
4337
4401
  var id;
4338
- return _regeneratorRuntime.wrap(function _callee51$(_context51) {
4339
- while (1) switch (_context51.prev = _context51.next) {
4402
+ return _regeneratorRuntime.wrap(function _callee52$(_context52) {
4403
+ while (1) switch (_context52.prev = _context52.next) {
4340
4404
  case 0:
4341
- id = _ref91.id;
4342
- _context51.next = 3;
4405
+ id = _ref93.id;
4406
+ _context52.next = 3;
4343
4407
  return this.authClient.AccessType(id);
4344
4408
  case 3:
4345
- return _context51.abrupt("return", _context51.sent);
4409
+ return _context52.abrupt("return", _context52.sent);
4346
4410
  case 4:
4347
4411
  case "end":
4348
- return _context51.stop();
4412
+ return _context52.stop();
4349
4413
  }
4350
- }, _callee51, this);
4414
+ }, _callee52, this);
4351
4415
  }));
4352
- return function (_x50) {
4353
- return _ref92.apply(this, arguments);
4416
+ return function (_x51) {
4417
+ return _ref94.apply(this, arguments);
4354
4418
  };
4355
4419
  }();
4356
4420
 
@@ -4366,12 +4430,12 @@ exports.AccessType = /*#__PURE__*/function () {
4366
4430
  *
4367
4431
  * @return {Promise<Object>} - Info about the access charge and whether or not the object is accessible to the current user */
4368
4432
  exports.AccessInfo = /*#__PURE__*/function () {
4369
- var _ref94 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee52(_ref93) {
4433
+ var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref95) {
4370
4434
  var objectId, args, info;
4371
- return _regeneratorRuntime.wrap(function _callee52$(_context52) {
4372
- while (1) switch (_context52.prev = _context52.next) {
4435
+ return _regeneratorRuntime.wrap(function _callee53$(_context53) {
4436
+ while (1) switch (_context53.prev = _context53.next) {
4373
4437
  case 0:
4374
- objectId = _ref93.objectId, args = _ref93.args;
4438
+ objectId = _ref95.objectId, args = _ref95.args;
4375
4439
  ValidateObject(objectId);
4376
4440
  if (!args) {
4377
4441
  args = [0,
@@ -4383,16 +4447,16 @@ exports.AccessInfo = /*#__PURE__*/function () {
4383
4447
  }
4384
4448
 
4385
4449
  this.Log("Retrieving access info: ".concat(objectId));
4386
- _context52.next = 6;
4450
+ _context53.next = 6;
4387
4451
  return this.ethClient.CallContractMethod({
4388
4452
  contractAddress: this.utils.HashToAddress(objectId),
4389
4453
  methodName: "getAccessInfo",
4390
4454
  methodArgs: args
4391
4455
  });
4392
4456
  case 6:
4393
- info = _context52.sent;
4457
+ info = _context53.sent;
4394
4458
  this.Log(info);
4395
- return _context52.abrupt("return", {
4459
+ return _context53.abrupt("return", {
4396
4460
  visibilityCode: info[0],
4397
4461
  visible: info[0] >= 1,
4398
4462
  accessible: info[0] >= 10,
@@ -4403,12 +4467,12 @@ exports.AccessInfo = /*#__PURE__*/function () {
4403
4467
  });
4404
4468
  case 9:
4405
4469
  case "end":
4406
- return _context52.stop();
4470
+ return _context53.stop();
4407
4471
  }
4408
- }, _callee52, this);
4472
+ }, _callee53, this);
4409
4473
  }));
4410
- return function (_x51) {
4411
- return _ref94.apply(this, arguments);
4474
+ return function (_x52) {
4475
+ return _ref96.apply(this, arguments);
4412
4476
  };
4413
4477
  }();
4414
4478
 
@@ -4436,12 +4500,12 @@ exports.AccessInfo = /*#__PURE__*/function () {
4436
4500
  * @return {Promise<Object>} - Resultant AccessRequest or UpdateRequest event
4437
4501
  */
4438
4502
  exports.AccessRequest = /*#__PURE__*/function () {
4439
- var _ref96 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee53(_ref95) {
4440
- var libraryId, objectId, versionHash, _ref95$args, args, _ref95$update, update, _ref95$noCache, noCache;
4441
- return _regeneratorRuntime.wrap(function _callee53$(_context53) {
4442
- while (1) switch (_context53.prev = _context53.next) {
4503
+ var _ref98 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref97) {
4504
+ var libraryId, objectId, versionHash, _ref97$args, args, _ref97$update, update, _ref97$noCache, noCache;
4505
+ return _regeneratorRuntime.wrap(function _callee54$(_context54) {
4506
+ while (1) switch (_context54.prev = _context54.next) {
4443
4507
  case 0:
4444
- libraryId = _ref95.libraryId, objectId = _ref95.objectId, versionHash = _ref95.versionHash, _ref95$args = _ref95.args, args = _ref95$args === void 0 ? [] : _ref95$args, _ref95$update = _ref95.update, update = _ref95$update === void 0 ? false : _ref95$update, _ref95$noCache = _ref95.noCache, noCache = _ref95$noCache === void 0 ? false : _ref95$noCache;
4508
+ libraryId = _ref97.libraryId, objectId = _ref97.objectId, versionHash = _ref97.versionHash, _ref97$args = _ref97.args, args = _ref97$args === void 0 ? [] : _ref97$args, _ref97$update = _ref97.update, update = _ref97$update === void 0 ? false : _ref97$update, _ref97$noCache = _ref97.noCache, noCache = _ref97$noCache === void 0 ? false : _ref97$noCache;
4445
4509
  ValidateParameters({
4446
4510
  libraryId: libraryId,
4447
4511
  objectId: objectId,
@@ -4450,7 +4514,7 @@ exports.AccessRequest = /*#__PURE__*/function () {
4450
4514
  if (versionHash) {
4451
4515
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4452
4516
  }
4453
- _context53.next = 5;
4517
+ _context54.next = 5;
4454
4518
  return this.authClient.MakeAccessRequest({
4455
4519
  libraryId: libraryId,
4456
4520
  objectId: objectId,
@@ -4461,15 +4525,15 @@ exports.AccessRequest = /*#__PURE__*/function () {
4461
4525
  noCache: noCache
4462
4526
  });
4463
4527
  case 5:
4464
- return _context53.abrupt("return", _context53.sent);
4528
+ return _context54.abrupt("return", _context54.sent);
4465
4529
  case 6:
4466
4530
  case "end":
4467
- return _context53.stop();
4531
+ return _context54.stop();
4468
4532
  }
4469
- }, _callee53, this);
4533
+ }, _callee54, this);
4470
4534
  }));
4471
- return function (_x52) {
4472
- return _ref96.apply(this, arguments);
4535
+ return function (_x53) {
4536
+ return _ref98.apply(this, arguments);
4473
4537
  };
4474
4538
  }();
4475
4539
 
@@ -4481,8 +4545,8 @@ exports.AccessRequest = /*#__PURE__*/function () {
4481
4545
  * @param {Object=} context - Additional context to include in state channel requests
4482
4546
  * - Note: Context must be a map of string->string
4483
4547
  */
4484
- exports.SetAuthContext = function (_ref97) {
4485
- var context = _ref97.context;
4548
+ exports.SetAuthContext = function (_ref99) {
4549
+ var context = _ref99.context;
4486
4550
  if (context && Object.values(context).find(function (value) {
4487
4551
  return typeof value !== "string";
4488
4552
  })) {
@@ -4506,34 +4570,34 @@ exports.SetAuthContext = function (_ref97) {
4506
4570
  * @return {Promise<string>} - The state channel token
4507
4571
  */
4508
4572
  exports.GenerateStateChannelToken = /*#__PURE__*/function () {
4509
- var _ref99 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee54(_ref98) {
4510
- var objectId, versionHash, context, _ref98$noCache, noCache;
4511
- return _regeneratorRuntime.wrap(function _callee54$(_context54) {
4512
- while (1) switch (_context54.prev = _context54.next) {
4573
+ var _ref101 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref100) {
4574
+ var objectId, versionHash, context, _ref100$noCache, noCache;
4575
+ return _regeneratorRuntime.wrap(function _callee55$(_context55) {
4576
+ while (1) switch (_context55.prev = _context55.next) {
4513
4577
  case 0:
4514
- objectId = _ref98.objectId, versionHash = _ref98.versionHash, context = _ref98.context, _ref98$noCache = _ref98.noCache, noCache = _ref98$noCache === void 0 ? false : _ref98$noCache;
4578
+ objectId = _ref100.objectId, versionHash = _ref100.versionHash, context = _ref100.context, _ref100$noCache = _ref100.noCache, noCache = _ref100$noCache === void 0 ? false : _ref100$noCache;
4515
4579
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
4516
4580
  if (!versionHash) {
4517
- _context54.next = 6;
4581
+ _context55.next = 6;
4518
4582
  break;
4519
4583
  }
4520
4584
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4521
- _context54.next = 10;
4585
+ _context55.next = 10;
4522
4586
  break;
4523
4587
  case 6:
4524
4588
  if (this.stateChannelAccess[objectId]) {
4525
- _context54.next = 10;
4589
+ _context55.next = 10;
4526
4590
  break;
4527
4591
  }
4528
- _context54.next = 9;
4592
+ _context55.next = 9;
4529
4593
  return this.LatestVersionHash({
4530
4594
  objectId: objectId
4531
4595
  });
4532
4596
  case 9:
4533
- versionHash = _context54.sent;
4597
+ versionHash = _context55.sent;
4534
4598
  case 10:
4535
4599
  this.stateChannelAccess[objectId] = versionHash;
4536
- _context54.next = 13;
4600
+ _context55.next = 13;
4537
4601
  return this.authClient.AuthorizationToken({
4538
4602
  objectId: objectId,
4539
4603
  channelAuth: true,
@@ -4542,15 +4606,15 @@ exports.GenerateStateChannelToken = /*#__PURE__*/function () {
4542
4606
  noCache: noCache
4543
4607
  });
4544
4608
  case 13:
4545
- return _context54.abrupt("return", _context54.sent);
4609
+ return _context55.abrupt("return", _context55.sent);
4546
4610
  case 14:
4547
4611
  case "end":
4548
- return _context54.stop();
4612
+ return _context55.stop();
4549
4613
  }
4550
- }, _callee54, this);
4614
+ }, _callee55, this);
4551
4615
  }));
4552
- return function (_x53) {
4553
- return _ref99.apply(this, arguments);
4616
+ return function (_x54) {
4617
+ return _ref101.apply(this, arguments);
4554
4618
  };
4555
4619
  }();
4556
4620
 
@@ -4564,38 +4628,38 @@ exports.GenerateStateChannelToken = /*#__PURE__*/function () {
4564
4628
  * @param {number} percentComplete - Completion percentage of the content
4565
4629
  */
4566
4630
  exports.FinalizeStateChannelAccess = /*#__PURE__*/function () {
4567
- var _ref101 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee55(_ref100) {
4631
+ var _ref103 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(_ref102) {
4568
4632
  var objectId, versionHash, percentComplete;
4569
- return _regeneratorRuntime.wrap(function _callee55$(_context55) {
4570
- while (1) switch (_context55.prev = _context55.next) {
4633
+ return _regeneratorRuntime.wrap(function _callee56$(_context56) {
4634
+ while (1) switch (_context56.prev = _context56.next) {
4571
4635
  case 0:
4572
- objectId = _ref100.objectId, versionHash = _ref100.versionHash, percentComplete = _ref100.percentComplete;
4636
+ objectId = _ref102.objectId, versionHash = _ref102.versionHash, percentComplete = _ref102.percentComplete;
4573
4637
  versionHash ? ValidateVersion(versionHash) : ValidateObject(objectId);
4574
4638
  if (!versionHash) {
4575
- _context55.next = 6;
4639
+ _context56.next = 6;
4576
4640
  break;
4577
4641
  }
4578
4642
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4579
- _context55.next = 13;
4643
+ _context56.next = 13;
4580
4644
  break;
4581
4645
  case 6:
4582
4646
  if (!this.stateChannelAccess[objectId]) {
4583
- _context55.next = 10;
4647
+ _context56.next = 10;
4584
4648
  break;
4585
4649
  }
4586
4650
  versionHash = this.stateChannelAccess[objectId];
4587
- _context55.next = 13;
4651
+ _context56.next = 13;
4588
4652
  break;
4589
4653
  case 10:
4590
- _context55.next = 12;
4654
+ _context56.next = 12;
4591
4655
  return this.LatestVersionHash({
4592
4656
  objectId: objectId
4593
4657
  });
4594
4658
  case 12:
4595
- versionHash = _context55.sent;
4659
+ versionHash = _context56.sent;
4596
4660
  case 13:
4597
4661
  this.stateChannelAccess[objectId] = undefined;
4598
- _context55.next = 16;
4662
+ _context56.next = 16;
4599
4663
  return this.authClient.ChannelContentFinalize({
4600
4664
  objectId: objectId,
4601
4665
  versionHash: versionHash,
@@ -4603,12 +4667,12 @@ exports.FinalizeStateChannelAccess = /*#__PURE__*/function () {
4603
4667
  });
4604
4668
  case 16:
4605
4669
  case "end":
4606
- return _context55.stop();
4670
+ return _context56.stop();
4607
4671
  }
4608
- }, _callee55, this);
4672
+ }, _callee56, this);
4609
4673
  }));
4610
- return function (_x54) {
4611
- return _ref101.apply(this, arguments);
4674
+ return function (_x55) {
4675
+ return _ref103.apply(this, arguments);
4612
4676
  };
4613
4677
  }();
4614
4678
 
@@ -4625,34 +4689,34 @@ exports.FinalizeStateChannelAccess = /*#__PURE__*/function () {
4625
4689
  * @returns {Promise<Object>} - Transaction log of the AccessComplete event
4626
4690
  */
4627
4691
  exports.ContentObjectAccessComplete = /*#__PURE__*/function () {
4628
- var _ref103 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee56(_ref102) {
4629
- var objectId, _ref102$score, score;
4630
- return _regeneratorRuntime.wrap(function _callee56$(_context56) {
4631
- while (1) switch (_context56.prev = _context56.next) {
4692
+ var _ref105 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(_ref104) {
4693
+ var objectId, _ref104$score, score;
4694
+ return _regeneratorRuntime.wrap(function _callee57$(_context57) {
4695
+ while (1) switch (_context57.prev = _context57.next) {
4632
4696
  case 0:
4633
- objectId = _ref102.objectId, _ref102$score = _ref102.score, score = _ref102$score === void 0 ? 100 : _ref102$score;
4697
+ objectId = _ref104.objectId, _ref104$score = _ref104.score, score = _ref104$score === void 0 ? 100 : _ref104$score;
4634
4698
  ValidateObject(objectId);
4635
4699
  if (!(score < 0 || score > 100)) {
4636
- _context56.next = 4;
4700
+ _context57.next = 4;
4637
4701
  break;
4638
4702
  }
4639
4703
  throw Error("Invalid AccessComplete score: " + score);
4640
4704
  case 4:
4641
- _context56.next = 6;
4705
+ _context57.next = 6;
4642
4706
  return this.authClient.AccessComplete({
4643
4707
  id: objectId,
4644
4708
  score: score
4645
4709
  });
4646
4710
  case 6:
4647
- return _context56.abrupt("return", _context56.sent);
4711
+ return _context57.abrupt("return", _context57.sent);
4648
4712
  case 7:
4649
4713
  case "end":
4650
- return _context56.stop();
4714
+ return _context57.stop();
4651
4715
  }
4652
- }, _callee56, this);
4716
+ }, _callee57, this);
4653
4717
  }));
4654
- return function (_x55) {
4655
- return _ref103.apply(this, arguments);
4718
+ return function (_x56) {
4719
+ return _ref105.apply(this, arguments);
4656
4720
  };
4657
4721
  }();
4658
4722
 
@@ -4674,62 +4738,62 @@ exports.ContentObjectAccessComplete = /*#__PURE__*/function () {
4674
4738
  * @return {Promise<Array<string>>} - List of addresses of available items
4675
4739
  */
4676
4740
  exports.Collection = /*#__PURE__*/function () {
4677
- var _ref105 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee57(_ref104) {
4741
+ var _ref107 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(_ref106) {
4678
4742
  var collectionType, validCollectionTypes, walletAddress;
4679
- return _regeneratorRuntime.wrap(function _callee57$(_context57) {
4680
- while (1) switch (_context57.prev = _context57.next) {
4743
+ return _regeneratorRuntime.wrap(function _callee58$(_context58) {
4744
+ while (1) switch (_context58.prev = _context58.next) {
4681
4745
  case 0:
4682
- collectionType = _ref104.collectionType;
4746
+ collectionType = _ref106.collectionType;
4683
4747
  validCollectionTypes = ["accessGroups", "contentObjects", "contentTypes", "contracts", "libraries"];
4684
4748
  if (validCollectionTypes.includes(collectionType)) {
4685
- _context57.next = 4;
4749
+ _context58.next = 4;
4686
4750
  break;
4687
4751
  }
4688
4752
  throw new Error("Invalid collection type: " + collectionType);
4689
4753
  case 4:
4690
4754
  if (!this.signer) {
4691
- _context57.next = 10;
4755
+ _context58.next = 10;
4692
4756
  break;
4693
4757
  }
4694
- _context57.next = 7;
4758
+ _context58.next = 7;
4695
4759
  return this.userProfileClient.WalletAddress();
4696
4760
  case 7:
4697
- _context57.t0 = _context57.sent;
4698
- _context57.next = 11;
4761
+ _context58.t0 = _context58.sent;
4762
+ _context58.next = 11;
4699
4763
  break;
4700
4764
  case 10:
4701
- _context57.t0 = undefined;
4765
+ _context58.t0 = undefined;
4702
4766
  case 11:
4703
- walletAddress = _context57.t0;
4767
+ walletAddress = _context58.t0;
4704
4768
  if (walletAddress) {
4705
- _context57.next = 14;
4769
+ _context58.next = 14;
4706
4770
  break;
4707
4771
  }
4708
4772
  throw new Error("Unable to get collection: User wallet doesn't exist");
4709
4773
  case 14:
4710
4774
  this.Log("Retrieving ".concat(collectionType, " contract collection for user ").concat(this.signer.address));
4711
- _context57.next = 17;
4775
+ _context58.next = 17;
4712
4776
  return this.ethClient.MakeProviderCall({
4713
4777
  methodName: "send",
4714
4778
  args: ["elv_getWalletCollection", [this.contentSpaceId, "iusr".concat(this.utils.AddressToHash(this.signer.address)), collectionType]]
4715
4779
  });
4716
4780
  case 17:
4717
- _context57.t1 = _context57.sent;
4718
- if (_context57.t1) {
4719
- _context57.next = 20;
4781
+ _context58.t1 = _context58.sent;
4782
+ if (_context58.t1) {
4783
+ _context58.next = 20;
4720
4784
  break;
4721
4785
  }
4722
- _context57.t1 = [];
4786
+ _context58.t1 = [];
4723
4787
  case 20:
4724
- return _context57.abrupt("return", _context57.t1);
4788
+ return _context58.abrupt("return", _context58.t1);
4725
4789
  case 21:
4726
4790
  case "end":
4727
- return _context57.stop();
4791
+ return _context58.stop();
4728
4792
  }
4729
- }, _callee57, this);
4793
+ }, _callee58, this);
4730
4794
  }));
4731
- return function (_x56) {
4732
- return _ref105.apply(this, arguments);
4795
+ return function (_x57) {
4796
+ return _ref107.apply(this, arguments);
4733
4797
  };
4734
4798
  }();
4735
4799
 
@@ -4747,18 +4811,18 @@ exports.Collection = /*#__PURE__*/function () {
4747
4811
  * @returns {Promise<Object>} - Response describing verification results
4748
4812
  */
4749
4813
  exports.VerifyContentObject = /*#__PURE__*/function () {
4750
- var _ref107 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee58(_ref106) {
4814
+ var _ref109 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(_ref108) {
4751
4815
  var libraryId, objectId, versionHash;
4752
- return _regeneratorRuntime.wrap(function _callee58$(_context58) {
4753
- while (1) switch (_context58.prev = _context58.next) {
4816
+ return _regeneratorRuntime.wrap(function _callee59$(_context59) {
4817
+ while (1) switch (_context59.prev = _context59.next) {
4754
4818
  case 0:
4755
- libraryId = _ref106.libraryId, objectId = _ref106.objectId, versionHash = _ref106.versionHash;
4819
+ libraryId = _ref108.libraryId, objectId = _ref108.objectId, versionHash = _ref108.versionHash;
4756
4820
  ValidateParameters({
4757
4821
  libraryId: libraryId,
4758
4822
  objectId: objectId,
4759
4823
  versionHash: versionHash
4760
4824
  });
4761
- _context58.next = 4;
4825
+ _context59.next = 4;
4762
4826
  return ContentObjectVerification.VerifyContentObject({
4763
4827
  client: this,
4764
4828
  libraryId: libraryId,
@@ -4766,15 +4830,15 @@ exports.VerifyContentObject = /*#__PURE__*/function () {
4766
4830
  versionHash: versionHash
4767
4831
  });
4768
4832
  case 4:
4769
- return _context58.abrupt("return", _context58.sent);
4833
+ return _context59.abrupt("return", _context59.sent);
4770
4834
  case 5:
4771
4835
  case "end":
4772
- return _context58.stop();
4836
+ return _context59.stop();
4773
4837
  }
4774
- }, _callee58, this);
4838
+ }, _callee59, this);
4775
4839
  }));
4776
- return function (_x57) {
4777
- return _ref107.apply(this, arguments);
4840
+ return function (_x58) {
4841
+ return _ref109.apply(this, arguments);
4778
4842
  };
4779
4843
  }();
4780
4844
 
@@ -4791,12 +4855,12 @@ exports.VerifyContentObject = /*#__PURE__*/function () {
4791
4855
  * @returns {Promise<Object>} - Response containing proof information
4792
4856
  */
4793
4857
  exports.Proofs = /*#__PURE__*/function () {
4794
- var _ref109 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee59(_ref108) {
4858
+ var _ref111 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(_ref110) {
4795
4859
  var libraryId, objectId, versionHash, partHash, path;
4796
- return _regeneratorRuntime.wrap(function _callee59$(_context59) {
4797
- while (1) switch (_context59.prev = _context59.next) {
4860
+ return _regeneratorRuntime.wrap(function _callee60$(_context60) {
4861
+ while (1) switch (_context60.prev = _context60.next) {
4798
4862
  case 0:
4799
- libraryId = _ref108.libraryId, objectId = _ref108.objectId, versionHash = _ref108.versionHash, partHash = _ref108.partHash;
4863
+ libraryId = _ref110.libraryId, objectId = _ref110.objectId, versionHash = _ref110.versionHash, partHash = _ref110.partHash;
4800
4864
  ValidateParameters({
4801
4865
  libraryId: libraryId,
4802
4866
  objectId: objectId,
@@ -4807,32 +4871,32 @@ exports.Proofs = /*#__PURE__*/function () {
4807
4871
  objectId = this.utils.DecodeVersionHash(versionHash).objectId;
4808
4872
  }
4809
4873
  path = UrlJoin("q", versionHash || objectId, "data", partHash, "proofs");
4810
- _context59.t0 = this.utils;
4811
- _context59.t1 = this.HttpClient;
4812
- _context59.next = 9;
4874
+ _context60.t0 = this.utils;
4875
+ _context60.t1 = this.HttpClient;
4876
+ _context60.next = 9;
4813
4877
  return this.authClient.AuthorizationHeader({
4814
4878
  libraryId: libraryId,
4815
4879
  objectId: objectId,
4816
4880
  versionHash: versionHash
4817
4881
  });
4818
4882
  case 9:
4819
- _context59.t2 = _context59.sent;
4820
- _context59.t3 = path;
4821
- _context59.t4 = {
4822
- headers: _context59.t2,
4883
+ _context60.t2 = _context60.sent;
4884
+ _context60.t3 = path;
4885
+ _context60.t4 = {
4886
+ headers: _context60.t2,
4823
4887
  method: "GET",
4824
- path: _context59.t3
4888
+ path: _context60.t3
4825
4889
  };
4826
- _context59.t5 = _context59.t1.Request.call(_context59.t1, _context59.t4);
4827
- return _context59.abrupt("return", _context59.t0.ResponseToJson.call(_context59.t0, _context59.t5));
4890
+ _context60.t5 = _context60.t1.Request.call(_context60.t1, _context60.t4);
4891
+ return _context60.abrupt("return", _context60.t0.ResponseToJson.call(_context60.t0, _context60.t5));
4828
4892
  case 14:
4829
4893
  case "end":
4830
- return _context59.stop();
4894
+ return _context60.stop();
4831
4895
  }
4832
- }, _callee59, this);
4896
+ }, _callee60, this);
4833
4897
  }));
4834
- return function (_x58) {
4835
- return _ref109.apply(this, arguments);
4898
+ return function (_x59) {
4899
+ return _ref111.apply(this, arguments);
4836
4900
  };
4837
4901
  }();
4838
4902
 
@@ -4849,12 +4913,12 @@ exports.Proofs = /*#__PURE__*/function () {
4849
4913
  * @returns {Promise<Format>} - Response containing the CBOR response in the specified format
4850
4914
  */
4851
4915
  exports.QParts = /*#__PURE__*/function () {
4852
- var _ref111 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee60(_ref110) {
4853
- var libraryId, objectId, partHash, _ref110$format, format, path;
4854
- return _regeneratorRuntime.wrap(function _callee60$(_context60) {
4855
- while (1) switch (_context60.prev = _context60.next) {
4916
+ var _ref113 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee61(_ref112) {
4917
+ var libraryId, objectId, partHash, _ref112$format, format, path;
4918
+ return _regeneratorRuntime.wrap(function _callee61$(_context61) {
4919
+ while (1) switch (_context61.prev = _context61.next) {
4856
4920
  case 0:
4857
- libraryId = _ref110.libraryId, objectId = _ref110.objectId, partHash = _ref110.partHash, _ref110$format = _ref110.format, format = _ref110$format === void 0 ? "blob" : _ref110$format;
4921
+ libraryId = _ref112.libraryId, objectId = _ref112.objectId, partHash = _ref112.partHash, _ref112$format = _ref112.format, format = _ref112$format === void 0 ? "blob" : _ref112$format;
4858
4922
  ValidateParameters({
4859
4923
  libraryId: libraryId,
4860
4924
  objectId: objectId,
@@ -4862,32 +4926,32 @@ exports.QParts = /*#__PURE__*/function () {
4862
4926
  });
4863
4927
  ValidatePartHash(partHash);
4864
4928
  path = UrlJoin("qparts", partHash);
4865
- _context60.t0 = this.utils;
4866
- _context60.t1 = format;
4867
- _context60.t2 = this.HttpClient;
4868
- _context60.next = 9;
4929
+ _context61.t0 = this.utils;
4930
+ _context61.t1 = format;
4931
+ _context61.t2 = this.HttpClient;
4932
+ _context61.next = 9;
4869
4933
  return this.authClient.AuthorizationHeader({
4870
4934
  libraryId: libraryId,
4871
4935
  objectId: objectId,
4872
4936
  partHash: partHash
4873
4937
  });
4874
4938
  case 9:
4875
- _context60.t3 = _context60.sent;
4876
- _context60.t4 = path;
4877
- _context60.t5 = {
4878
- headers: _context60.t3,
4939
+ _context61.t3 = _context61.sent;
4940
+ _context61.t4 = path;
4941
+ _context61.t5 = {
4942
+ headers: _context61.t3,
4879
4943
  method: "GET",
4880
- path: _context60.t4
4944
+ path: _context61.t4
4881
4945
  };
4882
- _context60.t6 = _context60.t2.Request.call(_context60.t2, _context60.t5);
4883
- return _context60.abrupt("return", _context60.t0.ResponseToFormat.call(_context60.t0, _context60.t1, _context60.t6));
4946
+ _context61.t6 = _context61.t2.Request.call(_context61.t2, _context61.t5);
4947
+ return _context61.abrupt("return", _context61.t0.ResponseToFormat.call(_context61.t0, _context61.t1, _context61.t6));
4884
4948
  case 14:
4885
4949
  case "end":
4886
- return _context60.stop();
4950
+ return _context61.stop();
4887
4951
  }
4888
- }, _callee60, this);
4952
+ }, _callee61, this);
4889
4953
  }));
4890
- return function (_x59) {
4891
- return _ref111.apply(this, arguments);
4954
+ return function (_x60) {
4955
+ return _ref113.apply(this, arguments);
4892
4956
  };
4893
4957
  }();