@patterkit/model 0.26.0 → 0.27.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,3055 +1,5 @@
1
1
  // src/index.ts
2
2
  import { gameIdify, isValidGameId } from "@wildwinter/toolkit";
3
-
4
- // src/speech-table.ts
5
- var SpeechClass = {
6
- NONE: 0,
7
- LATIN_VOWEL: 1,
8
- LATIN_LETTER: 2,
9
- CYRILLIC_VOWEL: 3,
10
- CYRILLIC_LETTER: 4,
11
- HAN: 5,
12
- KANA: 6,
13
- KANA_SMALL: 7,
14
- KANA_SOKUON: 8,
15
- KANA_LONG: 9,
16
- HANGUL: 10,
17
- ARABIC_LETTER: 11,
18
- ARABIC_VOWEL: 12,
19
- THAI_CONSONANT: 13,
20
- THAI_LEAD: 14,
21
- THAI_VOWEL: 15,
22
- MARK: 16,
23
- OTHER_LETTER: 17,
24
- DIGIT: 18,
25
- PAUSE_SHORT: 19,
26
- PAUSE_LONG: 20,
27
- JOINER: 21,
28
- SPACE: 22
29
- };
30
- var SPEECH_RANGES = [
31
- 9,
32
- 13,
33
- 22,
34
- 32,
35
- 32,
36
- 22,
37
- 33,
38
- 33,
39
- 20,
40
- 39,
41
- 39,
42
- 21,
43
- 44,
44
- 44,
45
- 19,
46
- 46,
47
- 46,
48
- 20,
49
- 48,
50
- 57,
51
- 18,
52
- 58,
53
- 59,
54
- 19,
55
- 63,
56
- 63,
57
- 20,
58
- 65,
59
- 65,
60
- 1,
61
- 66,
62
- 68,
63
- 2,
64
- 69,
65
- 69,
66
- 1,
67
- 70,
68
- 72,
69
- 2,
70
- 73,
71
- 73,
72
- 1,
73
- 74,
74
- 78,
75
- 2,
76
- 79,
77
- 79,
78
- 1,
79
- 80,
80
- 84,
81
- 2,
82
- 85,
83
- 85,
84
- 1,
85
- 86,
86
- 88,
87
- 2,
88
- 89,
89
- 89,
90
- 1,
91
- 90,
92
- 90,
93
- 2,
94
- 97,
95
- 97,
96
- 1,
97
- 98,
98
- 100,
99
- 2,
100
- 101,
101
- 101,
102
- 1,
103
- 102,
104
- 104,
105
- 2,
106
- 105,
107
- 105,
108
- 1,
109
- 106,
110
- 110,
111
- 2,
112
- 111,
113
- 111,
114
- 1,
115
- 112,
116
- 116,
117
- 2,
118
- 117,
119
- 117,
120
- 1,
121
- 118,
122
- 120,
123
- 2,
124
- 121,
125
- 121,
126
- 1,
127
- 122,
128
- 122,
129
- 2,
130
- 133,
131
- 133,
132
- 22,
133
- 160,
134
- 160,
135
- 22,
136
- 170,
137
- 170,
138
- 2,
139
- 173,
140
- 173,
141
- 21,
142
- 181,
143
- 181,
144
- 17,
145
- 186,
146
- 186,
147
- 2,
148
- 192,
149
- 198,
150
- 1,
151
- 199,
152
- 199,
153
- 2,
154
- 200,
155
- 207,
156
- 1,
157
- 208,
158
- 209,
159
- 2,
160
- 210,
161
- 214,
162
- 1,
163
- 216,
164
- 221,
165
- 1,
166
- 222,
167
- 223,
168
- 2,
169
- 224,
170
- 230,
171
- 1,
172
- 231,
173
- 231,
174
- 2,
175
- 232,
176
- 239,
177
- 1,
178
- 240,
179
- 241,
180
- 2,
181
- 242,
182
- 246,
183
- 1,
184
- 248,
185
- 253,
186
- 1,
187
- 254,
188
- 254,
189
- 2,
190
- 255,
191
- 261,
192
- 1,
193
- 262,
194
- 273,
195
- 2,
196
- 274,
197
- 283,
198
- 1,
199
- 284,
200
- 295,
201
- 2,
202
- 296,
203
- 305,
204
- 1,
205
- 306,
206
- 331,
207
- 2,
208
- 332,
209
- 339,
210
- 1,
211
- 340,
212
- 359,
213
- 2,
214
- 360,
215
- 371,
216
- 1,
217
- 372,
218
- 373,
219
- 2,
220
- 374,
221
- 376,
222
- 1,
223
- 377,
224
- 415,
225
- 2,
226
- 416,
227
- 417,
228
- 1,
229
- 418,
230
- 430,
231
- 2,
232
- 431,
233
- 432,
234
- 1,
235
- 433,
236
- 460,
237
- 2,
238
- 461,
239
- 476,
240
- 1,
241
- 477,
242
- 477,
243
- 2,
244
- 478,
245
- 483,
246
- 1,
247
- 484,
248
- 489,
249
- 2,
250
- 490,
251
- 493,
252
- 1,
253
- 494,
254
- 505,
255
- 2,
256
- 506,
257
- 527,
258
- 1,
259
- 528,
260
- 531,
261
- 2,
262
- 532,
263
- 535,
264
- 1,
265
- 536,
266
- 549,
267
- 2,
268
- 550,
269
- 563,
270
- 1,
271
- 564,
272
- 696,
273
- 2,
274
- 697,
275
- 699,
276
- 17,
277
- 700,
278
- 700,
279
- 21,
280
- 701,
281
- 705,
282
- 17,
283
- 710,
284
- 721,
285
- 17,
286
- 736,
287
- 740,
288
- 2,
289
- 748,
290
- 748,
291
- 17,
292
- 750,
293
- 750,
294
- 17,
295
- 768,
296
- 879,
297
- 16,
298
- 880,
299
- 884,
300
- 17,
301
- 886,
302
- 893,
303
- 17,
304
- 895,
305
- 895,
306
- 17,
307
- 902,
308
- 902,
309
- 17,
310
- 904,
311
- 1013,
312
- 17,
313
- 1015,
314
- 1023,
315
- 17,
316
- 1024,
317
- 1025,
318
- 3,
319
- 1026,
320
- 1027,
321
- 4,
322
- 1028,
323
- 1028,
324
- 3,
325
- 1029,
326
- 1029,
327
- 4,
328
- 1030,
329
- 1031,
330
- 3,
331
- 1032,
332
- 1036,
333
- 4,
334
- 1037,
335
- 1038,
336
- 3,
337
- 1039,
338
- 1039,
339
- 4,
340
- 1040,
341
- 1040,
342
- 3,
343
- 1041,
344
- 1044,
345
- 4,
346
- 1045,
347
- 1045,
348
- 3,
349
- 1046,
350
- 1047,
351
- 4,
352
- 1048,
353
- 1048,
354
- 3,
355
- 1049,
356
- 1053,
357
- 4,
358
- 1054,
359
- 1054,
360
- 3,
361
- 1055,
362
- 1058,
363
- 4,
364
- 1059,
365
- 1059,
366
- 3,
367
- 1060,
368
- 1066,
369
- 4,
370
- 1067,
371
- 1067,
372
- 3,
373
- 1068,
374
- 1068,
375
- 4,
376
- 1069,
377
- 1072,
378
- 3,
379
- 1073,
380
- 1076,
381
- 4,
382
- 1077,
383
- 1077,
384
- 3,
385
- 1078,
386
- 1079,
387
- 4,
388
- 1080,
389
- 1080,
390
- 3,
391
- 1081,
392
- 1085,
393
- 4,
394
- 1086,
395
- 1086,
396
- 3,
397
- 1087,
398
- 1090,
399
- 4,
400
- 1091,
401
- 1091,
402
- 3,
403
- 1092,
404
- 1098,
405
- 4,
406
- 1099,
407
- 1099,
408
- 3,
409
- 1100,
410
- 1100,
411
- 4,
412
- 1101,
413
- 1105,
414
- 3,
415
- 1106,
416
- 1107,
417
- 4,
418
- 1108,
419
- 1108,
420
- 3,
421
- 1109,
422
- 1109,
423
- 4,
424
- 1110,
425
- 1111,
426
- 3,
427
- 1112,
428
- 1116,
429
- 4,
430
- 1117,
431
- 1118,
432
- 3,
433
- 1119,
434
- 1153,
435
- 4,
436
- 1155,
437
- 1161,
438
- 16,
439
- 1162,
440
- 1231,
441
- 4,
442
- 1232,
443
- 1235,
444
- 3,
445
- 1236,
446
- 1237,
447
- 4,
448
- 1238,
449
- 1239,
450
- 3,
451
- 1240,
452
- 1249,
453
- 4,
454
- 1250,
455
- 1255,
456
- 3,
457
- 1256,
458
- 1259,
459
- 4,
460
- 1260,
461
- 1267,
462
- 3,
463
- 1268,
464
- 1271,
465
- 4,
466
- 1272,
467
- 1273,
468
- 3,
469
- 1274,
470
- 1327,
471
- 4,
472
- 1329,
473
- 1369,
474
- 17,
475
- 1376,
476
- 1416,
477
- 17,
478
- 1425,
479
- 1469,
480
- 17,
481
- 1471,
482
- 1471,
483
- 17,
484
- 1473,
485
- 1474,
486
- 17,
487
- 1476,
488
- 1477,
489
- 17,
490
- 1479,
491
- 1522,
492
- 17,
493
- 1548,
494
- 1548,
495
- 19,
496
- 1552,
497
- 1562,
498
- 16,
499
- 1563,
500
- 1563,
501
- 19,
502
- 1567,
503
- 1567,
504
- 20,
505
- 1568,
506
- 1599,
507
- 11,
508
- 1600,
509
- 1600,
510
- 16,
511
- 1601,
512
- 1610,
513
- 11,
514
- 1611,
515
- 1616,
516
- 12,
517
- 1617,
518
- 1631,
519
- 16,
520
- 1632,
521
- 1641,
522
- 18,
523
- 1646,
524
- 1647,
525
- 11,
526
- 1648,
527
- 1648,
528
- 12,
529
- 1649,
530
- 1747,
531
- 11,
532
- 1748,
533
- 1748,
534
- 20,
535
- 1749,
536
- 1749,
537
- 11,
538
- 1750,
539
- 1756,
540
- 16,
541
- 1759,
542
- 1764,
543
- 16,
544
- 1765,
545
- 1766,
546
- 11,
547
- 1767,
548
- 1768,
549
- 16,
550
- 1770,
551
- 1773,
552
- 16,
553
- 1774,
554
- 1775,
555
- 11,
556
- 1776,
557
- 1785,
558
- 18,
559
- 1786,
560
- 1788,
561
- 11,
562
- 1791,
563
- 1791,
564
- 11,
565
- 1808,
566
- 1871,
567
- 17,
568
- 1872,
569
- 1919,
570
- 11,
571
- 1920,
572
- 2037,
573
- 17,
574
- 2042,
575
- 2045,
576
- 17,
577
- 2048,
578
- 2093,
579
- 17,
580
- 2112,
581
- 2139,
582
- 17,
583
- 2144,
584
- 2154,
585
- 17,
586
- 2160,
587
- 2183,
588
- 11,
589
- 2185,
590
- 2191,
591
- 11,
592
- 2199,
593
- 2207,
594
- 16,
595
- 2208,
596
- 2249,
597
- 11,
598
- 2250,
599
- 2273,
600
- 16,
601
- 2275,
602
- 2303,
603
- 16,
604
- 2304,
605
- 2384,
606
- 17,
607
- 2385,
608
- 2388,
609
- 16,
610
- 2389,
611
- 2403,
612
- 17,
613
- 2404,
614
- 2405,
615
- 20,
616
- 2406,
617
- 2415,
618
- 17,
619
- 2417,
620
- 2545,
621
- 17,
622
- 2556,
623
- 2556,
624
- 17,
625
- 2558,
626
- 2677,
627
- 17,
628
- 2689,
629
- 2799,
630
- 17,
631
- 2809,
632
- 2927,
633
- 17,
634
- 2929,
635
- 2929,
636
- 17,
637
- 2946,
638
- 3055,
639
- 17,
640
- 3072,
641
- 3183,
642
- 17,
643
- 3200,
644
- 3203,
645
- 17,
646
- 3205,
647
- 3406,
648
- 17,
649
- 3412,
650
- 3415,
651
- 17,
652
- 3423,
653
- 3439,
654
- 17,
655
- 3450,
656
- 3571,
657
- 17,
658
- 3585,
659
- 3630,
660
- 13,
661
- 3631,
662
- 3631,
663
- 16,
664
- 3632,
665
- 3641,
666
- 15,
667
- 3642,
668
- 3642,
669
- 16,
670
- 3648,
671
- 3652,
672
- 14,
673
- 3653,
674
- 3654,
675
- 16,
676
- 3655,
677
- 3655,
678
- 15,
679
- 3656,
680
- 3660,
681
- 16,
682
- 3661,
683
- 3661,
684
- 15,
685
- 3662,
686
- 3662,
687
- 16,
688
- 3664,
689
- 3673,
690
- 18,
691
- 3713,
692
- 3840,
693
- 17,
694
- 3864,
695
- 3865,
696
- 17,
697
- 3872,
698
- 3881,
699
- 17,
700
- 3893,
701
- 3893,
702
- 17,
703
- 3895,
704
- 3895,
705
- 17,
706
- 3897,
707
- 3897,
708
- 17,
709
- 3902,
710
- 3972,
711
- 17,
712
- 3974,
713
- 4028,
714
- 17,
715
- 4038,
716
- 4038,
717
- 17,
718
- 4096,
719
- 4169,
720
- 17,
721
- 4176,
722
- 4253,
723
- 17,
724
- 4256,
725
- 4346,
726
- 17,
727
- 4348,
728
- 4959,
729
- 17,
730
- 4992,
731
- 5007,
732
- 17,
733
- 5024,
734
- 5117,
735
- 17,
736
- 5121,
737
- 5740,
738
- 17,
739
- 5743,
740
- 5759,
741
- 17,
742
- 5760,
743
- 5760,
744
- 22,
745
- 5761,
746
- 5786,
747
- 17,
748
- 5792,
749
- 5866,
750
- 17,
751
- 5873,
752
- 5940,
753
- 17,
754
- 5952,
755
- 6099,
756
- 17,
757
- 6103,
758
- 6103,
759
- 17,
760
- 6108,
761
- 6121,
762
- 17,
763
- 6155,
764
- 6157,
765
- 17,
766
- 6159,
767
- 6459,
768
- 17,
769
- 6470,
770
- 6617,
771
- 17,
772
- 6656,
773
- 6683,
774
- 17,
775
- 6688,
776
- 6809,
777
- 17,
778
- 6823,
779
- 6823,
780
- 17,
781
- 6832,
782
- 6891,
783
- 16,
784
- 6912,
785
- 6988,
786
- 17,
787
- 6992,
788
- 7001,
789
- 17,
790
- 7019,
791
- 7027,
792
- 17,
793
- 7040,
794
- 7155,
795
- 17,
796
- 7168,
797
- 7223,
798
- 17,
799
- 7232,
800
- 7293,
801
- 17,
802
- 7296,
803
- 7306,
804
- 4,
805
- 7312,
806
- 7359,
807
- 17,
808
- 7376,
809
- 7378,
810
- 16,
811
- 7380,
812
- 7392,
813
- 16,
814
- 7393,
815
- 7393,
816
- 17,
817
- 7394,
818
- 7400,
819
- 16,
820
- 7401,
821
- 7404,
822
- 17,
823
- 7405,
824
- 7405,
825
- 16,
826
- 7406,
827
- 7411,
828
- 17,
829
- 7412,
830
- 7412,
831
- 16,
832
- 7413,
833
- 7415,
834
- 17,
835
- 7416,
836
- 7417,
837
- 16,
838
- 7418,
839
- 7418,
840
- 17,
841
- 7424,
842
- 7461,
843
- 2,
844
- 7462,
845
- 7466,
846
- 17,
847
- 7467,
848
- 7467,
849
- 4,
850
- 7468,
851
- 7516,
852
- 2,
853
- 7517,
854
- 7521,
855
- 17,
856
- 7522,
857
- 7525,
858
- 2,
859
- 7526,
860
- 7530,
861
- 17,
862
- 7531,
863
- 7543,
864
- 2,
865
- 7544,
866
- 7544,
867
- 4,
868
- 7545,
869
- 7614,
870
- 2,
871
- 7615,
872
- 7615,
873
- 17,
874
- 7616,
875
- 7679,
876
- 16,
877
- 7680,
878
- 7681,
879
- 1,
880
- 7682,
881
- 7699,
882
- 2,
883
- 7700,
884
- 7709,
885
- 1,
886
- 7710,
887
- 7723,
888
- 2,
889
- 7724,
890
- 7727,
891
- 1,
892
- 7728,
893
- 7755,
894
- 2,
895
- 7756,
896
- 7763,
897
- 1,
898
- 7764,
899
- 7793,
900
- 2,
901
- 7794,
902
- 7803,
903
- 1,
904
- 7804,
905
- 7821,
906
- 2,
907
- 7822,
908
- 7823,
909
- 1,
910
- 7824,
911
- 7832,
912
- 2,
913
- 7833,
914
- 7833,
915
- 1,
916
- 7834,
917
- 7839,
918
- 2,
919
- 7840,
920
- 7929,
921
- 1,
922
- 7930,
923
- 7935,
924
- 2,
925
- 7936,
926
- 8124,
927
- 17,
928
- 8126,
929
- 8126,
930
- 17,
931
- 8130,
932
- 8140,
933
- 17,
934
- 8144,
935
- 8155,
936
- 17,
937
- 8160,
938
- 8172,
939
- 17,
940
- 8178,
941
- 8188,
942
- 17,
943
- 8192,
944
- 8202,
945
- 22,
946
- 8204,
947
- 8205,
948
- 21,
949
- 8211,
950
- 8212,
951
- 19,
952
- 8217,
953
- 8217,
954
- 21,
955
- 8230,
956
- 8230,
957
- 20,
958
- 8232,
959
- 8233,
960
- 22,
961
- 8239,
962
- 8239,
963
- 22,
964
- 8253,
965
- 8253,
966
- 20,
967
- 8263,
968
- 8265,
969
- 20,
970
- 8287,
971
- 8287,
972
- 22,
973
- 8305,
974
- 8305,
975
- 2,
976
- 8319,
977
- 8319,
978
- 2,
979
- 8336,
980
- 8348,
981
- 2,
982
- 8400,
983
- 8432,
984
- 16,
985
- 8450,
986
- 8450,
987
- 17,
988
- 8455,
989
- 8455,
990
- 17,
991
- 8458,
992
- 8467,
993
- 17,
994
- 8469,
995
- 8469,
996
- 17,
997
- 8473,
998
- 8477,
999
- 17,
1000
- 8484,
1001
- 8484,
1002
- 17,
1003
- 8486,
1004
- 8486,
1005
- 17,
1006
- 8488,
1007
- 8488,
1008
- 17,
1009
- 8490,
1010
- 8490,
1011
- 2,
1012
- 8491,
1013
- 8491,
1014
- 1,
1015
- 8492,
1016
- 8493,
1017
- 17,
1018
- 8495,
1019
- 8497,
1020
- 17,
1021
- 8498,
1022
- 8498,
1023
- 2,
1024
- 8499,
1025
- 8505,
1026
- 17,
1027
- 8508,
1028
- 8511,
1029
- 17,
1030
- 8517,
1031
- 8521,
1032
- 17,
1033
- 8526,
1034
- 8526,
1035
- 2,
1036
- 8579,
1037
- 8580,
1038
- 2,
1039
- 11264,
1040
- 11359,
1041
- 17,
1042
- 11360,
1043
- 11391,
1044
- 2,
1045
- 11392,
1046
- 11492,
1047
- 17,
1048
- 11499,
1049
- 11507,
1050
- 17,
1051
- 11520,
1052
- 11631,
1053
- 17,
1054
- 11647,
1055
- 11742,
1056
- 17,
1057
- 11744,
1058
- 11775,
1059
- 16,
1060
- 11823,
1061
- 11823,
1062
- 17,
1063
- 12288,
1064
- 12288,
1065
- 22,
1066
- 12289,
1067
- 12289,
1068
- 19,
1069
- 12290,
1070
- 12290,
1071
- 20,
1072
- 12293,
1073
- 12293,
1074
- 5,
1075
- 12294,
1076
- 12294,
1077
- 17,
1078
- 12330,
1079
- 12335,
1080
- 16,
1081
- 12337,
1082
- 12341,
1083
- 17,
1084
- 12347,
1085
- 12347,
1086
- 5,
1087
- 12348,
1088
- 12348,
1089
- 17,
1090
- 12353,
1091
- 12353,
1092
- 7,
1093
- 12354,
1094
- 12354,
1095
- 6,
1096
- 12355,
1097
- 12355,
1098
- 7,
1099
- 12356,
1100
- 12356,
1101
- 6,
1102
- 12357,
1103
- 12357,
1104
- 7,
1105
- 12358,
1106
- 12358,
1107
- 6,
1108
- 12359,
1109
- 12359,
1110
- 7,
1111
- 12360,
1112
- 12360,
1113
- 6,
1114
- 12361,
1115
- 12361,
1116
- 7,
1117
- 12362,
1118
- 12386,
1119
- 6,
1120
- 12387,
1121
- 12387,
1122
- 8,
1123
- 12388,
1124
- 12418,
1125
- 6,
1126
- 12419,
1127
- 12419,
1128
- 7,
1129
- 12420,
1130
- 12420,
1131
- 6,
1132
- 12421,
1133
- 12421,
1134
- 7,
1135
- 12422,
1136
- 12422,
1137
- 6,
1138
- 12423,
1139
- 12423,
1140
- 7,
1141
- 12424,
1142
- 12429,
1143
- 6,
1144
- 12430,
1145
- 12430,
1146
- 7,
1147
- 12431,
1148
- 12436,
1149
- 6,
1150
- 12437,
1151
- 12438,
1152
- 7,
1153
- 12441,
1154
- 12444,
1155
- 16,
1156
- 12445,
1157
- 12447,
1158
- 6,
1159
- 12449,
1160
- 12449,
1161
- 7,
1162
- 12450,
1163
- 12450,
1164
- 6,
1165
- 12451,
1166
- 12451,
1167
- 7,
1168
- 12452,
1169
- 12452,
1170
- 6,
1171
- 12453,
1172
- 12453,
1173
- 7,
1174
- 12454,
1175
- 12454,
1176
- 6,
1177
- 12455,
1178
- 12455,
1179
- 7,
1180
- 12456,
1181
- 12456,
1182
- 6,
1183
- 12457,
1184
- 12457,
1185
- 7,
1186
- 12458,
1187
- 12482,
1188
- 6,
1189
- 12483,
1190
- 12483,
1191
- 8,
1192
- 12484,
1193
- 12514,
1194
- 6,
1195
- 12515,
1196
- 12515,
1197
- 7,
1198
- 12516,
1199
- 12516,
1200
- 6,
1201
- 12517,
1202
- 12517,
1203
- 7,
1204
- 12518,
1205
- 12518,
1206
- 6,
1207
- 12519,
1208
- 12519,
1209
- 7,
1210
- 12520,
1211
- 12525,
1212
- 6,
1213
- 12526,
1214
- 12526,
1215
- 7,
1216
- 12527,
1217
- 12538,
1218
- 6,
1219
- 12540,
1220
- 12540,
1221
- 9,
1222
- 12541,
1223
- 12543,
1224
- 6,
1225
- 12549,
1226
- 12686,
1227
- 17,
1228
- 12704,
1229
- 12735,
1230
- 17,
1231
- 12784,
1232
- 12799,
1233
- 7,
1234
- 13312,
1235
- 19903,
1236
- 5,
1237
- 19968,
1238
- 40959,
1239
- 5,
1240
- 40960,
1241
- 42124,
1242
- 17,
1243
- 42192,
1244
- 42237,
1245
- 17,
1246
- 42240,
1247
- 42508,
1248
- 17,
1249
- 42512,
1250
- 42539,
1251
- 17,
1252
- 42560,
1253
- 42606,
1254
- 4,
1255
- 42607,
1256
- 42610,
1257
- 16,
1258
- 42612,
1259
- 42621,
1260
- 16,
1261
- 42623,
1262
- 42653,
1263
- 4,
1264
- 42654,
1265
- 42655,
1266
- 16,
1267
- 42656,
1268
- 42725,
1269
- 17,
1270
- 42736,
1271
- 42737,
1272
- 17,
1273
- 42775,
1274
- 42783,
1275
- 17,
1276
- 42786,
1277
- 42887,
1278
- 2,
1279
- 42888,
1280
- 42888,
1281
- 17,
1282
- 42891,
1283
- 43007,
1284
- 2,
1285
- 43008,
1286
- 43047,
1287
- 17,
1288
- 43052,
1289
- 43052,
1290
- 17,
1291
- 43072,
1292
- 43123,
1293
- 17,
1294
- 43136,
1295
- 43205,
1296
- 17,
1297
- 43216,
1298
- 43255,
1299
- 17,
1300
- 43259,
1301
- 43259,
1302
- 17,
1303
- 43261,
1304
- 43309,
1305
- 17,
1306
- 43312,
1307
- 43347,
1308
- 17,
1309
- 43360,
1310
- 43456,
1311
- 17,
1312
- 43471,
1313
- 43481,
1314
- 17,
1315
- 43488,
1316
- 43609,
1317
- 17,
1318
- 43616,
1319
- 43638,
1320
- 17,
1321
- 43642,
1322
- 43741,
1323
- 17,
1324
- 43744,
1325
- 43759,
1326
- 17,
1327
- 43762,
1328
- 43822,
1329
- 17,
1330
- 43824,
1331
- 43866,
1332
- 2,
1333
- 43868,
1334
- 43876,
1335
- 2,
1336
- 43877,
1337
- 43877,
1338
- 17,
1339
- 43878,
1340
- 43881,
1341
- 2,
1342
- 43888,
1343
- 44010,
1344
- 17,
1345
- 44012,
1346
- 44025,
1347
- 17,
1348
- 44032,
1349
- 55203,
1350
- 10,
1351
- 55216,
1352
- 55291,
1353
- 17,
1354
- 63744,
1355
- 64217,
1356
- 5,
1357
- 64256,
1358
- 64262,
1359
- 2,
1360
- 64275,
1361
- 64296,
1362
- 17,
1363
- 64298,
1364
- 64335,
1365
- 17,
1366
- 64336,
1367
- 64433,
1368
- 11,
1369
- 64467,
1370
- 64829,
1371
- 11,
1372
- 64848,
1373
- 64911,
1374
- 11,
1375
- 64914,
1376
- 64967,
1377
- 11,
1378
- 65008,
1379
- 65019,
1380
- 11,
1381
- 65024,
1382
- 65039,
1383
- 16,
1384
- 65056,
1385
- 65071,
1386
- 16,
1387
- 65104,
1388
- 65105,
1389
- 19,
1390
- 65136,
1391
- 65276,
1392
- 11,
1393
- 65281,
1394
- 65281,
1395
- 20,
1396
- 65292,
1397
- 65292,
1398
- 19,
1399
- 65294,
1400
- 65294,
1401
- 20,
1402
- 65296,
1403
- 65305,
1404
- 18,
1405
- 65306,
1406
- 65307,
1407
- 19,
1408
- 65311,
1409
- 65311,
1410
- 20,
1411
- 65313,
1412
- 65338,
1413
- 2,
1414
- 65345,
1415
- 65370,
1416
- 2,
1417
- 65377,
1418
- 65377,
1419
- 20,
1420
- 65380,
1421
- 65380,
1422
- 19,
1423
- 65382,
1424
- 65382,
1425
- 6,
1426
- 65383,
1427
- 65390,
1428
- 7,
1429
- 65391,
1430
- 65391,
1431
- 8,
1432
- 65392,
1433
- 65392,
1434
- 9,
1435
- 65393,
1436
- 65437,
1437
- 6,
1438
- 65438,
1439
- 65439,
1440
- 16,
1441
- 65440,
1442
- 65500,
1443
- 17,
1444
- 65536,
1445
- 65786,
1446
- 17,
1447
- 66045,
1448
- 66045,
1449
- 16,
1450
- 66176,
1451
- 66256,
1452
- 17,
1453
- 66272,
1454
- 66272,
1455
- 16,
1456
- 66304,
1457
- 66335,
1458
- 17,
1459
- 66349,
1460
- 66368,
1461
- 17,
1462
- 66370,
1463
- 66377,
1464
- 17,
1465
- 66384,
1466
- 66461,
1467
- 17,
1468
- 66464,
1469
- 66511,
1470
- 17,
1471
- 66560,
1472
- 66915,
1473
- 17,
1474
- 66928,
1475
- 67431,
1476
- 17,
1477
- 67456,
1478
- 67514,
1479
- 2,
1480
- 67584,
1481
- 67669,
1482
- 17,
1483
- 67680,
1484
- 67702,
1485
- 17,
1486
- 67712,
1487
- 67742,
1488
- 17,
1489
- 67808,
1490
- 67829,
1491
- 17,
1492
- 67840,
1493
- 67861,
1494
- 17,
1495
- 67872,
1496
- 67897,
1497
- 17,
1498
- 67904,
1499
- 68023,
1500
- 17,
1501
- 68030,
1502
- 68031,
1503
- 17,
1504
- 68096,
1505
- 68159,
1506
- 17,
1507
- 68192,
1508
- 68220,
1509
- 17,
1510
- 68224,
1511
- 68252,
1512
- 17,
1513
- 68288,
1514
- 68295,
1515
- 17,
1516
- 68297,
1517
- 68326,
1518
- 17,
1519
- 68352,
1520
- 68405,
1521
- 17,
1522
- 68416,
1523
- 68437,
1524
- 17,
1525
- 68448,
1526
- 68466,
1527
- 17,
1528
- 68480,
1529
- 68497,
1530
- 17,
1531
- 68608,
1532
- 68850,
1533
- 17,
1534
- 68864,
1535
- 68973,
1536
- 17,
1537
- 68975,
1538
- 68997,
1539
- 17,
1540
- 69248,
1541
- 69292,
1542
- 17,
1543
- 69296,
1544
- 69297,
1545
- 17,
1546
- 69314,
1547
- 69319,
1548
- 11,
1549
- 69370,
1550
- 69375,
1551
- 16,
1552
- 69376,
1553
- 69404,
1554
- 17,
1555
- 69415,
1556
- 69456,
1557
- 17,
1558
- 69488,
1559
- 69509,
1560
- 17,
1561
- 69552,
1562
- 69572,
1563
- 17,
1564
- 69600,
1565
- 69702,
1566
- 17,
1567
- 69734,
1568
- 69818,
1569
- 17,
1570
- 69826,
1571
- 69826,
1572
- 17,
1573
- 69840,
1574
- 69951,
1575
- 17,
1576
- 69956,
1577
- 70003,
1578
- 17,
1579
- 70006,
1580
- 70084,
1581
- 17,
1582
- 70089,
1583
- 70092,
1584
- 17,
1585
- 70094,
1586
- 70106,
1587
- 17,
1588
- 70108,
1589
- 70108,
1590
- 17,
1591
- 70144,
1592
- 70199,
1593
- 17,
1594
- 70206,
1595
- 70312,
1596
- 17,
1597
- 70320,
1598
- 70457,
1599
- 17,
1600
- 70459,
1601
- 70459,
1602
- 16,
1603
- 70460,
1604
- 70611,
1605
- 17,
1606
- 70625,
1607
- 70730,
1608
- 17,
1609
- 70736,
1610
- 70745,
1611
- 17,
1612
- 70750,
1613
- 70853,
1614
- 17,
1615
- 70855,
1616
- 71104,
1617
- 17,
1618
- 71128,
1619
- 71232,
1620
- 17,
1621
- 71236,
1622
- 71257,
1623
- 17,
1624
- 71296,
1625
- 71352,
1626
- 17,
1627
- 71360,
1628
- 71481,
1629
- 17,
1630
- 71488,
1631
- 71738,
1632
- 17,
1633
- 71840,
1634
- 71913,
1635
- 17,
1636
- 71935,
1637
- 72003,
1638
- 17,
1639
- 72016,
1640
- 72161,
1641
- 17,
1642
- 72163,
1643
- 72254,
1644
- 17,
1645
- 72263,
1646
- 72345,
1647
- 17,
1648
- 72349,
1649
- 72349,
1650
- 17,
1651
- 72368,
1652
- 72440,
1653
- 17,
1654
- 72544,
1655
- 72672,
1656
- 17,
1657
- 72688,
1658
- 72768,
1659
- 17,
1660
- 72784,
1661
- 72793,
1662
- 17,
1663
- 72818,
1664
- 73462,
1665
- 17,
1666
- 73472,
1667
- 73538,
1668
- 17,
1669
- 73552,
1670
- 73648,
1671
- 17,
1672
- 73728,
1673
- 74649,
1674
- 17,
1675
- 74880,
1676
- 77808,
1677
- 17,
1678
- 77824,
1679
- 78895,
1680
- 17,
1681
- 78912,
1682
- 92777,
1683
- 17,
1684
- 92784,
1685
- 92916,
1686
- 17,
1687
- 92928,
1688
- 92982,
1689
- 17,
1690
- 92992,
1691
- 92995,
1692
- 17,
1693
- 93008,
1694
- 93017,
1695
- 17,
1696
- 93027,
1697
- 93548,
1698
- 17,
1699
- 93552,
1700
- 93823,
1701
- 17,
1702
- 93856,
1703
- 94177,
1704
- 17,
1705
- 94179,
1706
- 94179,
1707
- 5,
1708
- 94180,
1709
- 94180,
1710
- 17,
1711
- 94192,
1712
- 94193,
1713
- 16,
1714
- 94194,
1715
- 94195,
1716
- 5,
1717
- 94208,
1718
- 101874,
1719
- 17,
1720
- 110576,
1721
- 110951,
1722
- 6,
1723
- 110960,
1724
- 113817,
1725
- 17,
1726
- 113821,
1727
- 113822,
1728
- 17,
1729
- 118e3,
1730
- 118009,
1731
- 17,
1732
- 118528,
1733
- 118598,
1734
- 16,
1735
- 119141,
1736
- 119142,
1737
- 17,
1738
- 119143,
1739
- 119145,
1740
- 16,
1741
- 119149,
1742
- 119154,
1743
- 17,
1744
- 119163,
1745
- 119170,
1746
- 16,
1747
- 119173,
1748
- 119179,
1749
- 16,
1750
- 119210,
1751
- 119213,
1752
- 16,
1753
- 119362,
1754
- 119364,
1755
- 17,
1756
- 119808,
1757
- 120512,
1758
- 17,
1759
- 120514,
1760
- 120538,
1761
- 17,
1762
- 120540,
1763
- 120570,
1764
- 17,
1765
- 120572,
1766
- 120596,
1767
- 17,
1768
- 120598,
1769
- 120628,
1770
- 17,
1771
- 120630,
1772
- 120654,
1773
- 17,
1774
- 120656,
1775
- 120686,
1776
- 17,
1777
- 120688,
1778
- 120712,
1779
- 17,
1780
- 120714,
1781
- 120744,
1782
- 17,
1783
- 120746,
1784
- 120770,
1785
- 17,
1786
- 120772,
1787
- 120831,
1788
- 17,
1789
- 121344,
1790
- 121398,
1791
- 17,
1792
- 121403,
1793
- 121452,
1794
- 17,
1795
- 121461,
1796
- 121461,
1797
- 17,
1798
- 121476,
1799
- 121476,
1800
- 17,
1801
- 121499,
1802
- 121519,
1803
- 17,
1804
- 122624,
1805
- 122666,
1806
- 2,
1807
- 122880,
1808
- 122922,
1809
- 17,
1810
- 122928,
1811
- 122989,
1812
- 4,
1813
- 123023,
1814
- 123023,
1815
- 16,
1816
- 123136,
1817
- 123214,
1818
- 17,
1819
- 123536,
1820
- 123641,
1821
- 17,
1822
- 124112,
1823
- 124410,
1824
- 17,
1825
- 124608,
1826
- 125124,
1827
- 17,
1828
- 125136,
1829
- 125273,
1830
- 17,
1831
- 126464,
1832
- 126651,
1833
- 11,
1834
- 130032,
1835
- 130041,
1836
- 17,
1837
- 131072,
1838
- 210041,
1839
- 5,
1840
- 917760,
1841
- 917999,
1842
- 16
1843
- ];
1844
- var SPEECH_VOWELS = ["", "a", "e", "i", "o", "u", "\u0259"];
1845
- var SPEECH_VOWEL_WEAK = 8;
1846
- var SPEECH_VOWEL_RANGES = [
1847
- 65,
1848
- 65,
1849
- 1,
1850
- 69,
1851
- 69,
1852
- 2,
1853
- 73,
1854
- 73,
1855
- 3,
1856
- 79,
1857
- 79,
1858
- 4,
1859
- 85,
1860
- 85,
1861
- 5,
1862
- 89,
1863
- 89,
1864
- 11,
1865
- 97,
1866
- 97,
1867
- 1,
1868
- 101,
1869
- 101,
1870
- 2,
1871
- 105,
1872
- 105,
1873
- 3,
1874
- 111,
1875
- 111,
1876
- 4,
1877
- 117,
1878
- 117,
1879
- 5,
1880
- 121,
1881
- 121,
1882
- 11,
1883
- 192,
1884
- 197,
1885
- 1,
1886
- 198,
1887
- 198,
1888
- 2,
1889
- 200,
1890
- 203,
1891
- 2,
1892
- 204,
1893
- 207,
1894
- 3,
1895
- 210,
1896
- 214,
1897
- 4,
1898
- 216,
1899
- 216,
1900
- 4,
1901
- 217,
1902
- 220,
1903
- 5,
1904
- 221,
1905
- 221,
1906
- 11,
1907
- 224,
1908
- 229,
1909
- 1,
1910
- 230,
1911
- 230,
1912
- 2,
1913
- 232,
1914
- 235,
1915
- 2,
1916
- 236,
1917
- 239,
1918
- 3,
1919
- 242,
1920
- 246,
1921
- 4,
1922
- 248,
1923
- 248,
1924
- 4,
1925
- 249,
1926
- 252,
1927
- 5,
1928
- 253,
1929
- 253,
1930
- 11,
1931
- 255,
1932
- 255,
1933
- 11,
1934
- 256,
1935
- 261,
1936
- 1,
1937
- 274,
1938
- 283,
1939
- 2,
1940
- 296,
1941
- 305,
1942
- 3,
1943
- 332,
1944
- 337,
1945
- 4,
1946
- 338,
1947
- 339,
1948
- 2,
1949
- 360,
1950
- 371,
1951
- 5,
1952
- 374,
1953
- 376,
1954
- 11,
1955
- 416,
1956
- 417,
1957
- 4,
1958
- 431,
1959
- 432,
1960
- 5,
1961
- 461,
1962
- 462,
1963
- 1,
1964
- 463,
1965
- 464,
1966
- 3,
1967
- 465,
1968
- 466,
1969
- 4,
1970
- 467,
1971
- 476,
1972
- 5,
1973
- 478,
1974
- 481,
1975
- 1,
1976
- 482,
1977
- 483,
1978
- 2,
1979
- 490,
1980
- 493,
1981
- 4,
1982
- 506,
1983
- 507,
1984
- 1,
1985
- 508,
1986
- 509,
1987
- 2,
1988
- 510,
1989
- 511,
1990
- 4,
1991
- 512,
1992
- 515,
1993
- 1,
1994
- 516,
1995
- 519,
1996
- 2,
1997
- 520,
1998
- 523,
1999
- 3,
2000
- 524,
2001
- 527,
2002
- 4,
2003
- 532,
2004
- 535,
2005
- 5,
2006
- 550,
2007
- 551,
2008
- 1,
2009
- 552,
2010
- 553,
2011
- 2,
2012
- 554,
2013
- 561,
2014
- 4,
2015
- 562,
2016
- 563,
2017
- 11,
2018
- 1024,
2019
- 1024,
2020
- 2,
2021
- 1025,
2022
- 1025,
2023
- 4,
2024
- 1028,
2025
- 1028,
2026
- 2,
2027
- 1030,
2028
- 1031,
2029
- 3,
2030
- 1037,
2031
- 1037,
2032
- 3,
2033
- 1038,
2034
- 1038,
2035
- 5,
2036
- 1040,
2037
- 1040,
2038
- 1,
2039
- 1045,
2040
- 1045,
2041
- 2,
2042
- 1048,
2043
- 1048,
2044
- 3,
2045
- 1054,
2046
- 1054,
2047
- 4,
2048
- 1059,
2049
- 1059,
2050
- 5,
2051
- 1067,
2052
- 1067,
2053
- 3,
2054
- 1069,
2055
- 1069,
2056
- 2,
2057
- 1070,
2058
- 1070,
2059
- 5,
2060
- 1071,
2061
- 1072,
2062
- 1,
2063
- 1077,
2064
- 1077,
2065
- 2,
2066
- 1080,
2067
- 1080,
2068
- 3,
2069
- 1086,
2070
- 1086,
2071
- 4,
2072
- 1091,
2073
- 1091,
2074
- 5,
2075
- 1099,
2076
- 1099,
2077
- 3,
2078
- 1101,
2079
- 1101,
2080
- 2,
2081
- 1102,
2082
- 1102,
2083
- 5,
2084
- 1103,
2085
- 1103,
2086
- 1,
2087
- 1104,
2088
- 1104,
2089
- 2,
2090
- 1105,
2091
- 1105,
2092
- 4,
2093
- 1108,
2094
- 1108,
2095
- 2,
2096
- 1110,
2097
- 1111,
2098
- 3,
2099
- 1117,
2100
- 1117,
2101
- 3,
2102
- 1118,
2103
- 1118,
2104
- 5,
2105
- 1232,
2106
- 1235,
2107
- 1,
2108
- 1238,
2109
- 1239,
2110
- 2,
2111
- 1250,
2112
- 1253,
2113
- 3,
2114
- 1254,
2115
- 1255,
2116
- 4,
2117
- 1260,
2118
- 1261,
2119
- 2,
2120
- 1262,
2121
- 1267,
2122
- 5,
2123
- 1272,
2124
- 1273,
2125
- 3,
2126
- 1611,
2127
- 1611,
2128
- 1,
2129
- 1612,
2130
- 1612,
2131
- 5,
2132
- 1613,
2133
- 1613,
2134
- 3,
2135
- 1614,
2136
- 1614,
2137
- 1,
2138
- 1615,
2139
- 1615,
2140
- 5,
2141
- 1616,
2142
- 1616,
2143
- 3,
2144
- 1648,
2145
- 1648,
2146
- 1,
2147
- 3632,
2148
- 3633,
2149
- 9,
2150
- 3634,
2151
- 3634,
2152
- 1,
2153
- 3635,
2154
- 3635,
2155
- 9,
2156
- 3636,
2157
- 3639,
2158
- 3,
2159
- 3640,
2160
- 3641,
2161
- 5,
2162
- 3648,
2163
- 3649,
2164
- 10,
2165
- 3650,
2166
- 3650,
2167
- 12,
2168
- 3651,
2169
- 3652,
2170
- 9,
2171
- 7680,
2172
- 7681,
2173
- 1,
2174
- 7700,
2175
- 7709,
2176
- 2,
2177
- 7724,
2178
- 7727,
2179
- 3,
2180
- 7756,
2181
- 7763,
2182
- 4,
2183
- 7794,
2184
- 7803,
2185
- 5,
2186
- 7822,
2187
- 7823,
2188
- 11,
2189
- 7833,
2190
- 7833,
2191
- 11,
2192
- 7840,
2193
- 7863,
2194
- 1,
2195
- 7864,
2196
- 7879,
2197
- 2,
2198
- 7880,
2199
- 7883,
2200
- 3,
2201
- 7884,
2202
- 7907,
2203
- 4,
2204
- 7908,
2205
- 7921,
2206
- 5,
2207
- 7922,
2208
- 7929,
2209
- 11,
2210
- 8491,
2211
- 8491,
2212
- 1,
2213
- 12353,
2214
- 12353,
2215
- 1,
2216
- 12354,
2217
- 12354,
2218
- 9,
2219
- 12355,
2220
- 12355,
2221
- 3,
2222
- 12356,
2223
- 12356,
2224
- 11,
2225
- 12357,
2226
- 12357,
2227
- 5,
2228
- 12358,
2229
- 12358,
2230
- 13,
2231
- 12359,
2232
- 12359,
2233
- 2,
2234
- 12360,
2235
- 12360,
2236
- 10,
2237
- 12361,
2238
- 12361,
2239
- 4,
2240
- 12362,
2241
- 12362,
2242
- 12,
2243
- 12363,
2244
- 12364,
2245
- 9,
2246
- 12365,
2247
- 12366,
2248
- 11,
2249
- 12367,
2250
- 12368,
2251
- 13,
2252
- 12369,
2253
- 12370,
2254
- 10,
2255
- 12371,
2256
- 12372,
2257
- 12,
2258
- 12373,
2259
- 12374,
2260
- 9,
2261
- 12375,
2262
- 12376,
2263
- 11,
2264
- 12377,
2265
- 12378,
2266
- 13,
2267
- 12379,
2268
- 12380,
2269
- 10,
2270
- 12381,
2271
- 12382,
2272
- 12,
2273
- 12383,
2274
- 12384,
2275
- 9,
2276
- 12385,
2277
- 12386,
2278
- 11,
2279
- 12388,
2280
- 12389,
2281
- 13,
2282
- 12390,
2283
- 12391,
2284
- 10,
2285
- 12392,
2286
- 12393,
2287
- 12,
2288
- 12394,
2289
- 12394,
2290
- 9,
2291
- 12395,
2292
- 12395,
2293
- 11,
2294
- 12396,
2295
- 12396,
2296
- 13,
2297
- 12397,
2298
- 12397,
2299
- 10,
2300
- 12398,
2301
- 12398,
2302
- 12,
2303
- 12399,
2304
- 12401,
2305
- 9,
2306
- 12402,
2307
- 12404,
2308
- 11,
2309
- 12405,
2310
- 12407,
2311
- 13,
2312
- 12408,
2313
- 12410,
2314
- 10,
2315
- 12411,
2316
- 12413,
2317
- 12,
2318
- 12414,
2319
- 12414,
2320
- 9,
2321
- 12415,
2322
- 12415,
2323
- 11,
2324
- 12416,
2325
- 12416,
2326
- 13,
2327
- 12417,
2328
- 12417,
2329
- 10,
2330
- 12418,
2331
- 12418,
2332
- 12,
2333
- 12419,
2334
- 12419,
2335
- 1,
2336
- 12420,
2337
- 12420,
2338
- 9,
2339
- 12421,
2340
- 12421,
2341
- 5,
2342
- 12422,
2343
- 12422,
2344
- 13,
2345
- 12423,
2346
- 12423,
2347
- 4,
2348
- 12424,
2349
- 12424,
2350
- 12,
2351
- 12425,
2352
- 12425,
2353
- 9,
2354
- 12426,
2355
- 12426,
2356
- 11,
2357
- 12427,
2358
- 12427,
2359
- 13,
2360
- 12428,
2361
- 12428,
2362
- 10,
2363
- 12429,
2364
- 12429,
2365
- 12,
2366
- 12430,
2367
- 12430,
2368
- 1,
2369
- 12431,
2370
- 12431,
2371
- 9,
2372
- 12432,
2373
- 12432,
2374
- 11,
2375
- 12433,
2376
- 12433,
2377
- 10,
2378
- 12434,
2379
- 12434,
2380
- 12,
2381
- 12436,
2382
- 12436,
2383
- 13,
2384
- 12437,
2385
- 12437,
2386
- 1,
2387
- 12438,
2388
- 12438,
2389
- 2,
2390
- 12447,
2391
- 12447,
2392
- 12,
2393
- 12449,
2394
- 12449,
2395
- 1,
2396
- 12450,
2397
- 12450,
2398
- 9,
2399
- 12451,
2400
- 12451,
2401
- 3,
2402
- 12452,
2403
- 12452,
2404
- 11,
2405
- 12453,
2406
- 12453,
2407
- 5,
2408
- 12454,
2409
- 12454,
2410
- 13,
2411
- 12455,
2412
- 12455,
2413
- 2,
2414
- 12456,
2415
- 12456,
2416
- 10,
2417
- 12457,
2418
- 12457,
2419
- 4,
2420
- 12458,
2421
- 12458,
2422
- 12,
2423
- 12459,
2424
- 12460,
2425
- 9,
2426
- 12461,
2427
- 12462,
2428
- 11,
2429
- 12463,
2430
- 12464,
2431
- 13,
2432
- 12465,
2433
- 12466,
2434
- 10,
2435
- 12467,
2436
- 12468,
2437
- 12,
2438
- 12469,
2439
- 12470,
2440
- 9,
2441
- 12471,
2442
- 12472,
2443
- 11,
2444
- 12473,
2445
- 12474,
2446
- 13,
2447
- 12475,
2448
- 12476,
2449
- 10,
2450
- 12477,
2451
- 12478,
2452
- 12,
2453
- 12479,
2454
- 12480,
2455
- 9,
2456
- 12481,
2457
- 12482,
2458
- 11,
2459
- 12484,
2460
- 12485,
2461
- 13,
2462
- 12486,
2463
- 12487,
2464
- 10,
2465
- 12488,
2466
- 12489,
2467
- 12,
2468
- 12490,
2469
- 12490,
2470
- 9,
2471
- 12491,
2472
- 12491,
2473
- 11,
2474
- 12492,
2475
- 12492,
2476
- 13,
2477
- 12493,
2478
- 12493,
2479
- 10,
2480
- 12494,
2481
- 12494,
2482
- 12,
2483
- 12495,
2484
- 12497,
2485
- 9,
2486
- 12498,
2487
- 12500,
2488
- 11,
2489
- 12501,
2490
- 12503,
2491
- 13,
2492
- 12504,
2493
- 12506,
2494
- 10,
2495
- 12507,
2496
- 12509,
2497
- 12,
2498
- 12510,
2499
- 12510,
2500
- 9,
2501
- 12511,
2502
- 12511,
2503
- 11,
2504
- 12512,
2505
- 12512,
2506
- 13,
2507
- 12513,
2508
- 12513,
2509
- 10,
2510
- 12514,
2511
- 12514,
2512
- 12,
2513
- 12515,
2514
- 12515,
2515
- 1,
2516
- 12516,
2517
- 12516,
2518
- 9,
2519
- 12517,
2520
- 12517,
2521
- 5,
2522
- 12518,
2523
- 12518,
2524
- 13,
2525
- 12519,
2526
- 12519,
2527
- 4,
2528
- 12520,
2529
- 12520,
2530
- 12,
2531
- 12521,
2532
- 12521,
2533
- 9,
2534
- 12522,
2535
- 12522,
2536
- 11,
2537
- 12523,
2538
- 12523,
2539
- 13,
2540
- 12524,
2541
- 12524,
2542
- 10,
2543
- 12525,
2544
- 12525,
2545
- 12,
2546
- 12526,
2547
- 12526,
2548
- 1,
2549
- 12527,
2550
- 12527,
2551
- 9,
2552
- 12528,
2553
- 12528,
2554
- 11,
2555
- 12529,
2556
- 12529,
2557
- 10,
2558
- 12530,
2559
- 12530,
2560
- 12,
2561
- 12532,
2562
- 12532,
2563
- 13,
2564
- 12533,
2565
- 12533,
2566
- 9,
2567
- 12534,
2568
- 12534,
2569
- 10,
2570
- 12535,
2571
- 12535,
2572
- 9,
2573
- 12536,
2574
- 12536,
2575
- 11,
2576
- 12537,
2577
- 12537,
2578
- 10,
2579
- 12538,
2580
- 12538,
2581
- 12,
2582
- 12543,
2583
- 12543,
2584
- 12,
2585
- 12784,
2586
- 12784,
2587
- 5,
2588
- 12785,
2589
- 12785,
2590
- 3,
2591
- 12786,
2592
- 12786,
2593
- 5,
2594
- 12787,
2595
- 12787,
2596
- 4,
2597
- 12788,
2598
- 12788,
2599
- 5,
2600
- 12789,
2601
- 12789,
2602
- 1,
2603
- 12790,
2604
- 12790,
2605
- 3,
2606
- 12791,
2607
- 12791,
2608
- 5,
2609
- 12792,
2610
- 12792,
2611
- 2,
2612
- 12793,
2613
- 12793,
2614
- 4,
2615
- 12794,
2616
- 12794,
2617
- 5,
2618
- 12795,
2619
- 12795,
2620
- 1,
2621
- 12796,
2622
- 12796,
2623
- 3,
2624
- 12797,
2625
- 12797,
2626
- 5,
2627
- 12798,
2628
- 12798,
2629
- 2,
2630
- 12799,
2631
- 12799,
2632
- 4,
2633
- 65382,
2634
- 65382,
2635
- 12,
2636
- 65383,
2637
- 65383,
2638
- 1,
2639
- 65384,
2640
- 65384,
2641
- 3,
2642
- 65385,
2643
- 65385,
2644
- 5,
2645
- 65386,
2646
- 65386,
2647
- 2,
2648
- 65387,
2649
- 65387,
2650
- 4,
2651
- 65388,
2652
- 65388,
2653
- 1,
2654
- 65389,
2655
- 65389,
2656
- 5,
2657
- 65390,
2658
- 65390,
2659
- 4,
2660
- 65393,
2661
- 65393,
2662
- 9,
2663
- 65394,
2664
- 65394,
2665
- 11,
2666
- 65395,
2667
- 65395,
2668
- 13,
2669
- 65396,
2670
- 65396,
2671
- 10,
2672
- 65397,
2673
- 65397,
2674
- 12,
2675
- 65398,
2676
- 65398,
2677
- 9,
2678
- 65399,
2679
- 65399,
2680
- 11,
2681
- 65400,
2682
- 65400,
2683
- 13,
2684
- 65401,
2685
- 65401,
2686
- 10,
2687
- 65402,
2688
- 65402,
2689
- 12,
2690
- 65403,
2691
- 65403,
2692
- 9,
2693
- 65404,
2694
- 65404,
2695
- 11,
2696
- 65405,
2697
- 65405,
2698
- 13,
2699
- 65406,
2700
- 65406,
2701
- 10,
2702
- 65407,
2703
- 65407,
2704
- 12,
2705
- 65408,
2706
- 65408,
2707
- 9,
2708
- 65409,
2709
- 65409,
2710
- 11,
2711
- 65410,
2712
- 65410,
2713
- 13,
2714
- 65411,
2715
- 65411,
2716
- 10,
2717
- 65412,
2718
- 65412,
2719
- 12,
2720
- 65413,
2721
- 65413,
2722
- 9,
2723
- 65414,
2724
- 65414,
2725
- 11,
2726
- 65415,
2727
- 65415,
2728
- 13,
2729
- 65416,
2730
- 65416,
2731
- 10,
2732
- 65417,
2733
- 65417,
2734
- 12,
2735
- 65418,
2736
- 65418,
2737
- 9,
2738
- 65419,
2739
- 65419,
2740
- 11,
2741
- 65420,
2742
- 65420,
2743
- 13,
2744
- 65421,
2745
- 65421,
2746
- 10,
2747
- 65422,
2748
- 65422,
2749
- 12,
2750
- 65423,
2751
- 65423,
2752
- 9,
2753
- 65424,
2754
- 65424,
2755
- 11,
2756
- 65425,
2757
- 65425,
2758
- 13,
2759
- 65426,
2760
- 65426,
2761
- 10,
2762
- 65427,
2763
- 65427,
2764
- 12,
2765
- 65428,
2766
- 65428,
2767
- 9,
2768
- 65429,
2769
- 65429,
2770
- 13,
2771
- 65430,
2772
- 65430,
2773
- 12,
2774
- 65431,
2775
- 65431,
2776
- 9,
2777
- 65432,
2778
- 65432,
2779
- 11,
2780
- 65433,
2781
- 65433,
2782
- 13,
2783
- 65434,
2784
- 65434,
2785
- 10,
2786
- 65435,
2787
- 65435,
2788
- 12,
2789
- 65436,
2790
- 65436,
2791
- 9
2792
- ];
2793
- var SPEECH_HANGUL_VOWELS = [1, 2, 1, 2, 6, 2, 6, 2, 4, 1, 2, 2, 4, 5, 6, 2, 3, 5, 3, 3, 3];
2794
-
2795
- // src/speech.ts
2796
- var SPEECH_DIGIT_WEIGHT = 1.5;
2797
- var SPEECH_KANJI_WEIGHT = 2;
2798
- var SPEECH_PAUSE_SHORT_WEIGHT = 1;
2799
- var SPEECH_PAUSE_LONG_WEIGHT = 2;
2800
- var at = (a, j) => a[j] ?? -1;
2801
- function classOf(cp) {
2802
- let lo = 0, hi = SPEECH_RANGES.length / 3 - 1;
2803
- while (lo <= hi) {
2804
- const mid = lo + hi >> 1;
2805
- if (cp < at(SPEECH_RANGES, mid * 3)) hi = mid - 1;
2806
- else if (cp > at(SPEECH_RANGES, mid * 3 + 1)) lo = mid + 1;
2807
- else return at(SPEECH_RANGES, mid * 3 + 2);
2808
- }
2809
- return SpeechClass.NONE;
2810
- }
2811
- function vowelCodeOf(cp) {
2812
- if (cp >= 44032 && cp <= 55203) return at(SPEECH_HANGUL_VOWELS, Math.floor((cp - 44032) / 28) % 21);
2813
- let lo = 0, hi = SPEECH_VOWEL_RANGES.length / 3 - 1;
2814
- while (lo <= hi) {
2815
- const mid = lo + hi >> 1;
2816
- if (cp < at(SPEECH_VOWEL_RANGES, mid * 3)) hi = mid - 1;
2817
- else if (cp > at(SPEECH_VOWEL_RANGES, mid * 3 + 1)) lo = mid + 1;
2818
- else return at(SPEECH_VOWEL_RANGES, mid * 3 + 2);
2819
- }
2820
- return 0;
2821
- }
2822
- function vowelIn(cps, start, end) {
2823
- let weak = 0;
2824
- for (let j = start; j < end; j++) {
2825
- let code = vowelCodeOf(at(cps, j));
2826
- if (code === 0) continue;
2827
- if ((at(cps, j) === 117 || at(cps, j) === 85) && j > start && (at(cps, j - 1) === 113 || at(cps, j - 1) === 81)) code |= SPEECH_VOWEL_WEAK;
2828
- if ((code & SPEECH_VOWEL_WEAK) === 0) return SPEECH_VOWELS[code];
2829
- if (weak === 0) weak = code & ~SPEECH_VOWEL_WEAK;
2830
- }
2831
- return weak === 0 ? void 0 : SPEECH_VOWELS[weak];
2832
- }
2833
- function languageOf(locale) {
2834
- return ((locale ?? "").split(/[-_]/)[0] ?? "").toLowerCase();
2835
- }
2836
- var isAsciiLetter = (cp) => cp >= 65 && cp <= 90 || cp >= 97 && cp <= 122;
2837
- var isAsciiDigit = (cp) => cp >= 48 && cp <= 57;
2838
- function markupEnd(cps, i) {
2839
- const cp = (j) => at(cps, j);
2840
- if (cp(i) === 60) {
2841
- let j = i + 1;
2842
- if (cp(j) === 47) j++;
2843
- const from = j;
2844
- while (isAsciiLetter(cp(j))) j++;
2845
- return j > from && cp(j) === 62 ? j + 1 : i;
2846
- }
2847
- if (cp(i) === 38) {
2848
- let j = i + 1;
2849
- const numeric = cp(j) === 35;
2850
- if (numeric) j++;
2851
- const from = j;
2852
- while (numeric ? isAsciiDigit(cp(j)) : isAsciiLetter(cp(j))) j++;
2853
- return j > from && cp(j) === 59 ? j + 1 : i;
2854
- }
2855
- return i;
2856
- }
2857
- var LATIN = /* @__PURE__ */ new Set([SpeechClass.LATIN_VOWEL, SpeechClass.LATIN_LETTER]);
2858
- var CYRILLIC = /* @__PURE__ */ new Set([SpeechClass.CYRILLIC_VOWEL, SpeechClass.CYRILLIC_LETTER]);
2859
- var ARABIC = /* @__PURE__ */ new Set([SpeechClass.ARABIC_LETTER, SpeechClass.ARABIC_VOWEL]);
2860
- var THAI = /* @__PURE__ */ new Set([SpeechClass.THAI_CONSONANT, SpeechClass.THAI_LEAD, SpeechClass.THAI_VOWEL]);
2861
- var OTHER = /* @__PURE__ */ new Set([SpeechClass.OTHER_LETTER]);
2862
- var KANA_CLASSES = /* @__PURE__ */ new Set([SpeechClass.KANA, SpeechClass.KANA_SMALL, SpeechClass.KANA_SOKUON, SpeechClass.KANA_LONG]);
2863
- function speechUnits(text, locale) {
2864
- const cps = Array.from(text ?? "", (ch) => ch.codePointAt(0));
2865
- const cls = cps.map(classOf);
2866
- const n = cps.length;
2867
- const lang = languageOf(locale);
2868
- const japanese = lang === "ja" || cls.some((k) => KANA_CLASSES.has(k));
2869
- const units = [];
2870
- const syllable = (start, end, weight = 1) => {
2871
- units.push({ kind: "syllable", weight, start, end });
2872
- };
2873
- const classAt = (j) => j >= 0 && j < n ? at(cls, j) : SpeechClass.NONE;
2874
- const marksEnd = (j) => {
2875
- while (j < n && at(cls, j) === SpeechClass.MARK) j++;
2876
- return j;
2877
- };
2878
- const wordEnd = (i2, family) => {
2879
- let j = i2 + 1;
2880
- while (j < n && (family.has(at(cls, j)) || at(cls, j) === SpeechClass.MARK || at(cls, j) === SpeechClass.JOINER && family.has(classAt(j + 1)))) j++;
2881
- return j;
2882
- };
2883
- const fromAnchors = (start, end, anchors) => {
2884
- const sorted = [...new Set(anchors.map((a) => Math.min(marksEnd(a + 1), end) - 1))].sort((a, b) => a - b);
2885
- sorted.forEach((a, j) => syllable(j === 0 ? start : at(sorted, j - 1) + 1, j === sorted.length - 1 ? end : a + 1));
2886
- };
2887
- const spread = (letters, count, step) => Array.from({ length: count }, (_, j) => at(letters, Math.min(step * j + step - 1, letters.length - 1)));
2888
- let i = 0;
2889
- while (i < n) {
2890
- const k = at(cls, i);
2891
- const skip = markupEnd(cps, i);
2892
- if (skip > i) {
2893
- i = skip;
2894
- continue;
2895
- }
2896
- if (LATIN.has(k)) {
2897
- const end = wordEnd(i, LATIN);
2898
- const lasts = [], sizes = [];
2899
- let inGroup = false;
2900
- for (let j = i; j < end; j++) {
2901
- if (at(cls, j) === SpeechClass.LATIN_VOWEL) {
2902
- if (inGroup) {
2903
- lasts[lasts.length - 1] = j;
2904
- sizes[sizes.length - 1] = at(sizes, sizes.length - 1) + 1;
2905
- } else {
2906
- lasts.push(j);
2907
- sizes.push(1);
2908
- }
2909
- inGroup = true;
2910
- } else if (at(cls, j) !== SpeechClass.MARK) inGroup = false;
2911
- }
2912
- if (lasts.length >= 2 && at(sizes, sizes.length - 1) === 1 && silentE(cps, cls, i, end, at(lasts, lasts.length - 1), lang)) lasts.pop();
2913
- fromAnchors(i, end, lasts.length ? lasts : [end - 1]);
2914
- i = end;
2915
- } else if (CYRILLIC.has(k)) {
2916
- const end = wordEnd(i, CYRILLIC);
2917
- const vowels = [];
2918
- for (let j = i; j < end; j++) if (at(cls, j) === SpeechClass.CYRILLIC_VOWEL) vowels.push(j);
2919
- fromAnchors(i, end, vowels.length ? vowels : [end - 1]);
2920
- i = end;
2921
- } else if (ARABIC.has(k)) {
2922
- const end = wordEnd(i, ARABIC);
2923
- const vowels = [], letters = [];
2924
- for (let j = i; j < end; j++) {
2925
- if (at(cls, j) === SpeechClass.ARABIC_VOWEL) vowels.push(j);
2926
- else if (at(cls, j) === SpeechClass.ARABIC_LETTER) letters.push(j);
2927
- }
2928
- fromAnchors(i, end, vowels.length ? vowels : spread(letters, Math.max(1, Math.ceil(letters.length / 2)), 2));
2929
- i = end;
2930
- } else if (THAI.has(k)) {
2931
- const end = wordEnd(i, THAI);
2932
- fromAnchors(i, end, thaiAnchors(cls, i, end));
2933
- i = end;
2934
- } else if (OTHER.has(k)) {
2935
- const end = wordEnd(i, OTHER);
2936
- const letters = [];
2937
- for (let j = i; j < end; j++) if (at(cls, j) === SpeechClass.OTHER_LETTER) letters.push(j);
2938
- fromAnchors(i, end, spread(letters, Math.max(1, Math.ceil(letters.length / 3)), 3));
2939
- i = end;
2940
- } else if (k === SpeechClass.HAN) {
2941
- const end = marksEnd(i + 1);
2942
- syllable(i, end, japanese ? SPEECH_KANJI_WEIGHT : 1);
2943
- i = end;
2944
- } else if (k === SpeechClass.KANA || k === SpeechClass.HANGUL) {
2945
- const end = marksEnd(i + 1);
2946
- syllable(i, end);
2947
- i = end;
2948
- } else if (k === SpeechClass.KANA_SMALL || k === SpeechClass.KANA_LONG) {
2949
- const end = marksEnd(i + 1);
2950
- const last = units[units.length - 1];
2951
- if (last && last.kind === "syllable" && last.end === i) {
2952
- last.end = end;
2953
- if (k === SpeechClass.KANA_LONG) last.weight += 1;
2954
- } else if (k === SpeechClass.KANA_SMALL) syllable(i, end);
2955
- i = end;
2956
- } else if (k === SpeechClass.KANA_SOKUON) {
2957
- const end = marksEnd(i + 1);
2958
- units.push({ kind: "closed", weight: 1, start: i, end });
2959
- i = end;
2960
- } else if (k === SpeechClass.DIGIT) {
2961
- const end = marksEnd(i + 1);
2962
- syllable(i, end, SPEECH_DIGIT_WEIGHT);
2963
- i = end;
2964
- } else if (k === SpeechClass.PAUSE_SHORT || k === SpeechClass.PAUSE_LONG) {
2965
- const inNumber = (at(cps, i) === 46 || at(cps, i) === 44) && classAt(i - 1) === SpeechClass.DIGIT && classAt(i + 1) === SpeechClass.DIGIT;
2966
- if (!inNumber) units.push({ kind: "pause", weight: k === SpeechClass.PAUSE_LONG ? SPEECH_PAUSE_LONG_WEIGHT : SPEECH_PAUSE_SHORT_WEIGHT, start: i, end: i + 1 });
2967
- i++;
2968
- } else if (k === SpeechClass.SPACE) {
2969
- let end = i + 1;
2970
- while (end < n && at(cls, end) === SpeechClass.SPACE) end++;
2971
- if (thaiBefore(cls, i - 1) && THAI.has(classAt(end))) units.push({ kind: "pause", weight: SPEECH_PAUSE_SHORT_WEIGHT, start: i, end });
2972
- i = end;
2973
- } else {
2974
- i++;
2975
- }
2976
- }
2977
- const out = tidyPauses(units);
2978
- for (const u of out) {
2979
- if (u.kind !== "syllable") continue;
2980
- const vowel = vowelIn(cps, u.start, u.end);
2981
- if (vowel !== void 0) u.vowel = vowel;
2982
- }
2983
- return out;
2984
- }
2985
- function thaiBefore(cls, j) {
2986
- while (j >= 0 && at(cls, j) === SpeechClass.MARK) j--;
2987
- return j >= 0 && THAI.has(at(cls, j));
2988
- }
2989
- function silentE(cps, cls, start, end, e, lang) {
2990
- if (lang !== "en" && lang !== "fr") return false;
2991
- if (at(cps, e) !== 101 && at(cps, e) !== 69) return false;
2992
- let after = e + 1;
2993
- if (after < end && at(cls, after) === SpeechClass.MARK) return false;
2994
- if (lang === "fr" && after < end && (at(cps, after) === 115 || at(cps, after) === 83)) after++;
2995
- if (after !== end) return false;
2996
- if (lang === "en" && e - 2 >= start && (at(cps, e - 1) === 108 || at(cps, e - 1) === 76) && at(cls, e - 2) === SpeechClass.LATIN_LETTER) return false;
2997
- return true;
2998
- }
2999
- function thaiAnchors(cls, start, end) {
3000
- const anchors = [];
3001
- let consonants = [];
3002
- let leadOpen = false;
3003
- const implicit = () => {
3004
- for (let j = 0; j < Math.floor((consonants.length - 1) / 2); j++) anchors.push(at(consonants, 2 * j + 1));
3005
- };
3006
- for (let p = start; p < end; p++) {
3007
- const k = at(cls, p);
3008
- if (k === SpeechClass.THAI_CONSONANT) consonants.push(p);
3009
- else if (k === SpeechClass.THAI_LEAD) {
3010
- implicit();
3011
- anchors.push(p + 1 < end && at(cls, p + 1) === SpeechClass.THAI_CONSONANT ? p + 1 : p);
3012
- consonants = [];
3013
- leadOpen = true;
3014
- } else if (k === SpeechClass.THAI_VOWEL) {
3015
- if (consonants.length === 0) continue;
3016
- if (leadOpen && consonants.length <= 2) {
3017
- leadOpen = false;
3018
- consonants = [];
3019
- continue;
3020
- }
3021
- implicit();
3022
- anchors.push(p);
3023
- consonants = [];
3024
- leadOpen = false;
3025
- }
3026
- }
3027
- if (anchors.length === 0) {
3028
- const count = Math.max(1, Math.ceil(consonants.length / 2));
3029
- for (let j = 0; j < count; j++) anchors.push(consonants.length ? at(consonants, Math.min(2 * j + 1, consonants.length - 1)) : end - 1);
3030
- } else implicit();
3031
- return anchors;
3032
- }
3033
- function tidyPauses(units) {
3034
- const out = [];
3035
- for (const u of units) {
3036
- const last = out[out.length - 1];
3037
- if (u.kind === "pause" && last?.kind === "pause") {
3038
- last.weight = Math.max(last.weight, u.weight);
3039
- last.end = u.end;
3040
- } else out.push({ ...u });
3041
- }
3042
- while (out[0]?.kind === "pause") out.shift();
3043
- while (out[out.length - 1]?.kind === "pause") out.pop();
3044
- return out;
3045
- }
3046
- function countSyllables(text, locale) {
3047
- let total = 0;
3048
- for (const u of speechUnits(text, locale)) if (u.kind !== "pause") total += u.weight;
3049
- return total;
3050
- }
3051
-
3052
- // src/index.ts
3053
3
  import {
3054
4
  propertyNameify,
3055
5
  isValidPropertyName,
@@ -3153,17 +103,49 @@ function textIsAction(project, scene) {
3153
103
  var DEFAULT_PAD_AFTER = 0.6;
3154
104
  var PAD_AFTER_MIN = -10;
3155
105
  var PAD_AFTER_MAX = 60;
3156
- var DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND = 4;
3157
- var ESTIMATE_SYLLABLES_PER_SECOND_MIN = 2;
3158
- var ESTIMATE_SYLLABLES_PER_SECOND_MAX = 10;
106
+ var DEFAULT_ESTIMATE_SPEED = 1;
107
+ var ESTIMATE_SPEED_MIN = 0.5;
108
+ var ESTIMATE_SPEED_MAX = 2.5;
109
+ var LINE_CHARS_PER_SECOND = 14;
3159
110
  var LINE_DURATION_MIN = 0.5;
3160
111
  var LINE_DURATION_MAX = 18;
3161
112
  var SUBTITLE_READING_MIN = 1.5;
3162
- function estimateLineDuration(text, locale, syllablesPerSecond) {
3163
- const rate = typeof syllablesPerSecond === "number" && Number.isFinite(syllablesPerSecond) && syllablesPerSecond > 0 ? syllablesPerSecond : DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND;
113
+ function normaliseEstimateSpeed(project) {
114
+ const obj = project;
115
+ if (!("estimateSyllablesPerSecond" in obj)) return project;
116
+ const old = obj["estimateSyllablesPerSecond"];
117
+ delete obj["estimateSyllablesPerSecond"];
118
+ if (obj["estimateSpeed"] === void 0 && old !== void 0) obj["estimateSpeed"] = typeof old === "number" ? old / 4 : old;
119
+ return project;
120
+ }
121
+ var LINE_CHAR_WEIGHTS = [
122
+ [173, 173, 0],
123
+ [12352, 12543, 2],
124
+ [12784, 12799, 2],
125
+ [13312, 19903, 3],
126
+ [19968, 40959, 3],
127
+ [44032, 55203, 2.5],
128
+ [63744, 64255, 3],
129
+ [65382, 65439, 2],
130
+ [131072, 201551, 3]
131
+ ];
132
+ function estimateLineDuration(text, locale, speed) {
133
+ void locale;
134
+ const s = typeof speed === "number" && Number.isFinite(speed) && speed > 0 ? speed : DEFAULT_ESTIMATE_SPEED;
3164
135
  let weight = 0;
3165
- for (const u of speechUnits(text ?? "", locale)) weight += u.weight;
3166
- return Math.min(Math.max(weight / rate, LINE_DURATION_MIN), LINE_DURATION_MAX);
136
+ for (const ch of text ?? "") {
137
+ const cp = ch.codePointAt(0);
138
+ let w = 1;
139
+ for (const [lo, hi, cw] of LINE_CHAR_WEIGHTS) {
140
+ if (cp < lo) break;
141
+ if (cp <= hi) {
142
+ w = cw;
143
+ break;
144
+ }
145
+ }
146
+ weight += w;
147
+ }
148
+ return Math.min(Math.max(weight / (LINE_CHARS_PER_SECOND * s), LINE_DURATION_MIN), LINE_DURATION_MAX);
3167
149
  }
3168
150
  var DEFAULT_WRITING_STATUSES = [
3169
151
  { name: "stub", colour: 0 },
@@ -3212,13 +194,13 @@ function sceneFolderLayout(project, sceneIds) {
3212
194
  const folderParent = /* @__PURE__ */ new Map();
3213
195
  for (const f of folders) folderParent.set(f.id, f.parent !== void 0 && known.has(f.parent) && f.parent !== f.id ? f.parent : void 0);
3214
196
  for (const f of folders) {
3215
- let at2 = folderParent.get(f.id);
3216
- for (let steps = 0; at2 !== void 0 && steps <= folders.length; steps++) {
3217
- if (at2 === f.id) {
197
+ let at = folderParent.get(f.id);
198
+ for (let steps = 0; at !== void 0 && steps <= folders.length; steps++) {
199
+ if (at === f.id) {
3218
200
  folderParent.set(f.id, void 0);
3219
201
  break;
3220
202
  }
3221
- at2 = folderParent.get(at2);
203
+ at = folderParent.get(at);
3222
204
  }
3223
205
  }
3224
206
  const sceneFolder = /* @__PURE__ */ new Map();
@@ -3257,7 +239,7 @@ function sceneFolderLayout(project, sceneIds) {
3257
239
  function sceneFolderPath(project, layout, sceneId) {
3258
240
  const names = new Map((project.sceneFolders ?? []).map((f) => [f.id, f.name]));
3259
241
  const parts = [];
3260
- for (let at2 = layout.sceneFolder.get(sceneId), n = 0; at2 !== void 0 && n <= names.size; at2 = layout.folderParent.get(at2), n++) parts.unshift(names.get(at2) ?? "");
242
+ for (let at = layout.sceneFolder.get(sceneId), n = 0; at !== void 0 && n <= names.size; at = layout.folderParent.get(at), n++) parts.unshift(names.get(at) ?? "");
3261
243
  return parts.join(" / ");
3262
244
  }
3263
245
  var PROJECT_LOCALE_SCENE = "@project";
@@ -3300,20 +282,22 @@ export {
3300
282
  DEFAULT_CAPTION_CHARACTER,
3301
283
  DEFAULT_CAPTION_DELIMITERS,
3302
284
  DEFAULT_DOCUMENTATION_CLASSES,
3303
- DEFAULT_ESTIMATE_SYLLABLES_PER_SECOND,
285
+ DEFAULT_ESTIMATE_SPEED,
3304
286
  DEFAULT_LAYOUT,
3305
287
  DEFAULT_PAD_AFTER,
3306
288
  DEFAULT_QUALIFIERS,
3307
289
  DEFAULT_RECORDING_STATUSES,
3308
290
  DEFAULT_SPEAKER_PATTERN,
3309
291
  DEFAULT_WRITING_STATUSES,
3310
- ESTIMATE_SYLLABLES_PER_SECOND_MAX,
3311
- ESTIMATE_SYLLABLES_PER_SECOND_MIN,
292
+ ESTIMATE_SPEED_MAX,
293
+ ESTIMATE_SPEED_MIN,
3312
294
  EXTENSIONS_DIR,
3313
295
  EXTENSION_SCHEMA,
3314
296
  EXTENSION_SHARD,
3315
297
  FLOW_SCHEMA,
3316
298
  HANDOFF_SCHEMA,
299
+ LINE_CHARS_PER_SECOND,
300
+ LINE_CHAR_WEIGHTS,
3317
301
  LINE_DURATION_MAX,
3318
302
  LINE_DURATION_MIN,
3319
303
  MANIFEST_EXTENSION,
@@ -3328,15 +312,10 @@ export {
3328
312
  SAVE_SCHEMA,
3329
313
  SAVE_VERSION,
3330
314
  SPEAKER_PATTERN_KEY,
3331
- SPEECH_DIGIT_WEIGHT,
3332
- SPEECH_KANJI_WEIGHT,
3333
- SPEECH_PAUSE_LONG_WEIGHT,
3334
- SPEECH_PAUSE_SHORT_WEIGHT,
3335
315
  STRINGS_SCHEMA,
3336
316
  SUBTITLE_READING_MIN,
3337
317
  UNRESOLVED_KEY,
3338
318
  castStringKey,
3339
- countSyllables,
3340
319
  deriveRecordingFolders,
3341
320
  effectiveGameId,
3342
321
  estimateLineDuration,
@@ -3347,6 +326,7 @@ export {
3347
326
  isDialogueScene,
3348
327
  isValidGameId,
3349
328
  isValidPropertyName,
329
+ normaliseEstimateSpeed,
3350
330
  projectLayout,
3351
331
  projectQualifiers,
3352
332
  propertyNameify,
@@ -3356,7 +336,6 @@ export {
3356
336
  sceneFolderLayout,
3357
337
  sceneFolderPath,
3358
338
  speakerLabelKey,
3359
- speechUnits,
3360
339
  textIsAction,
3361
340
  usedQualifiers,
3362
341
  usedSpeakerPairs,