webgal-parser 4.5.18 → 4.6.2

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.
package/build/es/index.js CHANGED
@@ -140,39 +140,39 @@ function argsParser(argsRaw, assetSetter) {
140
140
  value: assetSetter(e, fileType.vocal),
141
141
  });
142
142
  }
143
+ else if (argName === 'vocal' && argValue !== undefined) {
144
+ returnArrayList.push({
145
+ key: argName,
146
+ value: assetSetter(argValue, fileType.vocal),
147
+ });
148
+ }
149
+ // 判断是不是省略参数
150
+ else if (argValue === undefined) {
151
+ returnArrayList.push({
152
+ key: argName,
153
+ value: true,
154
+ });
155
+ }
156
+ // 是字符串描述的布尔值
157
+ else if (argValue === 'true' || argValue === 'false') {
158
+ returnArrayList.push({
159
+ key: argName,
160
+ value: argValue === 'true',
161
+ });
162
+ }
163
+ // 是数字
164
+ else if (!isNaN(Number(argValue))) {
165
+ returnArrayList.push({
166
+ key: argName,
167
+ value: Number(argValue),
168
+ });
169
+ }
170
+ // 是普通参数
143
171
  else {
144
- // 判断是不是省略参数
145
- if (argValue === undefined) {
146
- returnArrayList.push({
147
- key: argName,
148
- value: true,
149
- });
150
- }
151
- else {
152
- // 是字符串描述的布尔值
153
- if (argValue === 'true' || argValue === 'false') {
154
- returnArrayList.push({
155
- key: argName,
156
- value: argValue === 'true',
157
- });
158
- }
159
- else {
160
- // 是数字
161
- if (!isNaN(Number(argValue))) {
162
- returnArrayList.push({
163
- key: argName,
164
- value: Number(argValue),
165
- });
166
- }
167
- else {
168
- // 是普通参数
169
- returnArrayList.push({
170
- key: argName,
171
- value: argValue,
172
- });
173
- }
174
- }
175
- }
172
+ returnArrayList.push({
173
+ key: argName,
174
+ value: argValue,
175
+ });
176
176
  }
177
177
  });
178
178
  return returnArrayList;
@@ -345,7 +345,7 @@ function getChooseContent(contentRaw, assetSetter) {
345
345
  * @param args 参数列表
346
346
  * @return {Array<IAsset>} 语句携带的参数列表
347
347
  */
348
- const assetsScanner = (command, content, args) => {
348
+ const assetsScanner = (command, content, args, lineNumber) => {
349
349
  const returnAssetsList = [];
350
350
  if (command === commandType.say) {
351
351
  args.forEach((e) => {
@@ -353,7 +353,7 @@ const assetsScanner = (command, content, args) => {
353
353
  returnAssetsList.push({
354
354
  name: e.value,
355
355
  url: e.value,
356
- lineNumber: 0,
356
+ lineNumber,
357
357
  type: fileType.vocal,
358
358
  });
359
359
  }
@@ -367,7 +367,7 @@ const assetsScanner = (command, content, args) => {
367
367
  returnAssetsList.push({
368
368
  name: content,
369
369
  url: content,
370
- lineNumber: 0,
370
+ lineNumber,
371
371
  type: fileType.background,
372
372
  });
373
373
  }
@@ -375,7 +375,7 @@ const assetsScanner = (command, content, args) => {
375
375
  returnAssetsList.push({
376
376
  name: content,
377
377
  url: content,
378
- lineNumber: 0,
378
+ lineNumber,
379
379
  type: fileType.figure,
380
380
  });
381
381
  }
@@ -383,7 +383,7 @@ const assetsScanner = (command, content, args) => {
383
383
  returnAssetsList.push({
384
384
  name: content,
385
385
  url: content,
386
- lineNumber: 0,
386
+ lineNumber,
387
387
  type: fileType.figure,
388
388
  });
389
389
  }
@@ -391,7 +391,7 @@ const assetsScanner = (command, content, args) => {
391
391
  returnAssetsList.push({
392
392
  name: content,
393
393
  url: content,
394
- lineNumber: 0,
394
+ lineNumber,
395
395
  type: fileType.video,
396
396
  });
397
397
  }
@@ -399,7 +399,7 @@ const assetsScanner = (command, content, args) => {
399
399
  returnAssetsList.push({
400
400
  name: content,
401
401
  url: content,
402
- lineNumber: 0,
402
+ lineNumber,
403
403
  type: fileType.bgm,
404
404
  });
405
405
  }
@@ -436,7 +436,7 @@ const subSceneScanner = (command, content) => {
436
436
  * @param ADD_NEXT_ARG_LIST
437
437
  * @param SCRIPT_CONFIG_MAP
438
438
  */
439
- const scriptParser = (sentenceRaw, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG_MAP) => {
439
+ const scriptParser = (sentenceRaw, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG_MAP, lineNumber = 0) => {
440
440
  let command; // 默认为对话
441
441
  let content; // 语句内容
442
442
  let subScene; // 语句携带的子场景(可能没有)
@@ -449,7 +449,7 @@ const scriptParser = (sentenceRaw, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG
449
449
  const commentSplit = sentenceRaw.split(/(?<!\\);/);
450
450
  let newSentenceRaw = commentSplit[0];
451
451
  newSentenceRaw = newSentenceRaw.replaceAll('\\;', ';');
452
- const sentenceComment = commentSplit[1] ?? '';
452
+ const sentenceComment = commentSplit.slice(1).join(';');
453
453
  if (newSentenceRaw.trim() === '') {
454
454
  // 注释提前返回
455
455
  return {
@@ -501,7 +501,7 @@ const scriptParser = (sentenceRaw, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG
501
501
  }
502
502
  }
503
503
  content = contentParser(newSentenceRaw.trim(), command, assetSetter); // 将语句内容里的文件名转为相对或绝对路径
504
- sentenceAssets = assetsScanner(command, content, args); // 扫描语句携带资源
504
+ sentenceAssets = assetsScanner(command, content, args, lineNumber); // 扫描语句携带资源
505
505
  subScene = subSceneScanner(command, content); // 扫描语句携带子场景
506
506
  return {
507
507
  command: command,
@@ -514,1254 +514,6 @@ const scriptParser = (sentenceRaw, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG
514
514
  };
515
515
  };
516
516
 
517
- var commonjsGlobal = typeof globalThis !== 'undefined' ? globalThis : typeof window !== 'undefined' ? window : typeof global !== 'undefined' ? global : typeof self !== 'undefined' ? self : {};
518
-
519
- /** Detect free variable `global` from Node.js. */
520
-
521
- var freeGlobal$1 = typeof commonjsGlobal == 'object' && commonjsGlobal && commonjsGlobal.Object === Object && commonjsGlobal;
522
-
523
- var _freeGlobal = freeGlobal$1;
524
-
525
- var freeGlobal = _freeGlobal;
526
-
527
- /** Detect free variable `self`. */
528
- var freeSelf = typeof self == 'object' && self && self.Object === Object && self;
529
-
530
- /** Used as a reference to the global object. */
531
- var root$4 = freeGlobal || freeSelf || Function('return this')();
532
-
533
- var _root = root$4;
534
-
535
- var root$3 = _root;
536
-
537
- /** Built-in value references. */
538
- var Symbol$2 = root$3.Symbol;
539
-
540
- var _Symbol = Symbol$2;
541
-
542
- var Symbol$1 = _Symbol;
543
-
544
- /** Used for built-in method references. */
545
- var objectProto$4 = Object.prototype;
546
-
547
- /** Used to check objects for own properties. */
548
- var hasOwnProperty$3 = objectProto$4.hasOwnProperty;
549
-
550
- /**
551
- * Used to resolve the
552
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
553
- * of values.
554
- */
555
- var nativeObjectToString$1 = objectProto$4.toString;
556
-
557
- /** Built-in value references. */
558
- var symToStringTag$1 = Symbol$1 ? Symbol$1.toStringTag : undefined;
559
-
560
- /**
561
- * A specialized version of `baseGetTag` which ignores `Symbol.toStringTag` values.
562
- *
563
- * @private
564
- * @param {*} value The value to query.
565
- * @returns {string} Returns the raw `toStringTag`.
566
- */
567
- function getRawTag$1(value) {
568
- var isOwn = hasOwnProperty$3.call(value, symToStringTag$1),
569
- tag = value[symToStringTag$1];
570
-
571
- try {
572
- value[symToStringTag$1] = undefined;
573
- var unmasked = true;
574
- } catch (e) {}
575
-
576
- var result = nativeObjectToString$1.call(value);
577
- if (unmasked) {
578
- if (isOwn) {
579
- value[symToStringTag$1] = tag;
580
- } else {
581
- delete value[symToStringTag$1];
582
- }
583
- }
584
- return result;
585
- }
586
-
587
- var _getRawTag = getRawTag$1;
588
-
589
- /** Used for built-in method references. */
590
-
591
- var objectProto$3 = Object.prototype;
592
-
593
- /**
594
- * Used to resolve the
595
- * [`toStringTag`](http://ecma-international.org/ecma-262/7.0/#sec-object.prototype.tostring)
596
- * of values.
597
- */
598
- var nativeObjectToString = objectProto$3.toString;
599
-
600
- /**
601
- * Converts `value` to a string using `Object.prototype.toString`.
602
- *
603
- * @private
604
- * @param {*} value The value to convert.
605
- * @returns {string} Returns the converted string.
606
- */
607
- function objectToString$1(value) {
608
- return nativeObjectToString.call(value);
609
- }
610
-
611
- var _objectToString = objectToString$1;
612
-
613
- var Symbol = _Symbol,
614
- getRawTag = _getRawTag,
615
- objectToString = _objectToString;
616
-
617
- /** `Object#toString` result references. */
618
- var nullTag = '[object Null]',
619
- undefinedTag = '[object Undefined]';
620
-
621
- /** Built-in value references. */
622
- var symToStringTag = Symbol ? Symbol.toStringTag : undefined;
623
-
624
- /**
625
- * The base implementation of `getTag` without fallbacks for buggy environments.
626
- *
627
- * @private
628
- * @param {*} value The value to query.
629
- * @returns {string} Returns the `toStringTag`.
630
- */
631
- function baseGetTag$1(value) {
632
- if (value == null) {
633
- return value === undefined ? undefinedTag : nullTag;
634
- }
635
- return (symToStringTag && symToStringTag in Object(value))
636
- ? getRawTag(value)
637
- : objectToString(value);
638
- }
639
-
640
- var _baseGetTag = baseGetTag$1;
641
-
642
- /**
643
- * Checks if `value` is the
644
- * [language type](http://www.ecma-international.org/ecma-262/7.0/#sec-ecmascript-language-types)
645
- * of `Object`. (e.g. arrays, functions, objects, regexes, `new Number(0)`, and `new String('')`)
646
- *
647
- * @static
648
- * @memberOf _
649
- * @since 0.1.0
650
- * @category Lang
651
- * @param {*} value The value to check.
652
- * @returns {boolean} Returns `true` if `value` is an object, else `false`.
653
- * @example
654
- *
655
- * _.isObject({});
656
- * // => true
657
- *
658
- * _.isObject([1, 2, 3]);
659
- * // => true
660
- *
661
- * _.isObject(_.noop);
662
- * // => true
663
- *
664
- * _.isObject(null);
665
- * // => false
666
- */
667
-
668
- function isObject$2(value) {
669
- var type = typeof value;
670
- return value != null && (type == 'object' || type == 'function');
671
- }
672
-
673
- var isObject_1 = isObject$2;
674
-
675
- var baseGetTag = _baseGetTag,
676
- isObject$1 = isObject_1;
677
-
678
- /** `Object#toString` result references. */
679
- var asyncTag = '[object AsyncFunction]',
680
- funcTag = '[object Function]',
681
- genTag = '[object GeneratorFunction]',
682
- proxyTag = '[object Proxy]';
683
-
684
- /**
685
- * Checks if `value` is classified as a `Function` object.
686
- *
687
- * @static
688
- * @memberOf _
689
- * @since 0.1.0
690
- * @category Lang
691
- * @param {*} value The value to check.
692
- * @returns {boolean} Returns `true` if `value` is a function, else `false`.
693
- * @example
694
- *
695
- * _.isFunction(_);
696
- * // => true
697
- *
698
- * _.isFunction(/abc/);
699
- * // => false
700
- */
701
- function isFunction$1(value) {
702
- if (!isObject$1(value)) {
703
- return false;
704
- }
705
- // The use of `Object#toString` avoids issues with the `typeof` operator
706
- // in Safari 9 which returns 'object' for typed arrays and other constructors.
707
- var tag = baseGetTag(value);
708
- return tag == funcTag || tag == genTag || tag == asyncTag || tag == proxyTag;
709
- }
710
-
711
- var isFunction_1 = isFunction$1;
712
-
713
- var root$2 = _root;
714
-
715
- /** Used to detect overreaching core-js shims. */
716
- var coreJsData$1 = root$2['__core-js_shared__'];
717
-
718
- var _coreJsData = coreJsData$1;
719
-
720
- var coreJsData = _coreJsData;
721
-
722
- /** Used to detect methods masquerading as native. */
723
- var maskSrcKey = (function() {
724
- var uid = /[^.]+$/.exec(coreJsData && coreJsData.keys && coreJsData.keys.IE_PROTO || '');
725
- return uid ? ('Symbol(src)_1.' + uid) : '';
726
- }());
727
-
728
- /**
729
- * Checks if `func` has its source masked.
730
- *
731
- * @private
732
- * @param {Function} func The function to check.
733
- * @returns {boolean} Returns `true` if `func` is masked, else `false`.
734
- */
735
- function isMasked$1(func) {
736
- return !!maskSrcKey && (maskSrcKey in func);
737
- }
738
-
739
- var _isMasked = isMasked$1;
740
-
741
- /** Used for built-in method references. */
742
-
743
- var funcProto$1 = Function.prototype;
744
-
745
- /** Used to resolve the decompiled source of functions. */
746
- var funcToString$1 = funcProto$1.toString;
747
-
748
- /**
749
- * Converts `func` to its source code.
750
- *
751
- * @private
752
- * @param {Function} func The function to convert.
753
- * @returns {string} Returns the source code.
754
- */
755
- function toSource$1(func) {
756
- if (func != null) {
757
- try {
758
- return funcToString$1.call(func);
759
- } catch (e) {}
760
- try {
761
- return (func + '');
762
- } catch (e) {}
763
- }
764
- return '';
765
- }
766
-
767
- var _toSource = toSource$1;
768
-
769
- var isFunction = isFunction_1,
770
- isMasked = _isMasked,
771
- isObject = isObject_1,
772
- toSource = _toSource;
773
-
774
- /**
775
- * Used to match `RegExp`
776
- * [syntax characters](http://ecma-international.org/ecma-262/7.0/#sec-patterns).
777
- */
778
- var reRegExpChar = /[\\^$.*+?()[\]{}|]/g;
779
-
780
- /** Used to detect host constructors (Safari). */
781
- var reIsHostCtor = /^\[object .+?Constructor\]$/;
782
-
783
- /** Used for built-in method references. */
784
- var funcProto = Function.prototype,
785
- objectProto$2 = Object.prototype;
786
-
787
- /** Used to resolve the decompiled source of functions. */
788
- var funcToString = funcProto.toString;
789
-
790
- /** Used to check objects for own properties. */
791
- var hasOwnProperty$2 = objectProto$2.hasOwnProperty;
792
-
793
- /** Used to detect if a method is native. */
794
- var reIsNative = RegExp('^' +
795
- funcToString.call(hasOwnProperty$2).replace(reRegExpChar, '\\$&')
796
- .replace(/hasOwnProperty|(function).*?(?=\\\()| for .+?(?=\\\])/g, '$1.*?') + '$'
797
- );
798
-
799
- /**
800
- * The base implementation of `_.isNative` without bad shim checks.
801
- *
802
- * @private
803
- * @param {*} value The value to check.
804
- * @returns {boolean} Returns `true` if `value` is a native function,
805
- * else `false`.
806
- */
807
- function baseIsNative$1(value) {
808
- if (!isObject(value) || isMasked(value)) {
809
- return false;
810
- }
811
- var pattern = isFunction(value) ? reIsNative : reIsHostCtor;
812
- return pattern.test(toSource(value));
813
- }
814
-
815
- var _baseIsNative = baseIsNative$1;
816
-
817
- /**
818
- * Gets the value at `key` of `object`.
819
- *
820
- * @private
821
- * @param {Object} [object] The object to query.
822
- * @param {string} key The key of the property to get.
823
- * @returns {*} Returns the property value.
824
- */
825
-
826
- function getValue$1(object, key) {
827
- return object == null ? undefined : object[key];
828
- }
829
-
830
- var _getValue = getValue$1;
831
-
832
- var baseIsNative = _baseIsNative,
833
- getValue = _getValue;
834
-
835
- /**
836
- * Gets the native function at `key` of `object`.
837
- *
838
- * @private
839
- * @param {Object} object The object to query.
840
- * @param {string} key The key of the method to get.
841
- * @returns {*} Returns the function if it's native, else `undefined`.
842
- */
843
- function getNative$3(object, key) {
844
- var value = getValue(object, key);
845
- return baseIsNative(value) ? value : undefined;
846
- }
847
-
848
- var _getNative = getNative$3;
849
-
850
- var getNative$2 = _getNative;
851
-
852
- /* Built-in method references that are verified to be native. */
853
- var nativeCreate$4 = getNative$2(Object, 'create');
854
-
855
- var _nativeCreate = nativeCreate$4;
856
-
857
- var nativeCreate$3 = _nativeCreate;
858
-
859
- /**
860
- * Removes all key-value entries from the hash.
861
- *
862
- * @private
863
- * @name clear
864
- * @memberOf Hash
865
- */
866
- function hashClear$1() {
867
- this.__data__ = nativeCreate$3 ? nativeCreate$3(null) : {};
868
- this.size = 0;
869
- }
870
-
871
- var _hashClear = hashClear$1;
872
-
873
- /**
874
- * Removes `key` and its value from the hash.
875
- *
876
- * @private
877
- * @name delete
878
- * @memberOf Hash
879
- * @param {Object} hash The hash to modify.
880
- * @param {string} key The key of the value to remove.
881
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
882
- */
883
-
884
- function hashDelete$1(key) {
885
- var result = this.has(key) && delete this.__data__[key];
886
- this.size -= result ? 1 : 0;
887
- return result;
888
- }
889
-
890
- var _hashDelete = hashDelete$1;
891
-
892
- var nativeCreate$2 = _nativeCreate;
893
-
894
- /** Used to stand-in for `undefined` hash values. */
895
- var HASH_UNDEFINED$2 = '__lodash_hash_undefined__';
896
-
897
- /** Used for built-in method references. */
898
- var objectProto$1 = Object.prototype;
899
-
900
- /** Used to check objects for own properties. */
901
- var hasOwnProperty$1 = objectProto$1.hasOwnProperty;
902
-
903
- /**
904
- * Gets the hash value for `key`.
905
- *
906
- * @private
907
- * @name get
908
- * @memberOf Hash
909
- * @param {string} key The key of the value to get.
910
- * @returns {*} Returns the entry value.
911
- */
912
- function hashGet$1(key) {
913
- var data = this.__data__;
914
- if (nativeCreate$2) {
915
- var result = data[key];
916
- return result === HASH_UNDEFINED$2 ? undefined : result;
917
- }
918
- return hasOwnProperty$1.call(data, key) ? data[key] : undefined;
919
- }
920
-
921
- var _hashGet = hashGet$1;
922
-
923
- var nativeCreate$1 = _nativeCreate;
924
-
925
- /** Used for built-in method references. */
926
- var objectProto = Object.prototype;
927
-
928
- /** Used to check objects for own properties. */
929
- var hasOwnProperty = objectProto.hasOwnProperty;
930
-
931
- /**
932
- * Checks if a hash value for `key` exists.
933
- *
934
- * @private
935
- * @name has
936
- * @memberOf Hash
937
- * @param {string} key The key of the entry to check.
938
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
939
- */
940
- function hashHas$1(key) {
941
- var data = this.__data__;
942
- return nativeCreate$1 ? (data[key] !== undefined) : hasOwnProperty.call(data, key);
943
- }
944
-
945
- var _hashHas = hashHas$1;
946
-
947
- var nativeCreate = _nativeCreate;
948
-
949
- /** Used to stand-in for `undefined` hash values. */
950
- var HASH_UNDEFINED$1 = '__lodash_hash_undefined__';
951
-
952
- /**
953
- * Sets the hash `key` to `value`.
954
- *
955
- * @private
956
- * @name set
957
- * @memberOf Hash
958
- * @param {string} key The key of the value to set.
959
- * @param {*} value The value to set.
960
- * @returns {Object} Returns the hash instance.
961
- */
962
- function hashSet$1(key, value) {
963
- var data = this.__data__;
964
- this.size += this.has(key) ? 0 : 1;
965
- data[key] = (nativeCreate && value === undefined) ? HASH_UNDEFINED$1 : value;
966
- return this;
967
- }
968
-
969
- var _hashSet = hashSet$1;
970
-
971
- var hashClear = _hashClear,
972
- hashDelete = _hashDelete,
973
- hashGet = _hashGet,
974
- hashHas = _hashHas,
975
- hashSet = _hashSet;
976
-
977
- /**
978
- * Creates a hash object.
979
- *
980
- * @private
981
- * @constructor
982
- * @param {Array} [entries] The key-value pairs to cache.
983
- */
984
- function Hash$1(entries) {
985
- var index = -1,
986
- length = entries == null ? 0 : entries.length;
987
-
988
- this.clear();
989
- while (++index < length) {
990
- var entry = entries[index];
991
- this.set(entry[0], entry[1]);
992
- }
993
- }
994
-
995
- // Add methods to `Hash`.
996
- Hash$1.prototype.clear = hashClear;
997
- Hash$1.prototype['delete'] = hashDelete;
998
- Hash$1.prototype.get = hashGet;
999
- Hash$1.prototype.has = hashHas;
1000
- Hash$1.prototype.set = hashSet;
1001
-
1002
- var _Hash = Hash$1;
1003
-
1004
- /**
1005
- * Removes all key-value entries from the list cache.
1006
- *
1007
- * @private
1008
- * @name clear
1009
- * @memberOf ListCache
1010
- */
1011
-
1012
- function listCacheClear$1() {
1013
- this.__data__ = [];
1014
- this.size = 0;
1015
- }
1016
-
1017
- var _listCacheClear = listCacheClear$1;
1018
-
1019
- /**
1020
- * Performs a
1021
- * [`SameValueZero`](http://ecma-international.org/ecma-262/7.0/#sec-samevaluezero)
1022
- * comparison between two values to determine if they are equivalent.
1023
- *
1024
- * @static
1025
- * @memberOf _
1026
- * @since 4.0.0
1027
- * @category Lang
1028
- * @param {*} value The value to compare.
1029
- * @param {*} other The other value to compare.
1030
- * @returns {boolean} Returns `true` if the values are equivalent, else `false`.
1031
- * @example
1032
- *
1033
- * var object = { 'a': 1 };
1034
- * var other = { 'a': 1 };
1035
- *
1036
- * _.eq(object, object);
1037
- * // => true
1038
- *
1039
- * _.eq(object, other);
1040
- * // => false
1041
- *
1042
- * _.eq('a', 'a');
1043
- * // => true
1044
- *
1045
- * _.eq('a', Object('a'));
1046
- * // => false
1047
- *
1048
- * _.eq(NaN, NaN);
1049
- * // => true
1050
- */
1051
-
1052
- function eq$1(value, other) {
1053
- return value === other || (value !== value && other !== other);
1054
- }
1055
-
1056
- var eq_1 = eq$1;
1057
-
1058
- var eq = eq_1;
1059
-
1060
- /**
1061
- * Gets the index at which the `key` is found in `array` of key-value pairs.
1062
- *
1063
- * @private
1064
- * @param {Array} array The array to inspect.
1065
- * @param {*} key The key to search for.
1066
- * @returns {number} Returns the index of the matched value, else `-1`.
1067
- */
1068
- function assocIndexOf$4(array, key) {
1069
- var length = array.length;
1070
- while (length--) {
1071
- if (eq(array[length][0], key)) {
1072
- return length;
1073
- }
1074
- }
1075
- return -1;
1076
- }
1077
-
1078
- var _assocIndexOf = assocIndexOf$4;
1079
-
1080
- var assocIndexOf$3 = _assocIndexOf;
1081
-
1082
- /** Used for built-in method references. */
1083
- var arrayProto = Array.prototype;
1084
-
1085
- /** Built-in value references. */
1086
- var splice = arrayProto.splice;
1087
-
1088
- /**
1089
- * Removes `key` and its value from the list cache.
1090
- *
1091
- * @private
1092
- * @name delete
1093
- * @memberOf ListCache
1094
- * @param {string} key The key of the value to remove.
1095
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1096
- */
1097
- function listCacheDelete$1(key) {
1098
- var data = this.__data__,
1099
- index = assocIndexOf$3(data, key);
1100
-
1101
- if (index < 0) {
1102
- return false;
1103
- }
1104
- var lastIndex = data.length - 1;
1105
- if (index == lastIndex) {
1106
- data.pop();
1107
- } else {
1108
- splice.call(data, index, 1);
1109
- }
1110
- --this.size;
1111
- return true;
1112
- }
1113
-
1114
- var _listCacheDelete = listCacheDelete$1;
1115
-
1116
- var assocIndexOf$2 = _assocIndexOf;
1117
-
1118
- /**
1119
- * Gets the list cache value for `key`.
1120
- *
1121
- * @private
1122
- * @name get
1123
- * @memberOf ListCache
1124
- * @param {string} key The key of the value to get.
1125
- * @returns {*} Returns the entry value.
1126
- */
1127
- function listCacheGet$1(key) {
1128
- var data = this.__data__,
1129
- index = assocIndexOf$2(data, key);
1130
-
1131
- return index < 0 ? undefined : data[index][1];
1132
- }
1133
-
1134
- var _listCacheGet = listCacheGet$1;
1135
-
1136
- var assocIndexOf$1 = _assocIndexOf;
1137
-
1138
- /**
1139
- * Checks if a list cache value for `key` exists.
1140
- *
1141
- * @private
1142
- * @name has
1143
- * @memberOf ListCache
1144
- * @param {string} key The key of the entry to check.
1145
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1146
- */
1147
- function listCacheHas$1(key) {
1148
- return assocIndexOf$1(this.__data__, key) > -1;
1149
- }
1150
-
1151
- var _listCacheHas = listCacheHas$1;
1152
-
1153
- var assocIndexOf = _assocIndexOf;
1154
-
1155
- /**
1156
- * Sets the list cache `key` to `value`.
1157
- *
1158
- * @private
1159
- * @name set
1160
- * @memberOf ListCache
1161
- * @param {string} key The key of the value to set.
1162
- * @param {*} value The value to set.
1163
- * @returns {Object} Returns the list cache instance.
1164
- */
1165
- function listCacheSet$1(key, value) {
1166
- var data = this.__data__,
1167
- index = assocIndexOf(data, key);
1168
-
1169
- if (index < 0) {
1170
- ++this.size;
1171
- data.push([key, value]);
1172
- } else {
1173
- data[index][1] = value;
1174
- }
1175
- return this;
1176
- }
1177
-
1178
- var _listCacheSet = listCacheSet$1;
1179
-
1180
- var listCacheClear = _listCacheClear,
1181
- listCacheDelete = _listCacheDelete,
1182
- listCacheGet = _listCacheGet,
1183
- listCacheHas = _listCacheHas,
1184
- listCacheSet = _listCacheSet;
1185
-
1186
- /**
1187
- * Creates an list cache object.
1188
- *
1189
- * @private
1190
- * @constructor
1191
- * @param {Array} [entries] The key-value pairs to cache.
1192
- */
1193
- function ListCache$1(entries) {
1194
- var index = -1,
1195
- length = entries == null ? 0 : entries.length;
1196
-
1197
- this.clear();
1198
- while (++index < length) {
1199
- var entry = entries[index];
1200
- this.set(entry[0], entry[1]);
1201
- }
1202
- }
1203
-
1204
- // Add methods to `ListCache`.
1205
- ListCache$1.prototype.clear = listCacheClear;
1206
- ListCache$1.prototype['delete'] = listCacheDelete;
1207
- ListCache$1.prototype.get = listCacheGet;
1208
- ListCache$1.prototype.has = listCacheHas;
1209
- ListCache$1.prototype.set = listCacheSet;
1210
-
1211
- var _ListCache = ListCache$1;
1212
-
1213
- var getNative$1 = _getNative,
1214
- root$1 = _root;
1215
-
1216
- /* Built-in method references that are verified to be native. */
1217
- var Map$2 = getNative$1(root$1, 'Map');
1218
-
1219
- var _Map = Map$2;
1220
-
1221
- var Hash = _Hash,
1222
- ListCache = _ListCache,
1223
- Map$1 = _Map;
1224
-
1225
- /**
1226
- * Removes all key-value entries from the map.
1227
- *
1228
- * @private
1229
- * @name clear
1230
- * @memberOf MapCache
1231
- */
1232
- function mapCacheClear$1() {
1233
- this.size = 0;
1234
- this.__data__ = {
1235
- 'hash': new Hash,
1236
- 'map': new (Map$1 || ListCache),
1237
- 'string': new Hash
1238
- };
1239
- }
1240
-
1241
- var _mapCacheClear = mapCacheClear$1;
1242
-
1243
- /**
1244
- * Checks if `value` is suitable for use as unique object key.
1245
- *
1246
- * @private
1247
- * @param {*} value The value to check.
1248
- * @returns {boolean} Returns `true` if `value` is suitable, else `false`.
1249
- */
1250
-
1251
- function isKeyable$1(value) {
1252
- var type = typeof value;
1253
- return (type == 'string' || type == 'number' || type == 'symbol' || type == 'boolean')
1254
- ? (value !== '__proto__')
1255
- : (value === null);
1256
- }
1257
-
1258
- var _isKeyable = isKeyable$1;
1259
-
1260
- var isKeyable = _isKeyable;
1261
-
1262
- /**
1263
- * Gets the data for `map`.
1264
- *
1265
- * @private
1266
- * @param {Object} map The map to query.
1267
- * @param {string} key The reference key.
1268
- * @returns {*} Returns the map data.
1269
- */
1270
- function getMapData$4(map, key) {
1271
- var data = map.__data__;
1272
- return isKeyable(key)
1273
- ? data[typeof key == 'string' ? 'string' : 'hash']
1274
- : data.map;
1275
- }
1276
-
1277
- var _getMapData = getMapData$4;
1278
-
1279
- var getMapData$3 = _getMapData;
1280
-
1281
- /**
1282
- * Removes `key` and its value from the map.
1283
- *
1284
- * @private
1285
- * @name delete
1286
- * @memberOf MapCache
1287
- * @param {string} key The key of the value to remove.
1288
- * @returns {boolean} Returns `true` if the entry was removed, else `false`.
1289
- */
1290
- function mapCacheDelete$1(key) {
1291
- var result = getMapData$3(this, key)['delete'](key);
1292
- this.size -= result ? 1 : 0;
1293
- return result;
1294
- }
1295
-
1296
- var _mapCacheDelete = mapCacheDelete$1;
1297
-
1298
- var getMapData$2 = _getMapData;
1299
-
1300
- /**
1301
- * Gets the map value for `key`.
1302
- *
1303
- * @private
1304
- * @name get
1305
- * @memberOf MapCache
1306
- * @param {string} key The key of the value to get.
1307
- * @returns {*} Returns the entry value.
1308
- */
1309
- function mapCacheGet$1(key) {
1310
- return getMapData$2(this, key).get(key);
1311
- }
1312
-
1313
- var _mapCacheGet = mapCacheGet$1;
1314
-
1315
- var getMapData$1 = _getMapData;
1316
-
1317
- /**
1318
- * Checks if a map value for `key` exists.
1319
- *
1320
- * @private
1321
- * @name has
1322
- * @memberOf MapCache
1323
- * @param {string} key The key of the entry to check.
1324
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1325
- */
1326
- function mapCacheHas$1(key) {
1327
- return getMapData$1(this, key).has(key);
1328
- }
1329
-
1330
- var _mapCacheHas = mapCacheHas$1;
1331
-
1332
- var getMapData = _getMapData;
1333
-
1334
- /**
1335
- * Sets the map `key` to `value`.
1336
- *
1337
- * @private
1338
- * @name set
1339
- * @memberOf MapCache
1340
- * @param {string} key The key of the value to set.
1341
- * @param {*} value The value to set.
1342
- * @returns {Object} Returns the map cache instance.
1343
- */
1344
- function mapCacheSet$1(key, value) {
1345
- var data = getMapData(this, key),
1346
- size = data.size;
1347
-
1348
- data.set(key, value);
1349
- this.size += data.size == size ? 0 : 1;
1350
- return this;
1351
- }
1352
-
1353
- var _mapCacheSet = mapCacheSet$1;
1354
-
1355
- var mapCacheClear = _mapCacheClear,
1356
- mapCacheDelete = _mapCacheDelete,
1357
- mapCacheGet = _mapCacheGet,
1358
- mapCacheHas = _mapCacheHas,
1359
- mapCacheSet = _mapCacheSet;
1360
-
1361
- /**
1362
- * Creates a map cache object to store key-value pairs.
1363
- *
1364
- * @private
1365
- * @constructor
1366
- * @param {Array} [entries] The key-value pairs to cache.
1367
- */
1368
- function MapCache$1(entries) {
1369
- var index = -1,
1370
- length = entries == null ? 0 : entries.length;
1371
-
1372
- this.clear();
1373
- while (++index < length) {
1374
- var entry = entries[index];
1375
- this.set(entry[0], entry[1]);
1376
- }
1377
- }
1378
-
1379
- // Add methods to `MapCache`.
1380
- MapCache$1.prototype.clear = mapCacheClear;
1381
- MapCache$1.prototype['delete'] = mapCacheDelete;
1382
- MapCache$1.prototype.get = mapCacheGet;
1383
- MapCache$1.prototype.has = mapCacheHas;
1384
- MapCache$1.prototype.set = mapCacheSet;
1385
-
1386
- var _MapCache = MapCache$1;
1387
-
1388
- /** Used to stand-in for `undefined` hash values. */
1389
-
1390
- var HASH_UNDEFINED = '__lodash_hash_undefined__';
1391
-
1392
- /**
1393
- * Adds `value` to the array cache.
1394
- *
1395
- * @private
1396
- * @name add
1397
- * @memberOf SetCache
1398
- * @alias push
1399
- * @param {*} value The value to cache.
1400
- * @returns {Object} Returns the cache instance.
1401
- */
1402
- function setCacheAdd$1(value) {
1403
- this.__data__.set(value, HASH_UNDEFINED);
1404
- return this;
1405
- }
1406
-
1407
- var _setCacheAdd = setCacheAdd$1;
1408
-
1409
- /**
1410
- * Checks if `value` is in the array cache.
1411
- *
1412
- * @private
1413
- * @name has
1414
- * @memberOf SetCache
1415
- * @param {*} value The value to search for.
1416
- * @returns {number} Returns `true` if `value` is found, else `false`.
1417
- */
1418
-
1419
- function setCacheHas$1(value) {
1420
- return this.__data__.has(value);
1421
- }
1422
-
1423
- var _setCacheHas = setCacheHas$1;
1424
-
1425
- var MapCache = _MapCache,
1426
- setCacheAdd = _setCacheAdd,
1427
- setCacheHas = _setCacheHas;
1428
-
1429
- /**
1430
- *
1431
- * Creates an array cache object to store unique values.
1432
- *
1433
- * @private
1434
- * @constructor
1435
- * @param {Array} [values] The values to cache.
1436
- */
1437
- function SetCache$1(values) {
1438
- var index = -1,
1439
- length = values == null ? 0 : values.length;
1440
-
1441
- this.__data__ = new MapCache;
1442
- while (++index < length) {
1443
- this.add(values[index]);
1444
- }
1445
- }
1446
-
1447
- // Add methods to `SetCache`.
1448
- SetCache$1.prototype.add = SetCache$1.prototype.push = setCacheAdd;
1449
- SetCache$1.prototype.has = setCacheHas;
1450
-
1451
- var _SetCache = SetCache$1;
1452
-
1453
- /**
1454
- * The base implementation of `_.findIndex` and `_.findLastIndex` without
1455
- * support for iteratee shorthands.
1456
- *
1457
- * @private
1458
- * @param {Array} array The array to inspect.
1459
- * @param {Function} predicate The function invoked per iteration.
1460
- * @param {number} fromIndex The index to search from.
1461
- * @param {boolean} [fromRight] Specify iterating from right to left.
1462
- * @returns {number} Returns the index of the matched value, else `-1`.
1463
- */
1464
-
1465
- function baseFindIndex$1(array, predicate, fromIndex, fromRight) {
1466
- var length = array.length,
1467
- index = fromIndex + (fromRight ? 1 : -1);
1468
-
1469
- while ((fromRight ? index-- : ++index < length)) {
1470
- if (predicate(array[index], index, array)) {
1471
- return index;
1472
- }
1473
- }
1474
- return -1;
1475
- }
1476
-
1477
- var _baseFindIndex = baseFindIndex$1;
1478
-
1479
- /**
1480
- * The base implementation of `_.isNaN` without support for number objects.
1481
- *
1482
- * @private
1483
- * @param {*} value The value to check.
1484
- * @returns {boolean} Returns `true` if `value` is `NaN`, else `false`.
1485
- */
1486
-
1487
- function baseIsNaN$1(value) {
1488
- return value !== value;
1489
- }
1490
-
1491
- var _baseIsNaN = baseIsNaN$1;
1492
-
1493
- /**
1494
- * A specialized version of `_.indexOf` which performs strict equality
1495
- * comparisons of values, i.e. `===`.
1496
- *
1497
- * @private
1498
- * @param {Array} array The array to inspect.
1499
- * @param {*} value The value to search for.
1500
- * @param {number} fromIndex The index to search from.
1501
- * @returns {number} Returns the index of the matched value, else `-1`.
1502
- */
1503
-
1504
- function strictIndexOf$1(array, value, fromIndex) {
1505
- var index = fromIndex - 1,
1506
- length = array.length;
1507
-
1508
- while (++index < length) {
1509
- if (array[index] === value) {
1510
- return index;
1511
- }
1512
- }
1513
- return -1;
1514
- }
1515
-
1516
- var _strictIndexOf = strictIndexOf$1;
1517
-
1518
- var baseFindIndex = _baseFindIndex,
1519
- baseIsNaN = _baseIsNaN,
1520
- strictIndexOf = _strictIndexOf;
1521
-
1522
- /**
1523
- * The base implementation of `_.indexOf` without `fromIndex` bounds checks.
1524
- *
1525
- * @private
1526
- * @param {Array} array The array to inspect.
1527
- * @param {*} value The value to search for.
1528
- * @param {number} fromIndex The index to search from.
1529
- * @returns {number} Returns the index of the matched value, else `-1`.
1530
- */
1531
- function baseIndexOf$1(array, value, fromIndex) {
1532
- return value === value
1533
- ? strictIndexOf(array, value, fromIndex)
1534
- : baseFindIndex(array, baseIsNaN, fromIndex);
1535
- }
1536
-
1537
- var _baseIndexOf = baseIndexOf$1;
1538
-
1539
- var baseIndexOf = _baseIndexOf;
1540
-
1541
- /**
1542
- * A specialized version of `_.includes` for arrays without support for
1543
- * specifying an index to search from.
1544
- *
1545
- * @private
1546
- * @param {Array} [array] The array to inspect.
1547
- * @param {*} target The value to search for.
1548
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
1549
- */
1550
- function arrayIncludes$1(array, value) {
1551
- var length = array == null ? 0 : array.length;
1552
- return !!length && baseIndexOf(array, value, 0) > -1;
1553
- }
1554
-
1555
- var _arrayIncludes = arrayIncludes$1;
1556
-
1557
- /**
1558
- * This function is like `arrayIncludes` except that it accepts a comparator.
1559
- *
1560
- * @private
1561
- * @param {Array} [array] The array to inspect.
1562
- * @param {*} target The value to search for.
1563
- * @param {Function} comparator The comparator invoked per element.
1564
- * @returns {boolean} Returns `true` if `target` is found, else `false`.
1565
- */
1566
-
1567
- function arrayIncludesWith$1(array, value, comparator) {
1568
- var index = -1,
1569
- length = array == null ? 0 : array.length;
1570
-
1571
- while (++index < length) {
1572
- if (comparator(value, array[index])) {
1573
- return true;
1574
- }
1575
- }
1576
- return false;
1577
- }
1578
-
1579
- var _arrayIncludesWith = arrayIncludesWith$1;
1580
-
1581
- /**
1582
- * Checks if a `cache` value for `key` exists.
1583
- *
1584
- * @private
1585
- * @param {Object} cache The cache to query.
1586
- * @param {string} key The key of the entry to check.
1587
- * @returns {boolean} Returns `true` if an entry for `key` exists, else `false`.
1588
- */
1589
-
1590
- function cacheHas$1(cache, key) {
1591
- return cache.has(key);
1592
- }
1593
-
1594
- var _cacheHas = cacheHas$1;
1595
-
1596
- var getNative = _getNative,
1597
- root = _root;
1598
-
1599
- /* Built-in method references that are verified to be native. */
1600
- var Set$1 = getNative(root, 'Set');
1601
-
1602
- var _Set = Set$1;
1603
-
1604
- /**
1605
- * This method returns `undefined`.
1606
- *
1607
- * @static
1608
- * @memberOf _
1609
- * @since 2.3.0
1610
- * @category Util
1611
- * @example
1612
- *
1613
- * _.times(2, _.noop);
1614
- * // => [undefined, undefined]
1615
- */
1616
-
1617
- function noop$1() {
1618
- // No operation performed.
1619
- }
1620
-
1621
- var noop_1 = noop$1;
1622
-
1623
- /**
1624
- * Converts `set` to an array of its values.
1625
- *
1626
- * @private
1627
- * @param {Object} set The set to convert.
1628
- * @returns {Array} Returns the values.
1629
- */
1630
-
1631
- function setToArray$2(set) {
1632
- var index = -1,
1633
- result = Array(set.size);
1634
-
1635
- set.forEach(function(value) {
1636
- result[++index] = value;
1637
- });
1638
- return result;
1639
- }
1640
-
1641
- var _setToArray = setToArray$2;
1642
-
1643
- var Set = _Set,
1644
- noop = noop_1,
1645
- setToArray$1 = _setToArray;
1646
-
1647
- /** Used as references for various `Number` constants. */
1648
- var INFINITY = 1 / 0;
1649
-
1650
- /**
1651
- * Creates a set object of `values`.
1652
- *
1653
- * @private
1654
- * @param {Array} values The values to add to the set.
1655
- * @returns {Object} Returns the new set.
1656
- */
1657
- var createSet$1 = !(Set && (1 / setToArray$1(new Set([,-0]))[1]) == INFINITY) ? noop : function(values) {
1658
- return new Set(values);
1659
- };
1660
-
1661
- var _createSet = createSet$1;
1662
-
1663
- var SetCache = _SetCache,
1664
- arrayIncludes = _arrayIncludes,
1665
- arrayIncludesWith = _arrayIncludesWith,
1666
- cacheHas = _cacheHas,
1667
- createSet = _createSet,
1668
- setToArray = _setToArray;
1669
-
1670
- /** Used as the size to enable large array optimizations. */
1671
- var LARGE_ARRAY_SIZE = 200;
1672
-
1673
- /**
1674
- * The base implementation of `_.uniqBy` without support for iteratee shorthands.
1675
- *
1676
- * @private
1677
- * @param {Array} array The array to inspect.
1678
- * @param {Function} [iteratee] The iteratee invoked per element.
1679
- * @param {Function} [comparator] The comparator invoked per element.
1680
- * @returns {Array} Returns the new duplicate free array.
1681
- */
1682
- function baseUniq$1(array, iteratee, comparator) {
1683
- var index = -1,
1684
- includes = arrayIncludes,
1685
- length = array.length,
1686
- isCommon = true,
1687
- result = [],
1688
- seen = result;
1689
-
1690
- if (comparator) {
1691
- isCommon = false;
1692
- includes = arrayIncludesWith;
1693
- }
1694
- else if (length >= LARGE_ARRAY_SIZE) {
1695
- var set = iteratee ? null : createSet(array);
1696
- if (set) {
1697
- return setToArray(set);
1698
- }
1699
- isCommon = false;
1700
- includes = cacheHas;
1701
- seen = new SetCache;
1702
- }
1703
- else {
1704
- seen = iteratee ? [] : result;
1705
- }
1706
- outer:
1707
- while (++index < length) {
1708
- var value = array[index],
1709
- computed = iteratee ? iteratee(value) : value;
1710
-
1711
- value = (comparator || value !== 0) ? value : 0;
1712
- if (isCommon && computed === computed) {
1713
- var seenIndex = seen.length;
1714
- while (seenIndex--) {
1715
- if (seen[seenIndex] === computed) {
1716
- continue outer;
1717
- }
1718
- }
1719
- if (iteratee) {
1720
- seen.push(computed);
1721
- }
1722
- result.push(value);
1723
- }
1724
- else if (!includes(seen, computed, comparator)) {
1725
- if (seen !== result) {
1726
- seen.push(computed);
1727
- }
1728
- result.push(value);
1729
- }
1730
- }
1731
- return result;
1732
- }
1733
-
1734
- var _baseUniq = baseUniq$1;
1735
-
1736
- var baseUniq = _baseUniq;
1737
-
1738
- /**
1739
- * This method is like `_.uniq` except that it accepts `comparator` which
1740
- * is invoked to compare elements of `array`. The order of result values is
1741
- * determined by the order they occur in the array.The comparator is invoked
1742
- * with two arguments: (arrVal, othVal).
1743
- *
1744
- * @static
1745
- * @memberOf _
1746
- * @since 4.0.0
1747
- * @category Array
1748
- * @param {Array} array The array to inspect.
1749
- * @param {Function} [comparator] The comparator invoked per element.
1750
- * @returns {Array} Returns the new duplicate free array.
1751
- * @example
1752
- *
1753
- * var objects = [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }, { 'x': 1, 'y': 2 }];
1754
- *
1755
- * _.uniqWith(objects, _.isEqual);
1756
- * // => [{ 'x': 1, 'y': 2 }, { 'x': 2, 'y': 1 }]
1757
- */
1758
- function uniqWith(array, comparator) {
1759
- comparator = typeof comparator == 'function' ? comparator : undefined;
1760
- return (array && array.length) ? baseUniq(array, undefined, comparator) : [];
1761
- }
1762
-
1763
- var uniqWith_1 = uniqWith;
1764
-
1765
517
  /**
1766
518
  * 场景解析器
1767
519
  * @param rawScene 原始场景
@@ -1781,15 +533,15 @@ const sceneParser = (rawScene, sceneName, sceneUrl, assetsPrefetcher, assetSette
1781
533
  // .filter((sentence) => sentence.trim() !== "");
1782
534
  let assetsList = []; // 场景资源列表
1783
535
  let subSceneList = []; // 子场景列表
1784
- const sentenceList = rawSentenceListWithoutEmpty.map((sentence) => {
1785
- const returnSentence = scriptParser(sentence, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG_MAP);
536
+ const sentenceList = rawSentenceListWithoutEmpty.map((sentence, index) => {
537
+ const returnSentence = scriptParser(sentence, assetSetter, ADD_NEXT_ARG_LIST, SCRIPT_CONFIG_MAP, index);
1786
538
  // 在这里解析出语句可能携带的资源和场景,合并到 assetsList 和 subSceneList
1787
539
  assetsList = [...assetsList, ...returnSentence.sentenceAssets];
1788
540
  subSceneList = [...subSceneList, ...returnSentence.subScene];
1789
541
  return returnSentence;
1790
542
  });
1791
543
  // 开始资源的预加载
1792
- assetsList = uniqWith_1(assetsList); // 去重
544
+ assetsList = deduplicateAssets(assetsList);
1793
545
  assetsPrefetcher(assetsList);
1794
546
  return {
1795
547
  sceneName: sceneName,
@@ -1798,6 +550,20 @@ const sceneParser = (rawScene, sceneName, sceneUrl, assetsPrefetcher, assetSette
1798
550
  assetsList: assetsList,
1799
551
  subSceneList: subSceneList, // 子场景列表
1800
552
  };
553
+ };
554
+ const deduplicateAssets = (assetsList) => {
555
+ const seenAssets = new Set();
556
+ return assetsList.filter((asset) => {
557
+ if (!asset || typeof asset.url !== 'string' || asset.url === '') {
558
+ return false;
559
+ }
560
+ const assetKey = `${asset.type}:${asset.url}`;
561
+ if (seenAssets.has(assetKey)) {
562
+ return false;
563
+ }
564
+ seenAssets.add(assetKey);
565
+ return true;
566
+ });
1801
567
  };
1802
568
 
1803
569
  function scss2cssinjsParser(scssString) {