js.documents 14.4.45 → 14.4.47

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.
Files changed (67) hide show
  1. package/dist/convert/composition.cjs +9 -4
  2. package/dist/convert/composition.js +9 -4
  3. package/dist/convert/variant-bridges.cjs +2 -1
  4. package/dist/convert/variant-bridges.js +2 -1
  5. package/dist/csv/records.cjs +2 -1
  6. package/dist/csv/records.js +2 -1
  7. package/dist/edit/geometry.cjs +2 -1
  8. package/dist/edit/geometry.js +2 -1
  9. package/dist/edit/odg/svg-path.cjs +2 -1
  10. package/dist/edit/odg/svg-path.js +2 -1
  11. package/dist/edit/ods/cell.cjs +2 -1
  12. package/dist/edit/ods/cell.js +2 -1
  13. package/dist/edit/pdf/util.cjs +2 -1
  14. package/dist/edit/pdf/util.js +2 -1
  15. package/dist/firebird/data.cjs +2 -1
  16. package/dist/firebird/data.js +2 -1
  17. package/dist/firebird/date.cjs +40 -21
  18. package/dist/firebird/date.js +40 -21
  19. package/dist/firebird/reader.cjs +30 -19
  20. package/dist/firebird/reader.js +30 -19
  21. package/dist/hsqldb/binary-script.cjs +5 -4
  22. package/dist/hsqldb/binary-script.js +5 -4
  23. package/dist/hsqldb/cache.cjs +4 -2
  24. package/dist/hsqldb/cache.js +4 -2
  25. package/dist/hsqldb/rowformat.cjs +93 -57
  26. package/dist/hsqldb/rowformat.js +93 -57
  27. package/dist/hsqldb/script.cjs +2 -1
  28. package/dist/hsqldb/script.js +2 -1
  29. package/dist/latex/lower.cjs +2 -1
  30. package/dist/latex/lower.js +2 -1
  31. package/dist/latex/rational.cjs +6 -3
  32. package/dist/latex/rational.js +6 -3
  33. package/dist/layout/cell-typing.cjs +7 -3
  34. package/dist/layout/cell-typing.js +7 -3
  35. package/dist/layout/reconstruct.cjs +17 -15
  36. package/dist/layout/reconstruct.js +17 -15
  37. package/dist/layout/shared.cjs +2 -1
  38. package/dist/layout/shared.js +2 -1
  39. package/dist/layout/sheets.cjs +2 -1
  40. package/dist/layout/sheets.js +2 -1
  41. package/dist/mathml/layout.cjs +11 -5
  42. package/dist/mathml/layout.js +11 -5
  43. package/dist/mathml/length.cjs +12 -10
  44. package/dist/mathml/length.js +12 -10
  45. package/dist/mathml/operators.cjs +7 -3
  46. package/dist/mathml/operators.js +7 -3
  47. package/dist/mathml/variant.cjs +116 -1142
  48. package/dist/mathml/variant.js +116 -1142
  49. package/dist/model/bytes.cjs +9 -16
  50. package/dist/model/bytes.js +9 -16
  51. package/dist/model/geometry.cjs +2 -1
  52. package/dist/model/geometry.js +2 -1
  53. package/dist/odb/read.cjs +10 -2
  54. package/dist/odb/read.js +10 -2
  55. package/dist/svg/paint.cjs +177 -749
  56. package/dist/svg/paint.js +177 -749
  57. package/dist/svg/path.cjs +11 -6
  58. package/dist/svg/path.js +11 -6
  59. package/dist/svg/read.cjs +7 -3
  60. package/dist/svg/read.js +8 -4
  61. package/dist/svg/transform.cjs +11 -7
  62. package/dist/svg/transform.js +11 -7
  63. package/dist/svg/units.cjs +9 -5
  64. package/dist/svg/units.d.cts +2 -1
  65. package/dist/svg/units.d.ts +2 -1
  66. package/dist/svg/units.js +9 -6
  67. package/package.json +3 -3
@@ -1,1085 +1,102 @@
1
1
  Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
2
2
  //#region src/mathml/variant.ts
3
+ const LATIN_CASE_LETTER_COUNT = 26;
4
+ const GREEK_LETTER_COUNT = 24;
5
+ const GREEK_SIGMA_GAP_INDEX = 17;
6
+ const GREEK_SYMBOL_VARIANT_COUNT = 6;
7
+ const DIGIT_COUNT = 10;
8
+ function consecutiveCodepoints(base, count) {
9
+ return Array.from({ length: count }, (_, index) => base + index);
10
+ }
11
+ function withHoles(codepoints, holes) {
12
+ const result = [...codepoints];
13
+ for (const [index, replacement] of Object.entries(holes)) result[Number(index)] = replacement;
14
+ return result;
15
+ }
16
+ function greekAlphabetRun(base, count) {
17
+ const result = [];
18
+ let codePoint = base;
19
+ for (let index = 0; index < count; index++) {
20
+ if (index === GREEK_SIGMA_GAP_INDEX) codePoint += 1;
21
+ result.push(codePoint);
22
+ codePoint += 1;
23
+ }
24
+ return result;
25
+ }
26
+ function latinPair(upperBase, upperHoles, lowerHoles) {
27
+ const lowerBase = upperBase + LATIN_CASE_LETTER_COUNT;
28
+ const upper = consecutiveCodepoints(upperBase, LATIN_CASE_LETTER_COUNT);
29
+ const lower = consecutiveCodepoints(lowerBase, LATIN_CASE_LETTER_COUNT);
30
+ return [upperHoles === void 0 ? upper : withHoles(upper, upperHoles), lowerHoles === void 0 ? lower : withHoles(lower, lowerHoles)];
31
+ }
3
32
  const LATIN_VARIANTS = {
4
- bold: [[
5
- 119808,
6
- 119809,
7
- 119810,
8
- 119811,
9
- 119812,
10
- 119813,
11
- 119814,
12
- 119815,
13
- 119816,
14
- 119817,
15
- 119818,
16
- 119819,
17
- 119820,
18
- 119821,
19
- 119822,
20
- 119823,
21
- 119824,
22
- 119825,
23
- 119826,
24
- 119827,
25
- 119828,
26
- 119829,
27
- 119830,
28
- 119831,
29
- 119832,
30
- 119833
31
- ], [
32
- 119834,
33
- 119835,
34
- 119836,
35
- 119837,
36
- 119838,
37
- 119839,
38
- 119840,
39
- 119841,
40
- 119842,
41
- 119843,
42
- 119844,
43
- 119845,
44
- 119846,
45
- 119847,
46
- 119848,
47
- 119849,
48
- 119850,
49
- 119851,
50
- 119852,
51
- 119853,
52
- 119854,
53
- 119855,
54
- 119856,
55
- 119857,
56
- 119858,
57
- 119859
58
- ]],
59
- italic: [[
60
- 119860,
61
- 119861,
62
- 119862,
63
- 119863,
64
- 119864,
65
- 119865,
66
- 119866,
67
- 119867,
68
- 119868,
69
- 119869,
70
- 119870,
71
- 119871,
72
- 119872,
73
- 119873,
74
- 119874,
75
- 119875,
76
- 119876,
77
- 119877,
78
- 119878,
79
- 119879,
80
- 119880,
81
- 119881,
82
- 119882,
83
- 119883,
84
- 119884,
85
- 119885
86
- ], [
87
- 119886,
88
- 119887,
89
- 119888,
90
- 119889,
91
- 119890,
92
- 119891,
93
- 119892,
94
- 8462,
95
- 119894,
96
- 119895,
97
- 119896,
98
- 119897,
99
- 119898,
100
- 119899,
101
- 119900,
102
- 119901,
103
- 119902,
104
- 119903,
105
- 119904,
106
- 119905,
107
- 119906,
108
- 119907,
109
- 119908,
110
- 119909,
111
- 119910,
112
- 119911
113
- ]],
114
- "bold-italic": [[
115
- 119912,
116
- 119913,
117
- 119914,
118
- 119915,
119
- 119916,
120
- 119917,
121
- 119918,
122
- 119919,
123
- 119920,
124
- 119921,
125
- 119922,
126
- 119923,
127
- 119924,
128
- 119925,
129
- 119926,
130
- 119927,
131
- 119928,
132
- 119929,
133
- 119930,
134
- 119931,
135
- 119932,
136
- 119933,
137
- 119934,
138
- 119935,
139
- 119936,
140
- 119937
141
- ], [
142
- 119938,
143
- 119939,
144
- 119940,
145
- 119941,
146
- 119942,
147
- 119943,
148
- 119944,
149
- 119945,
150
- 119946,
151
- 119947,
152
- 119948,
153
- 119949,
154
- 119950,
155
- 119951,
156
- 119952,
157
- 119953,
158
- 119954,
159
- 119955,
160
- 119956,
161
- 119957,
162
- 119958,
163
- 119959,
164
- 119960,
165
- 119961,
166
- 119962,
167
- 119963
168
- ]],
169
- script: [[
170
- 119964,
171
- 8492,
172
- 119966,
173
- 119967,
174
- 8496,
175
- 8497,
176
- 119970,
177
- 8459,
178
- 8464,
179
- 119973,
180
- 119974,
181
- 8466,
182
- 8499,
183
- 119977,
184
- 119978,
185
- 119979,
186
- 119980,
187
- 8475,
188
- 119982,
189
- 119983,
190
- 119984,
191
- 119985,
192
- 119986,
193
- 119987,
194
- 119988,
195
- 119989
196
- ], [
197
- 119990,
198
- 119991,
199
- 119992,
200
- 119993,
201
- 8495,
202
- 119995,
203
- 8458,
204
- 119997,
205
- 119998,
206
- 119999,
207
- 12e4,
208
- 120001,
209
- 120002,
210
- 120003,
211
- 8500,
212
- 120005,
213
- 120006,
214
- 120007,
215
- 120008,
216
- 120009,
217
- 120010,
218
- 120011,
219
- 120012,
220
- 120013,
221
- 120014,
222
- 120015
223
- ]],
224
- "bold-script": [[
225
- 120016,
226
- 120017,
227
- 120018,
228
- 120019,
229
- 120020,
230
- 120021,
231
- 120022,
232
- 120023,
233
- 120024,
234
- 120025,
235
- 120026,
236
- 120027,
237
- 120028,
238
- 120029,
239
- 120030,
240
- 120031,
241
- 120032,
242
- 120033,
243
- 120034,
244
- 120035,
245
- 120036,
246
- 120037,
247
- 120038,
248
- 120039,
249
- 120040,
250
- 120041
251
- ], [
252
- 120042,
253
- 120043,
254
- 120044,
255
- 120045,
256
- 120046,
257
- 120047,
258
- 120048,
259
- 120049,
260
- 120050,
261
- 120051,
262
- 120052,
263
- 120053,
264
- 120054,
265
- 120055,
266
- 120056,
267
- 120057,
268
- 120058,
269
- 120059,
270
- 120060,
271
- 120061,
272
- 120062,
273
- 120063,
274
- 120064,
275
- 120065,
276
- 120066,
277
- 120067
278
- ]],
279
- fraktur: [[
280
- 120068,
281
- 120069,
282
- 8493,
283
- 120071,
284
- 120072,
285
- 120073,
286
- 120074,
287
- 8460,
288
- 8465,
289
- 120077,
290
- 120078,
291
- 120079,
292
- 120080,
293
- 120081,
294
- 120082,
295
- 120083,
296
- 120084,
297
- 8476,
298
- 120086,
299
- 120087,
300
- 120088,
301
- 120089,
302
- 120090,
303
- 120091,
304
- 120092,
305
- 8488
306
- ], [
307
- 120094,
308
- 120095,
309
- 120096,
310
- 120097,
311
- 120098,
312
- 120099,
313
- 120100,
314
- 120101,
315
- 120102,
316
- 120103,
317
- 120104,
318
- 120105,
319
- 120106,
320
- 120107,
321
- 120108,
322
- 120109,
323
- 120110,
324
- 120111,
325
- 120112,
326
- 120113,
327
- 120114,
328
- 120115,
329
- 120116,
330
- 120117,
331
- 120118,
332
- 120119
333
- ]],
334
- "double-struck": [[
335
- 120120,
336
- 120121,
337
- 8450,
338
- 120123,
339
- 120124,
340
- 120125,
341
- 120126,
342
- 8461,
343
- 120128,
344
- 120129,
345
- 120130,
346
- 120131,
347
- 120132,
348
- 8469,
349
- 120134,
350
- 8473,
351
- 8474,
352
- 8477,
353
- 120138,
354
- 120139,
355
- 120140,
356
- 120141,
357
- 120142,
358
- 120143,
359
- 120144,
360
- 8484
361
- ], [
362
- 120146,
363
- 120147,
364
- 120148,
365
- 120149,
366
- 120150,
367
- 120151,
368
- 120152,
369
- 120153,
370
- 120154,
371
- 120155,
372
- 120156,
373
- 120157,
374
- 120158,
375
- 120159,
376
- 120160,
377
- 120161,
378
- 120162,
379
- 120163,
380
- 120164,
381
- 120165,
382
- 120166,
383
- 120167,
384
- 120168,
385
- 120169,
386
- 120170,
387
- 120171
388
- ]],
389
- "bold-fraktur": [[
390
- 120172,
391
- 120173,
392
- 120174,
393
- 120175,
394
- 120176,
395
- 120177,
396
- 120178,
397
- 120179,
398
- 120180,
399
- 120181,
400
- 120182,
401
- 120183,
402
- 120184,
403
- 120185,
404
- 120186,
405
- 120187,
406
- 120188,
407
- 120189,
408
- 120190,
409
- 120191,
410
- 120192,
411
- 120193,
412
- 120194,
413
- 120195,
414
- 120196,
415
- 120197
416
- ], [
417
- 120198,
418
- 120199,
419
- 120200,
420
- 120201,
421
- 120202,
422
- 120203,
423
- 120204,
424
- 120205,
425
- 120206,
426
- 120207,
427
- 120208,
428
- 120209,
429
- 120210,
430
- 120211,
431
- 120212,
432
- 120213,
433
- 120214,
434
- 120215,
435
- 120216,
436
- 120217,
437
- 120218,
438
- 120219,
439
- 120220,
440
- 120221,
441
- 120222,
442
- 120223
443
- ]],
444
- "sans-serif": [[
445
- 120224,
446
- 120225,
447
- 120226,
448
- 120227,
449
- 120228,
450
- 120229,
451
- 120230,
452
- 120231,
453
- 120232,
454
- 120233,
455
- 120234,
456
- 120235,
457
- 120236,
458
- 120237,
459
- 120238,
460
- 120239,
461
- 120240,
462
- 120241,
463
- 120242,
464
- 120243,
465
- 120244,
466
- 120245,
467
- 120246,
468
- 120247,
469
- 120248,
470
- 120249
471
- ], [
472
- 120250,
473
- 120251,
474
- 120252,
475
- 120253,
476
- 120254,
477
- 120255,
478
- 120256,
479
- 120257,
480
- 120258,
481
- 120259,
482
- 120260,
483
- 120261,
484
- 120262,
485
- 120263,
486
- 120264,
487
- 120265,
488
- 120266,
489
- 120267,
490
- 120268,
491
- 120269,
492
- 120270,
493
- 120271,
494
- 120272,
495
- 120273,
496
- 120274,
497
- 120275
498
- ]],
499
- "bold-sans-serif": [[
500
- 120276,
501
- 120277,
502
- 120278,
503
- 120279,
504
- 120280,
505
- 120281,
506
- 120282,
507
- 120283,
508
- 120284,
509
- 120285,
510
- 120286,
511
- 120287,
512
- 120288,
513
- 120289,
514
- 120290,
515
- 120291,
516
- 120292,
517
- 120293,
518
- 120294,
519
- 120295,
520
- 120296,
521
- 120297,
522
- 120298,
523
- 120299,
524
- 120300,
525
- 120301
526
- ], [
527
- 120302,
528
- 120303,
529
- 120304,
530
- 120305,
531
- 120306,
532
- 120307,
533
- 120308,
534
- 120309,
535
- 120310,
536
- 120311,
537
- 120312,
538
- 120313,
539
- 120314,
540
- 120315,
541
- 120316,
542
- 120317,
543
- 120318,
544
- 120319,
545
- 120320,
546
- 120321,
547
- 120322,
548
- 120323,
549
- 120324,
550
- 120325,
551
- 120326,
552
- 120327
553
- ]],
554
- "sans-serif-italic": [[
555
- 120328,
556
- 120329,
557
- 120330,
558
- 120331,
559
- 120332,
560
- 120333,
561
- 120334,
562
- 120335,
563
- 120336,
564
- 120337,
565
- 120338,
566
- 120339,
567
- 120340,
568
- 120341,
569
- 120342,
570
- 120343,
571
- 120344,
572
- 120345,
573
- 120346,
574
- 120347,
575
- 120348,
576
- 120349,
577
- 120350,
578
- 120351,
579
- 120352,
580
- 120353
581
- ], [
582
- 120354,
583
- 120355,
584
- 120356,
585
- 120357,
586
- 120358,
587
- 120359,
588
- 120360,
589
- 120361,
590
- 120362,
591
- 120363,
592
- 120364,
593
- 120365,
594
- 120366,
595
- 120367,
596
- 120368,
597
- 120369,
598
- 120370,
599
- 120371,
600
- 120372,
601
- 120373,
602
- 120374,
603
- 120375,
604
- 120376,
605
- 120377,
606
- 120378,
607
- 120379
608
- ]],
609
- "sans-serif-bold-italic": [[
610
- 120380,
611
- 120381,
612
- 120382,
613
- 120383,
614
- 120384,
615
- 120385,
616
- 120386,
617
- 120387,
618
- 120388,
619
- 120389,
620
- 120390,
621
- 120391,
622
- 120392,
623
- 120393,
624
- 120394,
625
- 120395,
626
- 120396,
627
- 120397,
628
- 120398,
629
- 120399,
630
- 120400,
631
- 120401,
632
- 120402,
633
- 120403,
634
- 120404,
635
- 120405
636
- ], [
637
- 120406,
638
- 120407,
639
- 120408,
640
- 120409,
641
- 120410,
642
- 120411,
643
- 120412,
644
- 120413,
645
- 120414,
646
- 120415,
647
- 120416,
648
- 120417,
649
- 120418,
650
- 120419,
651
- 120420,
652
- 120421,
653
- 120422,
654
- 120423,
655
- 120424,
656
- 120425,
657
- 120426,
658
- 120427,
659
- 120428,
660
- 120429,
661
- 120430,
662
- 120431
663
- ]],
664
- monospace: [[
665
- 120432,
666
- 120433,
667
- 120434,
668
- 120435,
669
- 120436,
670
- 120437,
671
- 120438,
672
- 120439,
673
- 120440,
674
- 120441,
675
- 120442,
676
- 120443,
677
- 120444,
678
- 120445,
679
- 120446,
680
- 120447,
681
- 120448,
682
- 120449,
683
- 120450,
684
- 120451,
685
- 120452,
686
- 120453,
687
- 120454,
688
- 120455,
689
- 120456,
690
- 120457
691
- ], [
692
- 120458,
693
- 120459,
694
- 120460,
695
- 120461,
696
- 120462,
697
- 120463,
698
- 120464,
699
- 120465,
700
- 120466,
701
- 120467,
702
- 120468,
703
- 120469,
704
- 120470,
705
- 120471,
706
- 120472,
707
- 120473,
708
- 120474,
709
- 120475,
710
- 120476,
711
- 120477,
712
- 120478,
713
- 120479,
714
- 120480,
715
- 120481,
716
- 120482,
717
- 120483
718
- ]]
33
+ bold: latinPair(119808),
34
+ italic: latinPair(119860, void 0, { 7: 8462 }),
35
+ "bold-italic": latinPair(119912),
36
+ script: latinPair(119964, {
37
+ 1: 8492,
38
+ 4: 8496,
39
+ 5: 8497,
40
+ 7: 8459,
41
+ 8: 8464,
42
+ 11: 8466,
43
+ 12: 8499,
44
+ 17: 8475
45
+ }, {
46
+ 4: 8495,
47
+ 6: 8458,
48
+ 14: 8500
49
+ }),
50
+ "bold-script": latinPair(120016),
51
+ fraktur: latinPair(120068, {
52
+ 2: 8493,
53
+ 7: 8460,
54
+ 8: 8465,
55
+ 17: 8476,
56
+ 25: 8488
57
+ }),
58
+ "double-struck": latinPair(120120, {
59
+ 2: 8450,
60
+ 7: 8461,
61
+ 13: 8469,
62
+ 15: 8473,
63
+ 16: 8474,
64
+ 17: 8477,
65
+ 25: 8484
66
+ }),
67
+ "bold-fraktur": latinPair(120172),
68
+ "sans-serif": latinPair(120224),
69
+ "bold-sans-serif": latinPair(120276),
70
+ "sans-serif-italic": latinPair(120328),
71
+ "sans-serif-bold-italic": latinPair(120380),
72
+ monospace: latinPair(120432)
719
73
  };
720
- const GREEK_UPPER_BASE = [
721
- 913,
722
- 914,
723
- 915,
724
- 916,
725
- 917,
726
- 918,
727
- 919,
728
- 920,
729
- 921,
730
- 922,
731
- 923,
732
- 924,
733
- 925,
734
- 926,
735
- 927,
736
- 928,
737
- 929,
738
- 931,
739
- 932,
740
- 933,
741
- 934,
742
- 935,
743
- 936,
744
- 937
745
- ];
746
- const GREEK_LOWER_BASE = [
747
- 945,
748
- 946,
749
- 947,
750
- 948,
751
- 949,
752
- 950,
753
- 951,
754
- 952,
755
- 953,
756
- 954,
757
- 955,
758
- 956,
759
- 957,
760
- 958,
761
- 959,
762
- 960,
763
- 961,
764
- 963,
765
- 964,
766
- 965,
767
- 966,
768
- 967,
769
- 968,
770
- 969
771
- ];
74
+ function greekVariantEntry(upperBase) {
75
+ const upper = greekAlphabetRun(upperBase, GREEK_LETTER_COUNT);
76
+ const nabla = upperBase + GREEK_LETTER_COUNT + 1;
77
+ const lowerBase = upperBase + LATIN_CASE_LETTER_COUNT;
78
+ const lower = greekAlphabetRun(lowerBase, GREEK_LETTER_COUNT);
79
+ const partial = lowerBase + GREEK_LETTER_COUNT + 1;
80
+ const [epsilon, theta, kappa, phi, rho, pi] = consecutiveCodepoints(partial + 1, GREEK_SYMBOL_VARIANT_COUNT);
81
+ return {
82
+ upper,
83
+ lower,
84
+ nabla,
85
+ partial,
86
+ epsilon,
87
+ theta,
88
+ kappa,
89
+ phi,
90
+ rho,
91
+ pi
92
+ };
93
+ }
772
94
  const GREEK_VARIANTS = {
773
- bold: {
774
- upper: [
775
- 120488,
776
- 120489,
777
- 120490,
778
- 120491,
779
- 120492,
780
- 120493,
781
- 120494,
782
- 120495,
783
- 120496,
784
- 120497,
785
- 120498,
786
- 120499,
787
- 120500,
788
- 120501,
789
- 120502,
790
- 120503,
791
- 120504,
792
- 120506,
793
- 120507,
794
- 120508,
795
- 120509,
796
- 120510,
797
- 120511,
798
- 120512
799
- ],
800
- lower: [
801
- 120514,
802
- 120515,
803
- 120516,
804
- 120517,
805
- 120518,
806
- 120519,
807
- 120520,
808
- 120521,
809
- 120522,
810
- 120523,
811
- 120524,
812
- 120525,
813
- 120526,
814
- 120527,
815
- 120528,
816
- 120529,
817
- 120530,
818
- 120532,
819
- 120533,
820
- 120534,
821
- 120535,
822
- 120536,
823
- 120537,
824
- 120538
825
- ],
826
- nabla: 120513,
827
- partial: 120539,
828
- epsilon: 120540,
829
- theta: 120541,
830
- kappa: 120542,
831
- phi: 120543,
832
- rho: 120544,
833
- pi: 120545
834
- },
835
- italic: {
836
- upper: [
837
- 120546,
838
- 120547,
839
- 120548,
840
- 120549,
841
- 120550,
842
- 120551,
843
- 120552,
844
- 120553,
845
- 120554,
846
- 120555,
847
- 120556,
848
- 120557,
849
- 120558,
850
- 120559,
851
- 120560,
852
- 120561,
853
- 120562,
854
- 120564,
855
- 120565,
856
- 120566,
857
- 120567,
858
- 120568,
859
- 120569,
860
- 120570
861
- ],
862
- lower: [
863
- 120572,
864
- 120573,
865
- 120574,
866
- 120575,
867
- 120576,
868
- 120577,
869
- 120578,
870
- 120579,
871
- 120580,
872
- 120581,
873
- 120582,
874
- 120583,
875
- 120584,
876
- 120585,
877
- 120586,
878
- 120587,
879
- 120588,
880
- 120590,
881
- 120591,
882
- 120592,
883
- 120593,
884
- 120594,
885
- 120595,
886
- 120596
887
- ],
888
- nabla: 120571,
889
- partial: 120597,
890
- epsilon: 120598,
891
- theta: 120599,
892
- kappa: 120600,
893
- phi: 120601,
894
- rho: 120602,
895
- pi: 120603
896
- },
897
- "bold-italic": {
898
- upper: [
899
- 120604,
900
- 120605,
901
- 120606,
902
- 120607,
903
- 120608,
904
- 120609,
905
- 120610,
906
- 120611,
907
- 120612,
908
- 120613,
909
- 120614,
910
- 120615,
911
- 120616,
912
- 120617,
913
- 120618,
914
- 120619,
915
- 120620,
916
- 120622,
917
- 120623,
918
- 120624,
919
- 120625,
920
- 120626,
921
- 120627,
922
- 120628
923
- ],
924
- lower: [
925
- 120630,
926
- 120631,
927
- 120632,
928
- 120633,
929
- 120634,
930
- 120635,
931
- 120636,
932
- 120637,
933
- 120638,
934
- 120639,
935
- 120640,
936
- 120641,
937
- 120642,
938
- 120643,
939
- 120644,
940
- 120645,
941
- 120646,
942
- 120648,
943
- 120649,
944
- 120650,
945
- 120651,
946
- 120652,
947
- 120653,
948
- 120654
949
- ],
950
- nabla: 120629,
951
- partial: 120655,
952
- epsilon: 120656,
953
- theta: 120657,
954
- kappa: 120658,
955
- phi: 120659,
956
- rho: 120660,
957
- pi: 120661
958
- },
959
- "bold-sans-serif": {
960
- upper: [
961
- 120662,
962
- 120663,
963
- 120664,
964
- 120665,
965
- 120666,
966
- 120667,
967
- 120668,
968
- 120669,
969
- 120670,
970
- 120671,
971
- 120672,
972
- 120673,
973
- 120674,
974
- 120675,
975
- 120676,
976
- 120677,
977
- 120678,
978
- 120680,
979
- 120681,
980
- 120682,
981
- 120683,
982
- 120684,
983
- 120685,
984
- 120686
985
- ],
986
- lower: [
987
- 120688,
988
- 120689,
989
- 120690,
990
- 120691,
991
- 120692,
992
- 120693,
993
- 120694,
994
- 120695,
995
- 120696,
996
- 120697,
997
- 120698,
998
- 120699,
999
- 120700,
1000
- 120701,
1001
- 120702,
1002
- 120703,
1003
- 120704,
1004
- 120706,
1005
- 120707,
1006
- 120708,
1007
- 120709,
1008
- 120710,
1009
- 120711,
1010
- 120712
1011
- ],
1012
- nabla: 120687,
1013
- partial: 120713,
1014
- epsilon: 120714,
1015
- theta: 120715,
1016
- kappa: 120716,
1017
- phi: 120717,
1018
- rho: 120718,
1019
- pi: 120719
1020
- },
1021
- "sans-serif-bold-italic": {
1022
- upper: [
1023
- 120720,
1024
- 120721,
1025
- 120722,
1026
- 120723,
1027
- 120724,
1028
- 120725,
1029
- 120726,
1030
- 120727,
1031
- 120728,
1032
- 120729,
1033
- 120730,
1034
- 120731,
1035
- 120732,
1036
- 120733,
1037
- 120734,
1038
- 120735,
1039
- 120736,
1040
- 120738,
1041
- 120739,
1042
- 120740,
1043
- 120741,
1044
- 120742,
1045
- 120743,
1046
- 120744
1047
- ],
1048
- lower: [
1049
- 120746,
1050
- 120747,
1051
- 120748,
1052
- 120749,
1053
- 120750,
1054
- 120751,
1055
- 120752,
1056
- 120753,
1057
- 120754,
1058
- 120755,
1059
- 120756,
1060
- 120757,
1061
- 120758,
1062
- 120759,
1063
- 120760,
1064
- 120761,
1065
- 120762,
1066
- 120764,
1067
- 120765,
1068
- 120766,
1069
- 120767,
1070
- 120768,
1071
- 120769,
1072
- 120770
1073
- ],
1074
- nabla: 120745,
1075
- partial: 120771,
1076
- epsilon: 120772,
1077
- theta: 120773,
1078
- kappa: 120774,
1079
- phi: 120775,
1080
- rho: 120776,
1081
- pi: 120777
1082
- }
95
+ bold: greekVariantEntry(120488),
96
+ italic: greekVariantEntry(120546),
97
+ "bold-italic": greekVariantEntry(120604),
98
+ "bold-sans-serif": greekVariantEntry(120662),
99
+ "sans-serif-bold-italic": greekVariantEntry(120720)
1083
100
  };
1084
101
  const GREEK_SYMBOL_BASES = /* @__PURE__ */ new Map([
1085
102
  [1013, "epsilon"],
@@ -1089,79 +106,36 @@ const GREEK_SYMBOL_BASES = /* @__PURE__ */ new Map([
1089
106
  [1009, "rho"],
1090
107
  [982, "pi"]
1091
108
  ]);
109
+ const GREEK_CAPITAL_ALPHA = 913;
110
+ const GREEK_SMALL_ALPHA = 945;
111
+ const GREEK_UPPER_BASE = greekAlphabetRun(GREEK_CAPITAL_ALPHA, GREEK_LETTER_COUNT);
112
+ const GREEK_LOWER_BASE = greekAlphabetRun(GREEK_SMALL_ALPHA, GREEK_LETTER_COUNT);
1092
113
  const DIGIT_VARIANTS = {
1093
- bold: [
1094
- 120782,
1095
- 120783,
1096
- 120784,
1097
- 120785,
1098
- 120786,
1099
- 120787,
1100
- 120788,
1101
- 120789,
1102
- 120790,
1103
- 120791
1104
- ],
1105
- "double-struck": [
1106
- 120792,
1107
- 120793,
1108
- 120794,
1109
- 120795,
1110
- 120796,
1111
- 120797,
1112
- 120798,
1113
- 120799,
1114
- 120800,
1115
- 120801
1116
- ],
1117
- "sans-serif": [
1118
- 120802,
1119
- 120803,
1120
- 120804,
1121
- 120805,
1122
- 120806,
1123
- 120807,
1124
- 120808,
1125
- 120809,
1126
- 120810,
1127
- 120811
1128
- ],
1129
- "bold-sans-serif": [
1130
- 120812,
1131
- 120813,
1132
- 120814,
1133
- 120815,
1134
- 120816,
1135
- 120817,
1136
- 120818,
1137
- 120819,
1138
- 120820,
1139
- 120821
1140
- ],
1141
- monospace: [
1142
- 120822,
1143
- 120823,
1144
- 120824,
1145
- 120825,
1146
- 120826,
1147
- 120827,
1148
- 120828,
1149
- 120829,
1150
- 120830,
1151
- 120831
1152
- ]
114
+ bold: consecutiveCodepoints(120782, DIGIT_COUNT),
115
+ "double-struck": consecutiveCodepoints(120792, DIGIT_COUNT),
116
+ "sans-serif": consecutiveCodepoints(120802, DIGIT_COUNT),
117
+ "bold-sans-serif": consecutiveCodepoints(120812, DIGIT_COUNT),
118
+ monospace: consecutiveCodepoints(120822, DIGIT_COUNT)
1153
119
  };
120
+ const LATIN_UPPER_A = 65;
121
+ const LATIN_UPPER_Z = 90;
122
+ const LATIN_LOWER_A = 97;
123
+ const LATIN_LOWER_Z = 122;
124
+ const DIGIT_ZERO = 48;
125
+ const DIGIT_NINE = 57;
126
+ const NABLA = 8711;
127
+ const PARTIAL_DIFFERENTIAL = 8706;
1154
128
  function mapMathVariant(codePoint, variant) {
1155
129
  if (variant === "normal") return codePoint;
1156
- if (codePoint >= 65 && codePoint <= 90) return LATIN_VARIANTS[variant]?.[0][codePoint - 65] ?? codePoint;
1157
- if (codePoint >= 97 && codePoint <= 122) return LATIN_VARIANTS[variant]?.[1][codePoint - 97] ?? codePoint;
1158
- if (codePoint >= 48 && codePoint <= 57) return DIGIT_VARIANTS[variant]?.[codePoint - 48] ?? codePoint;
130
+ if (codePoint >= LATIN_UPPER_A && codePoint <= LATIN_UPPER_Z) return LATIN_VARIANTS[variant]?.[0][codePoint - LATIN_UPPER_A] ?? codePoint;
131
+ if (codePoint >= LATIN_LOWER_A && codePoint <= LATIN_LOWER_Z) return LATIN_VARIANTS[variant]?.[1][codePoint - LATIN_LOWER_A] ?? codePoint;
132
+ if (codePoint >= DIGIT_ZERO && codePoint <= DIGIT_NINE) return DIGIT_VARIANTS[variant]?.[codePoint - DIGIT_ZERO] ?? codePoint;
1159
133
  const greekUpperIndex = GREEK_UPPER_BASE.indexOf(codePoint);
1160
134
  if (greekUpperIndex !== -1) return GREEK_VARIANTS[variant]?.upper[greekUpperIndex] ?? codePoint;
1161
135
  const greekLowerIndex = GREEK_LOWER_BASE.indexOf(codePoint);
1162
136
  if (greekLowerIndex !== -1) return GREEK_VARIANTS[variant]?.lower[greekLowerIndex] ?? codePoint;
1163
- if (codePoint === 8711) return GREEK_VARIANTS[variant]?.nabla ?? codePoint;
1164
- if (codePoint === 8706) return GREEK_VARIANTS[variant]?.partial ?? codePoint;
137
+ if (codePoint === NABLA) return GREEK_VARIANTS[variant]?.nabla ?? codePoint;
138
+ if (codePoint === PARTIAL_DIFFERENTIAL) return GREEK_VARIANTS[variant]?.partial ?? codePoint;
1165
139
  const symbolField = GREEK_SYMBOL_BASES.get(codePoint);
1166
140
  if (symbolField !== void 0) {
1167
141
  const entry = GREEK_VARIANTS[variant];