@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.
@@ -218,311 +218,118 @@ function _objectWithoutPropertiesLoose(r, e) {
218
218
  if (null == r) return {};
219
219
  var t = {};
220
220
  for (var n in r) if ({}.hasOwnProperty.call(r, n)) {
221
- if (e.includes(n)) continue;
221
+ if (-1 !== e.indexOf(n)) continue;
222
222
  t[n] = r[n];
223
223
  }
224
224
  return t;
225
225
  }
226
- function _regeneratorRuntime() {
227
- _regeneratorRuntime = function () {
228
- return e;
229
- };
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,
244
- enumerable: !0,
245
- configurable: !0,
246
- writable: !0
247
- }), t[e];
248
- }
249
- try {
250
- define({}, "");
251
- } catch (t) {
252
- define = function (t, e, r) {
253
- return t[e] = r;
254
- };
255
- }
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;
263
- }
264
- function tryCatch(t, e, r) {
265
- try {
266
- return {
267
- type: "normal",
268
- arg: t.call(e, r)
269
- };
270
- } catch (t) {
271
- return {
272
- type: "throw",
273
- arg: t
274
- };
275
- }
276
- }
277
- e.wrap = wrap;
278
- var h = "suspendedStart",
279
- l = "suspendedYield",
280
- f = "executing",
281
- s = "completed",
282
- y = {};
283
- function Generator() {}
284
- function GeneratorFunction() {}
285
- function GeneratorFunctionPrototype() {}
286
- var p = {};
287
- define(p, a, function () {
288
- return this;
289
- });
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);
298
- });
299
- });
300
- }
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);
315
- });
316
- }
317
- a(c.arg);
318
- }
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
- });
226
+ function _regenerator() {
227
+ /*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/babel/babel/blob/main/packages/babel-helpers/LICENSE */
228
+ var e,
229
+ t,
230
+ r = "function" == typeof Symbol ? Symbol : {},
231
+ n = r.iterator || "@@iterator",
232
+ o = r.toStringTag || "@@toStringTag";
233
+ function i(r, n, o, i) {
234
+ var c = n && n.prototype instanceof Generator ? n : Generator,
235
+ u = Object.create(c.prototype);
236
+ return _regeneratorDefine(u, "_invoke", function (r, n, o) {
237
+ var i,
238
+ c,
239
+ u,
240
+ f = 0,
241
+ p = o || [],
242
+ y = !1,
243
+ G = {
244
+ p: 0,
245
+ n: 0,
246
+ v: e,
247
+ a: d,
248
+ f: d.bind(e, 4),
249
+ d: function (t, r) {
250
+ return i = t, c = 0, u = e, G.n = r, a;
251
+ }
252
+ };
253
+ function d(r, n) {
254
+ for (c = r, u = n, t = 0; !y && f && !o && t < p.length; t++) {
255
+ var o,
256
+ i = p[t],
257
+ d = G.p,
258
+ l = i[2];
259
+ 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));
326
260
  }
327
- return r = r ? r.then(callInvokeWithMethodAndArg, callInvokeWithMethodAndArg) : callInvokeWithMethodAndArg();
261
+ if (o || r > 1) return a;
262
+ throw y = !0, n;
328
263
  }
329
- });
330
- }
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;
264
+ return function (o, p, l) {
265
+ if (f > 1) throw TypeError("Generator is already running");
266
+ for (y && 1 === p && d(p, l), c = p, u = l; (t = c < 2 ? e : u) || !y;) {
267
+ i || (c ? c < 3 ? (c > 1 && (G.n = -1), d(c, u)) : G.n = u : G.v = u);
268
+ try {
269
+ if (f = 2, i) {
270
+ if (c || (o = "next"), t = i[o]) {
271
+ if (!(t = t.call(i, u))) throw TypeError("iterator result is not an object");
272
+ if (!t.done) return t;
273
+ u = t.value, c < 2 && (c = 0);
274
+ } else 1 === c && (t = i.return) && t.call(i), c < 2 && (u = TypeError("The iterator does not provide a '" + o + "' method"), c = 1);
275
+ i = e;
276
+ } else if ((t = (y = G.n < 0) ? u : r.call(n, G)) !== a) break;
277
+ } catch (t) {
278
+ i = e, c = 1, u = t;
279
+ } finally {
280
+ f = 1;
281
+ }
282
+ }
337
283
  return {
338
284
  value: t,
339
- done: !0
285
+ done: y
340
286
  };
341
- }
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
- };
367
- }
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]
380
- };
381
- 1 in t && (e.catchLoc = t[1]), 2 in t && (e.finallyLoc = t[2], e.afterLoc = t[3]), this.tryEntries.push(e);
382
- }
383
- function resetTryEntry(t) {
384
- var e = t.completion || {};
385
- e.type = "normal", delete e.arg, t.completion = e;
386
- }
387
- function Context(t) {
388
- this.tryEntries = [{
389
- tryLoc: "root"
390
- }], t.forEach(pushTryEntry, this), this.reset(!0);
287
+ };
288
+ }(r, o, i), !0), u;
391
289
  }
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;
404
- }
405
- }
406
- throw new TypeError(typeof e + " is not iterable");
290
+ var a = {};
291
+ function Generator() {}
292
+ function GeneratorFunction() {}
293
+ function GeneratorFunctionPrototype() {}
294
+ t = Object.getPrototypeOf;
295
+ var c = [][n] ? t(t([][n]())) : (_regeneratorDefine(t = {}, n, function () {
296
+ return this;
297
+ }), t),
298
+ u = GeneratorFunctionPrototype.prototype = Generator.prototype = Object.create(c);
299
+ function f(e) {
300
+ return Object.setPrototypeOf ? Object.setPrototypeOf(e, GeneratorFunctionPrototype) : (e.__proto__ = GeneratorFunctionPrototype, _regeneratorDefine(e, o, "GeneratorFunction")), e.prototype = Object.create(u), e;
407
301
  }
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) {
420
- return {
421
- __await: t
422
- };
423
- }, defineIteratorMethods(AsyncIterator.prototype), define(AsyncIterator.prototype, c, function () {
302
+ 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 () {
424
303
  return this;
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();
430
- });
431
- }, defineIteratorMethods(g), define(g, u, "Generator"), define(g, a, function () {
432
- return this;
433
- }), define(g, "toString", function () {
304
+ }), _regeneratorDefine(u, "toString", function () {
434
305
  return "[object Generator]";
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;
443
- }
444
- return next.done = !0, next;
306
+ }), (_regenerator = function () {
307
+ return {
308
+ w: i,
309
+ m: f
445
310
  };
446
- }, e.values = values, Context.prototype = {
447
- constructor: Context,
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);
450
- },
451
- stop: function () {
452
- this.done = !0;
453
- var t = this.tryEntries[0].completion;
454
- if ("throw" === t.type) throw t.arg;
455
- return this.rval;
456
- },
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;
462
- }
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);
475
- } else {
476
- if (!u) throw Error("try statement without catch or finally");
477
- if (this.prev < i.finallyLoc) return handle(i.finallyLoc);
478
- }
479
- }
480
- }
481
- },
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;
487
- break;
488
- }
489
- }
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);
493
- },
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;
497
- },
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;
502
- }
503
- },
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);
512
- }
513
- return o;
514
- }
515
- }
516
- throw Error("illegal catch attempt");
517
- },
518
- delegateYield: function (e, r, n) {
519
- return this.delegate = {
520
- iterator: values(e),
521
- resultName: r,
522
- nextLoc: n
523
- }, "next" === this.method && (this.arg = t), y;
311
+ })();
312
+ }
313
+ function _regeneratorDefine(e, r, n, t) {
314
+ var i = Object.defineProperty;
315
+ try {
316
+ i({}, "", {});
317
+ } catch (e) {
318
+ i = 0;
319
+ }
320
+ _regeneratorDefine = function (e, r, n, t) {
321
+ function o(r, n) {
322
+ _regeneratorDefine(e, r, function (e) {
323
+ return this._invoke(r, n, e);
324
+ });
524
325
  }
525
- }, e;
326
+ r ? i ? i(e, r, {
327
+ value: n,
328
+ enumerable: !t,
329
+ configurable: !t,
330
+ writable: !t
331
+ }) : e[r] = n : (o("next", 0), o("throw", 1), o("return", 2));
332
+ }, _regeneratorDefine(e, r, n, t);
526
333
  }
527
334
 
528
335
  var _excluded = ["resourceID"],
@@ -589,18 +396,26 @@ function collectionCreator(_temp9) {
589
396
  _objectDestructuringEmpty(_temp9 === void 0 ? {} : _temp9);
590
397
  return "/resource/collectionCreator";
591
398
  }
592
- function myResources(_temp10) {
593
- _objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
399
+ function myResources(_temp0) {
400
+ _objectDestructuringEmpty(_temp0 === void 0 ? {} : _temp0);
594
401
  return "/resource/list";
595
402
  }
596
- function myCollections(_temp11) {
597
- _objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
403
+ function myCollections(_temp1) {
404
+ _objectDestructuringEmpty(_temp1 === void 0 ? {} : _temp1);
598
405
  return "/resource/collection";
599
406
  }
600
- function myCollects(_temp12) {
601
- _objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
407
+ function myCollects(_temp10) {
408
+ _objectDestructuringEmpty(_temp10 === void 0 ? {} : _temp10);
602
409
  return "/resource/collect";
603
410
  }
411
+ function myResourceIncome(_temp11) {
412
+ _objectDestructuringEmpty(_temp11 === void 0 ? {} : _temp11);
413
+ return "/resource/income";
414
+ }
415
+ function myResourceTransaction(_temp12) {
416
+ _objectDestructuringEmpty(_temp12 === void 0 ? {} : _temp12);
417
+ return "/resource/transaction";
418
+ }
604
419
  function resourceVersionInfo(_ref17) {
605
420
  var resourceID = _ref17.resourceID,
606
421
  _ref17$version = _ref17.version,
@@ -884,6 +699,8 @@ var LinkTo = {
884
699
  myResources: myResources,
885
700
  myCollections: myCollections,
886
701
  myCollects: myCollects,
702
+ myResourceIncome: myResourceIncome,
703
+ myResourceTransaction: myResourceTransaction,
887
704
  resourceVersionInfo: resourceVersionInfo,
888
705
  resourceInfo: resourceInfo,
889
706
  resourcePolicy: resourcePolicy,
@@ -1049,16 +866,16 @@ var _excluded$1 = ["presentableId"],
1049
866
  _excluded7$1 = ["presentableId"],
1050
867
  _excluded8 = ["presentableId"],
1051
868
  _excluded9 = ["nodeId"],
1052
- _excluded10 = ["nodeId"],
869
+ _excluded0 = ["nodeId"],
870
+ _excluded1 = ["presentableId"],
871
+ _excluded10 = ["presentableId"],
1053
872
  _excluded11 = ["presentableId"],
1054
873
  _excluded12 = ["presentableId"],
1055
874
  _excluded13 = ["presentableId"],
1056
875
  _excluded14 = ["presentableId"],
1057
876
  _excluded15 = ["presentableId"],
1058
877
  _excluded16 = ["presentableId"],
1059
- _excluded17 = ["presentableId"],
1060
- _excluded18 = ["presentableId"],
1061
- _excluded19 = ["presentableId"];
878
+ _excluded17 = ["presentableId"];
1062
879
  function createPresentable(params) {
1063
880
  return FUtil.Request({
1064
881
  method: 'POST',
@@ -1170,7 +987,7 @@ function batchAuth(_ref8) {
1170
987
  }
1171
988
  function contractAppliedPresentable(_ref9) {
1172
989
  var nodeId = _ref9.nodeId,
1173
- params = _objectWithoutPropertiesLoose(_ref9, _excluded10);
990
+ params = _objectWithoutPropertiesLoose(_ref9, _excluded0);
1174
991
  return FUtil.Request({
1175
992
  method: 'GET',
1176
993
  url: "/v2/presentables/" + nodeId + "/contractAppliedPresentable",
@@ -1184,120 +1001,120 @@ function batchCreatePresentable(params) {
1184
1001
  data: params
1185
1002
  });
1186
1003
  }
1187
- function batchUpdatePresentable(_ref10) {
1188
- var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1004
+ function batchUpdatePresentable(_ref0) {
1005
+ var params = _extends({}, (_objectDestructuringEmpty(_ref0), _ref0));
1189
1006
  return FUtil.Request({
1190
1007
  method: 'PUT',
1191
1008
  url: "/v2/presentables/updatePresentableBatch",
1192
1009
  data: params
1193
1010
  });
1194
1011
  }
1195
- function batchUpdatePresentableStatus(_ref11) {
1196
- var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1012
+ function batchUpdatePresentableStatus(_ref1) {
1013
+ var params = _extends({}, (_objectDestructuringEmpty(_ref1), _ref1));
1197
1014
  return FUtil.Request({
1198
1015
  method: 'PUT',
1199
1016
  url: "/v2/presentables/updatePresentableOnlineStatusBatch",
1200
1017
  data: params
1201
1018
  });
1202
1019
  }
1203
- function ignorePresentableVersionUpdateTip(_ref12) {
1204
- var presentableId = _ref12.presentableId,
1205
- params = _objectWithoutPropertiesLoose(_ref12, _excluded11);
1020
+ function ignorePresentableVersionUpdateTip(_ref10) {
1021
+ var presentableId = _ref10.presentableId,
1022
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded1);
1206
1023
  return FUtil.Request({
1207
1024
  method: 'POST',
1208
1025
  url: "/v2/presentables/" + presentableId + "/ignorePresentableVersionUpdateTip",
1209
1026
  data: params
1210
1027
  });
1211
1028
  }
1212
- function createPresentableCollection(_ref13) {
1213
- var params = _extends({}, (_objectDestructuringEmpty(_ref13), _ref13));
1029
+ function createPresentableCollection(_ref11) {
1030
+ var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1214
1031
  return FUtil.Request({
1215
1032
  method: 'POST',
1216
1033
  url: "/v2/presentables/catalogues",
1217
1034
  data: params
1218
1035
  });
1219
1036
  }
1220
- function updatePresentableCollection(_ref14) {
1221
- var presentableId = _ref14.presentableId,
1222
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1037
+ function updatePresentableCollection(_ref12) {
1038
+ var presentableId = _ref12.presentableId,
1039
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10);
1223
1040
  return FUtil.Request({
1224
1041
  method: 'PUT',
1225
1042
  url: "/v2/presentables/catalogues/" + presentableId,
1226
1043
  data: params
1227
1044
  });
1228
1045
  }
1229
- function addItemsToPresentableCollection(_ref15) {
1230
- var presentableId = _ref15.presentableId,
1231
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1046
+ function addItemsToPresentableCollection(_ref13) {
1047
+ var presentableId = _ref13.presentableId,
1048
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11);
1232
1049
  return FUtil.Request({
1233
1050
  method: 'POST',
1234
1051
  url: "/v2/presentables/catalogues/" + presentableId + "/items",
1235
1052
  data: params
1236
1053
  });
1237
1054
  }
1238
- function removeItemsFromPresentableCollection(_ref16) {
1239
- var presentableId = _ref16.presentableId,
1240
- params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1055
+ function removeItemsFromPresentableCollection(_ref14) {
1056
+ var presentableId = _ref14.presentableId,
1057
+ params = _objectWithoutPropertiesLoose(_ref14, _excluded12);
1241
1058
  return FUtil.Request({
1242
1059
  method: 'DELETE',
1243
1060
  url: "/v2/presentables/catalogues/" + presentableId + "/items",
1244
1061
  params: params
1245
1062
  });
1246
1063
  }
1247
- function getItemsFromPresentableCollection(_ref17) {
1248
- var presentableId = _ref17.presentableId,
1249
- params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1064
+ function getItemsFromPresentableCollection(_ref15) {
1065
+ var presentableId = _ref15.presentableId,
1066
+ params = _objectWithoutPropertiesLoose(_ref15, _excluded13);
1250
1067
  return FUtil.Request({
1251
1068
  method: 'GET',
1252
1069
  url: "/v2/presentables/catalogues/" + presentableId + "/items",
1253
1070
  params: params
1254
1071
  });
1255
1072
  }
1256
- function getItemsFromPresentableCollectionIsExist(_ref18) {
1257
- var presentableId = _ref18.presentableId,
1258
- params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1073
+ function getItemsFromPresentableCollectionIsExist(_ref16) {
1074
+ var presentableId = _ref16.presentableId,
1075
+ params = _objectWithoutPropertiesLoose(_ref16, _excluded14);
1259
1076
  return FUtil.Request({
1260
1077
  method: 'GET',
1261
1078
  url: "/v2/presentables/catalogues/" + presentableId + "/items/checkExists",
1262
1079
  params: params
1263
1080
  });
1264
1081
  }
1265
- function setItemsSortFromPresentableCollectionManual(_ref19) {
1266
- var presentableId = _ref19.presentableId,
1267
- params = _objectWithoutPropertiesLoose(_ref19, _excluded17);
1082
+ function setItemsSortFromPresentableCollectionManual(_ref17) {
1083
+ var presentableId = _ref17.presentableId,
1084
+ params = _objectWithoutPropertiesLoose(_ref17, _excluded15);
1268
1085
  return FUtil.Request({
1269
1086
  method: 'PUT',
1270
1087
  url: "/v2/presentables/catalogues/" + presentableId + "/manualSort",
1271
1088
  data: params
1272
1089
  });
1273
1090
  }
1274
- function setItemsSortFromPresentableCollectionQuick(_ref20) {
1275
- var presentableId = _ref20.presentableId,
1276
- params = _objectWithoutPropertiesLoose(_ref20, _excluded18);
1091
+ function setItemsSortFromPresentableCollectionQuick(_ref18) {
1092
+ var presentableId = _ref18.presentableId,
1093
+ params = _objectWithoutPropertiesLoose(_ref18, _excluded16);
1277
1094
  return FUtil.Request({
1278
1095
  method: 'PUT',
1279
1096
  url: "/v2/presentables/catalogues/" + presentableId + "/reorder",
1280
1097
  data: params
1281
1098
  });
1282
1099
  }
1283
- function getItemsAutoCollectRule(_ref21) {
1284
- var presentableId = _ref21.presentableId;
1100
+ function getItemsAutoCollectRule(_ref19) {
1101
+ var presentableId = _ref19.presentableId;
1285
1102
  return FUtil.Request({
1286
1103
  method: 'GET',
1287
1104
  url: "/v2/presentables/catalogues/" + presentableId + "/items/collectRules"
1288
1105
  });
1289
1106
  }
1290
- function setItemsAutoCollectRule(_ref22) {
1291
- var presentableId = _ref22.presentableId,
1292
- params = _objectWithoutPropertiesLoose(_ref22, _excluded19);
1107
+ function setItemsAutoCollectRule(_ref20) {
1108
+ var presentableId = _ref20.presentableId,
1109
+ params = _objectWithoutPropertiesLoose(_ref20, _excluded17);
1293
1110
  return FUtil.Request({
1294
1111
  method: 'POST',
1295
1112
  url: "/v2/presentables/catalogues/" + presentableId + "/items/collectRules",
1296
1113
  data: params
1297
1114
  });
1298
1115
  }
1299
- function getItemsFromPresentableCollections(_ref23) {
1300
- var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1116
+ function getItemsFromPresentableCollections(_ref21) {
1117
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1301
1118
  return FUtil.Request({
1302
1119
  method: 'GET',
1303
1120
  // url: `/v2/presentables/catalogues/items/batch/list?presentableIds=685cf423e1502e002fe3053b&limit=1&sortType=-1&sortField=createDate`,
@@ -1559,16 +1376,16 @@ function clearUserNodeData(_ref9) {
1559
1376
  data: params
1560
1377
  });
1561
1378
  }
1562
- function filesListInfo(_ref10) {
1563
- var params = _extends({}, (_objectDestructuringEmpty(_ref10), _ref10));
1379
+ function filesListInfo(_ref0) {
1380
+ var params = _extends({}, (_objectDestructuringEmpty(_ref0), _ref0));
1564
1381
  return FUtil.Request({
1565
1382
  method: 'GET',
1566
1383
  url: "/v2/storages/files/list/info",
1567
1384
  params: params
1568
1385
  });
1569
1386
  }
1570
- function filesInfo(_ref11) {
1571
- var params = _extends({}, (_objectDestructuringEmpty(_ref11), _ref11));
1387
+ function filesInfo(_ref1) {
1388
+ var params = _extends({}, (_objectDestructuringEmpty(_ref1), _ref1));
1572
1389
  return FUtil.Request({
1573
1390
  method: 'GET',
1574
1391
  url: "/v2/storages/files/info",
@@ -1665,6 +1482,8 @@ var _excluded$3 = ["resourceIdOrName"],
1665
1482
  _excluded7$2 = ["fileSha1"],
1666
1483
  _excluded8$1 = ["fileSha1"],
1667
1484
  _excluded9$1 = ["resourceId"],
1485
+ _excluded0$1 = ["resourceId"],
1486
+ _excluded1$1 = ["resourceId"],
1668
1487
  _excluded10$1 = ["resourceId"],
1669
1488
  _excluded11$1 = ["resourceId"],
1670
1489
  _excluded12$1 = ["resourceId"],
@@ -1673,16 +1492,14 @@ var _excluded$3 = ["resourceIdOrName"],
1673
1492
  _excluded15$1 = ["resourceId"],
1674
1493
  _excluded16$1 = ["resourceId"],
1675
1494
  _excluded17$1 = ["resourceId"],
1676
- _excluded18$1 = ["resourceId"],
1677
- _excluded19$1 = ["resourceId"],
1495
+ _excluded18 = ["resourceId"],
1496
+ _excluded19 = ["resourceId"],
1678
1497
  _excluded20 = ["resourceId"],
1679
1498
  _excluded21 = ["resourceId"],
1680
1499
  _excluded22 = ["resourceId"],
1681
- _excluded23 = ["resourceId"],
1500
+ _excluded23 = ["resourceId", "itemId"],
1682
1501
  _excluded24 = ["resourceId"],
1683
- _excluded25 = ["resourceId", "itemId"],
1684
- _excluded26 = ["resourceId"],
1685
- _excluded27 = ["resourceId"];
1502
+ _excluded25 = ["resourceId"];
1686
1503
  function create$1(params) {
1687
1504
  return FUtil.Request({
1688
1505
  method: 'POST',
@@ -1852,8 +1669,8 @@ function lookDraft(params) {
1852
1669
  params: params
1853
1670
  });
1854
1671
  }
1855
- function deleteResourceDraft(_ref10) {
1856
- var resourceId = _ref10.resourceId;
1672
+ function deleteResourceDraft(_ref0) {
1673
+ var resourceId = _ref0.resourceId;
1857
1674
  // return FUtil.Axios.post(`/v2/resources/${params.resourceId}/versions/drafts`, params);
1858
1675
  return FUtil.Request({
1859
1676
  method: 'DELETE',
@@ -1876,9 +1693,9 @@ function resourcesDownload(params) {
1876
1693
  // responseType: 'arraybuffer',
1877
1694
  // });
1878
1695
  }
1879
- function batchGetCoverageVersions(_ref11) {
1880
- var resourceId = _ref11.resourceId,
1881
- params = _objectWithoutPropertiesLoose(_ref11, _excluded9$1);
1696
+ function batchGetCoverageVersions(_ref1) {
1697
+ var resourceId = _ref1.resourceId,
1698
+ params = _objectWithoutPropertiesLoose(_ref1, _excluded9$1);
1882
1699
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/contracts/coverageVersions`, {
1883
1700
  // params,
1884
1701
  // });
@@ -1895,9 +1712,9 @@ function resolveResources(params) {
1895
1712
  url: "/v2/resources/" + params.resourceId + "/resolveResources"
1896
1713
  });
1897
1714
  }
1898
- function batchSetContracts(_ref12) {
1899
- var resourceId = _ref12.resourceId,
1900
- params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1715
+ function batchSetContracts(_ref10) {
1716
+ var resourceId = _ref10.resourceId,
1717
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded0$1);
1901
1718
  // return FUtil.Axios.put(`/v2/resources/${resourceId}/versions/batchSetContracts`, params);
1902
1719
  return FUtil.Request({
1903
1720
  method: 'PUT',
@@ -1905,9 +1722,9 @@ function batchSetContracts(_ref12) {
1905
1722
  data: params
1906
1723
  });
1907
1724
  }
1908
- function cycleDependencyCheck$1(_ref13) {
1909
- var resourceId = _ref13.resourceId,
1910
- params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1725
+ function cycleDependencyCheck$1(_ref11) {
1726
+ var resourceId = _ref11.resourceId,
1727
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded1$1);
1911
1728
  // return FUtil.Axios.post(`/v2/resources/${resourceId}/versions/cycleDependencyCheck`, params);
1912
1729
  return FUtil.Request({
1913
1730
  method: 'POST',
@@ -1915,9 +1732,9 @@ function cycleDependencyCheck$1(_ref13) {
1915
1732
  data: params
1916
1733
  });
1917
1734
  }
1918
- function relationTree$1(_ref14) {
1919
- var resourceId = _ref14.resourceId,
1920
- params = _objectWithoutPropertiesLoose(_ref14, _excluded12$1);
1735
+ function relationTree$1(_ref12) {
1736
+ var resourceId = _ref12.resourceId,
1737
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded10$1);
1921
1738
  // return FUtil.Axios.get(`/v2/resources/${resourceId}/relationTree`, {
1922
1739
  // params,
1923
1740
  // });
@@ -1927,41 +1744,41 @@ function relationTree$1(_ref14) {
1927
1744
  params: params
1928
1745
  });
1929
1746
  }
1930
- function relationTreeAuth(_ref15) {
1931
- var resourceId = _ref15.resourceId,
1932
- params = _objectWithoutPropertiesLoose(_ref15, _excluded13$1);
1747
+ function relationTreeAuth(_ref13) {
1748
+ var resourceId = _ref13.resourceId,
1749
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded11$1);
1933
1750
  return FUtil.Request({
1934
1751
  method: 'GET',
1935
1752
  url: "/v2/auths/resources/" + resourceId + "/relationTreeAuth",
1936
1753
  params: params
1937
1754
  });
1938
1755
  }
1939
- function resourcesCount(_ref16) {
1940
- var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1756
+ function resourcesCount(_ref14) {
1757
+ var params = _extends({}, (_objectDestructuringEmpty(_ref14), _ref14));
1941
1758
  return FUtil.Request({
1942
1759
  method: 'GET',
1943
1760
  url: "/v2/resources/count",
1944
1761
  params: params
1945
1762
  });
1946
1763
  }
1947
- function batchAuth$1(_ref17) {
1948
- var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1764
+ function batchAuth$1(_ref15) {
1765
+ var params = _extends({}, (_objectDestructuringEmpty(_ref15), _ref15));
1949
1766
  return FUtil.Request({
1950
1767
  method: 'GET',
1951
1768
  url: "/v2/auths/resources/batchAuth/results",
1952
1769
  params: params
1953
1770
  });
1954
1771
  }
1955
- function resourcesRecommend(_ref18) {
1956
- var params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1772
+ function resourcesRecommend(_ref16) {
1773
+ var params = _extends({}, (_objectDestructuringEmpty(_ref16), _ref16));
1957
1774
  return FUtil.Request({
1958
1775
  method: 'GET',
1959
1776
  url: "/v2/resources/recommend",
1960
1777
  params: params
1961
1778
  });
1962
1779
  }
1963
- function availableTags(_ref19) {
1964
- var params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1780
+ function availableTags(_ref17) {
1781
+ var params = _extends({}, (_objectDestructuringEmpty(_ref17), _ref17));
1965
1782
  return FUtil.Request({
1966
1783
  method: 'GET',
1967
1784
  url: "/v2/resources/tags/availableTags",
@@ -1969,32 +1786,32 @@ function availableTags(_ref19) {
1969
1786
  });
1970
1787
  }
1971
1788
  function resourceTypes$1(_temp) {
1972
- var _ref20 = _temp === void 0 ? {} : _temp,
1973
- params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1789
+ var _ref18 = _temp === void 0 ? {} : _temp,
1790
+ params = _extends({}, (_objectDestructuringEmpty(_ref18), _ref18));
1974
1791
  return FUtil.Request({
1975
1792
  method: 'GET',
1976
1793
  url: "/v2/resources/types/listSimpleByGroup",
1977
1794
  params: params
1978
1795
  });
1979
1796
  }
1980
- function ListSimpleByParentCode(_ref21) {
1981
- var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1797
+ function ListSimpleByParentCode(_ref19) {
1798
+ var params = _extends({}, (_objectDestructuringEmpty(_ref19), _ref19));
1982
1799
  return FUtil.Request({
1983
1800
  method: 'GET',
1984
1801
  url: "/v2/resources/types/listSimpleByParentCode",
1985
1802
  params: params
1986
1803
  });
1987
1804
  }
1988
- function getResourceTypeInfoByCode(_ref22) {
1989
- var params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
1805
+ function getResourceTypeInfoByCode(_ref20) {
1806
+ var params = _extends({}, (_objectDestructuringEmpty(_ref20), _ref20));
1990
1807
  return FUtil.Request({
1991
1808
  method: 'GET',
1992
1809
  url: "/v2/resources/types/getInfoByCode",
1993
1810
  params: params
1994
1811
  });
1995
1812
  }
1996
- function getResourceAttrListSimple(_ref23) {
1997
- var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
1813
+ function getResourceAttrListSimple(_ref21) {
1814
+ var params = _extends({}, (_objectDestructuringEmpty(_ref21), _ref21));
1998
1815
  return FUtil.Request({
1999
1816
  method: 'GET',
2000
1817
  url: "/v2/resources/attrs/listSimple",
@@ -2002,24 +1819,24 @@ function getResourceAttrListSimple(_ref23) {
2002
1819
  });
2003
1820
  }
2004
1821
  function listSimple4Recently(_temp2) {
2005
- var _ref24 = _temp2 === void 0 ? {} : _temp2,
2006
- params = _extends({}, (_objectDestructuringEmpty(_ref24), _ref24));
1822
+ var _ref22 = _temp2 === void 0 ? {} : _temp2,
1823
+ params = _extends({}, (_objectDestructuringEmpty(_ref22), _ref22));
2007
1824
  return FUtil.Request({
2008
1825
  method: 'GET',
2009
1826
  url: "/v2/resources/types/listSimple4Recently",
2010
1827
  params: params
2011
1828
  });
2012
1829
  }
2013
- function getAttrsInfoByKey(_ref25) {
2014
- var params = _extends({}, (_objectDestructuringEmpty(_ref25), _ref25));
1830
+ function getAttrsInfoByKey(_ref23) {
1831
+ var params = _extends({}, (_objectDestructuringEmpty(_ref23), _ref23));
2015
1832
  return FUtil.Request({
2016
1833
  method: 'GET',
2017
1834
  url: "/v2/resources/attrs/getInfoByKey",
2018
1835
  params: params
2019
1836
  });
2020
1837
  }
2021
- function generateResourceNames(_ref26) {
2022
- var resourceNames = _ref26.resourceNames;
1838
+ function generateResourceNames(_ref24) {
1839
+ var resourceNames = _ref24.resourceNames;
2023
1840
  return FUtil.Request({
2024
1841
  method: 'POST',
2025
1842
  url: "/v2/resources/generateResourceNames",
@@ -2028,165 +1845,165 @@ function generateResourceNames(_ref26) {
2028
1845
  }
2029
1846
  });
2030
1847
  }
2031
- function updateCollection(_ref27) {
2032
- var resourceId = _ref27.resourceId,
2033
- params = _objectWithoutPropertiesLoose(_ref27, _excluded14$1);
1848
+ function updateCollection(_ref25) {
1849
+ var resourceId = _ref25.resourceId,
1850
+ params = _objectWithoutPropertiesLoose(_ref25, _excluded12$1);
2034
1851
  return FUtil.Request({
2035
1852
  method: 'PUT',
2036
1853
  url: "/v2/resources/catalogue/" + resourceId,
2037
1854
  data: params
2038
1855
  });
2039
1856
  }
2040
- function deleteCollectionUnitResource(_ref28) {
2041
- var resourceId = _ref28.resourceId,
2042
- removeCollectionItemIds = _ref28.removeCollectionItemIds;
1857
+ function deleteCollectionUnitResource(_ref26) {
1858
+ var resourceId = _ref26.resourceId,
1859
+ removeCollectionItemIds = _ref26.removeCollectionItemIds;
2043
1860
  return FUtil.Request({
2044
1861
  method: 'DELETE',
2045
1862
  url: "/v2/resources/catalogue/" + resourceId + "?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
2046
1863
  });
2047
1864
  }
2048
- function getCollectionItems(_ref29) {
2049
- var resourceId = _ref29.resourceId,
2050
- params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
1865
+ function getCollectionItems(_ref27) {
1866
+ var resourceId = _ref27.resourceId,
1867
+ params = _objectWithoutPropertiesLoose(_ref27, _excluded13$1);
2051
1868
  return FUtil.Request({
2052
1869
  method: 'GET',
2053
1870
  url: "/v2/resources/catalogue/" + resourceId + "/items",
2054
1871
  params: params
2055
1872
  });
2056
1873
  }
2057
- function getCollectionItems_Draft(_ref30) {
2058
- var resourceId = _ref30.resourceId,
2059
- params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
1874
+ function getCollectionItems_Draft(_ref28) {
1875
+ var resourceId = _ref28.resourceId,
1876
+ params = _objectWithoutPropertiesLoose(_ref28, _excluded14$1);
2060
1877
  return FUtil.Request({
2061
1878
  method: 'GET',
2062
1879
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2063
1880
  params: params
2064
1881
  });
2065
1882
  }
2066
- function setCollectionItemSort(_ref31) {
2067
- var resourceId = _ref31.resourceId,
2068
- params = _objectWithoutPropertiesLoose(_ref31, _excluded17$1);
1883
+ function setCollectionItemSort(_ref29) {
1884
+ var resourceId = _ref29.resourceId,
1885
+ params = _objectWithoutPropertiesLoose(_ref29, _excluded15$1);
2069
1886
  return FUtil.Request({
2070
1887
  method: 'PUT',
2071
1888
  url: "/v2/resources/catalogue/" + resourceId + "/manualSort",
2072
1889
  data: params
2073
1890
  });
2074
1891
  }
2075
- function reorderCollectionItemsSort(_ref32) {
2076
- var resourceId = _ref32.resourceId,
2077
- params = _objectWithoutPropertiesLoose(_ref32, _excluded18$1);
1892
+ function reorderCollectionItemsSort(_ref30) {
1893
+ var resourceId = _ref30.resourceId,
1894
+ params = _objectWithoutPropertiesLoose(_ref30, _excluded16$1);
2078
1895
  return FUtil.Request({
2079
1896
  method: 'PUT',
2080
1897
  url: "/v2/resources/catalogue/" + resourceId + "/reorder",
2081
1898
  data: params
2082
1899
  });
2083
1900
  }
2084
- function checkExistCollectionItems(_ref33) {
2085
- var resourceId = _ref33.resourceId,
2086
- params = _objectWithoutPropertiesLoose(_ref33, _excluded19$1);
1901
+ function checkExistCollectionItems(_ref31) {
1902
+ var resourceId = _ref31.resourceId,
1903
+ params = _objectWithoutPropertiesLoose(_ref31, _excluded17$1);
2087
1904
  return FUtil.Request({
2088
1905
  method: 'GET',
2089
1906
  url: "/v2/resources/catalogue/" + resourceId + "/items/checkExists",
2090
1907
  params: params
2091
1908
  });
2092
1909
  }
2093
- function getCollectionItemsAuth(_ref34) {
2094
- var resourceId = _ref34.resourceId,
2095
- params = _objectWithoutPropertiesLoose(_ref34, _excluded20);
1910
+ function getCollectionItemsAuth(_ref32) {
1911
+ var resourceId = _ref32.resourceId,
1912
+ params = _objectWithoutPropertiesLoose(_ref32, _excluded18);
2096
1913
  return FUtil.Request({
2097
1914
  method: 'GET',
2098
1915
  url: "/v2/auths/resources/" + resourceId + "/items/batchAuth",
2099
1916
  params: params
2100
1917
  });
2101
1918
  }
2102
- function batchResourceItems(_ref35) {
2103
- var params = _extends({}, (_objectDestructuringEmpty(_ref35), _ref35));
1919
+ function batchResourceItems(_ref33) {
1920
+ var params = _extends({}, (_objectDestructuringEmpty(_ref33), _ref33));
2104
1921
  return FUtil.Request({
2105
1922
  method: 'GET',
2106
1923
  url: "/v2/resources/catalogue/items/batch/list",
2107
1924
  params: params
2108
1925
  });
2109
1926
  }
2110
- function batchResourceItems_Draft(_ref36) {
2111
- var params = _extends({}, (_objectDestructuringEmpty(_ref36), _ref36));
1927
+ function batchResourceItems_Draft(_ref34) {
1928
+ var params = _extends({}, (_objectDestructuringEmpty(_ref34), _ref34));
2112
1929
  return FUtil.Request({
2113
1930
  method: 'GET',
2114
1931
  url: "/v2/resources/catalogues/drafts/items/batch/list",
2115
1932
  params: params
2116
1933
  });
2117
1934
  }
2118
- function getCollectionUpdateLogs(_ref37) {
2119
- var resourceId = _ref37.resourceId,
2120
- params = _objectWithoutPropertiesLoose(_ref37, _excluded21);
1935
+ function getCollectionUpdateLogs(_ref35) {
1936
+ var resourceId = _ref35.resourceId,
1937
+ params = _objectWithoutPropertiesLoose(_ref35, _excluded19);
2121
1938
  return FUtil.Request({
2122
1939
  method: 'GET',
2123
1940
  url: "/v2/resources/catalogue/" + resourceId + "/updateLogs",
2124
1941
  params: params
2125
1942
  });
2126
1943
  }
2127
- function getCollectionCollectRules(_ref38) {
2128
- var resourceId = _ref38.resourceId;
1944
+ function getCollectionCollectRules(_ref36) {
1945
+ var resourceId = _ref36.resourceId;
2129
1946
  return FUtil.Request({
2130
1947
  method: 'GET',
2131
1948
  url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules"
2132
1949
  });
2133
1950
  }
2134
- function setCollectRules(_ref39) {
2135
- var resourceId = _ref39.resourceId,
2136
- params = _objectWithoutPropertiesLoose(_ref39, _excluded22);
1951
+ function setCollectRules(_ref37) {
1952
+ var resourceId = _ref37.resourceId,
1953
+ params = _objectWithoutPropertiesLoose(_ref37, _excluded20);
2137
1954
  return FUtil.Request({
2138
1955
  method: 'POST',
2139
1956
  url: "/v2/resources/catalogue/" + resourceId + "/items/collectRules",
2140
1957
  data: params
2141
1958
  });
2142
1959
  }
2143
- function setItemsTitle(_ref40) {
2144
- var resourceId = _ref40.resourceId,
2145
- data = _ref40.data;
1960
+ function setItemsTitle(_ref38) {
1961
+ var resourceId = _ref38.resourceId,
1962
+ data = _ref38.data;
2146
1963
  return FUtil.Request({
2147
1964
  method: 'PUT',
2148
1965
  url: "/v2/resources/catalogue/" + resourceId + "/items",
2149
1966
  data: data
2150
1967
  });
2151
1968
  }
2152
- function deleteCollectionItems_Draft(_ref41) {
2153
- var resourceId = _ref41.resourceId,
2154
- removeCollectionItemIds = _ref41.removeCollectionItemIds;
1969
+ function deleteCollectionItems_Draft(_ref39) {
1970
+ var resourceId = _ref39.resourceId,
1971
+ removeCollectionItemIds = _ref39.removeCollectionItemIds;
2155
1972
  return FUtil.Request({
2156
1973
  method: 'DELETE',
2157
1974
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items?removeCollectionItemIds=" + removeCollectionItemIds.join(',')
2158
1975
  });
2159
1976
  }
2160
- function setCollectionItemsSortID_Draft(_ref42) {
2161
- var resourceId = _ref42.resourceId,
2162
- data = _ref42.data;
1977
+ function setCollectionItemsSortID_Draft(_ref40) {
1978
+ var resourceId = _ref40.resourceId,
1979
+ data = _ref40.data;
2163
1980
  return FUtil.Request({
2164
1981
  method: 'PUT',
2165
1982
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/manualSort",
2166
1983
  data: data
2167
1984
  });
2168
1985
  }
2169
- function reorderCollectionItems_Draft(_ref43) {
2170
- var resourceId = _ref43.resourceId,
2171
- params = _objectWithoutPropertiesLoose(_ref43, _excluded23);
1986
+ function reorderCollectionItems_Draft(_ref41) {
1987
+ var resourceId = _ref41.resourceId,
1988
+ params = _objectWithoutPropertiesLoose(_ref41, _excluded21);
2172
1989
  return FUtil.Request({
2173
1990
  method: 'PUT',
2174
1991
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/reorder",
2175
1992
  data: params
2176
1993
  });
2177
1994
  }
2178
- function resourceIsExistInItems_Draft(_ref44) {
2179
- var resourceId = _ref44.resourceId,
2180
- params = _objectWithoutPropertiesLoose(_ref44, _excluded24);
1995
+ function resourceIsExistInItems_Draft(_ref42) {
1996
+ var resourceId = _ref42.resourceId,
1997
+ params = _objectWithoutPropertiesLoose(_ref42, _excluded22);
2181
1998
  return FUtil.Request({
2182
1999
  method: 'GET',
2183
2000
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/checkExists",
2184
2001
  params: params
2185
2002
  });
2186
2003
  }
2187
- function updateCollectionItemsInfo_Draft(_ref45) {
2188
- var resourceId = _ref45.resourceId,
2189
- data = _ref45.data;
2004
+ function updateCollectionItemsInfo_Draft(_ref43) {
2005
+ var resourceId = _ref43.resourceId,
2006
+ data = _ref43.data;
2190
2007
  return FUtil.Request({
2191
2008
  method: 'PUT',
2192
2009
  // url: `/v2/resources/catalogue/${resourceId}/items`,
@@ -2194,10 +2011,10 @@ function updateCollectionItemsInfo_Draft(_ref45) {
2194
2011
  data: data
2195
2012
  });
2196
2013
  }
2197
- function updateCollectionItemAuthorization_Draft(_ref46) {
2198
- var resourceId = _ref46.resourceId,
2199
- itemId = _ref46.itemId,
2200
- data = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2014
+ function updateCollectionItemAuthorization_Draft(_ref44) {
2015
+ var resourceId = _ref44.resourceId,
2016
+ itemId = _ref44.itemId,
2017
+ data = _objectWithoutPropertiesLoose(_ref44, _excluded23);
2201
2018
  return FUtil.Request({
2202
2019
  method: 'PUT',
2203
2020
  // url: `/v2/resources/catalogues/${resourceId}/items/${itemId}`,
@@ -2205,18 +2022,18 @@ function updateCollectionItemAuthorization_Draft(_ref46) {
2205
2022
  data: data
2206
2023
  });
2207
2024
  }
2208
- function addResourceItems_Draft(_ref47) {
2209
- var resourceId = _ref47.resourceId,
2210
- params = _objectWithoutPropertiesLoose(_ref47, _excluded26);
2025
+ function addResourceItems_Draft(_ref45) {
2026
+ var resourceId = _ref45.resourceId,
2027
+ params = _objectWithoutPropertiesLoose(_ref45, _excluded24);
2211
2028
  return FUtil.Request({
2212
2029
  method: 'POST',
2213
2030
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items",
2214
2031
  data: params
2215
2032
  });
2216
2033
  }
2217
- function getCollectionItemsAuth_Draft(_ref48) {
2218
- var resourceId = _ref48.resourceId,
2219
- params = _objectWithoutPropertiesLoose(_ref48, _excluded27);
2034
+ function getCollectionItemsAuth_Draft(_ref46) {
2035
+ var resourceId = _ref46.resourceId,
2036
+ params = _objectWithoutPropertiesLoose(_ref46, _excluded25);
2220
2037
  return FUtil.Request({
2221
2038
  method: 'GET',
2222
2039
  url: "/v2/resources/catalogues/drafts/" + resourceId + "/items/batchAuth",
@@ -2512,8 +2329,8 @@ var _excluded$5 = ["nodeId"],
2512
2329
  _excluded7$3 = ["testResourceId"],
2513
2330
  _excluded8$2 = ["nodeId"],
2514
2331
  _excluded9$2 = ["nodeId"],
2515
- _excluded10$2 = ["nodeId"],
2516
- _excluded11$2 = ["nodeId"];
2332
+ _excluded0$2 = ["nodeId"],
2333
+ _excluded1$2 = ["nodeId"];
2517
2334
  function testResources(_ref) {
2518
2335
  var nodeId = _ref.nodeId,
2519
2336
  params = _objectWithoutPropertiesLoose(_ref, _excluded$5);
@@ -2595,25 +2412,25 @@ function testResourcesDependencyTree(_ref9) {
2595
2412
  url: "/v2/testNodes/testResources/" + testResourceId + "/dependencyTree"
2596
2413
  });
2597
2414
  }
2598
- function testResourcesAuthTree(_ref10) {
2599
- var testResourceId = _ref10.testResourceId;
2415
+ function testResourcesAuthTree(_ref0) {
2416
+ var testResourceId = _ref0.testResourceId;
2600
2417
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}`);
2601
2418
  return FUtil.Request({
2602
2419
  method: 'GET',
2603
2420
  url: "/v2/testNodes/testResources/" + testResourceId + "/authTree"
2604
2421
  });
2605
2422
  }
2606
- function testResourceDetails(_ref11) {
2607
- var testResourceId = _ref11.testResourceId;
2423
+ function testResourceDetails(_ref1) {
2424
+ var testResourceId = _ref1.testResourceId;
2608
2425
  // return FUtil.Axios.get(`/v2/testNodes/testResources/${testResourceId}`);
2609
2426
  return FUtil.Request({
2610
2427
  method: 'GET',
2611
2428
  url: "/v2/testNodes/testResources/" + testResourceId
2612
2429
  });
2613
2430
  }
2614
- function searchTestResourcesByDependency(_ref12) {
2615
- var nodeId = _ref12.nodeId,
2616
- params = _objectWithoutPropertiesLoose(_ref12, _excluded8$2);
2431
+ function searchTestResourcesByDependency(_ref10) {
2432
+ var nodeId = _ref10.nodeId,
2433
+ params = _objectWithoutPropertiesLoose(_ref10, _excluded8$2);
2617
2434
  // return FUtil.Axios.get(`/v2/testNodes/${nodeId}/testResources/searchByDependency`, {
2618
2435
  // params,
2619
2436
  // });
@@ -2623,27 +2440,27 @@ function searchTestResourcesByDependency(_ref12) {
2623
2440
  params: params
2624
2441
  });
2625
2442
  }
2626
- function rulesRematch(_ref13) {
2627
- var nodeId = _ref13.nodeId,
2628
- params = _objectWithoutPropertiesLoose(_ref13, _excluded9$2);
2443
+ function rulesRematch(_ref11) {
2444
+ var nodeId = _ref11.nodeId,
2445
+ params = _objectWithoutPropertiesLoose(_ref11, _excluded9$2);
2629
2446
  return FUtil.Request({
2630
2447
  method: 'POST',
2631
2448
  url: "/v2/testNodes/" + nodeId + "/rules/rematch",
2632
2449
  data: params
2633
2450
  });
2634
2451
  }
2635
- function rulesPreExecution(_ref14) {
2636
- var nodeId = _ref14.nodeId,
2637
- params = _objectWithoutPropertiesLoose(_ref14, _excluded10$2);
2452
+ function rulesPreExecution(_ref12) {
2453
+ var nodeId = _ref12.nodeId,
2454
+ params = _objectWithoutPropertiesLoose(_ref12, _excluded0$2);
2638
2455
  return FUtil.Request({
2639
2456
  method: 'POST',
2640
2457
  url: "/v2/testNodes/" + nodeId + "/rules/preExecution",
2641
2458
  data: params
2642
2459
  });
2643
2460
  }
2644
- function batchGetAuths(_ref15) {
2645
- var nodeId = _ref15.nodeId,
2646
- params = _objectWithoutPropertiesLoose(_ref15, _excluded11$2);
2461
+ function batchGetAuths(_ref13) {
2462
+ var nodeId = _ref13.nodeId,
2463
+ params = _objectWithoutPropertiesLoose(_ref13, _excluded1$2);
2647
2464
  return FUtil.Request({
2648
2465
  method: 'GET',
2649
2466
  url: "/v2/auths/exhibits/" + nodeId + "/test/batchAuth/results",
@@ -3208,6 +3025,13 @@ function policyTemplates(params) {
3208
3025
  params: params
3209
3026
  });
3210
3027
  }
3028
+ function policyReCompile(data) {
3029
+ return FUtil.Request({
3030
+ method: 'POST',
3031
+ url: "/v2/translate/reCompile",
3032
+ data: data
3033
+ });
3034
+ }
3211
3035
  function policyTranslation(_ref) {
3212
3036
  var contract = _ref.contract;
3213
3037
  return FUtil.Request({
@@ -3231,6 +3055,7 @@ var Policy = {
3231
3055
  policies: policies,
3232
3056
  policiesList: policiesList,
3233
3057
  policyTemplates: policyTemplates,
3058
+ policyReCompile: policyReCompile,
3234
3059
  policyTranslation: policyTranslation,
3235
3060
  policyTransferTranslation: policyTransferTranslation
3236
3061
  };
@@ -3245,38 +3070,35 @@ function getSHA1Hash(file) {
3245
3070
  return new Promise(function (resolve) {
3246
3071
  var reader = new FileReader();
3247
3072
  reader.readAsArrayBuffer(file);
3248
- reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3073
+ reader.onload = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3249
3074
  var sha1;
3250
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3251
- while (1) switch (_context.prev = _context.next) {
3075
+ return _regenerator().w(function (_context) {
3076
+ while (1) switch (_context.n) {
3252
3077
  case 0:
3253
3078
  if (reader.result) {
3254
- _context.next = 3;
3079
+ _context.n = 1;
3255
3080
  break;
3256
3081
  }
3257
3082
  resolve('');
3258
- return _context.abrupt("return", '');
3259
- case 3:
3083
+ return _context.a(2, '');
3084
+ case 1:
3260
3085
  if (!(typeof reader.result === 'string')) {
3261
- _context.next = 6;
3086
+ _context.n = 2;
3262
3087
  break;
3263
3088
  }
3264
3089
  resolve('');
3265
- return _context.abrupt("return", '');
3266
- case 6:
3267
- _context.next = 8;
3090
+ return _context.a(2, '');
3091
+ case 2:
3092
+ _context.n = 3;
3268
3093
  return self.crypto.subtle.digest('SHA-1', reader.result).then(function (a) {
3269
3094
  return Array.from(new Uint8Array(a)).map(function (a) {
3270
3095
  return a.toString(16).padStart(2, '0');
3271
3096
  }).join('');
3272
3097
  });
3273
- case 8:
3274
- sha1 = _context.sent;
3098
+ case 3:
3099
+ sha1 = _context.v;
3275
3100
  resolve(sha1);
3276
- return _context.abrupt("return", '');
3277
- case 11:
3278
- case "end":
3279
- return _context.stop();
3101
+ return _context.a(2, '');
3280
3102
  }
3281
3103
  }, _callee);
3282
3104
  }));
@@ -3367,10 +3189,10 @@ function getFilesSha1Info(_x, _x2) {
3367
3189
  return _getFilesSha1Info.apply(this, arguments);
3368
3190
  }
3369
3191
  function _getFilesSha1Info() {
3370
- _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(_ref, cdPartially) {
3192
+ _getFilesSha1Info = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(_ref, cdPartially) {
3371
3193
  var sha1, resourceTypeCode, delay, needHandleSha1, allData, _yield$Storage$filesL, ret, errCode, data, msg, finishedInfo;
3372
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3373
- while (1) switch (_context.prev = _context.next) {
3194
+ return _regenerator().w(function (_context) {
3195
+ while (1) switch (_context.n) {
3374
3196
  case 0:
3375
3197
  sha1 = _ref.sha1, resourceTypeCode = _ref.resourceTypeCode;
3376
3198
  if (cdPartially === void 0) {
@@ -3379,31 +3201,31 @@ function _getFilesSha1Info() {
3379
3201
  };
3380
3202
  }
3381
3203
  if (!(sha1.length === 0)) {
3382
- _context.next = 4;
3204
+ _context.n = 1;
3383
3205
  break;
3384
3206
  }
3385
- return _context.abrupt("return", {
3207
+ return _context.a(2, {
3386
3208
  error: '',
3387
3209
  result: []
3388
3210
  });
3389
- case 4:
3211
+ case 1:
3390
3212
  delay = 500;
3391
3213
  needHandleSha1 = [].concat(sha1);
3392
3214
  allData = [];
3393
- case 7:
3394
- _context.next = 10;
3215
+ case 2:
3216
+ _context.n = 3;
3395
3217
  return filesListInfo({
3396
3218
  sha1: needHandleSha1.join(','),
3397
3219
  resourceTypeCode: resourceTypeCode
3398
3220
  });
3399
- case 10:
3400
- _yield$Storage$filesL = _context.sent;
3221
+ case 3:
3222
+ _yield$Storage$filesL = _context.v;
3401
3223
  ret = _yield$Storage$filesL.ret;
3402
3224
  errCode = _yield$Storage$filesL.errCode;
3403
3225
  data = _yield$Storage$filesL.data;
3404
3226
  msg = _yield$Storage$filesL.msg;
3405
3227
  if (!(ret !== 0 || errCode !== 0)) {
3406
- _context.next = 18;
3228
+ _context.n = 4;
3407
3229
  break;
3408
3230
  }
3409
3231
  console.log({
@@ -3412,11 +3234,11 @@ function _getFilesSha1Info() {
3412
3234
  data: data,
3413
3235
  msg: msg
3414
3236
  }, '09iowksdjaklfjs;oalijflskdjflsdkjflkj');
3415
- return _context.abrupt("return", {
3237
+ return _context.a(2, {
3416
3238
  error: msg,
3417
3239
  result: allData
3418
3240
  });
3419
- case 18:
3241
+ case 4:
3420
3242
  needHandleSha1 = data.filter(function (d) {
3421
3243
  return d.metaAnalyzeStatus === 0 || d.metaAnalyzeStatus === 1;
3422
3244
  }).map(function (d) {
@@ -3443,24 +3265,21 @@ function _getFilesSha1Info() {
3443
3265
  cdPartially && cdPartially(finishedInfo);
3444
3266
  allData = [].concat(allData, finishedInfo);
3445
3267
  if (!(needHandleSha1.length === 0)) {
3446
- _context.next = 24;
3268
+ _context.n = 5;
3447
3269
  break;
3448
3270
  }
3449
- return _context.abrupt("break", 28);
3450
- case 24:
3451
- _context.next = 26;
3271
+ return _context.a(3, 7);
3272
+ case 5:
3273
+ _context.n = 6;
3452
3274
  return promiseSleep(delay);
3453
- case 26:
3454
- _context.next = 7;
3275
+ case 6:
3276
+ _context.n = 2;
3455
3277
  break;
3456
- case 28:
3457
- return _context.abrupt("return", {
3278
+ case 7:
3279
+ return _context.a(2, {
3458
3280
  error: '',
3459
3281
  result: allData
3460
3282
  });
3461
- case 29:
3462
- case "end":
3463
- return _context.stop();
3464
3283
  }
3465
3284
  }, _callee);
3466
3285
  }));
@@ -3528,6 +3347,55 @@ var ResourceType = {
3528
3347
  getInfoByCodeOrName: getInfoByCodeOrName
3529
3348
  };
3530
3349
 
3350
+ var _excluded$a = ["accountId"];
3351
+ function uploadIDCard(params, config) {
3352
+ var formData = new FormData();
3353
+ for (var _i = 0, _Object$entries = Object.entries(params); _i < _Object$entries.length; _i++) {
3354
+ var _Object$entries$_i = _Object$entries[_i],
3355
+ key = _Object$entries$_i[0],
3356
+ value = _Object$entries$_i[1];
3357
+ if (value) {
3358
+ formData.append(key, value);
3359
+ }
3360
+ }
3361
+ return FUtil.Request(_extends({
3362
+ method: 'POST',
3363
+ url: "/v3/transactions/accounts/idCardUploadAndOcr",
3364
+ data: formData
3365
+ }, config));
3366
+ }
3367
+ function openFinancialAccount(params, config) {
3368
+ return FUtil.Request(_extends({
3369
+ method: 'POST',
3370
+ url: "/v3/transactions/accounts",
3371
+ data: params
3372
+ }, config));
3373
+ }
3374
+ function bindWithdrawCard(_ref, config) {
3375
+ var accountId = _ref.accountId,
3376
+ params = _objectWithoutPropertiesLoose(_ref, _excluded$a);
3377
+ return FUtil.Request(_extends({
3378
+ method: 'POST',
3379
+ url: "/v3/transactions/accounts/" + accountId + "/bindCashCard",
3380
+ data: params
3381
+ }, config));
3382
+ }
3383
+ function queryFinancialAccountInfo(params, config) {
3384
+ return FUtil.Request(_extends({
3385
+ method: 'GET',
3386
+ url: "/v3/transactions/accounts/query",
3387
+ params: params
3388
+ }, config));
3389
+ }
3390
+
3391
+ var Payment = {
3392
+ __proto__: null,
3393
+ uploadIDCard: uploadIDCard,
3394
+ openFinancialAccount: openFinancialAccount,
3395
+ bindWithdrawCard: bindWithdrawCard,
3396
+ queryFinancialAccountInfo: queryFinancialAccountInfo
3397
+ };
3398
+
3531
3399
  var FServiceAPI = {
3532
3400
  Node: Node,
3533
3401
  Exhibit: Exhibit,
@@ -3547,7 +3415,8 @@ var FServiceAPI = {
3547
3415
  Policy: Policy,
3548
3416
  recombination: recombination,
3549
3417
  Operation: Operation,
3550
- ResourceType: ResourceType
3418
+ ResourceType: ResourceType,
3419
+ Payment: Payment
3551
3420
  };
3552
3421
 
3553
3422
  // import from '../service-API';
@@ -3650,39 +3519,36 @@ function request(_x, _x2) {
3650
3519
  return _request.apply(this, arguments);
3651
3520
  }
3652
3521
  function _request() {
3653
- _request = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee(config, _temp) {
3522
+ _request = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee(config, _temp) {
3654
3523
  var _ref, _ref$noRedirect, noRedirect, _ref$noErrorAlert, noErrorAlert, result;
3655
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3656
- while (1) switch (_context.prev = _context.next) {
3524
+ return _regenerator().w(function (_context) {
3525
+ while (1) switch (_context.n) {
3657
3526
  case 0:
3658
3527
  _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;
3659
- _context.next = 3;
3528
+ _context.n = 1;
3660
3529
  return axios.request(config);
3661
- case 3:
3662
- result = _context.sent;
3530
+ case 1:
3531
+ result = _context.v;
3663
3532
  if (!(result.errCode === 30 && !noRedirect)) {
3664
- _context.next = 10;
3533
+ _context.n = 3;
3665
3534
  break;
3666
3535
  }
3667
- _context.next = 7;
3536
+ _context.n = 2;
3668
3537
  return FServiceAPI.User.logout();
3669
- case 7:
3538
+ case 2:
3670
3539
  window.location.replace("" + completeUrlByDomain('user') + login({
3671
3540
  goTo: window.location.href
3672
3541
  }));
3673
- _context.next = 11;
3542
+ _context.n = 4;
3674
3543
  break;
3675
- case 10:
3544
+ case 3:
3676
3545
  if (result.ret === 4 && result.errCode === 10 && !noRedirect) {
3677
3546
  window.location.replace("" + completeUrlByDomain('user') + userFreeze({
3678
3547
  goTo: window.location.href
3679
3548
  }));
3680
3549
  }
3681
- case 11:
3682
- return _context.abrupt("return", result);
3683
- case 12:
3684
- case "end":
3685
- return _context.stop();
3550
+ case 4:
3551
+ return _context.a(2, result);
3686
3552
  }
3687
3553
  }, _callee);
3688
3554
  }));
@@ -3747,11 +3613,11 @@ var I18nNext = /*#__PURE__*/function () {
3747
3613
  }
3748
3614
  var _proto = I18nNext.prototype;
3749
3615
  _proto.ready = /*#__PURE__*/function () {
3750
- var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
3616
+ var _ready = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee2() {
3751
3617
  var _this = this;
3752
3618
  var exc, handleTasks, promise;
3753
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
3754
- while (1) switch (_context2.prev = _context2.next) {
3619
+ return _regenerator().w(function (_context2) {
3620
+ while (1) switch (_context2.n) {
3755
3621
  case 0:
3756
3622
  exc = function exc() {
3757
3623
  while (_this._taskQueue.length > 0) {
@@ -3760,33 +3626,32 @@ var I18nNext = /*#__PURE__*/function () {
3760
3626
  }
3761
3627
  };
3762
3628
  handleTasks = /*#__PURE__*/function () {
3763
- var _ref = _asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
3764
- return _regeneratorRuntime().wrap(function _callee$(_context) {
3765
- while (1) switch (_context.prev = _context.next) {
3629
+ var _ref = _asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee() {
3630
+ return _regenerator().w(function (_context) {
3631
+ while (1) switch (_context.n) {
3766
3632
  case 0:
3767
3633
  if (!(_this._loadingData === 'End')) {
3768
- _context.next = 3;
3634
+ _context.n = 1;
3769
3635
  break;
3770
3636
  }
3771
3637
  exc();
3772
- return _context.abrupt("return");
3773
- case 3:
3638
+ return _context.a(2);
3639
+ case 1:
3774
3640
  if (!(_this._loadingData === 'Start')) {
3775
- _context.next = 5;
3641
+ _context.n = 2;
3776
3642
  break;
3777
3643
  }
3778
- return _context.abrupt("return");
3779
- case 5:
3644
+ return _context.a(2);
3645
+ case 2:
3780
3646
  // NO_START
3781
3647
  _this._loadingData = 'Start';
3782
- _context.next = 8;
3648
+ _context.n = 3;
3783
3649
  return _this._handleData();
3784
- case 8:
3650
+ case 3:
3785
3651
  // console.log('######');
3786
3652
  exc();
3787
- case 9:
3788
- case "end":
3789
- return _context.stop();
3653
+ case 4:
3654
+ return _context.a(2);
3790
3655
  }
3791
3656
  }, _callee);
3792
3657
  }));
@@ -3798,10 +3663,7 @@ var I18nNext = /*#__PURE__*/function () {
3798
3663
  _this._taskQueue.push(resolve);
3799
3664
  });
3800
3665
  handleTasks();
3801
- return _context2.abrupt("return", promise);
3802
- case 5:
3803
- case "end":
3804
- return _context2.stop();
3666
+ return _context2.a(2, promise);
3805
3667
  }
3806
3668
  }, _callee2);
3807
3669
  }));
@@ -3831,28 +3693,28 @@ var I18nNext = /*#__PURE__*/function () {
3831
3693
  return this._currentLanguage;
3832
3694
  };
3833
3695
  _proto._handleData = /*#__PURE__*/function () {
3834
- var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
3696
+ var _handleData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee3() {
3835
3697
  var lng, resource, i18nextResources;
3836
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
3837
- while (1) switch (_context3.prev = _context3.next) {
3698
+ return _regenerator().w(function (_context3) {
3699
+ while (1) switch (_context3.n) {
3838
3700
  case 0:
3839
3701
  lng = this._currentLanguage;
3840
3702
  resource = window.localStorage.getItem(localStorage_i18nextResources_key); // const resource: string | undefined = Cookies.get(decodeURIComponent(localStorage_i18nextResources_key));
3841
3703
  i18nextResources = resource ? JSON.parse(resource) : null;
3842
3704
  if (i18nextResources) {
3843
- _context3.next = 9;
3705
+ _context3.n = 2;
3844
3706
  break;
3845
3707
  }
3846
- _context3.next = 6;
3708
+ _context3.n = 1;
3847
3709
  return this._fetchData();
3848
- case 6:
3849
- i18nextResources = _context3.sent;
3850
- _context3.next = 10;
3710
+ case 1:
3711
+ i18nextResources = _context3.v;
3712
+ _context3.n = 3;
3851
3713
  break;
3852
- case 9:
3714
+ case 2:
3853
3715
  this._fetchData();
3854
- case 10:
3855
- _context3.next = 12;
3716
+ case 3:
3717
+ _context3.n = 4;
3856
3718
  return i18next.init({
3857
3719
  // the translations
3858
3720
  // (tip move them in a JSON file and import them,
@@ -3866,11 +3728,10 @@ var I18nNext = /*#__PURE__*/function () {
3866
3728
  suffix: '}'
3867
3729
  }
3868
3730
  });
3869
- case 12:
3731
+ case 4:
3870
3732
  this._loadingData = 'End';
3871
- case 13:
3872
- case "end":
3873
- return _context3.stop();
3733
+ case 5:
3734
+ return _context3.a(2);
3874
3735
  }
3875
3736
  }, _callee3, this);
3876
3737
  }));
@@ -3880,18 +3741,18 @@ var I18nNext = /*#__PURE__*/function () {
3880
3741
  return _handleData;
3881
3742
  }();
3882
3743
  _proto._fetchData = /*#__PURE__*/function () {
3883
- var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regeneratorRuntime().mark(function _callee4() {
3744
+ var _fetchData2 = /*#__PURE__*/_asyncToGenerator(/*#__PURE__*/_regenerator().m(function _callee4() {
3884
3745
  var url, res, en_US, zh_CN, _i, _Object$entries, _Object$entries$_i, key, value, result;
3885
- return _regeneratorRuntime().wrap(function _callee4$(_context4) {
3886
- while (1) switch (_context4.prev = _context4.next) {
3746
+ return _regenerator().w(function (_context4) {
3747
+ while (1) switch (_context4.n) {
3887
3748
  case 0:
3888
3749
  url = window.location.origin.includes('.freelog.com') ? ossJsonUrl : ossJsonUrl_Test;
3889
- _context4.next = 3;
3750
+ _context4.n = 1;
3890
3751
  return axios.get(url + '?timestamp=' + Date.now(), {
3891
3752
  withCredentials: false
3892
3753
  });
3893
- case 3:
3894
- res = _context4.sent;
3754
+ case 1:
3755
+ res = _context4.v;
3895
3756
  // console.log(res, 'data09oiw3qjelsfkdfjlsdkfjl');
3896
3757
  en_US = {};
3897
3758
  zh_CN = {};
@@ -3910,10 +3771,7 @@ var I18nNext = /*#__PURE__*/function () {
3910
3771
  }
3911
3772
  };
3912
3773
  window.localStorage.setItem(localStorage_i18nextResources_key, JSON.stringify(result));
3913
- return _context4.abrupt("return", result);
3914
- case 10:
3915
- case "end":
3916
- return _context4.stop();
3774
+ return _context4.a(2, result);
3917
3775
  }
3918
3776
  }, _callee4);
3919
3777
  }));