@teselagen/ove 0.3.10 → 0.3.11

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.
Files changed (4) hide show
  1. package/index.js +99 -118
  2. package/index.mjs +99 -118
  3. package/index.umd.js +153 -150
  4. package/package.json +2 -2
package/index.js CHANGED
@@ -30317,17 +30317,17 @@ var _toPrimitive$1 = function (it, S) {
30317
30317
  throw TypeError("Can't convert object to primitive value");
30318
30318
  };
30319
30319
 
30320
- var anObject$3 = _anObject;
30320
+ var anObject$5 = _anObject;
30321
30321
  var IE8_DOM_DEFINE$1 = _ie8DomDefine;
30322
30322
  var toPrimitive$2 = _toPrimitive$1;
30323
- var dP$2 = Object.defineProperty;
30323
+ var dP$3 = Object.defineProperty;
30324
30324
 
30325
30325
  _objectDp.f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
30326
- anObject$3(O);
30326
+ anObject$5(O);
30327
30327
  P = toPrimitive$2(P, true);
30328
- anObject$3(Attributes);
30328
+ anObject$5(Attributes);
30329
30329
  if (IE8_DOM_DEFINE$1) try {
30330
- return dP$2(O, P, Attributes);
30330
+ return dP$3(O, P, Attributes);
30331
30331
  } catch (e) { /* empty */ }
30332
30332
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
30333
30333
  if ('value' in Attributes) O[P] = Attributes.value;
@@ -30343,10 +30343,10 @@ var _propertyDesc = function (bitmap, value) {
30343
30343
  };
30344
30344
  };
30345
30345
 
30346
- var dP$1 = _objectDp;
30346
+ var dP$2 = _objectDp;
30347
30347
  var createDesc$3 = _propertyDesc;
30348
30348
  var _hide = _descriptors ? function (object, key, value) {
30349
- return dP$1.f(object, key, createDesc$3(1, value));
30349
+ return dP$2.f(object, key, createDesc$3(1, value));
30350
30350
  } : function (object, key, value) {
30351
30351
  object[key] = value;
30352
30352
  return object;
@@ -30362,7 +30362,7 @@ var core$3 = _coreExports;
30362
30362
  var ctx$1 = _ctx;
30363
30363
  var hide$3 = _hide;
30364
30364
  var has$e = _has;
30365
- var PROTOTYPE$1 = 'prototype';
30365
+ var PROTOTYPE$2 = 'prototype';
30366
30366
 
30367
30367
  var $export$8 = function (type, name, source) {
30368
30368
  var IS_FORCED = type & $export$8.F;
@@ -30372,8 +30372,8 @@ var $export$8 = function (type, name, source) {
30372
30372
  var IS_BIND = type & $export$8.B;
30373
30373
  var IS_WRAP = type & $export$8.W;
30374
30374
  var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
30375
- var expProto = exports[PROTOTYPE$1];
30376
- var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$1];
30375
+ var expProto = exports[PROTOTYPE$2];
30376
+ var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$2];
30377
30377
  var key, own, out;
30378
30378
  if (IS_GLOBAL) source = name;
30379
30379
  for (key in source) {
@@ -30397,7 +30397,7 @@ var $export$8 = function (type, name, source) {
30397
30397
  } return new C(a, b, c);
30398
30398
  } return C.apply(this, arguments);
30399
30399
  };
30400
- F[PROTOTYPE$1] = C[PROTOTYPE$1];
30400
+ F[PROTOTYPE$2] = C[PROTOTYPE$2];
30401
30401
  return F;
30402
30402
  // make static versions for prototype methods
30403
30403
  })(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
@@ -30534,14 +30534,14 @@ var _sharedKey = function (key) {
30534
30534
  var has$d = _has;
30535
30535
  var toIObject$4 = _toIobject;
30536
30536
  var arrayIndexOf = _arrayIncludes$1(false);
30537
- var IE_PROTO$1 = _sharedKey('IE_PROTO');
30537
+ var IE_PROTO$2 = _sharedKey('IE_PROTO');
30538
30538
 
30539
30539
  var _objectKeysInternal = function (object, names) {
30540
30540
  var O = toIObject$4(object);
30541
30541
  var i = 0;
30542
30542
  var result = [];
30543
30543
  var key;
30544
- for (key in O) if (key != IE_PROTO$1) has$d(O, key) && result.push(key);
30544
+ for (key in O) if (key != IE_PROTO$2) has$d(O, key) && result.push(key);
30545
30545
  // Don't enum bug & hidden keys
30546
30546
  while (names.length > i) if (has$d(O, key = names[i++])) {
30547
30547
  ~arrayIndexOf(result, key) || result.push(key);
@@ -30555,11 +30555,11 @@ var _enumBugKeys = (
30555
30555
  ).split(',');
30556
30556
 
30557
30557
  // 19.1.2.14 / 15.2.3.14 Object.keys(O)
30558
- var $keys$2 = _objectKeysInternal;
30559
- var enumBugKeys = _enumBugKeys;
30558
+ var $keys$3 = _objectKeysInternal;
30559
+ var enumBugKeys$1 = _enumBugKeys;
30560
30560
 
30561
30561
  var _objectKeys = Object.keys || function keys(O) {
30562
- return $keys$2(O, enumBugKeys);
30562
+ return $keys$3(O, enumBugKeys$1);
30563
30563
  };
30564
30564
 
30565
30565
  var _objectGops = {};
@@ -30666,27 +30666,19 @@ var _iterators = {};
30666
30666
 
30667
30667
  var _redefine = _hide;
30668
30668
 
30669
- var _objectDps;
30670
- var hasRequired_objectDps;
30671
-
30672
- function require_objectDps () {
30673
- if (hasRequired_objectDps) return _objectDps;
30674
- hasRequired_objectDps = 1;
30675
- var dP = _objectDp;
30676
- var anObject = _anObject;
30677
- var getKeys = _objectKeys;
30669
+ var dP$1 = _objectDp;
30670
+ var anObject$4 = _anObject;
30671
+ var getKeys$1 = _objectKeys;
30678
30672
 
30679
- _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
30680
- anObject(O);
30681
- var keys = getKeys(Properties);
30682
- var length = keys.length;
30683
- var i = 0;
30684
- var P;
30685
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
30686
- return O;
30687
- };
30688
- return _objectDps;
30689
- }
30673
+ var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
30674
+ anObject$4(O);
30675
+ var keys = getKeys$1(Properties);
30676
+ var length = keys.length;
30677
+ var i = 0;
30678
+ var P;
30679
+ while (length > i) dP$1.f(O, P = keys[i++], Properties[P]);
30680
+ return O;
30681
+ };
30690
30682
 
30691
30683
  var _html;
30692
30684
  var hasRequired_html;
@@ -30699,55 +30691,47 @@ function require_html () {
30699
30691
  return _html;
30700
30692
  }
30701
30693
 
30702
- var _objectCreate;
30703
- var hasRequired_objectCreate;
30694
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
30695
+ var anObject$3 = _anObject;
30696
+ var dPs = _objectDps;
30697
+ var enumBugKeys = _enumBugKeys;
30698
+ var IE_PROTO$1 = _sharedKey('IE_PROTO');
30699
+ var Empty = function () { /* empty */ };
30700
+ var PROTOTYPE$1 = 'prototype';
30704
30701
 
30705
- function require_objectCreate () {
30706
- if (hasRequired_objectCreate) return _objectCreate;
30707
- hasRequired_objectCreate = 1;
30708
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
30709
- var anObject = _anObject;
30710
- var dPs = require_objectDps();
30711
- var enumBugKeys = _enumBugKeys;
30712
- var IE_PROTO = _sharedKey('IE_PROTO');
30713
- var Empty = function () { /* empty */ };
30714
- var PROTOTYPE = 'prototype';
30715
-
30716
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
30717
- var createDict = function () {
30718
- // Thrash, waste and sodomy: IE GC bug
30719
- var iframe = require_domCreate()('iframe');
30720
- var i = enumBugKeys.length;
30721
- var lt = '<';
30722
- var gt = '>';
30723
- var iframeDocument;
30724
- iframe.style.display = 'none';
30725
- require_html().appendChild(iframe);
30726
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
30727
- // createDict = iframe.contentWindow.Object;
30728
- // html.removeChild(iframe);
30729
- iframeDocument = iframe.contentWindow.document;
30730
- iframeDocument.open();
30731
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
30732
- iframeDocument.close();
30733
- createDict = iframeDocument.F;
30734
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
30735
- return createDict();
30736
- };
30737
-
30738
- _objectCreate = Object.create || function create(O, Properties) {
30739
- var result;
30740
- if (O !== null) {
30741
- Empty[PROTOTYPE] = anObject(O);
30742
- result = new Empty();
30743
- Empty[PROTOTYPE] = null;
30744
- // add "__proto__" for Object.getPrototypeOf polyfill
30745
- result[IE_PROTO] = O;
30746
- } else result = createDict();
30747
- return Properties === undefined ? result : dPs(result, Properties);
30748
- };
30749
- return _objectCreate;
30750
- }
30702
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
30703
+ var createDict = function () {
30704
+ // Thrash, waste and sodomy: IE GC bug
30705
+ var iframe = require_domCreate()('iframe');
30706
+ var i = enumBugKeys.length;
30707
+ var lt = '<';
30708
+ var gt = '>';
30709
+ var iframeDocument;
30710
+ iframe.style.display = 'none';
30711
+ require_html().appendChild(iframe);
30712
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
30713
+ // createDict = iframe.contentWindow.Object;
30714
+ // html.removeChild(iframe);
30715
+ iframeDocument = iframe.contentWindow.document;
30716
+ iframeDocument.open();
30717
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
30718
+ iframeDocument.close();
30719
+ createDict = iframeDocument.F;
30720
+ while (i--) delete createDict[PROTOTYPE$1][enumBugKeys[i]];
30721
+ return createDict();
30722
+ };
30723
+
30724
+ var _objectCreate = Object.create || function create(O, Properties) {
30725
+ var result;
30726
+ if (O !== null) {
30727
+ Empty[PROTOTYPE$1] = anObject$3(O);
30728
+ result = new Empty();
30729
+ Empty[PROTOTYPE$1] = null;
30730
+ // add "__proto__" for Object.getPrototypeOf polyfill
30731
+ result[IE_PROTO$1] = O;
30732
+ } else result = createDict();
30733
+ return Properties === undefined ? result : dPs(result, Properties);
30734
+ };
30751
30735
 
30752
30736
  var _wks = {exports: {}};
30753
30737
 
@@ -30773,7 +30757,7 @@ var _setToStringTag = function (it, tag, stat) {
30773
30757
  if (it && !has$c(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
30774
30758
  };
30775
30759
 
30776
- var create$4 = require_objectCreate();
30760
+ var create$4 = _objectCreate;
30777
30761
  var descriptor = _propertyDesc;
30778
30762
  var setToStringTag$2 = _setToStringTag;
30779
30763
  var IteratorPrototype = {};
@@ -31347,24 +31331,17 @@ var _objectGopnExt = {};
31347
31331
 
31348
31332
  var _objectGopn = {};
31349
31333
 
31350
- var hasRequired_objectGopn;
31351
-
31352
- function require_objectGopn () {
31353
- if (hasRequired_objectGopn) return _objectGopn;
31354
- hasRequired_objectGopn = 1;
31355
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
31356
- var $keys = _objectKeysInternal;
31357
- var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
31334
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
31335
+ var $keys$2 = _objectKeysInternal;
31336
+ var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
31358
31337
 
31359
- _objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
31360
- return $keys(O, hiddenKeys);
31361
- };
31362
- return _objectGopn;
31363
- }
31338
+ _objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
31339
+ return $keys$2(O, hiddenKeys);
31340
+ };
31364
31341
 
31365
31342
  // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
31366
31343
  var toIObject$2 = _toIobject;
31367
- var gOPN$1 = require_objectGopn().f;
31344
+ var gOPN$1 = _objectGopn.f;
31368
31345
  var toString$5 = {}.toString;
31369
31346
 
31370
31347
  var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
@@ -31423,7 +31400,7 @@ var toObject$1 = _toObject;
31423
31400
  var toIObject = _toIobject;
31424
31401
  var toPrimitive = _toPrimitive$1;
31425
31402
  var createDesc = _propertyDesc;
31426
- var _create$1 = require_objectCreate();
31403
+ var _create$1 = _objectCreate;
31427
31404
  var gOPNExt = _objectGopnExt;
31428
31405
  var $GOPD = _objectGopd;
31429
31406
  var $GOPS = _objectGops;
@@ -31551,7 +31528,7 @@ if (!USE_NATIVE) {
31551
31528
 
31552
31529
  $GOPD.f = $getOwnPropertyDescriptor;
31553
31530
  $DP.f = $defineProperty$1;
31554
- require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
31531
+ _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
31555
31532
  require_objectPie().f = $propertyIsEnumerable;
31556
31533
  $GOPS.f = $getOwnPropertySymbols;
31557
31534
 
@@ -31733,7 +31710,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
31733
31710
 
31734
31711
  var $export = _export;
31735
31712
  // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
31736
- $export($export.S, 'Object', { create: require_objectCreate() });
31713
+ $export($export.S, 'Object', { create: _objectCreate });
31737
31714
 
31738
31715
  var $Object$1 = _coreExports.Object;
31739
31716
  var create$3 = function create(P, D) {
@@ -123007,6 +122984,19 @@ function createInitialSequence(options) {
123007
122984
  };
123008
122985
  }
123009
122986
 
122987
+ function extractFileExtension(name) {
122988
+ if (typeof name === "string") {
122989
+ let ext = "";
122990
+ const match = name.match(/\.(\w+)$/);
122991
+ if (match && match[1]) {
122992
+ ext = match[1];
122993
+ }
122994
+ return ext;
122995
+ } else {
122996
+ return "";
122997
+ }
122998
+ }
122999
+
123010
123000
  function splitStringIntoLines(string) {
123011
123001
  let lines = [];
123012
123002
  if (string === "") {
@@ -123580,7 +123570,11 @@ function validateSequenceArray(parsingResultArray, options) {
123580
123570
  return parsingResultArray;
123581
123571
  }
123582
123572
 
123583
- function fastaToJson(fileString, options) {
123573
+ function fastaToJson(fileString, options = {}) {
123574
+ const ext = extractFileExtension(options.fileName);
123575
+ if (/^(faa)$/.test(ext)) {
123576
+ options.isProtein = true;
123577
+ }
123584
123578
  let resultArray = [];
123585
123579
  let result = null;
123586
123580
  try {
@@ -126052,19 +126046,6 @@ function parseSbolJson(sbolJson, options) {
126052
126046
  };
126053
126047
  }
126054
126048
 
126055
- function extractFileExtension(name) {
126056
- if (typeof name === "string") {
126057
- let ext = "";
126058
- const match = name.match(/\.(\w+)$/);
126059
- if (match && match[1]) {
126060
- ext = match[1];
126061
- }
126062
- return ext;
126063
- } else {
126064
- return "";
126065
- }
126066
- }
126067
-
126068
126049
  /*!
126069
126050
  * Copyright 2008 Fair Oaks Labs, Inc.
126070
126051
  * All rights reserved.
@@ -135781,7 +135762,7 @@ async function anyToJson(fileContentStringOrFileObj, options) {
135781
135762
  );
135782
135763
  }
135783
135764
  }
135784
- if (/^(fasta|fas|fa|fna|ffn)$/.test(ext)) {
135765
+ if (/^(fasta|fas|fa|fna|ffn|faa)$/.test(ext)) {
135785
135766
  return fastaToJson(fileContentString, options);
135786
135767
  } else if (/^(gb|gbk)$/.test(ext)) {
135787
135768
  return genbankToJson(fileContentString, options);
@@ -161071,7 +161052,7 @@ function showFileDialog({ multiple = false, onSelect }) {
161071
161052
  }
161072
161053
 
161073
161054
  const name = "@teselagen/ove";
161074
- const version = "0.3.9";
161055
+ const version = "0.3.10";
161075
161056
  const main = "./src/index.js";
161076
161057
  const exports$1 = {
161077
161058
  ".": {
package/index.mjs CHANGED
@@ -30296,17 +30296,17 @@ var _toPrimitive$1 = function (it, S) {
30296
30296
  throw TypeError("Can't convert object to primitive value");
30297
30297
  };
30298
30298
 
30299
- var anObject$3 = _anObject;
30299
+ var anObject$5 = _anObject;
30300
30300
  var IE8_DOM_DEFINE$1 = _ie8DomDefine;
30301
30301
  var toPrimitive$2 = _toPrimitive$1;
30302
- var dP$2 = Object.defineProperty;
30302
+ var dP$3 = Object.defineProperty;
30303
30303
 
30304
30304
  _objectDp.f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
30305
- anObject$3(O);
30305
+ anObject$5(O);
30306
30306
  P = toPrimitive$2(P, true);
30307
- anObject$3(Attributes);
30307
+ anObject$5(Attributes);
30308
30308
  if (IE8_DOM_DEFINE$1) try {
30309
- return dP$2(O, P, Attributes);
30309
+ return dP$3(O, P, Attributes);
30310
30310
  } catch (e) { /* empty */ }
30311
30311
  if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
30312
30312
  if ('value' in Attributes) O[P] = Attributes.value;
@@ -30322,10 +30322,10 @@ var _propertyDesc = function (bitmap, value) {
30322
30322
  };
30323
30323
  };
30324
30324
 
30325
- var dP$1 = _objectDp;
30325
+ var dP$2 = _objectDp;
30326
30326
  var createDesc$3 = _propertyDesc;
30327
30327
  var _hide = _descriptors ? function (object, key, value) {
30328
- return dP$1.f(object, key, createDesc$3(1, value));
30328
+ return dP$2.f(object, key, createDesc$3(1, value));
30329
30329
  } : function (object, key, value) {
30330
30330
  object[key] = value;
30331
30331
  return object;
@@ -30341,7 +30341,7 @@ var core$3 = _coreExports;
30341
30341
  var ctx$1 = _ctx;
30342
30342
  var hide$3 = _hide;
30343
30343
  var has$e = _has;
30344
- var PROTOTYPE$1 = 'prototype';
30344
+ var PROTOTYPE$2 = 'prototype';
30345
30345
 
30346
30346
  var $export$8 = function (type, name, source) {
30347
30347
  var IS_FORCED = type & $export$8.F;
@@ -30351,8 +30351,8 @@ var $export$8 = function (type, name, source) {
30351
30351
  var IS_BIND = type & $export$8.B;
30352
30352
  var IS_WRAP = type & $export$8.W;
30353
30353
  var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
30354
- var expProto = exports[PROTOTYPE$1];
30355
- var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$1];
30354
+ var expProto = exports[PROTOTYPE$2];
30355
+ var target = IS_GLOBAL ? global$5 : IS_STATIC ? global$5[name] : (global$5[name] || {})[PROTOTYPE$2];
30356
30356
  var key, own, out;
30357
30357
  if (IS_GLOBAL) source = name;
30358
30358
  for (key in source) {
@@ -30376,7 +30376,7 @@ var $export$8 = function (type, name, source) {
30376
30376
  } return new C(a, b, c);
30377
30377
  } return C.apply(this, arguments);
30378
30378
  };
30379
- F[PROTOTYPE$1] = C[PROTOTYPE$1];
30379
+ F[PROTOTYPE$2] = C[PROTOTYPE$2];
30380
30380
  return F;
30381
30381
  // make static versions for prototype methods
30382
30382
  })(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
@@ -30513,14 +30513,14 @@ var _sharedKey = function (key) {
30513
30513
  var has$d = _has;
30514
30514
  var toIObject$4 = _toIobject;
30515
30515
  var arrayIndexOf = _arrayIncludes$1(false);
30516
- var IE_PROTO$1 = _sharedKey('IE_PROTO');
30516
+ var IE_PROTO$2 = _sharedKey('IE_PROTO');
30517
30517
 
30518
30518
  var _objectKeysInternal = function (object, names) {
30519
30519
  var O = toIObject$4(object);
30520
30520
  var i = 0;
30521
30521
  var result = [];
30522
30522
  var key;
30523
- for (key in O) if (key != IE_PROTO$1) has$d(O, key) && result.push(key);
30523
+ for (key in O) if (key != IE_PROTO$2) has$d(O, key) && result.push(key);
30524
30524
  // Don't enum bug & hidden keys
30525
30525
  while (names.length > i) if (has$d(O, key = names[i++])) {
30526
30526
  ~arrayIndexOf(result, key) || result.push(key);
@@ -30534,11 +30534,11 @@ var _enumBugKeys = (
30534
30534
  ).split(',');
30535
30535
 
30536
30536
  // 19.1.2.14 / 15.2.3.14 Object.keys(O)
30537
- var $keys$2 = _objectKeysInternal;
30538
- var enumBugKeys = _enumBugKeys;
30537
+ var $keys$3 = _objectKeysInternal;
30538
+ var enumBugKeys$1 = _enumBugKeys;
30539
30539
 
30540
30540
  var _objectKeys = Object.keys || function keys(O) {
30541
- return $keys$2(O, enumBugKeys);
30541
+ return $keys$3(O, enumBugKeys$1);
30542
30542
  };
30543
30543
 
30544
30544
  var _objectGops = {};
@@ -30645,27 +30645,19 @@ var _iterators = {};
30645
30645
 
30646
30646
  var _redefine = _hide;
30647
30647
 
30648
- var _objectDps;
30649
- var hasRequired_objectDps;
30650
-
30651
- function require_objectDps () {
30652
- if (hasRequired_objectDps) return _objectDps;
30653
- hasRequired_objectDps = 1;
30654
- var dP = _objectDp;
30655
- var anObject = _anObject;
30656
- var getKeys = _objectKeys;
30648
+ var dP$1 = _objectDp;
30649
+ var anObject$4 = _anObject;
30650
+ var getKeys$1 = _objectKeys;
30657
30651
 
30658
- _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
30659
- anObject(O);
30660
- var keys = getKeys(Properties);
30661
- var length = keys.length;
30662
- var i = 0;
30663
- var P;
30664
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
30665
- return O;
30666
- };
30667
- return _objectDps;
30668
- }
30652
+ var _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
30653
+ anObject$4(O);
30654
+ var keys = getKeys$1(Properties);
30655
+ var length = keys.length;
30656
+ var i = 0;
30657
+ var P;
30658
+ while (length > i) dP$1.f(O, P = keys[i++], Properties[P]);
30659
+ return O;
30660
+ };
30669
30661
 
30670
30662
  var _html;
30671
30663
  var hasRequired_html;
@@ -30678,55 +30670,47 @@ function require_html () {
30678
30670
  return _html;
30679
30671
  }
30680
30672
 
30681
- var _objectCreate;
30682
- var hasRequired_objectCreate;
30673
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
30674
+ var anObject$3 = _anObject;
30675
+ var dPs = _objectDps;
30676
+ var enumBugKeys = _enumBugKeys;
30677
+ var IE_PROTO$1 = _sharedKey('IE_PROTO');
30678
+ var Empty = function () { /* empty */ };
30679
+ var PROTOTYPE$1 = 'prototype';
30683
30680
 
30684
- function require_objectCreate () {
30685
- if (hasRequired_objectCreate) return _objectCreate;
30686
- hasRequired_objectCreate = 1;
30687
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
30688
- var anObject = _anObject;
30689
- var dPs = require_objectDps();
30690
- var enumBugKeys = _enumBugKeys;
30691
- var IE_PROTO = _sharedKey('IE_PROTO');
30692
- var Empty = function () { /* empty */ };
30693
- var PROTOTYPE = 'prototype';
30694
-
30695
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
30696
- var createDict = function () {
30697
- // Thrash, waste and sodomy: IE GC bug
30698
- var iframe = require_domCreate()('iframe');
30699
- var i = enumBugKeys.length;
30700
- var lt = '<';
30701
- var gt = '>';
30702
- var iframeDocument;
30703
- iframe.style.display = 'none';
30704
- require_html().appendChild(iframe);
30705
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
30706
- // createDict = iframe.contentWindow.Object;
30707
- // html.removeChild(iframe);
30708
- iframeDocument = iframe.contentWindow.document;
30709
- iframeDocument.open();
30710
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
30711
- iframeDocument.close();
30712
- createDict = iframeDocument.F;
30713
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
30714
- return createDict();
30715
- };
30716
-
30717
- _objectCreate = Object.create || function create(O, Properties) {
30718
- var result;
30719
- if (O !== null) {
30720
- Empty[PROTOTYPE] = anObject(O);
30721
- result = new Empty();
30722
- Empty[PROTOTYPE] = null;
30723
- // add "__proto__" for Object.getPrototypeOf polyfill
30724
- result[IE_PROTO] = O;
30725
- } else result = createDict();
30726
- return Properties === undefined ? result : dPs(result, Properties);
30727
- };
30728
- return _objectCreate;
30729
- }
30681
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
30682
+ var createDict = function () {
30683
+ // Thrash, waste and sodomy: IE GC bug
30684
+ var iframe = require_domCreate()('iframe');
30685
+ var i = enumBugKeys.length;
30686
+ var lt = '<';
30687
+ var gt = '>';
30688
+ var iframeDocument;
30689
+ iframe.style.display = 'none';
30690
+ require_html().appendChild(iframe);
30691
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
30692
+ // createDict = iframe.contentWindow.Object;
30693
+ // html.removeChild(iframe);
30694
+ iframeDocument = iframe.contentWindow.document;
30695
+ iframeDocument.open();
30696
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
30697
+ iframeDocument.close();
30698
+ createDict = iframeDocument.F;
30699
+ while (i--) delete createDict[PROTOTYPE$1][enumBugKeys[i]];
30700
+ return createDict();
30701
+ };
30702
+
30703
+ var _objectCreate = Object.create || function create(O, Properties) {
30704
+ var result;
30705
+ if (O !== null) {
30706
+ Empty[PROTOTYPE$1] = anObject$3(O);
30707
+ result = new Empty();
30708
+ Empty[PROTOTYPE$1] = null;
30709
+ // add "__proto__" for Object.getPrototypeOf polyfill
30710
+ result[IE_PROTO$1] = O;
30711
+ } else result = createDict();
30712
+ return Properties === undefined ? result : dPs(result, Properties);
30713
+ };
30730
30714
 
30731
30715
  var _wks = {exports: {}};
30732
30716
 
@@ -30752,7 +30736,7 @@ var _setToStringTag = function (it, tag, stat) {
30752
30736
  if (it && !has$c(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
30753
30737
  };
30754
30738
 
30755
- var create$4 = require_objectCreate();
30739
+ var create$4 = _objectCreate;
30756
30740
  var descriptor = _propertyDesc;
30757
30741
  var setToStringTag$2 = _setToStringTag;
30758
30742
  var IteratorPrototype = {};
@@ -31326,24 +31310,17 @@ var _objectGopnExt = {};
31326
31310
 
31327
31311
  var _objectGopn = {};
31328
31312
 
31329
- var hasRequired_objectGopn;
31330
-
31331
- function require_objectGopn () {
31332
- if (hasRequired_objectGopn) return _objectGopn;
31333
- hasRequired_objectGopn = 1;
31334
- // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
31335
- var $keys = _objectKeysInternal;
31336
- var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
31313
+ // 19.1.2.7 / 15.2.3.4 Object.getOwnPropertyNames(O)
31314
+ var $keys$2 = _objectKeysInternal;
31315
+ var hiddenKeys = _enumBugKeys.concat('length', 'prototype');
31337
31316
 
31338
- _objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
31339
- return $keys(O, hiddenKeys);
31340
- };
31341
- return _objectGopn;
31342
- }
31317
+ _objectGopn.f = Object.getOwnPropertyNames || function getOwnPropertyNames(O) {
31318
+ return $keys$2(O, hiddenKeys);
31319
+ };
31343
31320
 
31344
31321
  // fallback for IE11 buggy Object.getOwnPropertyNames with iframe and window
31345
31322
  var toIObject$2 = _toIobject;
31346
- var gOPN$1 = require_objectGopn().f;
31323
+ var gOPN$1 = _objectGopn.f;
31347
31324
  var toString$5 = {}.toString;
31348
31325
 
31349
31326
  var windowNames = typeof window == 'object' && window && Object.getOwnPropertyNames
@@ -31402,7 +31379,7 @@ var toObject$1 = _toObject;
31402
31379
  var toIObject = _toIobject;
31403
31380
  var toPrimitive = _toPrimitive$1;
31404
31381
  var createDesc = _propertyDesc;
31405
- var _create$1 = require_objectCreate();
31382
+ var _create$1 = _objectCreate;
31406
31383
  var gOPNExt = _objectGopnExt;
31407
31384
  var $GOPD = _objectGopd;
31408
31385
  var $GOPS = _objectGops;
@@ -31530,7 +31507,7 @@ if (!USE_NATIVE) {
31530
31507
 
31531
31508
  $GOPD.f = $getOwnPropertyDescriptor;
31532
31509
  $DP.f = $defineProperty$1;
31533
- require_objectGopn().f = gOPNExt.f = $getOwnPropertyNames;
31510
+ _objectGopn.f = gOPNExt.f = $getOwnPropertyNames;
31534
31511
  require_objectPie().f = $propertyIsEnumerable;
31535
31512
  $GOPS.f = $getOwnPropertySymbols;
31536
31513
 
@@ -31712,7 +31689,7 @@ var setPrototypeOf = { "default": setPrototypeOf$1, __esModule: true };
31712
31689
 
31713
31690
  var $export = _export;
31714
31691
  // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
31715
- $export($export.S, 'Object', { create: require_objectCreate() });
31692
+ $export($export.S, 'Object', { create: _objectCreate });
31716
31693
 
31717
31694
  var $Object$1 = _coreExports.Object;
31718
31695
  var create$3 = function create(P, D) {
@@ -122986,6 +122963,19 @@ function createInitialSequence(options) {
122986
122963
  };
122987
122964
  }
122988
122965
 
122966
+ function extractFileExtension(name) {
122967
+ if (typeof name === "string") {
122968
+ let ext = "";
122969
+ const match = name.match(/\.(\w+)$/);
122970
+ if (match && match[1]) {
122971
+ ext = match[1];
122972
+ }
122973
+ return ext;
122974
+ } else {
122975
+ return "";
122976
+ }
122977
+ }
122978
+
122989
122979
  function splitStringIntoLines(string) {
122990
122980
  let lines = [];
122991
122981
  if (string === "") {
@@ -123559,7 +123549,11 @@ function validateSequenceArray(parsingResultArray, options) {
123559
123549
  return parsingResultArray;
123560
123550
  }
123561
123551
 
123562
- function fastaToJson(fileString, options) {
123552
+ function fastaToJson(fileString, options = {}) {
123553
+ const ext = extractFileExtension(options.fileName);
123554
+ if (/^(faa)$/.test(ext)) {
123555
+ options.isProtein = true;
123556
+ }
123563
123557
  let resultArray = [];
123564
123558
  let result = null;
123565
123559
  try {
@@ -126031,19 +126025,6 @@ function parseSbolJson(sbolJson, options) {
126031
126025
  };
126032
126026
  }
126033
126027
 
126034
- function extractFileExtension(name) {
126035
- if (typeof name === "string") {
126036
- let ext = "";
126037
- const match = name.match(/\.(\w+)$/);
126038
- if (match && match[1]) {
126039
- ext = match[1];
126040
- }
126041
- return ext;
126042
- } else {
126043
- return "";
126044
- }
126045
- }
126046
-
126047
126028
  /*!
126048
126029
  * Copyright 2008 Fair Oaks Labs, Inc.
126049
126030
  * All rights reserved.
@@ -135760,7 +135741,7 @@ async function anyToJson(fileContentStringOrFileObj, options) {
135760
135741
  );
135761
135742
  }
135762
135743
  }
135763
- if (/^(fasta|fas|fa|fna|ffn)$/.test(ext)) {
135744
+ if (/^(fasta|fas|fa|fna|ffn|faa)$/.test(ext)) {
135764
135745
  return fastaToJson(fileContentString, options);
135765
135746
  } else if (/^(gb|gbk)$/.test(ext)) {
135766
135747
  return genbankToJson(fileContentString, options);
@@ -161050,7 +161031,7 @@ function showFileDialog({ multiple = false, onSelect }) {
161050
161031
  }
161051
161032
 
161052
161033
  const name = "@teselagen/ove";
161053
- const version = "0.3.9";
161034
+ const version = "0.3.10";
161054
161035
  const main = "./src/index.js";
161055
161036
  const exports$1 = {
161056
161037
  ".": {
package/index.umd.js CHANGED
@@ -23998,7 +23998,7 @@
23998
23998
  var ownKeys$9 = typeof Reflect !== "undefined" && Reflect.ownKeys ? Reflect.ownKeys : hasGetOwnPropertySymbols ? function (obj) {
23999
23999
  return Object.getOwnPropertyNames(obj).concat(Object.getOwnPropertySymbols(obj));
24000
24000
  } : /* istanbul ignore next */Object.getOwnPropertyNames;
24001
- function toPrimitive$3(value) {
24001
+ function toPrimitive$2(value) {
24002
24002
  return value === null ? null : typeof value === "object" ? "" + value : value;
24003
24003
  }
24004
24004
  function hasProp(target, prop) {
@@ -24927,7 +24927,7 @@
24927
24927
  return this.name_ + "[" + this.value_ + "]";
24928
24928
  };
24929
24929
  _proto.valueOf = function valueOf() {
24930
- return toPrimitive$3(this.get());
24930
+ return toPrimitive$2(this.get());
24931
24931
  };
24932
24932
  _proto[_Symbol$toPrimitive] = function () {
24933
24933
  return this.valueOf();
@@ -25155,7 +25155,7 @@
25155
25155
  return this.name_ + "[" + this.derivation.toString() + "]";
25156
25156
  };
25157
25157
  _proto.valueOf = function valueOf() {
25158
- return toPrimitive$3(this.get());
25158
+ return toPrimitive$2(this.get());
25159
25159
  };
25160
25160
  _proto[_Symbol$toPrimitive$1] = function () {
25161
25161
  return this.valueOf();
@@ -57023,10 +57023,18 @@
57023
57023
  }
57024
57024
  };
57025
57025
 
57026
- // Thank's IE8 for his funny defineProperty
57027
- var _descriptors = !_fails(function () {
57028
- return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
57029
- });
57026
+ var _descriptors;
57027
+ var hasRequired_descriptors;
57028
+
57029
+ function require_descriptors () {
57030
+ if (hasRequired_descriptors) return _descriptors;
57031
+ hasRequired_descriptors = 1;
57032
+ // Thank's IE8 for his funny defineProperty
57033
+ _descriptors = !_fails(function () {
57034
+ return Object.defineProperty({}, 'a', { get: function () { return 7; } }).a != 7;
57035
+ });
57036
+ return _descriptors;
57037
+ }
57030
57038
 
57031
57039
  var _domCreate;
57032
57040
  var hasRequired_domCreate;
@@ -57044,9 +57052,17 @@
57044
57052
  return _domCreate;
57045
57053
  }
57046
57054
 
57047
- var _ie8DomDefine = !_descriptors && !_fails(function () {
57048
- return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
57049
- });
57055
+ var _ie8DomDefine;
57056
+ var hasRequired_ie8DomDefine;
57057
+
57058
+ function require_ie8DomDefine () {
57059
+ if (hasRequired_ie8DomDefine) return _ie8DomDefine;
57060
+ hasRequired_ie8DomDefine = 1;
57061
+ _ie8DomDefine = !require_descriptors() && !_fails(function () {
57062
+ return Object.defineProperty(require_domCreate()('div'), 'a', { get: function () { return 7; } }).a != 7;
57063
+ });
57064
+ return _ie8DomDefine;
57065
+ }
57050
57066
 
57051
57067
  // 7.1.1 ToPrimitive(input [, PreferredType])
57052
57068
  var isObject$6 = _isObject;
@@ -57061,22 +57077,29 @@
57061
57077
  throw TypeError("Can't convert object to primitive value");
57062
57078
  };
57063
57079
 
57064
- var anObject$3 = _anObject;
57065
- var IE8_DOM_DEFINE$1 = _ie8DomDefine;
57066
- var toPrimitive$2 = _toPrimitive$1;
57067
- var dP$2 = Object.defineProperty;
57068
-
57069
- _objectDp.f = _descriptors ? Object.defineProperty : function defineProperty(O, P, Attributes) {
57070
- anObject$3(O);
57071
- P = toPrimitive$2(P, true);
57072
- anObject$3(Attributes);
57073
- if (IE8_DOM_DEFINE$1) try {
57074
- return dP$2(O, P, Attributes);
57075
- } catch (e) { /* empty */ }
57076
- if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
57077
- if ('value' in Attributes) O[P] = Attributes.value;
57078
- return O;
57079
- };
57080
+ var hasRequired_objectDp;
57081
+
57082
+ function require_objectDp () {
57083
+ if (hasRequired_objectDp) return _objectDp;
57084
+ hasRequired_objectDp = 1;
57085
+ var anObject = _anObject;
57086
+ var IE8_DOM_DEFINE = require_ie8DomDefine();
57087
+ var toPrimitive = _toPrimitive$1;
57088
+ var dP = Object.defineProperty;
57089
+
57090
+ _objectDp.f = require_descriptors() ? Object.defineProperty : function defineProperty(O, P, Attributes) {
57091
+ anObject(O);
57092
+ P = toPrimitive(P, true);
57093
+ anObject(Attributes);
57094
+ if (IE8_DOM_DEFINE) try {
57095
+ return dP(O, P, Attributes);
57096
+ } catch (e) { /* empty */ }
57097
+ if ('get' in Attributes || 'set' in Attributes) throw TypeError('Accessors not supported!');
57098
+ if ('value' in Attributes) O[P] = Attributes.value;
57099
+ return O;
57100
+ };
57101
+ return _objectDp;
57102
+ }
57080
57103
 
57081
57104
  var _propertyDesc = function (bitmap, value) {
57082
57105
  return {
@@ -57087,10 +57110,10 @@
57087
57110
  };
57088
57111
  };
57089
57112
 
57090
- var dP$1 = _objectDp;
57113
+ var dP$2 = require_objectDp();
57091
57114
  var createDesc$3 = _propertyDesc;
57092
- var _hide = _descriptors ? function (object, key, value) {
57093
- return dP$1.f(object, key, createDesc$3(1, value));
57115
+ var _hide = require_descriptors() ? function (object, key, value) {
57116
+ return dP$2.f(object, key, createDesc$3(1, value));
57094
57117
  } : function (object, key, value) {
57095
57118
  object[key] = value;
57096
57119
  return object;
@@ -57106,7 +57129,7 @@
57106
57129
  var ctx$1 = _ctx;
57107
57130
  var hide$2 = _hide;
57108
57131
  var has$d = _has;
57109
- var PROTOTYPE$1 = 'prototype';
57132
+ var PROTOTYPE$2 = 'prototype';
57110
57133
 
57111
57134
  var $export$8 = function (type, name, source) {
57112
57135
  var IS_FORCED = type & $export$8.F;
@@ -57116,8 +57139,8 @@
57116
57139
  var IS_BIND = type & $export$8.B;
57117
57140
  var IS_WRAP = type & $export$8.W;
57118
57141
  var exports = IS_GLOBAL ? core$3 : core$3[name] || (core$3[name] = {});
57119
- var expProto = exports[PROTOTYPE$1];
57120
- var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$1];
57142
+ var expProto = exports[PROTOTYPE$2];
57143
+ var target = IS_GLOBAL ? global$4 : IS_STATIC ? global$4[name] : (global$4[name] || {})[PROTOTYPE$2];
57121
57144
  var key, own, out;
57122
57145
  if (IS_GLOBAL) source = name;
57123
57146
  for (key in source) {
@@ -57141,7 +57164,7 @@
57141
57164
  } return new C(a, b, c);
57142
57165
  } return C.apply(this, arguments);
57143
57166
  };
57144
- F[PROTOTYPE$1] = C[PROTOTYPE$1];
57167
+ F[PROTOTYPE$2] = C[PROTOTYPE$2];
57145
57168
  return F;
57146
57169
  // make static versions for prototype methods
57147
57170
  })(out) : IS_PROTO && typeof out == 'function' ? ctx$1(Function.call, out) : out;
@@ -57170,20 +57193,12 @@
57170
57193
  return toString$4.call(it).slice(8, -1);
57171
57194
  };
57172
57195
 
57173
- var _iobject;
57174
- var hasRequired_iobject;
57175
-
57176
- function require_iobject () {
57177
- if (hasRequired_iobject) return _iobject;
57178
- hasRequired_iobject = 1;
57179
- // fallback for non-array-like ES3 and non-enumerable old V8 strings
57180
- var cof = _cof;
57181
- // eslint-disable-next-line no-prototype-builtins
57182
- _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
57183
- return cof(it) == 'String' ? it.split('') : Object(it);
57184
- };
57185
- return _iobject;
57186
- }
57196
+ // fallback for non-array-like ES3 and non-enumerable old V8 strings
57197
+ var cof$2 = _cof;
57198
+ // eslint-disable-next-line no-prototype-builtins
57199
+ var _iobject = Object('z').propertyIsEnumerable(0) ? Object : function (it) {
57200
+ return cof$2(it) == 'String' ? it.split('') : Object(it);
57201
+ };
57187
57202
 
57188
57203
  // 7.2.1 RequireObjectCoercible(argument)
57189
57204
  var _defined = function (it) {
@@ -57192,7 +57207,7 @@
57192
57207
  };
57193
57208
 
57194
57209
  // to indexed object, toObject with fallback for non-array-like ES3 strings
57195
- var IObject = require_iobject();
57210
+ var IObject = _iobject;
57196
57211
  var defined$2 = _defined;
57197
57212
  var _toIobject = function (it) {
57198
57213
  return IObject(defined$2(it));
@@ -57278,14 +57293,14 @@
57278
57293
  var has$c = _has;
57279
57294
  var toIObject$4 = _toIobject;
57280
57295
  var arrayIndexOf = _arrayIncludes$1(false);
57281
- var IE_PROTO$1 = _sharedKey('IE_PROTO');
57296
+ var IE_PROTO$2 = _sharedKey('IE_PROTO');
57282
57297
 
57283
57298
  var _objectKeysInternal = function (object, names) {
57284
57299
  var O = toIObject$4(object);
57285
57300
  var i = 0;
57286
57301
  var result = [];
57287
57302
  var key;
57288
- for (key in O) if (key != IE_PROTO$1) has$c(O, key) && result.push(key);
57303
+ for (key in O) if (key != IE_PROTO$2) has$c(O, key) && result.push(key);
57289
57304
  // Don't enum bug & hidden keys
57290
57305
  while (names.length > i) if (has$c(O, key = names[i++])) {
57291
57306
  ~arrayIndexOf(result, key) || result.push(key);
@@ -57300,10 +57315,10 @@
57300
57315
 
57301
57316
  // 19.1.2.14 / 15.2.3.14 Object.keys(O)
57302
57317
  var $keys$3 = _objectKeysInternal;
57303
- var enumBugKeys = _enumBugKeys;
57318
+ var enumBugKeys$1 = _enumBugKeys;
57304
57319
 
57305
57320
  var _objectKeys = Object.keys || function keys(O) {
57306
- return $keys$3(O, enumBugKeys);
57321
+ return $keys$3(O, enumBugKeys$1);
57307
57322
  };
57308
57323
 
57309
57324
  var _objectGops = {};
@@ -57334,12 +57349,12 @@
57334
57349
  if (hasRequired_objectAssign) return _objectAssign;
57335
57350
  hasRequired_objectAssign = 1;
57336
57351
  // 19.1.2.1 Object.assign(target, source, ...)
57337
- var DESCRIPTORS = _descriptors;
57352
+ var DESCRIPTORS = require_descriptors();
57338
57353
  var getKeys = _objectKeys;
57339
57354
  var gOPS = _objectGops;
57340
57355
  var pIE = require_objectPie();
57341
57356
  var toObject = _toObject;
57342
- var IObject = require_iobject();
57357
+ var IObject = _iobject;
57343
57358
  var $assign = Object.assign;
57344
57359
 
57345
57360
  // should work with symbols and should have deterministic property order (V8 bug)
@@ -57410,27 +57425,19 @@
57410
57425
 
57411
57426
  var _redefine = _hide;
57412
57427
 
57413
- var _objectDps;
57414
- var hasRequired_objectDps;
57415
-
57416
- function require_objectDps () {
57417
- if (hasRequired_objectDps) return _objectDps;
57418
- hasRequired_objectDps = 1;
57419
- var dP = _objectDp;
57420
- var anObject = _anObject;
57421
- var getKeys = _objectKeys;
57428
+ var dP$1 = require_objectDp();
57429
+ var anObject$4 = _anObject;
57430
+ var getKeys$1 = _objectKeys;
57422
57431
 
57423
- _objectDps = _descriptors ? Object.defineProperties : function defineProperties(O, Properties) {
57424
- anObject(O);
57425
- var keys = getKeys(Properties);
57426
- var length = keys.length;
57427
- var i = 0;
57428
- var P;
57429
- while (length > i) dP.f(O, P = keys[i++], Properties[P]);
57430
- return O;
57431
- };
57432
- return _objectDps;
57433
- }
57432
+ var _objectDps = require_descriptors() ? Object.defineProperties : function defineProperties(O, Properties) {
57433
+ anObject$4(O);
57434
+ var keys = getKeys$1(Properties);
57435
+ var length = keys.length;
57436
+ var i = 0;
57437
+ var P;
57438
+ while (length > i) dP$1.f(O, P = keys[i++], Properties[P]);
57439
+ return O;
57440
+ };
57434
57441
 
57435
57442
  var _html;
57436
57443
  var hasRequired_html;
@@ -57443,55 +57450,47 @@
57443
57450
  return _html;
57444
57451
  }
57445
57452
 
57446
- var _objectCreate;
57447
- var hasRequired_objectCreate;
57453
+ // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
57454
+ var anObject$3 = _anObject;
57455
+ var dPs = _objectDps;
57456
+ var enumBugKeys = _enumBugKeys;
57457
+ var IE_PROTO$1 = _sharedKey('IE_PROTO');
57458
+ var Empty = function () { /* empty */ };
57459
+ var PROTOTYPE$1 = 'prototype';
57448
57460
 
57449
- function require_objectCreate () {
57450
- if (hasRequired_objectCreate) return _objectCreate;
57451
- hasRequired_objectCreate = 1;
57452
- // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
57453
- var anObject = _anObject;
57454
- var dPs = require_objectDps();
57455
- var enumBugKeys = _enumBugKeys;
57456
- var IE_PROTO = _sharedKey('IE_PROTO');
57457
- var Empty = function () { /* empty */ };
57458
- var PROTOTYPE = 'prototype';
57459
-
57460
- // Create object with fake `null` prototype: use iframe Object with cleared prototype
57461
- var createDict = function () {
57462
- // Thrash, waste and sodomy: IE GC bug
57463
- var iframe = require_domCreate()('iframe');
57464
- var i = enumBugKeys.length;
57465
- var lt = '<';
57466
- var gt = '>';
57467
- var iframeDocument;
57468
- iframe.style.display = 'none';
57469
- require_html().appendChild(iframe);
57470
- iframe.src = 'javascript:'; // eslint-disable-line no-script-url
57471
- // createDict = iframe.contentWindow.Object;
57472
- // html.removeChild(iframe);
57473
- iframeDocument = iframe.contentWindow.document;
57474
- iframeDocument.open();
57475
- iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
57476
- iframeDocument.close();
57477
- createDict = iframeDocument.F;
57478
- while (i--) delete createDict[PROTOTYPE][enumBugKeys[i]];
57479
- return createDict();
57480
- };
57481
-
57482
- _objectCreate = Object.create || function create(O, Properties) {
57483
- var result;
57484
- if (O !== null) {
57485
- Empty[PROTOTYPE] = anObject(O);
57486
- result = new Empty();
57487
- Empty[PROTOTYPE] = null;
57488
- // add "__proto__" for Object.getPrototypeOf polyfill
57489
- result[IE_PROTO] = O;
57490
- } else result = createDict();
57491
- return Properties === undefined ? result : dPs(result, Properties);
57492
- };
57493
- return _objectCreate;
57494
- }
57461
+ // Create object with fake `null` prototype: use iframe Object with cleared prototype
57462
+ var createDict = function () {
57463
+ // Thrash, waste and sodomy: IE GC bug
57464
+ var iframe = require_domCreate()('iframe');
57465
+ var i = enumBugKeys.length;
57466
+ var lt = '<';
57467
+ var gt = '>';
57468
+ var iframeDocument;
57469
+ iframe.style.display = 'none';
57470
+ require_html().appendChild(iframe);
57471
+ iframe.src = 'javascript:'; // eslint-disable-line no-script-url
57472
+ // createDict = iframe.contentWindow.Object;
57473
+ // html.removeChild(iframe);
57474
+ iframeDocument = iframe.contentWindow.document;
57475
+ iframeDocument.open();
57476
+ iframeDocument.write(lt + 'script' + gt + 'document.F=Object' + lt + '/script' + gt);
57477
+ iframeDocument.close();
57478
+ createDict = iframeDocument.F;
57479
+ while (i--) delete createDict[PROTOTYPE$1][enumBugKeys[i]];
57480
+ return createDict();
57481
+ };
57482
+
57483
+ var _objectCreate = Object.create || function create(O, Properties) {
57484
+ var result;
57485
+ if (O !== null) {
57486
+ Empty[PROTOTYPE$1] = anObject$3(O);
57487
+ result = new Empty();
57488
+ Empty[PROTOTYPE$1] = null;
57489
+ // add "__proto__" for Object.getPrototypeOf polyfill
57490
+ result[IE_PROTO$1] = O;
57491
+ } else result = createDict();
57492
+ return Properties === undefined ? result : dPs(result, Properties);
57493
+ };
57495
57494
 
57496
57495
  var _wks = {exports: {}};
57497
57496
 
@@ -57509,7 +57508,7 @@
57509
57508
 
57510
57509
  var _wksExports = _wks.exports;
57511
57510
 
57512
- var def = _objectDp.f;
57511
+ var def = require_objectDp().f;
57513
57512
  var has$b = _has;
57514
57513
  var TAG$1 = _wksExports('toStringTag');
57515
57514
 
@@ -57517,7 +57516,7 @@
57517
57516
  if (it && !has$b(it = stat ? it : it.prototype, TAG$1)) def(it, TAG$1, { configurable: true, value: tag });
57518
57517
  };
57519
57518
 
57520
- var create$4 = require_objectCreate();
57519
+ var create$4 = _objectCreate;
57521
57520
  var descriptor = _propertyDesc;
57522
57521
  var setToStringTag$2 = _setToStringTag;
57523
57522
  var IteratorPrototype = {};
@@ -57823,7 +57822,7 @@
57823
57822
  return it !== undefined && (Iterators.Array === it || ArrayProto[ITERATOR] === it);
57824
57823
  };
57825
57824
 
57826
- var $defineProperty$1 = _objectDp;
57825
+ var $defineProperty$1 = require_objectDp();
57827
57826
  var createDesc$2 = _propertyDesc;
57828
57827
 
57829
57828
  var _createProperty = function (object, index, value) {
@@ -57956,7 +57955,7 @@
57956
57955
 
57957
57956
  var $export$3 = _export;
57958
57957
  // 19.1.2.4 / 15.2.3.6 Object.defineProperty(O, P, Attributes)
57959
- $export$3($export$3.S + $export$3.F * !_descriptors, 'Object', { defineProperty: _objectDp.f });
57958
+ $export$3($export$3.S + $export$3.F * !require_descriptors(), 'Object', { defineProperty: require_objectDp().f });
57960
57959
 
57961
57960
  var $Object$1 = _coreExports.Object;
57962
57961
  var defineProperty$6 = function defineProperty(it, key, desc) {
@@ -58004,7 +58003,7 @@
58004
58003
  var META$1 = _uid('meta');
58005
58004
  var isObject$5 = _isObject;
58006
58005
  var has$9 = _has;
58007
- var setDesc = _objectDp.f;
58006
+ var setDesc = require_objectDp().f;
58008
58007
  var id$1 = 0;
58009
58008
  var isExtensible = Object.isExtensible || function () {
58010
58009
  return true;
@@ -58059,7 +58058,7 @@
58059
58058
 
58060
58059
  var core = _coreExports;
58061
58060
  var wksExt$1 = _wksExt;
58062
- var defineProperty$4 = _objectDp.f;
58061
+ var defineProperty$4 = require_objectDp().f;
58063
58062
  var _wksDefine = function (name) {
58064
58063
  var $Symbol = core.Symbol || (core.Symbol = {} );
58065
58064
  if (name.charAt(0) != '_' && !(name in $Symbol)) defineProperty$4($Symbol, name, { value: wksExt$1.f(name) });
@@ -58126,10 +58125,10 @@
58126
58125
  var toIObject$1 = _toIobject;
58127
58126
  var toPrimitive$1 = _toPrimitive$1;
58128
58127
  var has$8 = _has;
58129
- var IE8_DOM_DEFINE = _ie8DomDefine;
58128
+ var IE8_DOM_DEFINE = require_ie8DomDefine();
58130
58129
  var gOPD$2 = Object.getOwnPropertyDescriptor;
58131
58130
 
58132
- _objectGopd.f = _descriptors ? gOPD$2 : function getOwnPropertyDescriptor(O, P) {
58131
+ _objectGopd.f = require_descriptors() ? gOPD$2 : function getOwnPropertyDescriptor(O, P) {
58133
58132
  O = toIObject$1(O);
58134
58133
  P = toPrimitive$1(P, true);
58135
58134
  if (IE8_DOM_DEFINE) try {
@@ -58141,7 +58140,7 @@
58141
58140
  // ECMAScript 6 symbols shim
58142
58141
  var global$1 = _globalExports;
58143
58142
  var has$7 = _has;
58144
- var DESCRIPTORS = _descriptors;
58143
+ var DESCRIPTORS = require_descriptors();
58145
58144
  var $export$2 = _export;
58146
58145
  var redefine = _redefine;
58147
58146
  var META = _metaExports.KEY;
@@ -58160,11 +58159,11 @@
58160
58159
  var toIObject = _toIobject;
58161
58160
  var toPrimitive = _toPrimitive$1;
58162
58161
  var createDesc = _propertyDesc;
58163
- var _create$1 = require_objectCreate();
58162
+ var _create$1 = _objectCreate;
58164
58163
  var gOPNExt = _objectGopnExt;
58165
58164
  var $GOPD = _objectGopd;
58166
58165
  var $GOPS = _objectGops;
58167
- var $DP = _objectDp;
58166
+ var $DP = require_objectDp();
58168
58167
  var $keys$1 = _objectKeys;
58169
58168
  var gOPD$1 = $GOPD.f;
58170
58169
  var dP = $DP.f;
@@ -58470,7 +58469,7 @@
58470
58469
 
58471
58470
  var $export = _export;
58472
58471
  // 19.1.2.2 / 15.2.3.5 Object.create(O [, Properties])
58473
- $export($export.S, 'Object', { create: require_objectCreate() });
58472
+ $export($export.S, 'Object', { create: _objectCreate });
58474
58473
 
58475
58474
  var $Object = _coreExports.Object;
58476
58475
  var create$3 = function create(P, D) {
@@ -151356,6 +151355,19 @@
151356
151355
  };
151357
151356
  }
151358
151357
 
151358
+ function extractFileExtension(name) {
151359
+ if (typeof name === "string") {
151360
+ let ext = "";
151361
+ const match = name.match(/\.(\w+)$/);
151362
+ if (match && match[1]) {
151363
+ ext = match[1];
151364
+ }
151365
+ return ext;
151366
+ } else {
151367
+ return "";
151368
+ }
151369
+ }
151370
+
151359
151371
  function splitStringIntoLines(string) {
151360
151372
  let lines = [];
151361
151373
  if (string === "") {
@@ -151929,7 +151941,11 @@
151929
151941
  return parsingResultArray;
151930
151942
  }
151931
151943
 
151932
- function fastaToJson(fileString, options) {
151944
+ function fastaToJson(fileString, options = {}) {
151945
+ const ext = extractFileExtension(options.fileName);
151946
+ if (/^(faa)$/.test(ext)) {
151947
+ options.isProtein = true;
151948
+ }
151933
151949
  let resultArray = [];
151934
151950
  let result = null;
151935
151951
  try {
@@ -154401,19 +154417,6 @@
154401
154417
  };
154402
154418
  }
154403
154419
 
154404
- function extractFileExtension(name) {
154405
- if (typeof name === "string") {
154406
- let ext = "";
154407
- const match = name.match(/\.(\w+)$/);
154408
- if (match && match[1]) {
154409
- ext = match[1];
154410
- }
154411
- return ext;
154412
- } else {
154413
- return "";
154414
- }
154415
- }
154416
-
154417
154420
  /*!
154418
154421
  * Copyright 2008 Fair Oaks Labs, Inc.
154419
154422
  * All rights reserved.
@@ -164130,7 +164133,7 @@
164130
164133
  );
164131
164134
  }
164132
164135
  }
164133
- if (/^(fasta|fas|fa|fna|ffn)$/.test(ext)) {
164136
+ if (/^(fasta|fas|fa|fna|ffn|faa)$/.test(ext)) {
164134
164137
  return fastaToJson(fileContentString, options);
164135
164138
  } else if (/^(gb|gbk)$/.test(ext)) {
164136
164139
  return genbankToJson(fileContentString, options);
@@ -188648,7 +188651,7 @@ double click --> edit`}`;
188648
188651
  }
188649
188652
 
188650
188653
  const name = "@teselagen/ove";
188651
- const version = "0.3.9";
188654
+ const version = "0.3.10";
188652
188655
  const main = "./src/index.js";
188653
188656
  const exports$1 = {
188654
188657
  ".": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@teselagen/ove",
3
- "version": "0.3.10",
3
+ "version": "0.3.11",
4
4
  "main": "./src/index.js",
5
5
  "exports": {
6
6
  ".": {
@@ -18,7 +18,7 @@
18
18
  "@teselagen/ui": "0.3.10",
19
19
  "@teselagen/file-utils": "0.3.9",
20
20
  "@teselagen/bounce-loader": "0.3.7",
21
- "@teselagen/bio-parsers": "0.3.7",
21
+ "@teselagen/bio-parsers": "0.3.8",
22
22
  "@blueprintjs/core": "3.52.0",
23
23
  "@blueprintjs/datetime": "3.23.19",
24
24
  "@blueprintjs/icons": "3.33.0",