@freelog/tools-lib 0.1.184 → 0.1.186

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.
@@ -212,311 +212,118 @@ function _objectWithoutPropertiesLoose(r, e) {
212
212
  if (null == r) return {};
213
213
  var t = {};
214
214
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
215
- if (e.includes(n)) continue;
215
+ if (-1 !== e.indexOf(n)) continue;
216
216
  t[n] = r[n];
217
217
  }
218
218
  return t;
219
219
  }
220
- function _regeneratorRuntime() {
221
- _regeneratorRuntime = function () {
222
- return e;
223
- };
224
- var t,
225
- e = {},
226
- r = Object.prototype,
227
- n = r.hasOwnProperty,
228
- o = Object.defineProperty || function (t, e, r) {
229
- t[e] = r.value;
230
- },
231
- i = "function" == typeof Symbol ? Symbol : {},
232
- a = i.iterator || "@@iterator",
233
- c = i.asyncIterator || "@@asyncIterator",
234
- u = i.toStringTag || "@@toStringTag";
235
- function define(t, e, r) {
236
- return Object.defineProperty(t, e, {
237
- value: r,
238
- enumerable: !0,
239
- configurable: !0,
240
- writable: !0
241
- }), t[e];
242
- }
243
- try {
244
- define({}, "");
245
- } catch (t) {
246
- define = function (t, e, r) {
247
- return t[e] = r;
248
- };
249
- }
250
- function wrap(t, e, r, n) {
251
- var i = e && e.prototype instanceof Generator ? e : Generator,
252
- a = Object.create(i.prototype),
253
- c = new Context(n || []);
254
- return o(a, "_invoke", {
255
- value: makeInvokeMethod(t, r, c)
256
- }), a;
257
- }
258
- function tryCatch(t, e, r) {
259
- try {
260
- return {
261
- type: "normal",
262
- arg: t.call(e, r)
263
- };
264
- } catch (t) {
265
- return {
266
- type: "throw",
267
- arg: t
268
- };
269
- }
270
- }
271
- e.wrap = wrap;
272
- var h = "suspendedStart",
273
- l = "suspendedYield",
274
- f = "executing",
275
- s = "completed",
276
- y = {};
277
- function Generator() {}
278
- function GeneratorFunction() {}
279
- function GeneratorFunctionPrototype() {}
280
- var p = {};
281
- define(p, a, function () {
282
- return this;
283
- });
284
- var d = Object.getPrototypeOf,
285
- v = d && d(d(values([])));
286
- v && v !== r && n.call(v, a) && (p = v);
287
- var g = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(p);
288
- function defineIteratorMethods(t) {
289
- ["next", "throw", "return"].forEach(function (e) {
290
- define(t, e, function (t) {
291
- return this._invoke(e, t);
292
- });
293
- });
294
- }
295
- function AsyncIterator(t, e) {
296
- function invoke(r, o, i, a) {
297
- var c = tryCatch(t[r], t, o);
298
- if ("throw" !== c.type) {
299
- var u = c.arg,
300
- h = u.value;
301
- return h && "object" == typeof h && n.call(h, "__await") ? e.resolve(h.__await).then(function (t) {
302
- invoke("next", t, i, a);
303
- }, function (t) {
304
- invoke("throw", t, i, a);
305
- }) : e.resolve(h).then(function (t) {
306
- u.value = t, i(u);
307
- }, function (t) {
308
- return invoke("throw", t, i, a);
309
- });
310
- }
311
- a(c.arg);
312
- }
313
- var r;
314
- o(this, "_invoke", {
315
- value: function (t, n) {
316
- function callInvokeWithMethodAndArg() {
317
- return new e(function (e, r) {
318
- invoke(t, n, e, r);
319
- });
220
+ function _regenerator() {
221
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
222
+ var e,
223
+ t,
224
+ r = "function" == typeof Symbol ? Symbol : {},
225
+ n = r.iterator || "@@iterator",
226
+ o = r.toStringTag || "@@toStringTag";
227
+ function i(r, n, o, i) {
228
+ var c = n && n.prototype instanceof Generator ? n : Generator,
229
+ u = Object.create(c.prototype);
230
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
231
+ var i,
232
+ c,
233
+ u,
234
+ f = 0,
235
+ p = o || [],
236
+ y = !1,
237
+ G = {
238
+ p: 0,
239
+ n: 0,
240
+ v: e,
241
+ a: d,
242
+ f: d.bind(e, 4),
243
+ d: function (t, r) {
244
+ return i = t, c = 0, u = e, G.n = r, a;
245
+ }
246
+ };
247
+ function d(r, n) {
248
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
249
+ var o,
250
+ i = p[t],
251
+ d = G.p,
252
+ l = i[2];
253
+ r > 3 ? (o = l === n) && (u = i[(c = i[4]) ? 5 : (c = 3, 3)], i[4] = i[5] = e) : i[0] <= d && ((o = r < 2 && d < i[1]) ? (c = 0, G.v = n, G.n = i[1]) : d < l && (o = r < 3 || i[0] > n || n > l) && (i[4] = r, i[5] = n, G.n = l, c = 0));
320
254
  }
321
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
255
+ if (o || r > 1) return a;
256
+ throw y = !0, n;
322
257
  }
323
- });
324
- }
325
- function makeInvokeMethod(e, r, n) {
326
- var o = h;
327
- return function (i, a) {
328
- if (o === f) throw Error("Generator is already running");
329
- if (o === s) {
330
- if ("throw" === i) throw a;
258
+ return function (o, p, l) {
259
+ if (f > 1) throw TypeError("Generator is already running");
260
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
261
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
262
+ try {
263
+ if (f = 2, i) {
264
+ if (c || (o = "next"), t = i[o]) {
265
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
266
+ if (!t.done) return t;
267
+ u = t.value, c < 2 && (c = 0);
268
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
269
+ i = e;
270
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
271
+ } catch (t) {
272
+ i = e, c = 1, u = t;
273
+ } finally {
274
+ f = 1;
275
+ }
276
+ }
331
277
  return {
332
278
  value: t,
333
- done: !0
279
+ done: y
334
280
  };
335
- }
336
- for (n.method = i, n.arg = a;;) {
337
- var c = n.delegate;
338
- if (c) {
339
- var u = maybeInvokeDelegate(c, n);
340
- if (u) {
341
- if (u === y) continue;
342
- return u;
343
- }
344
- }
345
- if ("next" === n.method) n.sent = n._sent = n.arg;else if ("throw" === n.method) {
346
- if (o === h) throw o = s, n.arg;
347
- n.dispatchException(n.arg);
348
- } else "return" === n.method && n.abrupt("return", n.arg);
349
- o = f;
350
- var p = tryCatch(e, r, n);
351
- if ("normal" === p.type) {
352
- if (o = n.done ? s : l, p.arg === y) continue;
353
- return {
354
- value: p.arg,
355
- done: n.done
356
- };
357
- }
358
- "throw" === p.type && (o = s, n.method = "throw", n.arg = p.arg);
359
- }
360
- };
361
- }
362
- function maybeInvokeDelegate(e, r) {
363
- var n = r.method,
364
- o = e.iterator[n];
365
- 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;
366
- var i = tryCatch(o, e.iterator, r.arg);
367
- if ("throw" === i.type) return r.method = "throw", r.arg = i.arg, r.delegate = null, y;
368
- var a = i.arg;
369
- 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);
370
- }
371
- function pushTryEntry(t) {
372
- var e = {
373
- tryLoc: t[0]
374
- };
375
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
376
- }
377
- function resetTryEntry(t) {
378
- var e = t.completion || {};
379
- e.type = "normal", delete e.arg, t.completion = e;
380
- }
381
- function Context(t) {
382
- this.tryEntries = [{
383
- tryLoc: "root"
384
- }], t.forEach(pushTryEntry, this), this.reset(!0);
281
+ };
282
+ }(r, o, i), !0), u;
385
283
  }
386
- function values(e) {
387
- if (e || "" === e) {
388
- var r = e[a];
389
- if (r) return r.call(e);
390
- if ("function" == typeof e.next) return e;
391
- if (!isNaN(e.length)) {
392
- var o = -1,
393
- i = function next() {
394
- for (; ++o < e.length;) if (n.call(e, o)) return next.value = e[o], next.done = !1, next;
395
- return next.value = t, next.done = !0, next;
396
- };
397
- return i.next = i;
398
- }
399
- }
400
- throw new TypeError(typeof e + " is not iterable");
284
+ var a = {};
285
+ function Generator() {}
286
+ function GeneratorFunction() {}
287
+ function GeneratorFunctionPrototype() {}
288
+ t = Object.getPrototypeOf;
289
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
290
+ return this;
291
+ }), t),
292
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
293
+ function f(e) {
294
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
401
295
  }
402
- return GeneratorFunction.prototype = GeneratorFunctionPrototype, o(g, "constructor", {
403
- value: GeneratorFunctionPrototype,
404
- configurable: !0
405
- }), o(GeneratorFunctionPrototype, "constructor", {
406
- value: GeneratorFunction,
407
- configurable: !0
408
- }), GeneratorFunction.displayName = define(GeneratorFunctionPrototype, u, "GeneratorFunction"), e.isGeneratorFunction = function (t) {
409
- var e = "function" == typeof t && t.constructor;
410
- return !!e && (e === GeneratorFunction || "GeneratorFunction" === (e.displayName || e.name));
411
- }, e.mark = function (t) {
412
- return Object.setPrototypeOf ? Object.setPrototypeOf(t, GeneratorFunctionPrototype) : (t.__proto__ = GeneratorFunctionPrototype, define(t, u, "GeneratorFunction")), t.prototype = Object.create(g), t;
413
- }, e.awrap = function (t) {
414
- return {
415
- __await: t
416
- };
417
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
296
+ return GeneratorFunction.prototype = GeneratorFunctionPrototype, _regeneratorDefine(u, "constructor", GeneratorFunctionPrototype), _regeneratorDefine(GeneratorFunctionPrototype, "constructor", GeneratorFunction), GeneratorFunction.displayName = "GeneratorFunction", _regeneratorDefine(GeneratorFunctionPrototype, o, "GeneratorFunction"), _regeneratorDefine(u), _regeneratorDefine(u, o, "Generator"), _regeneratorDefine(u, n, function () {
418
297
  return this;
419
- }), e.AsyncIterator = AsyncIterator, e.async = function (t, r, n, o, i) {
420
- void 0 === i && (i = Promise);
421
- var a = new AsyncIterator(wrap(t, r, n, o), i);
422
- return e.isGeneratorFunction(r) ? a : a.next().then(function (t) {
423
- return t.done ? t.value : a.next();
424
- });
425
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
426
- return this;
427
- }), define(g, "toString", function () {
298
+ }), _regeneratorDefine(u, "toString", function () {
428
299
  return "[object Generator]";
429
- }), e.keys = function (t) {
430
- var e = Object(t),
431
- r = [];
432
- for (var n in e) r.push(n);
433
- return r.reverse(), function next() {
434
- for (; r.length;) {
435
- var t = r.pop();
436
- if (t in e) return next.value = t, next.done = !1, next;
437
- }
438
- return next.done = !0, next;
300
+ }), (_regenerator = function () {
301
+ return {
302
+ w: i,
303
+ m: f
439
304
  };
440
- }, e.values = values, Context.prototype = {
441
- constructor: Context,
442
- reset: function (e) {
443
- 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);
444
- },
445
- stop: function () {
446
- this.done = !0;
447
- var t = this.tryEntries[0].completion;
448
- if ("throw" === t.type) throw t.arg;
449
- return this.rval;
450
- },
451
- dispatchException: function (e) {
452
- if (this.done) throw e;
453
- var r = this;
454
- function handle(n, o) {
455
- return a.type = "throw", a.arg = e, r.next = n, o && (r.method = "next", r.arg = t), !!o;
456
- }
457
- for (var o = this.tryEntries.length - 1; o >= 0; --o) {
458
- var i = this.tryEntries[o],
459
- a = i.completion;
460
- if ("root" === i.tryLoc) return handle("end");
461
- if (i.tryLoc <= this.prev) {
462
- var c = n.call(i, "catchLoc"),
463
- u = n.call(i, "finallyLoc");
464
- if (c && u) {
465
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
466
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
467
- } else if (c) {
468
- if (this.prev < i.catchLoc) return handle(i.catchLoc, !0);
469
- } else {
470
- if (!u) throw Error("try statement without catch or finally");
471
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
472
- }
473
- }
474
- }
475
- },
476
- abrupt: function (t, e) {
477
- for (var r = this.tryEntries.length - 1; r >= 0; --r) {
478
- var o = this.tryEntries[r];
479
- if (o.tryLoc <= this.prev && n.call(o, "finallyLoc") && this.prev < o.finallyLoc) {
480
- var i = o;
481
- break;
482
- }
483
- }
484
- i && ("break" === t || "continue" === t) && i.tryLoc <= e && e <= i.finallyLoc && (i = null);
485
- var a = i ? i.completion : {};
486
- return a.type = t, a.arg = e, i ? (this.method = "next", this.next = i.finallyLoc, y) : this.complete(a);
487
- },
488
- complete: function (t, e) {
489
- if ("throw" === t.type) throw t.arg;
490
- 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;
491
- },
492
- finish: function (t) {
493
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
494
- var r = this.tryEntries[e];
495
- if (r.finallyLoc === t) return this.complete(r.completion, r.afterLoc), resetTryEntry(r), y;
496
- }
497
- },
498
- catch: function (t) {
499
- for (var e = this.tryEntries.length - 1; e >= 0; --e) {
500
- var r = this.tryEntries[e];
501
- if (r.tryLoc === t) {
502
- var n = r.completion;
503
- if ("throw" === n.type) {
504
- var o = n.arg;
505
- resetTryEntry(r);
506
- }
507
- return o;
508
- }
509
- }
510
- throw Error("illegal catch attempt");
511
- },
512
- delegateYield: function (e, r, n) {
513
- return this.delegate = {
514
- iterator: values(e),
515
- resultName: r,
516
- nextLoc: n
517
- }, "next" === this.method && (this.arg = t), y;
305
+ })();
306
+ }
307
+ function _regeneratorDefine(e, r, n, t) {
308
+ var i = Object.defineProperty;
309
+ try {
310
+ i({}, "", {});
311
+ } catch (e) {
312
+ i = 0;
313
+ }
314
+ _regeneratorDefine = function (e, r, n, t) {
315
+ function o(r, n) {
316
+ _regeneratorDefine(e, r, function (e) {
317
+ return this._invoke(r, n, e);
318
+ });
518
319
  }
519
- }, e;
320
+ r ? i ? i(e, r, {
321
+ value: n,
322
+ enumerable: !t,
323
+ configurable: !t,
324
+ writable: !t
325
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
326
+ }, _regeneratorDefine(e, r, n, t);
520
327
  }
521
328
 
522
329
  var _excluded = ["resourceID"],
@@ -583,18 +390,26 @@ function collectionCreator(_temp9) {
583
390
  _objectDestructuringEmpty(_temp9 === void 0 ? {} : _temp9);
584
391
  return "/resource/collectionCreator";
585
392
  }
586
- function myResources(_temp10) {
587
- _objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
393
+ function myResources(_temp0) {
394
+ _objectDestructuringEmpty(_temp0 === void 0 ? {} : _temp0);
588
395
  return "/resource/list";
589
396
  }
590
- function myCollections(_temp11) {
591
- _objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
397
+ function myCollections(_temp1) {
398
+ _objectDestructuringEmpty(_temp1 === void 0 ? {} : _temp1);
592
399
  return "/resource/collection";
593
400
  }
594
- function myCollects(_temp12) {
595
- _objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
401
+ function myCollects(_temp10) {
402
+ _objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
596
403
  return "/resource/collect";
597
404
  }
405
+ function myResourceIncome(_temp11) {
406
+ _objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
407
+ return "/resource/income";
408
+ }
409
+ function myResourceTransaction(_temp12) {
410
+ _objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
411
+ return "/resource/transaction";
412
+ }
598
413
  function resourceVersionInfo(_ref17) {
599
414
  var resourceID = _ref17.resourceID,
600
415
  _ref17$version = _ref17.version,
@@ -878,6 +693,8 @@ var LinkTo = {
878
693
  myResources: myResources,
879
694
  myCollections: myCollections,
880
695
  myCollects: myCollects,
696
+ myResourceIncome: myResourceIncome,
697
+ myResourceTransaction: myResourceTransaction,
881
698
  resourceVersionInfo: resourceVersionInfo,
882
699
  resourceInfo: resourceInfo,
883
700
  resourcePolicy: resourcePolicy,
@@ -1043,16 +860,16 @@ var _excluded$1 = ["presentableId"],
1043
860
  _excluded7$1 = ["presentableId"],
1044
861
  _excluded8 = ["presentableId"],
1045
862
  _excluded9 = ["nodeId"],
1046
- _excluded10 = ["nodeId"],
863
+ _excluded0 = ["nodeId"],
864
+ _excluded1 = ["presentableId"],
865
+ _excluded10 = ["presentableId"],
1047
866
  _excluded11 = ["presentableId"],
1048
867
  _excluded12 = ["presentableId"],
1049
868
  _excluded13 = ["presentableId"],
1050
869
  _excluded14 = ["presentableId"],
1051
870
  _excluded15 = ["presentableId"],
1052
871
  _excluded16 = ["presentableId"],
1053
- _excluded17 = ["presentableId"],
1054
- _excluded18 = ["presentableId"],
1055
- _excluded19 = ["presentableId"];
872
+ _excluded17 = ["presentableId"];
1056
873
  function createPresentable(params) {
1057
874
  return FUtil.Request({
1058
875
  method: 'POST',
@@ -1164,7 +981,7 @@ function batchAuth(_ref8) {
1164
981
  }
1165
982
  function contractAppliedPresentable(_ref9) {
1166
983
  var nodeId = _ref9.nodeId,
1167
- params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
984
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded0);
1168
985
  return FUtil.Request({
1169
986
  method: 'GET',
1170
987
  url: "/v2/presentables/" + nodeId + "/contractAppliedPresentable",
@@ -1178,120 +995,120 @@ function batchCreatePresentable(params) {
1178
995
  data: params
1179
996
  });
1180
997
  }
1181
- function batchUpdatePresentable(_ref10) {
1182
- var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
998
+ function batchUpdatePresentable(_ref0) {
999
+ var params = _extends({}, (_objectDestructuringEmpty(_ref0), _ref0));
1183
1000
  return FUtil.Request({
1184
1001
  method: 'PUT',
1185
1002
  url: "/v2/presentables/updatePresentableBatch",
1186
1003
  data: params
1187
1004
  });
1188
1005
  }
1189
- function batchUpdatePresentableStatus(_ref11) {
1190
- var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1006
+ function batchUpdatePresentableStatus(_ref1) {
1007
+ var params = _extends({}, (_objectDestructuringEmpty(_ref1), _ref1));
1191
1008
  return FUtil.Request({
1192
1009
  method: 'PUT',
1193
1010
  url: "/v2/presentables/updatePresentableOnlineStatusBatch",
1194
1011
  data: params
1195
1012
  });
1196
1013
  }
1197
- function ignorePresentableVersionUpdateTip(_ref12) {
1198
- var presentableId = _ref12.presentableId,
1199
- params = _objectWithoutPropertiesLoose(_ref12, _excluded11);
1014
+ function ignorePresentableVersionUpdateTip(_ref10) {
1015
+ var presentableId = _ref10.presentableId,
1016
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded1);
1200
1017
  return FUtil.Request({
1201
1018
  method: 'POST',
1202
1019
  url: "/v2/presentables/" + presentableId + "/ignorePresentableVersionUpdateTip",
1203
1020
  data: params
1204
1021
  });
1205
1022
  }
1206
- function createPresentableCollection(_ref13) {
1207
- var params = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13));
1023
+ function createPresentableCollection(_ref11) {
1024
+ var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1208
1025
  return FUtil.Request({
1209
1026
  method: 'POST',
1210
1027
  url: "/v2/presentables/catalogues",
1211
1028
  data: params
1212
1029
  });
1213
1030
  }
1214
- function updatePresentableCollection(_ref14) {
1215
- var presentableId = _ref14.presentableId,
1216
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1031
+ function updatePresentableCollection(_ref12) {
1032
+ var presentableId = _ref12.presentableId,
1033
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10);
1217
1034
  return FUtil.Request({
1218
1035
  method: 'PUT',
1219
1036
  url: "/v2/presentables/catalogues/" + presentableId,
1220
1037
  data: params
1221
1038
  });
1222
1039
  }
1223
- function addItemsToPresentableCollection(_ref15) {
1224
- var presentableId = _ref15.presentableId,
1225
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1040
+ function addItemsToPresentableCollection(_ref13) {
1041
+ var presentableId = _ref13.presentableId,
1042
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11);
1226
1043
  return FUtil.Request({
1227
1044
  method: 'POST',
1228
1045
  url: "/v2/presentables/catalogues/" + presentableId + "/items",
1229
1046
  data: params
1230
1047
  });
1231
1048
  }
1232
- function removeItemsFromPresentableCollection(_ref16) {
1233
- var presentableId = _ref16.presentableId,
1234
- params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1049
+ function removeItemsFromPresentableCollection(_ref14) {
1050
+ var presentableId = _ref14.presentableId,
1051
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1235
1052
  return FUtil.Request({
1236
1053
  method: 'DELETE',
1237
1054
  url: "/v2/presentables/catalogues/" + presentableId + "/items",
1238
1055
  params: params
1239
1056
  });
1240
1057
  }
1241
- function getItemsFromPresentableCollection(_ref17) {
1242
- var presentableId = _ref17.presentableId,
1243
- params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1058
+ function getItemsFromPresentableCollection(_ref15) {
1059
+ var presentableId = _ref15.presentableId,
1060
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1244
1061
  return FUtil.Request({
1245
1062
  method: 'GET',
1246
1063
  url: "/v2/presentables/catalogues/" + presentableId + "/items",
1247
1064
  params: params
1248
1065
  });
1249
1066
  }
1250
- function getItemsFromPresentableCollectionIsExist(_ref18) {
1251
- var presentableId = _ref18.presentableId,
1252
- params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1067
+ function getItemsFromPresentableCollectionIsExist(_ref16) {
1068
+ var presentableId = _ref16.presentableId,
1069
+ params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1253
1070
  return FUtil.Request({
1254
1071
  method: 'GET',
1255
1072
  url: "/v2/presentables/catalogues/" + presentableId + "/items/checkExists",
1256
1073
  params: params
1257
1074
  });
1258
1075
  }
1259
- function setItemsSortFromPresentableCollectionManual(_ref19) {
1260
- var presentableId = _ref19.presentableId,
1261
- params = _objectWithoutPropertiesLoose(_ref19, _excluded17);
1076
+ function setItemsSortFromPresentableCollectionManual(_ref17) {
1077
+ var presentableId = _ref17.presentableId,
1078
+ params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1262
1079
  return FUtil.Request({
1263
1080
  method: 'PUT',
1264
1081
  url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1265
1082
  data: params
1266
1083
  });
1267
1084
  }
1268
- function setItemsSortFromPresentableCollectionQuick(_ref20) {
1269
- var presentableId = _ref20.presentableId,
1270
- params = _objectWithoutPropertiesLoose(_ref20, _excluded18);
1085
+ function setItemsSortFromPresentableCollectionQuick(_ref18) {
1086
+ var presentableId = _ref18.presentableId,
1087
+ params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1271
1088
  return FUtil.Request({
1272
1089
  method: 'PUT',
1273
1090
  url: "/v2/presentables/catalogues/" + presentableId + "/reorder",
1274
1091
  data: params
1275
1092
  });
1276
1093
  }
1277
- function getItemsAutoCollectRule(_ref21) {
1278
- var presentableId = _ref21.presentableId;
1094
+ function getItemsAutoCollectRule(_ref19) {
1095
+ var presentableId = _ref19.presentableId;
1279
1096
  return FUtil.Request({
1280
1097
  method: 'GET',
1281
1098
  url: "/v2/presentables/catalogues/" + presentableId + "/items/collectRules"
1282
1099
  });
1283
1100
  }
1284
- function setItemsAutoCollectRule(_ref22) {
1285
- var presentableId = _ref22.presentableId,
1286
- params = _objectWithoutPropertiesLoose(_ref22, _excluded19);
1101
+ function setItemsAutoCollectRule(_ref20) {
1102
+ var presentableId = _ref20.presentableId,
1103
+ params = _objectWithoutPropertiesLoose(_ref20, _excluded17);
1287
1104
  return FUtil.Request({
1288
1105
  method: 'POST',
1289
1106
  url: "/v2/presentables/catalogues/" + presentableId + "/items/collectRules",
1290
1107
  data: params
1291
1108
  });
1292
1109
  }
1293
- function getItemsFromPresentableCollections(_ref23) {
1294
- var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1110
+ function getItemsFromPresentableCollections(_ref21) {
1111
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1295
1112
  return FUtil.Request({
1296
1113
  method: 'GET',
1297
1114
  // url: `/v2/presentables/catalogues/items/batch/list?presentableIds=685cf423e1502e002fe3053b&limit=1&sortType=-1&sortField=createDate`,
@@ -1553,16 +1370,16 @@ function clearUserNodeData(_ref9) {
1553
1370
  data: params
1554
1371
  });
1555
1372
  }
1556
- function filesListInfo(_ref10) {
1557
- var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1373
+ function filesListInfo(_ref0) {
1374
+ var params = _extends({}, (_objectDestructuringEmpty(_ref0), _ref0));
1558
1375
  return FUtil.Request({
1559
1376
  method: 'GET',
1560
1377
  url: "/v2/storages/files/list/info",
1561
1378
  params: params
1562
1379
  });
1563
1380
  }
1564
- function filesInfo(_ref11) {
1565
- var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1381
+ function filesInfo(_ref1) {
1382
+ var params = _extends({}, (_objectDestructuringEmpty(_ref1), _ref1));
1566
1383
  return FUtil.Request({
1567
1384
  method: 'GET',
1568
1385
  url: "/v2/storages/files/info",
@@ -1659,6 +1476,8 @@ var _excluded$3 = ["resourceIdOrName"],
1659
1476
  _excluded7$2 = ["fileSha1"],
1660
1477
  _excluded8$1 = ["fileSha1"],
1661
1478
  _excluded9$1 = ["resourceId"],
1479
+ _excluded0$1 = ["resourceId"],
1480
+ _excluded1$1 = ["resourceId"],
1662
1481
  _excluded10$1 = ["resourceId"],
1663
1482
  _excluded11$1 = ["resourceId"],
1664
1483
  _excluded12$1 = ["resourceId"],
@@ -1667,16 +1486,14 @@ var _excluded$3 = ["resourceIdOrName"],
1667
1486
  _excluded15$1 = ["resourceId"],
1668
1487
  _excluded16$1 = ["resourceId"],
1669
1488
  _excluded17$1 = ["resourceId"],
1670
- _excluded18$1 = ["resourceId"],
1671
- _excluded19$1 = ["resourceId"],
1489
+ _excluded18 = ["resourceId"],
1490
+ _excluded19 = ["resourceId"],
1672
1491
  _excluded20 = ["resourceId"],
1673
1492
  _excluded21 = ["resourceId"],
1674
1493
  _excluded22 = ["resourceId"],
1675
- _excluded23 = ["resourceId"],
1494
+ _excluded23 = ["resourceId", "itemId"],
1676
1495
  _excluded24 = ["resourceId"],
1677
- _excluded25 = ["resourceId", "itemId"],
1678
- _excluded26 = ["resourceId"],
1679
- _excluded27 = ["resourceId"];
1496
+ _excluded25 = ["resourceId"];
1680
1497
  function create$1(params) {
1681
1498
  return FUtil.Request({
1682
1499
  method: 'POST',
@@ -1846,8 +1663,8 @@ function lookDraft(params) {
1846
1663
  params: params
1847
1664
  });
1848
1665
  }
1849
- function deleteResourceDraft(_ref10) {
1850
- var resourceId = _ref10.resourceId;
1666
+ function deleteResourceDraft(_ref0) {
1667
+ var resourceId = _ref0.resourceId;
1851
1668
  // return FUtil.Axios.post(`/v2/resources/${params.resourceId}/versions/drafts`, params);
1852
1669
  return FUtil.Request({
1853
1670
  method: 'DELETE',
@@ -1870,9 +1687,9 @@ function resourcesDownload(params) {
1870
1687
  // responseType: 'arraybuffer',
1871
1688
  // });
1872
1689
  }
1873
- function batchGetCoverageVersions(_ref11) {
1874
- var resourceId = _ref11.resourceId,
1875
- params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1690
+ function batchGetCoverageVersions(_ref1) {
1691
+ var resourceId = _ref1.resourceId,
1692
+ params = _objectWithoutPropertiesLoose(_ref1, _excluded9$1);
1876
1693
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
1877
1694
  // params,
1878
1695
  // });
@@ -1889,9 +1706,9 @@ function resolveResources(params) {
1889
1706
  url: "/v2/resources/" + params.resourceId + "/resolveResources"
1890
1707
  });
1891
1708
  }
1892
- function batchSetContracts(_ref12) {
1893
- var resourceId = _ref12.resourceId,
1894
- params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1709
+ function batchSetContracts(_ref10) {
1710
+ var resourceId = _ref10.resourceId,
1711
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded0$1);
1895
1712
  // return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
1896
1713
  return FUtil.Request({
1897
1714
  method: 'PUT',
@@ -1899,9 +1716,9 @@ function batchSetContracts(_ref12) {
1899
1716
  data: params
1900
1717
  });
1901
1718
  }
1902
- function cycleDependencyCheck$1(_ref13) {
1903
- var resourceId = _ref13.resourceId,
1904
- params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1719
+ function cycleDependencyCheck$1(_ref11) {
1720
+ var resourceId = _ref11.resourceId,
1721
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded1$1);
1905
1722
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
1906
1723
  return FUtil.Request({
1907
1724
  method: 'POST',
@@ -1909,9 +1726,9 @@ function cycleDependencyCheck$1(_ref13) {
1909
1726
  data: params
1910
1727
  });
1911
1728
  }
1912
- function relationTree$1(_ref14) {
1913
- var resourceId = _ref14.resourceId,
1914
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12$1);
1729
+ function relationTree$1(_ref12) {
1730
+ var resourceId = _ref12.resourceId,
1731
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1915
1732
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1916
1733
  // params,
1917
1734
  // });
@@ -1921,41 +1738,41 @@ function relationTree$1(_ref14) {
1921
1738
  params: params
1922
1739
  });
1923
1740
  }
1924
- function relationTreeAuth(_ref15) {
1925
- var resourceId = _ref15.resourceId,
1926
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13$1);
1741
+ function relationTreeAuth(_ref13) {
1742
+ var resourceId = _ref13.resourceId,
1743
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1927
1744
  return FUtil.Request({
1928
1745
  method: 'GET',
1929
1746
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
1930
1747
  params: params
1931
1748
  });
1932
1749
  }
1933
- function resourcesCount(_ref16) {
1934
- var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1750
+ function resourcesCount(_ref14) {
1751
+ var params = _extends({}, (_objectDestructuringEmpty(_ref14), _ref14));
1935
1752
  return FUtil.Request({
1936
1753
  method: 'GET',
1937
1754
  url: "/v2/resources/count",
1938
1755
  params: params
1939
1756
  });
1940
1757
  }
1941
- function batchAuth$1(_ref17) {
1942
- var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1758
+ function batchAuth$1(_ref15) {
1759
+ var params = _extends({}, (_objectDestructuringEmpty(_ref15), _ref15));
1943
1760
  return FUtil.Request({
1944
1761
  method: 'GET',
1945
1762
  url: "/v2/auths/resources/batchAuth/results",
1946
1763
  params: params
1947
1764
  });
1948
1765
  }
1949
- function resourcesRecommend(_ref18) {
1950
- var params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1766
+ function resourcesRecommend(_ref16) {
1767
+ var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1951
1768
  return FUtil.Request({
1952
1769
  method: 'GET',
1953
1770
  url: "/v2/resources/recommend",
1954
1771
  params: params
1955
1772
  });
1956
1773
  }
1957
- function availableTags(_ref19) {
1958
- var params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1774
+ function availableTags(_ref17) {
1775
+ var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1959
1776
  return FUtil.Request({
1960
1777
  method: 'GET',
1961
1778
  url: "/v2/resources/tags/availableTags",
@@ -1963,32 +1780,32 @@ function availableTags(_ref19) {
1963
1780
  });
1964
1781
  }
1965
1782
  function resourceTypes$1(_temp) {
1966
- var _ref20 = _temp === void 0 ? {} : _temp,
1967
- params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1783
+ var _ref18 = _temp === void 0 ? {} : _temp,
1784
+ params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1968
1785
  return FUtil.Request({
1969
1786
  method: 'GET',
1970
1787
  url: "/v2/resources/types/listSimpleByGroup",
1971
1788
  params: params
1972
1789
  });
1973
1790
  }
1974
- function ListSimpleByParentCode(_ref21) {
1975
- var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1791
+ function ListSimpleByParentCode(_ref19) {
1792
+ var params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1976
1793
  return FUtil.Request({
1977
1794
  method: 'GET',
1978
1795
  url: "/v2/resources/types/listSimpleByParentCode",
1979
1796
  params: params
1980
1797
  });
1981
1798
  }
1982
- function getResourceTypeInfoByCode(_ref22) {
1983
- var params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
1799
+ function getResourceTypeInfoByCode(_ref20) {
1800
+ var params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1984
1801
  return FUtil.Request({
1985
1802
  method: 'GET',
1986
1803
  url: "/v2/resources/types/getInfoByCode",
1987
1804
  params: params
1988
1805
  });
1989
1806
  }
1990
- function getResourceAttrListSimple(_ref23) {
1991
- var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1807
+ function getResourceAttrListSimple(_ref21) {
1808
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1992
1809
  return FUtil.Request({
1993
1810
  method: 'GET',
1994
1811
  url: "/v2/resources/attrs/listSimple",
@@ -1996,24 +1813,24 @@ function getResourceAttrListSimple(_ref23) {
1996
1813
  });
1997
1814
  }
1998
1815
  function listSimple4Recently(_temp2) {
1999
- var _ref24 = _temp2 === void 0 ? {} : _temp2,
2000
- params = _extends({}, (_objectDestructuringEmpty(_ref24), _ref24));
1816
+ var _ref22 = _temp2 === void 0 ? {} : _temp2,
1817
+ params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
2001
1818
  return FUtil.Request({
2002
1819
  method: 'GET',
2003
1820
  url: "/v2/resources/types/listSimple4Recently",
2004
1821
  params: params
2005
1822
  });
2006
1823
  }
2007
- function getAttrsInfoByKey(_ref25) {
2008
- var params = _extends({}, (_objectDestructuringEmpty(_ref25), _ref25));
1824
+ function getAttrsInfoByKey(_ref23) {
1825
+ var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
2009
1826
  return FUtil.Request({
2010
1827
  method: 'GET',
2011
1828
  url: "/v2/resources/attrs/getInfoByKey",
2012
1829
  params: params
2013
1830
  });
2014
1831
  }
2015
- function generateResourceNames(_ref26) {
2016
- var resourceNames = _ref26.resourceNames;
1832
+ function generateResourceNames(_ref24) {
1833
+ var resourceNames = _ref24.resourceNames;
2017
1834
  return FUtil.Request({
2018
1835
  method: 'POST',
2019
1836
  url: "/v2/resources/generateResourceNames",
@@ -2022,165 +1839,165 @@ function generateResourceNames(_ref26) {
2022
1839
  }
2023
1840
  });
2024
1841
  }
2025
- function updateCollection(_ref27) {
2026
- var resourceId = _ref27.resourceId,
2027
- params = _objectWithoutPropertiesLoose(_ref27, _excluded14$1);
1842
+ function updateCollection(_ref25) {
1843
+ var resourceId = _ref25.resourceId,
1844
+ params = _objectWithoutPropertiesLoose(_ref25, _excluded12$1);
2028
1845
  return FUtil.Request({
2029
1846
  method: 'PUT',
2030
1847
  url: "/v2/resources/catalogue/" + resourceId,
2031
1848
  data: params
2032
1849
  });
2033
1850
  }
2034
- function deleteCollectionUnitResource(_ref28) {
2035
- var resourceId = _ref28.resourceId,
2036
- removeCollectionItemIds = _ref28.removeCollectionItemIds;
1851
+ function deleteCollectionUnitResource(_ref26) {
1852
+ var resourceId = _ref26.resourceId,
1853
+ removeCollectionItemIds = _ref26.removeCollectionItemIds;
2037
1854
  return FUtil.Request({
2038
1855
  method: 'DELETE',
2039
1856
  url: "/v2/resources/catalogue/" + resourceId + "?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
2040
1857
  });
2041
1858
  }
2042
- function getCollectionItems(_ref29) {
2043
- var resourceId = _ref29.resourceId,
2044
- params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
1859
+ function getCollectionItems(_ref27) {
1860
+ var resourceId = _ref27.resourceId,
1861
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded13$1);
2045
1862
  return FUtil.Request({
2046
1863
  method: 'GET',
2047
1864
  url: "/v2/resources/catalogue/" + resourceId + "/items",
2048
1865
  params: params
2049
1866
  });
2050
1867
  }
2051
- function getCollectionItems_Draft(_ref30) {
2052
- var resourceId = _ref30.resourceId,
2053
- params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
1868
+ function getCollectionItems_Draft(_ref28) {
1869
+ var resourceId = _ref28.resourceId,
1870
+ params = _objectWithoutPropertiesLoose(_ref28, _excluded14$1);
2054
1871
  return FUtil.Request({
2055
1872
  method: 'GET',
2056
1873
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2057
1874
  params: params
2058
1875
  });
2059
1876
  }
2060
- function setCollectionItemSort(_ref31) {
2061
- var resourceId = _ref31.resourceId,
2062
- params = _objectWithoutPropertiesLoose(_ref31, _excluded17$1);
1877
+ function setCollectionItemSort(_ref29) {
1878
+ var resourceId = _ref29.resourceId,
1879
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
2063
1880
  return FUtil.Request({
2064
1881
  method: 'PUT',
2065
1882
  url: "/v2/resources/catalogue/" + resourceId + "/manualSort",
2066
1883
  data: params
2067
1884
  });
2068
1885
  }
2069
- function reorderCollectionItemsSort(_ref32) {
2070
- var resourceId = _ref32.resourceId,
2071
- params = _objectWithoutPropertiesLoose(_ref32, _excluded18$1);
1886
+ function reorderCollectionItemsSort(_ref30) {
1887
+ var resourceId = _ref30.resourceId,
1888
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
2072
1889
  return FUtil.Request({
2073
1890
  method: 'PUT',
2074
1891
  url: "/v2/resources/catalogue/" + resourceId + "/reorder",
2075
1892
  data: params
2076
1893
  });
2077
1894
  }
2078
- function checkExistCollectionItems(_ref33) {
2079
- var resourceId = _ref33.resourceId,
2080
- params = _objectWithoutPropertiesLoose(_ref33, _excluded19$1);
1895
+ function checkExistCollectionItems(_ref31) {
1896
+ var resourceId = _ref31.resourceId,
1897
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded17$1);
2081
1898
  return FUtil.Request({
2082
1899
  method: 'GET',
2083
1900
  url: "/v2/resources/catalogue/" + resourceId + "/items/checkExists",
2084
1901
  params: params
2085
1902
  });
2086
1903
  }
2087
- function getCollectionItemsAuth(_ref34) {
2088
- var resourceId = _ref34.resourceId,
2089
- params = _objectWithoutPropertiesLoose(_ref34, _excluded20);
1904
+ function getCollectionItemsAuth(_ref32) {
1905
+ var resourceId = _ref32.resourceId,
1906
+ params = _objectWithoutPropertiesLoose(_ref32, _excluded18);
2090
1907
  return FUtil.Request({
2091
1908
  method: 'GET',
2092
1909
  url: "/v2/auths/resources/" + resourceId + "/items/batchAuth",
2093
1910
  params: params
2094
1911
  });
2095
1912
  }
2096
- function batchResourceItems(_ref35) {
2097
- var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
1913
+ function batchResourceItems(_ref33) {
1914
+ var params = _extends({}, (_objectDestructuringEmpty(_ref33), _ref33));
2098
1915
  return FUtil.Request({
2099
1916
  method: 'GET',
2100
1917
  url: "/v2/resources/catalogue/items/batch/list",
2101
1918
  params: params
2102
1919
  });
2103
1920
  }
2104
- function batchResourceItems_Draft(_ref36) {
2105
- var params = _extends({}, (_objectDestructuringEmpty(_ref36), _ref36));
1921
+ function batchResourceItems_Draft(_ref34) {
1922
+ var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
2106
1923
  return FUtil.Request({
2107
1924
  method: 'GET',
2108
1925
  url: "/v2/resources/catalogues/drafts/items/batch/list",
2109
1926
  params: params
2110
1927
  });
2111
1928
  }
2112
- function getCollectionUpdateLogs(_ref37) {
2113
- var resourceId = _ref37.resourceId,
2114
- params = _objectWithoutPropertiesLoose(_ref37, _excluded21);
1929
+ function getCollectionUpdateLogs(_ref35) {
1930
+ var resourceId = _ref35.resourceId,
1931
+ params = _objectWithoutPropertiesLoose(_ref35, _excluded19);
2115
1932
  return FUtil.Request({
2116
1933
  method: 'GET',
2117
1934
  url: "/v2/resources/catalogue/" + resourceId + "/updateLogs",
2118
1935
  params: params
2119
1936
  });
2120
1937
  }
2121
- function getCollectionCollectRules(_ref38) {
2122
- var resourceId = _ref38.resourceId;
1938
+ function getCollectionCollectRules(_ref36) {
1939
+ var resourceId = _ref36.resourceId;
2123
1940
  return FUtil.Request({
2124
1941
  method: 'GET',
2125
1942
  url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules"
2126
1943
  });
2127
1944
  }
2128
- function setCollectRules(_ref39) {
2129
- var resourceId = _ref39.resourceId,
2130
- params = _objectWithoutPropertiesLoose(_ref39, _excluded22);
1945
+ function setCollectRules(_ref37) {
1946
+ var resourceId = _ref37.resourceId,
1947
+ params = _objectWithoutPropertiesLoose(_ref37, _excluded20);
2131
1948
  return FUtil.Request({
2132
1949
  method: 'POST',
2133
1950
  url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules",
2134
1951
  data: params
2135
1952
  });
2136
1953
  }
2137
- function setItemsTitle(_ref40) {
2138
- var resourceId = _ref40.resourceId,
2139
- data = _ref40.data;
1954
+ function setItemsTitle(_ref38) {
1955
+ var resourceId = _ref38.resourceId,
1956
+ data = _ref38.data;
2140
1957
  return FUtil.Request({
2141
1958
  method: 'PUT',
2142
1959
  url: "/v2/resources/catalogue/" + resourceId + "/items",
2143
1960
  data: data
2144
1961
  });
2145
1962
  }
2146
- function deleteCollectionItems_Draft(_ref41) {
2147
- var resourceId = _ref41.resourceId,
2148
- removeCollectionItemIds = _ref41.removeCollectionItemIds;
1963
+ function deleteCollectionItems_Draft(_ref39) {
1964
+ var resourceId = _ref39.resourceId,
1965
+ removeCollectionItemIds = _ref39.removeCollectionItemIds;
2149
1966
  return FUtil.Request({
2150
1967
  method: 'DELETE',
2151
1968
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
2152
1969
  });
2153
1970
  }
2154
- function setCollectionItemsSortID_Draft(_ref42) {
2155
- var resourceId = _ref42.resourceId,
2156
- data = _ref42.data;
1971
+ function setCollectionItemsSortID_Draft(_ref40) {
1972
+ var resourceId = _ref40.resourceId,
1973
+ data = _ref40.data;
2157
1974
  return FUtil.Request({
2158
1975
  method: 'PUT',
2159
1976
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/manualSort",
2160
1977
  data: data
2161
1978
  });
2162
1979
  }
2163
- function reorderCollectionItems_Draft(_ref43) {
2164
- var resourceId = _ref43.resourceId,
2165
- params = _objectWithoutPropertiesLoose(_ref43, _excluded23);
1980
+ function reorderCollectionItems_Draft(_ref41) {
1981
+ var resourceId = _ref41.resourceId,
1982
+ params = _objectWithoutPropertiesLoose(_ref41, _excluded21);
2166
1983
  return FUtil.Request({
2167
1984
  method: 'PUT',
2168
1985
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/reorder",
2169
1986
  data: params
2170
1987
  });
2171
1988
  }
2172
- function resourceIsExistInItems_Draft(_ref44) {
2173
- var resourceId = _ref44.resourceId,
2174
- params = _objectWithoutPropertiesLoose(_ref44, _excluded24);
1989
+ function resourceIsExistInItems_Draft(_ref42) {
1990
+ var resourceId = _ref42.resourceId,
1991
+ params = _objectWithoutPropertiesLoose(_ref42, _excluded22);
2175
1992
  return FUtil.Request({
2176
1993
  method: 'GET',
2177
1994
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/checkExists",
2178
1995
  params: params
2179
1996
  });
2180
1997
  }
2181
- function updateCollectionItemsInfo_Draft(_ref45) {
2182
- var resourceId = _ref45.resourceId,
2183
- data = _ref45.data;
1998
+ function updateCollectionItemsInfo_Draft(_ref43) {
1999
+ var resourceId = _ref43.resourceId,
2000
+ data = _ref43.data;
2184
2001
  return FUtil.Request({
2185
2002
  method: 'PUT',
2186
2003
  // url: `/v2/resources/catalogue/${resourceId}/items`,
@@ -2188,10 +2005,10 @@ function updateCollectionItemsInfo_Draft(_ref45) {
2188
2005
  data: data
2189
2006
  });
2190
2007
  }
2191
- function updateCollectionItemAuthorization_Draft(_ref46) {
2192
- var resourceId = _ref46.resourceId,
2193
- itemId = _ref46.itemId,
2194
- data = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2008
+ function updateCollectionItemAuthorization_Draft(_ref44) {
2009
+ var resourceId = _ref44.resourceId,
2010
+ itemId = _ref44.itemId,
2011
+ data = _objectWithoutPropertiesLoose(_ref44, _excluded23);
2195
2012
  return FUtil.Request({
2196
2013
  method: 'PUT',
2197
2014
  // url: `/v2/resources/catalogues/${resourceId}/items/${itemId}`,
@@ -2199,18 +2016,18 @@ function updateCollectionItemAuthorization_Draft(_ref46) {
2199
2016
  data: data
2200
2017
  });
2201
2018
  }
2202
- function addResourceItems_Draft(_ref47) {
2203
- var resourceId = _ref47.resourceId,
2204
- params = _objectWithoutPropertiesLoose(_ref47, _excluded26);
2019
+ function addResourceItems_Draft(_ref45) {
2020
+ var resourceId = _ref45.resourceId,
2021
+ params = _objectWithoutPropertiesLoose(_ref45, _excluded24);
2205
2022
  return FUtil.Request({
2206
2023
  method: 'POST',
2207
2024
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2208
2025
  data: params
2209
2026
  });
2210
2027
  }
2211
- function getCollectionItemsAuth_Draft(_ref48) {
2212
- var resourceId = _ref48.resourceId,
2213
- params = _objectWithoutPropertiesLoose(_ref48, _excluded27);
2028
+ function getCollectionItemsAuth_Draft(_ref46) {
2029
+ var resourceId = _ref46.resourceId,
2030
+ params = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2214
2031
  return FUtil.Request({
2215
2032
  method: 'GET',
2216
2033
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/batchAuth",
@@ -2506,8 +2323,8 @@ var _excluded$5 = ["nodeId"],
2506
2323
  _excluded7$3 = ["testResourceId"],
2507
2324
  _excluded8$2 = ["nodeId"],
2508
2325
  _excluded9$2 = ["nodeId"],
2509
- _excluded10$2 = ["nodeId"],
2510
- _excluded11$2 = ["nodeId"];
2326
+ _excluded0$2 = ["nodeId"],
2327
+ _excluded1$2 = ["nodeId"];
2511
2328
  function testResources(_ref) {
2512
2329
  var nodeId = _ref.nodeId,
2513
2330
  params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
@@ -2589,25 +2406,25 @@ function testResourcesDependencyTree(_ref9) {
2589
2406
  url: "/v2/testNodes/testResources/" + testResourceId + "/dependencyTree"
2590
2407
  });
2591
2408
  }
2592
- function testResourcesAuthTree(_ref10) {
2593
- var testResourceId = _ref10.testResourceId;
2409
+ function testResourcesAuthTree(_ref0) {
2410
+ var testResourceId = _ref0.testResourceId;
2594
2411
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}`);
2595
2412
  return FUtil.Request({
2596
2413
  method: 'GET',
2597
2414
  url: "/v2/testNodes/testResources/" + testResourceId + "/authTree"
2598
2415
  });
2599
2416
  }
2600
- function testResourceDetails(_ref11) {
2601
- var testResourceId = _ref11.testResourceId;
2417
+ function testResourceDetails(_ref1) {
2418
+ var testResourceId = _ref1.testResourceId;
2602
2419
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}`);
2603
2420
  return FUtil.Request({
2604
2421
  method: 'GET',
2605
2422
  url: "/v2/testNodes/testResources/" + testResourceId
2606
2423
  });
2607
2424
  }
2608
- function searchTestResourcesByDependency(_ref12) {
2609
- var nodeId = _ref12.nodeId,
2610
- params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2425
+ function searchTestResourcesByDependency(_ref10) {
2426
+ var nodeId = _ref10.nodeId,
2427
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded8$2);
2611
2428
  // return FUtil.Axios.get(`/v2/testNodes/${nodeId}/testResources/searchByDependency`, {
2612
2429
  // params,
2613
2430
  // });
@@ -2617,27 +2434,27 @@ function searchTestResourcesByDependency(_ref12) {
2617
2434
  params: params
2618
2435
  });
2619
2436
  }
2620
- function rulesRematch(_ref13) {
2621
- var nodeId = _ref13.nodeId,
2622
- params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2437
+ function rulesRematch(_ref11) {
2438
+ var nodeId = _ref11.nodeId,
2439
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded9$2);
2623
2440
  return FUtil.Request({
2624
2441
  method: 'POST',
2625
2442
  url: "/v2/testNodes/" + nodeId + "/rules/rematch",
2626
2443
  data: params
2627
2444
  });
2628
2445
  }
2629
- function rulesPreExecution(_ref14) {
2630
- var nodeId = _ref14.nodeId,
2631
- params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2446
+ function rulesPreExecution(_ref12) {
2447
+ var nodeId = _ref12.nodeId,
2448
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded0$2);
2632
2449
  return FUtil.Request({
2633
2450
  method: 'POST',
2634
2451
  url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
2635
2452
  data: params
2636
2453
  });
2637
2454
  }
2638
- function batchGetAuths(_ref15) {
2639
- var nodeId = _ref15.nodeId,
2640
- params = _objectWithoutPropertiesLoose(_ref15, _excluded11$2);
2455
+ function batchGetAuths(_ref13) {
2456
+ var nodeId = _ref13.nodeId,
2457
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded1$2);
2641
2458
  return FUtil.Request({
2642
2459
  method: 'GET',
2643
2460
  url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
@@ -3202,6 +3019,13 @@ function policyTemplates(params) {
3202
3019
  params: params
3203
3020
  });
3204
3021
  }
3022
+ function policyReCompile(data) {
3023
+ return FUtil.Request({
3024
+ method: 'POST',
3025
+ url: "/v2/translate/reCompile",
3026
+ data: data
3027
+ });
3028
+ }
3205
3029
  function policyTranslation(_ref) {
3206
3030
  var contract = _ref.contract;
3207
3031
  return FUtil.Request({
@@ -3225,6 +3049,7 @@ var Policy = {
3225
3049
  policies: policies,
3226
3050
  policiesList: policiesList,
3227
3051
  policyTemplates: policyTemplates,
3052
+ policyReCompile: policyReCompile,
3228
3053
  policyTranslation: policyTranslation,
3229
3054
  policyTransferTranslation: policyTransferTranslation
3230
3055
  };
@@ -3239,38 +3064,35 @@ function getSHA1Hash(file) {
3239
3064
  return new Promise(function (resolve) {
3240
3065
  var reader = new FileReader();
3241
3066
  reader.readAsArrayBuffer(file);
3242
- reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3067
+ reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3243
3068
  var sha1;
3244
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3245
- while (1) switch (_context.prev = _context.next) {
3069
+ return _regenerator().w(function (_context) {
3070
+ while (1) switch (_context.n) {
3246
3071
  case 0:
3247
3072
  if (reader.result) {
3248
- _context.next = 3;
3073
+ _context.n = 1;
3249
3074
  break;
3250
3075
  }
3251
3076
  resolve('');
3252
- return _context.abrupt("return", '');
3253
- case 3:
3077
+ return _context.a(2, '');
3078
+ case 1:
3254
3079
  if (!(typeof reader.result === 'string')) {
3255
- _context.next = 6;
3080
+ _context.n = 2;
3256
3081
  break;
3257
3082
  }
3258
3083
  resolve('');
3259
- return _context.abrupt("return", '');
3260
- case 6:
3261
- _context.next = 8;
3084
+ return _context.a(2, '');
3085
+ case 2:
3086
+ _context.n = 3;
3262
3087
  return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3263
3088
  return Array.from(new Uint8Array(a)).map(function (a) {
3264
3089
  return a.toString(16).padStart(2, '0');
3265
3090
  }).join('');
3266
3091
  });
3267
- case 8:
3268
- sha1 = _context.sent;
3092
+ case 3:
3093
+ sha1 = _context.v;
3269
3094
  resolve(sha1);
3270
- return _context.abrupt("return", '');
3271
- case 11:
3272
- case "end":
3273
- return _context.stop();
3095
+ return _context.a(2, '');
3274
3096
  }
3275
3097
  }, _callee);
3276
3098
  }));
@@ -3361,10 +3183,10 @@ function getFilesSha1Info(_x, _x2) {
3361
3183
  return _getFilesSha1Info.apply(this, arguments);
3362
3184
  }
3363
3185
  function _getFilesSha1Info() {
3364
- _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3186
+ _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref, cdPartially) {
3365
3187
  var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
3366
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3367
- while (1) switch (_context.prev = _context.next) {
3188
+ return _regenerator().w(function (_context) {
3189
+ while (1) switch (_context.n) {
3368
3190
  case 0:
3369
3191
  sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3370
3192
  if (cdPartially === void 0) {
@@ -3373,31 +3195,31 @@ function _getFilesSha1Info() {
3373
3195
  };
3374
3196
  }
3375
3197
  if (!(sha1.length === 0)) {
3376
- _context.next = 4;
3198
+ _context.n = 1;
3377
3199
  break;
3378
3200
  }
3379
- return _context.abrupt("return", {
3201
+ return _context.a(2, {
3380
3202
  error: '',
3381
3203
  result: []
3382
3204
  });
3383
- case 4:
3205
+ case 1:
3384
3206
  delay = 500;
3385
3207
  needHandleSha1 = [].concat(sha1);
3386
3208
  allData = [];
3387
- case 7:
3388
- _context.next = 10;
3209
+ case 2:
3210
+ _context.n = 3;
3389
3211
  return filesListInfo({
3390
3212
  sha1: needHandleSha1.join(','),
3391
3213
  resourceTypeCode: resourceTypeCode
3392
3214
  });
3393
- case 10:
3394
- _yield$Storage$filesL = _context.sent;
3215
+ case 3:
3216
+ _yield$Storage$filesL = _context.v;
3395
3217
  ret = _yield$Storage$filesL.ret;
3396
3218
  errCode = _yield$Storage$filesL.errCode;
3397
3219
  data = _yield$Storage$filesL.data;
3398
3220
  msg = _yield$Storage$filesL.msg;
3399
3221
  if (!(ret !== 0 || errCode !== 0)) {
3400
- _context.next = 18;
3222
+ _context.n = 4;
3401
3223
  break;
3402
3224
  }
3403
3225
  console.log({
@@ -3406,11 +3228,11 @@ function _getFilesSha1Info() {
3406
3228
  data: data,
3407
3229
  msg: msg
3408
3230
  }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3409
- return _context.abrupt("return", {
3231
+ return _context.a(2, {
3410
3232
  error: msg,
3411
3233
  result: allData
3412
3234
  });
3413
- case 18:
3235
+ case 4:
3414
3236
  needHandleSha1 = data.filter(function (d) {
3415
3237
  return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3416
3238
  }).map(function (d) {
@@ -3437,24 +3259,21 @@ function _getFilesSha1Info() {
3437
3259
  cdPartially && cdPartially(finishedInfo);
3438
3260
  allData = [].concat(allData, finishedInfo);
3439
3261
  if (!(needHandleSha1.length === 0)) {
3440
- _context.next = 24;
3262
+ _context.n = 5;
3441
3263
  break;
3442
3264
  }
3443
- return _context.abrupt("break", 28);
3444
- case 24:
3445
- _context.next = 26;
3265
+ return _context.a(3, 7);
3266
+ case 5:
3267
+ _context.n = 6;
3446
3268
  return promiseSleep(delay);
3447
- case 26:
3448
- _context.next = 7;
3269
+ case 6:
3270
+ _context.n = 2;
3449
3271
  break;
3450
- case 28:
3451
- return _context.abrupt("return", {
3272
+ case 7:
3273
+ return _context.a(2, {
3452
3274
  error: '',
3453
3275
  result: allData
3454
3276
  });
3455
- case 29:
3456
- case "end":
3457
- return _context.stop();
3458
3277
  }
3459
3278
  }, _callee);
3460
3279
  }));
@@ -3522,6 +3341,55 @@ var ResourceType = {
3522
3341
  getInfoByCodeOrName: getInfoByCodeOrName
3523
3342
  };
3524
3343
 
3344
+ var _excluded$a = ["accountId"];
3345
+ function uploadIDCard(params, config) {
3346
+ var formData = new FormData();
3347
+ for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
3348
+ var _Object$entries$_i = _Object$entries[_i],
3349
+ key = _Object$entries$_i[0],
3350
+ value = _Object$entries$_i[1];
3351
+ if (value) {
3352
+ formData.append(key, value);
3353
+ }
3354
+ }
3355
+ return FUtil.Request(_extends({
3356
+ method: 'POST',
3357
+ url: "/v3/transactions/accounts/idCardUploadAndOcr",
3358
+ data: formData
3359
+ }, config));
3360
+ }
3361
+ function openFinancialAccount(params, config) {
3362
+ return FUtil.Request(_extends({
3363
+ method: 'POST',
3364
+ url: "/v3/transactions/accounts",
3365
+ data: params
3366
+ }, config));
3367
+ }
3368
+ function bindWithdrawCard(_ref, config) {
3369
+ var accountId = _ref.accountId,
3370
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$a);
3371
+ return FUtil.Request(_extends({
3372
+ method: 'POST',
3373
+ url: "/v3/transactions/accounts/" + accountId + "/bindCashCard",
3374
+ data: params
3375
+ }, config));
3376
+ }
3377
+ function queryFinancialAccountInfo(params, config) {
3378
+ return FUtil.Request(_extends({
3379
+ method: 'GET',
3380
+ url: "/v3/transactions/accounts/query",
3381
+ params: params
3382
+ }, config));
3383
+ }
3384
+
3385
+ var Payment = {
3386
+ __proto__: null,
3387
+ uploadIDCard: uploadIDCard,
3388
+ openFinancialAccount: openFinancialAccount,
3389
+ bindWithdrawCard: bindWithdrawCard,
3390
+ queryFinancialAccountInfo: queryFinancialAccountInfo
3391
+ };
3392
+
3525
3393
  var FServiceAPI = {
3526
3394
  Node: Node,
3527
3395
  Exhibit: Exhibit,
@@ -3541,7 +3409,8 @@ var FServiceAPI = {
3541
3409
  Policy: Policy,
3542
3410
  recombination: recombination,
3543
3411
  Operation: Operation,
3544
- ResourceType: ResourceType
3412
+ ResourceType: ResourceType,
3413
+ Payment: Payment
3545
3414
  };
3546
3415
 
3547
3416
  // import from '../service-API';
@@ -3644,39 +3513,36 @@ function request(_x, _x2) {
3644
3513
  return _request.apply(this, arguments);
3645
3514
  }
3646
3515
  function _request() {
3647
- _request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3516
+ _request = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(config, _temp) {
3648
3517
  var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
3649
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3650
- while (1) switch (_context.prev = _context.next) {
3518
+ return _regenerator().w(function (_context) {
3519
+ while (1) switch (_context.n) {
3651
3520
  case 0:
3652
3521
  _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;
3653
- _context.next = 3;
3522
+ _context.n = 1;
3654
3523
  return axios.request(config);
3655
- case 3:
3656
- result = _context.sent;
3524
+ case 1:
3525
+ result = _context.v;
3657
3526
  if (!(result.errCode === 30 && !noRedirect)) {
3658
- _context.next = 10;
3527
+ _context.n = 3;
3659
3528
  break;
3660
3529
  }
3661
- _context.next = 7;
3530
+ _context.n = 2;
3662
3531
  return FServiceAPI.User.logout();
3663
- case 7:
3532
+ case 2:
3664
3533
  window.location.replace("" + completeUrlByDomain('user') + login({
3665
3534
  goTo: window.location.href
3666
3535
  }));
3667
- _context.next = 11;
3536
+ _context.n = 4;
3668
3537
  break;
3669
- case 10:
3538
+ case 3:
3670
3539
  if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3671
3540
  window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3672
3541
  goTo: window.location.href
3673
3542
  }));
3674
3543
  }
3675
- case 11:
3676
- return _context.abrupt("return", result);
3677
- case 12:
3678
- case "end":
3679
- return _context.stop();
3544
+ case 4:
3545
+ return _context.a(2, result);
3680
3546
  }
3681
3547
  }, _callee);
3682
3548
  }));
@@ -3741,11 +3607,11 @@ var I18nNext = /*#__PURE__*/function () {
3741
3607
  }
3742
3608
  var _proto = I18nNext.prototype;
3743
3609
  _proto.ready = /*#__PURE__*/function () {
3744
- var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3610
+ var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
3745
3611
  var _this = this;
3746
3612
  var exc, handleTasks, promise;
3747
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3748
- while (1) switch (_context2.prev = _context2.next) {
3613
+ return _regenerator().w(function (_context2) {
3614
+ while (1) switch (_context2.n) {
3749
3615
  case 0:
3750
3616
  exc = function exc() {
3751
3617
  while (_this._taskQueue.length > 0) {
@@ -3754,33 +3620,32 @@ var I18nNext = /*#__PURE__*/function () {
3754
3620
  }
3755
3621
  };
3756
3622
  handleTasks = /*#__PURE__*/function () {
3757
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3758
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3759
- while (1) switch (_context.prev = _context.next) {
3623
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3624
+ return _regenerator().w(function (_context) {
3625
+ while (1) switch (_context.n) {
3760
3626
  case 0:
3761
3627
  if (!(_this._loadingData === 'End')) {
3762
- _context.next = 3;
3628
+ _context.n = 1;
3763
3629
  break;
3764
3630
  }
3765
3631
  exc();
3766
- return _context.abrupt("return");
3767
- case 3:
3632
+ return _context.a(2);
3633
+ case 1:
3768
3634
  if (!(_this._loadingData === 'Start')) {
3769
- _context.next = 5;
3635
+ _context.n = 2;
3770
3636
  break;
3771
3637
  }
3772
- return _context.abrupt("return");
3773
- case 5:
3638
+ return _context.a(2);
3639
+ case 2:
3774
3640
  // NO_START
3775
3641
  _this._loadingData = 'Start';
3776
- _context.next = 8;
3642
+ _context.n = 3;
3777
3643
  return _this._handleData();
3778
- case 8:
3644
+ case 3:
3779
3645
  // console.log('######');
3780
3646
  exc();
3781
- case 9:
3782
- case "end":
3783
- return _context.stop();
3647
+ case 4:
3648
+ return _context.a(2);
3784
3649
  }
3785
3650
  }, _callee);
3786
3651
  }));
@@ -3792,10 +3657,7 @@ var I18nNext = /*#__PURE__*/function () {
3792
3657
  _this._taskQueue.push(resolve);
3793
3658
  });
3794
3659
  handleTasks();
3795
- return _context2.abrupt("return", promise);
3796
- case 5:
3797
- case "end":
3798
- return _context2.stop();
3660
+ return _context2.a(2, promise);
3799
3661
  }
3800
3662
  }, _callee2);
3801
3663
  }));
@@ -3825,28 +3687,28 @@ var I18nNext = /*#__PURE__*/function () {
3825
3687
  return this._currentLanguage;
3826
3688
  };
3827
3689
  _proto._handleData = /*#__PURE__*/function () {
3828
- var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3690
+ var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
3829
3691
  var lng, resource, i18nextResources;
3830
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3831
- while (1) switch (_context3.prev = _context3.next) {
3692
+ return _regenerator().w(function (_context3) {
3693
+ while (1) switch (_context3.n) {
3832
3694
  case 0:
3833
3695
  lng = this._currentLanguage;
3834
3696
  resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3835
3697
  i18nextResources = resource ? JSON.parse(resource) : null;
3836
3698
  if (i18nextResources) {
3837
- _context3.next = 9;
3699
+ _context3.n = 2;
3838
3700
  break;
3839
3701
  }
3840
- _context3.next = 6;
3702
+ _context3.n = 1;
3841
3703
  return this._fetchData();
3842
- case 6:
3843
- i18nextResources = _context3.sent;
3844
- _context3.next = 10;
3704
+ case 1:
3705
+ i18nextResources = _context3.v;
3706
+ _context3.n = 3;
3845
3707
  break;
3846
- case 9:
3708
+ case 2:
3847
3709
  this._fetchData();
3848
- case 10:
3849
- _context3.next = 12;
3710
+ case 3:
3711
+ _context3.n = 4;
3850
3712
  return i18next.init({
3851
3713
  // the translations
3852
3714
  // (tip move them in a JSON file and import them,
@@ -3860,11 +3722,10 @@ var I18nNext = /*#__PURE__*/function () {
3860
3722
  suffix: '}'
3861
3723
  }
3862
3724
  });
3863
- case 12:
3725
+ case 4:
3864
3726
  this._loadingData = 'End';
3865
- case 13:
3866
- case "end":
3867
- return _context3.stop();
3727
+ case 5:
3728
+ return _context3.a(2);
3868
3729
  }
3869
3730
  }, _callee3, this);
3870
3731
  }));
@@ -3874,18 +3735,18 @@ var I18nNext = /*#__PURE__*/function () {
3874
3735
  return _handleData;
3875
3736
  }();
3876
3737
  _proto._fetchData = /*#__PURE__*/function () {
3877
- var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3738
+ var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
3878
3739
  var url, res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
3879
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3880
- while (1) switch (_context4.prev = _context4.next) {
3740
+ return _regenerator().w(function (_context4) {
3741
+ while (1) switch (_context4.n) {
3881
3742
  case 0:
3882
3743
  url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3883
- _context4.next = 3;
3744
+ _context4.n = 1;
3884
3745
  return axios.get(url + '?timestamp=' + Date.now(), {
3885
3746
  withCredentials: false
3886
3747
  });
3887
- case 3:
3888
- res = _context4.sent;
3748
+ case 1:
3749
+ res = _context4.v;
3889
3750
  // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3890
3751
  en_US = {};
3891
3752
  zh_CN = {};
@@ -3904,10 +3765,7 @@ var I18nNext = /*#__PURE__*/function () {
3904
3765
  }
3905
3766
  };
3906
3767
  window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result));
3907
- return _context4.abrupt("return", result);
3908
- case 10:
3909
- case "end":
3910
- return _context4.stop();
3768
+ return _context4.a(2, result);
3911
3769
  }
3912
3770
  }, _callee4);
3913
3771
  }));