@freelog/tools-lib 0.1.163 → 0.1.166

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.
@@ -12,50 +12,42 @@ var i18next = _interopDefault(require('i18next'));
12
12
  var Cookies = _interopDefault(require('js-cookie'));
13
13
  var htmlReactParser = _interopDefault(require('html-react-parser'));
14
14
 
15
+ // import {report} from '@freelog/resource-policy-lang/dist';
15
16
  // import {ContractEntity} from '@freelog/resource-policy-lang/dist/tools/ContractTool';
16
17
  // const {compile} = require('@freelog/resource-policy-lang');
17
-
18
18
  /**
19
19
  * 将对应的字节数,转换为易读单位数量
20
20
  * @param bytes
21
21
  * @return {string}
22
22
  */
23
-
24
23
  function humanizeSize(bytes) {
25
24
  // console.log('dddhumanizeSizesdfsd');
26
25
  if (bytes <= 0) {
27
26
  return '0 B';
28
27
  }
29
-
30
28
  var unitArr = ['B', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
31
29
  var index = Math.floor(Math.log(bytes) / Math.log(1024));
32
30
  var size = Math.round(bytes / Math.pow(1024, index) * 100) / 100; //保留的小数位数
33
-
34
31
  return size + ' ' + unitArr[index];
35
32
  }
36
33
  /**
37
34
  * 格式化日期时间
38
35
  */
39
-
40
36
  function formatDateTime(date, showTime) {
41
37
  if (showTime === void 0) {
42
38
  showTime = false;
43
39
  }
44
-
45
40
  return moment(date).format('YYYY/MM/DD' + (showTime ? ' HH:mm' : ''));
46
41
  }
47
42
  /**
48
43
  * 根据传入的子域名拼合成完整的适合的url
49
44
  * @param domain 要组合的三级域名
50
45
  */
51
-
52
46
  function completeUrlByDomain(domain) {
53
47
  var origin = "https://" + domain + ".testfreelog.com";
54
-
55
48
  if (window.location.origin.includes('.freelog.com')) {
56
49
  origin = "https://" + domain + ".freelog.com";
57
50
  }
58
-
59
51
  return origin;
60
52
  }
61
53
  /**
@@ -104,12 +96,10 @@ function completeUrlByDomain(domain) {
104
96
  // };
105
97
  // }
106
98
  // }
107
-
108
99
  /**
109
100
  * 将资源类型关键字数组,转换成标准展示文字
110
101
  * @param arr 关键字数组
111
102
  */
112
-
113
103
  function resourceTypeKeyArrToResourceType(arr) {
114
104
  return arr.join(' / ');
115
105
  }
@@ -123,46 +113,46 @@ var Format = {
123
113
  };
124
114
 
125
115
  // 展品名称
126
- var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/); // 资源名称
127
-
128
- var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/); // 资源类型
129
-
130
- var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$"); // 自定义属性键
116
+ var EXHIBIT_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
117
+ // 资源名称
118
+ var RESOURCE_NAME = /*#__PURE__*/new RegExp(/^(?!.*(\\|\/|:|\*|\?|"|<|>|\||\s|@|\$|#)).{1,60}$/);
119
+ // 资源类型
120
+ var RESOURCE_TYPE = /*#__PURE__*/new RegExp("^[\u4E00-\u9FEFa-zA-Z0-9\\-&.,]{1,40}$");
121
+ // 自定义属性键
131
122
  // export const CUSTOM_KEY: RegExp = new RegExp(/^[a-zA-Z_]([a-zA-Z0-9_]{1,19})?$/);
132
-
133
- var CUSTOM_KEY = /*#__PURE__*/new RegExp('^[a-zA-Z]([a-zA-Z0-9_]{1,29})?$'); // 节点名称
134
-
135
- var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/); // 节点地址
123
+ var CUSTOM_KEY = /*#__PURE__*/new RegExp('^[a-zA-Z]([a-zA-Z0-9_]{1,29})?$');
124
+ // 节点名称
125
+ var NODE_NAME = /*#__PURE__*/new RegExp(/^[\u4E00-\u9FA5|a-zA-Z0-9]{2,24}$/);
126
+ // 节点地址
136
127
  // export const NODE_DOMAIN: RegExp = new RegExp(/^(?!-)[a-z0-9-]{4,24}(?<!-)$/);
137
-
138
- var NODE_DOMAIN = /*#__PURE__*/new RegExp(/^[a-z0-9][a-z0-9-]{2,22}[a-z0-9]$/); // 支付密码
139
-
140
- var PAY_PASSWORD = /*#__PURE__*/new RegExp(/^\d{6}$/); // 手机号码
141
-
142
- var MOBILE_PHONE_NUMBER = /*#__PURE__*/new RegExp(/^1[345789]\d{9}$/); // export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
128
+ var NODE_DOMAIN = /*#__PURE__*/new RegExp(/^[a-z0-9][a-z0-9-]{2,22}[a-z0-9]$/);
129
+ // 支付密码
130
+ var PAY_PASSWORD = /*#__PURE__*/new RegExp(/^\d{6}$/);
131
+ // 手机号码
132
+ var MOBILE_PHONE_NUMBER = /*#__PURE__*/new RegExp(/^1[345789]\d{9}$/);
133
+ // export const TELEPHONE_NUMBER = /^((13[0-9])|(14[5-9])|(15([0-3]|[5-9]))|(16[6-7])|(17[1-8])|(18[0-9])|(19[1|3])|(19[5|6])|(19[8|9]))\d{8}$/
143
134
  // 邮箱地址
144
-
145
- var EMAIL_ADDRESS = /*#__PURE__*/new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/); // 用户名
135
+ var EMAIL_ADDRESS = /*#__PURE__*/new RegExp(/^\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*$/);
136
+ // 用户名
146
137
  // export const USERNAME: RegExp = new RegExp(/^(?!-)[A-Za-z0-9-]{1,30}(?<!-)$/);
147
-
148
- var USERNAME = /*#__PURE__*/new RegExp(/^([A-Za-z0-9][A-Za-z0-9-]{0,28})?[A-Za-z0-9]$/); // 用户密码
138
+ var USERNAME = /*#__PURE__*/new RegExp(/^([A-Za-z0-9][A-Za-z0-9-]{0,28})?[A-Za-z0-9]$/);
139
+ // 用户密码
149
140
  // export const PASSWORD = /^(?=.*[a-zA-Z])(?=.*[0-9]).{6,24}$/;
150
-
151
- var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/); // 自然数
152
-
153
- var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/); // 正整数
154
-
155
- var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/); // 最多两位小数的正数
141
+ var PASSWORD = /*#__PURE__*/new RegExp(/^(?=.*[0-9])(?=.*[a-zA-Z])(.{6,24})$/);
142
+ // 自然数
143
+ var NATURAL_NUMBER = /*#__PURE__*/new RegExp(/^[0-9]*$/);
144
+ // 正整数
145
+ var POSITIVE_INTEGER = /*#__PURE__*/new RegExp(/^[1-9]\d*$/);
146
+ // 最多两位小数的正数
156
147
  // export const MAX_2_DECIMAL_POSITIVE_NUMBER = new RegExp(/^\d+(.\d{1,2})?$/);
157
-
158
- var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(\.\d{0,2})?$/); // 对象的Bucket名称
159
-
160
- var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/); // JS变量名称
161
-
162
- var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/); // 日期
163
-
164
- var DATE = /*#__PURE__*/new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/); // 日期时间
165
-
148
+ var MAX_2_DECIMAL_POSITIVE_NUMBER = /*#__PURE__*/new RegExp(/^\d+(\.\d{0,2})?$/);
149
+ // 对象的Bucket名称
150
+ var BUCKET_NAME = /*#__PURE__*/new RegExp(/^([a-z0-9][a-z0-9-]{0,61})?[a-z0-9]$/);
151
+ // JS变量名称
152
+ var JS_VARIABLE_NAME = /*#__PURE__*/new RegExp(/^[A-Za-z$_][\w$_]*$/);
153
+ // 日期
154
+ var DATE = /*#__PURE__*/new RegExp(/(([0-9]{3}[1-9]|[0-9]{2}[1-9][0-9]{1}|[0-9]{1}[1-9][0-9]{2}|[1-9][0-9]{3})-(((0[13578]|1[02])-(0[1-9]|[12][0-9]|3[01]))|((0[469]|11)-(0[1-9]|[12][0-9]|30))|(02-(0[1-9]|[1][0-9]|2[0-8]))))|((([0-9]{2})(0[48]|[2468][048]|[13579][26])|((0[48]|[2468][048]|[3579][26])00))-02-29)$/);
155
+ // 日期时间
166
156
  var DATE_TIME = /*#__PURE__*/new RegExp(/^\d{4}-\d{2}-\d{2} \d{2}:\d{2}:\d{2}$/);
167
157
 
168
158
  var Regexp = {
@@ -187,441 +177,367 @@ var Regexp = {
187
177
  DATE_TIME: DATE_TIME
188
178
  };
189
179
 
180
+ function asyncGeneratorStep(n, t, e, r, o, a, c) {
181
+ try {
182
+ var i = n[a](c),
183
+ u = i.value;
184
+ } catch (n) {
185
+ return void e(n);
186
+ }
187
+ i.done ? t(u) : Promise.resolve(u).then(r, o);
188
+ }
189
+ function _asyncToGenerator(n) {
190
+ return function () {
191
+ var t = this,
192
+ e = arguments;
193
+ return new Promise(function (r, o) {
194
+ var a = n.apply(t, e);
195
+ function _next(n) {
196
+ asyncGeneratorStep(a, r, o, _next, _throw, "next", n);
197
+ }
198
+ function _throw(n) {
199
+ asyncGeneratorStep(a, r, o, _next, _throw, "throw", n);
200
+ }
201
+ _next(void 0);
202
+ });
203
+ };
204
+ }
205
+ function _extends() {
206
+ return _extends = Object.assign ? Object.assign.bind() : function (n) {
207
+ for (var e = 1; e < arguments.length; e++) {
208
+ var t = arguments[e];
209
+ for (var r in t) ({}).hasOwnProperty.call(t, r) && (n[r] = t[r]);
210
+ }
211
+ return n;
212
+ }, _extends.apply(null, arguments);
213
+ }
214
+ function _objectDestructuringEmpty(t) {
215
+ if (null == t) throw new TypeError("Cannot destructure " + t);
216
+ }
217
+ function _objectWithoutPropertiesLoose(r, e) {
218
+ if (null == r) return {};
219
+ var t = {};
220
+ for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
221
+ if (e.includes(n)) continue;
222
+ t[n] = r[n];
223
+ }
224
+ return t;
225
+ }
190
226
  function _regeneratorRuntime() {
191
- /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */
192
-
193
227
  _regeneratorRuntime = function () {
194
- return exports;
228
+ return e;
195
229
  };
196
-
197
- var exports = {},
198
- Op = Object.prototype,
199
- hasOwn = Op.hasOwnProperty,
200
- $Symbol = "function" == typeof Symbol ? Symbol : {},
201
- iteratorSymbol = $Symbol.iterator || "@@iterator",
202
- asyncIteratorSymbol = $Symbol.asyncIterator || "@@asyncIterator",
203
- toStringTagSymbol = $Symbol.toStringTag || "@@toStringTag";
204
-
205
- function define(obj, key, value) {
206
- return Object.defineProperty(obj, key, {
207
- value: value,
230
+ var t,
231
+ e = {},
232
+ r = Object.prototype,
233
+ n = r.hasOwnProperty,
234
+ o = Object.defineProperty || function (t, e, r) {
235
+ t[e] = r.value;
236
+ },
237
+ i = "function" == typeof Symbol ? Symbol : {},
238
+ a = i.iterator || "@@iterator",
239
+ c = i.asyncIterator || "@@asyncIterator",
240
+ u = i.toStringTag || "@@toStringTag";
241
+ function define(t, e, r) {
242
+ return Object.defineProperty(t, e, {
243
+ value: r,
208
244
  enumerable: !0,
209
245
  configurable: !0,
210
246
  writable: !0
211
- }), obj[key];
247
+ }), t[e];
212
248
  }
213
-
214
249
  try {
215
250
  define({}, "");
216
- } catch (err) {
217
- define = function (obj, key, value) {
218
- return obj[key] = value;
251
+ } catch (t) {
252
+ define = function (t, e, r) {
253
+ return t[e] = r;
219
254
  };
220
255
  }
221
-
222
- function wrap(innerFn, outerFn, self, tryLocsList) {
223
- var protoGenerator = outerFn && outerFn.prototype instanceof Generator ? outerFn : Generator,
224
- generator = Object.create(protoGenerator.prototype),
225
- context = new Context(tryLocsList || []);
226
- return generator._invoke = function (innerFn, self, context) {
227
- var state = "suspendedStart";
228
- return function (method, arg) {
229
- if ("executing" === state) throw new Error("Generator is already running");
230
-
231
- if ("completed" === state) {
232
- if ("throw" === method) throw arg;
233
- return doneResult();
234
- }
235
-
236
- for (context.method = method, context.arg = arg;;) {
237
- var delegate = context.delegate;
238
-
239
- if (delegate) {
240
- var delegateResult = maybeInvokeDelegate(delegate, context);
241
-
242
- if (delegateResult) {
243
- if (delegateResult === ContinueSentinel) continue;
244
- return delegateResult;
245
- }
246
- }
247
-
248
- if ("next" === context.method) context.sent = context._sent = context.arg;else if ("throw" === context.method) {
249
- if ("suspendedStart" === state) throw state = "completed", context.arg;
250
- context.dispatchException(context.arg);
251
- } else "return" === context.method && context.abrupt("return", context.arg);
252
- state = "executing";
253
- var record = tryCatch(innerFn, self, context);
254
-
255
- if ("normal" === record.type) {
256
- if (state = context.done ? "completed" : "suspendedYield", record.arg === ContinueSentinel) continue;
257
- return {
258
- value: record.arg,
259
- done: context.done
260
- };
261
- }
262
-
263
- "throw" === record.type && (state = "completed", context.method = "throw", context.arg = record.arg);
264
- }
265
- };
266
- }(innerFn, self, context), generator;
256
+ function wrap(t, e, r, n) {
257
+ var i = e && e.prototype instanceof Generator ? e : Generator,
258
+ a = Object.create(i.prototype),
259
+ c = new Context(n || []);
260
+ return o(a, "_invoke", {
261
+ value: makeInvokeMethod(t, r, c)
262
+ }), a;
267
263
  }
268
-
269
- function tryCatch(fn, obj, arg) {
264
+ function tryCatch(t, e, r) {
270
265
  try {
271
266
  return {
272
267
  type: "normal",
273
- arg: fn.call(obj, arg)
268
+ arg: t.call(e, r)
274
269
  };
275
- } catch (err) {
270
+ } catch (t) {
276
271
  return {
277
272
  type: "throw",
278
- arg: err
273
+ arg: t
279
274
  };
280
275
  }
281
276
  }
282
-
283
- exports.wrap = wrap;
284
- var ContinueSentinel = {};
285
-
277
+ e.wrap = wrap;
278
+ var h = "suspendedStart",
279
+ l = "suspendedYield",
280
+ f = "executing",
281
+ s = "completed",
282
+ y = {};
286
283
  function Generator() {}
287
-
288
284
  function GeneratorFunction() {}
289
-
290
285
  function GeneratorFunctionPrototype() {}
291
-
292
- var IteratorPrototype = {};
293
- define(IteratorPrototype, iteratorSymbol, function () {
286
+ var p = {};
287
+ define(p, a, function () {
294
288
  return this;
295
289
  });
296
- var getProto = Object.getPrototypeOf,
297
- NativeIteratorPrototype = getProto && getProto(getProto(values([])));
298
- NativeIteratorPrototype && NativeIteratorPrototype !== Op && hasOwn.call(NativeIteratorPrototype, iteratorSymbol) && (IteratorPrototype = NativeIteratorPrototype);
299
- var Gp = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(IteratorPrototype);
300
-
301
- function defineIteratorMethods(prototype) {
302
- ["next", "throw", "return"].forEach(function (method) {
303
- define(prototype, method, function (arg) {
304
- return this._invoke(method, arg);
290
+ var d = Object.getPrototypeOf,
291
+ v = d && d(d(values([])));
292
+ v && v !== r && n.call(v, a) && (p = v);
293
+ var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
294
+ function defineIteratorMethods(t) {
295
+ ["next", "throw", "return"].forEach(function (e) {
296
+ define(t, e, function (t) {
297
+ return this._invoke(e, t);
305
298
  });
306
299
  });
307
300
  }
308
-
309
- function AsyncIterator(generator, PromiseImpl) {
310
- function invoke(method, arg, resolve, reject) {
311
- var record = tryCatch(generator[method], generator, arg);
312
-
313
- if ("throw" !== record.type) {
314
- var result = record.arg,
315
- value = result.value;
316
- return value && "object" == typeof value && hasOwn.call(value, "__await") ? PromiseImpl.resolve(value.__await).then(function (value) {
317
- invoke("next", value, resolve, reject);
318
- }, function (err) {
319
- invoke("throw", err, resolve, reject);
320
- }) : PromiseImpl.resolve(value).then(function (unwrapped) {
321
- result.value = unwrapped, resolve(result);
322
- }, function (error) {
323
- return invoke("throw", error, resolve, reject);
301
+ function AsyncIterator(t, e) {
302
+ function invoke(r, o, i, a) {
303
+ var c = tryCatch(t[r], t, o);
304
+ if ("throw" !== c.type) {
305
+ var u = c.arg,
306
+ h = u.value;
307
+ return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
308
+ invoke("next", t, i, a);
309
+ }, function (t) {
310
+ invoke("throw", t, i, a);
311
+ }) : e.resolve(h).then(function (t) {
312
+ u.value = t, i(u);
313
+ }, function (t) {
314
+ return invoke("throw", t, i, a);
324
315
  });
325
316
  }
326
-
327
- reject(record.arg);
317
+ a(c.arg);
328
318
  }
329
-
330
- var previousPromise;
331
-
332
- this._invoke = function (method, arg) {
333
- function callInvokeWithMethodAndArg() {
334
- return new PromiseImpl(function (resolve, reject) {
335
- invoke(method, arg, resolve, reject);
336
- });
319
+ var r;
320
+ o(this, "_invoke", {
321
+ value: function (t, n) {
322
+ function callInvokeWithMethodAndArg() {
323
+ return new e(function (e, r) {
324
+ invoke(t, n, e, r);
325
+ });
326
+ }
327
+ return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
337
328
  }
338
-
339
- return previousPromise = previousPromise ? previousPromise.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
340
- };
329
+ });
341
330
  }
342
-
343
- function maybeInvokeDelegate(delegate, context) {
344
- var method = delegate.iterator[context.method];
345
-
346
- if (undefined === method) {
347
- if (context.delegate = null, "throw" === context.method) {
348
- if (delegate.iterator.return && (context.method = "return", context.arg = undefined, maybeInvokeDelegate(delegate, context), "throw" === context.method)) return ContinueSentinel;
349
- context.method = "throw", context.arg = new TypeError("The iterator does not provide a 'throw' method");
331
+ function makeInvokeMethod(e, r, n) {
332
+ var o = h;
333
+ return function (i, a) {
334
+ if (o === f) throw Error("Generator is already running");
335
+ if (o === s) {
336
+ if ("throw" === i) throw a;
337
+ return {
338
+ value: t,
339
+ done: !0
340
+ };
350
341
  }
351
-
352
- return ContinueSentinel;
353
- }
354
-
355
- var record = tryCatch(method, delegate.iterator, context.arg);
356
- if ("throw" === record.type) return context.method = "throw", context.arg = record.arg, context.delegate = null, ContinueSentinel;
357
- var info = record.arg;
358
- return info ? info.done ? (context[delegate.resultName] = info.value, context.next = delegate.nextLoc, "return" !== context.method && (context.method = "next", context.arg = undefined), context.delegate = null, ContinueSentinel) : info : (context.method = "throw", context.arg = new TypeError("iterator result is not an object"), context.delegate = null, ContinueSentinel);
342
+ for (n.method = i, n.arg = a;;) {
343
+ var c = n.delegate;
344
+ if (c) {
345
+ var u = maybeInvokeDelegate(c, n);
346
+ if (u) {
347
+ if (u === y) continue;
348
+ return u;
349
+ }
350
+ }
351
+ if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
352
+ if (o === h) throw o = s, n.arg;
353
+ n.dispatchException(n.arg);
354
+ } else "return" === n.method && n.abrupt("return", n.arg);
355
+ o = f;
356
+ var p = tryCatch(e, r, n);
357
+ if ("normal" === p.type) {
358
+ if (o = n.done ? s : l, p.arg === y) continue;
359
+ return {
360
+ value: p.arg,
361
+ done: n.done
362
+ };
363
+ }
364
+ "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
365
+ }
366
+ };
359
367
  }
360
-
361
- function pushTryEntry(locs) {
362
- var entry = {
363
- tryLoc: locs[0]
368
+ function maybeInvokeDelegate(e, r) {
369
+ var n = r.method,
370
+ o = e.iterator[n];
371
+ if (o === t) return r.delegate = null, "throw" === n && e.iterator.return && (r.method = "return", r.arg = t, maybeInvokeDelegate(e, r), "throw" === r.method) || "return" !== n && (r.method = "throw", r.arg = new TypeError("The iterator does not provide a '" + n + "' method")), y;
372
+ var i = tryCatch(o, e.iterator, r.arg);
373
+ if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
374
+ var a = i.arg;
375
+ return a ? a.done ? (r[e.resultName] = a.value, r.next = e.nextLoc, "return" !== r.method && (r.method = "next", r.arg = t), r.delegate = null, y) : a : (r.method = "throw", r.arg = new TypeError("iterator result is not an object"), r.delegate = null, y);
376
+ }
377
+ function pushTryEntry(t) {
378
+ var e = {
379
+ tryLoc: t[0]
364
380
  };
365
- 1 in locs && (entry.catchLoc = locs[1]), 2 in locs && (entry.finallyLoc = locs[2], entry.afterLoc = locs[3]), this.tryEntries.push(entry);
381
+ 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
366
382
  }
367
-
368
- function resetTryEntry(entry) {
369
- var record = entry.completion || {};
370
- record.type = "normal", delete record.arg, entry.completion = record;
383
+ function resetTryEntry(t) {
384
+ var e = t.completion || {};
385
+ e.type = "normal", delete e.arg, t.completion = e;
371
386
  }
372
-
373
- function Context(tryLocsList) {
387
+ function Context(t) {
374
388
  this.tryEntries = [{
375
389
  tryLoc: "root"
376
- }], tryLocsList.forEach(pushTryEntry, this), this.reset(!0);
390
+ }], t.forEach(pushTryEntry, this), this.reset(!0);
377
391
  }
378
-
379
- function values(iterable) {
380
- if (iterable) {
381
- var iteratorMethod = iterable[iteratorSymbol];
382
- if (iteratorMethod) return iteratorMethod.call(iterable);
383
- if ("function" == typeof iterable.next) return iterable;
384
-
385
- if (!isNaN(iterable.length)) {
386
- var i = -1,
387
- next = function next() {
388
- for (; ++i < iterable.length;) if (hasOwn.call(iterable, i)) return next.value = iterable[i], next.done = !1, next;
389
-
390
- return next.value = undefined, next.done = !0, next;
391
- };
392
-
393
- return next.next = next;
392
+ function values(e) {
393
+ if (e || "" === e) {
394
+ var r = e[a];
395
+ if (r) return r.call(e);
396
+ if ("function" == typeof e.next) return e;
397
+ if (!isNaN(e.length)) {
398
+ var o = -1,
399
+ i = function next() {
400
+ for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
401
+ return next.value = t, next.done = !0, next;
402
+ };
403
+ return i.next = i;
394
404
  }
395
405
  }
396
-
397
- return {
398
- next: doneResult
399
- };
406
+ throw new TypeError(typeof e + " is not iterable");
400
407
  }
401
-
402
- function doneResult() {
408
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
409
+ value: GeneratorFunctionPrototype,
410
+ configurable: !0
411
+ }), o(GeneratorFunctionPrototype, "constructor", {
412
+ value: GeneratorFunction,
413
+ configurable: !0
414
+ }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
415
+ var e = "function" == typeof t && t.constructor;
416
+ return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
417
+ }, e.mark = function (t) {
418
+ return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
419
+ }, e.awrap = function (t) {
403
420
  return {
404
- value: undefined,
405
- done: !0
421
+ __await: t
406
422
  };
407
- }
408
-
409
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, define(Gp, "constructor", GeneratorFunctionPrototype), define(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, toStringTagSymbol, "GeneratorFunction"), exports.isGeneratorFunction = function (genFun) {
410
- var ctor = "function" == typeof genFun && genFun.constructor;
411
- return !!ctor && (ctor === GeneratorFunction || "GeneratorFunction" === (ctor.displayName || ctor.name));
412
- }, exports.mark = function (genFun) {
413
- return Object.setPrototypeOf ? Object.setPrototypeOf(genFun, GeneratorFunctionPrototype) : (genFun.__proto__ = GeneratorFunctionPrototype, define(genFun, toStringTagSymbol, "GeneratorFunction")), genFun.prototype = Object.create(Gp), genFun;
414
- }, exports.awrap = function (arg) {
415
- return {
416
- __await: arg
417
- };
418
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, asyncIteratorSymbol, function () {
423
+ }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
419
424
  return this;
420
- }), exports.AsyncIterator = AsyncIterator, exports.async = function (innerFn, outerFn, self, tryLocsList, PromiseImpl) {
421
- void 0 === PromiseImpl && (PromiseImpl = Promise);
422
- var iter = new AsyncIterator(wrap(innerFn, outerFn, self, tryLocsList), PromiseImpl);
423
- return exports.isGeneratorFunction(outerFn) ? iter : iter.next().then(function (result) {
424
- return result.done ? result.value : iter.next();
425
+ }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
426
+ void 0 === i && (i = Promise);
427
+ var a = new AsyncIterator(wrap(t, r, n, o), i);
428
+ return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
429
+ return t.done ? t.value : a.next();
425
430
  });
426
- }, defineIteratorMethods(Gp), define(Gp, toStringTagSymbol, "Generator"), define(Gp, iteratorSymbol, function () {
431
+ }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
427
432
  return this;
428
- }), define(Gp, "toString", function () {
433
+ }), define(g, "toString", function () {
429
434
  return "[object Generator]";
430
- }), exports.keys = function (object) {
431
- var keys = [];
432
-
433
- for (var key in object) keys.push(key);
434
-
435
- return keys.reverse(), function next() {
436
- for (; keys.length;) {
437
- var key = keys.pop();
438
- if (key in object) return next.value = key, next.done = !1, next;
435
+ }), e.keys = function (t) {
436
+ var e = Object(t),
437
+ r = [];
438
+ for (var n in e) r.push(n);
439
+ return r.reverse(), function next() {
440
+ for (; r.length;) {
441
+ var t = r.pop();
442
+ if (t in e) return next.value = t, next.done = !1, next;
439
443
  }
440
-
441
444
  return next.done = !0, next;
442
445
  };
443
- }, exports.values = values, Context.prototype = {
446
+ }, e.values = values, Context.prototype = {
444
447
  constructor: Context,
445
- reset: function (skipTempReset) {
446
- if (this.prev = 0, this.next = 0, this.sent = this._sent = undefined, this.done = !1, this.delegate = null, this.method = "next", this.arg = undefined, this.tryEntries.forEach(resetTryEntry), !skipTempReset) for (var name in this) "t" === name.charAt(0) && hasOwn.call(this, name) && !isNaN(+name.slice(1)) && (this[name] = undefined);
448
+ reset: function (e) {
449
+ if (this.prev = 0, this.next = 0, this.sent = this._sent = t, this.done = !1, this.delegate = null, this.method = "next", this.arg = t, this.tryEntries.forEach(resetTryEntry), !e) for (var r in this) "t" === r.charAt(0) && n.call(this, r) && !isNaN(+r.slice(1)) && (this[r] = t);
447
450
  },
448
451
  stop: function () {
449
452
  this.done = !0;
450
- var rootRecord = this.tryEntries[0].completion;
451
- if ("throw" === rootRecord.type) throw rootRecord.arg;
453
+ var t = this.tryEntries[0].completion;
454
+ if ("throw" === t.type) throw t.arg;
452
455
  return this.rval;
453
456
  },
454
- dispatchException: function (exception) {
455
- if (this.done) throw exception;
456
- var context = this;
457
-
458
- function handle(loc, caught) {
459
- return record.type = "throw", record.arg = exception, context.next = loc, caught && (context.method = "next", context.arg = undefined), !!caught;
457
+ dispatchException: function (e) {
458
+ if (this.done) throw e;
459
+ var r = this;
460
+ function handle(n, o) {
461
+ return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
460
462
  }
461
-
462
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
463
- var entry = this.tryEntries[i],
464
- record = entry.completion;
465
- if ("root" === entry.tryLoc) return handle("end");
466
-
467
- if (entry.tryLoc <= this.prev) {
468
- var hasCatch = hasOwn.call(entry, "catchLoc"),
469
- hasFinally = hasOwn.call(entry, "finallyLoc");
470
-
471
- if (hasCatch && hasFinally) {
472
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
473
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
474
- } else if (hasCatch) {
475
- if (this.prev < entry.catchLoc) return handle(entry.catchLoc, !0);
463
+ for (var o = this.tryEntries.length - 1; o >= 0; --o) {
464
+ var i = this.tryEntries[o],
465
+ a = i.completion;
466
+ if ("root" === i.tryLoc) return handle("end");
467
+ if (i.tryLoc <= this.prev) {
468
+ var c = n.call(i, "catchLoc"),
469
+ u = n.call(i, "finallyLoc");
470
+ if (c && u) {
471
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
472
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
473
+ } else if (c) {
474
+ if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
476
475
  } else {
477
- if (!hasFinally) throw new Error("try statement without catch or finally");
478
- if (this.prev < entry.finallyLoc) return handle(entry.finallyLoc);
476
+ if (!u) throw Error("try statement without catch or finally");
477
+ if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
479
478
  }
480
479
  }
481
480
  }
482
481
  },
483
- abrupt: function (type, arg) {
484
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
485
- var entry = this.tryEntries[i];
486
-
487
- if (entry.tryLoc <= this.prev && hasOwn.call(entry, "finallyLoc") && this.prev < entry.finallyLoc) {
488
- var finallyEntry = entry;
482
+ abrupt: function (t, e) {
483
+ for (var r = this.tryEntries.length - 1; r >= 0; --r) {
484
+ var o = this.tryEntries[r];
485
+ if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
486
+ var i = o;
489
487
  break;
490
488
  }
491
489
  }
492
-
493
- finallyEntry && ("break" === type || "continue" === type) && finallyEntry.tryLoc <= arg && arg <= finallyEntry.finallyLoc && (finallyEntry = null);
494
- var record = finallyEntry ? finallyEntry.completion : {};
495
- return record.type = type, record.arg = arg, finallyEntry ? (this.method = "next", this.next = finallyEntry.finallyLoc, ContinueSentinel) : this.complete(record);
490
+ i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
491
+ var a = i ? i.completion : {};
492
+ return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
496
493
  },
497
- complete: function (record, afterLoc) {
498
- if ("throw" === record.type) throw record.arg;
499
- return "break" === record.type || "continue" === record.type ? this.next = record.arg : "return" === record.type ? (this.rval = this.arg = record.arg, this.method = "return", this.next = "end") : "normal" === record.type && afterLoc && (this.next = afterLoc), ContinueSentinel;
494
+ complete: function (t, e) {
495
+ if ("throw" === t.type) throw t.arg;
496
+ return "break" === t.type || "continue" === t.type ? this.next = t.arg : "return" === t.type ? (this.rval = this.arg = t.arg, this.method = "return", this.next = "end") : "normal" === t.type && e && (this.next = e), y;
500
497
  },
501
- finish: function (finallyLoc) {
502
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
503
- var entry = this.tryEntries[i];
504
- if (entry.finallyLoc === finallyLoc) return this.complete(entry.completion, entry.afterLoc), resetTryEntry(entry), ContinueSentinel;
498
+ finish: function (t) {
499
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
500
+ var r = this.tryEntries[e];
501
+ if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
505
502
  }
506
503
  },
507
- catch: function (tryLoc) {
508
- for (var i = this.tryEntries.length - 1; i >= 0; --i) {
509
- var entry = this.tryEntries[i];
510
-
511
- if (entry.tryLoc === tryLoc) {
512
- var record = entry.completion;
513
-
514
- if ("throw" === record.type) {
515
- var thrown = record.arg;
516
- resetTryEntry(entry);
504
+ catch: function (t) {
505
+ for (var e = this.tryEntries.length - 1; e >= 0; --e) {
506
+ var r = this.tryEntries[e];
507
+ if (r.tryLoc === t) {
508
+ var n = r.completion;
509
+ if ("throw" === n.type) {
510
+ var o = n.arg;
511
+ resetTryEntry(r);
517
512
  }
518
-
519
- return thrown;
513
+ return o;
520
514
  }
521
515
  }
522
-
523
- throw new Error("illegal catch attempt");
516
+ throw Error("illegal catch attempt");
524
517
  },
525
- delegateYield: function (iterable, resultName, nextLoc) {
518
+ delegateYield: function (e, r, n) {
526
519
  return this.delegate = {
527
- iterator: values(iterable),
528
- resultName: resultName,
529
- nextLoc: nextLoc
530
- }, "next" === this.method && (this.arg = undefined), ContinueSentinel;
531
- }
532
- }, exports;
533
- }
534
-
535
- function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
536
- try {
537
- var info = gen[key](arg);
538
- var value = info.value;
539
- } catch (error) {
540
- reject(error);
541
- return;
542
- }
543
-
544
- if (info.done) {
545
- resolve(value);
546
- } else {
547
- Promise.resolve(value).then(_next, _throw);
548
- }
549
- }
550
-
551
- function _asyncToGenerator(fn) {
552
- return function () {
553
- var self = this,
554
- args = arguments;
555
- return new Promise(function (resolve, reject) {
556
- var gen = fn.apply(self, args);
557
-
558
- function _next(value) {
559
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "next", value);
560
- }
561
-
562
- function _throw(err) {
563
- asyncGeneratorStep(gen, resolve, reject, _next, _throw, "throw", err);
564
- }
565
-
566
- _next(undefined);
567
- });
568
- };
569
- }
570
-
571
- function _extends() {
572
- _extends = Object.assign ? Object.assign.bind() : function (target) {
573
- for (var i = 1; i < arguments.length; i++) {
574
- var source = arguments[i];
575
-
576
- for (var key in source) {
577
- if (Object.prototype.hasOwnProperty.call(source, key)) {
578
- target[key] = source[key];
579
- }
580
- }
520
+ iterator: values(e),
521
+ resultName: r,
522
+ nextLoc: n
523
+ }, "next" === this.method && (this.arg = t), y;
581
524
  }
582
-
583
- return target;
584
- };
585
- return _extends.apply(this, arguments);
586
- }
587
-
588
- function _objectDestructuringEmpty(obj) {
589
- if (obj == null) throw new TypeError("Cannot destructure undefined");
590
- }
591
-
592
- function _objectWithoutPropertiesLoose(source, excluded) {
593
- if (source == null) return {};
594
- var target = {};
595
- var sourceKeys = Object.keys(source);
596
- var key, i;
597
-
598
- for (i = 0; i < sourceKeys.length; i++) {
599
- key = sourceKeys[i];
600
- if (excluded.indexOf(key) >= 0) continue;
601
- target[key] = source[key];
602
- }
603
-
604
- return target;
525
+ }, e;
605
526
  }
606
527
 
607
528
  var _excluded = ["resourceID"],
608
- _excluded2 = ["nodeID", "showPage"],
609
- _excluded3 = ["nodeID", "showPage"],
610
- _excluded4 = ["goTo"],
611
- _excluded5 = ["goTo"],
612
- _excluded6 = ["goTo", "returnUrl"];
529
+ _excluded2 = ["nodeID", "showPage"],
530
+ _excluded3 = ["exhibitID"],
531
+ _excluded4 = ["nodeID", "showPage"],
532
+ _excluded5 = ["goTo"],
533
+ _excluded6 = ["goTo"],
534
+ _excluded7 = ["goTo", "returnUrl"];
613
535
  function home(_temp) {
614
- var _ref = _temp === void 0 ? {} : _temp;
615
-
616
- _objectDestructuringEmpty(_ref);
617
-
536
+ _objectDestructuringEmpty(_temp === void 0 ? {} : _temp);
618
537
  return "/home";
619
538
  }
620
539
  function activities(_temp2) {
621
- var _ref2 = _temp2 === void 0 ? {} : _temp2;
622
-
623
- _objectDestructuringEmpty(_ref2);
624
-
540
+ _objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
625
541
  return "/activities";
626
542
  }
627
543
  function activity(_ref3) {
@@ -629,349 +545,299 @@ function activity(_ref3) {
629
545
  return "/activity/" + activityID;
630
546
  }
631
547
  function dashboard(_temp3) {
632
- var _ref4 = _temp3 === void 0 ? {} : _temp3;
633
-
634
- _objectDestructuringEmpty(_ref4);
635
-
548
+ _objectDestructuringEmpty(_temp3 === void 0 ? {} : _temp3);
636
549
  return "/dashboard";
637
550
  }
638
551
  function market(_temp4) {
639
552
  var _ref5 = _temp4 === void 0 ? {} : _temp4,
640
- params = _extends({}, _ref5);
641
-
553
+ params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
642
554
  return "/market" + handleQuery(params);
643
555
  }
644
556
  function exampleNodes(_temp5) {
645
- var _ref6 = _temp5 === void 0 ? {} : _temp5;
646
-
647
- _objectDestructuringEmpty(_ref6);
648
-
557
+ _objectDestructuringEmpty(_temp5 === void 0 ? {} : _temp5);
649
558
  return "/examples";
650
559
  }
651
560
  function resourceDetails(_ref7) {
652
561
  var resourceID = _ref7.resourceID,
653
- params = _objectWithoutPropertiesLoose(_ref7, _excluded);
654
-
562
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded);
655
563
  return "/resource/details/" + resourceID + handleQuery(params);
656
564
  }
565
+ function collectionDetails(_ref8) {
566
+ var collectionID = _ref8.collectionID;
567
+ return "/resource/collectionDetails/" + collectionID;
568
+ }
657
569
  function resourceCreatorEntry(_temp6) {
658
- var _ref8 = _temp6 === void 0 ? {} : _temp6;
659
-
660
- _objectDestructuringEmpty(_ref8);
661
-
570
+ _objectDestructuringEmpty(_temp6 === void 0 ? {} : _temp6);
662
571
  return "/resource/creatorEntry";
663
572
  }
664
573
  function resourceCreator(_temp7) {
665
- var _ref9 = _temp7 === void 0 ? {} : _temp7;
666
-
667
- _objectDestructuringEmpty(_ref9);
668
-
574
+ _objectDestructuringEmpty(_temp7 === void 0 ? {} : _temp7);
669
575
  return "/resource/creator";
670
576
  }
671
577
  function resourceCreatorBatch(_temp8) {
672
- var _ref10 = _temp8 === void 0 ? {} : _temp8;
673
-
674
- _objectDestructuringEmpty(_ref10);
675
-
578
+ _objectDestructuringEmpty(_temp8 === void 0 ? {} : _temp8);
676
579
  return "/resource/creatorBatch";
677
580
  }
678
581
  function collectionCreator(_temp9) {
679
- var _ref11 = _temp9 === void 0 ? {} : _temp9;
680
-
681
- _objectDestructuringEmpty(_ref11);
682
-
582
+ _objectDestructuringEmpty(_temp9 === void 0 ? {} : _temp9);
683
583
  return "/resource/collectionCreator";
684
584
  }
685
585
  function myResources(_temp10) {
686
- var _ref12 = _temp10 === void 0 ? {} : _temp10;
687
-
688
- _objectDestructuringEmpty(_ref12);
689
-
586
+ _objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
690
587
  return "/resource/list";
691
588
  }
692
589
  function myCollections(_temp11) {
693
- var _ref13 = _temp11 === void 0 ? {} : _temp11;
694
-
695
- _objectDestructuringEmpty(_ref13);
696
-
590
+ _objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
697
591
  return "/resource/collection";
698
592
  }
699
593
  function myCollects(_temp12) {
700
- var _ref14 = _temp12 === void 0 ? {} : _temp12;
701
-
702
- _objectDestructuringEmpty(_ref14);
703
-
594
+ _objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
704
595
  return "/resource/collect";
705
596
  }
706
- function resourceVersionInfo(_ref15) {
707
- var resourceID = _ref15.resourceID,
708
- _ref15$version = _ref15.version,
709
- version = _ref15$version === void 0 ? '' : _ref15$version;
597
+ function resourceVersionInfo(_ref16) {
598
+ var resourceID = _ref16.resourceID,
599
+ _ref16$version = _ref16.version,
600
+ version = _ref16$version === void 0 ? '' : _ref16$version;
710
601
  return "/resource/sidebar/versionInfo/" + resourceID + handleQuery({
711
602
  version: version
712
603
  });
713
604
  }
714
- function resourceInfo(_ref16) {
715
- var resourceID = _ref16.resourceID;
605
+ function resourceInfo(_ref17) {
606
+ var resourceID = _ref17.resourceID;
716
607
  return "/resource/sidebar/info/" + resourceID;
717
608
  }
718
- function resourcePolicy(_ref17) {
719
- var resourceID = _ref17.resourceID;
609
+ function resourcePolicy(_ref18) {
610
+ var resourceID = _ref18.resourceID;
720
611
  return "/resource/sidebar/policy/" + resourceID;
721
612
  }
722
- function resourceContract(_ref18) {
723
- var resourceID = _ref18.resourceID;
613
+ function resourceContract(_ref19) {
614
+ var resourceID = _ref19.resourceID;
724
615
  return "/resource/sidebar/contract/" + resourceID;
725
616
  }
726
- function resourceDependency(_ref19) {
727
- var resourceID = _ref19.resourceID;
617
+ function resourceDependency(_ref20) {
618
+ var resourceID = _ref20.resourceID;
728
619
  return "/resource/sidebar/dependency/" + resourceID;
729
620
  }
730
- function resourceVersionCreator(_ref20) {
731
- var resourceID = _ref20.resourceID;
621
+ function resourceVersionCreator(_ref21) {
622
+ var resourceID = _ref21.resourceID;
732
623
  return "/resource/versionCreator/" + resourceID;
733
624
  }
734
- function collectionVersionInfo(_ref21) {
735
- var collectionID = _ref21.collectionID;
625
+ function collectionVersionInfo(_ref22) {
626
+ var collectionID = _ref22.collectionID;
736
627
  return "/resource/collectionSidebar/versionInfo/" + collectionID;
737
628
  }
738
- function collectionInfo(_ref22) {
739
- var collectionID = _ref22.collectionID;
629
+ function collectionInfo(_ref23) {
630
+ var collectionID = _ref23.collectionID;
740
631
  return "/resource/collectionSidebar/info/" + collectionID;
741
632
  }
742
- function collectionPolicy(_ref23) {
743
- var collectionID = _ref23.collectionID;
633
+ function collectionPolicy(_ref24) {
634
+ var collectionID = _ref24.collectionID;
744
635
  return "/resource/collectionSidebar/policy/" + collectionID;
745
636
  }
746
- function collectionContract(_ref24) {
747
- var collectionID = _ref24.collectionID;
637
+ function collectionContract(_ref25) {
638
+ var collectionID = _ref25.collectionID;
748
639
  return "/resource/collectionSidebar/contract/" + collectionID;
749
640
  }
750
- function collectionDependency(_ref25) {
751
- var collectionID = _ref25.collectionID;
641
+ function collectionDependency(_ref26) {
642
+ var collectionID = _ref26.collectionID;
752
643
  return "/resource/collectionSidebar/dependency/" + collectionID;
753
644
  }
754
645
  function nodeCreator(_temp13) {
755
- var _ref26 = _temp13 === void 0 ? {} : _temp13;
756
-
757
- _objectDestructuringEmpty(_ref26);
758
-
646
+ _objectDestructuringEmpty(_temp13 === void 0 ? {} : _temp13);
759
647
  return "/node/creator";
760
648
  }
761
- function nodeManagement(_ref27) {
762
- var nodeID = _ref27.nodeID,
763
- _ref27$showPage = _ref27.showPage,
764
- showPage = _ref27$showPage === void 0 ? 'exhibit' : _ref27$showPage,
765
- params = _objectWithoutPropertiesLoose(_ref27, _excluded2);
766
-
649
+ function nodeManagement(_ref28) {
650
+ var nodeID = _ref28.nodeID,
651
+ _ref28$showPage = _ref28.showPage,
652
+ showPage = _ref28$showPage === void 0 ? 'exhibit' : _ref28$showPage,
653
+ params = _objectWithoutPropertiesLoose(_ref28, _excluded2);
767
654
  return "/node/formal/" + nodeID + handleQuery(_extends({
768
655
  showPage: showPage
769
656
  }, params));
770
657
  }
771
- function exhibitManagement(_ref28) {
772
- var exhibitID = _ref28.exhibitID,
773
- openAuthDrawer = _ref28.openAuthDrawer;
774
- return "/node/exhibit/formal/" + exhibitID + handleQuery({
775
- openAuthDrawer: openAuthDrawer
776
- });
777
- }
778
- function collectionExhibitManagement(_ref29) {
658
+ function exhibitManagement(_ref29) {
779
659
  var exhibitID = _ref29.exhibitID,
780
- openAuthDrawer = _ref29.openAuthDrawer;
660
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded3);
661
+ return "/node/exhibit/formal/" + exhibitID + handleQuery(_extends({}, params));
662
+ }
663
+ function collectionExhibitManagement(_ref30) {
664
+ var exhibitID = _ref30.exhibitID,
665
+ openAuthDrawer = _ref30.openAuthDrawer;
781
666
  return "/node/collectionExhibit/formal/" + exhibitID + handleQuery({
782
667
  openAuthDrawer: openAuthDrawer
783
668
  });
784
669
  }
785
- function informNodeManagement(_ref30) {
786
- var nodeID = _ref30.nodeID,
787
- _ref30$showPage = _ref30.showPage,
788
- showPage = _ref30$showPage === void 0 ? 'exhibit' : _ref30$showPage,
789
- params = _objectWithoutPropertiesLoose(_ref30, _excluded3);
790
-
670
+ function informNodeManagement(_ref31) {
671
+ var nodeID = _ref31.nodeID,
672
+ _ref31$showPage = _ref31.showPage,
673
+ showPage = _ref31$showPage === void 0 ? 'exhibit' : _ref31$showPage,
674
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded4);
791
675
  return "/node/informal/" + nodeID + handleQuery(_extends({
792
676
  showPage: showPage
793
677
  }, params));
794
678
  }
795
- function informExhibitManagement(_ref31) {
796
- var exhibitID = _ref31.exhibitID;
679
+ function informExhibitManagement(_ref32) {
680
+ var exhibitID = _ref32.exhibitID;
797
681
  return "/node/exhibit/informal/" + exhibitID;
798
682
  }
799
683
  function storageSpace(_temp14) {
800
- var _ref32 = _temp14 === void 0 ? {} : _temp14,
801
- params = _extends({}, _ref32);
802
-
684
+ var _ref33 = _temp14 === void 0 ? {} : _temp14,
685
+ params = _extends({}, (_objectDestructuringEmpty(_ref33), _ref33));
803
686
  return "/storage" + handleQuery(params);
804
687
  }
805
- function objectDetails(_ref33) {
806
- var params = _extends({}, _ref33);
807
-
688
+ function objectDetails(_ref34) {
689
+ var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
808
690
  return "/storage" + handleQuery(params);
809
691
  }
810
- function resourceCreateSuccess(_ref34) {
811
- var resourceID = _ref34.resourceID;
692
+ function collectionCreateSuccess(_ref35) {
693
+ var collectionID = _ref35.collectionID;
694
+ return "/result/collection/create/success/" + collectionID;
695
+ }
696
+ function resourceCreateSuccess(_ref36) {
697
+ var resourceID = _ref36.resourceID;
812
698
  return "/result/resource/create/success/" + resourceID;
813
699
  }
814
- function resourceVersionCreateSuccess(_ref35) {
815
- var resourceID = _ref35.resourceID,
816
- version = _ref35.version;
700
+ function resourceVersionCreateSuccess(_ref37) {
701
+ var resourceID = _ref37.resourceID,
702
+ version = _ref37.version;
817
703
  return "/result/resource/version/create/success/" + resourceID + "/" + version;
818
704
  }
819
- function resourceVersionCreateRelease(_ref36) {
820
- var resourceID = _ref36.resourceID,
821
- version = _ref36.version;
705
+ function resourceVersionCreateRelease(_ref38) {
706
+ var resourceID = _ref38.resourceID,
707
+ version = _ref38.version;
822
708
  return "/result/resource/version/create/release/" + resourceID + "/" + version;
823
709
  }
824
- function nodeCreateSuccess(_ref37) {
825
- var nodeID = _ref37.nodeID;
710
+ function nodeCreateSuccess(_ref39) {
711
+ var nodeID = _ref39.nodeID;
826
712
  return "/result/node/create/success/" + nodeID;
827
713
  }
828
714
  function invitation(_temp15) {
829
- var _ref38 = _temp15 === void 0 ? {} : _temp15,
830
- goTo = _ref38.goTo,
831
- params = _objectWithoutPropertiesLoose(_ref38, _excluded4);
832
-
715
+ var _ref40 = _temp15 === void 0 ? {} : _temp15,
716
+ goTo = _ref40.goTo,
717
+ params = _objectWithoutPropertiesLoose(_ref40, _excluded5);
833
718
  // console.log(params.goTo, 'goTo9iowjefklsdj;flksdjflk')
834
719
  return "/invitation" + handleQuery(_extends({}, params, {
835
720
  returnUrl: goTo ? encodeURIComponent(goTo) : undefined
836
721
  }));
837
722
  }
838
723
  function exception403(_temp16) {
839
- var _ref39 = _temp16 === void 0 ? {} : _temp16,
840
- params = _extends({}, _ref39);
841
-
724
+ var _ref41 = _temp16 === void 0 ? {} : _temp16,
725
+ params = _extends({}, (_objectDestructuringEmpty(_ref41), _ref41));
842
726
  var fromUrl = params.from || '';
843
-
844
727
  if (!fromUrl) {
845
728
  var _window$location = window.location,
846
- href = _window$location.href,
847
- origin = _window$location.origin;
729
+ href = _window$location.href,
730
+ origin = _window$location.origin;
848
731
  fromUrl = href.replace(origin, '');
849
732
  }
850
-
851
733
  return "/exception/403" + handleQuery({
852
734
  from: fromUrl
853
735
  });
854
736
  }
855
- function nodeFreeze(_ref40) {
856
- var nodeID = _ref40.nodeID;
737
+ function exceptionUnableToAccess(_temp17) {
738
+ var _ref42 = _temp17 === void 0 ? {} : _temp17,
739
+ params = _extends({}, (_objectDestructuringEmpty(_ref42), _ref42));
740
+ var fromUrl = params.from || '';
741
+ if (!fromUrl) {
742
+ var _window$location2 = window.location,
743
+ href = _window$location2.href,
744
+ origin = _window$location2.origin;
745
+ fromUrl = href.replace(origin, '');
746
+ }
747
+ return "/exception/unableToAccess" + handleQuery({
748
+ from: fromUrl
749
+ });
750
+ }
751
+ function nodeFreeze(_ref43) {
752
+ var nodeID = _ref43.nodeID;
857
753
  return "/result/node/freeze/" + nodeID;
858
754
  }
859
- function resourceFreeze(_ref41) {
860
- var resourceID = _ref41.resourceID;
755
+ function resourceFreeze(_ref44) {
756
+ var resourceID = _ref44.resourceID;
861
757
  return "/result/resource/freeze/" + resourceID;
862
758
  }
863
- function globalSearch(_ref42) {
864
- var search = _ref42.search;
759
+ function globalSearch(_ref45) {
760
+ var search = _ref45.search;
865
761
  return "/search" + handleQuery({
866
762
  search: search
867
763
  });
868
764
  }
869
- function login(_temp17) {
870
- var _ref43 = _temp17 === void 0 ? {} : _temp17,
871
- goTo = _ref43.goTo;
872
-
765
+ function login(_temp18) {
766
+ var _ref46 = _temp18 === void 0 ? {} : _temp18,
767
+ goTo = _ref46.goTo;
873
768
  return "/login" + handleQuery({
874
769
  goTo: goTo ? encodeURIComponent(goTo) : undefined
875
770
  });
876
771
  }
877
- function logon(_temp18) {
878
- var _ref44 = _temp18 === void 0 ? {} : _temp18,
879
- goTo = _ref44.goTo,
880
- params = _objectWithoutPropertiesLoose(_ref44, _excluded5);
881
-
772
+ function logon(_temp19) {
773
+ var _ref47 = _temp19 === void 0 ? {} : _temp19,
774
+ goTo = _ref47.goTo,
775
+ params = _objectWithoutPropertiesLoose(_ref47, _excluded6);
882
776
  return "/logon" + handleQuery(_extends({
883
777
  goTo: goTo ? encodeURIComponent(goTo) : undefined
884
778
  }, params));
885
779
  }
886
- function bind(_temp19) {
887
- var _ref45 = _temp19 === void 0 ? {} : _temp19,
888
- goTo = _ref45.goTo,
889
- returnUrl = _ref45.returnUrl,
890
- params = _objectWithoutPropertiesLoose(_ref45, _excluded6);
891
-
780
+ function bind(_temp20) {
781
+ var _ref48 = _temp20 === void 0 ? {} : _temp20,
782
+ goTo = _ref48.goTo,
783
+ returnUrl = _ref48.returnUrl,
784
+ params = _objectWithoutPropertiesLoose(_ref48, _excluded7);
892
785
  return "/bind" + handleQuery(_extends({
893
786
  goTo: goTo ? encodeURIComponent(goTo) : undefined,
894
787
  returnUrl: returnUrl ? encodeURIComponent(returnUrl) : undefined
895
788
  }, params));
896
789
  }
897
- function retrieveUserPassword(_temp20) {
898
- var _ref46 = _temp20 === void 0 ? {} : _temp20,
899
- goTo = _ref46.goTo;
900
-
790
+ function retrieveUserPassword(_temp21) {
791
+ var _ref49 = _temp21 === void 0 ? {} : _temp21,
792
+ goTo = _ref49.goTo;
901
793
  return "/retrieve" + handleQuery({
902
794
  goTo: goTo ? encodeURIComponent(goTo) : undefined
903
795
  });
904
796
  }
905
- function retrievePayPassword(_temp21) {
906
- var _ref47 = _temp21 === void 0 ? {} : _temp21;
907
-
908
- _objectDestructuringEmpty(_ref47);
909
-
797
+ function retrievePayPassword(_temp22) {
798
+ _objectDestructuringEmpty(_temp22 === void 0 ? {} : _temp22);
910
799
  return "/retrievePayPassword";
911
800
  }
912
- function userFreeze(_temp22) {
913
- var _ref48 = _temp22 === void 0 ? {} : _temp22;
914
-
915
- _objectDestructuringEmpty(_ref48);
916
-
801
+ function userFreeze(_temp23) {
802
+ _objectDestructuringEmpty(_temp23 === void 0 ? {} : _temp23);
917
803
  return "/freeze";
918
804
  }
919
- function wallet(_temp23) {
920
- var _ref49 = _temp23 === void 0 ? {} : _temp23;
921
-
922
- _objectDestructuringEmpty(_ref49);
923
-
805
+ function wallet(_temp24) {
806
+ _objectDestructuringEmpty(_temp24 === void 0 ? {} : _temp24);
924
807
  return "/logged/wallet";
925
808
  }
926
- function reward(_temp24) {
927
- var _ref50 = _temp24 === void 0 ? {} : _temp24;
928
-
929
- _objectDestructuringEmpty(_ref50);
930
-
809
+ function reward(_temp25) {
810
+ _objectDestructuringEmpty(_temp25 === void 0 ? {} : _temp25);
931
811
  return "/logged/reward";
932
812
  }
933
- function contract(_temp25) {
934
- var _ref51 = _temp25 === void 0 ? {} : _temp25,
935
- params = _extends({}, _ref51);
936
-
813
+ function contract(_temp26) {
814
+ var _ref54 = _temp26 === void 0 ? {} : _temp26,
815
+ params = _extends({}, (_objectDestructuringEmpty(_ref54), _ref54));
937
816
  return "/logged/contract" + handleQuery(_extends({}, params));
938
817
  }
939
- function setting(_temp26) {
940
- var _ref52 = _temp26 === void 0 ? {} : _temp26;
941
-
942
- _objectDestructuringEmpty(_ref52);
943
-
818
+ function setting(_temp27) {
819
+ _objectDestructuringEmpty(_temp27 === void 0 ? {} : _temp27);
944
820
  return "/logged/setting";
945
821
  }
946
- function binding(_temp27) {
947
- var _ref53 = _temp27 === void 0 ? {} : _temp27;
948
-
949
- _objectDestructuringEmpty(_ref53);
950
-
822
+ function binding(_temp28) {
823
+ _objectDestructuringEmpty(_temp28 === void 0 ? {} : _temp28);
951
824
  return "/logged/binding";
952
825
  }
953
- function resultBindingSuccess(_temp28) {
954
- var _ref54 = _temp28 === void 0 ? {} : _temp28;
955
-
956
- _objectDestructuringEmpty(_ref54);
957
-
826
+ function resultBindingSuccess(_temp29) {
827
+ _objectDestructuringEmpty(_temp29 === void 0 ? {} : _temp29);
958
828
  return "/result/binding";
959
829
  }
960
830
  /************** user End ******************************************************/
961
-
962
831
  function handleQuery(query) {
963
832
  var obj = {};
964
-
965
833
  for (var _i = 0, _Object$entries = Object.entries(query); _i < _Object$entries.length; _i++) {
966
834
  var _Object$entries$_i = _Object$entries[_i],
967
- key = _Object$entries$_i[0],
968
- value = _Object$entries$_i[1];
969
-
835
+ key = _Object$entries$_i[0],
836
+ value = _Object$entries$_i[1];
970
837
  if (key && value) {
971
838
  obj[key] = value;
972
839
  }
973
840
  }
974
-
975
841
  var result = querystring.stringify(obj);
976
842
  return result ? '?' + result : '';
977
843
  }
@@ -985,6 +851,7 @@ var LinkTo = {
985
851
  market: market,
986
852
  exampleNodes: exampleNodes,
987
853
  resourceDetails: resourceDetails,
854
+ collectionDetails: collectionDetails,
988
855
  resourceCreatorEntry: resourceCreatorEntry,
989
856
  resourceCreator: resourceCreator,
990
857
  resourceCreatorBatch: resourceCreatorBatch,
@@ -1011,12 +878,14 @@ var LinkTo = {
1011
878
  informExhibitManagement: informExhibitManagement,
1012
879
  storageSpace: storageSpace,
1013
880
  objectDetails: objectDetails,
881
+ collectionCreateSuccess: collectionCreateSuccess,
1014
882
  resourceCreateSuccess: resourceCreateSuccess,
1015
883
  resourceVersionCreateSuccess: resourceVersionCreateSuccess,
1016
884
  resourceVersionCreateRelease: resourceVersionCreateRelease,
1017
885
  nodeCreateSuccess: nodeCreateSuccess,
1018
886
  invitation: invitation,
1019
887
  exception403: exception403,
888
+ exceptionUnableToAccess: exceptionUnableToAccess,
1020
889
  nodeFreeze: nodeFreeze,
1021
890
  resourceFreeze: resourceFreeze,
1022
891
  globalSearch: globalSearch,
@@ -1036,38 +905,34 @@ var LinkTo = {
1036
905
 
1037
906
  // export const apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
1038
907
  // 预设资源类型
1039
- var resourceTypes = ['json', 'widget', 'image', 'audio', 'markdown', 'theme', 'reveal_slide', 'license', 'video', 'catalog']; // 全局列表加载条目数
1040
-
1041
- var pageSize = 100; // Moment 日期时间格式
1042
-
908
+ var resourceTypes = ['json', 'widget', 'image', 'audio', 'markdown', 'theme', 'reveal_slide', 'license', 'video', 'catalog'];
909
+ // 全局列表加载条目数
910
+ var pageSize = 100;
911
+ // Moment 日期时间格式
1043
912
  var momentDateFormat = 'YYYY-MM-DD';
1044
- var momentDateTimeFormat = 'YYYY-MM-DD HH:mm'; // 签约方用户的身份类型定义
1045
-
913
+ var momentDateTimeFormat = 'YYYY-MM-DD HH:mm';
914
+ // 签约方用户的身份类型定义
1046
915
  var EnumContractPartyIdentityType;
1047
-
1048
916
  (function (EnumContractPartyIdentityType) {
1049
917
  EnumContractPartyIdentityType[EnumContractPartyIdentityType["resource"] = 1] = "resource";
1050
918
  EnumContractPartyIdentityType[EnumContractPartyIdentityType["node"] = 2] = "node";
1051
919
  EnumContractPartyIdentityType[EnumContractPartyIdentityType["consumer"] = 3] = "consumer";
1052
- })(EnumContractPartyIdentityType || (EnumContractPartyIdentityType = {})); // 标的物类型定义
1053
-
1054
-
920
+ })(EnumContractPartyIdentityType || (EnumContractPartyIdentityType = {}));
921
+ // 标的物类型定义
1055
922
  var EnumSubjectType;
1056
-
1057
923
  (function (EnumSubjectType) {
1058
924
  EnumSubjectType[EnumSubjectType["resource"] = 1] = "resource";
1059
925
  EnumSubjectType[EnumSubjectType["exhibit"] = 2] = "exhibit";
1060
926
  EnumSubjectType[EnumSubjectType["user"] = 3] = "user";
1061
- })(EnumSubjectType || (EnumSubjectType = {})); // 合约状态定义
1062
-
1063
-
927
+ })(EnumSubjectType || (EnumSubjectType = {}));
928
+ // 合约状态定义
1064
929
  var EnumContractStatus;
1065
-
1066
930
  (function (EnumContractStatus) {
1067
931
  EnumContractStatus[EnumContractStatus["pending"] = 0] = "pending";
1068
932
  EnumContractStatus[EnumContractStatus["authorized"] = 1] = "authorized";
1069
933
  EnumContractStatus[EnumContractStatus["stopped"] = 2] = "stopped";
1070
- })(EnumContractStatus || (EnumContractStatus = {})); // 合约授权状态定义
934
+ })(EnumContractStatus || (EnumContractStatus = {}));
935
+ // 合约授权状态定义
1071
936
  // export enum ContractAuthStatus {
1072
937
  //
1073
938
  // }
@@ -1098,11 +963,10 @@ function details(params) {
1098
963
  method: 'GET',
1099
964
  url: "/v2/nodes/" + params.nodeId
1100
965
  });
1101
- } // return FUtil.Axios.get(`/v2/nodes/detail`, {
966
+ }
967
+ // return FUtil.Axios.get(`/v2/nodes/detail`, {
1102
968
  // params,
1103
969
  // });
1104
-
1105
-
1106
970
  return FUtil.Request({
1107
971
  method: 'GET',
1108
972
  url: "/v2/nodes/detail",
@@ -1130,6 +994,13 @@ function setNodeInfo(params) {
1130
994
  data: params
1131
995
  });
1132
996
  }
997
+ function deleteNode(_ref) {
998
+ var nodeId = _ref.nodeId;
999
+ return FUtil.Request({
1000
+ method: 'DELETE',
1001
+ url: "/v2/nodes/" + nodeId
1002
+ });
1003
+ }
1133
1004
 
1134
1005
  var Node = {
1135
1006
  __proto__: null,
@@ -1137,19 +1008,21 @@ var Node = {
1137
1008
  details: details,
1138
1009
  nodes: nodes,
1139
1010
  searchForClient: searchForClient,
1140
- setNodeInfo: setNodeInfo
1011
+ setNodeInfo: setNodeInfo,
1012
+ deleteNode: deleteNode
1141
1013
  };
1142
1014
 
1143
1015
  var _excluded$1 = ["presentableId"],
1144
- _excluded2$1 = ["presentableId"],
1145
- _excluded3$1 = ["presentableId"],
1146
- _excluded4$1 = ["presentableId"],
1147
- _excluded5$1 = ["presentableId"],
1148
- _excluded6$1 = ["presentableId"],
1149
- _excluded7 = ["presentableId"],
1150
- _excluded8 = ["presentableId"],
1151
- _excluded9 = ["nodeId"],
1152
- _excluded10 = ["nodeId"];
1016
+ _excluded2$1 = ["presentableId"],
1017
+ _excluded3$1 = ["presentableId"],
1018
+ _excluded4$1 = ["presentableId"],
1019
+ _excluded5$1 = ["presentableId"],
1020
+ _excluded6$1 = ["presentableId"],
1021
+ _excluded7$1 = ["presentableId"],
1022
+ _excluded8 = ["presentableId"],
1023
+ _excluded9 = ["nodeId"],
1024
+ _excluded10 = ["nodeId"],
1025
+ _excluded11 = ["presentableId"];
1153
1026
  function createPresentable(params) {
1154
1027
  return FUtil.Request({
1155
1028
  method: 'POST',
@@ -1159,8 +1032,7 @@ function createPresentable(params) {
1159
1032
  }
1160
1033
  function updatePresentable(_ref) {
1161
1034
  var presentableId = _ref.presentableId,
1162
- params = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1163
-
1035
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$1);
1164
1036
  return FUtil.Request({
1165
1037
  method: 'PUT',
1166
1038
  url: "/v2/presentables/" + presentableId,
@@ -1169,8 +1041,7 @@ function updatePresentable(_ref) {
1169
1041
  }
1170
1042
  function presentablesOnlineStatus(_ref2) {
1171
1043
  var presentableId = _ref2.presentableId,
1172
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
1173
-
1044
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$1);
1174
1045
  return FUtil.Request({
1175
1046
  method: 'PUT',
1176
1047
  url: "/v2/presentables/" + presentableId + "/onlineStatus",
@@ -1185,10 +1056,8 @@ function presentableDetails(params) {
1185
1056
  params: params
1186
1057
  });
1187
1058
  }
1188
-
1189
1059
  var presentableId = params.presentableId,
1190
- p = _objectWithoutPropertiesLoose(params, _excluded3$1);
1191
-
1060
+ p = _objectWithoutPropertiesLoose(params, _excluded3$1);
1192
1061
  return FUtil.Request({
1193
1062
  method: 'GET',
1194
1063
  url: "/v2/presentables/" + presentableId,
@@ -1211,8 +1080,7 @@ function presentableList(params) {
1211
1080
  }
1212
1081
  function dependencyTree(_ref3) {
1213
1082
  var presentableId = _ref3.presentableId,
1214
- params = _objectWithoutPropertiesLoose(_ref3, _excluded4$1);
1215
-
1083
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded4$1);
1216
1084
  return FUtil.Request({
1217
1085
  method: 'GET',
1218
1086
  url: "/v2/presentables/" + presentableId + "/dependencyTree",
@@ -1221,8 +1089,7 @@ function dependencyTree(_ref3) {
1221
1089
  }
1222
1090
  function relationTree(_ref4) {
1223
1091
  var presentableId = _ref4.presentableId,
1224
- params = _objectWithoutPropertiesLoose(_ref4, _excluded5$1);
1225
-
1092
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded5$1);
1226
1093
  return FUtil.Request({
1227
1094
  method: 'GET',
1228
1095
  url: "/v2/presentables/" + presentableId + "/relationTree",
@@ -1231,8 +1098,7 @@ function relationTree(_ref4) {
1231
1098
  }
1232
1099
  function authTree(_ref5) {
1233
1100
  var presentableId = _ref5.presentableId,
1234
- params = _objectWithoutPropertiesLoose(_ref5, _excluded6$1);
1235
-
1101
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded6$1);
1236
1102
  return FUtil.Request({
1237
1103
  method: 'GET',
1238
1104
  url: "/v2/presentables/" + presentableId + "/authTree",
@@ -1241,8 +1107,7 @@ function authTree(_ref5) {
1241
1107
  }
1242
1108
  function presentablesVersion(_ref6) {
1243
1109
  var presentableId = _ref6.presentableId,
1244
- params = _objectWithoutPropertiesLoose(_ref6, _excluded7);
1245
-
1110
+ params = _objectWithoutPropertiesLoose(_ref6, _excluded7$1);
1246
1111
  return FUtil.Request({
1247
1112
  method: 'PUT',
1248
1113
  url: "/v2/presentables/" + presentableId + "/version",
@@ -1251,8 +1116,7 @@ function presentablesVersion(_ref6) {
1251
1116
  }
1252
1117
  function updateRewriteProperty(_ref7) {
1253
1118
  var presentableId = _ref7.presentableId,
1254
- params = _objectWithoutPropertiesLoose(_ref7, _excluded8);
1255
-
1119
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded8);
1256
1120
  return FUtil.Request({
1257
1121
  method: 'PUT',
1258
1122
  url: "/v2/presentables/" + presentableId + "/rewriteProperty",
@@ -1261,8 +1125,7 @@ function updateRewriteProperty(_ref7) {
1261
1125
  }
1262
1126
  function batchAuth(_ref8) {
1263
1127
  var nodeId = _ref8.nodeId,
1264
- params = _objectWithoutPropertiesLoose(_ref8, _excluded9);
1265
-
1128
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded9);
1266
1129
  return FUtil.Request({
1267
1130
  method: 'GET',
1268
1131
  url: "/v2/auths/presentables/nodes/" + nodeId + "/batchAuth/result",
@@ -1271,8 +1134,7 @@ function batchAuth(_ref8) {
1271
1134
  }
1272
1135
  function contractAppliedPresentable(_ref9) {
1273
1136
  var nodeId = _ref9.nodeId,
1274
- params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
1275
-
1137
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
1276
1138
  return FUtil.Request({
1277
1139
  method: 'GET',
1278
1140
  url: "/v2/presentables/" + nodeId + "/contractAppliedPresentable",
@@ -1287,8 +1149,7 @@ function batchCreatePresentable(params) {
1287
1149
  });
1288
1150
  }
1289
1151
  function batchUpdatePresentable(_ref10) {
1290
- var params = _extends({}, _ref10);
1291
-
1152
+ var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1292
1153
  return FUtil.Request({
1293
1154
  method: 'PUT',
1294
1155
  url: "/v2/presentables/updatePresentableBatch",
@@ -1296,14 +1157,22 @@ function batchUpdatePresentable(_ref10) {
1296
1157
  });
1297
1158
  }
1298
1159
  function batchUpdatePresentableStatus(_ref11) {
1299
- var params = _extends({}, _ref11);
1300
-
1160
+ var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1301
1161
  return FUtil.Request({
1302
1162
  method: 'PUT',
1303
1163
  url: "/v2/presentables/updatePresentableOnlineStatusBatch",
1304
1164
  data: params
1305
1165
  });
1306
1166
  }
1167
+ function ignorePresentableVersionUpdateTip(_ref12) {
1168
+ var presentableId = _ref12.presentableId,
1169
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded11);
1170
+ return FUtil.Request({
1171
+ method: 'POST',
1172
+ url: "/v2/presentables/" + presentableId + "/ignorePresentableVersionUpdateTip",
1173
+ data: params
1174
+ });
1175
+ }
1307
1176
 
1308
1177
  var Exhibit = {
1309
1178
  __proto__: null,
@@ -1322,14 +1191,15 @@ var Exhibit = {
1322
1191
  contractAppliedPresentable: contractAppliedPresentable,
1323
1192
  batchCreatePresentable: batchCreatePresentable,
1324
1193
  batchUpdatePresentable: batchUpdatePresentable,
1325
- batchUpdatePresentableStatus: batchUpdatePresentableStatus
1194
+ batchUpdatePresentableStatus: batchUpdatePresentableStatus,
1195
+ ignorePresentableVersionUpdateTip: ignorePresentableVersionUpdateTip
1326
1196
  };
1327
1197
 
1328
1198
  var _excluded$2 = ["bucketName"],
1329
- _excluded2$2 = ["bucketName"],
1330
- _excluded3$2 = ["objectIdOrName"],
1331
- _excluded4$2 = ["sha1"],
1332
- _excluded5$2 = ["objectIdOrName"];
1199
+ _excluded2$2 = ["bucketName"],
1200
+ _excluded3$2 = ["objectIdOrName"],
1201
+ _excluded4$2 = ["sha1"],
1202
+ _excluded5$2 = ["objectIdOrName"];
1333
1203
  function createBucket(params) {
1334
1204
  return FUtil.Request({
1335
1205
  method: 'POST',
@@ -1348,7 +1218,6 @@ function spaceStatistics(params) {
1348
1218
  if (params === void 0) {
1349
1219
  params = {};
1350
1220
  }
1351
-
1352
1221
  return FUtil.Request({
1353
1222
  method: 'GET',
1354
1223
  url: "/v2/storages/buckets/spaceStatistics",
@@ -1370,8 +1239,7 @@ function bucketDetails(_ref) {
1370
1239
  }
1371
1240
  function objectList(_ref2) {
1372
1241
  var bucketName = _ref2.bucketName,
1373
- params = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1374
-
1242
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded$2);
1375
1243
  return FUtil.Request({
1376
1244
  method: 'GET',
1377
1245
  url: "/v2/storages/buckets/" + bucketName + "/objects",
@@ -1387,8 +1255,7 @@ function userNodeDataList(params) {
1387
1255
  }
1388
1256
  function createObject(_ref3) {
1389
1257
  var bucketName = _ref3.bucketName,
1390
- params = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
1391
-
1258
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded2$2);
1392
1259
  return FUtil.Request({
1393
1260
  method: 'POST',
1394
1261
  url: "/v2/storages/buckets/" + bucketName + "/objects",
@@ -1403,7 +1270,6 @@ function objectDetails$1(params) {
1403
1270
  params: params
1404
1271
  });
1405
1272
  }
1406
-
1407
1273
  return FUtil.Request({
1408
1274
  method: 'GET',
1409
1275
  url: "/v2/storages/buckets/" + params.bucketName + "/objects/" + params.objectId,
@@ -1438,19 +1304,15 @@ function uploadFile(params, config, returnCancel) {
1438
1304
  if (returnCancel === void 0) {
1439
1305
  returnCancel = false;
1440
1306
  }
1441
-
1442
1307
  var formData = new FormData();
1443
-
1444
1308
  for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
1445
1309
  var _Object$entries$_i = _Object$entries[_i],
1446
- key = _Object$entries$_i[0],
1447
- value = _Object$entries$_i[1];
1448
-
1310
+ key = _Object$entries$_i[0],
1311
+ value = _Object$entries$_i[1];
1449
1312
  if (value) {
1450
1313
  formData.append(key, value);
1451
1314
  }
1452
1315
  }
1453
-
1454
1316
  if (!returnCancel) {
1455
1317
  // return FUtil.Axios.post('/v2/storages/files/upload', formData, config);
1456
1318
  return FUtil.Request(_extends({
@@ -1459,13 +1321,12 @@ function uploadFile(params, config, returnCancel) {
1459
1321
  data: formData
1460
1322
  }, config));
1461
1323
  }
1462
-
1463
- var cancel = null; // const promise = FUtil.Axios.post('/v2/storages/files/upload', formData, {
1324
+ var cancel = null;
1325
+ // const promise = FUtil.Axios.post('/v2/storages/files/upload', formData, {
1464
1326
  // cancelToken: new FUtil.Axios.CancelToken((c) => {
1465
1327
  // cancel = c;
1466
1328
  // }),
1467
1329
  // });
1468
-
1469
1330
  var promise = FUtil.Request(_extends({
1470
1331
  method: 'POST',
1471
1332
  url: "/v2/storages/files/upload",
@@ -1478,17 +1339,14 @@ function uploadFile(params, config, returnCancel) {
1478
1339
  }
1479
1340
  function uploadImage(params, config) {
1480
1341
  var formData = new FormData();
1481
-
1482
1342
  for (var _i2 = 0, _Object$entries2 = Object.entries(params); _i2 < _Object$entries2.length; _i2++) {
1483
1343
  var _Object$entries2$_i = _Object$entries2[_i2],
1484
- key = _Object$entries2$_i[0],
1485
- value = _Object$entries2$_i[1];
1486
-
1344
+ key = _Object$entries2$_i[0],
1345
+ value = _Object$entries2$_i[1];
1487
1346
  if (value) {
1488
1347
  formData.append(key, value);
1489
1348
  }
1490
1349
  }
1491
-
1492
1350
  return FUtil.Request(_extends({
1493
1351
  method: 'POST',
1494
1352
  url: "/v2/storages/files/uploadImage",
@@ -1511,8 +1369,7 @@ function generateCoverImage(params) {
1511
1369
  }
1512
1370
  function updateObject(_ref5) {
1513
1371
  var objectIdOrName = _ref5.objectIdOrName,
1514
- params = _objectWithoutPropertiesLoose(_ref5, _excluded3$2);
1515
-
1372
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded3$2);
1516
1373
  return FUtil.Request({
1517
1374
  method: 'PUT',
1518
1375
  url: "/v2/storages/objects/" + objectIdOrName,
@@ -1520,8 +1377,7 @@ function updateObject(_ref5) {
1520
1377
  });
1521
1378
  }
1522
1379
  function batchUpdateObject(_ref6) {
1523
- var params = _extends({}, _ref6);
1524
-
1380
+ var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
1525
1381
  return FUtil.Request({
1526
1382
  method: 'PUT',
1527
1383
  url: "/v2/storages/objects/updateBatch",
@@ -1537,8 +1393,7 @@ function batchObjectList(params) {
1537
1393
  }
1538
1394
  function fileProperty(_ref7) {
1539
1395
  var sha1 = _ref7.sha1,
1540
- params = _objectWithoutPropertiesLoose(_ref7, _excluded4$2);
1541
-
1396
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded4$2);
1542
1397
  return FUtil.Request({
1543
1398
  method: 'GET',
1544
1399
  url: "/v2/storages/files/" + sha1 + "/property",
@@ -1547,8 +1402,7 @@ function fileProperty(_ref7) {
1547
1402
  }
1548
1403
  function cycleDependencyCheck(_ref8) {
1549
1404
  var objectIdOrName = _ref8.objectIdOrName,
1550
- params = _objectWithoutPropertiesLoose(_ref8, _excluded5$2);
1551
-
1405
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded5$2);
1552
1406
  return FUtil.Request({
1553
1407
  method: 'POST',
1554
1408
  url: "/v2/storages/objects/" + objectIdOrName + "/cycleDependencyCheck",
@@ -1556,8 +1410,7 @@ function cycleDependencyCheck(_ref8) {
1556
1410
  });
1557
1411
  }
1558
1412
  function clearUserNodeData(_ref9) {
1559
- var params = _extends({}, _ref9);
1560
-
1413
+ var params = _extends({}, (_objectDestructuringEmpty(_ref9), _ref9));
1561
1414
  return FUtil.Request({
1562
1415
  method: 'DELETE',
1563
1416
  url: "/v2/storages/buckets/.UserNodeData/objects/clear",
@@ -1565,14 +1418,21 @@ function clearUserNodeData(_ref9) {
1565
1418
  });
1566
1419
  }
1567
1420
  function filesListInfo(_ref10) {
1568
- var params = _extends({}, _ref10);
1569
-
1421
+ var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1570
1422
  return FUtil.Request({
1571
1423
  method: 'GET',
1572
1424
  url: "/v2/storages/files/list/info",
1573
1425
  params: params
1574
1426
  });
1575
1427
  }
1428
+ function filesInfo(_ref11) {
1429
+ var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1430
+ return FUtil.Request({
1431
+ method: 'GET',
1432
+ url: "/v2/storages/files/info",
1433
+ params: params
1434
+ });
1435
+ }
1576
1436
 
1577
1437
  var Storage = {
1578
1438
  __proto__: null,
@@ -1599,7 +1459,8 @@ var Storage = {
1599
1459
  fileProperty: fileProperty,
1600
1460
  cycleDependencyCheck: cycleDependencyCheck,
1601
1461
  clearUserNodeData: clearUserNodeData,
1602
- filesListInfo: filesListInfo
1462
+ filesListInfo: filesListInfo,
1463
+ filesInfo: filesInfo
1603
1464
  };
1604
1465
 
1605
1466
  function collectResource(params) {
@@ -1654,17 +1515,32 @@ var Collection = {
1654
1515
  };
1655
1516
 
1656
1517
  var _excluded$3 = ["resourceIdOrName"],
1657
- _excluded2$3 = ["resourceId"],
1658
- _excluded3$3 = ["resourceId"],
1659
- _excluded4$3 = ["resourceId"],
1660
- _excluded5$3 = ["resourceId", "version"],
1661
- _excluded6$2 = ["fileSha1"],
1662
- _excluded7$1 = ["fileSha1"],
1663
- _excluded8$1 = ["resourceId"],
1664
- _excluded9$1 = ["resourceId"],
1665
- _excluded10$1 = ["resourceId"],
1666
- _excluded11 = ["resourceId"],
1667
- _excluded12 = ["resourceId"];
1518
+ _excluded2$3 = ["resourceId"],
1519
+ _excluded3$3 = ["resourceId"],
1520
+ _excluded4$3 = ["resourceId"],
1521
+ _excluded5$3 = ["resourceId", "version"],
1522
+ _excluded6$2 = ["resourceId"],
1523
+ _excluded7$2 = ["fileSha1"],
1524
+ _excluded8$1 = ["fileSha1"],
1525
+ _excluded9$1 = ["resourceId"],
1526
+ _excluded10$1 = ["resourceId"],
1527
+ _excluded11$1 = ["resourceId"],
1528
+ _excluded12 = ["resourceId"],
1529
+ _excluded13 = ["resourceId"],
1530
+ _excluded14 = ["resourceId"],
1531
+ _excluded15 = ["resourceId"],
1532
+ _excluded16 = ["resourceId"],
1533
+ _excluded17 = ["resourceId"],
1534
+ _excluded18 = ["resourceId"],
1535
+ _excluded19 = ["resourceId"],
1536
+ _excluded20 = ["resourceId"],
1537
+ _excluded21 = ["resourceId"],
1538
+ _excluded22 = ["resourceId"],
1539
+ _excluded23 = ["resourceId"],
1540
+ _excluded24 = ["resourceId"],
1541
+ _excluded25 = ["resourceId", "itemId"],
1542
+ _excluded26 = ["resourceId"],
1543
+ _excluded27 = ["resourceId"];
1668
1544
  function create$1(params) {
1669
1545
  return FUtil.Request({
1670
1546
  method: 'POST',
@@ -1692,10 +1568,10 @@ function batchUpdate(params) {
1692
1568
  url: "/v2/resources/updateBatch",
1693
1569
  data: params
1694
1570
  });
1695
- } // interface ListReturnType extends CommonReturn {
1571
+ }
1572
+ // interface ListReturnType extends CommonReturn {
1696
1573
  // data: IResourceInfo[];
1697
1574
  // }
1698
-
1699
1575
  function list(params) {
1700
1576
  return FUtil.Request({
1701
1577
  method: 'GET',
@@ -1703,17 +1579,24 @@ function list(params) {
1703
1579
  params: params
1704
1580
  });
1705
1581
  }
1582
+ // interface InfoReturnType extends CommonReturn {
1583
+ // data: IResourceInfo
1584
+ // }
1706
1585
  function info(_ref) {
1707
1586
  var resourceIdOrName = _ref.resourceIdOrName,
1708
- params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
1709
-
1587
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$3);
1588
+ // : Promise<InfoReturnType>
1710
1589
  return FUtil.Request({
1711
1590
  method: 'GET',
1712
1591
  url: "/v2/resources/" + encodeURIComponent(resourceIdOrName),
1713
1592
  params: params
1714
1593
  });
1715
1594
  }
1595
+ // interface BatchInfoReturnType extends CommonReturn {
1596
+ // data: IResourceInfo[];
1597
+ // }
1716
1598
  function batchInfo(params) {
1599
+ // : Promise<BatchInfoReturnType>
1717
1600
  return FUtil.Request({
1718
1601
  method: 'GET',
1719
1602
  url: "/v2/resources/list",
@@ -1722,8 +1605,7 @@ function batchInfo(params) {
1722
1605
  }
1723
1606
  function dependencyTree$1(_ref2) {
1724
1607
  var resourceId = _ref2.resourceId,
1725
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
1726
-
1608
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$3);
1727
1609
  return FUtil.Request({
1728
1610
  method: 'GET',
1729
1611
  url: "/v2/resources/" + resourceId + "/dependencyTree",
@@ -1732,8 +1614,7 @@ function dependencyTree$1(_ref2) {
1732
1614
  }
1733
1615
  function authTree$1(_ref3) {
1734
1616
  var resourceId = _ref3.resourceId,
1735
- params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
1736
-
1617
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded3$3);
1737
1618
  return FUtil.Request({
1738
1619
  method: 'GET',
1739
1620
  url: "/v2/resources/" + resourceId + "/authTree",
@@ -1742,8 +1623,7 @@ function authTree$1(_ref3) {
1742
1623
  }
1743
1624
  function createVersion(_ref4) {
1744
1625
  var resourceId = _ref4.resourceId,
1745
- params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
1746
-
1626
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded4$3);
1747
1627
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions`, params);
1748
1628
  return FUtil.Request({
1749
1629
  method: 'POST',
@@ -1753,9 +1633,8 @@ function createVersion(_ref4) {
1753
1633
  }
1754
1634
  function resourceVersionInfo1(_ref5) {
1755
1635
  var resourceId = _ref5.resourceId,
1756
- version = _ref5.version,
1757
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
1758
-
1636
+ version = _ref5.version,
1637
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$3);
1759
1638
  return FUtil.Request({
1760
1639
  method: 'GET',
1761
1640
  url: "/v2/resources/" + resourceId + "/versions/" + version,
@@ -1769,29 +1648,35 @@ function resourceVersionInfo2(params) {
1769
1648
  params: params
1770
1649
  });
1771
1650
  }
1772
- function getVersionList(_ref6) {
1773
- var params = _extends({}, _ref6);
1774
-
1651
+ function getVersionListByResourceID(_ref6) {
1652
+ var resourceId = _ref6.resourceId,
1653
+ params = _objectWithoutPropertiesLoose(_ref6, _excluded6$2);
1654
+ return FUtil.Request({
1655
+ method: 'GET',
1656
+ url: "/v2/resources/" + resourceId + "/versions",
1657
+ params: params
1658
+ });
1659
+ }
1660
+ function getVersionList(_ref7) {
1661
+ var params = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7));
1775
1662
  return FUtil.Request({
1776
1663
  method: 'GET',
1777
1664
  url: "/v2/resources/versions/list",
1778
1665
  params: params
1779
1666
  });
1780
1667
  }
1781
- function getResourceVersionBySha1(_ref7) {
1782
- var fileSha1 = _ref7.fileSha1,
1783
- params = _objectWithoutPropertiesLoose(_ref7, _excluded6$2);
1784
-
1668
+ function getResourceVersionBySha1(_ref8) {
1669
+ var fileSha1 = _ref8.fileSha1,
1670
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
1785
1671
  return FUtil.Request({
1786
1672
  method: 'GET',
1787
1673
  url: "/v2/resources/files/" + fileSha1 + "/versions",
1788
1674
  params: params
1789
1675
  });
1790
1676
  }
1791
- function getResourceBySha1(_ref8) {
1792
- var fileSha1 = _ref8.fileSha1,
1793
- params = _objectWithoutPropertiesLoose(_ref8, _excluded7$1);
1794
-
1677
+ function getResourceBySha1(_ref9) {
1678
+ var fileSha1 = _ref9.fileSha1,
1679
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded8$1);
1795
1680
  // return FUtil.Axios.get(`/v2/resources/files/${fileSha1}`, {
1796
1681
  // params,
1797
1682
  // });
@@ -1825,8 +1710,8 @@ function lookDraft(params) {
1825
1710
  params: params
1826
1711
  });
1827
1712
  }
1828
- function deleteResourceDraft(_ref9) {
1829
- var resourceId = _ref9.resourceId;
1713
+ function deleteResourceDraft(_ref10) {
1714
+ var resourceId = _ref10.resourceId;
1830
1715
  // return FUtil.Axios.post(`/v2/resources/${params.resourceId}/versions/drafts`, params);
1831
1716
  return FUtil.Request({
1832
1717
  method: 'DELETE',
@@ -1844,14 +1729,14 @@ function resourceIsUsedByOther(params) {
1844
1729
  });
1845
1730
  }
1846
1731
  function resourcesDownload(params) {
1847
- return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download"); // return request.get(`/v2/resources/${params.resourceId}/versions/${params.$version}/download`, {
1732
+ return window.location.href = FUtil.Format.completeUrlByDomain('api') + ("/v2/resources/" + params.resourceId + "/versions/" + params.version + "/download");
1733
+ // return request.get(`/v2/resources/${params.resourceId}/versions/${params.$version}/download`, {
1848
1734
  // responseType: 'arraybuffer',
1849
1735
  // });
1850
1736
  }
1851
- function batchGetCoverageVersions(_ref10) {
1852
- var resourceId = _ref10.resourceId,
1853
- params = _objectWithoutPropertiesLoose(_ref10, _excluded8$1);
1854
-
1737
+ function batchGetCoverageVersions(_ref11) {
1738
+ var resourceId = _ref11.resourceId,
1739
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1855
1740
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
1856
1741
  // params,
1857
1742
  // });
@@ -1868,10 +1753,9 @@ function resolveResources(params) {
1868
1753
  url: "/v2/resources/" + params.resourceId + "/resolveResources"
1869
1754
  });
1870
1755
  }
1871
- function batchSetContracts(_ref11) {
1872
- var resourceId = _ref11.resourceId,
1873
- params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1874
-
1756
+ function batchSetContracts(_ref12) {
1757
+ var resourceId = _ref12.resourceId,
1758
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1875
1759
  // return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
1876
1760
  return FUtil.Request({
1877
1761
  method: 'PUT',
@@ -1879,10 +1763,9 @@ function batchSetContracts(_ref11) {
1879
1763
  data: params
1880
1764
  });
1881
1765
  }
1882
- function cycleDependencyCheck$1(_ref12) {
1883
- var resourceId = _ref12.resourceId,
1884
- params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1885
-
1766
+ function cycleDependencyCheck$1(_ref13) {
1767
+ var resourceId = _ref13.resourceId,
1768
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1886
1769
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
1887
1770
  return FUtil.Request({
1888
1771
  method: 'POST',
@@ -1890,10 +1773,9 @@ function cycleDependencyCheck$1(_ref12) {
1890
1773
  data: params
1891
1774
  });
1892
1775
  }
1893
- function relationTree$1(_ref13) {
1894
- var resourceId = _ref13.resourceId,
1895
- params = _objectWithoutPropertiesLoose(_ref13, _excluded11);
1896
-
1776
+ function relationTree$1(_ref14) {
1777
+ var resourceId = _ref14.resourceId,
1778
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1897
1779
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1898
1780
  // params,
1899
1781
  // });
@@ -1903,46 +1785,41 @@ function relationTree$1(_ref13) {
1903
1785
  params: params
1904
1786
  });
1905
1787
  }
1906
- function relationTreeAuth(_ref14) {
1907
- var resourceId = _ref14.resourceId,
1908
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1909
-
1788
+ function relationTreeAuth(_ref15) {
1789
+ var resourceId = _ref15.resourceId,
1790
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1910
1791
  return FUtil.Request({
1911
1792
  method: 'GET',
1912
1793
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
1913
1794
  params: params
1914
1795
  });
1915
1796
  }
1916
- function resourcesCount(_ref15) {
1917
- var params = _extends({}, _ref15);
1918
-
1797
+ function resourcesCount(_ref16) {
1798
+ var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1919
1799
  return FUtil.Request({
1920
1800
  method: 'GET',
1921
1801
  url: "/v2/resources/count",
1922
1802
  params: params
1923
1803
  });
1924
1804
  }
1925
- function batchAuth$1(_ref16) {
1926
- var params = _extends({}, _ref16);
1927
-
1805
+ function batchAuth$1(_ref17) {
1806
+ var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1928
1807
  return FUtil.Request({
1929
1808
  method: 'GET',
1930
1809
  url: "/v2/auths/resources/batchAuth/results",
1931
1810
  params: params
1932
1811
  });
1933
1812
  }
1934
- function resourcesRecommend(_ref17) {
1935
- var params = _extends({}, _ref17);
1936
-
1813
+ function resourcesRecommend(_ref18) {
1814
+ var params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1937
1815
  return FUtil.Request({
1938
1816
  method: 'GET',
1939
1817
  url: "/v2/resources/recommend",
1940
1818
  params: params
1941
1819
  });
1942
1820
  }
1943
- function availableTags(_ref18) {
1944
- var params = _extends({}, _ref18);
1945
-
1821
+ function availableTags(_ref19) {
1822
+ var params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1946
1823
  return FUtil.Request({
1947
1824
  method: 'GET',
1948
1825
  url: "/v2/resources/tags/availableTags",
@@ -1950,36 +1827,32 @@ function availableTags(_ref18) {
1950
1827
  });
1951
1828
  }
1952
1829
  function resourceTypes$1(_temp) {
1953
- var _ref19 = _temp === void 0 ? {} : _temp,
1954
- params = _extends({}, _ref19);
1955
-
1830
+ var _ref20 = _temp === void 0 ? {} : _temp,
1831
+ params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1956
1832
  return FUtil.Request({
1957
1833
  method: 'GET',
1958
1834
  url: "/v2/resources/types/listSimpleByGroup",
1959
1835
  params: params
1960
1836
  });
1961
1837
  }
1962
- function ListSimpleByParentCode(_ref20) {
1963
- var params = _extends({}, _ref20);
1964
-
1838
+ function ListSimpleByParentCode(_ref21) {
1839
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1965
1840
  return FUtil.Request({
1966
1841
  method: 'GET',
1967
1842
  url: "/v2/resources/types/listSimpleByParentCode",
1968
1843
  params: params
1969
1844
  });
1970
1845
  }
1971
- function getResourceTypeInfoByCode(_ref21) {
1972
- var params = _extends({}, _ref21);
1973
-
1846
+ function getResourceTypeInfoByCode(_ref22) {
1847
+ var params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
1974
1848
  return FUtil.Request({
1975
1849
  method: 'GET',
1976
1850
  url: "/v2/resources/types/getInfoByCode",
1977
1851
  params: params
1978
1852
  });
1979
1853
  }
1980
- function getResourceAttrListSimple(_ref22) {
1981
- var params = _extends({}, _ref22);
1982
-
1854
+ function getResourceAttrListSimple(_ref23) {
1855
+ var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1983
1856
  return FUtil.Request({
1984
1857
  method: 'GET',
1985
1858
  url: "/v2/resources/attrs/listSimple",
@@ -1987,26 +1860,24 @@ function getResourceAttrListSimple(_ref22) {
1987
1860
  });
1988
1861
  }
1989
1862
  function listSimple4Recently(_temp2) {
1990
- var _ref23 = _temp2 === void 0 ? {} : _temp2,
1991
- params = _extends({}, _ref23);
1992
-
1863
+ var _ref24 = _temp2 === void 0 ? {} : _temp2,
1864
+ params = _extends({}, (_objectDestructuringEmpty(_ref24), _ref24));
1993
1865
  return FUtil.Request({
1994
1866
  method: 'GET',
1995
1867
  url: "/v2/resources/types/listSimple4Recently",
1996
1868
  params: params
1997
1869
  });
1998
1870
  }
1999
- function getAttrsInfoByKey(_ref24) {
2000
- var params = _extends({}, _ref24);
2001
-
1871
+ function getAttrsInfoByKey(_ref25) {
1872
+ var params = _extends({}, (_objectDestructuringEmpty(_ref25), _ref25));
2002
1873
  return FUtil.Request({
2003
1874
  method: 'GET',
2004
1875
  url: "/v2/resources/attrs/getInfoByKey",
2005
1876
  params: params
2006
1877
  });
2007
1878
  }
2008
- function generateResourceNames(_ref25) {
2009
- var resourceNames = _ref25.resourceNames;
1879
+ function generateResourceNames(_ref26) {
1880
+ var resourceNames = _ref26.resourceNames;
2010
1881
  return FUtil.Request({
2011
1882
  method: 'POST',
2012
1883
  url: "/v2/resources/generateResourceNames",
@@ -2015,6 +1886,201 @@ function generateResourceNames(_ref25) {
2015
1886
  }
2016
1887
  });
2017
1888
  }
1889
+ function updateCollection(_ref27) {
1890
+ var resourceId = _ref27.resourceId,
1891
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded14);
1892
+ return FUtil.Request({
1893
+ method: 'PUT',
1894
+ url: "/v2/resources/catalogue/" + resourceId,
1895
+ data: params
1896
+ });
1897
+ }
1898
+ function deleteCollectionUnitResource(_ref28) {
1899
+ var resourceId = _ref28.resourceId,
1900
+ removeCollectionItemIds = _ref28.removeCollectionItemIds;
1901
+ return FUtil.Request({
1902
+ method: 'DELETE',
1903
+ url: "/v2/resources/catalogue/" + resourceId + "?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
1904
+ });
1905
+ }
1906
+ function getCollectionItems(_ref29) {
1907
+ var resourceId = _ref29.resourceId,
1908
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15);
1909
+ return FUtil.Request({
1910
+ method: 'GET',
1911
+ url: "/v2/resources/catalogue/" + resourceId + "/items",
1912
+ params: params
1913
+ });
1914
+ }
1915
+ function getCollectionItems_Draft(_ref30) {
1916
+ var resourceId = _ref30.resourceId,
1917
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16);
1918
+ return FUtil.Request({
1919
+ method: 'GET',
1920
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
1921
+ params: params
1922
+ });
1923
+ }
1924
+ function setCollectionItemSort(_ref31) {
1925
+ var resourceId = _ref31.resourceId,
1926
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded17);
1927
+ return FUtil.Request({
1928
+ method: 'PUT',
1929
+ url: "/v2/resources/catalogue/" + resourceId + "/manualSort",
1930
+ data: params
1931
+ });
1932
+ }
1933
+ function reorderCollectionItemsSort(_ref32) {
1934
+ var resourceId = _ref32.resourceId,
1935
+ params = _objectWithoutPropertiesLoose(_ref32, _excluded18);
1936
+ return FUtil.Request({
1937
+ method: 'PUT',
1938
+ url: "/v2/resources/catalogue/" + resourceId + "/reorder",
1939
+ data: params
1940
+ });
1941
+ }
1942
+ function checkExistCollectionItems(_ref33) {
1943
+ var resourceId = _ref33.resourceId,
1944
+ params = _objectWithoutPropertiesLoose(_ref33, _excluded19);
1945
+ return FUtil.Request({
1946
+ method: 'GET',
1947
+ url: "/v2/resources/catalogue/" + resourceId + "/items/checkExists",
1948
+ params: params
1949
+ });
1950
+ }
1951
+ function getCollectionItemsAuth(_ref34) {
1952
+ var resourceId = _ref34.resourceId,
1953
+ params = _objectWithoutPropertiesLoose(_ref34, _excluded20);
1954
+ return FUtil.Request({
1955
+ method: 'GET',
1956
+ url: "/v2/auths/resources/" + resourceId + "/items/batchAuth",
1957
+ params: params
1958
+ });
1959
+ }
1960
+ function batchResourceItems(_ref35) {
1961
+ var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
1962
+ return FUtil.Request({
1963
+ method: 'GET',
1964
+ url: "/v2/resources/catalogue/items/batch/list",
1965
+ params: params
1966
+ });
1967
+ }
1968
+ function batchResourceItems_Draft(_ref36) {
1969
+ var params = _extends({}, (_objectDestructuringEmpty(_ref36), _ref36));
1970
+ return FUtil.Request({
1971
+ method: 'GET',
1972
+ url: "/v2/resources/catalogues/drafts/items/batch/list",
1973
+ params: params
1974
+ });
1975
+ }
1976
+ function getCollectionUpdateLogs(_ref37) {
1977
+ var resourceId = _ref37.resourceId,
1978
+ params = _objectWithoutPropertiesLoose(_ref37, _excluded21);
1979
+ return FUtil.Request({
1980
+ method: 'GET',
1981
+ url: "/v2/resources/catalogue/" + resourceId + "/updateLogs",
1982
+ params: params
1983
+ });
1984
+ }
1985
+ function getCollectionCollectRules(_ref38) {
1986
+ var resourceId = _ref38.resourceId;
1987
+ return FUtil.Request({
1988
+ method: 'GET',
1989
+ url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules"
1990
+ });
1991
+ }
1992
+ function setCollectRules(_ref39) {
1993
+ var resourceId = _ref39.resourceId,
1994
+ params = _objectWithoutPropertiesLoose(_ref39, _excluded22);
1995
+ return FUtil.Request({
1996
+ method: 'POST',
1997
+ url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules",
1998
+ data: params
1999
+ });
2000
+ }
2001
+ function setItemsTitle(_ref40) {
2002
+ var resourceId = _ref40.resourceId,
2003
+ data = _ref40.data;
2004
+ return FUtil.Request({
2005
+ method: 'PUT',
2006
+ url: "/v2/resources/catalogue/" + resourceId + "/items",
2007
+ data: data
2008
+ });
2009
+ }
2010
+ function deleteCollectionItems_Draft(_ref41) {
2011
+ var resourceId = _ref41.resourceId,
2012
+ removeCollectionItemIds = _ref41.removeCollectionItemIds;
2013
+ return FUtil.Request({
2014
+ method: 'DELETE',
2015
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
2016
+ });
2017
+ }
2018
+ function setCollectionItemsSortID_Draft(_ref42) {
2019
+ var resourceId = _ref42.resourceId,
2020
+ data = _ref42.data;
2021
+ return FUtil.Request({
2022
+ method: 'PUT',
2023
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/manualSort",
2024
+ data: data
2025
+ });
2026
+ }
2027
+ function reorderCollectionItems_Draft(_ref43) {
2028
+ var resourceId = _ref43.resourceId,
2029
+ params = _objectWithoutPropertiesLoose(_ref43, _excluded23);
2030
+ return FUtil.Request({
2031
+ method: 'PUT',
2032
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/reorder",
2033
+ data: params
2034
+ });
2035
+ }
2036
+ function resourceIsExistInItems_Draft(_ref44) {
2037
+ var resourceId = _ref44.resourceId,
2038
+ params = _objectWithoutPropertiesLoose(_ref44, _excluded24);
2039
+ return FUtil.Request({
2040
+ method: 'GET',
2041
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/checkExists",
2042
+ params: params
2043
+ });
2044
+ }
2045
+ function updateCollectionItemsInfo_Draft(_ref45) {
2046
+ var resourceId = _ref45.resourceId,
2047
+ data = _ref45.data;
2048
+ return FUtil.Request({
2049
+ method: 'PUT',
2050
+ // url: `/v2/resources/catalogue/${resourceId}/items`,
2051
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2052
+ data: data
2053
+ });
2054
+ }
2055
+ function updateCollectionItemAuthorization_Draft(_ref46) {
2056
+ var resourceId = _ref46.resourceId,
2057
+ itemId = _ref46.itemId,
2058
+ data = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2059
+ return FUtil.Request({
2060
+ method: 'PUT',
2061
+ // url: `/v2/resources/catalogues/${resourceId}/items/${itemId}`,
2062
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/" + itemId,
2063
+ data: data
2064
+ });
2065
+ }
2066
+ function addResourceItems_Draft(_ref47) {
2067
+ var resourceId = _ref47.resourceId,
2068
+ params = _objectWithoutPropertiesLoose(_ref47, _excluded26);
2069
+ return FUtil.Request({
2070
+ method: 'POST',
2071
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2072
+ data: params
2073
+ });
2074
+ }
2075
+ function getCollectionItemsAuth_Draft(_ref48) {
2076
+ var resourceId = _ref48.resourceId,
2077
+ params = _objectWithoutPropertiesLoose(_ref48, _excluded27);
2078
+ return FUtil.Request({
2079
+ method: 'GET',
2080
+ url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/batchAuth",
2081
+ params: params
2082
+ });
2083
+ }
2018
2084
 
2019
2085
  var Resource = {
2020
2086
  __proto__: null,
@@ -2030,6 +2096,7 @@ var Resource = {
2030
2096
  createVersion: createVersion,
2031
2097
  resourceVersionInfo1: resourceVersionInfo1,
2032
2098
  resourceVersionInfo2: resourceVersionInfo2,
2099
+ getVersionListByResourceID: getVersionListByResourceID,
2033
2100
  getVersionList: getVersionList,
2034
2101
  getResourceVersionBySha1: getResourceVersionBySha1,
2035
2102
  getResourceBySha1: getResourceBySha1,
@@ -2055,13 +2122,34 @@ var Resource = {
2055
2122
  getResourceAttrListSimple: getResourceAttrListSimple,
2056
2123
  listSimple4Recently: listSimple4Recently,
2057
2124
  getAttrsInfoByKey: getAttrsInfoByKey,
2058
- generateResourceNames: generateResourceNames
2125
+ generateResourceNames: generateResourceNames,
2126
+ updateCollection: updateCollection,
2127
+ deleteCollectionUnitResource: deleteCollectionUnitResource,
2128
+ getCollectionItems: getCollectionItems,
2129
+ getCollectionItems_Draft: getCollectionItems_Draft,
2130
+ setCollectionItemSort: setCollectionItemSort,
2131
+ reorderCollectionItemsSort: reorderCollectionItemsSort,
2132
+ checkExistCollectionItems: checkExistCollectionItems,
2133
+ getCollectionItemsAuth: getCollectionItemsAuth,
2134
+ batchResourceItems: batchResourceItems,
2135
+ batchResourceItems_Draft: batchResourceItems_Draft,
2136
+ getCollectionUpdateLogs: getCollectionUpdateLogs,
2137
+ getCollectionCollectRules: getCollectionCollectRules,
2138
+ setCollectRules: setCollectRules,
2139
+ setItemsTitle: setItemsTitle,
2140
+ deleteCollectionItems_Draft: deleteCollectionItems_Draft,
2141
+ setCollectionItemsSortID_Draft: setCollectionItemsSortID_Draft,
2142
+ reorderCollectionItems_Draft: reorderCollectionItems_Draft,
2143
+ resourceIsExistInItems_Draft: resourceIsExistInItems_Draft,
2144
+ updateCollectionItemsInfo_Draft: updateCollectionItemsInfo_Draft,
2145
+ updateCollectionItemAuthorization_Draft: updateCollectionItemAuthorization_Draft,
2146
+ addResourceItems_Draft: addResourceItems_Draft,
2147
+ getCollectionItemsAuth_Draft: getCollectionItemsAuth_Draft
2059
2148
  };
2060
2149
 
2061
2150
  var _excluded$4 = ["loginName"];
2062
2151
  function login$1(_ref) {
2063
- var params = _extends({}, _ref);
2064
-
2152
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
2065
2153
  // return FUtil.Axios.post(`/v2/passport/login`, params);
2066
2154
  return FUtil.Request({
2067
2155
  method: 'POST',
@@ -2073,8 +2161,7 @@ function login$1(_ref) {
2073
2161
  }
2074
2162
  function logout(_temp) {
2075
2163
  var _ref2 = _temp === void 0 ? {} : _temp,
2076
- params = _extends({}, _ref2);
2077
-
2164
+ params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
2078
2165
  return FUtil.Request({
2079
2166
  method: 'GET',
2080
2167
  url: '/v2/passport/logout',
@@ -2098,10 +2185,7 @@ function batchUserList(params) {
2098
2185
  });
2099
2186
  }
2100
2187
  function currentUserInfo(_temp2) {
2101
- var _ref3 = _temp2 === void 0 ? {} : _temp2;
2102
-
2103
- _objectDestructuringEmpty(_ref3);
2104
-
2188
+ _objectDestructuringEmpty(_temp2 === void 0 ? {} : _temp2);
2105
2189
  // return FUtil.Axios.get(`/v1/userinfos/current`);
2106
2190
  return FUtil.Request({
2107
2191
  method: 'GET',
@@ -2124,8 +2208,7 @@ function logon$1(params) {
2124
2208
  }
2125
2209
  function resetPassword(_ref4) {
2126
2210
  var loginName = _ref4.loginName,
2127
- params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2128
-
2211
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded$4);
2129
2212
  return FUtil.Request({
2130
2213
  method: 'PUT',
2131
2214
  url: "/v2/users/" + loginName + "/resetPassword",
@@ -2141,17 +2224,14 @@ function updatePassword(params) {
2141
2224
  }
2142
2225
  function uploadHeadImg(params, config) {
2143
2226
  var formData = new FormData();
2144
-
2145
2227
  for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
2146
2228
  var _Object$entries$_i = _Object$entries[_i],
2147
- key = _Object$entries$_i[0],
2148
- value = _Object$entries$_i[1];
2149
-
2229
+ key = _Object$entries$_i[0],
2230
+ value = _Object$entries$_i[1];
2150
2231
  if (value) {
2151
2232
  formData.append(key, value);
2152
2233
  }
2153
2234
  }
2154
-
2155
2235
  return FUtil.Request(_extends({
2156
2236
  method: 'POST',
2157
2237
  url: "/v2/users/current/uploadHeadImg",
@@ -2176,7 +2256,6 @@ function areasProvinces(params) {
2176
2256
  if (params === void 0) {
2177
2257
  params = {};
2178
2258
  }
2179
-
2180
2259
  return FUtil.Request({
2181
2260
  method: 'GET',
2182
2261
  url: "/v2/areas/provinces",
@@ -2210,7 +2289,6 @@ function thirdPartyList(params) {
2210
2289
  if (params === void 0) {
2211
2290
  params = {};
2212
2291
  }
2213
-
2214
2292
  return FUtil.Request({
2215
2293
  method: 'GET',
2216
2294
  url: "/v2/thirdParty/list",
@@ -2223,21 +2301,31 @@ function thirdPartyIsBind(params) {
2223
2301
  url: "/v2/thirdParty/isBind",
2224
2302
  params: params
2225
2303
  });
2226
- } // 签到
2227
-
2304
+ }
2305
+ // 签到
2228
2306
  function signForCoins() {
2229
2307
  return FUtil.Request({
2230
2308
  method: 'GET',
2231
2309
  url: "/v2/activities/facade/sign"
2232
2310
  });
2233
- } // 查询签到信息
2234
-
2311
+ }
2312
+ // 查询签到信息
2235
2313
  function getSignInfo() {
2236
2314
  return FUtil.Request({
2237
2315
  method: 'GET',
2238
2316
  url: "/v2/activities/facade/signInfo"
2239
2317
  });
2240
2318
  }
2319
+ function searchForConsole(params) {
2320
+ if (params === void 0) {
2321
+ params = {};
2322
+ }
2323
+ return FUtil.Request({
2324
+ method: 'GET',
2325
+ url: '/v2/users/searchForConsole',
2326
+ params: params
2327
+ });
2328
+ }
2241
2329
 
2242
2330
  var User = {
2243
2331
  __proto__: null,
@@ -2260,24 +2348,24 @@ var User = {
2260
2348
  thirdPartyList: thirdPartyList,
2261
2349
  thirdPartyIsBind: thirdPartyIsBind,
2262
2350
  signForCoins: signForCoins,
2263
- getSignInfo: getSignInfo
2351
+ getSignInfo: getSignInfo,
2352
+ searchForConsole: searchForConsole
2264
2353
  };
2265
2354
 
2266
2355
  var _excluded$5 = ["nodeId"],
2267
- _excluded2$4 = ["nodeId"],
2268
- _excluded3$4 = ["nodeId"],
2269
- _excluded4$4 = ["nodeId"],
2270
- _excluded5$4 = ["nodeId"],
2271
- _excluded6$3 = ["testResourceId"],
2272
- _excluded7$2 = ["testResourceId"],
2273
- _excluded8$2 = ["nodeId"],
2274
- _excluded9$2 = ["nodeId"],
2275
- _excluded10$2 = ["nodeId"],
2276
- _excluded11$1 = ["nodeId"];
2356
+ _excluded2$4 = ["nodeId"],
2357
+ _excluded3$4 = ["nodeId"],
2358
+ _excluded4$4 = ["nodeId"],
2359
+ _excluded5$4 = ["nodeId"],
2360
+ _excluded6$3 = ["testResourceId"],
2361
+ _excluded7$3 = ["testResourceId"],
2362
+ _excluded8$2 = ["nodeId"],
2363
+ _excluded9$2 = ["nodeId"],
2364
+ _excluded10$2 = ["nodeId"],
2365
+ _excluded11$2 = ["nodeId"];
2277
2366
  function testResources(_ref) {
2278
2367
  var nodeId = _ref.nodeId,
2279
- params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2280
-
2368
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
2281
2369
  return FUtil.Request({
2282
2370
  method: 'GET',
2283
2371
  url: "/v2/testNodes/" + nodeId + "/testResources",
@@ -2286,8 +2374,7 @@ function testResources(_ref) {
2286
2374
  }
2287
2375
  function createRules(_ref2) {
2288
2376
  var nodeId = _ref2.nodeId,
2289
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
2290
-
2377
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$4);
2291
2378
  return FUtil.Request({
2292
2379
  method: 'POST',
2293
2380
  url: "/v2/testNodes/" + nodeId + "/rules",
@@ -2296,8 +2383,7 @@ function createRules(_ref2) {
2296
2383
  }
2297
2384
  function batchTestResources(_ref3) {
2298
2385
  var nodeId = _ref3.nodeId,
2299
- params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
2300
-
2386
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded3$4);
2301
2387
  return FUtil.Request({
2302
2388
  method: 'GET',
2303
2389
  url: "/v2/testNodes/" + nodeId + "/testResources/list",
@@ -2306,8 +2392,7 @@ function batchTestResources(_ref3) {
2306
2392
  }
2307
2393
  function dependencyTree$2(_ref4) {
2308
2394
  var nodeId = _ref4.nodeId,
2309
- params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
2310
-
2395
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded4$4);
2311
2396
  return FUtil.Request({
2312
2397
  method: 'GET',
2313
2398
  url: "/v2/testNodes/" + nodeId + "/testResources/dependencyTree/search",
@@ -2316,8 +2401,7 @@ function dependencyTree$2(_ref4) {
2316
2401
  }
2317
2402
  function putRules(_ref5) {
2318
2403
  var nodeId = _ref5.nodeId,
2319
- params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
2320
-
2404
+ params = _objectWithoutPropertiesLoose(_ref5, _excluded5$4);
2321
2405
  return FUtil.Request({
2322
2406
  method: 'PUT',
2323
2407
  url: "/v2/testNodes/" + nodeId + "/rules",
@@ -2333,8 +2417,7 @@ function testNodeRules(_ref6) {
2333
2417
  }
2334
2418
  function updateTestResourceContracts(_ref7) {
2335
2419
  var testResourceId = _ref7.testResourceId,
2336
- params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
2337
-
2420
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded6$3);
2338
2421
  // return FUtil.Axios.put(`/v2/testNodes/testResources/${testResourceId}`, params);
2339
2422
  return FUtil.Request({
2340
2423
  method: 'PUT',
@@ -2344,8 +2427,7 @@ function updateTestResourceContracts(_ref7) {
2344
2427
  }
2345
2428
  function dependencyTreeFilter(_ref8) {
2346
2429
  var testResourceId = _ref8.testResourceId,
2347
- params = _objectWithoutPropertiesLoose(_ref8, _excluded7$2);
2348
-
2430
+ params = _objectWithoutPropertiesLoose(_ref8, _excluded7$3);
2349
2431
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}/dependencyTree/filter`, {
2350
2432
  // params
2351
2433
  // });
@@ -2380,8 +2462,7 @@ function testResourceDetails(_ref11) {
2380
2462
  }
2381
2463
  function searchTestResourcesByDependency(_ref12) {
2382
2464
  var nodeId = _ref12.nodeId,
2383
- params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2384
-
2465
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2385
2466
  // return FUtil.Axios.get(`/v2/testNodes/${nodeId}/testResources/searchByDependency`, {
2386
2467
  // params,
2387
2468
  // });
@@ -2393,8 +2474,7 @@ function searchTestResourcesByDependency(_ref12) {
2393
2474
  }
2394
2475
  function rulesRematch(_ref13) {
2395
2476
  var nodeId = _ref13.nodeId,
2396
- params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2397
-
2477
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2398
2478
  return FUtil.Request({
2399
2479
  method: 'POST',
2400
2480
  url: "/v2/testNodes/" + nodeId + "/rules/rematch",
@@ -2403,8 +2483,7 @@ function rulesRematch(_ref13) {
2403
2483
  }
2404
2484
  function rulesPreExecution(_ref14) {
2405
2485
  var nodeId = _ref14.nodeId,
2406
- params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2407
-
2486
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2408
2487
  return FUtil.Request({
2409
2488
  method: 'POST',
2410
2489
  url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
@@ -2413,8 +2492,7 @@ function rulesPreExecution(_ref14) {
2413
2492
  }
2414
2493
  function batchGetAuths(_ref15) {
2415
2494
  var nodeId = _ref15.nodeId,
2416
- params = _objectWithoutPropertiesLoose(_ref15, _excluded11$1);
2417
-
2495
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded11$2);
2418
2496
  return FUtil.Request({
2419
2497
  method: 'GET',
2420
2498
  url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
@@ -2442,10 +2520,9 @@ var InformalNode = {
2442
2520
  };
2443
2521
 
2444
2522
  var _excluded$6 = ["contractId"],
2445
- _excluded2$5 = ["contractId"];
2523
+ _excluded2$5 = ["contractId"];
2446
2524
  function createContract(_ref) {
2447
- var params = _extends({}, _ref);
2448
-
2525
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
2449
2526
  return FUtil.Request({
2450
2527
  method: 'POST',
2451
2528
  url: "/v2/contracts",
@@ -2453,8 +2530,7 @@ function createContract(_ref) {
2453
2530
  });
2454
2531
  }
2455
2532
  function batchCreateContracts(_ref2) {
2456
- var params = _extends({}, _ref2);
2457
-
2533
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
2458
2534
  return FUtil.Request({
2459
2535
  method: 'POST',
2460
2536
  url: "/v2/contracts/batchSign",
@@ -2463,8 +2539,7 @@ function batchCreateContracts(_ref2) {
2463
2539
  }
2464
2540
  function contractDetails(_ref3) {
2465
2541
  var contractId = _ref3.contractId,
2466
- params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
2467
-
2542
+ params = _objectWithoutPropertiesLoose(_ref3, _excluded$6);
2468
2543
  return FUtil.Request({
2469
2544
  method: 'GET',
2470
2545
  url: "/v2/contracts/" + contractId,
@@ -2494,8 +2569,7 @@ function batchContracts(params) {
2494
2569
  }
2495
2570
  function transitionRecords(_ref4) {
2496
2571
  var contractId = _ref4.contractId,
2497
- params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
2498
-
2572
+ params = _objectWithoutPropertiesLoose(_ref4, _excluded2$5);
2499
2573
  return FUtil.Request({
2500
2574
  method: 'GET',
2501
2575
  url: "/v2/contracts/" + contractId + "/transitionRecords",
@@ -2523,11 +2597,10 @@ var Contract = {
2523
2597
  };
2524
2598
 
2525
2599
  var _excluded$7 = ["accountId"],
2526
- _excluded2$6 = ["userId"];
2600
+ _excluded2$6 = ["userId"];
2527
2601
  function details$1(_ref) {
2528
2602
  var accountId = _ref.accountId,
2529
- params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2530
-
2603
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$7);
2531
2604
  return FUtil.Request({
2532
2605
  method: 'GET',
2533
2606
  url: "/v2/transactions/details/" + accountId,
@@ -2536,8 +2609,7 @@ function details$1(_ref) {
2536
2609
  }
2537
2610
  function individualAccounts(_ref2) {
2538
2611
  var userId = _ref2.userId,
2539
- params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2540
-
2612
+ params = _objectWithoutPropertiesLoose(_ref2, _excluded2$6);
2541
2613
  return FUtil.Request({
2542
2614
  method: 'GET',
2543
2615
  url: "/v2/accounts/individualAccounts/" + userId,
@@ -2552,8 +2624,7 @@ function transactionDetails(_ref3) {
2552
2624
  });
2553
2625
  }
2554
2626
  function activateIndividualAccounts(_ref4) {
2555
- var params = _extends({}, _ref4);
2556
-
2627
+ var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
2557
2628
  return FUtil.Request({
2558
2629
  method: 'PUT',
2559
2630
  url: "/v2/accounts/individualAccounts/activate",
@@ -2561,8 +2632,7 @@ function activateIndividualAccounts(_ref4) {
2561
2632
  });
2562
2633
  }
2563
2634
  function changePassword(_ref5) {
2564
- var params = _extends({}, _ref5);
2565
-
2635
+ var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
2566
2636
  return FUtil.Request({
2567
2637
  method: 'PUT',
2568
2638
  url: "/v2/accounts/individualAccounts",
@@ -2570,8 +2640,7 @@ function changePassword(_ref5) {
2570
2640
  });
2571
2641
  }
2572
2642
  function resetPassword$1(_ref6) {
2573
- var params = _extends({}, _ref6);
2574
-
2643
+ var params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
2575
2644
  return FUtil.Request({
2576
2645
  method: 'PUT',
2577
2646
  url: "/v2/accounts/individualAccounts/resetPassword",
@@ -2579,8 +2648,7 @@ function resetPassword$1(_ref6) {
2579
2648
  });
2580
2649
  }
2581
2650
  function verifyTransactionPassword(_ref7) {
2582
- var params = _extends({}, _ref7);
2583
-
2651
+ var params = _extends({}, (_objectDestructuringEmpty(_ref7), _ref7));
2584
2652
  return FUtil.Request({
2585
2653
  method: 'GET',
2586
2654
  url: "/v2/accounts/individualAccounts/verifyTransactionPassword",
@@ -2623,8 +2691,7 @@ var Captcha = {
2623
2691
  var _excluded$8 = ["contractId"];
2624
2692
  function transaction(_ref) {
2625
2693
  var contractId = _ref.contractId,
2626
- params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2627
-
2694
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$8);
2628
2695
  return FUtil.Request({
2629
2696
  method: 'POST',
2630
2697
  url: "/v2/contracts/" + contractId + "/events/payment",
@@ -2683,7 +2750,6 @@ function getBaseTaskInfo(params) {
2683
2750
  if (params === void 0) {
2684
2751
  params = {};
2685
2752
  }
2686
-
2687
2753
  return FUtil.Request({
2688
2754
  method: 'GET',
2689
2755
  url: "/v2/activities/facade/getBaseTaskInfo",
@@ -2694,7 +2760,6 @@ function getResourceTaskInfo(params) {
2694
2760
  if (params === void 0) {
2695
2761
  params = {};
2696
2762
  }
2697
-
2698
2763
  return FUtil.Request({
2699
2764
  method: 'GET',
2700
2765
  url: "/v2/activities/facade/getResourceTaskInfo",
@@ -2705,7 +2770,6 @@ function getNodeTaskInfo(params) {
2705
2770
  if (params === void 0) {
2706
2771
  params = {};
2707
2772
  }
2708
-
2709
2773
  return FUtil.Request({
2710
2774
  method: 'GET',
2711
2775
  url: "/v2/activities/facade/getNodeTaskInfo",
@@ -2751,7 +2815,6 @@ function getWechatOfficialAccountInfo(params) {
2751
2815
  if (params === void 0) {
2752
2816
  params = {};
2753
2817
  }
2754
-
2755
2818
  return FUtil.Request({
2756
2819
  method: 'GET',
2757
2820
  url: "/v2/extensions/wechat/getRelationship4Client",
@@ -2762,7 +2825,6 @@ function lotteryList(params) {
2762
2825
  if (params === void 0) {
2763
2826
  params = {};
2764
2827
  }
2765
-
2766
2828
  return FUtil.Request({
2767
2829
  method: 'GET',
2768
2830
  url: "/v2/activities/lottery/resource/list",
@@ -2794,7 +2856,6 @@ function listRewardRecordInfos(params) {
2794
2856
  if (params === void 0) {
2795
2857
  params = {};
2796
2858
  }
2797
-
2798
2859
  return FUtil.Request({
2799
2860
  method: 'POST',
2800
2861
  url: "/v2/activities/facade/listRewardRecordInfos",
@@ -2860,15 +2921,13 @@ function codeDetails1(_ref) {
2860
2921
  }
2861
2922
  function codeDetails2(_ref2) {
2862
2923
  _objectDestructuringEmpty(_ref2);
2863
-
2864
2924
  return FUtil.Request({
2865
2925
  method: 'GET',
2866
2926
  url: "/v2/testQualifications/beta/codes/userActivateCode"
2867
2927
  });
2868
2928
  }
2869
2929
  function betaCodesActivate(_ref3) {
2870
- var params = _extends({}, _ref3);
2871
-
2930
+ var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
2872
2931
  return FUtil.Request({
2873
2932
  method: 'POST',
2874
2933
  url: "/v2/testQualifications/beta/codes/activate",
@@ -2876,8 +2935,7 @@ function betaCodesActivate(_ref3) {
2876
2935
  });
2877
2936
  }
2878
2937
  function usedRecords(_ref4) {
2879
- var params = _extends({}, _ref4);
2880
-
2938
+ var params = _extends({}, (_objectDestructuringEmpty(_ref4), _ref4));
2881
2939
  return FUtil.Request({
2882
2940
  method: 'GET',
2883
2941
  url: "/v2/testQualifications/beta/codes/usedRecords",
@@ -2885,8 +2943,7 @@ function usedRecords(_ref4) {
2885
2943
  });
2886
2944
  }
2887
2945
  function betaApply(_ref5) {
2888
- var params = _extends({}, _ref5);
2889
-
2946
+ var params = _extends({}, (_objectDestructuringEmpty(_ref5), _ref5));
2890
2947
  return FUtil.Request({
2891
2948
  method: 'POST',
2892
2949
  url: "/v2/testQualifications/beta/apply",
@@ -2895,8 +2952,7 @@ function betaApply(_ref5) {
2895
2952
  }
2896
2953
  function getBetaApply1(_temp) {
2897
2954
  var _ref6 = _temp === void 0 ? {} : _temp,
2898
- params = _extends({}, _ref6);
2899
-
2955
+ params = _extends({}, (_objectDestructuringEmpty(_ref6), _ref6));
2900
2956
  return FUtil.Request({
2901
2957
  method: 'GET',
2902
2958
  url: "/v2/testQualifications/beta/apply/current",
@@ -2905,8 +2961,7 @@ function getBetaApply1(_temp) {
2905
2961
  }
2906
2962
  function getBetaApply2(_ref7) {
2907
2963
  var recordId = _ref7.recordId,
2908
- params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
2909
-
2964
+ params = _objectWithoutPropertiesLoose(_ref7, _excluded$9);
2910
2965
  return FUtil.Request({
2911
2966
  method: 'GET',
2912
2967
  url: "/v2/testQualifications/beta/apply/" + recordId,
@@ -2914,8 +2969,7 @@ function getBetaApply2(_ref7) {
2914
2969
  });
2915
2970
  }
2916
2971
  function invitees(_ref8) {
2917
- var params = _extends({}, _ref8);
2918
-
2972
+ var params = _extends({}, (_objectDestructuringEmpty(_ref8), _ref8));
2919
2973
  return FUtil.Request({
2920
2974
  method: 'GET',
2921
2975
  url: "/v2/testQualifications/beta/codes/invitees",
@@ -2955,7 +3009,8 @@ function configsList(params) {
2955
3009
  url: "/v2/i18n/configs/list",
2956
3010
  data: params
2957
3011
  });
2958
- } // oss保存的翻译
3012
+ }
3013
+ // oss保存的翻译
2959
3014
  // interface ConfigsListParamsType {
2960
3015
  // key: string;
2961
3016
  // content: string;
@@ -2996,7 +3051,6 @@ function policyTemplates(params) {
2996
3051
  if (params === void 0) {
2997
3052
  params = {};
2998
3053
  }
2999
-
3000
3054
  return FUtil.Request({
3001
3055
  method: 'GET',
3002
3056
  url: "/v2/translate/translate-config/list4Client",
@@ -3031,7 +3085,6 @@ var Policy = {
3031
3085
  };
3032
3086
 
3033
3087
  // import * as CryptoJS from 'crypto-js';
3034
-
3035
3088
  /**
3036
3089
  * 根据 File 获取 SHA1 Hash 字符串
3037
3090
  * @param file
@@ -3041,46 +3094,38 @@ function getSHA1Hash(file) {
3041
3094
  return new Promise(function (resolve) {
3042
3095
  var reader = new FileReader();
3043
3096
  reader.readAsArrayBuffer(file);
3044
- reader.onload = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3097
+ reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3045
3098
  var sha1;
3046
3099
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3047
- while (1) {
3048
- switch (_context.prev = _context.next) {
3049
- case 0:
3050
- if (reader.result) {
3051
- _context.next = 3;
3052
- break;
3053
- }
3054
-
3055
- resolve('');
3056
- return _context.abrupt("return", '');
3057
-
3058
- case 3:
3059
- if (!(typeof reader.result === 'string')) {
3060
- _context.next = 6;
3061
- break;
3062
- }
3063
-
3064
- resolve('');
3065
- return _context.abrupt("return", '');
3066
-
3067
- case 6:
3068
- _context.next = 8;
3069
- return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3070
- return Array.from(new Uint8Array(a)).map(function (a) {
3071
- return a.toString(16).padStart(2, '0');
3072
- }).join('');
3073
- });
3074
-
3075
- case 8:
3076
- sha1 = _context.sent;
3077
- resolve(sha1);
3078
- return _context.abrupt("return", '');
3079
-
3080
- case 11:
3081
- case "end":
3082
- return _context.stop();
3083
- }
3100
+ while (1) switch (_context.prev = _context.next) {
3101
+ case 0:
3102
+ if (reader.result) {
3103
+ _context.next = 3;
3104
+ break;
3105
+ }
3106
+ resolve('');
3107
+ return _context.abrupt("return", '');
3108
+ case 3:
3109
+ if (!(typeof reader.result === 'string')) {
3110
+ _context.next = 6;
3111
+ break;
3112
+ }
3113
+ resolve('');
3114
+ return _context.abrupt("return", '');
3115
+ case 6:
3116
+ _context.next = 8;
3117
+ return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3118
+ return Array.from(new Uint8Array(a)).map(function (a) {
3119
+ return a.toString(16).padStart(2, '0');
3120
+ }).join('');
3121
+ });
3122
+ case 8:
3123
+ sha1 = _context.sent;
3124
+ resolve(sha1);
3125
+ return _context.abrupt("return", '');
3126
+ case 11:
3127
+ case "end":
3128
+ return _context.stop();
3084
3129
  }
3085
3130
  }, _callee);
3086
3131
  }));
@@ -3089,70 +3134,56 @@ function getSHA1Hash(file) {
3089
3134
  /**
3090
3135
  * 生成随机码
3091
3136
  */
3092
-
3093
3137
  function generateRandomCode(strLen) {
3094
3138
  if (strLen === void 0) {
3095
3139
  strLen = 5;
3096
3140
  }
3097
-
3098
3141
  var allStr = 'ABCDEFGHIJKLMNPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz1234567890';
3099
3142
  var newStrArr = [];
3100
-
3101
3143
  for (var i = 0; i < strLen; i++) {
3102
3144
  newStrArr.push(allStr[Math.floor(Math.random() * 61)]);
3103
3145
  }
3104
-
3105
3146
  return newStrArr.join('');
3106
3147
  }
3107
3148
  /**
3108
3149
  * 通过读取 cookies 获取用户 ID
3109
3150
  */
3110
-
3111
3151
  function getUserIDByCookies() {
3112
3152
  var uid = document.cookie.split('; ').find(function (co) {
3113
3153
  return co.startsWith('uid=');
3114
3154
  });
3115
-
3116
3155
  if (!uid) {
3117
3156
  return -1;
3118
3157
  }
3119
-
3120
3158
  return Number(uid.replace('uid=', ''));
3121
3159
  }
3122
3160
  function transformServerAPIContractState(_ref2) {
3123
3161
  var status = _ref2.status,
3124
- authStatus = _ref2.authStatus;
3125
-
3162
+ authStatus = _ref2.authStatus;
3126
3163
  if (status === 0) {
3127
3164
  if (authStatus === 1 || authStatus === 3) {
3128
3165
  return 'active';
3129
3166
  }
3130
-
3131
3167
  if (authStatus === 2) {
3132
3168
  return 'testActive';
3133
3169
  }
3134
-
3135
3170
  if (authStatus === 128) {
3136
3171
  return 'inactive';
3137
3172
  }
3138
3173
  }
3139
-
3140
3174
  if (status === 1) {
3141
3175
  return 'terminal';
3142
3176
  }
3143
-
3144
3177
  return 'exception';
3145
3178
  }
3146
3179
  /**
3147
3180
  * 暂时休眠
3148
3181
  * @param ms 休眠时常(毫秒)
3149
3182
  */
3150
-
3151
3183
  function promiseSleep(ms) {
3152
3184
  if (ms === void 0) {
3153
3185
  ms = 300;
3154
3186
  }
3155
-
3156
3187
  return new Promise(function (resolve) {
3157
3188
  setTimeout(function () {
3158
3189
  resolve();
@@ -3163,12 +3194,10 @@ function promiseSleep(ms) {
3163
3194
  * 获取用户头像URL
3164
3195
  * @param userID
3165
3196
  */
3166
-
3167
3197
  function getAvatarUrl(userID) {
3168
3198
  if (userID === void 0) {
3169
3199
  userID = 0;
3170
3200
  }
3171
-
3172
3201
  // return `${completeUrlByDomain('image')}/avatar/${userID || getUserIDByCookies()}?t=${Date.now()}`;
3173
3202
  return "https://image.freelog.com/avatar/" + (userID || getUserIDByCookies()) + "?t=" + Date.now();
3174
3203
  }
@@ -3186,123 +3215,101 @@ var Tool = {
3186
3215
  function getFilesSha1Info(_x, _x2) {
3187
3216
  return _getFilesSha1Info.apply(this, arguments);
3188
3217
  }
3189
-
3190
3218
  function _getFilesSha1Info() {
3191
- _getFilesSha1Info = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3219
+ _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3192
3220
  var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
3193
-
3194
3221
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3195
- while (1) {
3196
- switch (_context.prev = _context.next) {
3197
- case 0:
3198
- sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3199
-
3200
- if (cdPartially === void 0) {
3201
- cdPartially = function cdPartially() {
3202
- return undefined;
3203
- };
3204
- }
3205
-
3206
- if (!(sha1.length === 0)) {
3207
- _context.next = 4;
3208
- break;
3209
- }
3210
-
3211
- return _context.abrupt("return", {
3212
- error: '',
3213
- result: []
3214
- });
3215
-
3216
- case 4:
3217
- delay = 500;
3218
- needHandleSha1 = [].concat(sha1);
3219
- allData = [];
3220
-
3221
- case 7:
3222
-
3223
- _context.next = 10;
3224
- return filesListInfo({
3225
- sha1: needHandleSha1.join(','),
3226
- resourceTypeCode: resourceTypeCode
3227
- });
3228
-
3229
- case 10:
3230
- _yield$Storage$filesL = _context.sent;
3231
- ret = _yield$Storage$filesL.ret;
3232
- errCode = _yield$Storage$filesL.errCode;
3233
- data = _yield$Storage$filesL.data;
3234
- msg = _yield$Storage$filesL.msg;
3235
-
3236
- if (!(ret !== 0 || errCode !== 0)) {
3237
- _context.next = 18;
3238
- break;
3239
- }
3240
-
3241
- console.log({
3242
- ret: ret,
3243
- errCode: errCode,
3244
- data: data,
3245
- msg: msg
3246
- }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3247
- return _context.abrupt("return", {
3248
- error: msg,
3249
- result: allData
3250
- });
3251
-
3252
- case 18:
3253
- needHandleSha1 = data.filter(function (d) {
3254
- return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3255
- }).map(function (d) {
3256
- return d.sha1;
3257
- });
3258
- finishedInfo = data.filter(function (d) {
3259
- return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
3260
- }).map(function (d) {
3261
- var state = 'fail';
3262
-
3263
- if (!d.metaAnalyzeStatus) {
3264
- state = 'nonentity';
3265
- } else if (d.metaAnalyzeStatus === 2) {
3266
- state = 'success';
3267
- } else if (d.metaAnalyzeStatus === 3) {
3268
- state = 'fail';
3269
- } // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
3270
-
3271
-
3272
- return {
3273
- sha1: d.sha1,
3274
- state: state,
3275
- info: d
3276
- };
3277
- });
3278
- cdPartially && cdPartially(finishedInfo);
3279
- allData = [].concat(allData, finishedInfo);
3280
-
3281
- if (!(needHandleSha1.length === 0)) {
3282
- _context.next = 24;
3283
- break;
3222
+ while (1) switch (_context.prev = _context.next) {
3223
+ case 0:
3224
+ sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3225
+ if (cdPartially === void 0) {
3226
+ cdPartially = function cdPartially() {
3227
+ return undefined;
3228
+ };
3229
+ }
3230
+ if (!(sha1.length === 0)) {
3231
+ _context.next = 4;
3232
+ break;
3233
+ }
3234
+ return _context.abrupt("return", {
3235
+ error: '',
3236
+ result: []
3237
+ });
3238
+ case 4:
3239
+ delay = 500;
3240
+ needHandleSha1 = [].concat(sha1);
3241
+ allData = [];
3242
+ case 7:
3243
+ _context.next = 10;
3244
+ return filesListInfo({
3245
+ sha1: needHandleSha1.join(','),
3246
+ resourceTypeCode: resourceTypeCode
3247
+ });
3248
+ case 10:
3249
+ _yield$Storage$filesL = _context.sent;
3250
+ ret = _yield$Storage$filesL.ret;
3251
+ errCode = _yield$Storage$filesL.errCode;
3252
+ data = _yield$Storage$filesL.data;
3253
+ msg = _yield$Storage$filesL.msg;
3254
+ if (!(ret !== 0 || errCode !== 0)) {
3255
+ _context.next = 18;
3256
+ break;
3257
+ }
3258
+ console.log({
3259
+ ret: ret,
3260
+ errCode: errCode,
3261
+ data: data,
3262
+ msg: msg
3263
+ }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3264
+ return _context.abrupt("return", {
3265
+ error: msg,
3266
+ result: allData
3267
+ });
3268
+ case 18:
3269
+ needHandleSha1 = data.filter(function (d) {
3270
+ return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3271
+ }).map(function (d) {
3272
+ return d.sha1;
3273
+ });
3274
+ finishedInfo = data.filter(function (d) {
3275
+ return d.metaAnalyzeStatus !== 0 && d.metaAnalyzeStatus !== 1;
3276
+ }).map(function (d) {
3277
+ var state = 'fail';
3278
+ if (!d.metaAnalyzeStatus) {
3279
+ state = 'nonentity';
3280
+ } else if (d.metaAnalyzeStatus === 2) {
3281
+ state = 'success';
3282
+ } else if (d.metaAnalyzeStatus === 3) {
3283
+ state = 'fail';
3284
3284
  }
3285
-
3286
- return _context.abrupt("break", 28);
3287
-
3288
- case 24:
3289
- _context.next = 26;
3290
- return promiseSleep(delay);
3291
-
3292
- case 26:
3293
- _context.next = 7;
3285
+ // console.log(d, '90wieojiksdjf;lkasdjf;lksdjflksjdflkjsdlfkjsdlkj');
3286
+ return {
3287
+ sha1: d.sha1,
3288
+ state: state,
3289
+ info: d
3290
+ };
3291
+ });
3292
+ cdPartially && cdPartially(finishedInfo);
3293
+ allData = [].concat(allData, finishedInfo);
3294
+ if (!(needHandleSha1.length === 0)) {
3295
+ _context.next = 24;
3294
3296
  break;
3295
-
3296
- case 28:
3297
- return _context.abrupt("return", {
3298
- error: '',
3299
- result: allData
3300
- });
3301
-
3302
- case 29:
3303
- case "end":
3304
- return _context.stop();
3305
- }
3297
+ }
3298
+ return _context.abrupt("break", 28);
3299
+ case 24:
3300
+ _context.next = 26;
3301
+ return promiseSleep(delay);
3302
+ case 26:
3303
+ _context.next = 7;
3304
+ break;
3305
+ case 28:
3306
+ return _context.abrupt("return", {
3307
+ error: '',
3308
+ result: allData
3309
+ });
3310
+ case 29:
3311
+ case "end":
3312
+ return _context.stop();
3306
3313
  }
3307
3314
  }, _callee);
3308
3315
  }));
@@ -3316,8 +3323,7 @@ var recombination = {
3316
3323
 
3317
3324
  function operationCategories(_temp) {
3318
3325
  var _ref = _temp === void 0 ? {} : _temp,
3319
- params = _extends({}, _ref);
3320
-
3326
+ params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
3321
3327
  return FUtil.Request({
3322
3328
  method: 'GET',
3323
3329
  url: "/v2/resources/operation-categories/listSimpleByGroup",
@@ -3325,8 +3331,7 @@ function operationCategories(_temp) {
3325
3331
  });
3326
3332
  }
3327
3333
  function recordRank(_ref2) {
3328
- var params = _extends({}, _ref2);
3329
-
3334
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
3330
3335
  return FUtil.Request({
3331
3336
  method: 'POST',
3332
3337
  url: "/v2/activities/coin/record/rank",
@@ -3334,8 +3339,7 @@ function recordRank(_ref2) {
3334
3339
  });
3335
3340
  }
3336
3341
  function rankInfo(_ref3) {
3337
- var params = _extends({}, _ref3);
3338
-
3342
+ var params = _extends({}, (_objectDestructuringEmpty(_ref3), _ref3));
3339
3343
  return FUtil.Request({
3340
3344
  method: 'POST',
3341
3345
  url: "/v2/activities/coin/record/rankInfo",
@@ -3350,6 +3354,29 @@ var Operation = {
3350
3354
  rankInfo: rankInfo
3351
3355
  };
3352
3356
 
3357
+ function getInfoByCode(_ref) {
3358
+ var params = _extends({}, (_objectDestructuringEmpty(_ref), _ref));
3359
+ return FUtil.Request({
3360
+ method: 'GET',
3361
+ url: "/v2/resources/types/getInfoByCode",
3362
+ params: params
3363
+ });
3364
+ }
3365
+ function getInfoByCodeOrName(_ref2) {
3366
+ var params = _extends({}, (_objectDestructuringEmpty(_ref2), _ref2));
3367
+ return FUtil.Request({
3368
+ method: 'GET',
3369
+ url: "/v2/resources/types/getInfoByCodeOrName",
3370
+ params: params
3371
+ });
3372
+ }
3373
+
3374
+ var ResourceType = {
3375
+ __proto__: null,
3376
+ getInfoByCode: getInfoByCode,
3377
+ getInfoByCodeOrName: getInfoByCodeOrName
3378
+ };
3379
+
3353
3380
  var FServiceAPI = {
3354
3381
  Node: Node,
3355
3382
  Exhibit: Exhibit,
@@ -3368,9 +3395,11 @@ var FServiceAPI = {
3368
3395
  I18n: I18n,
3369
3396
  Policy: Policy,
3370
3397
  recombination: recombination,
3371
- Operation: Operation
3398
+ Operation: Operation,
3399
+ ResourceType: ResourceType
3372
3400
  };
3373
3401
 
3402
+ // import from '../service-API';
3374
3403
  var codeMessage = {
3375
3404
  200: '服务器成功返回请求的数据。',
3376
3405
  201: '新建或修改数据成功。',
@@ -3387,8 +3416,8 @@ var codeMessage = {
3387
3416
  502: '网关错误。',
3388
3417
  503: '服务不可用,服务器暂时过载或维护。',
3389
3418
  504: '网关超时。'
3390
- }; // export let apiHost: string = '';
3391
-
3419
+ };
3420
+ // export let apiHost: string = '';
3392
3421
  if (window.location.hostname.includes('.com')) {
3393
3422
  // apiHost = `${window.location.protocol}//qi.${(window.location.host.match(/(?<=\.).*/) || [''])[0]}`;
3394
3423
  // apiHost = window.location.origin.replace('console', 'qi');
@@ -3418,8 +3447,6 @@ if (window.location.hostname.includes('.com')) {
3418
3447
  // };
3419
3448
  //
3420
3449
  // // Add a request interceptor
3421
-
3422
-
3423
3450
  axios.interceptors.request.use(function (config) {
3424
3451
  // Do something before request is sent
3425
3452
  // NProgress.start();
@@ -3432,10 +3459,8 @@ axios.interceptors.request.use(function (config) {
3432
3459
  /**
3433
3460
  * 配置request请求时的默认参数
3434
3461
  */
3435
-
3436
3462
  axios.interceptors.response.use(function (response) {
3437
3463
  var _headers$contentDisp;
3438
-
3439
3464
  // Do something with response data
3440
3465
  // console.log(response, 'response!!!!!!');
3441
3466
  // NProgress.done();
@@ -3443,18 +3468,17 @@ axios.interceptors.response.use(function (response) {
3443
3468
  var error = {
3444
3469
  description: codeMessage[response.status],
3445
3470
  message: response.status
3446
- }; // notification.error(error);
3447
-
3471
+ };
3472
+ // notification.error(error);
3448
3473
  throw new Error(JSON.stringify(error));
3449
3474
  }
3450
-
3451
3475
  var data = response.data,
3452
- headers = response.headers;
3453
-
3476
+ headers = response.headers;
3454
3477
  if ((_headers$contentDisp = headers['content-disposition']) != null && _headers$contentDisp.includes('attachment;')) {
3455
3478
  // downloadFile(response);
3456
3479
  return;
3457
- } // console.log(data, 'data2390jasdflkf');
3480
+ }
3481
+ // console.log(data, 'data2390jasdflkf');
3458
3482
  // if ((data.errcode === undefined
3459
3483
  // ? (data.errCode !== 0 && data.errCode !== 2)
3460
3484
  // : (data.errcode !== 0 && data.errcode !== 2))
@@ -3465,8 +3489,6 @@ axios.interceptors.response.use(function (response) {
3465
3489
  // // });
3466
3490
  // throw new Error(JSON.stringify(data));
3467
3491
  // }
3468
-
3469
-
3470
3492
  return data;
3471
3493
  }, function (error) {
3472
3494
  // Do something with response error
@@ -3476,51 +3498,40 @@ axios.interceptors.response.use(function (response) {
3476
3498
  function request(_x, _x2) {
3477
3499
  return _request.apply(this, arguments);
3478
3500
  }
3479
-
3480
3501
  function _request() {
3481
- _request = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3502
+ _request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3482
3503
  var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
3483
-
3484
3504
  return _regeneratorRuntime().wrap(function _callee$(_context) {
3485
- while (1) {
3486
- switch (_context.prev = _context.next) {
3487
- case 0:
3488
- _ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect, _ref$noErrorAlert = _ref.noErrorAlert, noErrorAlert = _ref$noErrorAlert === void 0 ? false : _ref$noErrorAlert;
3489
- _context.next = 3;
3490
- return axios.request(config);
3491
-
3492
- case 3:
3493
- result = _context.sent;
3494
-
3495
- if (!(result.errCode === 30 && !noRedirect)) {
3496
- _context.next = 10;
3497
- break;
3498
- }
3499
-
3500
- _context.next = 7;
3501
- return FServiceAPI.User.logout();
3502
-
3503
- case 7:
3504
- window.location.replace("" + completeUrlByDomain('user') + login({
3505
+ while (1) switch (_context.prev = _context.next) {
3506
+ case 0:
3507
+ _ref = _temp === void 0 ? {} : _temp, _ref$noRedirect = _ref.noRedirect, noRedirect = _ref$noRedirect === void 0 ? false : _ref$noRedirect, _ref$noErrorAlert = _ref.noErrorAlert, noErrorAlert = _ref$noErrorAlert === void 0 ? false : _ref$noErrorAlert;
3508
+ _context.next = 3;
3509
+ return axios.request(config);
3510
+ case 3:
3511
+ result = _context.sent;
3512
+ if (!(result.errCode === 30 && !noRedirect)) {
3513
+ _context.next = 10;
3514
+ break;
3515
+ }
3516
+ _context.next = 7;
3517
+ return FServiceAPI.User.logout();
3518
+ case 7:
3519
+ window.location.replace("" + completeUrlByDomain('user') + login({
3520
+ goTo: window.location.href
3521
+ }));
3522
+ _context.next = 11;
3523
+ break;
3524
+ case 10:
3525
+ if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3526
+ window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3505
3527
  goTo: window.location.href
3506
3528
  }));
3507
- _context.next = 11;
3508
- break;
3509
-
3510
- case 10:
3511
- if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3512
- window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3513
- goTo: window.location.href
3514
- }));
3515
- }
3516
-
3517
- case 11:
3518
- return _context.abrupt("return", result);
3519
-
3520
- case 12:
3521
- case "end":
3522
- return _context.stop();
3523
- }
3529
+ }
3530
+ case 11:
3531
+ return _context.abrupt("return", result);
3532
+ case 12:
3533
+ case "end":
3534
+ return _context.stop();
3524
3535
  }
3525
3536
  }, _callee);
3526
3537
  }));
@@ -3529,20 +3540,16 @@ function _request() {
3529
3540
 
3530
3541
  function useGetState(initVal) {
3531
3542
  var _React$useState = React.useState(initVal),
3532
- state = _React$useState[0],
3533
- setState = _React$useState[1];
3534
-
3543
+ state = _React$useState[0],
3544
+ setState = _React$useState[1];
3535
3545
  var ref = React.useRef(initVal);
3536
-
3537
3546
  function setStateCopy(newVal) {
3538
3547
  ref.current = newVal;
3539
3548
  setState(newVal);
3540
3549
  }
3541
-
3542
3550
  function getState() {
3543
3551
  return ref.current;
3544
3552
  }
3545
-
3546
3553
  return [state, setStateCopy, getState];
3547
3554
  }
3548
3555
 
@@ -3551,6 +3558,7 @@ var Hook = {
3551
3558
  useGetState: useGetState
3552
3559
  };
3553
3560
 
3561
+ // import I18n from '../i18n';
3554
3562
  var FUtil = {
3555
3563
  Format: Format,
3556
3564
  Regexp: Regexp,
@@ -3573,12 +3581,11 @@ var allLanguage = [{
3573
3581
  value: 'zh_CN',
3574
3582
  label: '简体中文'
3575
3583
  }];
3576
-
3577
3584
  var I18nNext = /*#__PURE__*/function () {
3578
3585
  function I18nNext() {
3579
3586
  this._loadingData = 'NotStart';
3580
- this._taskQueue = []; // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3581
-
3587
+ this._taskQueue = [];
3588
+ // private _currentLanguage: LanguageKeyType = window.localStorage.getItem(localStorage_i18nextLng_key) as null || 'zh_CN';
3582
3589
  this._currentLanguage = Cookies.get(localStorage_i18nextLng_key) || 'zh_CN';
3583
3590
  this.ready();
3584
3591
  this.ready = this.ready.bind(this);
@@ -3587,100 +3594,77 @@ var I18nNext = /*#__PURE__*/function () {
3587
3594
  this.getAllLanguage = this.getAllLanguage.bind(this);
3588
3595
  this.getCurrentLanguage = this.getCurrentLanguage.bind(this);
3589
3596
  }
3590
-
3591
3597
  var _proto = I18nNext.prototype;
3592
-
3593
3598
  _proto.ready = /*#__PURE__*/function () {
3594
- var _ready = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3599
+ var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3595
3600
  var _this = this;
3596
-
3597
3601
  var exc, handleTasks, promise;
3598
3602
  return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3599
- while (1) {
3600
- switch (_context2.prev = _context2.next) {
3601
- case 0:
3602
- exc = function exc() {
3603
- while (_this._taskQueue.length > 0) {
3604
- var task = _this._taskQueue.shift();
3605
-
3606
- task && task();
3607
- }
3608
- };
3609
-
3610
- handleTasks = /*#__PURE__*/function () {
3611
- var _ref = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3612
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3613
- while (1) {
3614
- switch (_context.prev = _context.next) {
3615
- case 0:
3616
- if (!(_this._loadingData === 'End')) {
3617
- _context.next = 3;
3618
- break;
3619
- }
3620
-
3621
- exc();
3622
- return _context.abrupt("return");
3623
-
3624
- case 3:
3625
- if (!(_this._loadingData === 'Start')) {
3626
- _context.next = 5;
3627
- break;
3628
- }
3629
-
3630
- return _context.abrupt("return");
3631
-
3632
- case 5:
3633
- // NO_START
3634
- _this._loadingData = 'Start';
3635
- _context.next = 8;
3636
- return _this._handleData();
3637
-
3638
- case 8:
3639
- // console.log('######');
3640
- exc();
3641
-
3642
- case 9:
3643
- case "end":
3644
- return _context.stop();
3603
+ while (1) switch (_context2.prev = _context2.next) {
3604
+ case 0:
3605
+ exc = function exc() {
3606
+ while (_this._taskQueue.length > 0) {
3607
+ var task = _this._taskQueue.shift();
3608
+ task && task();
3609
+ }
3610
+ };
3611
+ handleTasks = /*#__PURE__*/function () {
3612
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3613
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
3614
+ while (1) switch (_context.prev = _context.next) {
3615
+ case 0:
3616
+ if (!(_this._loadingData === 'End')) {
3617
+ _context.next = 3;
3618
+ break;
3645
3619
  }
3646
- }
3647
- }, _callee);
3648
- }));
3649
-
3650
- return function handleTasks() {
3651
- return _ref.apply(this, arguments);
3652
- };
3653
- }();
3654
-
3655
- promise = new Promise(function (resolve) {
3656
- _this._taskQueue.push(resolve);
3657
- });
3658
- handleTasks();
3659
- return _context2.abrupt("return", promise);
3660
-
3661
- case 5:
3662
- case "end":
3663
- return _context2.stop();
3664
- }
3620
+ exc();
3621
+ return _context.abrupt("return");
3622
+ case 3:
3623
+ if (!(_this._loadingData === 'Start')) {
3624
+ _context.next = 5;
3625
+ break;
3626
+ }
3627
+ return _context.abrupt("return");
3628
+ case 5:
3629
+ // NO_START
3630
+ _this._loadingData = 'Start';
3631
+ _context.next = 8;
3632
+ return _this._handleData();
3633
+ case 8:
3634
+ // console.log('######');
3635
+ exc();
3636
+ case 9:
3637
+ case "end":
3638
+ return _context.stop();
3639
+ }
3640
+ }, _callee);
3641
+ }));
3642
+ return function handleTasks() {
3643
+ return _ref.apply(this, arguments);
3644
+ };
3645
+ }();
3646
+ promise = new Promise(function (resolve) {
3647
+ _this._taskQueue.push(resolve);
3648
+ });
3649
+ handleTasks();
3650
+ return _context2.abrupt("return", promise);
3651
+ case 5:
3652
+ case "end":
3653
+ return _context2.stop();
3665
3654
  }
3666
3655
  }, _callee2);
3667
3656
  }));
3668
-
3669
3657
  function ready() {
3670
3658
  return _ready.apply(this, arguments);
3671
3659
  }
3672
-
3673
3660
  return ready;
3674
3661
  }();
3675
-
3676
3662
  _proto.t = function t(key, options) {
3677
3663
  return i18next.t(key.trim(), options);
3678
3664
  };
3679
-
3680
3665
  _proto.tJSXElement = function tJSXElement(key, options) {
3681
3666
  return htmlReactParser(i18next.t(key.trim(), options));
3682
3667
  };
3683
-
3684
3668
  _proto.changeLanguage = function changeLanguage(lng) {
3685
3669
  // return i18next.changeLanguage(lng);
3686
3670
  // window.localStorage.setItem(localStorage_i18nextLng_key, lng)
@@ -3689,135 +3673,104 @@ var I18nNext = /*#__PURE__*/function () {
3689
3673
  domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, '')
3690
3674
  });
3691
3675
  };
3692
-
3693
3676
  _proto.getAllLanguage = function getAllLanguage() {
3694
3677
  return allLanguage;
3695
3678
  };
3696
-
3697
3679
  _proto.getCurrentLanguage = function getCurrentLanguage() {
3698
3680
  return this._currentLanguage;
3699
3681
  };
3700
-
3701
3682
  _proto._handleData = /*#__PURE__*/function () {
3702
- var _handleData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3683
+ var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3703
3684
  var lng, resource, i18nextResources;
3704
3685
  return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3705
- while (1) {
3706
- switch (_context3.prev = _context3.next) {
3707
- case 0:
3708
- lng = this._currentLanguage;
3709
- resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3710
-
3711
- i18nextResources = resource ? JSON.parse(resource) : null;
3712
-
3713
- if (i18nextResources) {
3714
- _context3.next = 9;
3715
- break;
3716
- }
3717
-
3718
- _context3.next = 6;
3719
- return this._fetchData();
3720
-
3721
- case 6:
3722
- i18nextResources = _context3.sent;
3723
- _context3.next = 10;
3686
+ while (1) switch (_context3.prev = _context3.next) {
3687
+ case 0:
3688
+ lng = this._currentLanguage;
3689
+ resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3690
+ i18nextResources = resource ? JSON.parse(resource) : null;
3691
+ if (i18nextResources) {
3692
+ _context3.next = 9;
3724
3693
  break;
3725
-
3726
- case 9:
3727
- this._fetchData();
3728
-
3729
- case 10:
3730
- _context3.next = 12;
3731
- return i18next.init({
3732
- // the translations
3733
- // (tip move them in a JSON file and import them,
3734
- // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
3735
- resources: i18nextResources,
3736
- lng: lng,
3737
- fallbackLng: 'zh_CN',
3738
- interpolation: {
3739
- escapeValue: false,
3740
- prefix: '{',
3741
- suffix: '}'
3742
- }
3743
- });
3744
-
3745
- case 12:
3746
- this._loadingData = 'End';
3747
-
3748
- case 13:
3749
- case "end":
3750
- return _context3.stop();
3751
- }
3694
+ }
3695
+ _context3.next = 6;
3696
+ return this._fetchData();
3697
+ case 6:
3698
+ i18nextResources = _context3.sent;
3699
+ _context3.next = 10;
3700
+ break;
3701
+ case 9:
3702
+ this._fetchData();
3703
+ case 10:
3704
+ _context3.next = 12;
3705
+ return i18next.init({
3706
+ // the translations
3707
+ // (tip move them in a JSON file and import them,
3708
+ // or even better, manage them via a UI: https://react.i18next.com/guides/multiple-translation-files#manage-your-translations-with-a-management-gui)
3709
+ resources: i18nextResources,
3710
+ lng: lng,
3711
+ fallbackLng: 'zh_CN',
3712
+ interpolation: {
3713
+ escapeValue: false,
3714
+ prefix: '{',
3715
+ suffix: '}'
3716
+ }
3717
+ });
3718
+ case 12:
3719
+ this._loadingData = 'End';
3720
+ case 13:
3721
+ case "end":
3722
+ return _context3.stop();
3752
3723
  }
3753
3724
  }, _callee3, this);
3754
3725
  }));
3755
-
3756
3726
  function _handleData() {
3757
3727
  return _handleData2.apply(this, arguments);
3758
3728
  }
3759
-
3760
3729
  return _handleData;
3761
3730
  }();
3762
-
3763
3731
  _proto._fetchData = /*#__PURE__*/function () {
3764
- var _fetchData2 = /*#__PURE__*/_asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3732
+ var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3765
3733
  var url, res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
3766
-
3767
3734
  return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3768
- while (1) {
3769
- switch (_context4.prev = _context4.next) {
3770
- case 0:
3771
- url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3772
- _context4.next = 3;
3773
- return axios.get(url + '?timestamp=' + Date.now(), {
3774
- withCredentials: false
3775
- });
3776
-
3777
- case 3:
3778
- res = _context4.sent;
3779
- // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3780
- en_US = {};
3781
- zh_CN = {};
3782
-
3783
- for (_i = 0, _Object$entries = Object.entries(res); _i < _Object$entries.length; _i++) {
3784
- _Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];
3785
- // console.log(key, value, 'key, value90iowsldfjlsdkj');
3786
- en_US[key] = value['en_US'];
3787
- zh_CN[key] = value['zh_CN'];
3735
+ while (1) switch (_context4.prev = _context4.next) {
3736
+ case 0:
3737
+ url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3738
+ _context4.next = 3;
3739
+ return axios.get(url + '?timestamp=' + Date.now(), {
3740
+ withCredentials: false
3741
+ });
3742
+ case 3:
3743
+ res = _context4.sent;
3744
+ // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3745
+ en_US = {};
3746
+ zh_CN = {};
3747
+ for (_i = 0, _Object$entries = Object.entries(res); _i < _Object$entries.length; _i++) {
3748
+ _Object$entries$_i = _Object$entries[_i], key = _Object$entries$_i[0], value = _Object$entries$_i[1];
3749
+ // console.log(key, value, 'key, value90iowsldfjlsdkj');
3750
+ en_US[key] = value['en_US'];
3751
+ zh_CN[key] = value['zh_CN'];
3752
+ }
3753
+ result = {
3754
+ en_US: {
3755
+ translation: en_US
3756
+ },
3757
+ zh_CN: {
3758
+ translation: zh_CN
3788
3759
  }
3789
-
3790
- result = {
3791
- en_US: {
3792
- translation: en_US
3793
- },
3794
- zh_CN: {
3795
- translation: zh_CN
3796
- }
3797
- }; // console.log(result, 'result093sdolkfjlsdkjl');
3798
-
3799
- window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result)); // Cookies.set(localStorage_i18nextResources_key, encodeURIComponent(JSON.stringify(result)), {
3800
- // expires: 36525,
3801
- // domain: FUtil.Format.completeUrlByDomain('').replace(/http(s)?:\/\//, ''),
3802
- // });
3803
-
3804
- return _context4.abrupt("return", result);
3805
-
3806
- case 10:
3807
- case "end":
3808
- return _context4.stop();
3809
- }
3760
+ };
3761
+ window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result));
3762
+ return _context4.abrupt("return", result);
3763
+ case 10:
3764
+ case "end":
3765
+ return _context4.stop();
3810
3766
  }
3811
3767
  }, _callee4);
3812
3768
  }));
3813
-
3814
3769
  function _fetchData() {
3815
3770
  return _fetchData2.apply(this, arguments);
3816
3771
  }
3817
-
3818
3772
  return _fetchData;
3819
3773
  }();
3820
-
3821
3774
  return I18nNext;
3822
3775
  }();
3823
3776