@itwin/core-i18n 5.14.0-dev.1 → 5.14.0-dev.10

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.
@@ -19,7 +19,7 @@
19
19
  */
20
20
  function cov_ogldeftyv() {
21
21
  var path = "C:\\agent\\_work\\1\\s\\core\\i18n\\lib\\cjs\\ITwinLocalization.js";
22
- var hash = "113751a8262a3149163a15d970bf9098e64926ce";
22
+ var hash = "8de28e753813d64322bcaeb99c8c8dfad2c2faad";
23
23
  var global = new Function("return this")();
24
24
  var gcv = "__coverage__";
25
25
  var coverageData = {
@@ -521,7 +521,7 @@ function cov_ogldeftyv() {
521
521
  column: 31
522
522
  },
523
523
  end: {
524
- line: 190,
524
+ line: 176,
525
525
  column: 10
526
526
  }
527
527
  },
@@ -531,7 +531,7 @@ function cov_ogldeftyv() {
531
531
  column: 12
532
532
  },
533
533
  end: {
534
- line: 189,
534
+ line: 175,
535
535
  column: 15
536
536
  }
537
537
  },
@@ -557,251 +557,191 @@ function cov_ogldeftyv() {
557
557
  },
558
558
  "53": {
559
559
  start: {
560
- line: 175,
561
- column: 30
560
+ line: 171,
561
+ column: 34
562
562
  },
563
563
  end: {
564
- line: 175,
565
- column: 91
564
+ line: 171,
565
+ column: 123
566
566
  }
567
567
  },
568
568
  "54": {
569
569
  start: {
570
- line: 175,
571
- column: 73
570
+ line: 171,
571
+ column: 76
572
572
  },
573
573
  end: {
574
- line: 175,
575
- column: 90
574
+ line: 171,
575
+ column: 122
576
576
  }
577
577
  },
578
578
  "55": {
579
579
  start: {
580
- line: 176,
580
+ line: 172,
581
581
  column: 16
582
582
  },
583
583
  end: {
584
- line: 184,
585
- column: 17
586
- }
587
- },
588
- "56": {
589
- start: {
590
- line: 177,
591
- column: 20
592
- },
593
- end: {
594
- line: 180,
595
- column: 21
596
- }
597
- },
598
- "57": {
599
- start: {
600
- line: 178,
601
- column: 24
602
- },
603
- end: {
604
- line: 179,
605
- column: 102
606
- }
607
- },
608
- "58": {
609
- start: {
610
- line: 179,
611
- column: 28
612
- },
613
- end: {
614
- line: 179,
615
- column: 102
616
- }
617
- },
618
- "59": {
619
- start: {
620
- line: 179,
621
- column: 69
622
- },
623
- end: {
624
- line: 179,
625
- column: 100
626
- }
627
- },
628
- "60": {
629
- start: {
630
- line: 183,
631
- column: 20
632
- },
633
- end: {
634
- line: 183,
635
- column: 33
636
- }
637
- },
638
- "61": {
639
- start: {
640
- line: 186,
641
- column: 16
642
- },
643
- end: {
644
- line: 187,
584
+ line: 173,
645
585
  column: 113
646
586
  }
647
587
  },
648
- "62": {
588
+ "56": {
649
589
  start: {
650
- line: 187,
590
+ line: 173,
651
591
  column: 20
652
592
  },
653
593
  end: {
654
- line: 187,
594
+ line: 173,
655
595
  column: 113
656
596
  }
657
597
  },
658
- "63": {
598
+ "57": {
659
599
  start: {
660
- line: 188,
600
+ line: 174,
661
601
  column: 16
662
602
  },
663
603
  end: {
664
- line: 188,
604
+ line: 174,
665
605
  column: 26
666
606
  }
667
607
  },
668
- "64": {
608
+ "58": {
669
609
  start: {
670
- line: 191,
610
+ line: 177,
671
611
  column: 8
672
612
  },
673
613
  end: {
674
- line: 191,
614
+ line: 177,
675
615
  column: 51
676
616
  }
677
617
  },
678
- "65": {
618
+ "59": {
679
619
  start: {
680
- line: 192,
620
+ line: 178,
681
621
  column: 8
682
622
  },
683
623
  end: {
684
- line: 192,
624
+ line: 178,
685
625
  column: 30
686
626
  }
687
627
  },
688
- "66": {
628
+ "60": {
689
629
  start: {
690
- line: 196,
630
+ line: 182,
691
631
  column: 8
692
632
  },
693
633
  end: {
694
- line: 196,
634
+ line: 182,
695
635
  column: 38
696
636
  }
697
637
  },
698
- "67": {
638
+ "61": {
699
639
  start: {
700
- line: 199,
640
+ line: 185,
701
641
  column: 0
702
642
  },
703
643
  end: {
704
- line: 199,
644
+ line: 185,
705
645
  column: 46
706
646
  }
707
647
  },
708
- "68": {
648
+ "62": {
709
649
  start: {
710
- line: 201,
650
+ line: 187,
711
651
  column: 18
712
652
  },
713
653
  end: {
714
- line: 201,
654
+ line: 187,
715
655
  column: 26
716
656
  }
717
657
  },
718
- "69": {
658
+ "63": {
719
659
  start: {
720
- line: 202,
660
+ line: 188,
721
661
  column: 16
722
662
  },
723
663
  end: {
724
- line: 202,
664
+ line: 188,
725
665
  column: 83
726
666
  }
727
667
  },
728
- "70": {
668
+ "64": {
729
669
  start: {
730
- line: 203,
670
+ line: 189,
731
671
  column: 17
732
672
  },
733
673
  end: {
734
- line: 203,
674
+ line: 189,
735
675
  column: 87
736
676
  }
737
677
  },
738
- "71": {
678
+ "65": {
739
679
  start: {
740
- line: 204,
680
+ line: 190,
741
681
  column: 18
742
682
  },
743
683
  end: {
744
- line: 204,
684
+ line: 190,
745
685
  column: 86
746
686
  }
747
687
  },
748
- "72": {
688
+ "66": {
749
689
  start: {
750
- line: 206,
690
+ line: 192,
751
691
  column: 22
752
692
  },
753
693
  end: {
754
- line: 206,
694
+ line: 192,
755
695
  column: 29
756
696
  }
757
697
  },
758
- "73": {
698
+ "67": {
759
699
  start: {
760
- line: 207,
700
+ line: 193,
761
701
  column: 8
762
702
  },
763
703
  end: {
764
- line: 210,
704
+ line: 196,
765
705
  column: 9
766
706
  }
767
707
  },
768
- "74": {
708
+ "68": {
769
709
  start: {
770
- line: 207,
710
+ line: 193,
771
711
  column: 21
772
712
  },
773
713
  end: {
774
- line: 207,
714
+ line: 193,
775
715
  column: 22
776
716
  }
777
717
  },
778
- "75": {
718
+ "69": {
779
719
  start: {
780
- line: 208,
720
+ line: 194,
781
721
  column: 12
782
722
  },
783
723
  end: {
784
- line: 209,
724
+ line: 195,
785
725
  column: 44
786
726
  }
787
727
  },
788
- "76": {
728
+ "70": {
789
729
  start: {
790
- line: 209,
730
+ line: 195,
791
731
  column: 16
792
732
  },
793
733
  end: {
794
- line: 209,
734
+ line: 195,
795
735
  column: 44
796
736
  }
797
737
  },
798
- "77": {
738
+ "71": {
799
739
  start: {
800
- line: 211,
740
+ line: 197,
801
741
  column: 8
802
742
  },
803
743
  end: {
804
- line: 211,
744
+ line: 197,
805
745
  column: 23
806
746
  }
807
747
  }
@@ -1065,7 +1005,7 @@ function cov_ogldeftyv() {
1065
1005
  column: 34
1066
1006
  },
1067
1007
  end: {
1068
- line: 193,
1008
+ line: 179,
1069
1009
  column: 5
1070
1010
  }
1071
1011
  },
@@ -1089,7 +1029,7 @@ function cov_ogldeftyv() {
1089
1029
  column: 56
1090
1030
  },
1091
1031
  end: {
1092
- line: 190,
1032
+ line: 176,
1093
1033
  column: 9
1094
1034
  }
1095
1035
  },
@@ -1113,7 +1053,7 @@ function cov_ogldeftyv() {
1113
1053
  column: 55
1114
1054
  },
1115
1055
  end: {
1116
- line: 189,
1056
+ line: 175,
1117
1057
  column: 13
1118
1058
  }
1119
1059
  },
@@ -1123,169 +1063,145 @@ function cov_ogldeftyv() {
1123
1063
  name: "(anonymous_13)",
1124
1064
  decl: {
1125
1065
  start: {
1126
- line: 175,
1127
- column: 57
1066
+ line: 171,
1067
+ column: 62
1128
1068
  },
1129
1069
  end: {
1130
- line: 175,
1131
- column: 58
1070
+ line: 171,
1071
+ column: 63
1132
1072
  }
1133
1073
  },
1134
1074
  loc: {
1135
1075
  start: {
1136
- line: 175,
1137
- column: 73
1076
+ line: 171,
1077
+ column: 76
1138
1078
  },
1139
1079
  end: {
1140
- line: 175,
1141
- column: 90
1080
+ line: 171,
1081
+ column: 122
1142
1082
  }
1143
1083
  },
1144
- line: 175
1084
+ line: 171
1145
1085
  },
1146
1086
  "14": {
1147
1087
  name: "(anonymous_14)",
1148
1088
  decl: {
1149
1089
  start: {
1150
- line: 179,
1151
- column: 53
1152
- },
1153
- end: {
1154
- line: 179,
1155
- column: 54
1156
- }
1157
- },
1158
- loc: {
1159
- start: {
1160
- line: 179,
1161
- column: 69
1162
- },
1163
- end: {
1164
- line: 179,
1165
- column: 100
1166
- }
1167
- },
1168
- line: 179
1169
- },
1170
- "15": {
1171
- name: "(anonymous_15)",
1172
- decl: {
1173
- start: {
1174
- line: 195,
1090
+ line: 181,
1175
1091
  column: 4
1176
1092
  },
1177
1093
  end: {
1178
- line: 195,
1094
+ line: 181,
1179
1095
  column: 5
1180
1096
  }
1181
1097
  },
1182
1098
  loc: {
1183
1099
  start: {
1184
- line: 195,
1100
+ line: 181,
1185
1101
  column: 30
1186
1102
  },
1187
1103
  end: {
1188
- line: 197,
1104
+ line: 183,
1189
1105
  column: 5
1190
1106
  }
1191
1107
  },
1192
- line: 195
1108
+ line: 181
1193
1109
  },
1194
- "16": {
1195
- name: "(anonymous_16)",
1110
+ "15": {
1111
+ name: "(anonymous_15)",
1196
1112
  decl: {
1197
1113
  start: {
1198
- line: 202,
1114
+ line: 188,
1199
1115
  column: 4
1200
1116
  },
1201
1117
  end: {
1202
- line: 202,
1118
+ line: 188,
1203
1119
  column: 5
1204
1120
  }
1205
1121
  },
1206
1122
  loc: {
1207
1123
  start: {
1208
- line: 202,
1124
+ line: 188,
1209
1125
  column: 14
1210
1126
  },
1211
1127
  end: {
1212
- line: 202,
1128
+ line: 188,
1213
1129
  column: 85
1214
1130
  }
1215
1131
  },
1216
- line: 202
1132
+ line: 188
1217
1133
  },
1218
- "17": {
1219
- name: "(anonymous_17)",
1134
+ "16": {
1135
+ name: "(anonymous_16)",
1220
1136
  decl: {
1221
1137
  start: {
1222
- line: 203,
1138
+ line: 189,
1223
1139
  column: 4
1224
1140
  },
1225
1141
  end: {
1226
- line: 203,
1142
+ line: 189,
1227
1143
  column: 5
1228
1144
  }
1229
1145
  },
1230
1146
  loc: {
1231
1147
  start: {
1232
- line: 203,
1148
+ line: 189,
1233
1149
  column: 15
1234
1150
  },
1235
1151
  end: {
1236
- line: 203,
1152
+ line: 189,
1237
1153
  column: 89
1238
1154
  }
1239
1155
  },
1240
- line: 203
1156
+ line: 189
1241
1157
  },
1242
- "18": {
1243
- name: "(anonymous_18)",
1158
+ "17": {
1159
+ name: "(anonymous_17)",
1244
1160
  decl: {
1245
1161
  start: {
1246
- line: 204,
1162
+ line: 190,
1247
1163
  column: 4
1248
1164
  },
1249
1165
  end: {
1250
- line: 204,
1166
+ line: 190,
1251
1167
  column: 5
1252
1168
  }
1253
1169
  },
1254
1170
  loc: {
1255
1171
  start: {
1256
- line: 204,
1172
+ line: 190,
1257
1173
  column: 16
1258
1174
  },
1259
1175
  end: {
1260
- line: 204,
1176
+ line: 190,
1261
1177
  column: 88
1262
1178
  }
1263
1179
  },
1264
- line: 204
1180
+ line: 190
1265
1181
  },
1266
- "19": {
1267
- name: "(anonymous_19)",
1182
+ "18": {
1183
+ name: "(anonymous_18)",
1268
1184
  decl: {
1269
1185
  start: {
1270
- line: 205,
1186
+ line: 191,
1271
1187
  column: 4
1272
1188
  },
1273
1189
  end: {
1274
- line: 205,
1190
+ line: 191,
1275
1191
  column: 5
1276
1192
  }
1277
1193
  },
1278
1194
  loc: {
1279
1195
  start: {
1280
- line: 205,
1196
+ line: 191,
1281
1197
  column: 27
1282
1198
  },
1283
1199
  end: {
1284
- line: 212,
1200
+ line: 198,
1285
1201
  column: 5
1286
1202
  }
1287
1203
  },
1288
- line: 205
1204
+ line: 191
1289
1205
  }
1290
1206
  },
1291
1207
  branchMap: {
@@ -1895,55 +1811,22 @@ function cov_ogldeftyv() {
1895
1811
  "18": {
1896
1812
  loc: {
1897
1813
  start: {
1898
- line: 178,
1899
- column: 24
1900
- },
1901
- end: {
1902
- line: 179,
1903
- column: 102
1904
- }
1905
- },
1906
- type: "if",
1907
- locations: [{
1908
- start: {
1909
- line: 178,
1910
- column: 24
1911
- },
1912
- end: {
1913
- line: 179,
1914
- column: 102
1915
- }
1916
- }, {
1917
- start: {
1918
- line: undefined,
1919
- column: undefined
1920
- },
1921
- end: {
1922
- line: undefined,
1923
- column: undefined
1924
- }
1925
- }],
1926
- line: 178
1927
- },
1928
- "19": {
1929
- loc: {
1930
- start: {
1931
- line: 186,
1814
+ line: 172,
1932
1815
  column: 16
1933
1816
  },
1934
1817
  end: {
1935
- line: 187,
1818
+ line: 173,
1936
1819
  column: 113
1937
1820
  }
1938
1821
  },
1939
1822
  type: "if",
1940
1823
  locations: [{
1941
1824
  start: {
1942
- line: 186,
1825
+ line: 172,
1943
1826
  column: 16
1944
1827
  },
1945
1828
  end: {
1946
- line: 187,
1829
+ line: 173,
1947
1830
  column: 113
1948
1831
  }
1949
1832
  }, {
@@ -1956,27 +1839,27 @@ function cov_ogldeftyv() {
1956
1839
  column: undefined
1957
1840
  }
1958
1841
  }],
1959
- line: 186
1842
+ line: 172
1960
1843
  },
1961
- "20": {
1844
+ "19": {
1962
1845
  loc: {
1963
1846
  start: {
1964
- line: 208,
1847
+ line: 194,
1965
1848
  column: 12
1966
1849
  },
1967
1850
  end: {
1968
- line: 209,
1851
+ line: 195,
1969
1852
  column: 44
1970
1853
  }
1971
1854
  },
1972
1855
  type: "if",
1973
1856
  locations: [{
1974
1857
  start: {
1975
- line: 208,
1858
+ line: 194,
1976
1859
  column: 12
1977
1860
  },
1978
1861
  end: {
1979
- line: 209,
1862
+ line: 195,
1980
1863
  column: 44
1981
1864
  }
1982
1865
  }, {
@@ -1989,7 +1872,7 @@ function cov_ogldeftyv() {
1989
1872
  column: undefined
1990
1873
  }
1991
1874
  }],
1992
- line: 208
1875
+ line: 194
1993
1876
  }
1994
1877
  },
1995
1878
  s: {
@@ -2064,13 +1947,7 @@ function cov_ogldeftyv() {
2064
1947
  "68": 0,
2065
1948
  "69": 0,
2066
1949
  "70": 0,
2067
- "71": 0,
2068
- "72": 0,
2069
- "73": 0,
2070
- "74": 0,
2071
- "75": 0,
2072
- "76": 0,
2073
- "77": 0
1950
+ "71": 0
2074
1951
  },
2075
1952
  f: {
2076
1953
  "0": 0,
@@ -2091,8 +1968,7 @@ function cov_ogldeftyv() {
2091
1968
  "15": 0,
2092
1969
  "16": 0,
2093
1970
  "17": 0,
2094
- "18": 0,
2095
- "19": 0
1971
+ "18": 0
2096
1972
  },
2097
1973
  b: {
2098
1974
  "0": [0, 0, 0],
@@ -2114,19 +1990,18 @@ function cov_ogldeftyv() {
2114
1990
  "16": [0, 0],
2115
1991
  "17": [0, 0],
2116
1992
  "18": [0, 0],
2117
- "19": [0, 0],
2118
- "20": [0, 0]
1993
+ "19": [0, 0]
2119
1994
  },
2120
1995
  inputSourceMap: {
2121
1996
  version: 3,
2122
1997
  file: "ITwinLocalization.js",
2123
1998
  sources: ["C:\\agent\\_work\\1\\s\\core\\i18n\\src\\ITwinLocalization.ts"],
2124
1999
  names: [],
2125
- mappings: ";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAA2E;AAC3E,wGAAmG;AACnG,gFAAqF;AACrF,sDAA6C;AAG7C,MAAM,mBAAmB,GAAW,CAAC,CAAC,CAAC,8GAA8G;AAcrJ;;;GAGG;AACH,MAAa,iBAAiB;IACrB,OAAO,CAAO;IACJ,YAAY,CAAc;IAC1B,eAAe,CAAiB;IAChC,iBAAiB,CAAkB;IACnC,WAAW,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEhE,YAAmB,OAA6B;QAC9C,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG;YACrB,QAAQ,EAAE,OAAO,EAAE,WAAW,IAAI,6BAA6B;YAC/D,WAAW,EAAE,IAAI;YACjB,GAAG,OAAO,EAAE,kBAAkB;SAC/B,CAAC;QAEF,IAAI,CAAC,iBAAiB,GAAG;YACvB,KAAK,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,CAAC;YAC9C,iBAAiB,EAAE,KAAK;YACxB,MAAM,EAAE,EAAE;YACV,GAAG,OAAO,EAAE,eAAe;SAC5B,CAAC;QAEF,IAAI,CAAC,YAAY,GAAG;YAClB,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;YACpC,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,mBAAmB;YAC/B,OAAO,EAAE,IAAI,CAAC,eAAe;YAC7B,SAAS,EA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sourcesContent: ["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\r\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\r\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\n\r\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\r\n\r\n/** Options for ITwinLocalization\r\n * @public\r\n */\r\nexport interface LocalizationOptions {\r\n urlTemplate?: string;\r\n backendPlugin?: Module;\r\n detectorPlugin?: Module;\r\n initOptions?: InitOptions;\r\n backendHttpOptions?: BackendOptions;\r\n detectorOptions?: DetectorOptions;\r\n}\r\n\r\n/** Supplies localizations for iTwin.js\r\n * @note this class uses the [i18next](https://www.i18next.com/) package.\r\n * @public\r\n */\r\nexport class ITwinLocalization implements Localization {\r\n public i18next: i18n;\r\n private readonly _initOptions: InitOptions;\r\n private readonly _backendOptions: BackendOptions;\r\n private readonly _detectionOptions: DetectorOptions;\r\n private readonly _namespaces = new Map<string, Promise<void>>();\r\n\r\n public constructor(options?: LocalizationOptions) {\r\n this.i18next = i18next.createInstance();\r\n\r\n this._backendOptions = {\r\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\r\n crossDomain: true,\r\n ...options?.backendHttpOptions,\r\n };\r\n\r\n this._detectionOptions = {\r\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\r\n lookupQuerystring: \"lng\",\r\n caches: [],\r\n ...options?.detectorOptions,\r\n };\r\n\r\n this._initOptions = {\r\n interpolation: { escapeValue: true },\r\n fallbackLng: \"en\",\r\n maxRetries: DEFAULT_MAX_RETRIES,\r\n backend: this._backendOptions,\r\n detection: this._detectionOptions,\r\n ...options?.initOptions,\r\n };\r\n\r\n this.i18next\r\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\r\n .use(options?.backendPlugin ?? Backend)\r\n .use(TranslationLogger);\r\n }\r\n\r\n public async initialize(namespaces: string[]): Promise<void> {\r\n\r\n // Also consider namespaces passed into constructor\r\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\r\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\r\n\r\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\r\n if (defaultNamespace)\r\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\r\n\r\n const initOptions: InitOptions = {\r\n ...this._initOptions,\r\n defaultNS: defaultNamespace,\r\n ns: [...combinedNamespaces],\r\n };\r\n\r\n // if in a development environment, set debugging\r\n if (process.env.NODE_ENV === \"development\")\r\n initOptions.debug = true;\r\n\r\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\r\n\r\n for (const ns of namespaces)\r\n this._namespaces.set(ns, initPromise);\r\n\r\n return initPromise;\r\n }\r\n\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n * @param line The input line, potentially containing %{keys}.\r\n * @returns The line with all %{keys} translated\r\n * @public\r\n */\r\n public getLocalizedKeys(line: string): string {\r\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\r\n }\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @public\r\n */\r\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n const value = this.i18next.t(key, options);\r\n\r\n if (typeof value !== \"string\") {\r\n throw new Error(\"Translation key(s) string not found\");\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /** Gets the English translation.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @internal\r\n */\r\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n options = {\r\n ...options,\r\n ns: namespace, // ensure namespace argument is used\r\n };\r\n\r\n const en = this.i18next.getFixedT(\"en\", namespace);\r\n const str = en(key, options);\r\n if (typeof str !== \"string\")\r\n throw new Error(\"Translation key(s) not found\");\r\n\r\n return str;\r\n }\r\n\r\n /** Get the promise for an already registered Namespace.\r\n * @param name - the name of the namespace\r\n * @public\r\n */\r\n public getNamespacePromise(name: string): Promise<void> | undefined {\r\n return this._namespaces.get(name);\r\n }\r\n\r\n /** @internal */\r\n public getLanguageList(): readonly string[] {\r\n return this.i18next.languages;\r\n }\r\n\r\n /** override the language detected in the browser */\r\n public async changeLanguage(language: string) {\r\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\r\n }\r\n\r\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\r\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n * @public\r\n */\r\n public async registerNamespace(name: string): Promise<void> {\r\n const existing = this._namespaces.get(name);\r\n if (existing !== undefined)\r\n return existing;\r\n\r\n const theReadPromise = new Promise<void>((resolve) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.i18next.loadNamespaces(name, (err) => {\r\n if (!err)\r\n return resolve();\r\n\r\n // Here we got a non-null err object.\r\n // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.\r\n // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.\r\n // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.\r\n // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.\r\n let locales = this.getLanguageList().map((thisLocale: any) => `/${thisLocale}/`);\r\n\r\n try {\r\n for (const thisError of err) {\r\n if (typeof thisError === \"string\")\r\n locales = locales.filter((thisLocale) => !thisError.includes(thisLocale));\r\n }\r\n } catch {\r\n locales = [];\r\n }\r\n // if we removed every locale from the array, it wasn't loaded.\r\n if (locales.length === 0)\r\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\r\n\r\n resolve();\r\n });\r\n });\r\n this._namespaces.set(name, theReadPromise);\r\n return theReadPromise;\r\n }\r\n\r\n /** @internal */\r\n public unregisterNamespace(name: string): void {\r\n this._namespaces.delete(name);\r\n }\r\n}\r\n\r\nclass TranslationLogger {\r\n public static readonly type = \"logger\";\r\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\r\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\r\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\r\n private createLogMessage(args: string[]) {\r\n let message = args[0];\r\n for (let i = 1; i < args.length; ++i) {\r\n if (typeof args[i] === \"string\")\r\n message += `\\n ${args[i]}`;\r\n }\r\n return message;\r\n }\r\n}\r\n"]
2000
+ mappings: ";AAAA;;;+FAG+F;AAC/F;;GAEG;;;;;;AAEH,sDAA2E;AAC3E,wGAAmG;AACnG,gFAAqF;AACrF,sDAA6C;AAG7C,MAAM,mBAAmB,GAAW,CAAC,CAAC,CAAC,8GAA8G;AAcrJ;;;GAGG;AACH,MAAa,iBAAiB;IACrB,OAAO,CAAO;IACJ,YAAY,CAAc;IAC1B,eAAe,CAAiB;IAChC,iBAAiB,CAAkB;IACnC,WAAW,GAAG,IAAI,GAAG,EAAyB,CAAC;IAEhE,YAAmB,OAA6B;QAC9C,IAAI,CAAC,OAAO,GAAG,iBAAO,CAAC,cAAc,EAAE,CAAC;QAExC,IAAI,CAAC,eAAe,GAAG;YACrB,QAAQ,EAAE,OAAO,EAAE,WAAW,IAAI,6BAA6B;YAC/D,WAAW,EAAE,IAAI;YACjB,GAAG,OAAO,EAAE,kBAAkB;SAC/B,CAAC;QAEF,IAAI,CAAC,iBAAiB,GAAG;YACvB,KAAK,EAAE,CAAC,aAAa,EAAE,WAAW,EAAE,SAAS,CAAC;YAC9C,iBAAiB,EAAE,KAAK;YACxB,MAAM,EAAE,EAAE;YACV,GAAG,OAAO,EAAE,eAAe;SAC5B,CAAC;QAEF,IAAI,CAAC,YAAY,GAAG;YAClB,aAAa,EAAE,EAAE,WAAW,EAAE,IAAI,EAAE;YACpC,WAAW,EAAE,IAAI;YACjB,UAAU,EAAE,mBAAmB;YAC/B,OAAO,EAAE,IAAI,CAAC,eAAe;YAC7B,SAAS,EAAE,IAAI,CAAC,iBAAiB;YACjC,GAAG,OAAO,EAAE,WAAW;SACxB,CAAC;QAEF,IAAI,C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U,IAAI,GAAG,QAAQ,CAAC;IAChC,GAAG,CAAC,IAAc,IAAI,qBAAM,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC5E,IAAI,CAAC,IAAc,IAAI,qBAAM,CAAC,UAAU,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAChF,KAAK,CAAC,IAAc,IAAI,qBAAM,CAAC,QAAQ,CAAC,MAAM,EAAE,IAAI,CAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,CAAC;IAC9E,gBAAgB,CAAC,IAAc;QACrC,IAAI,OAAO,GAAG,IAAI,CAAC,CAAC,CAAC,CAAC;QACtB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,MAAM,EAAE,EAAE,CAAC,EAAE,CAAC;YACrC,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,KAAK,QAAQ;gBAC7B,OAAO,IAAI,OAAO,IAAI,CAAC,CAAC,CAAC,EAAE,CAAC;QAChC,CAAC;QACD,OAAO,OAAO,CAAC;IACjB,CAAC",
2001
+ sourcesContent: ["/*---------------------------------------------------------------------------------------------\r\n* Copyright (c) Bentley Systems, Incorporated. All rights reserved.\r\n* See LICENSE.md in the project root for license terms and full copyright notice.\r\n*--------------------------------------------------------------------------------------------*/\r\n/** @packageDocumentation\r\n * @module Localization\r\n */\r\n\r\nimport i18next, { i18n, InitOptions, Module, TOptionsBase } from \"i18next\";\r\nimport i18nextBrowserLanguageDetector, { DetectorOptions } from \"i18next-browser-languagedetector\";\r\nimport Backend, { HttpBackendOptions as BackendOptions } from \"i18next-http-backend\";\r\nimport { Logger } from \"@itwin/core-bentley\";\r\nimport type { Localization } from \"@itwin/core-common\";\r\n\r\nconst DEFAULT_MAX_RETRIES: number = 1; // a low number prevents wasted time and potential timeouts when requesting localization files throws an error\r\n\r\n/** Options for ITwinLocalization\r\n * @public\r\n */\r\nexport interface LocalizationOptions {\r\n urlTemplate?: string;\r\n backendPlugin?: Module;\r\n detectorPlugin?: Module;\r\n initOptions?: InitOptions;\r\n backendHttpOptions?: BackendOptions;\r\n detectorOptions?: DetectorOptions;\r\n}\r\n\r\n/** Supplies localizations for iTwin.js\r\n * @note this class uses the [i18next](https://www.i18next.com/) package.\r\n * @public\r\n */\r\nexport class ITwinLocalization implements Localization {\r\n public i18next: i18n;\r\n private readonly _initOptions: InitOptions;\r\n private readonly _backendOptions: BackendOptions;\r\n private readonly _detectionOptions: DetectorOptions;\r\n private readonly _namespaces = new Map<string, Promise<void>>();\r\n\r\n public constructor(options?: LocalizationOptions) {\r\n this.i18next = i18next.createInstance();\r\n\r\n this._backendOptions = {\r\n loadPath: options?.urlTemplate ?? \"locales/{{lng}}/{{ns}}.json\",\r\n crossDomain: true,\r\n ...options?.backendHttpOptions,\r\n };\r\n\r\n this._detectionOptions = {\r\n order: [\"querystring\", \"navigator\", \"htmlTag\"],\r\n lookupQuerystring: \"lng\",\r\n caches: [],\r\n ...options?.detectorOptions,\r\n };\r\n\r\n this._initOptions = {\r\n interpolation: { escapeValue: true },\r\n fallbackLng: \"en\",\r\n maxRetries: DEFAULT_MAX_RETRIES,\r\n backend: this._backendOptions,\r\n detection: this._detectionOptions,\r\n ...options?.initOptions,\r\n };\r\n\r\n this.i18next\r\n .use(options?.detectorPlugin ?? i18nextBrowserLanguageDetector)\r\n .use(options?.backendPlugin ?? Backend)\r\n .use(TranslationLogger);\r\n }\r\n\r\n public async initialize(namespaces: string[]): Promise<void> {\r\n\r\n // Also consider namespaces passed into constructor\r\n const initNamespaces: string[] = [this._initOptions.ns || []].flat();\r\n const combinedNamespaces: Set<string> = new Set([...namespaces, ...initNamespaces]); // without duplicates\r\n\r\n const defaultNamespace: string | false | readonly string[] = this._initOptions.defaultNS ?? namespaces[0];\r\n if (defaultNamespace)\r\n combinedNamespaces.add(defaultNamespace as string); // Make sure default namespace is in namespaces list\r\n\r\n const initOptions: InitOptions = {\r\n ...this._initOptions,\r\n defaultNS: defaultNamespace,\r\n ns: [...combinedNamespaces],\r\n };\r\n\r\n // if in a development environment, set debugging\r\n if (process.env.NODE_ENV === \"development\")\r\n initOptions.debug = true;\r\n\r\n const initPromise = this.i18next.init(initOptions) as unknown as Promise<void>;\r\n\r\n for (const ns of namespaces)\r\n this._namespaces.set(ns, initPromise);\r\n\r\n return initPromise;\r\n }\r\n\r\n /** Replace all instances of `%{key}` within a string with the translations of those keys.\r\n * For example:\r\n * ``` ts\r\n * \"MyKeys\": {\r\n * \"Key1\": \"First value\",\r\n * \"Key2\": \"Second value\"\r\n * }\r\n * ```\r\n *\r\n * ``` ts\r\n * i18.translateKeys(\"string with %{MyKeys.Key1} followed by %{MyKeys.Key2}!\"\") // returns \"string with First Value followed by Second Value!\"\r\n * ```\r\n * @param line The input line, potentially containing %{keys}.\r\n * @returns The line with all %{keys} translated\r\n * @public\r\n */\r\n public getLocalizedKeys(line: string): string {\r\n return line.replace(/\\%\\{(.+?)\\}/g, (_match, tag) => this.getLocalizedString(tag));\r\n }\r\n\r\n /** Return the translated value of a key.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @note The key includes the namespace, which identifies the particular localization file that contains the property,\r\n * followed by a colon, followed by the property in the JSON file.\r\n * For example:\r\n * ``` ts\r\n * const dataString: string = IModelApp.localization.getLocalizedString(\"iModelJs:BackgroundMap.BingDataAttribution\");\r\n * ```\r\n * assigns to dataString the string with property BackgroundMap.BingDataAttribution from the iModelJs.json localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @public\r\n */\r\n public getLocalizedString(key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n const value = this.i18next.t(key, options);\r\n\r\n if (typeof value !== \"string\") {\r\n throw new Error(\"Translation key(s) string not found\");\r\n }\r\n\r\n return value;\r\n }\r\n\r\n /** Gets the English translation.\r\n * @param namespace - the namespace that identifies the particular localization file that contains the property.\r\n * @param key - the key that matches a property in the JSON localization file.\r\n * @returns The string corresponding to the first key that resolves.\r\n * @throws Error if no keys resolve to a string.\r\n * @internal\r\n */\r\n public getEnglishString(namespace: string, key: string | string[], options?: TOptionsBase): string {\r\n if (options?.returnDetails || options?.returnObjects) {\r\n throw new Error(\"Translation key must map to a string, but the given options will result in an object\");\r\n }\r\n\r\n options = {\r\n ...options,\r\n ns: namespace, // ensure namespace argument is used\r\n };\r\n\r\n const en = this.i18next.getFixedT(\"en\", namespace);\r\n const str = en(key, options);\r\n if (typeof str !== \"string\")\r\n throw new Error(\"Translation key(s) not found\");\r\n\r\n return str;\r\n }\r\n\r\n /** Get the promise for an already registered Namespace.\r\n * @param name - the name of the namespace\r\n * @public\r\n */\r\n public getNamespacePromise(name: string): Promise<void> | undefined {\r\n return this._namespaces.get(name);\r\n }\r\n\r\n /** @internal */\r\n public getLanguageList(): readonly string[] {\r\n return this.i18next.languages;\r\n }\r\n\r\n /** override the language detected in the browser */\r\n public async changeLanguage(language: string) {\r\n return this.i18next.changeLanguage(language) as unknown as Promise<void>;\r\n }\r\n\r\n /** Register a new Namespace and return it. If the namespace is already registered, it will be returned.\r\n * @param name - the name of the namespace, which is the base name of the JSON file that contains the localization properties.\r\n * @note - The registerNamespace method starts fetching the appropriate version of the JSON localization file from the server,\r\n * based on the current locale. To make sure that fetch is complete before performing translations from this namespace, await\r\n * fulfillment of the readPromise Promise property of the returned LocalizationNamespace.\r\n * @see [Localization in iTwin.js]($docs/learning/frontend/Localization.md)\r\n * @public\r\n */\r\n public async registerNamespace(name: string): Promise<void> {\r\n const existing = this._namespaces.get(name);\r\n if (existing !== undefined)\r\n return existing;\r\n\r\n const theReadPromise = new Promise<void>((resolve) => {\r\n // eslint-disable-next-line @typescript-eslint/no-floating-promises\r\n this.i18next.loadNamespaces(name, (err) => {\r\n if (!err)\r\n return resolve();\r\n\r\n // i18next can return errors from other concurrent namespace loads in this callback.\r\n const wasLoaded = this.getLanguageList().some((language) => this.i18next.hasResourceBundle(language, name));\r\n if (!wasLoaded)\r\n Logger.logError(\"i18n\", `No resources for namespace ${name} could be loaded`);\r\n\r\n resolve();\r\n });\r\n });\r\n this._namespaces.set(name, theReadPromise);\r\n return theReadPromise;\r\n }\r\n\r\n /** @internal */\r\n public unregisterNamespace(name: string): void {\r\n this._namespaces.delete(name);\r\n }\r\n}\r\n\r\nclass TranslationLogger {\r\n public static readonly type = \"logger\";\r\n public log(args: string[]) { Logger.logInfo(\"i18n\", this.createLogMessage(args)); }\r\n public warn(args: string[]) { Logger.logWarning(\"i18n\", this.createLogMessage(args)); }\r\n public error(args: string[]) { Logger.logError(\"i18n\", this.createLogMessage(args)); }\r\n private createLogMessage(args: string[]) {\r\n let message = args[0];\r\n for (let i = 1; i < args.length; ++i) {\r\n if (typeof args[i] === \"string\")\r\n message += `\\n ${args[i]}`;\r\n }\r\n return message;\r\n }\r\n}\r\n"]
2127
2002
  },
2128
2003
  _coverageSchema: "1a1c01bbd47fc00a2c39e90264f33305004495a9",
2129
- hash: "113751a8262a3149163a15d970bf9098e64926ce"
2004
+ hash: "8de28e753813d64322bcaeb99c8c8dfad2c2faad"
2130
2005
  };
2131
2006
  var coverage = global[gcv] || (global[gcv] = {});
2132
2007
  if (!coverage[path] || coverage[path].hash !== hash) {
@@ -2384,96 +2259,70 @@ class ITwinLocalization {
2384
2259
  } else {
2385
2260
  cov_ogldeftyv().b[17][1]++;
2386
2261
  }
2387
- // Here we got a non-null err object.
2388
- // This method is called when the system has attempted to load the resources for the namespaces for each possible locale.
2389
- // For example 'fr-ca' might be the most specific locale, in which case 'fr' and 'en' are fallback locales.
2390
- // Using Backend from i18next-http-backend, err will be an array of strings of each namespace it tried to read and its locale.
2391
- // There might be errs for some other namespaces as well as this one. We resolve the promise unless there's an error for each possible locale.
2392
- let locales = (cov_ogldeftyv().s[53]++, this.getLanguageList().map(thisLocale => {
2262
+ // i18next can return errors from other concurrent namespace loads in this callback.
2263
+ const wasLoaded = (cov_ogldeftyv().s[53]++, this.getLanguageList().some(language => {
2393
2264
  cov_ogldeftyv().f[13]++;
2394
2265
  cov_ogldeftyv().s[54]++;
2395
- return `/${thisLocale}/`;
2266
+ return this.i18next.hasResourceBundle(language, name);
2396
2267
  }));
2397
2268
  cov_ogldeftyv().s[55]++;
2398
- try {
2269
+ if (!wasLoaded) {
2270
+ cov_ogldeftyv().b[18][0]++;
2399
2271
  cov_ogldeftyv().s[56]++;
2400
- for (const thisError of err) {
2401
- cov_ogldeftyv().s[57]++;
2402
- if (typeof thisError === "string") {
2403
- cov_ogldeftyv().b[18][0]++;
2404
- cov_ogldeftyv().s[58]++;
2405
- locales = locales.filter(thisLocale => {
2406
- cov_ogldeftyv().f[14]++;
2407
- cov_ogldeftyv().s[59]++;
2408
- return !thisError.includes(thisLocale);
2409
- });
2410
- } else {
2411
- cov_ogldeftyv().b[18][1]++;
2412
- }
2413
- }
2414
- } catch {
2415
- cov_ogldeftyv().s[60]++;
2416
- locales = [];
2417
- }
2418
- // if we removed every locale from the array, it wasn't loaded.
2419
- cov_ogldeftyv().s[61]++;
2420
- if (locales.length === 0) {
2421
- cov_ogldeftyv().b[19][0]++;
2422
- cov_ogldeftyv().s[62]++;
2423
2272
  core_bentley_1.Logger.logError("i18n", `No resources for namespace ${name} could be loaded`);
2424
2273
  } else {
2425
- cov_ogldeftyv().b[19][1]++;
2274
+ cov_ogldeftyv().b[18][1]++;
2426
2275
  }
2427
- cov_ogldeftyv().s[63]++;
2276
+ cov_ogldeftyv().s[57]++;
2428
2277
  resolve();
2429
2278
  });
2430
2279
  }));
2431
- cov_ogldeftyv().s[64]++;
2280
+ cov_ogldeftyv().s[58]++;
2432
2281
  this._namespaces.set(name, theReadPromise);
2433
- cov_ogldeftyv().s[65]++;
2282
+ cov_ogldeftyv().s[59]++;
2434
2283
  return theReadPromise;
2435
2284
  }
2436
2285
  /** @internal */
2437
2286
  unregisterNamespace(name) {
2438
- cov_ogldeftyv().f[15]++;
2439
- cov_ogldeftyv().s[66]++;
2287
+ cov_ogldeftyv().f[14]++;
2288
+ cov_ogldeftyv().s[60]++;
2440
2289
  this._namespaces.delete(name);
2441
2290
  }
2442
2291
  }
2443
- cov_ogldeftyv().s[67]++;
2292
+ cov_ogldeftyv().s[61]++;
2444
2293
  exports.ITwinLocalization = ITwinLocalization;
2445
2294
  class TranslationLogger {
2446
- static type = (cov_ogldeftyv().s[68]++, "logger");
2295
+ static type = (cov_ogldeftyv().s[62]++, "logger");
2447
2296
  log(args) {
2448
- cov_ogldeftyv().f[16]++;
2449
- cov_ogldeftyv().s[69]++;
2297
+ cov_ogldeftyv().f[15]++;
2298
+ cov_ogldeftyv().s[63]++;
2450
2299
  core_bentley_1.Logger.logInfo("i18n", this.createLogMessage(args));
2451
2300
  }
2452
2301
  warn(args) {
2453
- cov_ogldeftyv().f[17]++;
2454
- cov_ogldeftyv().s[70]++;
2302
+ cov_ogldeftyv().f[16]++;
2303
+ cov_ogldeftyv().s[64]++;
2455
2304
  core_bentley_1.Logger.logWarning("i18n", this.createLogMessage(args));
2456
2305
  }
2457
2306
  error(args) {
2458
- cov_ogldeftyv().f[18]++;
2459
- cov_ogldeftyv().s[71]++;
2307
+ cov_ogldeftyv().f[17]++;
2308
+ cov_ogldeftyv().s[65]++;
2460
2309
  core_bentley_1.Logger.logError("i18n", this.createLogMessage(args));
2461
2310
  }
2462
2311
  createLogMessage(args) {
2463
- cov_ogldeftyv().f[19]++;
2464
- let message = (cov_ogldeftyv().s[72]++, args[0]);
2465
- cov_ogldeftyv().s[73]++;
2466
- for (let i = (cov_ogldeftyv().s[74]++, 1); i < args.length; ++i) {
2467
- cov_ogldeftyv().s[75]++;
2312
+ cov_ogldeftyv().f[18]++;
2313
+ let message = (cov_ogldeftyv().s[66]++, args[0]);
2314
+ cov_ogldeftyv().s[67]++;
2315
+ for (let i = (cov_ogldeftyv().s[68]++, 1); i < args.length; ++i) {
2316
+ cov_ogldeftyv().s[69]++;
2468
2317
  if (typeof args[i] === "string") {
2469
- cov_ogldeftyv().b[20][0]++;
2470
- cov_ogldeftyv().s[76]++;
2318
+ cov_ogldeftyv().b[19][0]++;
2319
+ cov_ogldeftyv().s[70]++;
2471
2320
  message += `\n ${args[i]}`;
2472
2321
  } else {
2473
- cov_ogldeftyv().b[20][1]++;
2322
+ cov_ogldeftyv().b[19][1]++;
2474
2323
  }
2475
2324
  }
2476
- cov_ogldeftyv().s[77]++;
2325
+ cov_ogldeftyv().s[71]++;
2477
2326
  return message;
2478
2327
  }
2479
2328
  }
@@ -17921,6 +17770,8 @@ var DbResult;
17921
17770
  DbResult[DbResult["BE_SQLITE_ERROR_SchemaUpgradeRecommended"] = 369098762] = "BE_SQLITE_ERROR_SchemaUpgradeRecommended";
17922
17771
  /** schema update require data transform */
17923
17772
  DbResult[DbResult["BE_SQLITE_ERROR_DataTransformRequired"] = 385875978] = "BE_SQLITE_ERROR_DataTransformRequired";
17773
+ /** schema update would destroy existing instances or property values */
17774
+ DbResult[DbResult["BE_SQLITE_ERROR_DataDeletionRequired"] = 402653194] = "BE_SQLITE_ERROR_DataDeletionRequired";
17924
17775
  /** Db not open */
17925
17776
  DbResult[DbResult["BE_SQLITE_ERROR_NOTOPEN"] = 16777217] = "BE_SQLITE_ERROR_NOTOPEN";
17926
17777
  /** Error propagating changes during commit */
@@ -18473,6 +18324,7 @@ class BentleyError extends Error {
18473
18324
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_IOERR_SEEK: return "BE_SQLITE_IOERR_SEEK";
18474
18325
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_IOERR_DELETE_NOENT: return "BE_SQLITE_IOERR_DELETE_NOENT";
18475
18326
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_DataTransformRequired: return "Schema update require to transform data";
18327
+ case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_DataDeletionRequired: return "Schema update would destroy existing data";
18476
18328
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_FileExists: return "File Exists";
18477
18329
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_AlreadyOpen: return "Already Open";
18478
18330
  case _BeSQLite__WEBPACK_IMPORTED_MODULE_0__.DbResult.BE_SQLITE_ERROR_NoPropertyTable: return "No Property Table";
@@ -19146,7 +18998,7 @@ var CompressedId64Set;
19146
18998
  return (ch >= 48 && ch <= 57) || (ch >= 65 && ch <= 70);
19147
18999
  }
19148
19000
  function compactRange(increment, length) {
19149
- (0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(length > 0);
19001
+ ;(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(length > 0);
19150
19002
  const inc = `+${increment.toString()}`;
19151
19003
  if (length <= 1)
19152
19004
  return inc;
@@ -19261,7 +19113,7 @@ var CompressedId64Set;
19261
19113
  isGreaterThan(rhs) { return this.compare(rhs) > 0; }
19262
19114
  get isZero() { return 0 === this.lower && 0 === this.upper; }
19263
19115
  setFromDifference(lhs, rhs) {
19264
- (0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(!rhs.isGreaterThan(lhs));
19116
+ ;(0,_Assert__WEBPACK_IMPORTED_MODULE_0__.assert)(!rhs.isGreaterThan(lhs));
19265
19117
  this.lower = lhs.lower - rhs.lower;
19266
19118
  this.upper = lhs.upper - rhs.upper;
19267
19119
  if (this.lower < 0) {
@@ -21682,6 +21534,122 @@ class PerfLogger {
21682
21534
  }
21683
21535
 
21684
21536
 
21537
+ /***/ },
21538
+
21539
+ /***/ "../bentley/lib/esm/ObservableMap.js"
21540
+ /*!*******************************************!*\
21541
+ !*** ../bentley/lib/esm/ObservableMap.js ***!
21542
+ \*******************************************/
21543
+ (__unused_webpack_module, __webpack_exports__, __webpack_require__) {
21544
+
21545
+ "use strict";
21546
+ __webpack_require__.r(__webpack_exports__);
21547
+ /* harmony export */ __webpack_require__.d(__webpack_exports__, {
21548
+ /* harmony export */ ObservableMap: () => (/* binding */ ObservableMap)
21549
+ /* harmony export */ });
21550
+ /* harmony import */ var _BeEvent__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./BeEvent */ "../bentley/lib/esm/BeEvent.js");
21551
+ /*---------------------------------------------------------------------------------------------
21552
+ * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
21553
+ * See LICENSE.md in the project root for license terms and full copyright notice.
21554
+ *--------------------------------------------------------------------------------------------*/
21555
+ /** @packageDocumentation
21556
+ * @module Collections
21557
+ */
21558
+
21559
+ /** A standard [Map<K,V>](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map) that emits an event when its contents change.
21560
+ * @public
21561
+ */
21562
+ class ObservableMap extends Map {
21563
+ /** @internal */
21564
+ get [Symbol.toStringTag]() { return "ObservableMap"; }
21565
+ /** Emitted after any change to the contents of this map. */
21566
+ onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
21567
+ /** Construct a new ObservableMap.
21568
+ * @param elements Optional elements with which to populate the new map.
21569
+ */
21570
+ constructor(elements) {
21571
+ // IMPORTANT: do not pass `elements` to `super()`. It will invoke `set` which is overridden to invoke `onChanged.raiseEvent`, but
21572
+ // `onChanged` is not initialized until `super()` returns.
21573
+ super();
21574
+ if (elements)
21575
+ this.setAll(elements);
21576
+ }
21577
+ /** Invokes [Map.set](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/set), raising
21578
+ * the [[onChanged]] event unless `key` is already present with the same `value`.
21579
+ */
21580
+ set(key, value) {
21581
+ const valueChanged = !this.has(key) || !Object.is(this.get(key), value);
21582
+ if (valueChanged)
21583
+ super.set(key, value);
21584
+ if (valueChanged) {
21585
+ this.onChanged.raiseEvent();
21586
+ }
21587
+ return this;
21588
+ }
21589
+ /** Invokes [Map.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/delete), raising
21590
+ * the [[onChanged]] event if the key was removed from the map.
21591
+ */
21592
+ delete(key) {
21593
+ const ret = super.delete(key);
21594
+ if (ret) {
21595
+ this.onChanged.raiseEvent();
21596
+ }
21597
+ return ret;
21598
+ }
21599
+ /** If this map is not already empty, invokes [Map.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Map/clear)
21600
+ * and raises the [[onChanged]] event.
21601
+ */
21602
+ clear() {
21603
+ if (0 !== this.size) {
21604
+ super.clear();
21605
+ this.onChanged.raiseEvent();
21606
+ }
21607
+ }
21608
+ /** Add or update multiple entries in the map, raising [[onChanged]] only once after all items are set, if the contents of
21609
+ * the map changed as a result.
21610
+ * This is more efficient than calling [[set]] in a loop when listeners need not be notified of each individual change.
21611
+ * @param items The entries to add or update.
21612
+ */
21613
+ setAll(items) {
21614
+ let changed = false;
21615
+ try {
21616
+ for (const [key, value] of items) {
21617
+ if (!this.has(key) || !Object.is(this.get(key), value)) {
21618
+ super.set(key, value);
21619
+ changed = true;
21620
+ }
21621
+ }
21622
+ }
21623
+ finally {
21624
+ if (changed) {
21625
+ this.onChanged.raiseEvent();
21626
+ }
21627
+ }
21628
+ }
21629
+ /** Delete multiple keys from the map, raising [[onChanged]] only once after all keys are deleted.
21630
+ * This is more efficient than calling [[delete]] in a loop when listeners need not be notified of each individual deletion.
21631
+ * @param keys The keys to delete.
21632
+ * @returns The number of keys that were actually deleted (i.e., were present in the map).
21633
+ */
21634
+ deleteAll(keys) {
21635
+ const prevSize = this.size;
21636
+ let deletedAny = false;
21637
+ try {
21638
+ for (const key of keys) {
21639
+ if (super.delete(key))
21640
+ deletedAny = true;
21641
+ }
21642
+ }
21643
+ finally {
21644
+ if (deletedAny) {
21645
+ this.onChanged.raiseEvent();
21646
+ }
21647
+ }
21648
+ return prevSize - this.size;
21649
+ }
21650
+ }
21651
+
21652
+
21685
21653
  /***/ },
21686
21654
 
21687
21655
  /***/ "../bentley/lib/esm/ObservableSet.js"
@@ -21708,6 +21676,8 @@ __webpack_require__.r(__webpack_exports__);
21708
21676
  * @public
21709
21677
  */
21710
21678
  class ObservableSet extends Set {
21679
+ /** @internal */
21680
+ get [Symbol.toStringTag]() { return "ObservableSet"; }
21711
21681
  /** Emitted after `item` is added to this set. */
21712
21682
  onAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
21713
21683
  /** Emitted after `item` is deleted from this set. */
@@ -21718,27 +21688,39 @@ class ObservableSet extends Set {
21718
21688
  onBatchAdded = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
21719
21689
  /** Emitted after multiple items are deleted from this set via [[deleteAll]]. */
21720
21690
  onBatchDeleted = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
21691
+ /** Emitted after any change to the contents of this set. */
21692
+ onChanged = new _BeEvent__WEBPACK_IMPORTED_MODULE_0__.BeEvent();
21721
21693
  /** Construct a new ObservableSet.
21722
21694
  * @param elements Optional elements with which to populate the new set.
21723
21695
  */
21724
21696
  constructor(elements) {
21725
- // NB: Set constructor will invoke add(). Do not override until initialized.
21726
- super(elements);
21727
- this.add = (item) => {
21728
- const prevSize = this.size;
21729
- const ret = super.add(item);
21730
- if (this.size !== prevSize)
21731
- this.onAdded.raiseEvent(item);
21732
- return ret;
21733
- };
21697
+ // IMPORTANT: do not pass `elements` to `super()`. It will invoke `add` which is overridden to invoke `onAdded.raiseEvent`, but
21698
+ // `onAdded` is not initialized until `super()` returns.
21699
+ super();
21700
+ if (elements)
21701
+ this.addAll(elements);
21702
+ }
21703
+ /** Invokes [Set.add](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/add), raising
21704
+ * the [[onAdded]] event if the item was not already present in the set.
21705
+ */
21706
+ add(item) {
21707
+ const prevSize = this.size;
21708
+ const ret = super.add(item);
21709
+ if (this.size !== prevSize) {
21710
+ this.onAdded.raiseEvent(item);
21711
+ this.onChanged.raiseEvent();
21712
+ }
21713
+ return ret;
21734
21714
  }
21735
21715
  /** Invokes [Set.delete](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/delete), raising
21736
21716
  * the [[onDeleted]] event if the item was removed from the set.
21737
21717
  */
21738
21718
  delete(item) {
21739
21719
  const ret = super.delete(item);
21740
- if (ret)
21720
+ if (ret) {
21741
21721
  this.onDeleted.raiseEvent(item);
21722
+ this.onChanged.raiseEvent();
21723
+ }
21742
21724
  return ret;
21743
21725
  }
21744
21726
  /** If this set is not already empty, invokes [Set.clear](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Set/clear)
@@ -21748,6 +21730,7 @@ class ObservableSet extends Set {
21748
21730
  if (0 !== this.size) {
21749
21731
  super.clear();
21750
21732
  this.onCleared.raiseEvent();
21733
+ this.onChanged.raiseEvent();
21751
21734
  }
21752
21735
  }
21753
21736
  /** Add multiple items to the set, raising [[onBatchAdded]] only once after all items are added.
@@ -21757,10 +21740,21 @@ class ObservableSet extends Set {
21757
21740
  */
21758
21741
  addAll(items) {
21759
21742
  const prevSize = this.size;
21760
- for (const item of items)
21761
- super.add(item);
21762
- if (this.size !== prevSize)
21763
- this.onBatchAdded.raiseEvent();
21743
+ let addedAny = false;
21744
+ try {
21745
+ for (const item of items) {
21746
+ const prevSetSize = this.size;
21747
+ super.add(item);
21748
+ if (this.size !== prevSetSize)
21749
+ addedAny = true;
21750
+ }
21751
+ }
21752
+ finally {
21753
+ if (addedAny) {
21754
+ this.onBatchAdded.raiseEvent();
21755
+ this.onChanged.raiseEvent();
21756
+ }
21757
+ }
21764
21758
  return this.size - prevSize;
21765
21759
  }
21766
21760
  /** Delete multiple items from the set, raising [[onBatchDeleted]] only once after all items are deleted.
@@ -21770,10 +21764,21 @@ class ObservableSet extends Set {
21770
21764
  */
21771
21765
  deleteAll(items) {
21772
21766
  const prevSize = this.size;
21773
- for (const item of items)
21774
- super.delete(item);
21775
- if (this.size !== prevSize)
21776
- this.onBatchDeleted.raiseEvent();
21767
+ let deletedAny = false;
21768
+ try {
21769
+ for (const item of items) {
21770
+ const prevSetSize = this.size;
21771
+ super.delete(item);
21772
+ if (this.size !== prevSetSize)
21773
+ deletedAny = true;
21774
+ }
21775
+ }
21776
+ finally {
21777
+ if (deletedAny) {
21778
+ this.onBatchDeleted.raiseEvent();
21779
+ this.onChanged.raiseEvent();
21780
+ }
21781
+ }
21777
21782
  return prevSize - this.size;
21778
21783
  }
21779
21784
  }
@@ -24195,11 +24200,11 @@ class YieldManager {
24195
24200
  "use strict";
24196
24201
  __webpack_require__.r(__webpack_exports__);
24197
24202
  /* harmony export */ __webpack_require__.d(__webpack_exports__, {
24198
- /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.AbandonedError),
24199
- /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeDuration),
24203
+ /* harmony export */ AbandonedError: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.AbandonedError),
24204
+ /* harmony export */ BeDuration: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeDuration),
24200
24205
  /* harmony export */ BeEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEvent),
24201
24206
  /* harmony export */ BeEventList: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeEventList),
24202
- /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.BeTimePoint),
24207
+ /* harmony export */ BeTimePoint: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.BeTimePoint),
24203
24208
  /* harmony export */ BeUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUiEvent),
24204
24209
  /* harmony export */ BeUnorderedEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedEvent),
24205
24210
  /* harmony export */ BeUnorderedUiEvent: () => (/* reexport safe */ _BeEvent__WEBPACK_IMPORTED_MODULE_2__.BeUnorderedUiEvent),
@@ -24210,15 +24215,15 @@ __webpack_require__.r(__webpack_exports__);
24210
24215
  /* harmony export */ ByteStream: () => (/* reexport safe */ _ByteStream__WEBPACK_IMPORTED_MODULE_7__.ByteStream),
24211
24216
  /* harmony export */ ChangeSetStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.ChangeSetStatus),
24212
24217
  /* harmony export */ CompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.CompressedId64Set),
24213
- /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbChangeStage),
24214
- /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictCause),
24215
- /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbConflictResolution),
24218
+ /* harmony export */ DbChangeStage: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbChangeStage),
24219
+ /* harmony export */ DbConflictCause: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictCause),
24220
+ /* harmony export */ DbConflictResolution: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbConflictResolution),
24216
24221
  /* harmony export */ DbOpcode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbOpcode),
24217
24222
  /* harmony export */ DbResult: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.DbResult),
24218
- /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.DbValueType),
24223
+ /* harmony export */ DbValueType: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.DbValueType),
24219
24224
  /* harmony export */ Dictionary: () => (/* reexport safe */ _Dictionary__WEBPACK_IMPORTED_MODULE_11__.Dictionary),
24220
24225
  /* harmony export */ DisposableList: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.DisposableList),
24221
- /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.DuplicatePolicy),
24226
+ /* harmony export */ DuplicatePolicy: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.DuplicatePolicy),
24222
24227
  /* harmony export */ Entry: () => (/* reexport safe */ _LRUMap__WEBPACK_IMPORTED_MODULE_19__.Entry),
24223
24228
  /* harmony export */ ErrorCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.ErrorCategory),
24224
24229
  /* harmony export */ GeoServiceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.GeoServiceStatus),
@@ -24237,39 +24242,40 @@ __webpack_require__.r(__webpack_exports__);
24237
24242
  /* harmony export */ LogLevel: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.LogLevel),
24238
24243
  /* harmony export */ Logger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.Logger),
24239
24244
  /* harmony export */ MutableCompressedId64Set: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.MutableCompressedId64Set),
24240
- /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_20__.ObservableSet),
24241
- /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__.OneAtATimeAction),
24245
+ /* harmony export */ ObservableMap: () => (/* reexport safe */ _ObservableMap__WEBPACK_IMPORTED_MODULE_20__.ObservableMap),
24246
+ /* harmony export */ ObservableSet: () => (/* reexport safe */ _ObservableSet__WEBPACK_IMPORTED_MODULE_21__.ObservableSet),
24247
+ /* harmony export */ OneAtATimeAction: () => (/* reexport safe */ _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__.OneAtATimeAction),
24242
24248
  /* harmony export */ OpenMode: () => (/* reexport safe */ _BeSQLite__WEBPACK_IMPORTED_MODULE_6__.OpenMode),
24243
24249
  /* harmony export */ OrderedId64Array: () => (/* reexport safe */ _CompressedId64Set__WEBPACK_IMPORTED_MODULE_10__.OrderedId64Array),
24244
- /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__.OrderedId64Iterable),
24245
- /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.OrderedSet),
24250
+ /* harmony export */ OrderedId64Iterable: () => (/* reexport safe */ _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__.OrderedId64Iterable),
24251
+ /* harmony export */ OrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.OrderedSet),
24246
24252
  /* harmony export */ PerfLogger: () => (/* reexport safe */ _Logger__WEBPACK_IMPORTED_MODULE_18__.PerfLogger),
24247
- /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__.PriorityQueue),
24248
- /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__.ProcessDetector),
24249
- /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_23__.ReadonlyOrderedSet),
24250
- /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.ReadonlySortedArray),
24253
+ /* harmony export */ PriorityQueue: () => (/* reexport safe */ _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__.PriorityQueue),
24254
+ /* harmony export */ ProcessDetector: () => (/* reexport safe */ _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__.ProcessDetector),
24255
+ /* harmony export */ ReadonlyOrderedSet: () => (/* reexport safe */ _OrderedSet__WEBPACK_IMPORTED_MODULE_24__.ReadonlyOrderedSet),
24256
+ /* harmony export */ ReadonlySortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.ReadonlySortedArray),
24251
24257
  /* harmony export */ RealityDataStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RealityDataStatus),
24252
- /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__.RepositoryStatus),
24258
+ /* harmony export */ RepositoryStatus: () => (/* reexport safe */ _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__.RepositoryStatus),
24253
24259
  /* harmony export */ RpcInterfaceStatus: () => (/* reexport safe */ _BentleyError__WEBPACK_IMPORTED_MODULE_3__.RpcInterfaceStatus),
24254
- /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.SortedArray),
24255
- /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.SpanKind),
24260
+ /* harmony export */ SortedArray: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.SortedArray),
24261
+ /* harmony export */ SpanKind: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.SpanKind),
24256
24262
  /* harmony export */ StatusCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.StatusCategory),
24257
- /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_29__.StopWatch),
24263
+ /* harmony export */ StopWatch: () => (/* reexport safe */ _Time__WEBPACK_IMPORTED_MODULE_30__.StopWatch),
24258
24264
  /* harmony export */ SuccessCategory: () => (/* reexport safe */ _StatusCategory__WEBPACK_IMPORTED_MODULE_5__.SuccessCategory),
24259
- /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_30__.Tracing),
24265
+ /* harmony export */ Tracing: () => (/* reexport safe */ _Tracing__WEBPACK_IMPORTED_MODULE_31__.Tracing),
24260
24266
  /* harmony export */ TransientIdSequence: () => (/* reexport safe */ _Id__WEBPACK_IMPORTED_MODULE_14__.TransientIdSequence),
24261
- /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__.TupleKeyedMap),
24262
- /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.TypedArrayBuilder),
24263
- /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint16ArrayBuilder),
24264
- /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint32ArrayBuilder),
24265
- /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.Uint8ArrayBuilder),
24266
- /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__.UintArrayBuilder),
24267
- /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__.UnexpectedErrors),
24268
- /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_36__.YieldManager),
24267
+ /* harmony export */ TupleKeyedMap: () => (/* reexport safe */ _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__.TupleKeyedMap),
24268
+ /* harmony export */ TypedArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.TypedArrayBuilder),
24269
+ /* harmony export */ Uint16ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint16ArrayBuilder),
24270
+ /* harmony export */ Uint32ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint32ArrayBuilder),
24271
+ /* harmony export */ Uint8ArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.Uint8ArrayBuilder),
24272
+ /* harmony export */ UintArrayBuilder: () => (/* reexport safe */ _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__.UintArrayBuilder),
24273
+ /* harmony export */ UnexpectedErrors: () => (/* reexport safe */ _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__.UnexpectedErrors),
24274
+ /* harmony export */ YieldManager: () => (/* reexport safe */ _YieldManager__WEBPACK_IMPORTED_MODULE_37__.YieldManager),
24269
24275
  /* harmony export */ areEqualPossiblyUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.areEqualPossiblyUndefined),
24270
- /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.asInstanceOf),
24276
+ /* harmony export */ asInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.asInstanceOf),
24271
24277
  /* harmony export */ assert: () => (/* reexport safe */ _Assert__WEBPACK_IMPORTED_MODULE_1__.assert),
24272
- /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.base64StringToUint8Array),
24278
+ /* harmony export */ base64StringToUint8Array: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.base64StringToUint8Array),
24273
24279
  /* harmony export */ compareArrays: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareArrays),
24274
24280
  /* harmony export */ compareBooleans: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleans),
24275
24281
  /* harmony export */ compareBooleansOrUndefined: () => (/* reexport safe */ _Compare__WEBPACK_IMPORTED_MODULE_9__.compareBooleansOrUndefined),
@@ -24287,16 +24293,16 @@ __webpack_require__.r(__webpack_exports__);
24287
24293
  /* harmony export */ expectNotNull: () => (/* reexport safe */ _Expect__WEBPACK_IMPORTED_MODULE_13__.expectNotNull),
24288
24294
  /* harmony export */ isDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isDisposable),
24289
24295
  /* harmony export */ isIDisposable: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.isIDisposable),
24290
- /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.isInstanceOf),
24296
+ /* harmony export */ isInstanceOf: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.isInstanceOf),
24291
24297
  /* harmony export */ isProperSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isProperSubclassOf),
24292
24298
  /* harmony export */ isSubclassOf: () => (/* reexport safe */ _ClassUtils__WEBPACK_IMPORTED_MODULE_8__.isSubclassOf),
24293
- /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.lowerBound),
24294
- /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__.omit),
24295
- /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_24__.partitionArray),
24296
- /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_27__.shallowClone),
24299
+ /* harmony export */ lowerBound: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.lowerBound),
24300
+ /* harmony export */ omit: () => (/* reexport safe */ _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__.omit),
24301
+ /* harmony export */ partitionArray: () => (/* reexport safe */ _partitionArray__WEBPACK_IMPORTED_MODULE_25__.partitionArray),
24302
+ /* harmony export */ shallowClone: () => (/* reexport safe */ _SortedArray__WEBPACK_IMPORTED_MODULE_28__.shallowClone),
24297
24303
  /* harmony export */ using: () => (/* reexport safe */ _Disposable__WEBPACK_IMPORTED_MODULE_12__.using),
24298
- /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_28__.utf8ToString),
24299
- /* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__.wrapTimerCallback)
24304
+ /* harmony export */ utf8ToString: () => (/* reexport safe */ _StringUtils__WEBPACK_IMPORTED_MODULE_29__.utf8ToString),
24305
+ /* harmony export */ wrapTimerCallback: () => (/* reexport safe */ _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__.wrapTimerCallback)
24300
24306
  /* harmony export */ });
24301
24307
  /* harmony import */ var _AccessToken__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./AccessToken */ "../bentley/lib/esm/AccessToken.js");
24302
24308
  /* harmony import */ var _Assert__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! ./Assert */ "../bentley/lib/esm/Assert.js");
@@ -24318,24 +24324,25 @@ __webpack_require__.r(__webpack_exports__);
24318
24324
  /* harmony import */ var _JsonUtils__WEBPACK_IMPORTED_MODULE_17__ = __webpack_require__(/*! ./JsonUtils */ "../bentley/lib/esm/JsonUtils.js");
24319
24325
  /* harmony import */ var _Logger__WEBPACK_IMPORTED_MODULE_18__ = __webpack_require__(/*! ./Logger */ "../bentley/lib/esm/Logger.js");
24320
24326
  /* harmony import */ var _LRUMap__WEBPACK_IMPORTED_MODULE_19__ = __webpack_require__(/*! ./LRUMap */ "../bentley/lib/esm/LRUMap.js");
24321
- /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableSet */ "../bentley/lib/esm/ObservableSet.js");
24322
- /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./OneAtATimeAction */ "../bentley/lib/esm/OneAtATimeAction.js");
24323
- /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../bentley/lib/esm/OrderedId64Iterable.js");
24324
- /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedSet */ "../bentley/lib/esm/OrderedSet.js");
24325
- /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./partitionArray */ "../bentley/lib/esm/partitionArray.js");
24326
- /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./PriorityQueue */ "../bentley/lib/esm/PriorityQueue.js");
24327
- /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./ProcessDetector */ "../bentley/lib/esm/ProcessDetector.js");
24328
- /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./SortedArray */ "../bentley/lib/esm/SortedArray.js");
24329
- /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./StringUtils */ "../bentley/lib/esm/StringUtils.js");
24330
- /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./Time */ "../bentley/lib/esm/Time.js");
24331
- /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Tracing */ "../bentley/lib/esm/Tracing.js");
24332
- /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./TupleKeyedMap */ "../bentley/lib/esm/TupleKeyedMap.js");
24333
- /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
24334
- /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
24335
- /* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UtilityFunctions */ "../bentley/lib/esm/UtilityFunctions.js");
24336
- /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
24337
- /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
24338
- /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./internal/cross-package */ "../bentley/lib/esm/internal/cross-package.js");
24327
+ /* harmony import */ var _ObservableMap__WEBPACK_IMPORTED_MODULE_20__ = __webpack_require__(/*! ./ObservableMap */ "../bentley/lib/esm/ObservableMap.js");
24328
+ /* harmony import */ var _ObservableSet__WEBPACK_IMPORTED_MODULE_21__ = __webpack_require__(/*! ./ObservableSet */ "../bentley/lib/esm/ObservableSet.js");
24329
+ /* harmony import */ var _OneAtATimeAction__WEBPACK_IMPORTED_MODULE_22__ = __webpack_require__(/*! ./OneAtATimeAction */ "../bentley/lib/esm/OneAtATimeAction.js");
24330
+ /* harmony import */ var _OrderedId64Iterable__WEBPACK_IMPORTED_MODULE_23__ = __webpack_require__(/*! ./OrderedId64Iterable */ "../bentley/lib/esm/OrderedId64Iterable.js");
24331
+ /* harmony import */ var _OrderedSet__WEBPACK_IMPORTED_MODULE_24__ = __webpack_require__(/*! ./OrderedSet */ "../bentley/lib/esm/OrderedSet.js");
24332
+ /* harmony import */ var _partitionArray__WEBPACK_IMPORTED_MODULE_25__ = __webpack_require__(/*! ./partitionArray */ "../bentley/lib/esm/partitionArray.js");
24333
+ /* harmony import */ var _PriorityQueue__WEBPACK_IMPORTED_MODULE_26__ = __webpack_require__(/*! ./PriorityQueue */ "../bentley/lib/esm/PriorityQueue.js");
24334
+ /* harmony import */ var _ProcessDetector__WEBPACK_IMPORTED_MODULE_27__ = __webpack_require__(/*! ./ProcessDetector */ "../bentley/lib/esm/ProcessDetector.js");
24335
+ /* harmony import */ var _SortedArray__WEBPACK_IMPORTED_MODULE_28__ = __webpack_require__(/*! ./SortedArray */ "../bentley/lib/esm/SortedArray.js");
24336
+ /* harmony import */ var _StringUtils__WEBPACK_IMPORTED_MODULE_29__ = __webpack_require__(/*! ./StringUtils */ "../bentley/lib/esm/StringUtils.js");
24337
+ /* harmony import */ var _Time__WEBPACK_IMPORTED_MODULE_30__ = __webpack_require__(/*! ./Time */ "../bentley/lib/esm/Time.js");
24338
+ /* harmony import */ var _Tracing__WEBPACK_IMPORTED_MODULE_31__ = __webpack_require__(/*! ./Tracing */ "../bentley/lib/esm/Tracing.js");
24339
+ /* harmony import */ var _TupleKeyedMap__WEBPACK_IMPORTED_MODULE_32__ = __webpack_require__(/*! ./TupleKeyedMap */ "../bentley/lib/esm/TupleKeyedMap.js");
24340
+ /* harmony import */ var _TypedArrayBuilder__WEBPACK_IMPORTED_MODULE_33__ = __webpack_require__(/*! ./TypedArrayBuilder */ "../bentley/lib/esm/TypedArrayBuilder.js");
24341
+ /* harmony import */ var _UnexpectedErrors__WEBPACK_IMPORTED_MODULE_34__ = __webpack_require__(/*! ./UnexpectedErrors */ "../bentley/lib/esm/UnexpectedErrors.js");
24342
+ /* harmony import */ var _UtilityFunctions__WEBPACK_IMPORTED_MODULE_35__ = __webpack_require__(/*! ./UtilityFunctions */ "../bentley/lib/esm/UtilityFunctions.js");
24343
+ /* harmony import */ var _UtilityTypes__WEBPACK_IMPORTED_MODULE_36__ = __webpack_require__(/*! ./UtilityTypes */ "../bentley/lib/esm/UtilityTypes.js");
24344
+ /* harmony import */ var _YieldManager__WEBPACK_IMPORTED_MODULE_37__ = __webpack_require__(/*! ./YieldManager */ "../bentley/lib/esm/YieldManager.js");
24345
+ /* harmony import */ var _internal_cross_package__WEBPACK_IMPORTED_MODULE_38__ = __webpack_require__(/*! ./internal/cross-package */ "../bentley/lib/esm/internal/cross-package.js");
24339
24346
  /*---------------------------------------------------------------------------------------------
24340
24347
  * Copyright (c) Bentley Systems, Incorporated. All rights reserved.
24341
24348
  * See LICENSE.md in the project root for license terms and full copyright notice.
@@ -24375,6 +24382,7 @@ __webpack_require__.r(__webpack_exports__);
24375
24382
 
24376
24383
 
24377
24384
 
24385
+
24378
24386
 
24379
24387
 
24380
24388
  // Temporarily (until 5.0) export top-level internal APIs to avoid breaking callers.
@@ -24938,7 +24946,7 @@ function _createClass(e, r, t) { return r && _defineProperties(e.prototype, r),
24938
24946
  function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object.defineProperty(e, r, { value: t, enumerable: !0, configurable: !0, writable: !0 }) : e[r] = t, e; }
24939
24947
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
24940
24948
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
24941
-
24949
+ ;
24942
24950
 
24943
24951
  var getDefaults = function getDefaults() {
24944
24952
  return {
@@ -25153,7 +25161,7 @@ function _defineProperty(e, r, t) { return (r = _toPropertyKey(r)) in e ? Object
25153
25161
  function _toPropertyKey(t) { var i = _toPrimitive(t, "string"); return "symbol" == _typeof(i) ? i : i + ""; }
25154
25162
  function _toPrimitive(t, r) { if ("object" != _typeof(t) || !t) return t; var e = t[Symbol.toPrimitive]; if (void 0 !== e) { var i = e.call(t, r || "default"); if ("object" != _typeof(i)) return i; throw new TypeError("@@toPrimitive must return a primitive value."); } return ("string" === r ? String : Number)(t); }
25155
25163
  function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }
25156
-
25164
+ ;
25157
25165
  var fetchApi = typeof fetch === 'function' ? fetch : undefined;
25158
25166
  if (typeof __webpack_require__.g !== 'undefined' && __webpack_require__.g.fetch) {
25159
25167
  fetchApi = __webpack_require__.g.fetch;
@@ -25179,7 +25187,7 @@ if (typeof ActiveXObject === 'function') {
25179
25187
  if (typeof fetchApi !== 'function') fetchApi = undefined;
25180
25188
  if (!fetchApi && !XmlHttpRequestApi && !ActiveXObjectApi) {
25181
25189
  try {
25182
- __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f").then(__webpack_require__.t.bind(__webpack_require__, /*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@4.1.0/node_modules/cross-fetch/dist/browser-ponyfill.js", 19)).then(function (mod) {
25190
+ __webpack_require__.e(/*! import() */ "vendors-common_temp_node_modules_pnpm_cross-fetch_4_1_0_node_modules_cross-fetch_dist_browser-44272f").then(() => (__webpack_require__.t(/*! cross-fetch */ "../../common/temp/node_modules/.pnpm/cross-fetch@4.1.0/node_modules/cross-fetch/dist/browser-ponyfill.js", 19))).then(function (mod) {
25183
25191
  fetchApi = mod.default;
25184
25192
  }).catch(function () {});
25185
25193
  } catch (e) {}
@@ -25485,7 +25493,7 @@ function interpolateUrl(str, data) {
25485
25493
  /************************************************************************/
25486
25494
  /******/ /* webpack/runtime/create fake namespace object */
25487
25495
  /******/ (() => {
25488
- /******/ const getProto = Object.getPrototypeOf ? (obj) => (Object.getPrototypeOf(obj)) : (obj) => (obj.__proto__);
25496
+ /******/ const getProto = Object.getPrototypeOf;
25489
25497
  /******/ let leafPrototypes;
25490
25498
  /******/ // create a fake namespace object
25491
25499
  /******/ // mode & 1: value is a module id, require it
@@ -25514,70 +25522,42 @@ function interpolateUrl(str, data) {
25514
25522
  /******/ })();
25515
25523
  /******/
25516
25524
  /******/ /* webpack/runtime/define property getters */
25517
- /******/ (() => {
25518
- /******/ // define getter/value functions for harmony exports
25519
- /******/ __webpack_require__.d = (exports, definition) => {
25520
- /******/ if(Array.isArray(definition)) {
25521
- /******/ var i = 0;
25522
- /******/ while(i < definition.length) {
25523
- /******/ var key = definition[i++];
25524
- /******/ var binding = definition[i++];
25525
- /******/ if(!__webpack_require__.o(exports, key)) {
25526
- /******/ if(binding === 0) {
25527
- /******/ Object.defineProperty(exports, key, { enumerable: true, value: definition[i++] });
25528
- /******/ } else {
25529
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: binding });
25530
- /******/ }
25531
- /******/ } else if(binding === 0) { i++; }
25532
- /******/ }
25533
- /******/ } else {
25534
- /******/ for(var key in definition) {
25535
- /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25536
- /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
25537
- /******/ }
25538
- /******/ }
25525
+ /******/ // define getter/value functions for harmony exports
25526
+ /******/ __webpack_require__.d = (exports, definition) => {
25527
+ /******/ for(var key in definition) {
25528
+ /******/ if(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {
25529
+ /******/ Object.defineProperty(exports, key, { enumerable: true, get: definition[key] });
25539
25530
  /******/ }
25540
- /******/ };
25541
- /******/ })();
25531
+ /******/ }
25532
+ /******/ };
25542
25533
  /******/
25543
25534
  /******/ /* webpack/runtime/ensure chunk */
25544
- /******/ (() => {
25545
- /******/ __webpack_require__.f = {};
25546
- /******/ // This file contains only the entry chunk.
25547
- /******/ // The chunk loading function for additional chunks
25548
- /******/ __webpack_require__.e = (chunkId) => {
25549
- /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
25550
- /******/ __webpack_require__.f[key](chunkId, promises);
25551
- /******/ return promises;
25552
- /******/ }, []));
25553
- /******/ };
25554
- /******/ })();
25535
+ /******/ __webpack_require__.f = {};
25536
+ /******/ // This file contains only the entry chunk.
25537
+ /******/ // The chunk loading function for additional chunks
25538
+ /******/ __webpack_require__.e = (chunkId) => {
25539
+ /******/ return Promise.all(Object.keys(__webpack_require__.f).reduce((promises, key) => {
25540
+ /******/ __webpack_require__.f[key](chunkId, promises);
25541
+ /******/ return promises;
25542
+ /******/ }, []));
25543
+ /******/ };
25555
25544
  /******/
25556
25545
  /******/ /* webpack/runtime/get javascript chunk filename */
25557
- /******/ (() => {
25558
- /******/ // This function allow to reference async chunks
25559
- /******/ __webpack_require__.u = (chunkId) => {
25560
- /******/ // return url for filenames based on template
25561
- /******/ return "" + chunkId + ".bundled-tests.instrumented.js";
25562
- /******/ };
25563
- /******/ })();
25546
+ /******/ // This function allow to reference async chunks
25547
+ /******/ __webpack_require__.u = (chunkId) => (chunkId + ".bundled-tests.instrumented.js");
25564
25548
  /******/
25565
25549
  /******/ /* webpack/runtime/global */
25566
- /******/ (() => {
25567
- /******/ __webpack_require__.g = (function() {
25568
- /******/ if (typeof globalThis === 'object') return globalThis;
25569
- /******/ try {
25570
- /******/ return this || new Function('return this')();
25571
- /******/ } catch (e) {
25572
- /******/ if (typeof window === 'object') return window;
25573
- /******/ }
25574
- /******/ })();
25550
+ /******/ __webpack_require__.g = (function() {
25551
+ /******/ if (typeof globalThis === 'object') return globalThis;
25552
+ /******/ try {
25553
+ /******/ return this || new Function('return this')();
25554
+ /******/ } catch (e) {
25555
+ /******/ if (typeof window === 'object') return window;
25556
+ /******/ }
25575
25557
  /******/ })();
25576
25558
  /******/
25577
25559
  /******/ /* webpack/runtime/hasOwnProperty shorthand */
25578
- /******/ (() => {
25579
- /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop))
25580
- /******/ })();
25560
+ /******/ __webpack_require__.o = (obj, prop) => (Object.prototype.hasOwnProperty.call(obj, prop));
25581
25561
  /******/
25582
25562
  /******/ /* webpack/runtime/load script */
25583
25563
  /******/ (() => {
@@ -25625,15 +25605,11 @@ function interpolateUrl(str, data) {
25625
25605
  /******/ })();
25626
25606
  /******/
25627
25607
  /******/ /* webpack/runtime/make namespace object */
25628
- /******/ (() => {
25629
- /******/ // define __esModule on exports
25630
- /******/ __webpack_require__.r = (exports) => {
25631
- /******/ if(Symbol.toStringTag) {
25632
- /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
25633
- /******/ }
25634
- /******/ Object.defineProperty(exports, '__esModule', { value: true });
25635
- /******/ };
25636
- /******/ })();
25608
+ /******/ // define __esModule on exports
25609
+ /******/ __webpack_require__.r = (exports) => {
25610
+ /******/ Object.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });
25611
+ /******/ Object.defineProperty(exports, '__esModule', { value: true });
25612
+ /******/ };
25637
25613
  /******/
25638
25614
  /******/ /* webpack/runtime/publicPath */
25639
25615
  /******/ (() => {
@@ -25647,14 +25623,14 @@ function interpolateUrl(str, data) {
25647
25623
  /******/ const scripts = document.getElementsByTagName("script");
25648
25624
  /******/ if(scripts.length) {
25649
25625
  /******/ let i = scripts.length - 1;
25650
- /******/ while (i > -1 && (!scriptUrl || !/^http(s?):/.test(scriptUrl))) scriptUrl = scripts[i--].src;
25626
+ /******/ while (i > -1 && (!scriptUrl || !/^https?:/.test(scriptUrl))) scriptUrl = scripts[i--].src;
25651
25627
  /******/ }
25652
25628
  /******/ }
25653
25629
  /******/ }
25654
25630
  /******/ // When supporting browsers where an automatic publicPath is not supported you must specify an output.publicPath manually via configuration
25655
25631
  /******/ // or pass an empty string ("") and set the __webpack_public_path__ variable from your code to use your own logic.
25656
25632
  /******/ if (!scriptUrl) throw new Error("Automatic publicPath is not supported in this browser");
25657
- /******/ scriptUrl = scriptUrl.replace(/^blob:/, "").replace(/#.*$/, "").replace(/\?.*$/, "").replace(/\/[^\/]+$/, "/");
25633
+ /******/ scriptUrl = scriptUrl.replace(/^blob:|[?#].*$/g, "").replace(/\/[^/]+$/, "/");
25658
25634
  /******/ __webpack_require__.p = scriptUrl;
25659
25635
  /******/ })();
25660
25636
  /******/
@@ -25683,8 +25659,6 @@ function interpolateUrl(str, data) {
25683
25659
  /******/ const promise = new Promise((resolve, reject) => (installedChunkData = installedChunks[chunkId] = [resolve, reject]));
25684
25660
  /******/ promises.push(installedChunkData[2] = promise);
25685
25661
  /******/
25686
- /******/ // start chunk loading
25687
- /******/ const url = __webpack_require__.p + __webpack_require__.u(chunkId);
25688
25662
  /******/ // create error before stack unwound to get useful stacktrace later
25689
25663
  /******/ const error = new Error();
25690
25664
  /******/ const loadingEnded = (event) => {
@@ -25698,11 +25672,12 @@ function interpolateUrl(str, data) {
25698
25672
  /******/ error.name = 'ChunkLoadError';
25699
25673
  /******/ error.type = errorType;
25700
25674
  /******/ error.request = realSrc;
25675
+ /******/ error.event = event;
25701
25676
  /******/ installedChunkData[1](error);
25702
25677
  /******/ }
25703
25678
  /******/ }
25704
25679
  /******/ };
25705
- /******/ __webpack_require__.l(url, loadingEnded, "chunk-" + chunkId, chunkId);
25680
+ /******/ __webpack_require__.l(__webpack_require__.p + __webpack_require__.u(chunkId), loadingEnded, "chunk-" + chunkId, chunkId);
25706
25681
  /******/ }
25707
25682
  /******/ }
25708
25683
  /******/ }
@@ -25764,6 +25739,7 @@ let exports = __webpack_exports__;
25764
25739
  *--------------------------------------------------------------------------------------------*/
25765
25740
  Object.defineProperty(exports, "__esModule", ({ value: true }));
25766
25741
  const chai_1 = __webpack_require__(/*! chai */ "../../common/temp/node_modules/.pnpm/chai@4.5.0/node_modules/chai/index.js");
25742
+ const core_bentley_1 = __webpack_require__(/*! @itwin/core-bentley */ "../bentley/lib/esm/core-bentley.js");
25767
25743
  const ITwinLocalization_1 = __webpack_require__(/*! ../ITwinLocalization */ "./lib/cjs/ITwinLocalization.js");
25768
25744
  describe("ITwinLocalization", () => {
25769
25745
  let localization;
@@ -26630,6 +26606,65 @@ describe("ITwinLocalization", () => {
26630
26606
  chai_1.assert.isTrue(itwinLocalization.i18next.hasLoadedNamespace("Test"));
26631
26607
  chai_1.assert.equal(itwinLocalization.getLocalizedString("Test:FirstTrivial"), "First level string (test)");
26632
26608
  });
26609
+ it("attributes errors from concurrent namespace loads to the namespace that failed", async () => {
26610
+ const pendingLoads = new Map();
26611
+ const backend = {
26612
+ type: "backend",
26613
+ init: () => { },
26614
+ read: (_language, namespace, callback) => pendingLoads.set(namespace, callback),
26615
+ };
26616
+ itwinLocalization = new ITwinLocalization_1.ITwinLocalization({
26617
+ backendPlugin: backend,
26618
+ initOptions: { lng: "en", fallbackLng: false },
26619
+ });
26620
+ await itwinLocalization.initialize([]);
26621
+ const loggedErrors = [];
26622
+ // eslint-disable-next-line @typescript-eslint/unbound-method -- Preserve the exact method reference so the test can restore it.
26623
+ const originalLogError = core_bentley_1.Logger.logError;
26624
+ core_bentley_1.Logger.logError = (_category, message) => loggedErrors.push(String(message));
26625
+ try {
26626
+ const loadedPromise = itwinLocalization.registerNamespace("Loaded");
26627
+ const missingPromise = itwinLocalization.registerNamespace("Missing");
26628
+ chai_1.assert.sameMembers([...pendingLoads.keys()], ["Loaded", "Missing"]);
26629
+ pendingLoads.get("Missing")?.(new Error("Missing namespace"), false);
26630
+ pendingLoads.get("Loaded")?.(null, { key: "value" });
26631
+ await Promise.all([missingPromise, loadedPromise]);
26632
+ chai_1.assert.deepEqual(loggedErrors, ["No resources for namespace Missing could be loaded"]);
26633
+ chai_1.assert.isTrue(itwinLocalization.i18next.hasResourceBundle("en", "Loaded"));
26634
+ }
26635
+ finally {
26636
+ core_bentley_1.Logger.logError = originalLogError;
26637
+ }
26638
+ });
26639
+ it("does not log an error when a namespace loads from a fallback language", async () => {
26640
+ const pendingLoads = new Map();
26641
+ const backend = {
26642
+ type: "backend",
26643
+ init: () => { },
26644
+ read: (language, namespace, callback) => pendingLoads.set(`${language}/${namespace}`, callback),
26645
+ };
26646
+ itwinLocalization = new ITwinLocalization_1.ITwinLocalization({
26647
+ backendPlugin: backend,
26648
+ initOptions: { lng: "fr", fallbackLng: "en" },
26649
+ });
26650
+ await itwinLocalization.initialize([]);
26651
+ const loggedErrors = [];
26652
+ // eslint-disable-next-line @typescript-eslint/unbound-method -- Preserve the exact method reference so the test can restore it.
26653
+ const originalLogError = core_bentley_1.Logger.logError;
26654
+ core_bentley_1.Logger.logError = (_category, message) => loggedErrors.push(String(message));
26655
+ try {
26656
+ const loadPromise = itwinLocalization.registerNamespace("Fallback");
26657
+ chai_1.assert.sameMembers([...pendingLoads.keys()], ["fr/Fallback", "en/Fallback"]);
26658
+ pendingLoads.get("fr/Fallback")?.(new Error("Missing French namespace"), false);
26659
+ pendingLoads.get("en/Fallback")?.(null, { key: "value" });
26660
+ await loadPromise;
26661
+ chai_1.assert.isEmpty(loggedErrors);
26662
+ chai_1.assert.isTrue(itwinLocalization.i18next.hasResourceBundle("en", "Fallback"));
26663
+ }
26664
+ finally {
26665
+ core_bentley_1.Logger.logError = originalLogError;
26666
+ }
26667
+ });
26633
26668
  });
26634
26669
  // unregisterNamespace() isn't used and basically does nothing
26635
26670
  // describe("#unregisterNamespace", () => {