@cruglobal/godtools-shared 0.9.0-SNAPSHOT.1218 → 0.9.0-SNAPSHOT.1234

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.
@@ -679,6 +679,32 @@ if (typeof Math.imul === 'undefined') {
679
679
  }
680
680
  return max;
681
681
  }
682
+ function toSet_0(_this__u8e3s4) {
683
+ if (isInterface(_this__u8e3s4, Collection)) {
684
+ var tmp0_subject = _this__u8e3s4.i();
685
+ var tmp;
686
+ switch (tmp0_subject) {
687
+ case 0:
688
+ tmp = emptySet();
689
+ break;
690
+ case 1:
691
+ var tmp_0;
692
+ if (isInterface(_this__u8e3s4, List)) {
693
+ tmp_0 = _this__u8e3s4.j(0);
694
+ } else {
695
+ tmp_0 = _this__u8e3s4.f().h();
696
+ }
697
+
698
+ tmp = setOf(tmp_0);
699
+ break;
700
+ default:
701
+ tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.i())));
702
+ break;
703
+ }
704
+ return tmp;
705
+ }
706
+ return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));
707
+ }
682
708
  function firstOrNull(_this__u8e3s4) {
683
709
  return _this__u8e3s4.m() ? null : _this__u8e3s4.j(0);
684
710
  }
@@ -713,32 +739,6 @@ if (typeof Math.imul === 'undefined') {
713
739
  }
714
740
  return optimizeReadOnlyList(list);
715
741
  }
716
- function toSet_0(_this__u8e3s4) {
717
- if (isInterface(_this__u8e3s4, Collection)) {
718
- var tmp0_subject = _this__u8e3s4.i();
719
- var tmp;
720
- switch (tmp0_subject) {
721
- case 0:
722
- tmp = emptySet();
723
- break;
724
- case 1:
725
- var tmp_0;
726
- if (isInterface(_this__u8e3s4, List)) {
727
- tmp_0 = _this__u8e3s4.j(0);
728
- } else {
729
- tmp_0 = _this__u8e3s4.f().h();
730
- }
731
-
732
- tmp = setOf(tmp_0);
733
- break;
734
- default:
735
- tmp = toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$_1(mapCapacity(_this__u8e3s4.i())));
736
- break;
737
- }
738
- return tmp;
739
- }
740
- return optimizeReadOnlySet(toCollection_0(_this__u8e3s4, LinkedHashSet_init_$Create$()));
741
- }
742
742
  function lastOrNull(_this__u8e3s4) {
743
743
  return _this__u8e3s4.m() ? null : _this__u8e3s4.j(_this__u8e3s4.i() - 1 | 0);
744
744
  }
@@ -2591,6 +2591,30 @@ if (typeof Math.imul === 'undefined') {
2591
2591
  tmp$ret$3 = tmp$ret$2;
2592
2592
  return tmp$ret$3;
2593
2593
  }
2594
+ function split_0(_this__u8e3s4, delimiters, ignoreCase, limit) {
2595
+ ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2596
+ limit = limit === VOID ? 0 : limit;
2597
+ if (delimiters.length === 1) {
2598
+ return split_1(_this__u8e3s4, toString_0(delimiters[0]), ignoreCase, limit);
2599
+ }
2600
+ var tmp$ret$2;
2601
+ // Inline function 'kotlin.collections.map' call
2602
+ var tmp1_map = asIterable(rangesDelimitedBy_0(_this__u8e3s4, delimiters, VOID, ignoreCase, limit));
2603
+ var tmp$ret$1;
2604
+ // Inline function 'kotlin.collections.mapTo' call
2605
+ var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
2606
+ var tmp0_iterator = tmp1_map.f();
2607
+ while (tmp0_iterator.g()) {
2608
+ var item = tmp0_iterator.h();
2609
+ var tmp$ret$0;
2610
+ // Inline function 'kotlin.text.split.<anonymous>' call
2611
+ tmp$ret$0 = substring(_this__u8e3s4, item);
2612
+ tmp0_mapTo.b(tmp$ret$0);
2613
+ }
2614
+ tmp$ret$1 = tmp0_mapTo;
2615
+ tmp$ret$2 = tmp$ret$1;
2616
+ return tmp$ret$2;
2617
+ }
2594
2618
  function trimEnd(_this__u8e3s4, chars) {
2595
2619
  var tmp$ret$2;
2596
2620
  // Inline function 'kotlin.text.trimEnd' call
@@ -2618,43 +2642,23 @@ if (typeof Math.imul === 'undefined') {
2618
2642
  tmp$ret$2 = toString_2(tmp$ret$1);
2619
2643
  return tmp$ret$2;
2620
2644
  }
2621
- function split_0(_this__u8e3s4, delimiters, ignoreCase, limit) {
2645
+ function contains_4(_this__u8e3s4, char, ignoreCase) {
2622
2646
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2623
- limit = limit === VOID ? 0 : limit;
2624
- if (delimiters.length === 1) {
2625
- return split_1(_this__u8e3s4, toString_0(delimiters[0]), ignoreCase, limit);
2626
- }
2627
- var tmp$ret$2;
2628
- // Inline function 'kotlin.collections.map' call
2629
- var tmp1_map = asIterable(rangesDelimitedBy_0(_this__u8e3s4, delimiters, VOID, ignoreCase, limit));
2630
- var tmp$ret$1;
2631
- // Inline function 'kotlin.collections.mapTo' call
2632
- var tmp0_mapTo = ArrayList_init_$Create$_0(collectionSizeOrDefault(tmp1_map, 10));
2633
- var tmp0_iterator = tmp1_map.f();
2634
- while (tmp0_iterator.g()) {
2635
- var item = tmp0_iterator.h();
2636
- var tmp$ret$0;
2637
- // Inline function 'kotlin.text.split.<anonymous>' call
2638
- tmp$ret$0 = substring(_this__u8e3s4, item);
2639
- tmp0_mapTo.b(tmp$ret$0);
2640
- }
2641
- tmp$ret$1 = tmp0_mapTo;
2642
- tmp$ret$2 = tmp$ret$1;
2643
- return tmp$ret$2;
2647
+ return indexOf_1(_this__u8e3s4, char, VOID, ignoreCase) >= 0;
2644
2648
  }
2645
- function contains_4(_this__u8e3s4, other, ignoreCase) {
2649
+ function contains_5(_this__u8e3s4, other, ignoreCase) {
2646
2650
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2647
2651
  var tmp;
2648
2652
  if (typeof other === 'string') {
2649
- tmp = indexOf_1(_this__u8e3s4, other, VOID, ignoreCase) >= 0;
2653
+ tmp = indexOf_2(_this__u8e3s4, other, VOID, ignoreCase) >= 0;
2650
2654
  } else {
2651
- tmp = indexOf_2(_this__u8e3s4, other, 0, charSequenceLength(_this__u8e3s4), ignoreCase) >= 0;
2655
+ tmp = indexOf_3(_this__u8e3s4, other, 0, charSequenceLength(_this__u8e3s4), ignoreCase) >= 0;
2652
2656
  }
2653
2657
  return tmp;
2654
2658
  }
2655
2659
  function substringBefore(_this__u8e3s4, delimiter, missingDelimiterValue) {
2656
2660
  missingDelimiterValue = missingDelimiterValue === VOID ? _this__u8e3s4 : missingDelimiterValue;
2657
- var index = indexOf_1(_this__u8e3s4, delimiter);
2661
+ var index = indexOf_2(_this__u8e3s4, delimiter);
2658
2662
  var tmp;
2659
2663
  if (index === -1) {
2660
2664
  tmp = missingDelimiterValue;
@@ -2669,14 +2673,10 @@ if (typeof Math.imul === 'undefined') {
2669
2673
  }
2670
2674
  return tmp;
2671
2675
  }
2672
- function contains_5(_this__u8e3s4, char, ignoreCase) {
2673
- ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2674
- return indexOf_3(_this__u8e3s4, char, VOID, ignoreCase) >= 0;
2675
- }
2676
2676
  function split_1(_this__u8e3s4, delimiter, ignoreCase, limit) {
2677
2677
  requireNonNegativeLimit(limit);
2678
2678
  var currentOffset = 0;
2679
- var nextIndex = indexOf_1(_this__u8e3s4, delimiter, currentOffset, ignoreCase);
2679
+ var nextIndex = indexOf_2(_this__u8e3s4, delimiter, currentOffset, ignoreCase);
2680
2680
  if (nextIndex === -1 ? true : limit === 1) {
2681
2681
  return listOf_0(toString_2(_this__u8e3s4));
2682
2682
  }
@@ -2692,7 +2692,7 @@ if (typeof Math.imul === 'undefined') {
2692
2692
  currentOffset = nextIndex + delimiter.length | 0;
2693
2693
  if (isLimited ? result.i() === (limit - 1 | 0) : false)
2694
2694
  break $l$loop;
2695
- nextIndex = indexOf_1(_this__u8e3s4, delimiter, currentOffset, ignoreCase);
2695
+ nextIndex = indexOf_2(_this__u8e3s4, delimiter, currentOffset, ignoreCase);
2696
2696
  }
2697
2697
  while (!(nextIndex === -1));
2698
2698
  var tmp$ret$1;
@@ -2714,6 +2714,13 @@ if (typeof Math.imul === 'undefined') {
2714
2714
  var delimitersList = asList(delimiters);
2715
2715
  return new DelimitedRangesSequence(_this__u8e3s4, startIndex, limit, rangesDelimitedBy$lambda(delimitersList, ignoreCase));
2716
2716
  }
2717
+ function rangesDelimitedBy_0(_this__u8e3s4, delimiters, startIndex, ignoreCase, limit) {
2718
+ startIndex = startIndex === VOID ? 0 : startIndex;
2719
+ ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2720
+ limit = limit === VOID ? 0 : limit;
2721
+ requireNonNegativeLimit(limit);
2722
+ return new DelimitedRangesSequence(_this__u8e3s4, startIndex, limit, rangesDelimitedBy$lambda_0(delimiters, ignoreCase));
2723
+ }
2717
2724
  function trim(_this__u8e3s4) {
2718
2725
  var tmp$ret$0;
2719
2726
  // Inline function 'kotlin.text.trim' call
@@ -2738,14 +2745,38 @@ if (typeof Math.imul === 'undefined') {
2738
2745
  tmp$ret$0 = charSequenceSubSequence(_this__u8e3s4, startIndex, endIndex + 1 | 0);
2739
2746
  return tmp$ret$0;
2740
2747
  }
2741
- function rangesDelimitedBy_0(_this__u8e3s4, delimiters, startIndex, ignoreCase, limit) {
2748
+ function indexOf_1(_this__u8e3s4, char, startIndex, ignoreCase) {
2742
2749
  startIndex = startIndex === VOID ? 0 : startIndex;
2743
2750
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2744
- limit = limit === VOID ? 0 : limit;
2745
- requireNonNegativeLimit(limit);
2746
- return new DelimitedRangesSequence(_this__u8e3s4, startIndex, limit, rangesDelimitedBy$lambda_0(delimiters, ignoreCase));
2751
+ var tmp;
2752
+ var tmp_0;
2753
+ if (ignoreCase) {
2754
+ tmp_0 = true;
2755
+ } else {
2756
+ tmp_0 = !(typeof _this__u8e3s4 === 'string');
2757
+ }
2758
+ if (tmp_0) {
2759
+ var tmp$ret$0;
2760
+ // Inline function 'kotlin.charArrayOf' call
2761
+ tmp$ret$0 = charArrayOf([char]);
2762
+ tmp = indexOfAny(_this__u8e3s4, tmp$ret$0, startIndex, ignoreCase);
2763
+ } else {
2764
+ var tmp$ret$3;
2765
+ // Inline function 'kotlin.text.nativeIndexOf' call
2766
+ var tmp1_nativeIndexOf = _this__u8e3s4;
2767
+ var tmp$ret$2;
2768
+ // Inline function 'kotlin.text.nativeIndexOf' call
2769
+ var tmp0_nativeIndexOf = toString_0(char);
2770
+ var tmp$ret$1;
2771
+ // Inline function 'kotlin.js.asDynamic' call
2772
+ tmp$ret$1 = tmp1_nativeIndexOf;
2773
+ tmp$ret$2 = tmp$ret$1.indexOf(tmp0_nativeIndexOf, startIndex);
2774
+ tmp$ret$3 = tmp$ret$2;
2775
+ tmp = tmp$ret$3;
2776
+ }
2777
+ return tmp;
2747
2778
  }
2748
- function indexOf_1(_this__u8e3s4, string, startIndex, ignoreCase) {
2779
+ function indexOf_2(_this__u8e3s4, string, startIndex, ignoreCase) {
2749
2780
  startIndex = startIndex === VOID ? 0 : startIndex;
2750
2781
  ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2751
2782
  var tmp;
@@ -2756,7 +2787,7 @@ if (typeof Math.imul === 'undefined') {
2756
2787
  tmp_0 = !(typeof _this__u8e3s4 === 'string');
2757
2788
  }
2758
2789
  if (tmp_0) {
2759
- tmp = indexOf_2(_this__u8e3s4, string, startIndex, charSequenceLength(_this__u8e3s4), ignoreCase);
2790
+ tmp = indexOf_3(_this__u8e3s4, string, startIndex, charSequenceLength(_this__u8e3s4), ignoreCase);
2760
2791
  } else {
2761
2792
  var tmp$ret$1;
2762
2793
  // Inline function 'kotlin.text.nativeIndexOf' call
@@ -2769,7 +2800,7 @@ if (typeof Math.imul === 'undefined') {
2769
2800
  }
2770
2801
  return tmp;
2771
2802
  }
2772
- function indexOf_2(_this__u8e3s4, other, startIndex, endIndex, ignoreCase, last) {
2803
+ function indexOf_3(_this__u8e3s4, other, startIndex, endIndex, ignoreCase, last) {
2773
2804
  last = last === VOID ? false : last;
2774
2805
  var indices = !last ? numberRangeToNumber(coerceAtLeast_1(startIndex, 0), coerceAtMost(endIndex, charSequenceLength(_this__u8e3s4))) : downTo(coerceAtMost(startIndex, get_lastIndex_1(_this__u8e3s4)), coerceAtLeast_1(endIndex, 0));
2775
2806
  var tmp;
@@ -2805,37 +2836,6 @@ if (typeof Math.imul === 'undefined') {
2805
2836
  }
2806
2837
  return -1;
2807
2838
  }
2808
- function indexOf_3(_this__u8e3s4, char, startIndex, ignoreCase) {
2809
- startIndex = startIndex === VOID ? 0 : startIndex;
2810
- ignoreCase = ignoreCase === VOID ? false : ignoreCase;
2811
- var tmp;
2812
- var tmp_0;
2813
- if (ignoreCase) {
2814
- tmp_0 = true;
2815
- } else {
2816
- tmp_0 = !(typeof _this__u8e3s4 === 'string');
2817
- }
2818
- if (tmp_0) {
2819
- var tmp$ret$0;
2820
- // Inline function 'kotlin.charArrayOf' call
2821
- tmp$ret$0 = charArrayOf([char]);
2822
- tmp = indexOfAny(_this__u8e3s4, tmp$ret$0, startIndex, ignoreCase);
2823
- } else {
2824
- var tmp$ret$3;
2825
- // Inline function 'kotlin.text.nativeIndexOf' call
2826
- var tmp1_nativeIndexOf = _this__u8e3s4;
2827
- var tmp$ret$2;
2828
- // Inline function 'kotlin.text.nativeIndexOf' call
2829
- var tmp0_nativeIndexOf = toString_0(char);
2830
- var tmp$ret$1;
2831
- // Inline function 'kotlin.js.asDynamic' call
2832
- tmp$ret$1 = tmp1_nativeIndexOf;
2833
- tmp$ret$2 = tmp$ret$1.indexOf(tmp0_nativeIndexOf, startIndex);
2834
- tmp$ret$3 = tmp$ret$2;
2835
- tmp = tmp$ret$3;
2836
- }
2837
- return tmp;
2838
- }
2839
2839
  function requireNonNegativeLimit(limit) {
2840
2840
  var tmp0_require = limit >= 0;
2841
2841
  // Inline function 'kotlin.contracts.contract' call
@@ -2926,7 +2926,7 @@ if (typeof Math.imul === 'undefined') {
2926
2926
  function findAnyOf(_this__u8e3s4, strings, startIndex, ignoreCase, last) {
2927
2927
  if (!ignoreCase ? strings.i() === 1 : false) {
2928
2928
  var string = single_0(strings);
2929
- var index = !last ? indexOf_1(_this__u8e3s4, string, startIndex) : lastIndexOf(_this__u8e3s4, string, startIndex);
2929
+ var index = !last ? indexOf_2(_this__u8e3s4, string, startIndex) : lastIndexOf(_this__u8e3s4, string, startIndex);
2930
2930
  return index < 0 ? null : to(index, string);
2931
2931
  }
2932
2932
  var indices = !last ? numberRangeToNumber(coerceAtLeast_1(startIndex, 0), charSequenceLength(_this__u8e3s4)) : downTo(coerceAtMost(startIndex, get_lastIndex_1(_this__u8e3s4)), 0);
@@ -3073,7 +3073,7 @@ if (typeof Math.imul === 'undefined') {
3073
3073
  tmp_0 = !(typeof _this__u8e3s4 === 'string');
3074
3074
  }
3075
3075
  if (tmp_0) {
3076
- tmp = indexOf_2(_this__u8e3s4, string, startIndex, 0, ignoreCase, true);
3076
+ tmp = indexOf_3(_this__u8e3s4, string, startIndex, 0, ignoreCase, true);
3077
3077
  } else {
3078
3078
  var tmp$ret$1;
3079
3079
  // Inline function 'kotlin.text.nativeLastIndexOf' call
@@ -5943,6 +5943,16 @@ if (typeof Math.imul === 'undefined') {
5943
5943
  }
5944
5944
  return tmp;
5945
5945
  }
5946
+ function toInt(_this__u8e3s4) {
5947
+ var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4);
5948
+ var tmp;
5949
+ if (tmp0_elvis_lhs == null) {
5950
+ numberFormatError(_this__u8e3s4);
5951
+ } else {
5952
+ tmp = tmp0_elvis_lhs;
5953
+ }
5954
+ return tmp;
5955
+ }
5946
5956
  function toDoubleOrNull(_this__u8e3s4) {
5947
5957
  var tmp$ret$3;
5948
5958
  // Inline function 'kotlin.takeIf' call
@@ -5967,16 +5977,6 @@ if (typeof Math.imul === 'undefined') {
5967
5977
  tmp$ret$3 = tmp;
5968
5978
  return tmp$ret$3;
5969
5979
  }
5970
- function toInt(_this__u8e3s4) {
5971
- var tmp0_elvis_lhs = toIntOrNull(_this__u8e3s4);
5972
- var tmp;
5973
- if (tmp0_elvis_lhs == null) {
5974
- numberFormatError(_this__u8e3s4);
5975
- } else {
5976
- tmp = tmp0_elvis_lhs;
5977
- }
5978
- return tmp;
5979
- }
5980
5980
  function toDouble(_this__u8e3s4) {
5981
5981
  var tmp$ret$2;
5982
5982
  // Inline function 'kotlin.also' call
@@ -6151,7 +6151,7 @@ if (typeof Math.imul === 'undefined') {
6151
6151
  return findNext(initMatchesEntirePattern(this), toString_2(input), 0, this.mb_1);
6152
6152
  };
6153
6153
  protoOf(Regex).ac = function (input, replacement) {
6154
- if (!contains_5(replacement, _Char___init__impl__6a9atx(92)) ? !contains_5(replacement, _Char___init__impl__6a9atx(36)) : false) {
6154
+ if (!contains_4(replacement, _Char___init__impl__6a9atx(92)) ? !contains_4(replacement, _Char___init__impl__6a9atx(36)) : false) {
6155
6155
  var tmp$ret$1;
6156
6156
  // Inline function 'kotlin.text.nativeReplace' call
6157
6157
  var tmp0_nativeReplace = toString_2(input);
@@ -9187,12 +9187,12 @@ if (typeof Math.imul === 'undefined') {
9187
9187
  _.$_$.x6 = KProperty1;
9188
9188
  _.$_$.y6 = StringBuilder;
9189
9189
  _.$_$.z6 = concatToString;
9190
- _.$_$.a7 = contains_4;
9191
- _.$_$.b7 = contains_5;
9190
+ _.$_$.a7 = contains_5;
9191
+ _.$_$.b7 = contains_4;
9192
9192
  _.$_$.c7 = equals_0;
9193
9193
  _.$_$.d7 = equals;
9194
9194
  _.$_$.e7 = hasSurrogatePairAt;
9195
- _.$_$.f7 = indexOf_3;
9195
+ _.$_$.f7 = indexOf_1;
9196
9196
  _.$_$.g7 = isBlank;
9197
9197
  _.$_$.h7 = isHighSurrogate;
9198
9198
  _.$_$.i7 = replace;