forked from Konard/twittermatrix
-
Notifications
You must be signed in to change notification settings - Fork 0
/
unistring.js
1871 lines (1713 loc) · 84.8 KB
/
unistring.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/**
* Unistring: breaks a native string into an array of grapheme cluster,
* and provides native string like manipulation methods.
* =============================================================================
*
*
* @author akahuku@gmail.com
* @license MIT
*/
(function (global) {
'use strict';
/*
* data table, taken from:
* http://www.unicode.org/Public/9.0.0/ucd/auxiliary/GraphemeBreakProperty.txt
*/
// GENERATED CODE START <<<1
// This data was generated by the command 'node mkdata.js -g'.
const GRAPHEME_BREAK_PROPS = '\
0600004001050A002000060B004000040D002000060E004002067F00200406AD002000070003000E\
078304E000079105A00507BF05200007C105400007C405400007C7052000030006C0000710066001\
061C062000074B06A002077006200007D606E00003DD06200007DF06C00007E706400007EA068000\
030F0720000711072000073007600307A607600107EB0720010716088000071B0820010725086000\
072908A000075908600007D408C00103E208200007E30800040903092000073A092000093B092000\
073C092000093E09600007410900010949098000074D092000094E094000075109E0000762094000\
0781092000098209400007BC09200007BE09200009BF09400007C109800009C709400009CB094000\
07CD09200007D709200007E209400007010A400009030A2000073C0A2000093E0A600007410A4000\
07470A4000074B0A600007510A200007700A400007750A200007810A400009830A200007BC0A2000\
09BE0A600007C10AA00007C70A400009C90A200009CB0A400007CD0A200007E20A400007010B2000\
09020B4000073C0B2000073E0B400009400B200007410B800009470B4000094B0B4000074D0B2000\
07560B400007620B400007820B200007BE0B200009BF0B200007C00B200009C10B400009C60B6000\
09CA0B600007CD0B200007D70B200007000C200009010C6000073E0C600009410C800007460C6000\
074A0C800007550C400007620C400007810C200009820C400007BC0C200009BE0C200007BF0C2000\
09C00C400007C20C200009C30C400007C60C200009C70C400009CA0C400007CC0C400007D50C4000\
07E20C400007010D200009020D4000073E0D2000093F0D400007410D800009460D6000094A0D6000\
074D0D2000034E0D200007570D200007620D400009820D400007CA0D200007CF0D200009D00D4000\
07D20D600007D60D200009D80DE00007DF0D200009F20D400007310E200009330E200007340EE000\
07470E000107B10E200009B30E200007B40EC00007BB0E400007C80EC00007180F400007350F2000\
07370F200007390F2000093E0F400007710FC001097F0F200007800FA00007860F4000078D0F6001\
07990F800407C60F2000072D1080000931102000073210C0000739104000093B104000073D104000\
09561040000758104000075E1060000771108000078210200009841020000785104000078D102000\
079D1020000A0011000C0B601100090CA811000B075D136000071217600007321760000752174000\
077217400007B417400009B617200007B717E00009BE17000107C617200009C717400007C9176001\
07DD172000070B186000060E182000078518400007A9182000072019600009231980000727194000\
092919600009301940000732192000093319C000073919600007171A400009191A4000071B1A2000\
09551A200007561A200009571A200007581AE00007601A200007621A200007651A0001096D1AC000\
07731A4001077F1A200007B01AE00107001B800009041B200007341B200009351B200007361BA000\
093B1B2000073C1B2000093D1BA00007421B200009431B4000076B1B200107801B400009821B2000\
09A11B200007A21B800009A61B400007A81B400009AA1B200007AB1B600007E61B200009E71B2000\
07E81B400009EA1B600007ED1B200009EE1B200007EF1B600009F21B400009241C0001072C1C0001\
09341C400007361C400007D01C600007D41CA00109E11C200007E21CE00007ED1C200009F21C4000\
07F41C200007F81C400007C01DC00607FB1DA000060B202000070C202000110D202000060E204000\
062820E000066020000207D02020040F1D2620000FF92620000F0A278000126427200007EF2C6000\
077F2D200007E02D0004072A30C0000799304000076FA680000774A64001079EA6400007F0A64000\
0702A820000706A82000070BA820000923A840000725A840000927A820000980A8400009B4A80002\
07C4A8400007E0A840020726A900010747A960010952A940000A60A9A0030780A960000983A92000\
07B3A9200009B4A9400007B6A9800009BAA9400007BCA9200009BDA9800007E5A920000729AAC000\
092FAA40000731AA40000933AA40000735AA40000743AA2000074CAA2000094DAA2000077CAA2000\
07B0AA200007B2AA600007B7AA400007BEAA400007C1AA200009EBAA200007ECAA400009EEAA4000\
09F5AA200007F6AA200009E3AB400007E5AB200009E6AB400007E8AB200009E9AB400009ECAB2000\
07EDAB20000D00AC20000E01AC60030D1CAC20000E1DAC60030D38AC20000E39AC60030D54AC2000\
0E55AC60030D70AC20000E71AC60030D8CAC20000E8DAC60030DA8AC20000EA9AC60030DC4AC2000\
0EC5AC60030DE0AC20000EE1AC60030DFCAC20000EFDAC60030D18AD20000E19AD60030D34AD2000\
0E35AD60030D50AD20000E51AD60030D6CAD20000E6DAD60030D88AD20000E89AD60030DA4AD2000\
0EA5AD60030DC0AD20000EC1AD60030DDCAD20000EDDAD60030DF8AD20000EF9AD60030D14AE2000\
0E15AE60030D30AE20000E31AE60030D4CAE20000E4DAE60030D68AE20000E69AE60030D84AE2000\
0E85AE60030DA0AE20000EA1AE60030DBCAE20000EBDAE60030DD8AE20000ED9AE60030DF4AE2000\
0EF5AE60030D10AF20000E11AF60030D2CAF20000E2DAF60030D48AF20000E49AF60030D64AF2000\
0E65AF60030D80AF20000E81AF60030D9CAF20000E9DAF60030DB8AF20000EB9AF60030DD4AF2000\
0ED5AF60030DF0AF20000EF1AF60030D0CB020000E0DB060030D28B020000E29B060030D44B02000\
0E45B060030D60B020000E61B060030D7CB020000E7DB060030D98B020000E99B060030DB4B02000\
0EB5B060030DD0B020000ED1B060030DECB020000EEDB060030D08B120000E09B160030D24B12000\
0E25B160030D40B120000E41B160030D5CB120000E5DB160030D78B120000E79B160030D94B12000\
0E95B160030DB0B120000EB1B160030DCCB120000ECDB160030DE8B120000EE9B160030D04B22000\
0E05B260030D20B220000E21B260030D3CB220000E3DB260030D58B220000E59B260030D74B22000\
0E75B260030D90B220000E91B260030DACB220000EADB260030DC8B220000EC9B260030DE4B22000\
0EE5B260030D00B320000E01B360030D1CB320000E1DB360030D38B320000E39B360030D54B32000\
0E55B360030D70B320000E71B360030D8CB320000E8DB360030DA8B320000EA9B360030DC4B32000\
0EC5B360030DE0B320000EE1B360030DFCB320000EFDB360030D18B420000E19B460030D34B42000\
0E35B460030D50B420000E51B460030D6CB420000E6DB460030D88B420000E89B460030DA4B42000\
0EA5B460030DC0B420000EC1B460030DDCB420000EDDB460030DF8B420000EF9B460030D14B52000\
0E15B560030D30B520000E31B560030D4CB520000E4DB560030D68B520000E69B560030D84B52000\
0E85B560030DA0B520000EA1B560030DBCB520000EBDB560030DD8B520000ED9B560030DF4B52000\
0EF5B560030D10B620000E11B660030D2CB620000E2DB660030D48B620000E49B660030D64B62000\
0E65B660030D80B620000E81B660030D9CB620000E9DB660030DB8B620000EB9B660030DD4B62000\
0ED5B660030DF0B620000EF1B660030D0CB720000E0DB760030D28B720000E29B760030D44B72000\
0E45B760030D60B720000E61B760030D7CB720000E7DB760030D98B720000E99B760030DB4B72000\
0EB5B760030DD0B720000ED1B760030DECB720000EEDB760030D08B820000E09B860030D24B82000\
0E25B860030D40B820000E41B860030D5CB820000E5DB860030D78B820000E79B860030D94B82000\
0E95B860030DB0B820000EB1B860030DCCB820000ECDB860030DE8B820000EE9B860030D04B92000\
0E05B960030D20B920000E21B960030D3CB920000E3DB960030D58B920000E59B960030D74B92000\
0E75B960030D90B920000E91B960030DACB920000EADB960030DC8B920000EC9B960030DE4B92000\
0EE5B960030D00BA20000E01BA60030D1CBA20000E1DBA60030D38BA20000E39BA60030D54BA2000\
0E55BA60030D70BA20000E71BA60030D8CBA20000E8DBA60030DA8BA20000EA9BA60030DC4BA2000\
0EC5BA60030DE0BA20000EE1BA60030DFCBA20000EFDBA60030D18BB20000E19BB60030D34BB2000\
0E35BB60030D50BB20000E51BB60030D6CBB20000E6DBB60030D88BB20000E89BB60030DA4BB2000\
0EA5BB60030DC0BB20000EC1BB60030DDCBB20000EDDBB60030DF8BB20000EF9BB60030D14BC2000\
0E15BC60030D30BC20000E31BC60030D4CBC20000E4DBC60030D68BC20000E69BC60030D84BC2000\
0E85BC60030DA0BC20000EA1BC60030DBCBC20000EBDBC60030DD8BC20000ED9BC60030DF4BC2000\
0EF5BC60030D10BD20000E11BD60030D2CBD20000E2DBD60030D48BD20000E49BD60030D64BD2000\
0E65BD60030D80BD20000E81BD60030D9CBD20000E9DBD60030DB8BD20000EB9BD60030DD4BD2000\
0ED5BD60030DF0BD20000EF1BD60030D0CBE20000E0DBE60030D28BE20000E29BE60030D44BE2000\
0E45BE60030D60BE20000E61BE60030D7CBE20000E7DBE60030D98BE20000E99BE60030DB4BE2000\
0EB5BE60030DD0BE20000ED1BE60030DECBE20000EEDBE60030D08BF20000E09BF60030D24BF2000\
0E25BF60030D40BF20000E41BF60030D5CBF20000E5DBF60030D78BF20000E79BF60030D94BF2000\
0E95BF60030DB0BF20000EB1BF60030DCCBF20000ECDBF60030DE8BF20000EE9BF60030D04C02000\
0E05C060030D20C020000E21C060030D3CC020000E3DC060030D58C020000E59C060030D74C02000\
0E75C060030D90C020000E91C060030DACC020000EADC060030DC8C020000EC9C060030DE4C02000\
0EE5C060030D00C120000E01C160030D1CC120000E1DC160030D38C120000E39C160030D54C12000\
0E55C160030D70C120000E71C160030D8CC120000E8DC160030DA8C120000EA9C160030DC4C12000\
0EC5C160030DE0C120000EE1C160030DFCC120000EFDC160030D18C220000E19C260030D34C22000\
0E35C260030D50C220000E51C260030D6CC220000E6DC260030D88C220000E89C260030DA4C22000\
0EA5C260030DC0C220000EC1C260030DDCC220000EDDC260030DF8C220000EF9C260030D14C32000\
0E15C360030D30C320000E31C360030D4CC320000E4DC360030D68C320000E69C360030D84C32000\
0E85C360030DA0C320000EA1C360030DBCC320000EBDC360030DD8C320000ED9C360030DF4C32000\
0EF5C360030D10C420000E11C460030D2CC420000E2DC460030D48C420000E49C460030D64C42000\
0E65C460030D80C420000E81C460030D9CC420000E9DC460030DB8C420000EB9C460030DD4C42000\
0ED5C460030DF0C420000EF1C460030D0CC520000E0DC560030D28C520000E29C560030D44C52000\
0E45C560030D60C520000E61C560030D7CC520000E7DC560030D98C520000E99C560030DB4C52000\
0EB5C560030DD0C520000ED1C560030DECC520000EEDC560030D08C620000E09C660030D24C62000\
0E25C660030D40C620000E41C660030D5CC620000E5DC660030D78C620000E79C660030D94C62000\
0E95C660030DB0C620000EB1C660030DCCC620000ECDC660030DE8C620000EE9C660030D04C72000\
0E05C760030D20C720000E21C760030D3CC720000E3DC760030D58C720000E59C760030D74C72000\
0E75C760030D90C720000E91C760030DACC720000EADC760030DC8C720000EC9C760030DE4C72000\
0EE5C760030D00C820000E01C860030D1CC820000E1DC860030D38C820000E39C860030D54C82000\
0E55C860030D70C820000E71C860030D8CC820000E8DC860030DA8C820000EA9C860030DC4C82000\
0EC5C860030DE0C820000EE1C860030DFCC820000EFDC860030D18C920000E19C960030D34C92000\
0E35C960030D50C920000E51C960030D6CC920000E6DC960030D88C920000E89C960030DA4C92000\
0EA5C960030DC0C920000EC1C960030DDCC920000EDDC960030DF8C920000EF9C960030D14CA2000\
0E15CA60030D30CA20000E31CA60030D4CCA20000E4DCA60030D68CA20000E69CA60030D84CA2000\
0E85CA60030DA0CA20000EA1CA60030DBCCA20000EBDCA60030DD8CA20000ED9CA60030DF4CA2000\
0EF5CA60030D10CB20000E11CB60030D2CCB20000E2DCB60030D48CB20000E49CB60030D64CB2000\
0E65CB60030D80CB20000E81CB60030D9CCB20000E9DCB60030DB8CB20000EB9CB60030DD4CB2000\
0ED5CB60030DF0CB20000EF1CB60030D0CCC20000E0DCC60030D28CC20000E29CC60030D44CC2000\
0E45CC60030D60CC20000E61CC60030D7CCC20000E7DCC60030D98CC20000E99CC60030DB4CC2000\
0EB5CC60030DD0CC20000ED1CC60030DECCC20000EEDCC60030D08CD20000E09CD60030D24CD2000\
0E25CD60030D40CD20000E41CD60030D5CCD20000E5DCD60030D78CD20000E79CD60030D94CD2000\
0E95CD60030DB0CD20000EB1CD60030DCCCD20000ECDCD60030DE8CD20000EE9CD60030D04CE2000\
0E05CE60030D20CE20000E21CE60030D3CCE20000E3DCE60030D58CE20000E59CE60030D74CE2000\
0E75CE60030D90CE20000E91CE60030DACCE20000EADCE60030DC8CE20000EC9CE60030DE4CE2000\
0EE5CE60030D00CF20000E01CF60030D1CCF20000E1DCF60030D38CF20000E39CF60030D54CF2000\
0E55CF60030D70CF20000E71CF60030D8CCF20000E8DCF60030DA8CF20000EA9CF60030DC4CF2000\
0EC5CF60030DE0CF20000EE1CF60030DFCCF20000EFDCF60030D18D020000E19D060030D34D02000\
0E35D060030D50D020000E51D060030D6CD020000E6DD060030D88D020000E89D060030DA4D02000\
0EA5D060030DC0D020000EC1D060030DDCD020000EDDD060030DF8D020000EF9D060030D14D12000\
0E15D160030D30D120000E31D160030D4CD120000E4DD160030D68D120000E69D160030D84D12000\
0E85D160030DA0D120000EA1D160030DBCD120000EBDD160030DD8D120000ED9D160030DF4D12000\
0EF5D160030D10D220000E11D260030D2CD220000E2DD260030D48D220000E49D260030D64D22000\
0E65D260030D80D220000E81D260030D9CD220000E9DD260030DB8D220000EB9D260030DD4D22000\
0ED5D260030DF0D220000EF1D260030D0CD320000E0DD360030D28D320000E29D360030D44D32000\
0E45D360030D60D320000E61D360030D7CD320000E7DD360030D98D320000E99D360030DB4D32000\
0EB5D360030DD0D320000ED1D360030DECD320000EEDD360030D08D420000E09D460030D24D42000\
0E25D460030D40D420000E41D460030D5CD420000E5DD460030D78D420000E79D460030D94D42000\
0E95D460030DB0D420000EB1D460030DCCD420000ECDD460030DE8D420000EE9D460030D04D52000\
0E05D560030D20D520000E21D560030D3CD520000E3DD560030D58D520000E59D560030D74D52000\
0E75D560030D90D520000E91D560030DACD520000EADD560030DC8D520000EC9D560030DE4D52000\
0EE5D560030D00D620000E01D660030D1CD620000E1DD660030D38D620000E39D660030D54D62000\
0E55D660030D70D620000E71D660030D8CD620000E8DD660030DA8D620000EA9D660030DC4D62000\
0EC5D660030DE0D620000EE1D660030DFCD620000EFDD660030D18D720000E19D760030D34D72000\
0E35D760030D50D720000E51D760030D6CD720000E6DD760030D88D720000E89D760030BB0D7E002\
0CCBD720060600D8E0FF06FFDF2000071EFB20000700FE00020720FE000206FFFE2000079EFF4000\
06F0FF800107FD01210007E0022100077603A10007010A610007050A4100070C0A810007380A6100\
073F0A210007E50A4100090010210007011021000902102100073810E101077F1061000982102100\
09B010610007B310810009B710410007B910410003BD1021000700116100072711A100092C112100\
072D11010107731121000780114100098211210009B311610007B611210109BF11410003C2114100\
07CA116100092C126100072F1261000932124100073412210009351221000736124100073E122100\
07DF12210009E012610007E312010107001341000902134100073C132100073E132100093F132100\
074013210009411381000947134100094B13610007571321000962134100076613E100077013A100\
09351461000738140101094014410007421461000945142100074614210007B014210009B1144100\
07B314C10009B914210007BA14210009BB14410007BD14210009BE14210007BF14410009C1142100\
07C214410007AF15210009B015410007B215810009B815810007BC15410009BE15210007BF154100\
07DC15410009301661000733160101093B164100073D162100093E162100073F16410007AB162100\
09AC16210007AD16210009AE16410007B016C10009B616210007B7162100071D1761000920174100\
07221781000926172100072717A100092F1C210007301CE10007381CC100093E1C2100073F1C2100\
07921CC10209A91C210007AA1CE10009B11C210007B21C410009B41C210007B51C410007F06AA100\
07306BE10009516FC105078F6F8100079DBC410006A0BC81000765D121000966D121000767D16100\
096DD12100076ED1A1000673D10101077BD101010785D1E10007AAD181000742D261000700DAE106\
073BDA41060775DA21000784DA2100079BDAA10007A1DAE1010700E0E1000708E02102071BE0E100\
0723E041000726E0A10007D0E8E1000744E9E10008E6F141030F85F321000FC3F341000FCAF34100\
10FBF3A1000F42F441000F46F461011366F481000F6EF421000F70F421010F7CF421000F81F46100\
0F85F46100128BF421000FAAF421000F75F521000F7AF521000F90F521000F95F5410012E8F52100\
0F45F661000F4BF6A1000FA3F621000FB4F661000FC0F621000F18F9E1000F26F921000F30F92100\
0F33F9E1000F3CF961000600000E040720000E0C0680000E100700010E1E06F001EEFF06EF092EC2\
'.replace(
/[0-9A-F]{2}/g,
function($0){return String.fromCharCode(parseInt($0, 16))});
const GRAPHEME_BREAK_PROP_UNIT_LENGTH = 5;
const GBP = {
/* ` */'Other': 0,
/* a */'SOT': 1,
/* b */'EOT': 2,
/* c */'Prepend': 3,
/* d */'CR': 4,
/* e */'LF': 5,
/* f */'Control': 6,
/* g */'Extend': 7,
/* h */'Regional_Indicator': 8,
/* i */'SpacingMark': 9,
/* j */'L': 10,
/* k */'V': 11,
/* l */'T': 12,
/* m */'LV': 13,
/* n */'LVT': 14,
/* o */'E_Base': 15,
/* p */'E_Modifier': 16,
/* q */'ZWJ': 17,
/* r */'Glue_After_Zwj': 18,
/* s */'E_Base_GAZ': 19
};
const GBP_NAMES = Object.keys(GBP);
// GENERATED CODE END
// >>>
/*
* data table, taken from:
* http://www.unicode.org/Public/9.0.0/ucd/auxiliary/WordBreakProperty.txt
*/
// GENERATED CODE START <<<1
// This data was generated by the command 'node mkdata.js -w'.
const WORD_BREAK_PROPS = '\
1A09002000070A002000080B004000060D0020001A20002000032200200004270020000E2C002000\
0F2E00200010300040010D3A0020000E3B0020000C41004003115F0020000C610040030885002000\
1AA00020000CAA0020000BAD0020000CB50020000DB70020000CBA0020000CC000E0020CD800E003\
0CF80040390CC60280010DD70220000CE002A0000CEC0220000CEE022000090003000E0C7003A000\
0C760340000C7A0380000E7E0320000C7F0320000C860320000D870320000C880360000C8C032000\
0C8E0380020CA303600A0CF7036011098304E0000C8A04C0140C3105C0040C590520000C6105E004\
0E89052000099105A00509BF05200009C105400009C405400009C705200005D005600305F0056000\
0CF30520000DF40520000B0006C0000E0C06400009100660010B1C0620000C20066005094B06A002\
1060064001106B0620000E6C0620000C6E06400009700620000C7106600C0CD506200009D606E000\
0BDD06200009DF06C0000CE506400009E706400009EA0680000CEE06400010F00640010CFA066000\
0CFF0620000B0F0720000C1007200009110720000C1207C00309300760030C4D07200B09A6076001\
0CB107200010C00740010CCA07200409EB0720010CF40740000EF80720000CFA0720000C0008C002\
09160880000C1A082000091B0820010C2408200009250860000C28082000092908A0000C40082003\
09590860000CA008A0020CB608000109D408C0010BE208200009E30820040C0409C006093A096000\
0C3D092000093E0940020C50092000095109E0000C58094001096209400010660940010C71090002\
09810960000C850900010C8F0940000C9309C0020CAA09E0000CB20920000CB609800009BC092000\
0CBD09200009BE09E00009C709400009CB0960000CCE09200009D70920000CDC0940000CDF096000\
09E209400010E60940010CF009400009010A60000C050AC0000C0F0A40000C130AC0020C2A0AE000\
0C320A40000C350A40000C380A4000093C0A2000093E0AA00009470A4000094B0A600009510A2000\
0C590A80000C5E0A200010660A400109700A40000C720A600009750A200009810A60000C850A2001\
0C8F0A60000C930AC0020CAA0AE0000CB20A40000CB50AA00009BC0A20000CBD0A200009BE0A0001\
09C70A600009CB0A60000CD00A20000CE00A400009E20A400010E60A40010CF90A200009010B6000\
0C050B00010C0F0B40000C130BC0020C2A0BE0000C320B40000C350BA000093C0B20000C3D0B2000\
093E0BE00009470B4000094B0B600009560B40000C5C0B40000C5F0B600009620B400010660B4001\
0C710B200009820B20000C830B20000C850BC0000C8E0B60000C920B80000C990B40000C9C0B2000\
0C9E0B40000CA30B40000CA80B60000CAE0B800109BE0BA00009C60B600009CA0B80000CD00B2000\
09D70B200010E60B400109000C80000C050C00010C0E0C60000C120CE0020C2A0C00020C3D0C2000\
093E0CE00009460C6000094A0C800009550C40000C580C60000C600C400009620C400010660C4001\
0C800C200009810C60000C850C00010C8E0C60000C920CE0020CAA0C40010CB50CA00009BC0C2000\
0CBD0C200009BE0CE00009C60C600009CA0C800009D50C40000CDE0C20000CE00C400009E20C4000\
10E60C40010CF10C400009010D60000C050D00010C0E0D60000C120D20050C3D0D2000093E0DE000\
09460D6000094A0D80000C4E0D20000C540D600009570D20000C5F0D600009620D400010660D4001\
0C7A0DC00009820D40000C850D40020C9A0D00030CB30D20010CBD0D20000CC00DE00009CA0D2000\
09CF0DC00009D60D200009D80D000110E60D400109F20D400009310E200009340EE00009470E0001\
10500E400109B10E200009B40EC00009BB0E400009C80EC00010D00E40010C000F200009180F4000\
10200F400109350F200009370F200009390F2000093E0F40000C400F00010C490F800409710F8002\
09860F40000C880FA000098D0F600109990F800409C60F2000092B10800210401040010956108000\
095E1060000962106000096710E00009711080000982108001098F1020001090104001099A108000\
0CA010C0040CC71020000CCD1020000CD01060050CFC10A0290C4A1280000C5012E0000C58122000\
0C5A1280000C601220050C8A1280000C901220040CB21280000CB812E0000CC01220000CC2128000\
0CC812E0010CD81220070C121380000C18136008095D1360000C801300020CA013C00A0CF813C000\
0C0114804D0C6F1620020C811640030CA01660090CEE1660010C0017A0010C0E1780000912176000\
0C2017400209321760000C4017400209521740000C6017A0010C6E176000097217400009B4170004\
09DD17200010E0174001090B1860000B0E18200010101840010C2018000B0C8018A0000985184000\
0C8718400409A91820000CAA1820000CB018C0080C0019E003092019800109301980011046194001\
10D01940010C001AE00209171AA00009551A400109601AA003097F1A200010801A400110901A4001\
09B01AE00109001BA0000C051BE00509341B20020C451BE00010501B4001096B1B200109801B6000\
0C831BC00309A11BA0010CAE1B400010B01B40010CBA1B800509E61BC0010C001C800409241C8002\
10401C40010C4D1C600010501C40010C5A1C80040C801C200109D01C600009D41CA0020CE91C8000\
09ED1C20000CEE1C800009F21C60000CF51C400009F81C40000C001D001809C01DC00609FB1DA000\
0C001EC0220C181FC0000C201FC0040C481FC0000C501F00010C591F20000C5B1F20000C5D1F2000\
0C5F1FE0030C801FA0060CB61FE0000CBE1F20000CC21F60000CC61FE0000CD01F80000CD61FC000\
0CE01FA0010CF21F60000CF61FE0001A00208001090C202000140D2020000B0E2040000F18204000\
0F242020000D2720200008282040000B2A20A000112F202000113F2040000E442020001154202000\
1A5F2020000B6020A0000B662040010C712020000C7F2020000C9020A00109D02020040C02212000\
0C072120000C0A2140010C152120000C1921A0000C242120000C262120000C282120000C2A218000\
0C2F2160010C3C2180000C4521A0000C4E2120000C602120050CB6248006121D26200012F9262000\
120A27800015642720000C002CE0050C302CE0050C602CA0100CEB2C800009EF2C60000CF22C4000\
0C002DC0040C272D20000C2D2D20000C302D00070C6F2D2000097F2D20000C802DE0020CA02DE000\
0CA82DE0000CB02DE0000CB82DE0000CC02DE0000CC82DE0000CD02DE0000CD82DE00009E02D0004\
0C2F2E20001A003020000C05302000092A30C000193130A0000C3B304000184130C00A0999304000\
199B308000189F30200019A030200017A130400B19FC30600017FF3020000C053120050C3131C00B\
0CA031600317F031000217D032E005170033000B0C00A0A0910CD0A4C0050C00A5A0210C10A60002\
1020A640010C2AA640000C40A6E005096FA680000974A640010C7FA6E003099EA640000CA0A6000A\
09F0A640000C17A720010C22A7E00C0C8BA780040CB0A700010CF7A760010902A820000C03A86000\
0906A820000C07A88000090BA820000C0CA8E0020923A8A0000C40A880060980A840000C82A84006\
09B4A8400210D0A8400109E0A840020CF2A8C0000CFBA820000CFDA820001000A940010C0AA98003\
0926A900010C30A9E0020947A9A0010C60A9A0030980A980000C84A9E00509B3A9C0010CCFA92000\
10D0A9400109E5A9200010F0A940010C00AA20050929AAC0010C40AA60000943AA20000C44AA0001\
094CAA40001050AA4001097BAA600009B0AA200009B2AA600009B7AA400009BEAA400009C1AA2000\
0CE0AA600109EBAAA0000CF2AA600009F5AA40000C01ABC0000C09ABC0000C11ABC0000C20ABE000\
0C28ABE0000C30AB60050C5CAB40010C70AB600E09E3AB000109ECAB400010F0AB40010C00ACE0FF\
0CFFB3E0FF0CFEBBE0FF0CFDC3E0FF0CFCCBE0FF0CFBD320750CB0D7E0020CCBD720060C00FBE000\
0C13FBA000051DFB2000091EFB2000051FFB4001052AFBA0010538FBA000053EFB20000540FB4000\
0543FB40000546FB40010C50FB400C0CD3FB602D0C50FD00080C92FDC0060CF0FD80010900FE0002\
0E10FE20000D13FE20000E14FE20000920FE00021133FE4000114DFE60000E50FE20000F52FE2000\
0E54FE20000D55FE20000C70FEA0000C76FEE0100BFFFE20000F07FF20000E0CFF20000F0EFF2000\
0D1AFF20000E1BFF20000C21FF4003113FFF20000C41FF40031766FF40011970FF20001771FFA005\
099EFF40000CA0FFE0030CC2FFC0000CCAFFC0000CD2FFC0000CDAFF60000BF9FF60000C00008101\
0C0D0041030C280061020C3C0041000C3F00E1010C5000C1010C8000610F0C4001A10609FD012100\
0C8002A1030CA002210609E00221000C000301040C300361030C5003C104097603A1000C8003C103\
0CA00381040CC80301010CD103A1000C0004C11310A00441010CB00481040CD80481040C00050105\
0C300581060C0006E1260C4007C1020C600701010C0008C1000C080821000C0A0881050C37084100\
0C3C0821000C3F08E1020C6008E1020C8008E1030CE00861020CF40841000C0009C1020C20094103\
0C800901070CBE0941000C000A210009010A610009050A4100090C0A81000C100A81000C150A6100\
0C190A610309380A6100093F0A21000C600AA1030C800AA1030CC00A01010CC90A810309E50A4100\
0C000BC1060C400BC1020C600B61020C800B41020C000C21090C800C61060CC00C61060900106100\
0C0310A106093810E1011066104101097F1081000C8310A10509B01061010BBD1021000CD0102103\
10F010410109001161000C03118104092711C10110361141010C5011610409731121000C76112100\
09801161000C8311010609B311C1010CC111810009CA11610010D01141010CDA1121000CDC112100\
0C001241020C13122103092C128101093E1221000C8012E1000C881221000C8A1281000C8F12E101\
0C9F1241010CB012E10509DF12810110F012410109001381000C051301010C0F1341000C1313C102\
0C2A13E1000C321341000C3513A100093C1321000C3D132100093E13E1000947134100094B136100\
0C5013210009571321000C5D13A1000962134100096613E100097013A1000C0014A1060935144102\
0C4714810010501441010C8014010609B01481020CC41441000CC714210010D01441010C8015E105\
09AF15E10009B81521010CD815810009DC1541000C0016010609301621020C441621001050164101\
0C8016610509AB16A10110C0164101091D17E10110301741010CA018010810E01841010CFF182100\
0CC01A21070C001C21010C0A1CA104092F1C010109381C01010C401C210010501C41010C721CC103\
09921CC10209A91CC1010C002041730C0024E10D0C802481180C0030E1850C0044E1480C00682147\
0C406AE10310606A41010CD06AC10309F06AA1000C006B010609306BE1000C406B810010506B4101\
0C636BA1020C7D6B61020C006FA1080C506F210009516FC105098F6F81000C936FA1010CE06F2100\
1700B021000C00BC610D0C70BCA1010C80BC21010C90BC4101099DBC41000BA0BC81000965D1A100\
096DD1C1000B73D10101097BD101010985D1E10009AAD181000942D261000C00D4A10A0C56D4E108\
0C9ED441000CA2D421000CA5D441000CA9D481000CAED481010CBBD421000CBDD4E1000CC5D42108\
0C07D581000C0DD501010C16D5E1000C1ED581030C3BD581000C40D5A1000C46D521000C4AD5E100\
0C52D5812A0CA8D621030CC2D621030CDCD6E1030CFCD621030C16D7E1030C36D721030C50D7E103\
0C70D721030C8AD7E1030CAAD721030CC4D7010110CED741060900DAE106093BDA41060975DA2100\
0984DA2100099BDAA10009A1DAE1010900E0E1000908E02102091BE0E1000923E041000926E0A100\
0C00E8A11809D0E8E1000C00E981080944E9E1001050E941010C00EE81000C05EE61030C21EE4100\
0C24EE21000C27EE21000C29EE41010C34EE81000C39EE21000C3BEE21000C42EE21000C47EE2100\
0C49EE21000C4BEE21000C4DEE61000C51EE41000C54EE21000C57EE21000C59EE21000C5BEE2100\
0C5DEE21000C5FEE21000C61EE41000C64EE21000C67EE81000C6CEEE1000C74EE81000C79EE8100\
0C7EEE21000C80EE41010C8BEE21020CA1EE61000CA5EEA1000CABEE21020C30F141030C50F14103\
0C70F141030AE6F141031285F3210012C3F3410012CAF3410013FBF3A1001242F441001246F46101\
1666F48100126EF421001270F42101127CF421001281F461001285F46100158BF4210012AAF42100\
1275F52100127AF521001290F521001295F5410015E8F521001245F66100124BF6A10012A3F62100\
12B4F6610012C0F621001218F9E1001226F921001230F921001233F9E100123CF961000B01002E00\
0920000E0C0900010E1E'.replace(
/[0-9A-F]{2}/g,
function($0){return String.fromCharCode(parseInt($0, 16))});
const WORD_BREAK_PROP_UNIT_LENGTH = 5;
const WBP = {
/* ` */'Other': 0,
/* a */'SOT': 1,
/* b */'EOT': 2,
/* c */'Double_Quote': 3,
/* d */'Single_Quote': 4,
/* e */'Hebrew_Letter': 5,
/* f */'CR': 6,
/* g */'LF': 7,
/* h */'Newline': 8,
/* i */'Extend': 9,
/* j */'Regional_Indicator': 10,
/* k */'Format': 11,
/* l */'ALetter': 12,
/* m */'MidLetter': 13,
/* n */'MidNum': 14,
/* o */'MidNumLet': 15,
/* p */'Numeric': 16,
/* q */'ExtendNumLet': 17,
/* r */'E_Base': 18,
/* s */'E_Modifier': 19,
/* t */'ZWJ': 20,
/* u */'Glue_After_Zwj': 21,
/* v */'E_Base_GAZ': 22,
/* w */'Katakana': 23,
/* x */'Hiragana': 24,
/* y */'KanaExtension': 25,
/* z */'Space': 26
};
const WBP_NAMES = Object.keys(WBP);
// GENERATED CODE END
// >>>
/*
* data table, taken from:
* http://www.unicode.org/Public/9.0.0/ucd/auxiliary/SentenceBreakProperty.txt
*/
// GENERATED CODE START <<<1
// This data was generated by the command 'node mkdata.js -e'.
const SENTENCE_BREAK_PROPS = '\
0809002000040A002000080B004000030D00200008200020000E210020000F220020000F27006000\
102C0040000D2E0020000C30004001103A0020000E3F0020000A410040030F5B0020000F5D002000\
09610040030F7B0020000F7D002000068500200008A000200009AA0020000FAB00200007AD002000\
09B500200009BA0020000FBB0020000AC000E0020AD800E00009DF00000309F80000010A00012000\
09010120000A0201200009030120000A0401200009050120000A0601200009070120000A08012000\
09090120000A0A012000090B0120000A0C012000090D0120000A0E012000090F0120000A10012000\
09110120000A1201200009130120000A1401200009150120000A1601200009170120000A18012000\
09190120000A1A012000091B0120000A1C012000091D0120000A1E012000091F0120000A20012000\
09210120000A2201200009230120000A2401200009250120000A2601200009270120000A28012000\
09290120000A2A012000092B0120000A2C012000092D0120000A2E012000092F0120000A30012000\
09310120000A3201200009330120000A3401200009350120000A3601200009370140000A39012000\
093A0120000A3B012000093C0120000A3D012000093E0120000A3F01200009400120000A41012000\
09420120000A4301200009440120000A4501200009460120000A4701200009480140000A4A012000\
094B0120000A4C012000094D0120000A4E012000094F0120000A5001200009510120000A52012000\
09530120000A5401200009550120000A5601200009570120000A5801200009590120000A5A012000\
095B0120000A5C012000095D0120000A5E012000095F0120000A6001200009610120000A62012000\
09630120000A6401200009650120000A6601200009670120000A6801200009690120000A6A012000\
096B0120000A6C012000096D0120000A6E012000096F0120000A7001200009710120000A72012000\
09730120000A7401200009750120000A7601200009770120000A78014000097A0120000A7B012000\
097C0120000A7D012000097E0160000A8101400009830120000A8401200009850120000A86014000\
09880120000A89016000098C0140000A8E01800009920120000A9301400009950120000A96016000\
09990160000A9C014000099E0120000A9F01400009A10120000AA201200009A30120000AA4012000\
09A50120000AA601400009A80120000AA901200009AA0140000AAC01200009AD0120000AAE014000\
09B00120000AB101600009B40120000AB501200009B60120000AB701400009B90140000BBB012000\
0ABC01200009BD0160000BC00180000AC401400009C60120000AC701400009C90120000ACA014000\
09CC0120000ACD01200009CE0120000ACF01200009D00120000AD101200009D20120000AD3012000\
09D40120000AD501200009D60120000AD701200009D80120000AD901200009DA0120000ADB012000\
09DC0140000ADE01200009DF0120000AE001200009E10120000AE201200009E30120000AE4012000\
09E50120000AE601200009E70120000AE801200009E90120000AEA01200009EB0120000AEC012000\
09ED0120000AEE01200009EF0140000AF101400009F30120000AF401200009F50120000AF6016000\
09F90120000AFA01200009FB0120000AFC01200009FD0120000AFE01200009FF0120000A00022000\
09010220000A0202200009030220000A0402200009050220000A0602200009070220000A08022000\
09090220000A0A022000090B0220000A0C022000090D0220000A0E022000090F0220000A10022000\
09110220000A1202200009130220000A1402200009150220000A1602200009170220000A18022000\
09190220000A1A022000091B0220000A1C022000091D0220000A1E022000091F0220000A20022000\
09210220000A2202200009230220000A2402200009250220000A2602200009270220000A28022000\
09290220000A2A022000092B0220000A2C022000092D0220000A2E022000092F0220000A30022000\
09310220000A32022000093302E0000A3A024000093C0220000A3D024000093F0240000A41022000\
09420220000A4302800009470220000A4802200009490220000A4A022000094B0220000A4C022000\
094D0220000A4E022000094F02A0080B9402200009950280040BB902E00009C00240000BC6028001\
09E002A0000BEC0220000BEE022000050003000E0A7003200009710320000A720320000973032000\
0B740320000A760320000977032000097A0380000A7F0320000A860320000A880360000A8C032000\
0A8E03400009900320000A910320020AA303200109AC0360040ACF03200009D00340000AD2036000\
09D50360000AD803200009D90320000ADA03200009DB0320000ADC03200009DD0320000ADE032000\
09DF0320000AE003200009E10320000AE203200009E30320000AE403200009E50320000AE6032000\
09E70320000AE803200009E90320000AEA03200009EB0320000AEC03200009ED0320000AEE032000\
09EF03A0000AF403200009F50320000AF703200009F80320000AF903400009FB0340000AFD036006\
09300400060A6004200009610420000A6204200009630420000A6404200009650420000A66042000\
09670420000A6804200009690420000A6A042000096B0420000A6C042000096D0420000A6E042000\
096F0420000A7004200009710420000A7204200009730420000A7404200009750420000A76042000\
09770420000A7804200009790420000A7A042000097B0420000A7C042000097D0420000A7E042000\
097F0420000A800420000981042000058304E0000A8A042000098B0420000A8C042000098D042000\
0A8E042000098F0420000A9004200009910420000A9204200009930420000A940420000995042000\
0A9604200009970420000A9804200009990420000A9A042000099B0420000A9C042000099D042000\
0A9E042000099F0420000AA004200009A10420000AA204200009A30420000AA404200009A5042000\
0AA604200009A70420000AA804200009A90420000AAA04200009AB0420000AAC04200009AD042000\
0AAE04200009AF0420000AB004200009B10420000AB204200009B30420000AB404200009B5042000\
0AB604200009B70420000AB804200009B90420000ABA04200009BB0420000ABC04200009BD042000\
0ABE04200009BF0420000AC004400009C20420000AC304200009C40420000AC504200009C6042000\
0AC704200009C80420000AC904200009CA0420000ACB04200009CC0420000ACD04200009CE044000\
0AD004200009D10420000AD204200009D30420000AD404200009D50420000AD604200009D7042000\
0AD804200009D90420000ADA04200009DB0420000ADC04200009DD0420000ADE04200009DF042000\
0AE004200009E10420000AE204200009E30420000AE404200009E50420000AE604200009E7042000\
0AE804200009E90420000AEA04200009EB0420000AEC04200009ED0420000AEE04200009EF042000\
0AF004200009F10420000AF204200009F30420000AF404200009F50420000AF604200009F7042000\
0AF804200009F90420000AFA04200009FB0420000AFC04200009FD0420000AFE04200009FF042000\
0A0005200009010520000A0205200009030520000A0405200009050520000A060520000907052000\
0A0805200009090520000A0A052000090B0520000A0C052000090D0520000A0E052000090F052000\
0A1005200009110520000A1205200009130520000A1405200009150520000A160520000917052000\
0A1805200009190520000A1A052000091B0520000A1C052000091D0520000A1E052000091F052000\
0A2005200009210520000A2205200009230520000A2405200009250520000A260520000927052000\
0A2805200009290520000A2A052000092B0520000A2C052000092D0520000A2E052000092F052000\
0A3105C0040B59052000105D052000096105E0040E89052000059105A00505BF05200005C1054000\
05C405400005C70520000BD00560030BF0058000070006C000100C0640000510066001071C062000\
0E1F0620000B20066005054B06A0020C600640010C6B0640000B6E06400005700620000B7106600C\
0ED40620000BD506200005D606E00007DD06200005DF06C0000BE506400005E706400005EA068000\
0BEE0640000CF00640010BFA0660000BFF0620000E00076000070F0720000B100720000511072000\
0B1207C00305300760030B4D07200B05A60760010BB10720000CC00740010BCA07200405EB072001\
0BF407400010F80720000EF90720000BFA0720000B0008C00205160880000B1A082000051B082001\
0B2408200005250860000B28082000052908A0000B4008200305590860000BA008A0020BB6080001\
05D408C00107E208200005E30820040B0409C006053A0960000B3D092000053E0940020B50092000\
055109E0000B5809400105620940000E640940000C660940010B7109000205810960000B85090001\
0B8F0940000B9309C0020BAA09E0000BB20920000BB609800005BC0920000BBD09200005BE09E000\
05C709400005CB0960000BCE09200005D70920000BDC0940000BDF09600005E20940000CE6094001\
0BF009400005010A60000B050AC0000B0F0A40000B130AC0020B2A0AE0000B320A40000B350A4000\
0B380A4000053C0A2000053E0AA00005470A4000054B0A600005510A20000B590A80000B5E0A2000\
0C660A400105700A40000B720A600005750A200005810A60000B850A20010B8F0A60000B930AC002\
0BAA0AE0000BB20A40000BB50AA00005BC0A20000BBD0A200005BE0A000105C70A600005CB0A6000\
0BD00A20000BE00A400005E20A40000CE60A40010BF90A200005010B60000B050B00010B0F0B4000\
0B130BC0020B2A0BE0000B320B40000B350BA000053C0B20000B3D0B2000053E0BE00005470B4000\
054B0B600005560B40000B5C0B40000B5F0B600005620B40000C660B40010B710B200005820B2000\
0B830B20000B850BC0000B8E0B60000B920B80000B990B40000B9C0B20000B9E0B40000BA30B4000\
0BA80B60000BAE0B800105BE0BA00005C60B600005CA0B80000BD00B200005D70B20000CE60B4001\
05000C80000B050C00010B0E0C60000B120CE0020B2A0C00020B3D0C2000053E0CE00005460C6000\
054A0C800005550C40000B580C60000B600C400005620C40000C660C40010B800C200005810C6000\
0B850C00010B8E0C60000B920CE0020BAA0C40010BB50CA00005BC0C20000BBD0C200005BE0CE000\
05C60C600005CA0C800005D50C40000BDE0C20000BE00C400005E20C40000CE60C40010BF10C4000\
05010D60000B050D00010B0E0D60000B120D20050B3D0D2000053E0DE00005460D6000054A0D8000\
0B4E0D20000B540D600005570D20000B5F0D600005620D40000C660D40010B7A0DC00005820D4000\
0B850D40020B9A0D00030BB30D20010BBD0D20000BC00DE00005CA0D200005CF0DC00005D60D2000\
05D80D00010CE60D400105F20D40000B010E000605310E20000B320E400005340EE0000B400EE000\
05470E00010C500E40010B810E40000B840E20000B870E40000B8A0E20000B8D0E20000B940E8000\
0B990EE0000BA10E60000BA50E20000BA70E20000BAA0E40000BAD0E800005B10E20000BB20E4000\
05B40EC00005BB0E40000BBD0E20000BC00EA0000BC60E200005C80EC0000CD00E40010BDC0E8000\
0B000F200005180F40000C200F400105350F200005370F200005390F20000F3A0F8000053E0F4000\
0B400F00010B490F800405710F800205860F40000B880FA000058D0F600105990F800405C60F2000\
0B00106005052B1080020B3F1020000C401040010E4A1040000B5010C00005561080000B5A108000\
055E1060000B6110200005621060000B65104000056710E0000B6E10600005711080000B7510A001\
05821080010B8E102000058F1020000C90104001059A1080000AA010C0040AC71020000ACD102000\
0BD01060050BFC10A0290B4A1280000B5012E0000B581220000B5A1280000B601220050B8A128000\
0B901220040BB21280000BB812E0000BC01220000BC21280000BC812E0010BD81220070B12138000\
0B18136008055D1360000E621320000E671340000B801300020AA013C00A09F813C0000B0114804D\
0E6E1620000B6F16200208801620000B811640030F9B1640000BA01660090BEE1660010B0017A001\
0B0E17800005121760000B2017400205321760000E351740000B4017400205521740000B6017A001\
0B6E17600005721740000B8017800605B41700040BD71720000BDC17200005DD1720000CE0174001\
10021820000E0318200010081820000E09182000050B186000070E1820000C101840010B2018000B\
0B8018A00005851840000B8718400405A91820000BAA1820000BB018C0080B0019E0030520198001\
05301980010E441940000C461940010B5019C0030B7019A0000B801980050BB01940030CD0194001\
0B001AE00205171AA0000B201AA00605551A400105601AA003057F1A20000C801A40010C901A4001\
0BA71A20000EA81A800005B01AE00105001BA0000B051BE00505341B20020B451BE0000C501B4001\
0E5A1B40000E5E1B4000056B1B200105801B60000B831BC00305A11BA0010BAE1B40000CB01B4001\
0BBA1B800505E61BC0010B001C800405241C80020E3B1C40000C401C40010B4D1C60000C501C4001\
0B5A1C80040E7E1C400009801C200105D01C600005D41CA0020BE91C800005ED1C20000BEE1C8000\
05F21C60000BF51C400005F81C400009001D001805C01DC00605FB1DA0000A001E200009011E2000\
0A021E200009031E20000A041E200009051E20000A061E200009071E20000A081E200009091E2000\
0A0A1E2000090B1E20000A0C1E2000090D1E20000A0E1E2000090F1E20000A101E200009111E2000\
0A121E200009131E20000A141E200009151E20000A161E200009171E20000A181E200009191E2000\
0A1A1E2000091B1E20000A1C1E2000091D1E20000A1E1E2000091F1E20000A201E200009211E2000\
0A221E200009231E20000A241E200009251E20000A261E200009271E20000A281E200009291E2000\
0A2A1E2000092B1E20000A2C1E2000092D1E20000A2E1E2000092F1E20000A301E200009311E2000\
0A321E200009331E20000A341E200009351E20000A361E200009371E20000A381E200009391E2000\
0A3A1E2000093B1E20000A3C1E2000093D1E20000A3E1E2000093F1E20000A401E200009411E2000\
0A421E200009431E20000A441E200009451E20000A461E200009471E20000A481E200009491E2000\
0A4A1E2000094B1E20000A4C1E2000094D1E20000A4E1E2000094F1E20000A501E200009511E2000\
0A521E200009531E20000A541E200009551E20000A561E200009571E20000A581E200009591E2000\
0A5A1E2000095B1E20000A5C1E2000095D1E20000A5E1E2000095F1E20000A601E200009611E2000\
0A621E200009631E20000A641E200009651E20000A661E200009671E20000A681E200009691E2000\
0A6A1E2000096B1E20000A6C1E2000096D1E20000A6E1E2000096F1E20000A701E200009711E2000\
0A721E200009731E20000A741E200009751E20000A761E200009771E20000A781E200009791E2000\
0A7A1E2000097B1E20000A7C1E2000097D1E20000A7E1E2000097F1E20000A801E200009811E2000\
0A821E200009831E20000A841E200009851E20000A861E200009871E20000A881E200009891E2000\
0A8A1E2000098B1E20000A8C1E2000098D1E20000A8E1E2000098F1E20000A901E200009911E2000\
0A921E200009931E20000A941E200009951E20010A9E1E2000099F1E20000AA01E200009A11E2000\
0AA21E200009A31E20000AA41E200009A51E20000AA61E200009A71E20000AA81E200009A91E2000\
0AAA1E200009AB1E20000AAC1E200009AD1E20000AAE1E200009AF1E20000AB01E200009B11E2000\
0AB21E200009B31E20000AB41E200009B51E20000AB61E200009B71E20000AB81E200009B91E2000\
0ABA1E200009BB1E20000ABC1E200009BD1E20000ABE1E200009BF1E20000AC01E200009C11E2000\
0AC21E200009C31E20000AC41E200009C51E20000AC61E200009C71E20000AC81E200009C91E2000\
0ACA1E200009CB1E20000ACC1E200009CD1E20000ACE1E200009CF1E20000AD01E200009D11E2000\
0AD21E200009D31E20000AD41E200009D51E20000AD61E200009D71E20000AD81E200009D91E2000\
0ADA1E200009DB1E20000ADC1E200009DD1E20000ADE1E200009DF1E20000AE01E200009E11E2000\
0AE21E200009E31E20000AE41E200009E51E20000AE61E200009E71E20000AE81E200009E91E2000\
0AEA1E200009EB1E20000AEC1E200009ED1E20000AEE1E200009EF1E20000AF01E200009F11E2000\
0AF21E200009F31E20000AF41E200009F51E20000AF61E200009F71E20000AF81E200009F91E2000\
0AFA1E200009FB1E20000AFC1E200009FD1E20000AFE1E200009FF1E20010A081F000109101FC000\
0A181FC00009201F00010A281F000109301F00010A381F000109401FC0000A481FC00009501F0001\
0A591F20000A5B1F20000A5D1F20000A5F1F200009601F00010A681F000109701FC00109801F0001\
0A881F000109901F00010A981F000109A01F00010AA81F000109B01FA00009B61F40000AB81FA000\
09BE1F200009C21F600009C61F40000AC81FA00009D01F800009D61F40000AD81F800009E01F0001\
0AE81FA00009F21F600009F61F40000AF81FA0000800206001070B202000050C204000070E204000\
10132040000F182000010D242020000628204000072A20A000082F2020000F392040000E3C204000\
0F452040000E47206000085F202000076020A000076620400109712020000F7D204000097F202000\
0F8D204000099020A00105D02020040A022120000A07212000090A2120000A0B216000090E214000\
0A1021600009132120000A152120000A1921A0000A242120000A262120000A282120000A2A218000\
092F2120000A3021800009342120000B352180000939212000093C2140000A3E2140000A45212000\
0946218000094E2120000A6021000209702100020B802160000A8321200009842120000B85218000\
0F082380000F292340000AB624400309D02440030F5B27C0000F6827C0010FC52740000FE6274001\
0F8329C0020FD82980000FFC2940000A002CE00509302CE0050A602C200009612C20000A622C6000\
09652C40000A672C200009682C20000A692C2000096A2C20000A6B2C2000096C2C20000A6D2C8000\
09712C20000A722C200009732C40000A752C200009762C00010A7E2C600009812C20000A822C2000\
09832C20000A842C200009852C20000A862C200009872C20000A882C200009892C20000A8A2C2000\
098B2C20000A8C2C2000098D2C20000A8E2C2000098F2C20000A902C200009912C20000A922C2000\
09932C20000A942C200009952C20000A962C200009972C20000A982C200009992C20000A9A2C2000\
099B2C20000A9C2C2000099D2C20000A9E2C2000099F2C20000AA02C200009A12C20000AA22C2000\
09A32C20000AA42C200009A52C20000AA62C200009A72C20000AA82C200009A92C20000AAA2C2000\
09AB2C20000AAC2C200009AD2C20000AAE2C200009AF2C20000AB02C200009B12C20000AB22C2000\
09B32C20000AB42C200009B52C20000AB62C200009B72C20000AB82C200009B92C20000ABA2C2000\
09BB2C20000ABC2C200009BD2C20000ABE2C200009BF2C20000AC02C200009C12C20000AC22C2000\
09C32C20000AC42C200009C52C20000AC62C200009C72C20000AC82C200009C92C20000ACA2C2000\
09CB2C20000ACC2C200009CD2C20000ACE2C200009CF2C20000AD02C200009D12C20000AD22C2000\
09D32C20000AD42C200009D52C20000AD62C200009D72C20000AD82C200009D92C20000ADA2C2000\
09DB2C20000ADC2C200009DD2C20000ADE2C200009DF2C20000AE02C200009E12C20000AE22C2000\
09E32C40000AEB2C200009EC2C20000AED2C200009EE2C200005EF2C60000AF22C200009F32C2000\
09002DC00409272D2000092D2D20000B302D00070B6F2D2000057F2D20000B802DE0020BA02DE000\
0BA82DE0000BB02DE0000BB82DE0000BC02DE0000BC82DE0000BD02DE0000BD82DE00005E02D0004\
0F002EC0010F1C2E40000F202E40010E2E2E20000B2F2E20000E3C2E20000F422E20000800302000\
10013020000E023020000B053060000F083040010F143000010F1D3060000B21302001052A30C000\
0B3130A0000B3830A0000B4130C00A05993040000B9D3060000BA130400B0BFC3080000B05312005\
0B3131C00B0BA03160030BF03100020B0034E0FF0BFF3BE0FF0BFE43E0FF0BFD4B20370B004EE0FF\
0BFF55E0FF0BFE5DE0FF0BFD65E0FF0BFC6DE0FF0BFB75E0FF0BFA7DE0FF0BF985E0FF0BF88DE0FF\
0BF795E0FF0BF69D003C0B00A0A0910BD0A4C0050EFFA420000B00A5A0210E0EA640000B10A60002\
0C20A640010B2AA640000A40A620000941A620000A42A620000943A620000A44A620000945A62000\
0A46A620000947A620000A48A620000949A620000A4AA62000094BA620000A4CA62000094DA62000\
0A4EA62000094FA620000A50A620000951A620000A52A620000953A620000A54A620000955A62000\
0A56A620000957A620000A58A620000959A620000A5AA62000095BA620000A5CA62000095DA62000\
0A5EA62000095FA620000A60A620000961A620000A62A620000963A620000A64A620000965A62000\
0A66A620000967A620000A68A620000969A620000A6AA62000096BA620000A6CA62000096DA62000\
0B6EA62000056FA680000574A640010B7FA620000A80A620000981A620000A82A620000983A62000\
0A84A620000985A620000A86A620000987A620000A88A620000989A620000A8AA62000098BA62000\
0A8CA62000098DA620000A8EA62000098FA620000A90A620000991A620000A92A620000993A62000\
0A94A620000995A620000A96A620000997A620000A98A620000999A620000A9AA62000099BA66000\
059EA640000BA0A6000A05F0A640000EF3A620000EF7A620000B17A720010A22A720000923A72000\
0A24A720000925A720000A26A720000927A720000A28A720000929A720000A2AA72000092BA72000\
0A2CA72000092DA720000A2EA72000092FA760000A32A720000933A720000A34A720000935A72000\
0A36A720000937A720000A38A720000939A720000A3AA72000093BA720000A3CA72000093DA72000\
0A3EA72000093FA720000A40A720000941A720000A42A720000943A720000A44A720000945A72000\
0A46A720000947A720000A48A720000949A720000A4AA72000094BA720000A4CA72000094DA72000\
0A4EA72000094FA720000A50A720000951A720000A52A720000953A720000A54A720000955A72000\
0A56A720000957A720000A58A720000959A720000A5AA72000095BA720000A5CA72000095DA72000\
0A5EA72000095FA720000A60A720000961A720000A62A720000963A720000A64A720000965A72000\
0A66A720000967A720000A68A720000969A720000A6AA72000096BA720000A6CA72000096DA72000\
0A6EA72000096FA740010A79A72000097AA720000A7BA72000097CA720000A7DA74000097FA72000\
0A80A720000981A720000A82A720000983A720000A84A720000985A720000A86A720000987A72000\
0B88A720000A8BA72000098CA720000A8DA72000098EA720000B8FA720000A90A720000991A72000\
0A92A720000993A760000A96A720000997A720000A98A720000999A720000A9AA72000099BA72000\
0A9CA72000099DA720000A9EA72000099FA720000AA0A7200009A1A720000AA2A7200009A3A72000\
0AA4A7200009A5A720000AA6A7200009A7A720000AA8A7200009A9A720000AAAA7A0000AB0A7A000\
09B5A720000AB6A7200009B7A720000BF7A7200009F8A760000BFBA7E0000502A820000B03A86000\
0506A820000B07A88000050BA820000B0CA8E0020523A8A0000B40A880060E76A840000580A84000\
0B82A8400605B4A840020ECEA840000CD0A8400105E0A840020BF2A8C0000BFBA820000BFDA82000\
0C00A940010B0AA980030526A900010E2FA920000B30A9E0020547A9A0010B60A9A0030580A98000\
0B84A9E00505B3A9C0010EC8A940000BCFA920000CD0A940010BE0A9A00005E5A920000BE6A94001\
0CF0A940010BFAA9A0000B00AA20050529AAC0010B40AA60000543AA20000B44AA0001054CAA4000\
0C50AA40010E5DAA60000B60AAE0020B7AAA2000057BAA60000B7EAA400605B0AA20000BB1AA2000\
05B2AA60000BB5AA400005B7AA40000BB9AAA00005BEAA40000BC0AA200005C1AA20000BC2AA2000\
0BDBAA60000BE0AA600105EBAAA0000EF0AA40000BF2AA600005F5AA40000B01ABC0000B09ABC000\
0B11ABC0000B20ABE0000B28ABE0000930AB6005095CAB40010970AB000A0BC0AB600405E3AB0001\
0EEBAB200005ECAB40000CF0AB40010B00ACE0FF0BFFB3E0FF0BFEBBE0FF0BFDC3E0FF0BFCCBE0FF\
0BFBD320750BB0D7E0020BCBD720060B00F9C02D0B70FA400D0900FBE0000913FBA0000B1DFB2000\
051EFB20000B1FFB40010B2AFBA0010B38FBA0000B3EFB20000B40FB40000B43FB40000B46FB800D\
0BD3FB602D0F3EFD40000B50FD00080B92FDC0060BF0FD80010500FE00021010FE40001013FE2000\
0F17FE40000520FE00021031FE40000F35FE00020F47FE40001050FE40000D52FE20001055FE2000\
0E56FE40001058FE20000F59FEC0001063FE20000B70FEA0000B76FEE01007FFFE20000E01FF2000\
0F08FF4000100CFF40000D0EFF2000101AFF20000E1FFF20000A21FF40030F3BFF20000F3DFF2000\
0941FF40030F5BFF20000F5DFF20000F5FFF40000E61FF20000F62FF40001064FF20000B66FF0007\
059EFF40000BA0FFE0030BC2FFC0000BCAFFC0000BD2FFC0000BDAFF600007F9FF60000B00008101\
0B0D0041030B280061020B3C0041000B3F00E1010B5000C1010B8000610F0B4001A10605FD012100\
0B8002A1030BA002210605E00221000B000301040B300361030B5003C104057603A1000B8003C103\
0BA00381040BC80301010BD103A1000A0004010509280401050B5004C1090CA00441010AB0048104\
09D80481040B000501050B300581060B0006E1260B4007C1020B600701010B0008C1000B08082100\
0B0A0881050B370841000B3C0821000B3F08E1020B6008E1020B8008E1030BE00861020BF4084100\
0B0009C1020B200941030B800901070BBE0941000B000A210005010A610005050A4100050C0A8100\
0B100A81000B150A61000B190A610305380A6100053F0A21000E560A41000B600AA1030B800AA103\
0BC00A01010BC90A810305E50A41000B000BC1060B400BC1020B600B61020B800B41020B000C2109\
0A800C610609C00C610605001061000B0310A106053810E1010E471041000C66104101057F108100\
0B8310A10505B010610107BD1021000EBE1081000BD01021030CF010410105001161000B03118104\
052711C1010C361141010E411161000B5011610405731121000B7611210005801161000B83110106\
05B311C1010BC11181000EC511410005CA1161000ECD1121000CD01141010BDA1121000BDC112100\
0EDE1141000B001241020B13122103052C1281010E381241000E3B124100053E1221000B8012E100\
0B881221000B8A1281000B8F12E1010B9F1241010EA91221000BB012E10505DF1281010CF0124101\
05001381000B051301010B0F1341000B1313C1020B2A13E1000B321341000B3513A100053C132100\
0B3D132100053E13E1000547134100054B1361000B5013210005571321000B5D13A1000562134100\
056613E100057013A1000B0014A10605351441020B471481000E4B1441000C501441010B80140106\
05B01481020BC41441000BC71421000CD01441010B8015E10505AF15E10005B81521010EC2154100\
0EC915E1010BD815810005DC1541000B0016010605301621020E411641000B441621000C50164101\
0B8016610505AB16A1010CC01641010B00174103051D17E1010C301741010E3C1761000AA0180104\
09C01801040CE01841010BFF1821000BC01A21070B001C21010B0A1CA104052F1C010105381C0101\
0B401C21000E411C41000C501C41010B721CC10305921CC10205A91CC1010B002041730B0024E10D\
0B802481180B0030E1850B0044E1480B006821470B406AE1030C606A41010E6E6A41000BD06AC103\
05F06AA1000EF56A21000B006B010605306BE1000E376B41000B406B81000E446B21000C506B4101\
0B636BA1020B7D6B61020B006FA1080B506F210005516FC105058F6F81000B936FA1010BE06F2100\
0B0070E1FF0BFF77E1FF0BFE7FE1FD0B0088615E0B00B041000B00BC610D0B70BCA1010B80BC2101\
0B90BC4101059DBC41000E9FBC210007A0BC81000565D1A100056DD1C1000773D10101057BD10101\
0585D1E10005AAD181000542D261000A00D44103091AD441030A34D44103094ED4E1000956D44102\
0A68D441030982D441030A9CD421000A9ED441000AA2D421000AA5D441000AA9D481000AAED40101\
09B6D4810009BBD4210009BDD4E10009C5D461010AD0D4410309EAD441030A04D541000A07D58100\
0A0DD501010A16D5E100091ED541030A38D541000A3BD581000A40D5A1000A46D521000A4AD5E100\
0952D541030A6CD541030986D541030AA0D5410309BAD541030AD4D5410309EED541030A08D64103\
0922D641030A3CD641030956D641030A70D64103098AD681030AA8D6210309C2D6210309DCD6C100\
0AE2D6210309FCD621030916D7C1000A1CD721030936D721030950D7C1000A56D721030970D72103\
098AD7C1000A90D7210309AAD7210309C4D7C1000ACAD7210009CBD721000CCED741060500DAE106\
053BDA41060575DA21000584DA21000E88DA2100059BDAA10005A1DAE1010500E0E1000508E02102\
051BE0E1000523E041000526E0A1000B00E8A11805D0E8E1000A00E941040922E941040544E9E100\
0C50E941010B00EE81000B05EE61030B21EE41000B24EE21000B27EE21000B29EE41010B34EE8100\
0B39EE21000B3BEE21000B42EE21000B47EE21000B49EE21000B4BEE21000B4DEE61000B51EE4100\
0B54EE21000B57EE21000B59EE21000B5BEE21000B5DEE21000B5FEE21000B61EE41000B64EE2100\
0B67EE81000B6CEEE1000B74EE81000B79EE81000B7EEE21000B80EE41010B8BEE21020BA1EE6100\
0BA5EEA1000BABEE21020A30F141030A50F141030A70F141030F76F661000B0000E2FF0BFF07E2FF\
0BFE0FE2FF0BFD17E2FF0BFC1FE2FF0BFB27E2FF0BFA2FE2FF0BF937E2FF0BF83FE2FF0BF747E2FF\
0BF64FE2FF0BF557E2FF0BF45FE2FF0BF367E2FF0BF26FE2FF0BF177E2FF0BF07FE2FF0BEF87E2FF\
0BEE8FE2FF0BED97E2FF0BEC9F62DD0B00A7E2FF0BFFAEE2FF0BFEB6E2060B40B7C21B0B20B8E2FF\
0B1FC0E2FF0B1EC882D00B00F8C2430701002E000520000E0C0500010E1E'.replace(
/[0-9A-F]{2}/g,
function($0){return String.fromCharCode(parseInt($0, 16))});
const SENTENCE_BREAK_PROP_UNIT_LENGTH = 5;
const SBP = {
/* ` */'Other': 0,
/* a */'SOT': 1,
/* b */'EOT': 2,
/* c */'CR': 3,
/* d */'LF': 4,
/* e */'Extend': 5,
/* f */'Sep': 6,
/* g */'Format': 7,
/* h */'Sp': 8,
/* i */'Lower': 9,
/* j */'Upper': 10,
/* k */'OLetter': 11,
/* l */'Numeric': 12,
/* m */'ATerm': 13,
/* n */'STerm': 14,
/* o */'Close': 15,
/* p */'SContinue': 16
};
const SBP_NAMES = Object.keys(SBP);
// GENERATED CODE END
// >>>
/*
* data table, taken from:
* http://www.unicode.org/Public/9.0.0/ucd/Scripts.txt
*/
// GENERATED CODE START <<<1
// This data was generated by the command 'node mkdata.js -s'.
const SCRIPTS = '\
01000020080241004003015B00C0000261004003017B00E00502AA00200001AB00E00102BA002000\
01BB00A00002C000E00201D700200002D800E00301F700200002F800203801B902E00402E002A000\
01E502A00023EA02400001EC028002290003000E037003800001740320000375036000037A038000\
017E032000037F03200003840320000185032000038603200001870320000388036000038C032000\
038E03800203A303E00737E203C00103F0030002040004A01029850440000487042015053105C004\
055905E000056105E0040189052000058A052000058D056000069105E00606D005600306F005A000\
070006A0000105062000070606C000010C062000070D06C001011B064000071E062000011F062000\
072006000401400620000741064001294B06600107560640032970062000077106800D01DD062000\
07DE064004080007C001080F078007084D0760000750070006098007400642C0076007520008C005\
523008E0015F400880035F5E08200007A008A00207B608000107D408C00101E208200007E308A003\
0A0009200A29510940000A5309200201640940000A660940030B800980000B850900010B8F094000\
0B9309C0020BAA09E0000BB20920000BB60980000BBC0920010BC70940000BCB0980000BD7092000\
0BDC0940000BDF09A0000BE609C0020C010A60000C050AC0000C0F0A40000C130AC0020C2A0AE000\
0C320A40000C350A40000C380A40000C3C0A20000C3E0AA0000C470A40000C4B0A60000C510A2000\
0C590A80000C5E0A20000C660A00020D810A60000D850A20010D8F0A60000D930AC0020DAA0AE000\
0DB20A40000DB50AA0000DBC0A40010DC70A60000DCB0A60000DD00A20000DE00A80000DE60A8001\
0DF90A20000E010B60000E050B00010E0F0B40000E130BC0020E2A0BE0000E320B40000E350BA000\
0E3C0B20010E470B40000E4B0B60000E560B40000E5C0B40000E5F0BA0000E660B40020F820B4000\
0F850BC0000F8E0B60000F920B80000F990B40000F9C0B20000F9E0B40000FA30B40000FA80B6000\
0FAE0B80010FBE0BA0000FC60B60000FCA0B80000FD00B20000FD70B20000FE60BA00210000C8000\
10050C0001100E0C600010120CE002102A0C0002103D0C000110460C6000104A0C800010550C4000\
10580C600010600C800010660C400110780C000111800C800011850C0001118E0C600011920CE002\
11AA0C400111B50CA00011BC0C200111C60C600011CA0C800011D50C400011DE0C200011E00C8000\
11E60C400111F10C400012010D600012050D0001120E0D600012120D2005123D0D000112460D6000\
124A0DC00012540D000212660D400313820D400013850D4002139A0D000313B30D200113BD0D2000\
13C00DE00013CA0D200013CF0DC00013D60D200013D80D000113E60D400113F20D600014010E4007\
013F0E200014400E800315810E400015840E200015870E4000158A0E2000158D0E200015940E8000\
15990EE00015A10E600015A50E200015A70E200015AA0E400015AD0EA00115BB0E600015C00EA000\
15C60E200015C80EC00015D00E400115DC0E800016000F000916490F800416710FE00416990F8004\
16BE0FE00116CE0FE00001D50F800016D90F4000170010001418A010C00418C710200018CD102000\
18D010600501FB10200018FC10800019001100201A001220091A4A1280001A5012E0001A58122000\
1A5A1280001A601220051A8A1280001A901220041AB21280001AB812E0001AC01220001AC2128000\
1AC812E0011AD81220071A121380001A181360081A5D1300041A801340031BA013C00A1BF813C000\
1C001400501D8016A0031EA016600901EB1660001EEE1660012A0017A0012A0E17E0002B2017A002\
01351740002C401780022D6017A0012D6E1760002D721740001F8017C00B1FE01740011FF0174001\
200018400001021840002004182000010518200020061820012010184001202018000B2080186005\
1CB018C0082E0019E0032E201980012E301980012E401920002E441980012F5019C0032F7019A000\
388019800538B019400338D019600138DE1940001FE019000436001A8003361E1A40004E201AE007\
4E601AA0034E7F1A60014E901A40014EA01AC00129B01AE0013E001B80093E501BA00543801B0008\
5DC01B80065DFC1B800044001C0007443B1CE001444D1C600045501C000604801C200143C01C0001\
29D01C600001D31C200029D41CA00101E11C200029E21CE00001E91C800029ED1C200001EE1CC000\
29F41C200001F51C400029F81C400002001DC00403261DA000042B1D2000022C1D2006035D1DA000\
02621D800003661DA000026B1DA00104781D200002791DC00803BF1D200029C01DC00629FB1DA000\
02001E002003001FC00203181FC00003201FC00403481FC00003501F000103591F2000035B1F2000\
035D1F2000035F1FE00303801FA00603B61FE00103C61FC00103D61FC00003DD1F600203F21F6000\
03F61F20010100208001290C204000010E20E00A016620600102712020000174206001027F202000\
018020E001029020A00101A020E00329D0202004010021C00403262120000127216000022A214000\
012C21C00002322120000133216003024E212000014F21200202602120050189216000019021E04D\
010024E004014024600101602400743500280020010029804E01762B000401982B400401BD2B8001\
01CA2B000101EC2B800039002CE00539302CE00502602C000437802C800E37F92CE00018002DC004\
18272D2000182D2D20003A302D00073A6F2D40003A7F2D20001A802DE0021AA02DE0001AA82DE000\
1AB02DE0001AB82DE0001AC02DE0001AC82DE0001AD02DE0001AD82DE00004E02D000401002EA008\
24802E4003249B2E200B24002FC01A01F02F8001010030A000240530200001063020002407302000\
01083020032421302001292A308000192E30400001303000012438308000013C308000214130C00A\
2999304000019B304000219D30600001A030200022A130400B01FB30400022FD3060002305312005\
193131C00B019031000223A031600301C031800422F0310002190032E0030120320008196032E003\
017F32200A22D032E005220033000B0158330015240034E0FF24FF3BE0FF24FE43E0FF24FD4B2037\
01C04D000824004EE0FF24FF55E0FF24FE5DE0FF24FD65E0FF24FC6DE0FF24FB75E0FF24FA7DE0FF\
24F985E0FF24F88DE0FF24F795E0FF24F69D003C2500A0A0912590A4E00653D0A400064600A58025\
0440A6000C54A0A6000B0100A740040222A7C00C0188A76000028BA7800402B0A7000102F7A72001\
3B00A880050130A840014140A800074780A8C00847CEA880010AE0A8C0034800A9C005012EA92000\
482FA920004930A98004495FA920001960A9A0035580A9C00901CFA9200055D0A9400155DEA94000\
17E0A9E0034D00AAE0064D40AAC0014D50AA40014D5CAA80001760AA00044F80AA60084FDBAAA000\
56E0AAE0021A01ABC0001A09ABC0001A11ABC0001A20ABE0001A28ABE0000230AB6005015BAB2000\
025CAB20010365AB20001B70AB000A56C0ABC00556F0AB40011900ACE0FF19FFB3E0FF19FEBBE0FF\
19FDC3E0FF19FCCBE0FF19FBD3207519B0D7E00219CBD720062400F9C02D2470FA400D0200FBE000\
0513FBA000061DFB40030638FBA000063EFB20000640FB40000643FB40000646FB40010750FB400E\
07D3FB602D013EFD40000750FD00080792FDC00607F0FDC0012900FE00020110FE40012920FEC001\
042EFE40000130FE60040154FE60020168FE80000770FEA0000776FEE01001FFFE20000101FF0004\
0221FF4003013BFFC0000241FF4003015BFF60012266FF40010170FF20002271FFA005019EFF4000\
19A0FFE00319C2FFC00019CAFFC00019D2FFC00019DAFF600001E0FFE00001E8FFE00001F9FFA000\
3000008101300D0041033028006102303C004100303F00E101305000C101308000610F0100016100\
010701A1050137012101034001E109019001810103A001210001D001A10529FD0121004A8002A103\
4BA002210629E002210001E1026103260003810427300361037850036105318003C103319F032100\
3CA00381043CC803C101280004010A3250040106338004C10333A004410188B004810488D8048104\
6A000501056730058106676F0521006E0006E1266E4007C1026E60070101340008C1003408082100\
340A0881053437084100343C082100343F082100574008C10257570821017660080104758008E103\
75A708210180E008610280F408410080FB08A1004000098103401F0921004C200941034C3F092100\
628009010461A009010361BC09810261D209C1053D000A81003D050A41003D0C0A01013D150A6100\
3D190A61033D380A61003D3F0A21013D500A210158600A010474800A010470C00AE10470EB0A8101\
50000BC10650390BE10059400BC10259580B01015A600B61025A780B010179800B410279990B8100\
79A90BE1005B000C210982800C610682C00C610682FA0CC10007600EE1035E0010C1095E5210C103\
5E7F1021005C8010410865D010210365F0104101600011A106603611C1016F5011E104648011C109\
64D011010213E11181026D001241026D13128105818012E1008188122100818A128100818F12E101\
819F1261017BB01261077BF01241016B001381006B051301016B0F1341006B1313C1026B2A13E100\
6B321341006B3513A1006B3C1321016B471341006B4B1361006B501321006B571321006B5D13E100\
6B6613E1006B7013A100870014410B875B142100875D1421007C801401097CD01441017A8015C106\
7AB815C104720016A1087250164101206016A101668016010766C01641017E001741037E1D17E101\
7E301701027DA018610A7DFF18210077C01A210785001C2101850A1CA10585381CC10185501CA103\
86701C010486921CC10286A91CC1013F002041733F0024E10D3F7024A1003F80248118510030E185\
7F0044E148540068214773406AE10373606A4101736E6A410068D06AC10368F06AC1006C006BC108\
6C506B41016C5B6BE1006C636BA1026C7D6B610263006FA10863506FE105638F6F210289E06F2100\
890070E1FF89FF77E1FF89FE7FE1FD890088615E2200B021002101B021006900BC610D6970BCA101\
6980BC21016990BC4101699CBC810001A0BC81000100D0C11E0100D1E1040129D1C1072967D16100\
016AD12102297BD101010183D141002985D1E100018CD1C10329AAD1810001AED161070300D2C108\
0100D3E10A0160D341020100D4A10A0156D4E108019ED4410001A2D4210001A5D4410001A9D48100\
01AED4810101BBD4210001BDD4E10001C5D421080107D58100010DD501010116D5E100011ED58103\
013BD581000140D5A1000146D52100014AD5E1000152D5812A01A8D6812401CED741068300D88151\
839BDAA10083A1DAE1013900E0E1003908E02102391BE0E1003923E041003926E0A1007100E8A118\
71C7E801028400E961098450E94101845EE941000700EE81000705EE61030721EE41000724EE2100\
0727EE21000729EE41010734EE81000739EE2100073BEE21000742EE21000747EE21000749EE2100\
074BEE2100074DEE61000751EE41000754EE21000757EE21000759EE2100075BEE2100075DEE2100\
075FEE21000761EE41000764EE21000767EE8100076CEEE1000774EE81000779EE8100077EEE2100\
0780EE4101078BEE210207A1EE610007A5EEA10007ABEE210207F0EE41000100F081050130F0810C\
01A0F0E10101B1F0E10101C1F0E10101D1F0A1040100F1A1010110F1E1030130F181070170F1A107\
01E6F141032100F221000101F241000110F281050140F221010150F241000100F3617A01E0F6A101\
01F0F6E1000100F7810E0180F7A10A0100F881010110F801070150F841010160F801050190F8C103\
0110F9E1010120F901010130F921000133F981010140F981010150F9E1010180F9410201C0F92100\
240000E2FF24FF07E2FF24FE0FE2FF24FD17E2FF24FC1FE2FF24FB27E2FF24FA2FE2FF24F937E2FF\
24F83FE2FF24F747E2FF24F64FE2FF24F557E2FF24F45FE2FF24F367E2FF24F26FE2FF24F177E2FF\
24F07FE2FF24EF87E2FF24EE8FE2FF24ED97E2FF24EC9F62DD2400A7E2FF24FFAEE2FF24FEB6E206\
2440B7C21B2420B8E2FF241FC0E2FF241EC882D02400F8C2430101002E000120000E0C2900010E1E\
'.replace(
/[0-9A-F]{2}/g,
function($0){return String.fromCharCode(parseInt($0, 16))});
const SCRIPTS_PROP_UNIT_LENGTH = 5;
const SCRIPT = {
'Unknown': 0,
'Common': 1,
'Latin': 2,
'Greek': 3,
'Cyrillic': 4,
'Armenian': 5,
'Hebrew': 6,
'Arabic': 7,
'Syriac': 8,
'Thaana': 9,
'Devanagari': 10,
'Bengali': 11,
'Gurmukhi': 12,
'Gujarati': 13,
'Oriya': 14,
'Tamil': 15,
'Telugu': 16,
'Kannada': 17,
'Malayalam': 18,
'Sinhala': 19,
'Thai': 20,
'Lao': 21,
'Tibetan': 22,
'Myanmar': 23,
'Georgian': 24,
'Hangul': 25,
'Ethiopic': 26,
'Cherokee': 27,
'Canadian_Aboriginal': 28,
'Ogham': 29,
'Runic': 30,
'Khmer': 31,
'Mongolian': 32,
'Hiragana': 33,
'Katakana': 34,
'Bopomofo': 35,
'Han': 36,
'Yi': 37,
'Old_Italic': 38,
'Gothic': 39,
'Deseret': 40,
'Inherited': 41,
'Tagalog': 42,
'Hanunoo': 43,
'Buhid': 44,
'Tagbanwa': 45,
'Limbu': 46,
'Tai_Le': 47,
'Linear_B': 48,
'Ugaritic': 49,
'Shavian': 50,
'Osmanya': 51,
'Cypriot': 52,
'Braille': 53,
'Buginese': 54,
'Coptic': 55,
'New_Tai_Lue': 56,
'Glagolitic': 57,
'Tifinagh': 58,
'Syloti_Nagri': 59,
'Old_Persian': 60,
'Kharoshthi': 61,
'Balinese': 62,
'Cuneiform': 63,
'Phoenician': 64,
'Phags_Pa': 65,
'Nko': 66,
'Sundanese': 67,
'Lepcha': 68,
'Ol_Chiki': 69,
'Vai': 70,
'Saurashtra': 71,
'Kayah_Li': 72,
'Rejang': 73,
'Lycian': 74,
'Carian': 75,
'Lydian': 76,
'Cham': 77,
'Tai_Tham': 78,
'Tai_Viet': 79,
'Avestan': 80,
'Egyptian_Hieroglyphs': 81,
'Samaritan': 82,
'Lisu': 83,
'Bamum': 84,
'Javanese': 85,
'Meetei_Mayek': 86,
'Imperial_Aramaic': 87,
'Old_South_Arabian': 88,
'Inscriptional_Parthian': 89,
'Inscriptional_Pahlavi': 90,
'Old_Turkic': 91,
'Kaithi': 92,
'Batak': 93,
'Brahmi': 94,
'Mandaic': 95,
'Chakma': 96,
'Meroitic_Cursive': 97,
'Meroitic_Hieroglyphs': 98,
'Miao': 99,
'Sharada': 100,
'Sora_Sompeng': 101,
'Takri': 102,
'Caucasian_Albanian': 103,
'Bassa_Vah': 104,
'Duployan': 105,
'Elbasan': 106,
'Grantha': 107,
'Pahawh_Hmong': 108,
'Khojki': 109,
'Linear_A': 110,
'Mahajani': 111,
'Manichaean': 112,
'Mende_Kikakui': 113,
'Modi': 114,
'Mro': 115,
'Old_North_Arabian': 116,
'Nabataean': 117,
'Palmyrene': 118,
'Pau_Cin_Hau': 119,
'Old_Permic': 120,
'Psalter_Pahlavi': 121,
'Siddham': 122,
'Khudawadi': 123,
'Tirhuta': 124,
'Warang_Citi': 125,
'Ahom': 126,
'Anatolian_Hieroglyphs': 127,
'Hatran': 128,
'Multani': 129,
'Old_Hungarian': 130,
'SignWriting': 131,
'Adlam': 132,
'Bhaiksuki': 133,
'Marchen': 134,
'Newa': 135,
'Osage': 136,
'Tangut': 137
};
const SCRIPT_NAMES = Object.keys(SCRIPT);
// GENERATED CODE END
// >>>
/*
* variables
*/
var graphemeFinder = createFinder(
GRAPHEME_BREAK_PROPS, GRAPHEME_BREAK_PROP_UNIT_LENGTH, GBP.Other);
var wordFinder = createFinder(
WORD_BREAK_PROPS, WORD_BREAK_PROP_UNIT_LENGTH, WBP.Other);
var sentenceFinder = createFinder(
SENTENCE_BREAK_PROPS, SENTENCE_BREAK_PROP_UNIT_LENGTH, SBP.Other);
var scriptFinder = createFinder(
SCRIPTS, SCRIPTS_PROP_UNIT_LENGTH, SCRIPT.Unknown);
/*
* utility functions
*/
function pick2 (data, index) {
return data.charCodeAt(index)
| data.charCodeAt(index + 1) << 8;
}
function pick3 (data, index) {
return data.charCodeAt(index)
| data.charCodeAt(index + 1) << 8
| data.charCodeAt(index + 2) << 16;
}
function pick4 (data, index) {
return data.charCodeAt(index)
| data.charCodeAt(index + 1) << 8